mtxuilib 0.1.186 → 0.1.187

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.
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import dynamic from "next/dynamic";
4
4
  import { useHotkeys } from "react-hotkeys-hook";
5
- import { useMtapp } from "../../mtapp/MtAppProvider";
5
+ import { useMtapp } from "../../providers/MtAppProvider";
6
6
  import { TailwindIndicator } from "../tailwind-indicator";
7
7
  const ReactQueryDevtoolsProduction = dynamic(() => import("@tanstack/react-query-devtools/build/modern/production.js").then((d) => ({
8
8
  default: d.ReactQueryDevtools,
@@ -0,0 +1,219 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ :root {
7
+ --background: 0 0% 100%;
8
+ --foreground: 222.2 84% 4.9%;
9
+
10
+ --muted: 210 40% 96.1%;
11
+ --muted-foreground: 215.4 16.3% 46.9%;
12
+
13
+ --popover: 0 0% 100%;
14
+ --popover-foreground: 222.2 84% 4.9%;
15
+
16
+ --card: 0 0% 100%;
17
+ --card-foreground: 222.2 84% 4.9%;
18
+
19
+ --border: 214.3 31.8% 91.4%;
20
+ --input: 214.3 31.8% 91.4%;
21
+
22
+ --primary: 222.2 47.4% 11.2%;
23
+ --primary-foreground: 210 40% 98%;
24
+
25
+ --secondary: 210 40% 96.1%;
26
+ --secondary-foreground: 222.2 47.4% 11.2%;
27
+
28
+ --accent: 210 40% 96.1%;
29
+ --accent-foreground: 222.2 47.4% 11.2%;
30
+
31
+ --destructive: 0 84.2% 60.2%;
32
+ --destructive-foreground: 210 40% 98%;
33
+
34
+ --ring: 215 20.2% 65.1%;
35
+
36
+ --radius: 0.5rem;
37
+
38
+ /* novel editor 相关样式开始 */
39
+ --novel-highlight-default: #ffffff;
40
+ --novel-highlight-purple: #f6f3f8;
41
+ --novel-highlight-red: #fdebeb;
42
+ --novel-highlight-yellow: #fbf4a2;
43
+ --novel-highlight-blue: #c1ecf9;
44
+ --novel-highlight-green: #acf79f;
45
+ --novel-highlight-orange: #faebdd;
46
+ --novel-highlight-pink: #faf1f5;
47
+ --novel-highlight-gray: #f1f1ef;
48
+ /* novel editor 相关样式结束 */
49
+ }
50
+
51
+ .dark {
52
+ --background: 222.2 84% 4.9%;
53
+ --foreground: 210 40% 98%;
54
+
55
+ --muted: 217.2 32.6% 17.5%;
56
+ --muted-foreground: 215 20.2% 65.1%;
57
+
58
+ --popover: 222.2 84% 4.9%;
59
+ --popover-foreground: 210 40% 98%;
60
+
61
+ --card: 222.2 84% 4.9%;
62
+ --card-foreground: 210 40% 98%;
63
+
64
+ --border: 217.2 32.6% 17.5%;
65
+ --input: 217.2 32.6% 17.5%;
66
+
67
+ --primary: 210 40% 98%;
68
+ --primary-foreground: 222.2 47.4% 11.2%;
69
+
70
+ --secondary: 217.2 32.6% 17.5%;
71
+ --secondary-foreground: 210 40% 98%;
72
+
73
+ --accent: 217.2 32.6% 17.5%;
74
+ --accent-foreground: 210 40% 98%;
75
+
76
+ --destructive: 0 62.8% 30.6%;
77
+ --destructive-foreground: 0 85.7% 97.3%;
78
+ --ring: 217.2 32.6% 17.5%;
79
+
80
+ /* novel editor 相关样式开始 */
81
+ --novel-highlight-default: #000000;
82
+ --novel-highlight-purple: #3f2c4b;
83
+ --novel-highlight-red: #5c1a1a;
84
+ --novel-highlight-yellow: #5c4b1a;
85
+ --novel-highlight-blue: #1a3d5c;
86
+ --novel-highlight-green: #1a5c20;
87
+ --novel-highlight-orange: #5c3a1a;
88
+ --novel-highlight-pink: #5c1a3a;
89
+ --novel-highlight-gray: #3a3a3a;
90
+ /* novel editor 相关样式结束 */
91
+ }
92
+ }
93
+
94
+ /* @layer base {
95
+ * {
96
+ @apply border-border;
97
+ }
98
+ body {
99
+ @apply bg-background text-foreground;
100
+ }
101
+ } */
102
+
103
+ /*
104
+ 细化滚动条。
105
+ 参考: https://github.com/mckaywrigley/chatbot-ui/blob/main/styles/globals.css
106
+ */
107
+
108
+ ::-webkit-scrollbar-track {
109
+ background-color: transparent;
110
+ }
111
+
112
+ ::-webkit-scrollbar-thumb {
113
+ background-color: #a4a4a4;
114
+ border-radius: 10px;
115
+ }
116
+
117
+ ::-webkit-scrollbar-thumb:hover {
118
+ background-color: #838385;
119
+ }
120
+
121
+ ::-webkit-scrollbar-track:hover {
122
+ background-color: #eaeaea;
123
+ }
124
+
125
+ ::-webkit-scrollbar-corner {
126
+ background-color: transparent;
127
+ }
128
+
129
+ ::-webkit-scrollbar {
130
+ width: 6px;
131
+ height: 6px;
132
+ }
133
+
134
+ /* vamp 样式开始 ***********************************************************************************************/
135
+
136
+ @layer utilities {
137
+ .red-glow {
138
+ text-shadow: 0px 0px 8px hsla(352, 98%, 60%, 0.6);
139
+ }
140
+
141
+ .button {
142
+ transition:
143
+ border 120ms ease 0s,
144
+ background-color,
145
+ color,
146
+ box-shadow,
147
+ opacity;
148
+ }
149
+
150
+ .primary-button-hover {
151
+ text-shadow: rgb(0 0 0 / 56%) 0px 3px 12px;
152
+ box-shadow: rgba(253, 52, 88, 0.6) 0px 1px 40px;
153
+ }
154
+
155
+ .dropdown {
156
+ /* backdrop-filter: blur(10px) saturate(190%) contrast(70%) brightness(80%);
157
+ background-color: rgba(29, 30, 43, 0.498);
158
+ border: 0.5px solid rgba(82, 82, 111, 0.44); */
159
+ box-shadow: rgb(0 0 0 / 20%) 0px 4px 24px;
160
+ backdrop-filter: blur(20px) saturate(190%) contrast(70%) brightness(80%);
161
+ background-color: rgba(29, 30, 43, 0.498);
162
+ border: 0.5px solid rgba(82, 82, 111, 0.44);
163
+ }
164
+ }
165
+
166
+ /* clears the ‘X’ from Internet Explorer */
167
+ input[type="search"]::-ms-clear {
168
+ display: none;
169
+ width: 0;
170
+ height: 0;
171
+ }
172
+ input[type="search"]::-ms-reveal {
173
+ display: none;
174
+ width: 0;
175
+ height: 0;
176
+ }
177
+ /* clears the ‘X’ from Chrome */
178
+ input[type="search"]::-webkit-search-decoration,
179
+ input[type="search"]::-webkit-search-cancel-button,
180
+ input[type="search"]::-webkit-search-results-button,
181
+ input[type="search"]::-webkit-search-results-decoration {
182
+ display: none;
183
+ }
184
+
185
+ .is-editor-empty {
186
+ @apply text-white;
187
+ }
188
+
189
+ .ProseMirror p.is-editor-empty:first-child::before {
190
+ color: #adb5bd;
191
+ content: attr(data-placeholder);
192
+ float: left;
193
+ height: 0;
194
+ opacity: 0.3;
195
+ pointer-events: none;
196
+ }
197
+
198
+ ::-webkit-scrollbar {
199
+ width: 8px;
200
+ height: 8px;
201
+ background-color: transparent;
202
+ }
203
+
204
+ ::-webkit-scrollbar-thumb {
205
+ border-radius: 12px;
206
+ background-color: #616076;
207
+ }
208
+
209
+ ::-webkit-scrollbar-track {
210
+ padding: 2px;
211
+ background-color: transparent;
212
+ }
213
+
214
+ mux-player {
215
+ --controls: none;
216
+ --media-object-fit: cover;
217
+ height: 100%;
218
+ }
219
+ /* vamp 结束 ***********************************************************************************************/
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,12 @@
1
+
2
+
3
+ .full-iframe {
4
+ line-height: 0;
5
+ display: block;
6
+ height: 100%;
7
+ width: 100%;
8
+ margin: 0;
9
+ padding: 0;
10
+
11
+ box-sizing: border-box;
12
+ }
@@ -0,0 +1,171 @@
1
+ /* novel editor需要 */
2
+ .ProseMirror {
3
+ @apply p-12 px-8 sm:px-12;
4
+ }
5
+
6
+ .ProseMirror .is-editor-empty:first-child::before {
7
+ content: attr(data-placeholder);
8
+ float: left;
9
+ color: var(--novel-stone-400);
10
+ pointer-events: none;
11
+ height: 0;
12
+ }
13
+ .ProseMirror .is-empty::before {
14
+ content: attr(data-placeholder);
15
+ float: left;
16
+ color: hsl(var(--muted-foreground));
17
+ pointer-events: none;
18
+ height: 0;
19
+ }
20
+
21
+ /* Custom image styles */
22
+
23
+ .ProseMirror img {
24
+ transition: filter 0.1s ease-in-out;
25
+
26
+ &:hover {
27
+ cursor: pointer;
28
+ filter: brightness(90%);
29
+ }
30
+
31
+ &.ProseMirror-selectednode {
32
+ outline: 3px solid #5abbf7;
33
+ filter: brightness(90%);
34
+ }
35
+ }
36
+
37
+ .img-placeholder {
38
+ position: relative;
39
+
40
+ &:before {
41
+ content: "";
42
+ box-sizing: border-box;
43
+ position: absolute;
44
+ top: 50%;
45
+ left: 50%;
46
+ width: 36px;
47
+ height: 36px;
48
+ border-radius: 50%;
49
+ border: 3px solid var(--novel-stone-200);
50
+ border-top-color: var(--novel-stone-800);
51
+ animation: spinning 0.6s linear infinite;
52
+ }
53
+ }
54
+
55
+ @keyframes spinning {
56
+ to {
57
+ transform: rotate(360deg);
58
+ }
59
+ }
60
+
61
+ /* Custom TODO list checkboxes – shoutout to this awesome tutorial: https://moderncss.dev/pure-css-custom-checkbox-style/ */
62
+
63
+ ul[data-type="taskList"] li > label {
64
+ margin-right: 0.2rem;
65
+ user-select: none;
66
+ }
67
+
68
+ @media screen and (max-width: 768px) {
69
+ ul[data-type="taskList"] li > label {
70
+ margin-right: 0.5rem;
71
+ }
72
+ }
73
+
74
+ ul[data-type="taskList"] li > label input[type="checkbox"] {
75
+ -webkit-appearance: none;
76
+ appearance: none;
77
+ background-color: hsl(var(--background));
78
+ margin: 0;
79
+ cursor: pointer;
80
+ width: 1.2em;
81
+ height: 1.2em;
82
+ position: relative;
83
+ top: 5px;
84
+ border: 2px solid hsl(var(--border));
85
+ margin-right: 0.3rem;
86
+ display: grid;
87
+ place-content: center;
88
+
89
+ &:hover {
90
+ background-color: hsl(var(--accent));
91
+ }
92
+
93
+ &:active {
94
+ background-color: hsl(var(--accent));
95
+ }
96
+
97
+ &::before {
98
+ content: "";
99
+ width: 0.65em;
100
+ height: 0.65em;
101
+ transform: scale(0);
102
+ transition: 120ms transform ease-in-out;
103
+ box-shadow: inset 1em 1em;
104
+ transform-origin: center;
105
+ clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
106
+ }
107
+
108
+ &:checked::before {
109
+ transform: scale(1);
110
+ }
111
+ }
112
+
113
+ ul[data-type="taskList"] li[data-checked="true"] > div > p {
114
+ color: var(--muted-foreground);
115
+ text-decoration: line-through;
116
+ text-decoration-thickness: 2px;
117
+ }
118
+
119
+ /* Overwrite tippy-box original max-width */
120
+
121
+ .tippy-box {
122
+ max-width: 400px !important;
123
+ }
124
+
125
+ .ProseMirror:not(.dragging) .ProseMirror-selectednode {
126
+ outline: none !important;
127
+ background-color: var(--novel-highlight-blue);
128
+ transition: background-color 0.2s;
129
+ box-shadow: none;
130
+ }
131
+
132
+ .drag-handle {
133
+ position: fixed;
134
+ opacity: 1;
135
+ transition: opacity ease-in 0.2s;
136
+ border-radius: 0.25rem;
137
+
138
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' style='fill: rgba(0, 0, 0, 0.5)'%3E%3Cpath d='M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z'%3E%3C/path%3E%3C/svg%3E");
139
+ background-size: calc(0.5em + 0.375rem) calc(0.5em + 0.375rem);
140
+ background-repeat: no-repeat;
141
+ background-position: center;
142
+ width: 1.2rem;
143
+ height: 1.5rem;
144
+ z-index: 50;
145
+ cursor: grab;
146
+
147
+ &:hover {
148
+ background-color: var(--novel-stone-100);
149
+ transition: background-color 0.2s;
150
+ }
151
+
152
+ &:active {
153
+ background-color: var(--novel-stone-200);
154
+ transition: background-color 0.2s;
155
+ }
156
+
157
+ &.hide {
158
+ opacity: 0;
159
+ pointer-events: none;
160
+ }
161
+
162
+ @media screen and (max-width: 600px) {
163
+ display: none;
164
+ pointer-events: none;
165
+ }
166
+ }
167
+
168
+ .dark .drag-handle {
169
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' style='fill: rgba(255, 255, 255, 0.5)'%3E%3Cpath d='M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z'%3E%3C/path%3E%3C/svg%3E");
170
+ }
171
+
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mtxuilib",
3
3
  "private": false,
4
- "version": "0.1.186",
4
+ "version": "0.1.187",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "scripts": {
63
63
  "dev": "npx next dev",
64
- "build": "rimraf ./dist/ && bunx tsc -p tsconfig.json --outDir dist --jsx \"react-jsx\" --incremental false --noEmit false --removeComments true"
64
+ "build": "rimraf ./dist/ && bunx tsc -p tsconfig.json --outDir dist --jsx \"react-jsx\" --incremental false --noEmit false --removeComments true && cp -r src/styles dist/styles"
65
65
  },
66
66
  "dependencies": {
67
67
  "@ai-sdk/openai": "^0.0.45",
@@ -241,7 +241,6 @@
241
241
  "@types/aws-lambda": "^8.10.143",
242
242
  "@types/jest": "^29.5.12",
243
243
  "@types/lodash": "^4.17.7",
244
- "@types/lodash.template": "^4.5.3",
245
244
  "@types/markdown-it": "^14.1.2",
246
245
  "@types/node": "^20.14.15",
247
246
  "@types/nprogress": "^0.2.3",
File without changes
File without changes
File without changes
File without changes