ritext 1.0.14 → 1.0.15
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/README.md +28 -28
- package/dist/chunk-CU67RXD7.mjs +53 -0
- package/dist/chunk-E4PPKAVK.mjs +37 -0
- package/dist/chunk-LO4RJXQF.mjs +37 -0
- package/dist/chunk-TQTCTY3E.mjs +52 -0
- package/dist/chunk-ZLCVIW2P.mjs +90 -0
- package/dist/extension/bold.d.mts +8 -0
- package/dist/extension/bold.d.ts +8 -0
- package/dist/extension/bold.js +260 -0
- package/dist/extension/bold.mjs +69 -0
- package/dist/extension/italic.d.mts +8 -0
- package/dist/extension/italic.d.ts +8 -0
- package/dist/extension/italic.js +264 -0
- package/dist/extension/italic.mjs +73 -0
- package/dist/extension/strike.d.mts +8 -0
- package/dist/extension/strike.d.ts +8 -0
- package/dist/extension/strike.js +264 -0
- package/dist/extension/strike.mjs +73 -0
- package/dist/extension/subandsuperscript.d.mts +21 -0
- package/dist/extension/subandsuperscript.d.ts +21 -0
- package/dist/extension/subandsuperscript.js +443 -0
- package/dist/extension/subandsuperscript.mjs +243 -0
- package/dist/extension/subscript.d.mts +8 -0
- package/dist/extension/subscript.d.ts +8 -0
- package/dist/extension/subscript.js +264 -0
- package/dist/extension/subscript.mjs +45 -0
- package/dist/extension/superscript.d.mts +8 -0
- package/dist/extension/superscript.d.ts +8 -0
- package/dist/extension/superscript.js +264 -0
- package/dist/extension/superscript.mjs +45 -0
- package/dist/extension/underline.d.mts +8 -0
- package/dist/extension/underline.d.ts +8 -0
- package/dist/extension/underline.js +263 -0
- package/dist/extension/underline.mjs +72 -0
- package/dist/index.css +101 -2
- package/dist/index.d.mts +6 -32
- package/dist/index.d.ts +6 -32
- package/dist/index.js +26 -537
- package/dist/index.mjs +30 -548
- package/dist/tiptap-ext.type-D61hoEX5.d.mts +32 -0
- package/dist/tiptap-ext.type-D61hoEX5.d.ts +32 -0
- package/package.json +29 -6
package/dist/index.css
CHANGED
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
--color-gray-50: oklch(98.5% 0.002 247.839);
|
|
25
25
|
--color-gray-100: oklch(96.7% 0.003 264.542);
|
|
26
26
|
--color-gray-200: oklch(92.8% 0.006 264.531);
|
|
27
|
+
--color-gray-400: oklch(70.7% 0.022 261.325);
|
|
28
|
+
--color-gray-500: oklch(55.1% 0.027 264.364);
|
|
27
29
|
--color-white: #fff;
|
|
28
30
|
--spacing: 0.25rem;
|
|
29
31
|
--text-sm: 0.875rem;
|
|
@@ -226,12 +228,46 @@
|
|
|
226
228
|
}
|
|
227
229
|
}
|
|
228
230
|
@layer utilities {
|
|
231
|
+
.mt-0\.5 {
|
|
232
|
+
margin-top: calc(var(--spacing) * 0.5);
|
|
233
|
+
}
|
|
234
|
+
.ml-6 {
|
|
235
|
+
margin-left: calc(var(--spacing) * 6);
|
|
236
|
+
}
|
|
237
|
+
.block {
|
|
238
|
+
display: block;
|
|
239
|
+
}
|
|
229
240
|
.flex {
|
|
230
241
|
display: flex;
|
|
231
242
|
}
|
|
243
|
+
.flex-1 {
|
|
244
|
+
flex: 1;
|
|
245
|
+
}
|
|
246
|
+
.transform {
|
|
247
|
+
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
|
248
|
+
}
|
|
249
|
+
.cursor-pointer {
|
|
250
|
+
cursor: pointer;
|
|
251
|
+
}
|
|
252
|
+
.items-center {
|
|
253
|
+
align-items: center;
|
|
254
|
+
}
|
|
255
|
+
.space-y-1 {
|
|
256
|
+
:where(& > :not(:last-child)) {
|
|
257
|
+
--tw-space-y-reverse: 0;
|
|
258
|
+
margin-block-start: calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));
|
|
259
|
+
margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));
|
|
260
|
+
}
|
|
261
|
+
}
|
|
232
262
|
.gap-x-1\.5 {
|
|
233
263
|
column-gap: calc(var(--spacing) * 1.5);
|
|
234
264
|
}
|
|
265
|
+
.gap-x-2\.5 {
|
|
266
|
+
column-gap: calc(var(--spacing) * 2.5);
|
|
267
|
+
}
|
|
268
|
+
.gap-x-px {
|
|
269
|
+
column-gap: 1px;
|
|
270
|
+
}
|
|
235
271
|
.rounded-lg {
|
|
236
272
|
border-radius: var(--radius-lg);
|
|
237
273
|
}
|
|
@@ -246,14 +282,20 @@
|
|
|
246
282
|
--tw-border-style: solid;
|
|
247
283
|
border-style: solid;
|
|
248
284
|
}
|
|
285
|
+
.border-gray-200 {
|
|
286
|
+
border-color: var(--color-gray-200);
|
|
287
|
+
}
|
|
249
288
|
.border-gray-200\/50 {
|
|
250
289
|
border-color: color-mix(in srgb, oklch(92.8% 0.006 264.531) 50%, transparent);
|
|
251
290
|
@supports (color: color-mix(in lab, red, red)) {
|
|
252
291
|
border-color: color-mix(in oklab, var(--color-gray-200) 50%, transparent);
|
|
253
292
|
}
|
|
254
293
|
}
|
|
255
|
-
.bg-gray-200 {
|
|
256
|
-
background-color:
|
|
294
|
+
.bg-gray-200\/60 {
|
|
295
|
+
background-color: color-mix(in srgb, oklch(92.8% 0.006 264.531) 60%, transparent);
|
|
296
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
297
|
+
background-color: color-mix(in oklab, var(--color-gray-200) 60%, transparent);
|
|
298
|
+
}
|
|
257
299
|
}
|
|
258
300
|
.bg-white {
|
|
259
301
|
background-color: var(--color-white);
|
|
@@ -261,12 +303,21 @@
|
|
|
261
303
|
.p-1\.5 {
|
|
262
304
|
padding: calc(var(--spacing) * 1.5);
|
|
263
305
|
}
|
|
306
|
+
.p-2 {
|
|
307
|
+
padding: calc(var(--spacing) * 2);
|
|
308
|
+
}
|
|
309
|
+
.px-2 {
|
|
310
|
+
padding-inline: calc(var(--spacing) * 2);
|
|
311
|
+
}
|
|
264
312
|
.px-3 {
|
|
265
313
|
padding-inline: calc(var(--spacing) * 3);
|
|
266
314
|
}
|
|
267
315
|
.py-1 {
|
|
268
316
|
padding-block: calc(var(--spacing) * 1);
|
|
269
317
|
}
|
|
318
|
+
.py-1\.5 {
|
|
319
|
+
padding-block: calc(var(--spacing) * 1.5);
|
|
320
|
+
}
|
|
270
321
|
.text-center {
|
|
271
322
|
text-align: center;
|
|
272
323
|
}
|
|
@@ -274,6 +325,12 @@
|
|
|
274
325
|
font-size: var(--text-sm);
|
|
275
326
|
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
276
327
|
}
|
|
328
|
+
.text-gray-400 {
|
|
329
|
+
color: var(--color-gray-400);
|
|
330
|
+
}
|
|
331
|
+
.text-gray-500 {
|
|
332
|
+
color: var(--color-gray-500);
|
|
333
|
+
}
|
|
277
334
|
.italic {
|
|
278
335
|
font-style: italic;
|
|
279
336
|
}
|
|
@@ -289,12 +346,27 @@
|
|
|
289
346
|
var(--tw-ring-shadow),
|
|
290
347
|
var(--tw-shadow);
|
|
291
348
|
}
|
|
349
|
+
.shadow-sm {
|
|
350
|
+
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
351
|
+
box-shadow:
|
|
352
|
+
var(--tw-inset-shadow),
|
|
353
|
+
var(--tw-inset-ring-shadow),
|
|
354
|
+
var(--tw-ring-offset-shadow),
|
|
355
|
+
var(--tw-ring-shadow),
|
|
356
|
+
var(--tw-shadow);
|
|
357
|
+
}
|
|
292
358
|
.shadow-gray-50 {
|
|
293
359
|
--tw-shadow-color: oklch(98.5% 0.002 247.839);
|
|
294
360
|
@supports (color: color-mix(in lab, red, red)) {
|
|
295
361
|
--tw-shadow-color: color-mix(in oklab, var(--color-gray-50) var(--tw-shadow-alpha), transparent);
|
|
296
362
|
}
|
|
297
363
|
}
|
|
364
|
+
.shadow-gray-200\/40 {
|
|
365
|
+
--tw-shadow-color: color-mix(in srgb, oklch(92.8% 0.006 264.531) 40%, transparent);
|
|
366
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
367
|
+
--tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-gray-200) 40%, transparent) var(--tw-shadow-alpha), transparent);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
298
370
|
.transition {
|
|
299
371
|
transition-property:
|
|
300
372
|
color,
|
|
@@ -323,6 +395,19 @@
|
|
|
323
395
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
324
396
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
325
397
|
}
|
|
398
|
+
.transition-all {
|
|
399
|
+
transition-property: all;
|
|
400
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
401
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
402
|
+
}
|
|
403
|
+
.duration-100 {
|
|
404
|
+
--tw-duration: 100ms;
|
|
405
|
+
transition-duration: 100ms;
|
|
406
|
+
}
|
|
407
|
+
.select-none {
|
|
408
|
+
-webkit-user-select: none;
|
|
409
|
+
user-select: none;
|
|
410
|
+
}
|
|
326
411
|
.hover\:bg-gray-100 {
|
|
327
412
|
&:hover {
|
|
328
413
|
@media (hover: hover) {
|
|
@@ -360,6 +445,12 @@
|
|
|
360
445
|
cursor: pointer;
|
|
361
446
|
}
|
|
362
447
|
}
|
|
448
|
+
@property --tw-rotate-x { syntax: "*"; inherits: false; }
|
|
449
|
+
@property --tw-rotate-y { syntax: "*"; inherits: false; }
|
|
450
|
+
@property --tw-rotate-z { syntax: "*"; inherits: false; }
|
|
451
|
+
@property --tw-skew-x { syntax: "*"; inherits: false; }
|
|
452
|
+
@property --tw-skew-y { syntax: "*"; inherits: false; }
|
|
453
|
+
@property --tw-space-y-reverse { syntax: "*"; inherits: false; initial-value: 0; }
|
|
363
454
|
@property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }
|
|
364
455
|
@property --tw-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
|
|
365
456
|
@property --tw-shadow-color { syntax: "*"; inherits: false; }
|
|
@@ -375,12 +466,19 @@
|
|
|
375
466
|
@property --tw-ring-offset-width { syntax: "<length>"; inherits: false; initial-value: 0px; }
|
|
376
467
|
@property --tw-ring-offset-color { syntax: "*"; inherits: false; initial-value: #fff; }
|
|
377
468
|
@property --tw-ring-offset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
|
|
469
|
+
@property --tw-duration { syntax: "*"; inherits: false; }
|
|
378
470
|
@layer properties {
|
|
379
471
|
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
380
472
|
*,
|
|
381
473
|
::before,
|
|
382
474
|
::after,
|
|
383
475
|
::backdrop {
|
|
476
|
+
--tw-rotate-x: initial;
|
|
477
|
+
--tw-rotate-y: initial;
|
|
478
|
+
--tw-rotate-z: initial;
|
|
479
|
+
--tw-skew-x: initial;
|
|
480
|
+
--tw-skew-y: initial;
|
|
481
|
+
--tw-space-y-reverse: 0;
|
|
384
482
|
--tw-border-style: solid;
|
|
385
483
|
--tw-shadow: 0 0 #0000;
|
|
386
484
|
--tw-shadow-color: initial;
|
|
@@ -396,6 +494,7 @@
|
|
|
396
494
|
--tw-ring-offset-width: 0px;
|
|
397
495
|
--tw-ring-offset-color: #fff;
|
|
398
496
|
--tw-ring-offset-shadow: 0 0 #0000;
|
|
497
|
+
--tw-duration: initial;
|
|
399
498
|
}
|
|
400
499
|
}
|
|
401
500
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode
|
|
3
|
-
import { Extensions
|
|
4
|
-
import { Placement } from '@floating-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { Extensions } from '@tiptap/react';
|
|
5
4
|
|
|
6
5
|
interface Props$2 {
|
|
7
6
|
children?: ReactNode;
|
|
@@ -13,39 +12,14 @@ declare const Editor: ({ children, extensions, className }: Props$2) => react_js
|
|
|
13
12
|
interface Props$1 {
|
|
14
13
|
className?: string;
|
|
15
14
|
buttonClassName?: string;
|
|
15
|
+
dropdownContainerClassName?: string;
|
|
16
|
+
dropdownItemClassName?: string;
|
|
16
17
|
}
|
|
17
|
-
declare const Toolbar: ({ className, buttonClassName }: Props$1) => react_jsx_runtime.JSX.Element | null;
|
|
18
|
+
declare const Toolbar: ({ className, buttonClassName, dropdownContainerClassName, dropdownItemClassName }: Props$1) => react_jsx_runtime.JSX.Element | null;
|
|
18
19
|
|
|
19
20
|
interface Props {
|
|
20
21
|
className?: string;
|
|
21
22
|
}
|
|
22
23
|
declare const Content: ({ className }: Props) => react_jsx_runtime.JSX.Element;
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
className?: string;
|
|
26
|
-
activeClassName?: string;
|
|
27
|
-
icon?: ReactNode;
|
|
28
|
-
style?: CSSProperties;
|
|
29
|
-
tooltip?: boolean | string;
|
|
30
|
-
tooltipClassName?: string;
|
|
31
|
-
tooltipPlacement?: Placement;
|
|
32
|
-
button: (args: {
|
|
33
|
-
options: ExtButtonOptions;
|
|
34
|
-
editor: Editor$1;
|
|
35
|
-
buttonClassName: string;
|
|
36
|
-
}) => ReactNode;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
declare const Bold: Mark<ExtButtonOptions, any>;
|
|
40
|
-
|
|
41
|
-
declare const Italic: Mark<ExtButtonOptions, any>;
|
|
42
|
-
|
|
43
|
-
declare const Underline: Mark<ExtButtonOptions, any>;
|
|
44
|
-
|
|
45
|
-
declare const Strike: Mark<ExtButtonOptions, any>;
|
|
46
|
-
|
|
47
|
-
declare const Subscript: Mark<ExtButtonOptions, any>;
|
|
48
|
-
|
|
49
|
-
declare const Superscript: Mark<ExtButtonOptions, any>;
|
|
50
|
-
|
|
51
|
-
export { Bold, Content, Editor, Italic, Strike, Subscript, Superscript, Toolbar, Underline };
|
|
25
|
+
export { Content, Editor, Toolbar };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode
|
|
3
|
-
import { Extensions
|
|
4
|
-
import { Placement } from '@floating-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { Extensions } from '@tiptap/react';
|
|
5
4
|
|
|
6
5
|
interface Props$2 {
|
|
7
6
|
children?: ReactNode;
|
|
@@ -13,39 +12,14 @@ declare const Editor: ({ children, extensions, className }: Props$2) => react_js
|
|
|
13
12
|
interface Props$1 {
|
|
14
13
|
className?: string;
|
|
15
14
|
buttonClassName?: string;
|
|
15
|
+
dropdownContainerClassName?: string;
|
|
16
|
+
dropdownItemClassName?: string;
|
|
16
17
|
}
|
|
17
|
-
declare const Toolbar: ({ className, buttonClassName }: Props$1) => react_jsx_runtime.JSX.Element | null;
|
|
18
|
+
declare const Toolbar: ({ className, buttonClassName, dropdownContainerClassName, dropdownItemClassName }: Props$1) => react_jsx_runtime.JSX.Element | null;
|
|
18
19
|
|
|
19
20
|
interface Props {
|
|
20
21
|
className?: string;
|
|
21
22
|
}
|
|
22
23
|
declare const Content: ({ className }: Props) => react_jsx_runtime.JSX.Element;
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
className?: string;
|
|
26
|
-
activeClassName?: string;
|
|
27
|
-
icon?: ReactNode;
|
|
28
|
-
style?: CSSProperties;
|
|
29
|
-
tooltip?: boolean | string;
|
|
30
|
-
tooltipClassName?: string;
|
|
31
|
-
tooltipPlacement?: Placement;
|
|
32
|
-
button: (args: {
|
|
33
|
-
options: ExtButtonOptions;
|
|
34
|
-
editor: Editor$1;
|
|
35
|
-
buttonClassName: string;
|
|
36
|
-
}) => ReactNode;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
declare const Bold: Mark<ExtButtonOptions, any>;
|
|
40
|
-
|
|
41
|
-
declare const Italic: Mark<ExtButtonOptions, any>;
|
|
42
|
-
|
|
43
|
-
declare const Underline: Mark<ExtButtonOptions, any>;
|
|
44
|
-
|
|
45
|
-
declare const Strike: Mark<ExtButtonOptions, any>;
|
|
46
|
-
|
|
47
|
-
declare const Subscript: Mark<ExtButtonOptions, any>;
|
|
48
|
-
|
|
49
|
-
declare const Superscript: Mark<ExtButtonOptions, any>;
|
|
50
|
-
|
|
51
|
-
export { Bold, Content, Editor, Italic, Strike, Subscript, Superscript, Toolbar, Underline };
|
|
25
|
+
export { Content, Editor, Toolbar };
|