@kopexa/theme 17.9.0 → 17.11.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/{chunk-W7RJG22S.mjs → chunk-B5JVXVSG.mjs} +4 -9
- package/dist/{chunk-3CZOBPDH.mjs → chunk-CVGMGJPW.mjs} +2 -2
- package/dist/{chunk-NNKYGAZC.mjs → chunk-LIKA7I7Y.mjs} +1 -1
- package/dist/chunk-ODC3GJTR.mjs +61 -0
- package/dist/chunk-Q72M565Q.mjs +143 -0
- package/dist/chunk-VO435JJ5.mjs +62 -0
- package/dist/components/editor-basic.d.mts +42 -6
- package/dist/components/editor-basic.d.ts +42 -6
- package/dist/components/editor-basic.js +83 -3
- package/dist/components/editor-basic.mjs +1 -1
- package/dist/components/image-placeholder.d.mts +139 -0
- package/dist/components/image-placeholder.d.ts +139 -0
- package/dist/components/image-placeholder.js +86 -0
- package/dist/components/image-placeholder.mjs +6 -0
- package/dist/components/index.d.mts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +283 -87
- package/dist/components/index.mjs +24 -16
- package/dist/components/sidebar.js +2 -2
- package/dist/components/sidebar.mjs +1 -1
- package/dist/components/slash-dropdown-menu.js +1 -1
- package/dist/components/slash-dropdown-menu.mjs +1 -1
- package/dist/components/split-page-layout.d.mts +6 -0
- package/dist/components/split-page-layout.d.ts +6 -0
- package/dist/components/split-page-layout.js +4 -9
- package/dist/components/split-page-layout.mjs +1 -1
- package/dist/components/toc.d.mts +95 -0
- package/dist/components/toc.d.ts +95 -0
- package/dist/components/toc.js +85 -0
- package/dist/components/toc.mjs +6 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +283 -87
- package/dist/index.mjs +24 -16
- package/package.json +5 -4
- package/dist/chunk-XOL7P7NP.mjs +0 -63
- /package/dist/{chunk-6K5IB5IR.mjs → chunk-6RCNFPIU.mjs} +0 -0
|
@@ -5,21 +5,16 @@ var splitPageLayout = tv({
|
|
|
5
5
|
root: [
|
|
6
6
|
"size-full min-h-0 grid grid-cols-[1fr_10px] md:grid-cols-3 relative"
|
|
7
7
|
],
|
|
8
|
-
content: ["
|
|
8
|
+
content: ["col-span-1 md:col-span-2 overflow-hidden"],
|
|
9
|
+
contentBody: ["p-4 md:p-6 h-full overflow-auto"],
|
|
9
10
|
panelContainer: [
|
|
10
11
|
"flex flex-col",
|
|
11
12
|
"md:border-s",
|
|
12
13
|
//"size-full",
|
|
13
14
|
"bg-muted/50 dark:bg-primary-900"
|
|
14
15
|
],
|
|
15
|
-
panel: [
|
|
16
|
-
|
|
17
|
-
"p-4 md:p-6",
|
|
18
|
-
"overflow-y-auto overflow-x-hidden",
|
|
19
|
-
"flex-1",
|
|
20
|
-
"min-h-0",
|
|
21
|
-
"h-full"
|
|
22
|
-
],
|
|
16
|
+
panel: ["overflow-y-auto overflow-x-hidden", "flex-1", "min-h-0", "h-full"],
|
|
17
|
+
panelBody: ["p-4 md:p-6"],
|
|
23
18
|
bleed: "-mx-4 md:-mx-6",
|
|
24
19
|
mobileWrapper: "relative",
|
|
25
20
|
mobileContainer: ["absolute top-2 right-2 z-10"]
|
|
@@ -3,7 +3,7 @@ import { tv } from "tailwind-variants";
|
|
|
3
3
|
var sidebar = tv({
|
|
4
4
|
slots: {
|
|
5
5
|
provider: [
|
|
6
|
-
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex
|
|
6
|
+
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-svh w-full isolate overflow-hidden"
|
|
7
7
|
],
|
|
8
8
|
sidebarWrapper: ["group peer text-sidebar-foreground hidden md:block"],
|
|
9
9
|
sidebar: [
|
|
@@ -30,7 +30,7 @@ var sidebar = tv({
|
|
|
30
30
|
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2"
|
|
31
31
|
],
|
|
32
32
|
inset: [
|
|
33
|
-
"bg-background relative flex w-full flex-1 flex-col",
|
|
33
|
+
"bg-background relative flex w-full flex-1 flex-col min-h-0",
|
|
34
34
|
"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2"
|
|
35
35
|
],
|
|
36
36
|
input: ["bg-background h-8 w-full shadow-none"],
|
|
@@ -7,7 +7,7 @@ import { tv } from "tailwind-variants";
|
|
|
7
7
|
var slashDropdownMenu = tv({
|
|
8
8
|
slots: {
|
|
9
9
|
card: [...popoverContentClasses, "p-0", "flex flex-col outline-none"],
|
|
10
|
-
body: ["p-1.5 flex-auto grow shrink overflow-y-auto w-full"],
|
|
10
|
+
body: ["p-1.5 flex-auto grow shrink overflow-y-auto w-full bg-popover"],
|
|
11
11
|
cardItemGroup: [
|
|
12
12
|
"relative flex align-middle min-w-max",
|
|
13
13
|
"flex-col justify-center"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// src/components/toc.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var toc = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: ["my-4", "rounded-lg", "border", "bg-muted/30", "p-4"],
|
|
6
|
+
header: ["flex", "items-center", "justify-between", "gap-2", "mb-3"],
|
|
7
|
+
headerContent: [
|
|
8
|
+
"flex",
|
|
9
|
+
"items-center",
|
|
10
|
+
"gap-2",
|
|
11
|
+
"text-sm",
|
|
12
|
+
"font-medium",
|
|
13
|
+
"text-muted-foreground"
|
|
14
|
+
],
|
|
15
|
+
headerIcon: ["size-4"],
|
|
16
|
+
headerTitle: [],
|
|
17
|
+
headerActions: ["flex", "items-center", "gap-1"],
|
|
18
|
+
emptyState: ["text-sm", "text-muted-foreground", "italic"],
|
|
19
|
+
nav: [],
|
|
20
|
+
list: ["space-y-1", "list-none", "m-0", "p-0"],
|
|
21
|
+
item: ["list-none", "flex", "items-baseline", "gap-2"],
|
|
22
|
+
itemNumber: [
|
|
23
|
+
"text-sm",
|
|
24
|
+
"text-muted-foreground",
|
|
25
|
+
"tabular-nums",
|
|
26
|
+
"shrink-0"
|
|
27
|
+
],
|
|
28
|
+
itemButton: [
|
|
29
|
+
"text-sm",
|
|
30
|
+
"text-left",
|
|
31
|
+
"hover:text-primary",
|
|
32
|
+
"hover:underline",
|
|
33
|
+
"transition-colors",
|
|
34
|
+
"truncate"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
variants: {
|
|
38
|
+
style: {
|
|
39
|
+
default: {
|
|
40
|
+
root: ["bg-muted/30", "border", "p-4"]
|
|
41
|
+
},
|
|
42
|
+
flat: {
|
|
43
|
+
root: ["bg-transparent", "border-0", "p-0"],
|
|
44
|
+
header: ["mb-2"]
|
|
45
|
+
},
|
|
46
|
+
compact: {
|
|
47
|
+
root: ["bg-muted/20", "border", "p-3"],
|
|
48
|
+
list: ["space-y-0.5"],
|
|
49
|
+
itemButton: ["text-xs"],
|
|
50
|
+
itemNumber: ["text-xs"]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
style: "default"
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
toc
|
|
61
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// src/components/editor-basic.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var editorBasic = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: [
|
|
6
|
+
"grid grid-rows-[auto,minmax(0,1fr)]",
|
|
7
|
+
"h-full min-h-0 w-full min-w-0",
|
|
8
|
+
"content-start isolate"
|
|
9
|
+
],
|
|
10
|
+
toolbarContainer: [
|
|
11
|
+
"row-start-1 row-end-2",
|
|
12
|
+
"flex items-center gap-0.5",
|
|
13
|
+
"sticky top-0 z-10"
|
|
14
|
+
],
|
|
15
|
+
toolbar: "w-full",
|
|
16
|
+
wrapper: [
|
|
17
|
+
"row-start-2 row-end-3",
|
|
18
|
+
"min-h-0 min-w-0",
|
|
19
|
+
"overflow-y-auto"
|
|
20
|
+
// "h-[calc(100%-var(--spacing-editor-toolbar))]",
|
|
21
|
+
],
|
|
22
|
+
content: [
|
|
23
|
+
"w-full min-w-0",
|
|
24
|
+
"h-auto min-h-0",
|
|
25
|
+
"[&_.tiptap.ProseMirror]:py-4",
|
|
26
|
+
"[&_.tiptap.ProseMirror]:px-6",
|
|
27
|
+
"[&_.tiptap.ProseMirror]:min-h-0"
|
|
28
|
+
],
|
|
29
|
+
toolbarGroup: "flex items-center gap-0.5"
|
|
30
|
+
},
|
|
31
|
+
variants: {
|
|
32
|
+
variant: {
|
|
33
|
+
// rounded toolbar, muted background
|
|
34
|
+
default: {
|
|
35
|
+
wrapper: ["border rounded-md"],
|
|
36
|
+
toolbarContainer: "rounded-md mb-2",
|
|
37
|
+
content: ""
|
|
38
|
+
},
|
|
39
|
+
// document style, eg. document editor, fullpage etc pp
|
|
40
|
+
document: {
|
|
41
|
+
root: "h-full min-h-0 flex flex-col overflow-hidden",
|
|
42
|
+
toolbarContainer: ["shrink-0", "border-b bg-background", "px-4"],
|
|
43
|
+
wrapper: ["flex-1 min-h-0 overflow-auto", "bg-muted/30"],
|
|
44
|
+
content: [
|
|
45
|
+
// Centered paper effect
|
|
46
|
+
"mx-auto",
|
|
47
|
+
"w-full max-w-[816px]",
|
|
48
|
+
"min-h-full",
|
|
49
|
+
"bg-background",
|
|
50
|
+
"shadow-lg",
|
|
51
|
+
// ProseMirror styling
|
|
52
|
+
"[&_.tiptap.ProseMirror]:py-16",
|
|
53
|
+
"[&_.tiptap.ProseMirror]:px-16",
|
|
54
|
+
"[&_.tiptap.ProseMirror]:min-h-full"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
comment: {
|
|
58
|
+
root: "",
|
|
59
|
+
wrapper: [
|
|
60
|
+
"border rounded-md",
|
|
61
|
+
"max-h-[351lh]",
|
|
62
|
+
"max-h-[calc(35lh-var(--spacing-editor-toolbar,theme(space.10)))]"
|
|
63
|
+
],
|
|
64
|
+
toolbarContainer: "rounded-md mb-2",
|
|
65
|
+
content: ""
|
|
66
|
+
},
|
|
67
|
+
// Form field style - compact with bottom toolbar
|
|
68
|
+
field: {
|
|
69
|
+
root: [
|
|
70
|
+
"grid grid-rows-[minmax(0,1fr),auto]",
|
|
71
|
+
// content first, toolbar second
|
|
72
|
+
"transition-shadow"
|
|
73
|
+
],
|
|
74
|
+
wrapper: [
|
|
75
|
+
"row-start-1 row-end-2",
|
|
76
|
+
"max-h-[12lh]",
|
|
77
|
+
// ~12 lines max
|
|
78
|
+
"min-h-[4lh]",
|
|
79
|
+
// ~4 lines min
|
|
80
|
+
"overflow-y-auto",
|
|
81
|
+
"flex flex-col"
|
|
82
|
+
// stretch content
|
|
83
|
+
],
|
|
84
|
+
toolbarContainer: [
|
|
85
|
+
"row-start-2 row-end-3",
|
|
86
|
+
"border-t bg-muted/30",
|
|
87
|
+
"sticky bottom-0",
|
|
88
|
+
"py-1 px-2"
|
|
89
|
+
],
|
|
90
|
+
content: [
|
|
91
|
+
"flex-1",
|
|
92
|
+
// fill available space
|
|
93
|
+
"[&_.tiptap.ProseMirror]:py-3",
|
|
94
|
+
"[&_.tiptap.ProseMirror]:px-3",
|
|
95
|
+
"[&_.tiptap.ProseMirror]:text-sm",
|
|
96
|
+
"[&_.tiptap.ProseMirror]:min-h-full",
|
|
97
|
+
// editor fills container
|
|
98
|
+
"[&_.tiptap.ProseMirror]:cursor-text"
|
|
99
|
+
// show text cursor
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
bordered: {
|
|
104
|
+
true: {},
|
|
105
|
+
false: {}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
compoundVariants: [
|
|
109
|
+
// Field with border (default for editable)
|
|
110
|
+
{
|
|
111
|
+
variant: "field",
|
|
112
|
+
bordered: true,
|
|
113
|
+
class: {
|
|
114
|
+
root: [
|
|
115
|
+
"border rounded-md",
|
|
116
|
+
"focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2"
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
// Field without border (for read-only in cards)
|
|
121
|
+
{
|
|
122
|
+
variant: "field",
|
|
123
|
+
bordered: false,
|
|
124
|
+
class: {
|
|
125
|
+
root: "border-0",
|
|
126
|
+
wrapper: "min-h-0",
|
|
127
|
+
// remove min-height constraint for read-only
|
|
128
|
+
content: [
|
|
129
|
+
"[&_.tiptap.ProseMirror]:py-0",
|
|
130
|
+
"[&_.tiptap.ProseMirror]:px-0"
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
defaultVariants: {
|
|
136
|
+
variant: "default",
|
|
137
|
+
bordered: true
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
export {
|
|
142
|
+
editorBasic
|
|
143
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// src/components/image-placeholder.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var imagePlaceholder = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: [
|
|
6
|
+
"relative flex items-center justify-center",
|
|
7
|
+
"rounded-lg border-2 border-dashed",
|
|
8
|
+
"transition-colors cursor-pointer"
|
|
9
|
+
],
|
|
10
|
+
content: "flex flex-col items-center gap-2 pointer-events-none",
|
|
11
|
+
icon: "text-muted-foreground",
|
|
12
|
+
text: "text-muted-foreground",
|
|
13
|
+
hint: "text-muted-foreground",
|
|
14
|
+
removeButton: "absolute top-2 right-2"
|
|
15
|
+
},
|
|
16
|
+
variants: {
|
|
17
|
+
size: {
|
|
18
|
+
sm: {
|
|
19
|
+
root: "min-h-24 py-4 px-6",
|
|
20
|
+
icon: "size-6",
|
|
21
|
+
text: "text-xs",
|
|
22
|
+
hint: "text-[10px]"
|
|
23
|
+
},
|
|
24
|
+
md: {
|
|
25
|
+
root: "min-h-32 py-6 px-8",
|
|
26
|
+
icon: "size-8",
|
|
27
|
+
text: "text-sm",
|
|
28
|
+
hint: "text-xs"
|
|
29
|
+
},
|
|
30
|
+
lg: {
|
|
31
|
+
root: "min-h-40 py-8 px-10",
|
|
32
|
+
icon: "size-10",
|
|
33
|
+
text: "text-base",
|
|
34
|
+
hint: "text-sm"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
variant: {
|
|
38
|
+
default: {
|
|
39
|
+
root: "border-border bg-muted/20 hover:border-primary/50 hover:bg-muted/40"
|
|
40
|
+
},
|
|
41
|
+
error: {
|
|
42
|
+
root: "border-destructive/50 bg-destructive/10 cursor-default",
|
|
43
|
+
icon: "text-destructive",
|
|
44
|
+
text: "text-destructive"
|
|
45
|
+
},
|
|
46
|
+
disabled: {
|
|
47
|
+
root: "border-border bg-muted/10 cursor-not-allowed opacity-60"
|
|
48
|
+
},
|
|
49
|
+
uploading: {
|
|
50
|
+
root: "border-border bg-muted/30 cursor-wait"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
size: "md",
|
|
56
|
+
variant: "default"
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
imagePlaceholder
|
|
62
|
+
};
|
|
@@ -9,8 +9,10 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
9
9
|
content: string;
|
|
10
10
|
};
|
|
11
11
|
document: {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
root: string;
|
|
13
|
+
toolbarContainer: string[];
|
|
14
|
+
wrapper: string[];
|
|
15
|
+
content: string[];
|
|
14
16
|
};
|
|
15
17
|
comment: {
|
|
16
18
|
root: string;
|
|
@@ -18,6 +20,16 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
18
20
|
toolbarContainer: string;
|
|
19
21
|
content: string;
|
|
20
22
|
};
|
|
23
|
+
field: {
|
|
24
|
+
root: string[];
|
|
25
|
+
wrapper: string[];
|
|
26
|
+
toolbarContainer: string[];
|
|
27
|
+
content: string[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
bordered: {
|
|
31
|
+
true: {};
|
|
32
|
+
false: {};
|
|
21
33
|
};
|
|
22
34
|
}, {
|
|
23
35
|
root: string[];
|
|
@@ -34,8 +46,10 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
34
46
|
content: string;
|
|
35
47
|
};
|
|
36
48
|
document: {
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
root: string;
|
|
50
|
+
toolbarContainer: string[];
|
|
51
|
+
wrapper: string[];
|
|
52
|
+
content: string[];
|
|
39
53
|
};
|
|
40
54
|
comment: {
|
|
41
55
|
root: string;
|
|
@@ -43,6 +57,16 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
43
57
|
toolbarContainer: string;
|
|
44
58
|
content: string;
|
|
45
59
|
};
|
|
60
|
+
field: {
|
|
61
|
+
root: string[];
|
|
62
|
+
wrapper: string[];
|
|
63
|
+
toolbarContainer: string[];
|
|
64
|
+
content: string[];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
bordered: {
|
|
68
|
+
true: {};
|
|
69
|
+
false: {};
|
|
46
70
|
};
|
|
47
71
|
}, {
|
|
48
72
|
root: string[];
|
|
@@ -59,8 +83,10 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
59
83
|
content: string;
|
|
60
84
|
};
|
|
61
85
|
document: {
|
|
62
|
-
|
|
63
|
-
|
|
86
|
+
root: string;
|
|
87
|
+
toolbarContainer: string[];
|
|
88
|
+
wrapper: string[];
|
|
89
|
+
content: string[];
|
|
64
90
|
};
|
|
65
91
|
comment: {
|
|
66
92
|
root: string;
|
|
@@ -68,6 +94,16 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
68
94
|
toolbarContainer: string;
|
|
69
95
|
content: string;
|
|
70
96
|
};
|
|
97
|
+
field: {
|
|
98
|
+
root: string[];
|
|
99
|
+
wrapper: string[];
|
|
100
|
+
toolbarContainer: string[];
|
|
101
|
+
content: string[];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
bordered: {
|
|
105
|
+
true: {};
|
|
106
|
+
false: {};
|
|
71
107
|
};
|
|
72
108
|
}, {
|
|
73
109
|
root: string[];
|
|
@@ -9,8 +9,10 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
9
9
|
content: string;
|
|
10
10
|
};
|
|
11
11
|
document: {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
root: string;
|
|
13
|
+
toolbarContainer: string[];
|
|
14
|
+
wrapper: string[];
|
|
15
|
+
content: string[];
|
|
14
16
|
};
|
|
15
17
|
comment: {
|
|
16
18
|
root: string;
|
|
@@ -18,6 +20,16 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
18
20
|
toolbarContainer: string;
|
|
19
21
|
content: string;
|
|
20
22
|
};
|
|
23
|
+
field: {
|
|
24
|
+
root: string[];
|
|
25
|
+
wrapper: string[];
|
|
26
|
+
toolbarContainer: string[];
|
|
27
|
+
content: string[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
bordered: {
|
|
31
|
+
true: {};
|
|
32
|
+
false: {};
|
|
21
33
|
};
|
|
22
34
|
}, {
|
|
23
35
|
root: string[];
|
|
@@ -34,8 +46,10 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
34
46
|
content: string;
|
|
35
47
|
};
|
|
36
48
|
document: {
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
root: string;
|
|
50
|
+
toolbarContainer: string[];
|
|
51
|
+
wrapper: string[];
|
|
52
|
+
content: string[];
|
|
39
53
|
};
|
|
40
54
|
comment: {
|
|
41
55
|
root: string;
|
|
@@ -43,6 +57,16 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
43
57
|
toolbarContainer: string;
|
|
44
58
|
content: string;
|
|
45
59
|
};
|
|
60
|
+
field: {
|
|
61
|
+
root: string[];
|
|
62
|
+
wrapper: string[];
|
|
63
|
+
toolbarContainer: string[];
|
|
64
|
+
content: string[];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
bordered: {
|
|
68
|
+
true: {};
|
|
69
|
+
false: {};
|
|
46
70
|
};
|
|
47
71
|
}, {
|
|
48
72
|
root: string[];
|
|
@@ -59,8 +83,10 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
59
83
|
content: string;
|
|
60
84
|
};
|
|
61
85
|
document: {
|
|
62
|
-
|
|
63
|
-
|
|
86
|
+
root: string;
|
|
87
|
+
toolbarContainer: string[];
|
|
88
|
+
wrapper: string[];
|
|
89
|
+
content: string[];
|
|
64
90
|
};
|
|
65
91
|
comment: {
|
|
66
92
|
root: string;
|
|
@@ -68,6 +94,16 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
|
|
|
68
94
|
toolbarContainer: string;
|
|
69
95
|
content: string;
|
|
70
96
|
};
|
|
97
|
+
field: {
|
|
98
|
+
root: string[];
|
|
99
|
+
wrapper: string[];
|
|
100
|
+
toolbarContainer: string[];
|
|
101
|
+
content: string[];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
bordered: {
|
|
105
|
+
true: {};
|
|
106
|
+
false: {};
|
|
71
107
|
};
|
|
72
108
|
}, {
|
|
73
109
|
root: string[];
|
|
@@ -62,8 +62,21 @@ var editorBasic = (0, import_tailwind_variants.tv)({
|
|
|
62
62
|
},
|
|
63
63
|
// document style, eg. document editor, fullpage etc pp
|
|
64
64
|
document: {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
root: "h-full min-h-0 flex flex-col overflow-hidden",
|
|
66
|
+
toolbarContainer: ["shrink-0", "border-b bg-background", "px-4"],
|
|
67
|
+
wrapper: ["flex-1 min-h-0 overflow-auto", "bg-muted/30"],
|
|
68
|
+
content: [
|
|
69
|
+
// Centered paper effect
|
|
70
|
+
"mx-auto",
|
|
71
|
+
"w-full max-w-[816px]",
|
|
72
|
+
"min-h-full",
|
|
73
|
+
"bg-background",
|
|
74
|
+
"shadow-lg",
|
|
75
|
+
// ProseMirror styling
|
|
76
|
+
"[&_.tiptap.ProseMirror]:py-16",
|
|
77
|
+
"[&_.tiptap.ProseMirror]:px-16",
|
|
78
|
+
"[&_.tiptap.ProseMirror]:min-h-full"
|
|
79
|
+
]
|
|
67
80
|
},
|
|
68
81
|
comment: {
|
|
69
82
|
root: "",
|
|
@@ -74,11 +87,78 @@ var editorBasic = (0, import_tailwind_variants.tv)({
|
|
|
74
87
|
],
|
|
75
88
|
toolbarContainer: "rounded-md mb-2",
|
|
76
89
|
content: ""
|
|
90
|
+
},
|
|
91
|
+
// Form field style - compact with bottom toolbar
|
|
92
|
+
field: {
|
|
93
|
+
root: [
|
|
94
|
+
"grid grid-rows-[minmax(0,1fr),auto]",
|
|
95
|
+
// content first, toolbar second
|
|
96
|
+
"transition-shadow"
|
|
97
|
+
],
|
|
98
|
+
wrapper: [
|
|
99
|
+
"row-start-1 row-end-2",
|
|
100
|
+
"max-h-[12lh]",
|
|
101
|
+
// ~12 lines max
|
|
102
|
+
"min-h-[4lh]",
|
|
103
|
+
// ~4 lines min
|
|
104
|
+
"overflow-y-auto",
|
|
105
|
+
"flex flex-col"
|
|
106
|
+
// stretch content
|
|
107
|
+
],
|
|
108
|
+
toolbarContainer: [
|
|
109
|
+
"row-start-2 row-end-3",
|
|
110
|
+
"border-t bg-muted/30",
|
|
111
|
+
"sticky bottom-0",
|
|
112
|
+
"py-1 px-2"
|
|
113
|
+
],
|
|
114
|
+
content: [
|
|
115
|
+
"flex-1",
|
|
116
|
+
// fill available space
|
|
117
|
+
"[&_.tiptap.ProseMirror]:py-3",
|
|
118
|
+
"[&_.tiptap.ProseMirror]:px-3",
|
|
119
|
+
"[&_.tiptap.ProseMirror]:text-sm",
|
|
120
|
+
"[&_.tiptap.ProseMirror]:min-h-full",
|
|
121
|
+
// editor fills container
|
|
122
|
+
"[&_.tiptap.ProseMirror]:cursor-text"
|
|
123
|
+
// show text cursor
|
|
124
|
+
]
|
|
77
125
|
}
|
|
126
|
+
},
|
|
127
|
+
bordered: {
|
|
128
|
+
true: {},
|
|
129
|
+
false: {}
|
|
78
130
|
}
|
|
79
131
|
},
|
|
132
|
+
compoundVariants: [
|
|
133
|
+
// Field with border (default for editable)
|
|
134
|
+
{
|
|
135
|
+
variant: "field",
|
|
136
|
+
bordered: true,
|
|
137
|
+
class: {
|
|
138
|
+
root: [
|
|
139
|
+
"border rounded-md",
|
|
140
|
+
"focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
// Field without border (for read-only in cards)
|
|
145
|
+
{
|
|
146
|
+
variant: "field",
|
|
147
|
+
bordered: false,
|
|
148
|
+
class: {
|
|
149
|
+
root: "border-0",
|
|
150
|
+
wrapper: "min-h-0",
|
|
151
|
+
// remove min-height constraint for read-only
|
|
152
|
+
content: [
|
|
153
|
+
"[&_.tiptap.ProseMirror]:py-0",
|
|
154
|
+
"[&_.tiptap.ProseMirror]:px-0"
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
],
|
|
80
159
|
defaultVariants: {
|
|
81
|
-
variant: "default"
|
|
160
|
+
variant: "default",
|
|
161
|
+
bordered: true
|
|
82
162
|
}
|
|
83
163
|
});
|
|
84
164
|
// Annotate the CommonJS export names for ESM import in node:
|