ekm-ui 0.0.7 → 0.0.8
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/.turbo/turbo-build.log +54 -47
- package/CHANGELOG.md +6 -0
- package/dist/chunk-6XZQ7MCM.mjs +41 -0
- package/dist/chunk-6XZQ7MCM.mjs.map +1 -0
- package/dist/chunk-GMO5JVRQ.mjs +8 -0
- package/dist/chunk-GMO5JVRQ.mjs.map +1 -0
- package/dist/{chunk-Q6W42FIC.mjs → chunk-GMZXAGEF.mjs} +2 -2
- package/dist/chunk-KV57KLDE.mjs +18 -0
- package/dist/chunk-KV57KLDE.mjs.map +1 -0
- package/dist/chunk-UT7YP3TK.mjs +7 -0
- package/dist/chunk-UT7YP3TK.mjs.map +1 -0
- package/dist/{chunk-BYLEIZ7D.mjs → chunk-V2Y67DG5.mjs} +2 -2
- package/dist/{chunk-BYLEIZ7D.mjs.map → chunk-V2Y67DG5.mjs.map} +1 -1
- package/dist/chunk-X3MJN3EU.mjs +7 -0
- package/dist/chunk-X3MJN3EU.mjs.map +1 -0
- package/dist/form-row.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +7 -5
- package/dist/love-footer.mjs +1 -1
- package/dist/navbar/navbar.mjs +3 -2
- package/dist/rich-text-editor/index.d.ts +16 -0
- package/dist/rich-text-editor/index.mjs +5 -0
- package/dist/rich-text-editor/index.mjs.map +1 -0
- package/dist/sidebar/sidebar.mjs +3 -2
- package/package.json +27 -1
- package/src/form-row.tsx +6 -4
- package/src/index.tsx +1 -0
- package/src/love-footer.tsx +4 -4
- package/src/rich-text-editor/headless-editor.ts +96 -0
- package/src/rich-text-editor/index.tsx +242 -0
- package/src/sidebar/sidebar.tsx +3 -3
- package/tsconfig.json +1 -1
- package/dist/chunk-7LHL2LAJ.mjs +0 -7
- package/dist/chunk-7LHL2LAJ.mjs.map +0 -1
- package/dist/chunk-PLYG34XT.mjs +0 -8
- package/dist/chunk-PLYG34XT.mjs.map +0 -1
- package/dist/chunk-ZIAMSFEI.mjs +0 -18
- package/dist/chunk-ZIAMSFEI.mjs.map +0 -1
- /package/dist/{chunk-Q6W42FIC.mjs.map → chunk-GMZXAGEF.mjs.map} +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$ tsup
|
|
2
|
-
[34mCLI[39m Building entry: src/button.tsx, src/ekm-logo.tsx, src/footer-heart-icon.tsx, src/form-row.tsx, src/index.tsx, src/love-footer.tsx, src/navbar/navbar.tsx, src/sidebar/sidebar.tsx
|
|
2
|
+
[34mCLI[39m Building entry: src/button.tsx, src/ekm-logo.tsx, src/footer-heart-icon.tsx, src/form-row.tsx, src/index.tsx, src/love-footer.tsx, src/navbar/navbar.tsx, src/rich-text-editor/index.tsx, src/sidebar/sidebar.tsx
|
|
3
3
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
4
4
|
[34mCLI[39m tsup v6.7.0
|
|
5
5
|
[34mCLI[39m Using tsup config: /home/runner/work/dev/dev/frontend/packages/ekm-ui/tsup.config.ts
|
|
@@ -7,49 +7,56 @@ $ tsup
|
|
|
7
7
|
[34mCLI[39m Cleaning output folder
|
|
8
8
|
[34mESM[39m Build start
|
|
9
9
|
[34mDTS[39m Build start
|
|
10
|
-
[32mESM[39m [1mdist/index.css
|
|
11
|
-
[32mESM[39m [1mdist/index.css.map
|
|
12
|
-
[32mESM[39m [1mdist/
|
|
13
|
-
[32mESM[39m [1mdist/
|
|
14
|
-
[32mESM[39m [1mdist/
|
|
15
|
-
[32mESM[39m [1mdist/
|
|
16
|
-
[32mESM[39m [1mdist/
|
|
17
|
-
[32mESM[39m [1mdist/
|
|
18
|
-
[32mESM[39m [1mdist/
|
|
19
|
-
[32mESM[39m [1mdist/
|
|
20
|
-
[32mESM[39m [1mdist/
|
|
21
|
-
[32mESM[39m [1mdist/chunk-
|
|
22
|
-
[32mESM[39m [1mdist/
|
|
23
|
-
[32mESM[39m [1mdist/chunk-
|
|
24
|
-
[32mESM[39m [1mdist/
|
|
25
|
-
[32mESM[39m [1mdist/chunk-
|
|
26
|
-
[32mESM[39m [1mdist/chunk-
|
|
27
|
-
[32mESM[39m [1mdist/chunk-
|
|
28
|
-
[32mESM[39m [1mdist/chunk-
|
|
29
|
-
[32mESM[39m [1mdist/
|
|
30
|
-
[32mESM[39m [1mdist/
|
|
31
|
-
[32mESM[39m [1mdist/chunk-
|
|
32
|
-
[32mESM[39m [1mdist/
|
|
33
|
-
[32mESM[39m [1mdist/
|
|
34
|
-
[32mESM[39m [1mdist/
|
|
35
|
-
[32mESM[39m [1mdist/
|
|
36
|
-
[32mESM[39m [1mdist/
|
|
37
|
-
[32mESM[39m [1mdist/
|
|
38
|
-
[32mESM[39m [1mdist/
|
|
39
|
-
[32mESM[39m [1mdist/
|
|
40
|
-
[32mESM[39m [1mdist/
|
|
41
|
-
[32mESM[39m [1mdist/chunk-
|
|
42
|
-
[32mESM[39m [1mdist/chunk-
|
|
43
|
-
[32mESM[39m [1mdist/chunk-
|
|
44
|
-
[32mESM[39m [1mdist/
|
|
45
|
-
[32mESM[39m [1mdist/chunk-
|
|
46
|
-
[32mESM[39m
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[32mDTS[39m
|
|
54
|
-
[32mDTS[39m [1mdist/
|
|
55
|
-
[32mDTS[39m [1mdist/
|
|
10
|
+
[32mESM[39m [1mdist/index.css [22m[32m93.38 KB[39m
|
|
11
|
+
[32mESM[39m [1mdist/index.css.map [22m[32m133.21 KB[39m
|
|
12
|
+
[32mESM[39m [1mdist/sidebar/sidebar.mjs [22m[32m218.00 B[39m
|
|
13
|
+
[32mESM[39m [1mdist/navbar/navbar.mjs [22m[32m248.00 B[39m
|
|
14
|
+
[32mESM[39m [1mdist/rich-text-editor/index.mjs [22m[32m191.00 B[39m
|
|
15
|
+
[32mESM[39m [1mdist/chunk-RUPJ2ZHA.mjs [22m[32m1.13 KB[39m
|
|
16
|
+
[32mESM[39m [1mdist/button.mjs [22m[32m150.00 B[39m
|
|
17
|
+
[32mESM[39m [1mdist/ekm-logo.mjs [22m[32m153.00 B[39m
|
|
18
|
+
[32mESM[39m [1mdist/footer-heart-icon.mjs [22m[32m166.00 B[39m
|
|
19
|
+
[32mESM[39m [1mdist/form-row.mjs [22m[32m153.00 B[39m
|
|
20
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m547.00 B[39m
|
|
21
|
+
[32mESM[39m [1mdist/chunk-KV57KLDE.mjs [22m[32m1.76 KB[39m
|
|
22
|
+
[32mESM[39m [1mdist/chunk-G676EBCC.mjs [22m[32m1.63 KB[39m
|
|
23
|
+
[32mESM[39m [1mdist/chunk-V2Y67DG5.mjs [22m[32m617.00 B[39m
|
|
24
|
+
[32mESM[39m [1mdist/love-footer.mjs [22m[32m190.00 B[39m
|
|
25
|
+
[32mESM[39m [1mdist/chunk-GMO5JVRQ.mjs [22m[32m482.00 B[39m
|
|
26
|
+
[32mESM[39m [1mdist/chunk-FRIXS4BL.mjs [22m[32m56.39 KB[39m
|
|
27
|
+
[32mESM[39m [1mdist/chunk-GMZXAGEF.mjs [22m[32m10.26 KB[39m
|
|
28
|
+
[32mESM[39m [1mdist/chunk-X3MJN3EU.mjs [22m[32m2.69 KB[39m
|
|
29
|
+
[32mESM[39m [1mdist/chunk-3SV266EG.mjs [22m[32m1.69 KB[39m
|
|
30
|
+
[32mESM[39m [1mdist/chunk-6XZQ7MCM.mjs [22m[32m9.45 KB[39m
|
|
31
|
+
[32mESM[39m [1mdist/chunk-UT7YP3TK.mjs [22m[32m1.48 KB[39m
|
|
32
|
+
[32mESM[39m [1mdist/sidebar/sidebar.mjs.map [22m[32m51.00 B[39m
|
|
33
|
+
[32mESM[39m [1mdist/navbar/navbar.mjs.map [22m[32m51.00 B[39m
|
|
34
|
+
[32mESM[39m [1mdist/rich-text-editor/index.mjs.map [22m[32m51.00 B[39m
|
|
35
|
+
[32mESM[39m [1mdist/chunk-RUPJ2ZHA.mjs.map [22m[32m71.00 B[39m
|
|
36
|
+
[32mESM[39m [1mdist/button.mjs.map [22m[32m51.00 B[39m
|
|
37
|
+
[32mESM[39m [1mdist/ekm-logo.mjs.map [22m[32m51.00 B[39m
|
|
38
|
+
[32mESM[39m [1mdist/footer-heart-icon.mjs.map [22m[32m51.00 B[39m
|
|
39
|
+
[32mESM[39m [1mdist/form-row.mjs.map [22m[32m51.00 B[39m
|
|
40
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m51.00 B[39m
|
|
41
|
+
[32mESM[39m [1mdist/chunk-KV57KLDE.mjs.map [22m[32m5.08 KB[39m
|
|
42
|
+
[32mESM[39m [1mdist/chunk-G676EBCC.mjs.map [22m[32m2.60 KB[39m
|
|
43
|
+
[32mESM[39m [1mdist/chunk-V2Y67DG5.mjs.map [22m[32m1.46 KB[39m
|
|
44
|
+
[32mESM[39m [1mdist/love-footer.mjs.map [22m[32m51.00 B[39m
|
|
45
|
+
[32mESM[39m [1mdist/chunk-GMO5JVRQ.mjs.map [22m[32m714.00 B[39m
|
|
46
|
+
[32mESM[39m [1mdist/chunk-FRIXS4BL.mjs.map [22m[32m56.85 KB[39m
|
|
47
|
+
[32mESM[39m [1mdist/chunk-GMZXAGEF.mjs.map [22m[32m24.22 KB[39m
|
|
48
|
+
[32mESM[39m [1mdist/chunk-X3MJN3EU.mjs.map [22m[32m213.43 KB[39m
|
|
49
|
+
[32mESM[39m [1mdist/chunk-3SV266EG.mjs.map [22m[32m2.43 KB[39m
|
|
50
|
+
[32mESM[39m [1mdist/chunk-UT7YP3TK.mjs.map [22m[32m4.91 KB[39m
|
|
51
|
+
[32mESM[39m [1mdist/chunk-6XZQ7MCM.mjs.map [22m[32m1.70 MB[39m
|
|
52
|
+
[32mESM[39m ⚡️ Build success in 15219ms
|
|
53
|
+
[32mDTS[39m ⚡️ Build success in 21736ms
|
|
54
|
+
[32mDTS[39m [1mdist/ekm-logo.d.ts [22m[32m104.00 B[39m
|
|
55
|
+
[32mDTS[39m [1mdist/footer-heart-icon.d.ts [22m[32m70.00 B[39m
|
|
56
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m425.00 B[39m
|
|
57
|
+
[32mDTS[39m [1mdist/button.d.ts [22m[32m307.00 B[39m
|
|
58
|
+
[32mDTS[39m [1mdist/form-row.d.ts [22m[32m294.00 B[39m
|
|
59
|
+
[32mDTS[39m [1mdist/love-footer.d.ts [22m[32m68.00 B[39m
|
|
60
|
+
[32mDTS[39m [1mdist/navbar/navbar.d.ts [22m[32m292.00 B[39m
|
|
61
|
+
[32mDTS[39m [1mdist/rich-text-editor/index.d.ts [22m[32m561.00 B[39m
|
|
62
|
+
[32mDTS[39m [1mdist/sidebar/sidebar.d.ts [22m[32m166.00 B[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { a } from './chunk-UT7YP3TK.mjs';
|
|
2
|
+
import { b as b$1, a as a$1 } from './chunk-RUPJ2ZHA.mjs';
|
|
3
|
+
import { CKEditor } from '@ckeditor/ckeditor5-react';
|
|
4
|
+
import { Menu } from '@headlessui/react';
|
|
5
|
+
import { useState, useEffect, useMemo } from 'react';
|
|
6
|
+
import k from '@ckeditor/ckeditor5-editor-decoupled/src/decouplededitor';
|
|
7
|
+
import S from '@ckeditor/ckeditor5-alignment/src/alignment';
|
|
8
|
+
import R from '@ckeditor/ckeditor5-autoformat/src/autoformat';
|
|
9
|
+
import Z from '@ckeditor/ckeditor5-block-quote/src/blockquote';
|
|
10
|
+
import O from '@ckeditor/ckeditor5-basic-styles/src/bold';
|
|
11
|
+
import W from '@ckeditor/ckeditor5-basic-styles/src/code';
|
|
12
|
+
import j from '@ckeditor/ckeditor5-code-block/src/codeblock';
|
|
13
|
+
import b from '@ckeditor/ckeditor5-essentials/src/essentials';
|
|
14
|
+
import P from '@ckeditor/ckeditor5-heading/src/heading';
|
|
15
|
+
import y from '@ckeditor/ckeditor5-image/src/image';
|
|
16
|
+
import D from '@ckeditor/ckeditor5-image/src/imagecaption';
|
|
17
|
+
import T from '@ckeditor/ckeditor5-image/src/imageresize';
|
|
18
|
+
import q from '@ckeditor/ckeditor5-image/src/imagestyle';
|
|
19
|
+
import U from '@ckeditor/ckeditor5-image/src/imagetoolbar';
|
|
20
|
+
import G from '@ckeditor/ckeditor5-indent/src/indent';
|
|
21
|
+
import E from '@ckeditor/ckeditor5-indent/src/indentblock';
|
|
22
|
+
import I from '@ckeditor/ckeditor5-basic-styles/src/italic';
|
|
23
|
+
import N from '@ckeditor/ckeditor5-link/src/link';
|
|
24
|
+
import Q from '@ckeditor/ckeditor5-list/src/list';
|
|
25
|
+
import K from '@ckeditor/ckeditor5-list/src/listproperties';
|
|
26
|
+
import J from '@ckeditor/ckeditor5-paragraph/src/paragraph';
|
|
27
|
+
import Y from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
|
|
28
|
+
import X from '@ckeditor/ckeditor5-image/src/pictureediting';
|
|
29
|
+
import _ from '@ckeditor/ckeditor5-remove-format/src/removeformat';
|
|
30
|
+
import $ from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
|
|
31
|
+
import t1 from '@ckeditor/ckeditor5-table/src/table';
|
|
32
|
+
import c1 from '@ckeditor/ckeditor5-table/src/tabletoolbar';
|
|
33
|
+
import a1 from '@ckeditor/ckeditor5-typing/src/texttransformation';
|
|
34
|
+
import r1 from '@ckeditor/ckeditor5-basic-styles/src/underline';
|
|
35
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
36
|
+
|
|
37
|
+
function H(t){return a({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M333.49 238a122 122 0 0 0 27-65.21C367.87 96.49 308 32 233.42 32H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h31.87v288H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h209.32c70.8 0 134.14-51.75 141-122.4 4.74-48.45-16.39-92.06-50.83-119.6zM145.66 112h87.76a48 48 0 0 1 0 96h-87.76zm87.76 288h-87.76V288h87.76a56 56 0 0 1 0 112z"}}]})(t)}function f(t){return a({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M320 48v32a16 16 0 0 1-16 16h-62.76l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h62.76l80-320H112a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z"}}]})(t)}function C(t){return a({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M336 416h-11.17l9.26-27.77L267 336.4 240.49 416H208a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm297.82 42.1L377 259.59 426.17 112H544v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16H176a16 16 0 0 0-16 16v43.9L45.46 3.38A16 16 0 0 0 23 6.19L3.37 31.46a16 16 0 0 0 2.81 22.45l588.36 454.72a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zM309.91 207.76L224 141.36V112h117.83z"}}]})(t)}function V(t){return a({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 224H293.9l-87.17-26.83A43.55 43.55 0 0 1 219.55 112h66.79A49.89 49.89 0 0 1 331 139.58a16 16 0 0 0 21.46 7.15l42.94-21.47a16 16 0 0 0 7.16-21.46l-.53-1A128 128 0 0 0 287.51 32h-68a123.68 123.68 0 0 0-123 135.64c2 20.89 10.1 39.83 21.78 56.36H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h480a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-180.24 96A43 43 0 0 1 336 356.45 43.59 43.59 0 0 1 292.45 400h-66.79A49.89 49.89 0 0 1 181 372.42a16 16 0 0 0-21.46-7.15l-42.94 21.47a16 16 0 0 0-7.16 21.46l.53 1A128 128 0 0 0 224.49 480h68a123.68 123.68 0 0 0 123-135.64 114.25 114.25 0 0 0-5.34-24.36z"}}]})(t)}function L(t){return a({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 64h32v160c0 88.22 71.78 160 160 160s160-71.78 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H272a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1-160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"}}]})(t)}function w(t){return a({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M9 4.5a.75.75 0 01.721.544l.813 2.846a3.75 3.75 0 002.576 2.576l2.846.813a.75.75 0 010 1.442l-2.846.813a3.75 3.75 0 00-2.576 2.576l-.813 2.846a.75.75 0 01-1.442 0l-.813-2.846a3.75 3.75 0 00-2.576-2.576l-2.846-.813a.75.75 0 010-1.442l2.846-.813A3.75 3.75 0 007.466 7.89l.813-2.846A.75.75 0 019 4.5zM18 1.5a.75.75 0 01.728.568l.258 1.036c.236.94.97 1.674 1.91 1.91l1.036.258a.75.75 0 010 1.456l-1.036.258c-.94.236-1.674.97-1.91 1.91l-.258 1.036a.75.75 0 01-1.456 0l-.258-1.036a2.625 2.625 0 00-1.91-1.91l-1.036-.258a.75.75 0 010-1.456l1.036-.258a2.625 2.625 0 001.91-1.91l.258-1.036A.75.75 0 0118 1.5zM16.5 15a.75.75 0 01.712.513l.394 1.183c.15.447.5.799.948.948l1.183.395a.75.75 0 010 1.422l-1.183.395c-.447.15-.799.5-.948.948l-.395 1.183a.75.75 0 01-1.422 0l-.395-1.183a1.5 1.5 0 00-.948-.948l-1.183-.395a.75.75 0 010-1.422l1.183-.395c.447-.15.799-.5.948-.948l.395-1.183A.75.75 0 0116.5 15z",clipRule:"evenodd"}}]})(t)}var d=class extends k{};d.builtinPlugins=[S,R,Z,O,W,j,b,P,y,D,T,q,U,G,E,I,N,Q,K,J,Y,X,_,$,t1,c1,a1,r1];d.defaultConfig={codeBlock:{languages:[{language:"css",label:"CSS"},{language:"html",label:"HTML"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"}]},image:{resizeUnit:"px",toolbar:["imageStyle:inline","imageStyle:wrapText","imageStyle:breakText","|","toggleImageCaption","imageTextAlternative"]},table:{contentToolbar:["tableColumn","tableRow","mergeTableCells"]},language:"en"};var B=d;function Y1(t){let[c,n]=useState(null),[g,r]=useState(null);useEffect(()=>{c==null||c.listenTo(c==null?void 0:c.model.document.selection,"change:range",l=>{let i=c==null?void 0:c.model.document.selection,o=i==null?void 0:i.getFirstRange();if(o){let e="";for(let v of o.getItems())e+=v.data;r(e);}}),c==null||c.model.document.on("change:data",()=>{t.onDataChange&&t.onDataChange((c==null?void 0:c.getData())||"");});},[c,t.onDataChange]);let p=useMemo(()=>t.defaultAiMenu?t.textSelectedAiMenu&&g?t.textSelectedAiMenu:t.defaultAiMenu:null,[g,t.textSelectedAiMenu,t.defaultAiMenu]);return jsxs("div",{className:"mb-4 w-full rounded-lg border border-gray-200 bg-gray-50 dark:border-gray-600 dark:bg-gray-700",children:[jsx(h1,{editor:c,aiMenu:p}),jsx(CKEditor,b$1(a$1({onChange:l=>{},editor:B},t),{onReady:l=>{n(l),window.editor=l;let i="px-4 py-2 bg-white rounded-b-lg dark:bg-gray-800 block w-full px-0 text-sm text-gray-800 bg-white border-0 dark:bg-gray-800 focus:ring-0 dark:text-white dark:placeholder-gray-400";l.editing.view.change(o=>{let e=l.editing.view.document.getRoot();e&&(o.removeClass(["ck-content","ck-editor__editable","ck-rounded-corners","ck-editor__editable_inline"],e),o.addClass(i,e));});}}))]})}function h1({editor:t,aiMenu:c}){return jsx("div",{className:"flex items-center justify-between border-b px-3 py-2 dark:border-gray-600",children:jsx("div",{className:"flex flex-wrap items-center divide-gray-200 dark:divide-gray-600 sm:divide-x",children:jsxs("div",{className:"flex items-center space-x-2 sm:pr-4",children:[c&&jsxs(Menu,{as:"div",className:"relative inline-block border-r text-left",children:[jsx("div",{className:"mr-2",children:jsx(Menu.Button,{className:"inline-flex w-full justify-center rounded-md px-4 py-2 text-sm font-medium text-white hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white",children:jsx(w,{className:"h-5 w-5 text-violet-600 hover:text-violet-700","aria-hidden":"true"})})}),c]}),jsx(u,{commandName:"bold",label:"Bold",editor:t}),jsx(u,{commandName:"italic",label:"Italic",editor:t}),jsx(u,{commandName:"underline",label:"Underline",editor:t}),jsx(u,{commandName:"strikethrough",label:"Strikethrough",editor:t}),jsx(u,{commandName:"removeFormat",label:"Remove format",editor:t})]})})})}function u({editor:t,commandName:c,commandValue:n=null,label:g}){let r=t?t.commands.get(c):null,[p,l]=useState(!1),[i,o]=useState(!0);useEffect(()=>{if(!r)return;function v(){typeof(r==null?void 0:r.value)=="boolean"?l(!!r.value):l(n===(r==null?void 0:r.value));}function m(){o((r==null?void 0:r.isEnabled)||!1);}return r.on("change:value",v),r.on("change:isEnabled",m),v(),m(),function(){r.off("change:value",v),r.off("change:isEnabled",m);}},[r]);let e=["custom-editor-button"];return i?e.push(p?"custom-editor-button--fill bg-gray-100 text-gray-900 dark:bg-gray-600 dark:text-white":""):e.push("custom-editor-button--disabled"),e.push("mr-2 cursor-pointer rounded p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-600 dark:hover:text-white"),jsx("div",{className:"border-r",children:jsxs("button",{className:e.join(" "),onClick:()=>{t&&(n?t.execute(c,{value:n}):t.execute(c),t.editing.view.focus());},children:[jsx("span",{className:"sr-only",children:g}),i1[c]]})})}var i1={bold:jsx(H,{}),italic:jsx(f,{}),underline:jsx(L,{}),strikethrough:jsx(V,{}),removeFormat:jsx(C,{})};
|
|
38
|
+
|
|
39
|
+
export { Y1 as a };
|
|
40
|
+
//# sourceMappingURL=out.js.map
|
|
41
|
+
//# sourceMappingURL=chunk-6XZQ7MCM.mjs.map
|