@kopexa/theme 17.9.0 → 17.10.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.
@@ -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: ["p-4 md:p-6 col-span-1 md:col-span-2"],
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
- //"md:border-s",
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 min-h-svh w-full isolate"
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
+ };
@@ -9,8 +9,10 @@ declare const editorBasic: tailwind_variants.TVReturnType<{
9
9
  content: string;
10
10
  };
11
11
  document: {
12
- wrapper: string;
13
- content: string;
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
- wrapper: string;
38
- content: string;
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
- wrapper: string;
63
- content: string;
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
- wrapper: string;
13
- content: string;
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
- wrapper: string;
38
- content: string;
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
- wrapper: string;
63
- content: string;
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
- wrapper: "size-full overflow-auto",
66
- content: "size-full"
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:
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  editorBasic
3
- } from "../chunk-XOL7P7NP.mjs";
3
+ } from "../chunk-Q72M565Q.mjs";
4
4
  export {
5
5
  editorBasic
6
6
  };
@@ -64,6 +64,7 @@ export { TabNavSlots, TabNavVariantProps, tabNav } from './tab-nav.mjs';
64
64
  export { TableSlots, TableVariantProps, table } from './table.mjs';
65
65
  export { TabsVariantProps, tabs } from './tabs.mjs';
66
66
  export { TextareaVariantProps, textarea } from './textarea.mjs';
67
+ export { TocSlots, TocVariantProps, toc } from './toc.mjs';
67
68
  export { ToolbarVariantProps, toolbar } from './toolbar.mjs';
68
69
  export { TooltipVariants, tooltip } from './tooltip.mjs';
69
70
  import 'tailwind-variants';
@@ -64,6 +64,7 @@ export { TabNavSlots, TabNavVariantProps, tabNav } from './tab-nav.js';
64
64
  export { TableSlots, TableVariantProps, table } from './table.js';
65
65
  export { TabsVariantProps, tabs } from './tabs.js';
66
66
  export { TextareaVariantProps, textarea } from './textarea.js';
67
+ export { TocSlots, TocVariantProps, toc } from './toc.js';
67
68
  export { ToolbarVariantProps, toolbar } from './toolbar.js';
68
69
  export { TooltipVariants, tooltip } from './tooltip.js';
69
70
  import 'tailwind-variants';