@halo-dev/richtext-editor 0.0.0-alpha.7 → 0.0.0-alpha.9

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.
@@ -18826,541 +18826,26 @@ defineComponent({
18826
18826
  }
18827
18827
  });
18828
18828
  const Menu = _sfc_main$2$1;
18829
- const _hoisted_1$r = {
18830
- viewBox: "0 0 24 24",
18831
- width: "1.2em",
18832
- height: "1.2em"
18833
- };
18834
- const _hoisted_2$r = /* @__PURE__ */ createElementVNode("path", {
18835
- fill: "currentColor",
18836
- d: "M13.5 15.5H10v-3h3.5A1.5 1.5 0 0 1 15 14a1.5 1.5 0 0 1-1.5 1.5m-3.5-9h3A1.5 1.5 0 0 1 14.5 8A1.5 1.5 0 0 1 13 9.5h-3m5.6 1.29c.97-.68 1.65-1.79 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.1 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42Z"
18837
- }, null, -1);
18838
- const _hoisted_3$q = [
18839
- _hoisted_2$r
18840
- ];
18841
- function render$m(_ctx, _cache) {
18842
- return openBlock(), createElementBlock("svg", _hoisted_1$r, _hoisted_3$q);
18843
- }
18844
- const MdiFormatBold = { name: "mdi-format-bold", render: render$m };
18845
- const _hoisted_1$q = {
18846
- viewBox: "0 0 24 24",
18847
- width: "1.2em",
18848
- height: "1.2em"
18849
- };
18850
- const _hoisted_2$q = /* @__PURE__ */ createElementVNode("path", {
18851
- fill: "currentColor",
18852
- d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4h-8Z"
18853
- }, null, -1);
18854
- const _hoisted_3$p = [
18855
- _hoisted_2$q
18856
- ];
18857
- function render$l(_ctx, _cache) {
18858
- return openBlock(), createElementBlock("svg", _hoisted_1$q, _hoisted_3$p);
18859
- }
18860
- const MdiFormatItalic = { name: "mdi-format-italic", render: render$l };
18861
- const _hoisted_1$p = {
18862
- viewBox: "0 0 24 24",
18863
- width: "1.2em",
18864
- height: "1.2em"
18865
- };
18866
- const _hoisted_2$p = /* @__PURE__ */ createElementVNode("path", {
18867
- fill: "currentColor",
18868
- d: "M3 14h18v-2H3m2-8v3h5v3h4V7h5V4m-9 15h4v-3h-4v3Z"
18869
- }, null, -1);
18870
- const _hoisted_3$o = [
18871
- _hoisted_2$p
18872
- ];
18873
- function render$k(_ctx, _cache) {
18874
- return openBlock(), createElementBlock("svg", _hoisted_1$p, _hoisted_3$o);
18875
- }
18876
- const MdiFormatStrikethrough = { name: "mdi-format-strikethrough", render: render$k };
18877
- const _hoisted_1$o = {
18878
- viewBox: "0 0 24 24",
18879
- width: "1.2em",
18880
- height: "1.2em"
18881
- };
18882
- const _hoisted_2$o = /* @__PURE__ */ createElementVNode("path", {
18883
- fill: "currentColor",
18884
- d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m10 4h2.31l.32-3h2l-.32 3h2l.32-3h2l-.32 3H23v2h-1.9l-.2 2H23v2h-2.31l-.32 3h-2l.32-3h-2l-.32 3h-2l.32-3H13v-2h1.9l.2-2H13V8m4.1 2l-.2 2h2l.2-2h-2Z"
18885
- }, null, -1);
18886
- const _hoisted_3$n = [
18887
- _hoisted_2$o
18888
- ];
18889
- function render$j(_ctx, _cache) {
18890
- return openBlock(), createElementBlock("svg", _hoisted_1$o, _hoisted_3$n);
18891
- }
18892
- const MdiFormatHeaderPound = { name: "mdi-format-header-pound", render: render$j };
18893
- const _hoisted_1$n = {
18894
- viewBox: "0 0 24 24",
18895
- width: "1.2em",
18896
- height: "1.2em"
18897
- };
18898
- const _hoisted_2$n = /* @__PURE__ */ createElementVNode("path", {
18899
- fill: "currentColor",
18900
- d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m11 14v-2h2V6.31l-2.5 1.44V5.44L16 4h2v12h2v2h-6Z"
18901
- }, null, -1);
18902
- const _hoisted_3$m = [
18903
- _hoisted_2$n
18904
- ];
18905
- function render$i(_ctx, _cache) {
18906
- return openBlock(), createElementBlock("svg", _hoisted_1$n, _hoisted_3$m);
18907
- }
18908
- const MdiFormatHeader1 = { name: "mdi-format-header-1", render: render$i };
18909
- const _hoisted_1$m = {
18910
- viewBox: "0 0 24 24",
18911
- width: "1.2em",
18912
- height: "1.2em"
18913
- };
18914
- const _hoisted_2$m = /* @__PURE__ */ createElementVNode("path", {
18915
- fill: "currentColor",
18916
- d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m18 14h-6a2 2 0 0 1-2-2c0-.53.2-1 .54-1.36l4.87-5.23c.37-.36.59-.86.59-1.41a2 2 0 0 0-2-2a2 2 0 0 0-2 2h-2a4 4 0 0 1 4-4a4 4 0 0 1 4 4c0 1.1-.45 2.1-1.17 2.83L15 16h6v2Z"
18917
- }, null, -1);
18918
- const _hoisted_3$l = [
18919
- _hoisted_2$m
18920
- ];
18921
- function render$h(_ctx, _cache) {
18922
- return openBlock(), createElementBlock("svg", _hoisted_1$m, _hoisted_3$l);
18923
- }
18924
- const MdiFormatHeader2 = { name: "mdi-format-header-2", render: render$h };
18925
- const _hoisted_1$l = {
18926
- viewBox: "0 0 24 24",
18927
- width: "1.2em",
18928
- height: "1.2em"
18929
- };
18930
- const _hoisted_2$l = /* @__PURE__ */ createElementVNode("path", {
18931
- fill: "currentColor",
18932
- d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m12 0h4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-1h2v1h4v-4h-4v-2h4V6h-4v1h-2V6a2 2 0 0 1 2-2Z"
18933
- }, null, -1);
18934
- const _hoisted_3$k = [
18935
- _hoisted_2$l
18936
- ];
18937
- function render$g(_ctx, _cache) {
18938
- return openBlock(), createElementBlock("svg", _hoisted_1$l, _hoisted_3$k);
18939
- }
18940
- const MdiFormatHeader3 = { name: "mdi-format-header-3", render: render$g };
18941
- const _hoisted_1$k = {
18942
- viewBox: "0 0 24 24",
18943
- width: "1.2em",
18944
- height: "1.2em"
18945
- };
18946
- const _hoisted_2$k = /* @__PURE__ */ createElementVNode("path", {
18947
- fill: "currentColor",
18948
- d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m15 14v-5h-5v-2l5-7h2v7h1v2h-1v5h-2m0-7V7.42L15.45 11H18Z"
18949
- }, null, -1);
18950
- const _hoisted_3$j = [
18951
- _hoisted_2$k
18952
- ];
18953
- function render$f(_ctx, _cache) {
18954
- return openBlock(), createElementBlock("svg", _hoisted_1$k, _hoisted_3$j);
18955
- }
18956
- const MdiFormatHeader4 = { name: "mdi-format-header-4", render: render$f };
18957
- const _hoisted_1$j = {
18958
- viewBox: "0 0 24 24",
18959
- width: "1.2em",
18960
- height: "1.2em"
18961
- };
18962
- const _hoisted_2$j = /* @__PURE__ */ createElementVNode("path", {
18963
- fill: "currentColor",
18964
- d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m12 0h5v2h-5v4h2a4 4 0 0 1 4 4a4 4 0 0 1-4 4h-2a2 2 0 0 1-2-2v-1h2v1h2a2 2 0 0 0 2-2a2 2 0 0 0-2-2h-2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z"
18965
- }, null, -1);
18966
- const _hoisted_3$i = [
18967
- _hoisted_2$j
18968
- ];
18969
- function render$e(_ctx, _cache) {
18970
- return openBlock(), createElementBlock("svg", _hoisted_1$j, _hoisted_3$i);
18971
- }
18972
- const MdiFormatHeader5 = { name: "mdi-format-header-5", render: render$e };
18973
- const _hoisted_1$i = {
18974
- viewBox: "0 0 24 24",
18975
- width: "1.2em",
18976
- height: "1.2em"
18977
- };
18978
- const _hoisted_2$i = /* @__PURE__ */ createElementVNode("path", {
18979
- fill: "currentColor",
18980
- d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m12 0h4a2 2 0 0 1 2 2v1h-2V6h-4v4h4a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 8v4h4v-4h-4Z"
18981
- }, null, -1);
18982
- const _hoisted_3$h = [
18983
- _hoisted_2$i
18984
- ];
18985
- function render$d(_ctx, _cache) {
18986
- return openBlock(), createElementBlock("svg", _hoisted_1$i, _hoisted_3$h);
18987
- }
18988
- const MdiFormatHeader6 = { name: "mdi-format-header-6", render: render$d };
18989
- const _hoisted_1$h = {
18990
- viewBox: "0 0 24 24",
18991
- width: "1.2em",
18992
- height: "1.2em"
18993
- };
18994
- const _hoisted_2$h = /* @__PURE__ */ createElementVNode("path", {
18995
- fill: "currentColor",
18996
- d: "M13.5 7a6.5 6.5 0 0 1 6.5 6.5a6.5 6.5 0 0 1-6.5 6.5H10v-2h3.5c2.5 0 4.5-2 4.5-4.5S16 9 13.5 9H7.83l3.08 3.09L9.5 13.5L4 8l5.5-5.5l1.42 1.41L7.83 7h5.67M6 18h2v2H6v-2Z"
18997
- }, null, -1);
18998
- const _hoisted_3$g = [
18999
- _hoisted_2$h
19000
- ];
19001
- function render$c(_ctx, _cache) {
19002
- return openBlock(), createElementBlock("svg", _hoisted_1$h, _hoisted_3$g);
19003
- }
19004
- const MdiUndoVariant = { name: "mdi-undo-variant", render: render$c };
19005
- const _hoisted_1$g = {
19006
- viewBox: "0 0 24 24",
19007
- width: "1.2em",
19008
- height: "1.2em"
19009
- };
19010
- const _hoisted_2$g = /* @__PURE__ */ createElementVNode("path", {
19011
- fill: "currentColor",
19012
- d: "M10.5 7A6.5 6.5 0 0 0 4 13.5a6.5 6.5 0 0 0 6.5 6.5H14v-2h-3.5C8 18 6 16 6 13.5S8 9 10.5 9h5.67l-3.08 3.09l1.41 1.41L20 8l-5.5-5.5l-1.42 1.41L16.17 7H10.5M18 18h-2v2h2v-2Z"
19013
- }, null, -1);
19014
- const _hoisted_3$f = [
19015
- _hoisted_2$g
19016
- ];
19017
- function render$b(_ctx, _cache) {
19018
- return openBlock(), createElementBlock("svg", _hoisted_1$g, _hoisted_3$f);
19019
- }
19020
- const MdiRedoVariant = { name: "mdi-redo-variant", render: render$b };
19021
- const _hoisted_1$f = {
19022
- viewBox: "0 0 24 24",
19023
- width: "1.2em",
19024
- height: "1.2em"
19025
- };
19026
- const _hoisted_2$f = /* @__PURE__ */ createElementVNode("path", {
19027
- fill: "currentColor",
19028
- d: "M5 21h14v-2H5v2m7-4a6 6 0 0 0 6-6V3h-2.5v8a3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 8.5 11V3H6v8a6 6 0 0 0 6 6Z"
19029
- }, null, -1);
19030
- const _hoisted_3$e = [
19031
- _hoisted_2$f
19032
- ];
19033
- function render$a(_ctx, _cache) {
19034
- return openBlock(), createElementBlock("svg", _hoisted_1$f, _hoisted_3$e);
19035
- }
19036
- const MdiFormatUnderline = { name: "mdi-format-underline", render: render$a };
19037
- const _hoisted_1$e = {
19038
- viewBox: "0 0 24 24",
19039
- width: "1.2em",
19040
- height: "1.2em"
19041
- };
19042
- const _hoisted_2$e = /* @__PURE__ */ createElementVNode("path", {
19043
- fill: "currentColor",
19044
- d: "M3 3h18v2H3V3m0 4h12v2H3V7m0 4h18v2H3v-2m0 4h12v2H3v-2m0 4h18v2H3v-2Z"
19045
- }, null, -1);
19046
- const _hoisted_3$d = [
19047
- _hoisted_2$e
19048
- ];
19049
- function render$9(_ctx, _cache) {
19050
- return openBlock(), createElementBlock("svg", _hoisted_1$e, _hoisted_3$d);
19051
- }
19052
- const MdiFormatAlignLeft = { name: "mdi-format-align-left", render: render$9 };
19053
- const _hoisted_1$d = {
19054
- viewBox: "0 0 24 24",
19055
- width: "1.2em",
19056
- height: "1.2em"
19057
- };
19058
- const _hoisted_2$d = /* @__PURE__ */ createElementVNode("path", {
19059
- fill: "currentColor",
19060
- d: "M3 3h18v2H3V3m4 4h10v2H7V7m-4 4h18v2H3v-2m4 4h10v2H7v-2m-4 4h18v2H3v-2Z"
19061
- }, null, -1);
19062
- const _hoisted_3$c = [
19063
- _hoisted_2$d
19064
- ];
19065
- function render$8(_ctx, _cache) {
19066
- return openBlock(), createElementBlock("svg", _hoisted_1$d, _hoisted_3$c);
19067
- }
19068
- const MdiFormatAlignCenter = { name: "mdi-format-align-center", render: render$8 };
19069
- const _hoisted_1$c = {
19070
- viewBox: "0 0 24 24",
19071
- width: "1.2em",
19072
- height: "1.2em"
19073
- };
19074
- const _hoisted_2$c = /* @__PURE__ */ createElementVNode("path", {
19075
- fill: "currentColor",
19076
- d: "M3 3h18v2H3V3m6 4h12v2H9V7m-6 4h18v2H3v-2m6 4h12v2H9v-2m-6 4h18v2H3v-2Z"
19077
- }, null, -1);
19078
- const _hoisted_3$b = [
19079
- _hoisted_2$c
19080
- ];
19081
- function render$7(_ctx, _cache) {
19082
- return openBlock(), createElementBlock("svg", _hoisted_1$c, _hoisted_3$b);
19083
- }
19084
- const MdiFormatAlignRight = { name: "mdi-format-align-right", render: render$7 };
19085
- const _hoisted_1$b = {
19086
- viewBox: "0 0 24 24",
19087
- width: "1.2em",
19088
- height: "1.2em"
19089
- };
19090
- const _hoisted_2$b = /* @__PURE__ */ createElementVNode("path", {
19091
- fill: "currentColor",
19092
- d: "M3 3h18v2H3V3m0 4h18v2H3V7m0 4h18v2H3v-2m0 4h18v2H3v-2m0 4h18v2H3v-2Z"
19093
- }, null, -1);
19094
- const _hoisted_3$a = [
19095
- _hoisted_2$b
19096
- ];
19097
- function render$6(_ctx, _cache) {
19098
- return openBlock(), createElementBlock("svg", _hoisted_1$b, _hoisted_3$a);
19099
- }
19100
- const MdiFormatAlignJustify = { name: "mdi-format-align-justify", render: render$6 };
19101
- const _hoisted_1$a = {
19102
- viewBox: "0 0 24 24",
19103
- width: "1.2em",
19104
- height: "1.2em"
19105
- };
19106
- const _hoisted_2$a = /* @__PURE__ */ createElementVNode("path", {
19107
- fill: "currentColor",
19108
- d: "m10 7l-2 4h3v6H5v-6l2-4h3m8 0l-2 4h3v6h-6v-6l2-4h3Z"
19109
- }, null, -1);
19110
- const _hoisted_3$9 = [
19111
- _hoisted_2$a
19112
- ];
19113
- function render$5(_ctx, _cache) {
19114
- return openBlock(), createElementBlock("svg", _hoisted_1$a, _hoisted_3$9);
19115
- }
19116
- const MdiFormatQuoteOpen = { name: "mdi-format-quote-open", render: render$5 };
19117
- const _hoisted_1$9 = {
19118
- viewBox: "0 0 24 24",
19119
- width: "1.2em",
19120
- height: "1.2em"
19121
- };
19122
- const _hoisted_2$9 = /* @__PURE__ */ createElementVNode("path", {
19123
- fill: "currentColor",
19124
- d: "m14.6 16.6l4.6-4.6l-4.6-4.6L16 6l6 6l-6 6l-1.4-1.4m-5.2 0L4.8 12l4.6-4.6L8 6l-6 6l6 6l1.4-1.4Z"
19125
- }, null, -1);
19126
- const _hoisted_3$8 = [
19127
- _hoisted_2$9
19128
- ];
19129
- function render$4(_ctx, _cache) {
19130
- return openBlock(), createElementBlock("svg", _hoisted_1$9, _hoisted_3$8);
19131
- }
19132
- const MdiCodeTags = { name: "mdi-code-tags", render: render$4 };
19133
- const _hoisted_1$8 = {
19134
- viewBox: "0 0 24 24",
19135
- width: "1.2em",
19136
- height: "1.2em"
19137
- };
19138
- const _hoisted_2$8 = /* @__PURE__ */ createElementVNode("path", {
19139
- fill: "currentColor",
19140
- d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-8 5H9v2c0 1.1-.9 2-2 2c1.1 0 2 .9 2 2v2h2v2H9c-1.1 0-2-.9-2-2v-1c0-1.1-.9-2-2-2v-2c1.1 0 2-.9 2-2V8c0-1.1.9-2 2-2h2v2m8 5c-1.1 0-2 .9-2 2v1c0 1.1-.9 2-2 2h-2v-2h2v-2c0-1.1.9-2 2-2c-1.1 0-2-.9-2-2V8h-2V6h2c1.1 0 2 .9 2 2v1c0 1.1.9 2 2 2v2Z"
19141
- }, null, -1);
19142
- const _hoisted_3$7 = [
19143
- _hoisted_2$8
19144
- ];
19145
- function render$3(_ctx, _cache) {
19146
- return openBlock(), createElementBlock("svg", _hoisted_1$8, _hoisted_3$7);
19147
- }
19148
- const MdiCodeBracesBox = { name: "mdi-code-braces-box", render: render$3 };
19149
- const _hoisted_1$7 = {
19150
- viewBox: "0 0 24 24",
19151
- width: "1.2em",
19152
- height: "1.2em"
19153
- };
19154
- const _hoisted_2$7 = /* @__PURE__ */ createElementVNode("path", {
19155
- fill: "currentColor",
19156
- d: "M16 7.41L11.41 12L16 16.59L14.59 18L10 13.41L5.41 18L4 16.59L8.59 12L4 7.41L5.41 6L10 10.59L14.59 6L16 7.41M21.85 9h-4.88V8l.89-.82c.76-.64 1.32-1.18 1.7-1.63c.37-.44.56-.85.57-1.23a.884.884 0 0 0-.27-.7c-.18-.19-.47-.28-.86-.29c-.31.01-.58.07-.84.17l-.66.39l-.45-1.17c.27-.22.59-.39.98-.53S18.85 2 19.32 2c.78 0 1.38.2 1.78.61c.4.39.62.93.62 1.57c-.01.56-.19 1.08-.54 1.55c-.34.48-.76.93-1.27 1.36l-.64.52v.02h2.58V9Z"
19157
- }, null, -1);
19158
- const _hoisted_3$6 = [
19159
- _hoisted_2$7
19160
- ];
19161
- function render$2(_ctx, _cache) {
19162
- return openBlock(), createElementBlock("svg", _hoisted_1$7, _hoisted_3$6);
19163
- }
19164
- const MdiFormatSuperscript = { name: "mdi-format-superscript", render: render$2 };
19165
- const _hoisted_1$6 = {
19166
- viewBox: "0 0 24 24",
19167
- width: "1.2em",
19168
- height: "1.2em"
19169
- };
19170
- const _hoisted_2$6 = /* @__PURE__ */ createElementVNode("path", {
19171
- fill: "currentColor",
19172
- d: "M16 7.41L11.41 12L16 16.59L14.59 18L10 13.41L5.41 18L4 16.59L8.59 12L4 7.41L5.41 6L10 10.59L14.59 6L16 7.41m5.85 13.62h-4.88v-1l.89-.8c.76-.65 1.32-1.19 1.7-1.63c.37-.44.56-.85.57-1.24a.898.898 0 0 0-.27-.7c-.18-.16-.47-.28-.86-.28c-.31 0-.58.06-.84.18l-.66.38l-.45-1.17c.27-.21.59-.39.98-.53s.82-.24 1.29-.24c.78.04 1.38.25 1.78.66c.4.41.62.93.62 1.57c-.01.56-.19 1.08-.54 1.55c-.34.47-.76.92-1.27 1.36l-.64.52v.02h2.58v1.35Z"
19173
- }, null, -1);
19174
- const _hoisted_3$5 = [
19175
- _hoisted_2$6
19176
- ];
19177
- function render$1(_ctx, _cache) {
19178
- return openBlock(), createElementBlock("svg", _hoisted_1$6, _hoisted_3$5);
19179
- }
19180
- const MdiFormatSubscript = { name: "mdi-format-subscript", render: render$1 };
19181
- const _hoisted_1$5 = { class: "editor-header flex items-center py-1 space-x-0.5 justify-center border-b drop-shadow-sm bg-white" };
19182
- const _hoisted_2$5 = ["onClick"];
19183
- const _hoisted_3$4 = { class: "w-24 flex flex-col" };
18829
+ const _hoisted_1$r = { class: "editor-header flex items-center py-1 space-x-0.5 justify-center border-b drop-shadow-sm bg-white" };
18830
+ const _hoisted_2$r = ["onClick"];
18831
+ const _hoisted_3$q = { class: "w-24 flex flex-col" };
19184
18832
  const _hoisted_4$1 = ["onClick"];
19185
18833
  const _hoisted_5$1 = { class: "text-sm" };
19186
18834
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
19187
18835
  __name: "EditorHeader",
19188
18836
  props: {
19189
- editor: {
19190
- type: Object,
19191
- required: true
19192
- },
19193
- addtionalMenuItems: {
18837
+ menuItems: {
19194
18838
  type: Array,
19195
18839
  required: false,
19196
18840
  default: () => []
19197
18841
  }
19198
18842
  },
19199
18843
  setup(__props) {
19200
- const props = __props;
19201
- const menuItems = [
19202
- {
19203
- type: "button",
19204
- icon: MdiUndoVariant,
19205
- title: "Undo",
19206
- action: () => props.editor.chain().undo().run(),
19207
- isActive: () => false
19208
- },
19209
- {
19210
- type: "button",
19211
- icon: MdiRedoVariant,
19212
- title: "Redo",
19213
- action: () => props.editor.chain().redo().run(),
19214
- isActive: () => false
19215
- },
19216
- {
19217
- type: "button",
19218
- icon: MdiFormatBold,
19219
- title: "Bold",
19220
- action: () => props.editor.chain().focus().toggleBold().run(),
19221
- isActive: () => props.editor.isActive("bold")
19222
- },
19223
- {
19224
- type: "button",
19225
- icon: MdiFormatItalic,
19226
- title: "Italic",
19227
- action: () => props.editor.chain().focus().toggleItalic().run(),
19228
- isActive: () => props.editor.isActive("italic")
19229
- },
19230
- {
19231
- type: "button",
19232
- icon: MdiFormatUnderline,
19233
- title: "Underline",
19234
- action: () => props.editor.chain().focus().toggleUnderline().run(),
19235
- isActive: () => props.editor.isActive("underline")
19236
- },
19237
- {
19238
- type: "button",
19239
- icon: MdiFormatStrikethrough,
19240
- title: "Strike",
19241
- action: () => props.editor.chain().focus().toggleStrike().run(),
19242
- isActive: () => props.editor.isActive("strike")
19243
- },
19244
- {
19245
- type: "button",
19246
- icon: MdiFormatQuoteOpen,
19247
- title: "Quote",
19248
- action: () => props.editor.chain().focus().toggleBlockquote().run(),
19249
- isActive: () => props.editor.isActive("blockquote")
19250
- },
19251
- {
19252
- type: "button",
19253
- icon: MdiCodeTags,
19254
- title: "Code",
19255
- action: () => props.editor.chain().focus().toggleCode().run(),
19256
- isActive: () => props.editor.isActive("code")
19257
- },
19258
- {
19259
- type: "button",
19260
- icon: MdiFormatSuperscript,
19261
- title: "SuperScript",
19262
- action: () => props.editor.chain().focus().toggleSuperscript().run(),
19263
- isActive: () => props.editor.isActive("superscript")
19264
- },
19265
- {
19266
- type: "button",
19267
- icon: MdiFormatSubscript,
19268
- title: "SubScript",
19269
- action: () => props.editor.chain().focus().toggleSubscript().run(),
19270
- isActive: () => props.editor.isActive("subscript")
19271
- },
19272
- {
19273
- type: "button",
19274
- icon: MdiCodeBracesBox,
19275
- title: "Code Block",
19276
- action: () => props.editor.chain().focus().toggleCodeBlock().run(),
19277
- isActive: () => props.editor.isActive("codeBlock")
19278
- },
19279
- {
19280
- type: "button",
19281
- icon: MdiFormatHeaderPound,
19282
- title: "\u666E\u901A\u6587\u672C",
19283
- isActive: () => props.editor.isActive("heading"),
19284
- children: [
19285
- {
19286
- type: "button",
19287
- icon: MdiFormatHeader1,
19288
- title: "\u6807\u9898 1",
19289
- action: () => props.editor.chain().focus().toggleHeading({ level: 1 }).run(),
19290
- isActive: () => props.editor.isActive("heading", { level: 1 })
19291
- },
19292
- {
19293
- type: "button",
19294
- icon: MdiFormatHeader2,
19295
- title: "\u6807\u9898 2",
19296
- action: () => props.editor.chain().focus().toggleHeading({ level: 2 }).run(),
19297
- isActive: () => props.editor.isActive("heading", { level: 1 })
19298
- },
19299
- {
19300
- type: "button",
19301
- icon: MdiFormatHeader3,
19302
- title: "\u6807\u9898 3",
19303
- action: () => props.editor.chain().focus().toggleHeading({ level: 3 }).run(),
19304
- isActive: () => props.editor.isActive("heading", { level: 1 })
19305
- },
19306
- {
19307
- type: "button",
19308
- icon: MdiFormatHeader4,
19309
- title: "\u6807\u9898 4",
19310
- action: () => props.editor.chain().focus().toggleHeading({ level: 4 }).run(),
19311
- isActive: () => props.editor.isActive("heading", { level: 1 })
19312
- },
19313
- {
19314
- type: "button",
19315
- icon: MdiFormatHeader5,
19316
- title: "\u6807\u9898 5",
19317
- action: () => props.editor.chain().focus().toggleHeading({ level: 5 }).run(),
19318
- isActive: () => props.editor.isActive("heading", { level: 1 })
19319
- },
19320
- {
19321
- type: "button",
19322
- icon: MdiFormatHeader6,
19323
- title: "\u6807\u9898 6",
19324
- action: () => props.editor.chain().focus().toggleHeading({ level: 6 }).run(),
19325
- isActive: () => props.editor.isActive("heading", { level: 1 })
19326
- }
19327
- ]
19328
- },
19329
- {
19330
- type: "button",
19331
- icon: MdiFormatAlignLeft,
19332
- title: "Align left",
19333
- action: () => props.editor.chain().focus().setTextAlign("left").run(),
19334
- isActive: () => props.editor.isActive({ textAlign: "left" })
19335
- },
19336
- {
19337
- type: "button",
19338
- icon: MdiFormatAlignCenter,
19339
- title: "Align center",
19340
- action: () => props.editor.chain().focus().setTextAlign("center").run(),
19341
- isActive: () => props.editor.isActive({ textAlign: "center" })
19342
- },
19343
- {
19344
- type: "button",
19345
- icon: MdiFormatAlignRight,
19346
- title: "Align right",
19347
- action: () => props.editor.chain().focus().setTextAlign("right").run(),
19348
- isActive: () => props.editor.isActive({ textAlign: "right" })
19349
- },
19350
- {
19351
- type: "button",
19352
- icon: MdiFormatAlignJustify,
19353
- title: "Align justify",
19354
- action: () => props.editor.chain().focus().setTextAlign("justify").run(),
19355
- isActive: () => props.editor.isActive({ textAlign: "justify" })
19356
- },
19357
- ...props.addtionalMenuItems
19358
- ];
19359
18844
  return (_ctx, _cache) => {
19360
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
19361
- (openBlock(), createElementBlock(Fragment$1, null, renderList(menuItems, (menuItem, index2) => {
18845
+ return openBlock(), createElementBlock("div", _hoisted_1$r, [
18846
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.menuItems, (menuItem, index2) => {
19362
18847
  var _a, _b;
19363
- return createElementVNode("div", {
18848
+ return openBlock(), createElementBlock("div", {
19364
18849
  key: index2,
19365
18850
  class: "inline-flex items-center justify-center"
19366
18851
  }, [
@@ -19370,9 +18855,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
19370
18855
  onClick: menuItem.action
19371
18856
  }, [
19372
18857
  (openBlock(), createBlock(resolveDynamicComponent(menuItem.icon)))
19373
- ], 10, _hoisted_2$5)) : (openBlock(), createBlock(unref(Menu), { key: 1 }, {
18858
+ ], 10, _hoisted_2$r)) : (openBlock(), createBlock(unref(Menu), { key: 1 }, {
19374
18859
  popper: withCtx(() => [
19375
- createElementVNode("div", _hoisted_3$4, [
18860
+ createElementVNode("div", _hoisted_3$q, [
19376
18861
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(menuItem.children, (child, childIndex) => {
19377
18862
  var _a2;
19378
18863
  return openBlock(), createElementBlock("div", {
@@ -19403,127 +18888,38 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
19403
18888
  _: 2
19404
18889
  }, 1024))
19405
18890
  ]);
19406
- }), 64))
18891
+ }), 128))
19407
18892
  ]);
19408
18893
  };
19409
18894
  }
19410
18895
  });
19411
18896
  const svgArrow = "";
19412
- const _hoisted_1$4 = { class: "bg-white flex items-center rounded p-1 border drop-shadow space-x-0.5" };
19413
- const _hoisted_2$4 = ["title", "onClick"];
18897
+ const _hoisted_1$q = { class: "bg-white flex items-center rounded p-1 border drop-shadow space-x-0.5" };
18898
+ const _hoisted_2$q = ["title", "onClick"];
19414
18899
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19415
18900
  __name: "EditorBubbleMenu",
19416
18901
  props: {
19417
18902
  editor: {
19418
18903
  type: Object,
19419
18904
  required: true
18905
+ },
18906
+ menuItems: {
18907
+ type: Array,
18908
+ required: false,
18909
+ default: () => []
19420
18910
  }
19421
18911
  },
19422
18912
  setup(__props) {
19423
- const props = __props;
19424
- const menuItems = [
19425
- {
19426
- type: "button",
19427
- icon: MdiFormatBold,
19428
- title: "Bold",
19429
- action: () => props.editor.chain().focus().toggleBold().run(),
19430
- isActive: () => props.editor.isActive("bold")
19431
- },
19432
- {
19433
- type: "button",
19434
- icon: MdiFormatItalic,
19435
- title: "Italic",
19436
- action: () => props.editor.chain().focus().toggleItalic().run(),
19437
- isActive: () => props.editor.isActive("italic")
19438
- },
19439
- {
19440
- type: "button",
19441
- icon: MdiFormatUnderline,
19442
- title: "Underline",
19443
- action: () => props.editor.chain().focus().toggleUnderline().run(),
19444
- isActive: () => props.editor.isActive("underline")
19445
- },
19446
- {
19447
- type: "button",
19448
- icon: MdiFormatStrikethrough,
19449
- title: "Strike",
19450
- action: () => props.editor.chain().focus().toggleStrike().run(),
19451
- isActive: () => props.editor.isActive("strike")
19452
- },
19453
- {
19454
- type: "button",
19455
- icon: MdiFormatQuoteOpen,
19456
- title: "Quote",
19457
- action: () => props.editor.chain().focus().toggleBlockquote().run(),
19458
- isActive: () => props.editor.isActive("blockquote")
19459
- },
19460
- {
19461
- type: "button",
19462
- icon: MdiCodeTags,
19463
- title: "Code",
19464
- action: () => props.editor.chain().focus().toggleCode().run(),
19465
- isActive: () => props.editor.isActive("code")
19466
- },
19467
- {
19468
- type: "button",
19469
- icon: MdiCodeBracesBox,
19470
- title: "Code Block",
19471
- action: () => props.editor.chain().focus().toggleCodeBlock().run(),
19472
- isActive: () => props.editor.isActive("codeBlock")
19473
- },
19474
- {
19475
- type: "button",
19476
- icon: MdiFormatSuperscript,
19477
- title: "SuperScript",
19478
- action: () => props.editor.chain().focus().toggleSuperscript().run(),
19479
- isActive: () => props.editor.isActive("superscript")
19480
- },
19481
- {
19482
- type: "button",
19483
- icon: MdiFormatSubscript,
19484
- title: "SubScript",
19485
- action: () => props.editor.chain().focus().toggleSubscript().run(),
19486
- isActive: () => props.editor.isActive("subscript")
19487
- },
19488
- {
19489
- type: "button",
19490
- icon: MdiFormatAlignLeft,
19491
- title: "Align left",
19492
- action: () => props.editor.chain().focus().setTextAlign("left").run(),
19493
- isActive: () => props.editor.isActive({ textAlign: "left" })
19494
- },
19495
- {
19496
- type: "button",
19497
- icon: MdiFormatAlignCenter,
19498
- title: "Align center",
19499
- action: () => props.editor.chain().focus().setTextAlign("center").run(),
19500
- isActive: () => props.editor.isActive({ textAlign: "center" })
19501
- },
19502
- {
19503
- type: "button",
19504
- icon: MdiFormatAlignRight,
19505
- title: "Align right",
19506
- action: () => props.editor.chain().focus().setTextAlign("right").run(),
19507
- isActive: () => props.editor.isActive({ textAlign: "right" })
19508
- },
19509
- {
19510
- type: "button",
19511
- icon: MdiFormatAlignJustify,
19512
- title: "Align justify",
19513
- action: () => props.editor.chain().focus().setTextAlign("justify").run(),
19514
- isActive: () => props.editor.isActive({ textAlign: "justify" })
19515
- }
19516
- ];
19517
18913
  return (_ctx, _cache) => {
19518
18914
  return openBlock(), createBlock(unref(BubbleMenu), {
19519
18915
  editor: __props.editor,
19520
18916
  "tippy-options": { duration: 100, arrow: unref(ROUND_ARROW), maxWidth: "100%" }
19521
18917
  }, {
19522
18918
  default: withCtx(() => [
19523
- createElementVNode("div", _hoisted_1$4, [
19524
- (openBlock(), createElementBlock(Fragment$1, null, renderList(menuItems, (menuItem, index2) => {
18919
+ createElementVNode("div", _hoisted_1$q, [
18920
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.menuItems, (menuItem, index2) => {
19525
18921
  var _a;
19526
- return createElementVNode("button", {
18922
+ return openBlock(), createElementBlock("button", {
19527
18923
  key: index2,
19528
18924
  class: normalizeClass([{ "bg-gray-200 !text-black": (_a = menuItem.isActive) == null ? void 0 : _a.call(menuItem) }, "text-gray-600 text-lg hover:bg-gray-100 p-0.5 rounded-sm"]),
19529
18925
  title: menuItem.title,
@@ -19533,8 +18929,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19533
18929
  }
19534
18930
  }, [
19535
18931
  (openBlock(), createBlock(resolveDynamicComponent(menuItem.icon)))
19536
- ], 10, _hoisted_2$4);
19537
- }), 64))
18932
+ ], 10, _hoisted_2$q);
18933
+ }), 128))
19538
18934
  ])
19539
18935
  ]),
19540
18936
  _: 1
@@ -19542,12 +18938,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19542
18938
  };
19543
18939
  }
19544
18940
  });
19545
- const _hoisted_1$3 = {
18941
+ const _hoisted_1$p = {
19546
18942
  key: 0,
19547
18943
  class: "halo-rich-text-editor"
19548
18944
  };
19549
- const _hoisted_2$3 = { class: "h-full flex flex-row w-full" };
19550
- const _hoisted_3$3 = { class: "h-full" };
18945
+ const _hoisted_2$p = { class: "h-full flex flex-row w-full" };
18946
+ const _hoisted_3$p = { class: "h-full" };
19551
18947
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
19552
18948
  __name: "Editor",
19553
18949
  props: {
@@ -19555,7 +18951,17 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
19555
18951
  type: Object,
19556
18952
  required: true
19557
18953
  },
19558
- addtionalMenuItems: {
18954
+ additionalMenuItems: {
18955
+ type: Array,
18956
+ required: false,
18957
+ default: () => []
18958
+ },
18959
+ toolbarMenuItems: {
18960
+ type: Array,
18961
+ required: false,
18962
+ default: () => []
18963
+ },
18964
+ bubbleMenuItems: {
19559
18965
  type: Array,
19560
18966
  required: false,
19561
18967
  default: () => []
@@ -19563,18 +18969,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
19563
18969
  },
19564
18970
  setup(__props) {
19565
18971
  return (_ctx, _cache) => {
19566
- return __props.editor ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
19567
- createVNode(_sfc_main$4, { editor: __props.editor }, null, 8, ["editor"]),
19568
- createVNode(_sfc_main$5, {
18972
+ return __props.editor ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
18973
+ createVNode(_sfc_main$4, {
19569
18974
  editor: __props.editor,
19570
- addtionalMenuItems: __props.addtionalMenuItems
19571
- }, null, 8, ["editor", "addtionalMenuItems"]),
19572
- createElementVNode("div", _hoisted_2$3, [
18975
+ "menu-items": __props.bubbleMenuItems
18976
+ }, null, 8, ["editor", "menu-items"]),
18977
+ createVNode(_sfc_main$5, { "menu-items": __props.toolbarMenuItems }, null, 8, ["menu-items"]),
18978
+ createElementVNode("div", _hoisted_2$p, [
19573
18979
  createVNode(unref(EditorContent), {
19574
18980
  editor: __props.editor,
19575
- class: "editor-content markdown-body"
18981
+ class: "editor-content prose prose-base !max-w-none prose-pre:p-0"
19576
18982
  }, null, 8, ["editor"]),
19577
- createElementVNode("div", _hoisted_3$3, [
18983
+ createElementVNode("div", _hoisted_3$p, [
19578
18984
  renderSlot(_ctx.$slots, "extra")
19579
18985
  ])
19580
18986
  ])
@@ -19585,7 +18991,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
19585
18991
  const index = "";
19586
18992
  const tailwind = "";
19587
18993
  const style = "";
19588
- const githubMarkdownLight = "";
19589
18994
  const inputRegex$6 = /^\s*>\s$/;
19590
18995
  const Blockquote = Node.create({
19591
18996
  name: "blockquote",
@@ -26836,9 +26241,9 @@ const ExtensionCommands = Extension.create({
26836
26241
  ];
26837
26242
  }
26838
26243
  });
26839
- const _hoisted_1$2 = { class: "command-items" };
26840
- const _hoisted_2$2 = ["onClick"];
26841
- const _hoisted_3$2 = { class: "command-title" };
26244
+ const _hoisted_1$o = { class: "command-items" };
26245
+ const _hoisted_2$o = ["id", "onClick"];
26246
+ const _hoisted_3$o = { class: "command-title" };
26842
26247
  const _hoisted_4 = {
26843
26248
  key: 1,
26844
26249
  class: "command-empty"
@@ -26885,9 +26290,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
26885
26290
  }
26886
26291
  function handleKeyUp() {
26887
26292
  selectedIndex.value = (selectedIndex.value + props.items.length - 1) % props.items.length;
26293
+ scrollToSelected();
26888
26294
  }
26889
26295
  function handleKeyDown2() {
26890
26296
  selectedIndex.value = (selectedIndex.value + 1) % props.items.length;
26297
+ scrollToSelected();
26891
26298
  }
26892
26299
  function handleKeyEnter() {
26893
26300
  handleSelectItem(selectedIndex.value);
@@ -26898,27 +26305,206 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
26898
26305
  props.command(item);
26899
26306
  }
26900
26307
  }
26308
+ function scrollToSelected() {
26309
+ const selected = document.getElementById(
26310
+ `command-item-${selectedIndex.value}`
26311
+ );
26312
+ if (selected) {
26313
+ selected.scrollIntoView({
26314
+ behavior: "smooth"
26315
+ });
26316
+ }
26317
+ }
26901
26318
  expose({
26902
26319
  onKeyDown
26903
26320
  });
26904
26321
  return (_ctx, _cache) => {
26905
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
26322
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
26906
26323
  __props.items.length ? (openBlock(true), createElementBlock(Fragment$1, { key: 0 }, renderList(__props.items, (item, index2) => {
26907
26324
  return openBlock(), createElementBlock("div", {
26908
26325
  key: index2,
26326
+ id: `command-item-${index2}`,
26909
26327
  class: normalizeClass([{ "is-selected": index2 === selectedIndex.value }, "command-item"]),
26910
26328
  onClick: ($event) => handleSelectItem(index2)
26911
26329
  }, [
26912
26330
  (openBlock(), createBlock(resolveDynamicComponent(item.icon), { class: "command-icon" })),
26913
- createElementVNode("span", _hoisted_3$2, toDisplayString(item.title), 1)
26914
- ], 10, _hoisted_2$2);
26331
+ createElementVNode("span", _hoisted_3$o, toDisplayString(item.title), 1)
26332
+ ], 10, _hoisted_2$o);
26915
26333
  }), 128)) : (openBlock(), createElementBlock("div", _hoisted_4, _hoisted_6))
26916
26334
  ]);
26917
26335
  };
26918
26336
  }
26919
26337
  });
26920
26338
  const CommandsView_vue_vue_type_style_index_0_lang = "";
26921
- const CommandsSuggestion = {
26339
+ const _hoisted_1$n = {
26340
+ viewBox: "0 0 24 24",
26341
+ width: "1.2em",
26342
+ height: "1.2em"
26343
+ };
26344
+ const _hoisted_2$n = /* @__PURE__ */ createElementVNode("path", {
26345
+ fill: "currentColor",
26346
+ d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m11 14v-2h2V6.31l-2.5 1.44V5.44L16 4h2v12h2v2h-6Z"
26347
+ }, null, -1);
26348
+ const _hoisted_3$n = [
26349
+ _hoisted_2$n
26350
+ ];
26351
+ function render$m(_ctx, _cache) {
26352
+ return openBlock(), createElementBlock("svg", _hoisted_1$n, _hoisted_3$n);
26353
+ }
26354
+ const MdiFormatHeader1 = { name: "mdi-format-header-1", render: render$m };
26355
+ const _hoisted_1$m = {
26356
+ viewBox: "0 0 24 24",
26357
+ width: "1.2em",
26358
+ height: "1.2em"
26359
+ };
26360
+ const _hoisted_2$m = /* @__PURE__ */ createElementVNode("path", {
26361
+ fill: "currentColor",
26362
+ d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m18 14h-6a2 2 0 0 1-2-2c0-.53.2-1 .54-1.36l4.87-5.23c.37-.36.59-.86.59-1.41a2 2 0 0 0-2-2a2 2 0 0 0-2 2h-2a4 4 0 0 1 4-4a4 4 0 0 1 4 4c0 1.1-.45 2.1-1.17 2.83L15 16h6v2Z"
26363
+ }, null, -1);
26364
+ const _hoisted_3$m = [
26365
+ _hoisted_2$m
26366
+ ];
26367
+ function render$l(_ctx, _cache) {
26368
+ return openBlock(), createElementBlock("svg", _hoisted_1$m, _hoisted_3$m);
26369
+ }
26370
+ const MdiFormatHeader2 = { name: "mdi-format-header-2", render: render$l };
26371
+ const _hoisted_1$l = {
26372
+ viewBox: "0 0 24 24",
26373
+ width: "1.2em",
26374
+ height: "1.2em"
26375
+ };
26376
+ const _hoisted_2$l = /* @__PURE__ */ createElementVNode("path", {
26377
+ fill: "currentColor",
26378
+ d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m12 0h4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-1h2v1h4v-4h-4v-2h4V6h-4v1h-2V6a2 2 0 0 1 2-2Z"
26379
+ }, null, -1);
26380
+ const _hoisted_3$l = [
26381
+ _hoisted_2$l
26382
+ ];
26383
+ function render$k(_ctx, _cache) {
26384
+ return openBlock(), createElementBlock("svg", _hoisted_1$l, _hoisted_3$l);
26385
+ }
26386
+ const MdiFormatHeader3 = { name: "mdi-format-header-3", render: render$k };
26387
+ const _hoisted_1$k = {
26388
+ viewBox: "0 0 24 24",
26389
+ width: "1.2em",
26390
+ height: "1.2em"
26391
+ };
26392
+ const _hoisted_2$k = /* @__PURE__ */ createElementVNode("path", {
26393
+ fill: "currentColor",
26394
+ d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m15 14v-5h-5v-2l5-7h2v7h1v2h-1v5h-2m0-7V7.42L15.45 11H18Z"
26395
+ }, null, -1);
26396
+ const _hoisted_3$k = [
26397
+ _hoisted_2$k
26398
+ ];
26399
+ function render$j(_ctx, _cache) {
26400
+ return openBlock(), createElementBlock("svg", _hoisted_1$k, _hoisted_3$k);
26401
+ }
26402
+ const MdiFormatHeader4 = { name: "mdi-format-header-4", render: render$j };
26403
+ const _hoisted_1$j = {
26404
+ viewBox: "0 0 24 24",
26405
+ width: "1.2em",
26406
+ height: "1.2em"
26407
+ };
26408
+ const _hoisted_2$j = /* @__PURE__ */ createElementVNode("path", {
26409
+ fill: "currentColor",
26410
+ d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m12 0h5v2h-5v4h2a4 4 0 0 1 4 4a4 4 0 0 1-4 4h-2a2 2 0 0 1-2-2v-1h2v1h2a2 2 0 0 0 2-2a2 2 0 0 0-2-2h-2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z"
26411
+ }, null, -1);
26412
+ const _hoisted_3$j = [
26413
+ _hoisted_2$j
26414
+ ];
26415
+ function render$i(_ctx, _cache) {
26416
+ return openBlock(), createElementBlock("svg", _hoisted_1$j, _hoisted_3$j);
26417
+ }
26418
+ const MdiFormatHeader5 = { name: "mdi-format-header-5", render: render$i };
26419
+ const _hoisted_1$i = {
26420
+ viewBox: "0 0 24 24",
26421
+ width: "1.2em",
26422
+ height: "1.2em"
26423
+ };
26424
+ const _hoisted_2$i = /* @__PURE__ */ createElementVNode("path", {
26425
+ fill: "currentColor",
26426
+ d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m12 0h4a2 2 0 0 1 2 2v1h-2V6h-4v4h4a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 8v4h4v-4h-4Z"
26427
+ }, null, -1);
26428
+ const _hoisted_3$i = [
26429
+ _hoisted_2$i
26430
+ ];
26431
+ function render$h(_ctx, _cache) {
26432
+ return openBlock(), createElementBlock("svg", _hoisted_1$i, _hoisted_3$i);
26433
+ }
26434
+ const MdiFormatHeader6 = { name: "mdi-format-header-6", render: render$h };
26435
+ const _hoisted_1$h = {
26436
+ viewBox: "0 0 24 24",
26437
+ width: "1.2em",
26438
+ height: "1.2em"
26439
+ };
26440
+ const _hoisted_2$h = /* @__PURE__ */ createElementVNode("path", {
26441
+ fill: "currentColor",
26442
+ d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-8 5H9v2c0 1.1-.9 2-2 2c1.1 0 2 .9 2 2v2h2v2H9c-1.1 0-2-.9-2-2v-1c0-1.1-.9-2-2-2v-2c1.1 0 2-.9 2-2V8c0-1.1.9-2 2-2h2v2m8 5c-1.1 0-2 .9-2 2v1c0 1.1-.9 2-2 2h-2v-2h2v-2c0-1.1.9-2 2-2c-1.1 0-2-.9-2-2V8h-2V6h2c1.1 0 2 .9 2 2v1c0 1.1.9 2 2 2v2Z"
26443
+ }, null, -1);
26444
+ const _hoisted_3$h = [
26445
+ _hoisted_2$h
26446
+ ];
26447
+ function render$g(_ctx, _cache) {
26448
+ return openBlock(), createElementBlock("svg", _hoisted_1$h, _hoisted_3$h);
26449
+ }
26450
+ const MdiCodeBracesBox = { name: "mdi-code-braces-box", render: render$g };
26451
+ const CommandHeader1 = {
26452
+ icon: markRaw(MdiFormatHeader1),
26453
+ title: "\u4E00\u7EA7\u6807\u9898",
26454
+ keywords: ["h1", "header1", "1", "yijibiaoti"],
26455
+ command: ({ editor, range }) => {
26456
+ editor.chain().focus().deleteRange(range).setNode("heading", { level: 1 }).run();
26457
+ }
26458
+ };
26459
+ const CommandHeader2 = {
26460
+ icon: markRaw(MdiFormatHeader2),
26461
+ title: "\u4E8C\u7EA7\u6807\u9898",
26462
+ keywords: ["h2", "header2", "2", "erjibiaoti"],
26463
+ command: ({ editor, range }) => {
26464
+ editor.chain().focus().deleteRange(range).setNode("heading", { level: 2 }).run();
26465
+ }
26466
+ };
26467
+ const CommandHeader3 = {
26468
+ icon: markRaw(MdiFormatHeader3),
26469
+ title: "\u4E09\u7EA7\u6807\u9898",
26470
+ keywords: ["h3", "header3", "3", "sanjibiaoti"],
26471
+ command: ({ editor, range }) => {
26472
+ editor.chain().focus().deleteRange(range).setNode("heading", { level: 3 }).run();
26473
+ }
26474
+ };
26475
+ const CommandHeader4 = {
26476
+ icon: markRaw(MdiFormatHeader4),
26477
+ title: "\u56DB\u7EA7\u6807\u9898",
26478
+ keywords: ["h4", "header4", "4", "sijibiaoti"],
26479
+ command: ({ editor, range }) => {
26480
+ editor.chain().focus().deleteRange(range).setNode("heading", { level: 4 }).run();
26481
+ }
26482
+ };
26483
+ const CommandHeader5 = {
26484
+ icon: markRaw(MdiFormatHeader5),
26485
+ title: "\u4E94\u7EA7\u6807\u9898",
26486
+ keywords: ["h5", "header5", "5", "wujibiaoti"],
26487
+ command: ({ editor, range }) => {
26488
+ editor.chain().focus().deleteRange(range).setNode("heading", { level: 5 }).run();
26489
+ }
26490
+ };
26491
+ const CommandHeader6 = {
26492
+ icon: markRaw(MdiFormatHeader6),
26493
+ title: "\u516D\u7EA7\u6807\u9898",
26494
+ keywords: ["h6", "header6", "6", "liujibiaoti"],
26495
+ command: ({ editor, range }) => {
26496
+ editor.chain().focus().deleteRange(range).setNode("heading", { level: 6 }).run();
26497
+ }
26498
+ };
26499
+ const CommandCodeBlock = {
26500
+ icon: markRaw(MdiCodeBracesBox),
26501
+ title: "\u4EE3\u7801\u5757",
26502
+ keywords: ["codeblock", "daimakuai"],
26503
+ command: ({ editor, range }) => {
26504
+ editor.chain().focus().deleteRange(range).setCodeBlock().run();
26505
+ }
26506
+ };
26507
+ const suggestion = {
26922
26508
  items: ({ query }) => {
26923
26509
  return [
26924
26510
  {
@@ -75085,9 +74671,9 @@ lowlight$1.registerLanguage("xl", xl);
75085
74671
  lowlight$1.registerLanguage("xquery", xquery);
75086
74672
  lowlight$1.registerLanguage("zephir", zephir);
75087
74673
  const lowlight = lowlight$1;
75088
- const _hoisted_1$1 = { class: "py-0.5 px-1" };
75089
- const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("option", { value: null }, "auto", -1);
75090
- const _hoisted_3$1 = ["value"];
74674
+ const _hoisted_1$g = { class: "py-0.5 px-1" };
74675
+ const _hoisted_2$g = /* @__PURE__ */ createElementVNode("option", { value: null }, "auto", -1);
74676
+ const _hoisted_3$g = ["value"];
75091
74677
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
75092
74678
  __name: "CodeBlockViewRenderer",
75093
74679
  props: nodeViewProps,
@@ -75108,17 +74694,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
75108
74694
  return (_ctx, _cache) => {
75109
74695
  return openBlock(), createBlock(unref(NodeViewWrapper), { class: "code-block divide-gray-100 bg-gray-100 rounded-sm overflow-hidden" }, {
75110
74696
  default: withCtx(() => [
75111
- createElementVNode("div", _hoisted_1$1, [
74697
+ createElementVNode("div", _hoisted_1$g, [
75112
74698
  withDirectives(createElementVNode("select", {
75113
74699
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(selectedLanguage) ? selectedLanguage.value = $event : null),
75114
74700
  contenteditable: "false"
75115
74701
  }, [
75116
- _hoisted_2$1,
74702
+ _hoisted_2$g,
75117
74703
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(languages), (language, index2) => {
75118
74704
  return openBlock(), createElementBlock("option", {
75119
74705
  key: index2,
75120
74706
  value: language
75121
- }, toDisplayString(language), 9, _hoisted_3$1);
74707
+ }, toDisplayString(language), 9, _hoisted_3$g);
75122
74708
  }), 128))
75123
74709
  ], 512), [
75124
74710
  [vModelSelect, unref(selectedLanguage)]
@@ -82884,6 +82470,11 @@ function getHLines(parser) {
82884
82470
  var hlineInfo = [];
82885
82471
  parser.consumeSpaces();
82886
82472
  var nxt = parser.fetch().text;
82473
+ if (nxt === "\\relax") {
82474
+ parser.consume();
82475
+ parser.consumeSpaces();
82476
+ nxt = parser.fetch().text;
82477
+ }
82887
82478
  while (nxt === "\\hline" || nxt === "\\hdashline") {
82888
82479
  parser.consume();
82889
82480
  hlineInfo.push(nxt === "\\hdashline");
@@ -88704,7 +88295,7 @@ var parseTree = function parseTree2(toParse, settings) {
88704
88295
  }
88705
88296
  return tree;
88706
88297
  };
88707
- var render = function render2(expression, baseNode, options) {
88298
+ var render$f = function render(expression, baseNode, options) {
88708
88299
  baseNode.textContent = "";
88709
88300
  var node = renderToDomTree(expression, options).toNode();
88710
88301
  baseNode.appendChild(node);
@@ -88712,7 +88303,7 @@ var render = function render2(expression, baseNode, options) {
88712
88303
  if (typeof document !== "undefined") {
88713
88304
  if (document.compatMode !== "CSS1Compat") {
88714
88305
  typeof console !== "undefined" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.");
88715
- render = function render3() {
88306
+ render$f = function render3() {
88716
88307
  throw new ParseError("KaTeX doesn't work in quirks mode.");
88717
88308
  };
88718
88309
  }
@@ -88753,8 +88344,8 @@ var renderToHTMLTree = function renderToHTMLTree2(expression, options) {
88753
88344
  }
88754
88345
  };
88755
88346
  var katex = {
88756
- version: "0.16.2",
88757
- render,
88347
+ version: "0.16.3",
88348
+ render: render$f,
88758
88349
  renderToString,
88759
88350
  ParseError,
88760
88351
  SETTINGS_SCHEMA,
@@ -88773,9 +88364,9 @@ var katex = {
88773
88364
  LineNode
88774
88365
  }
88775
88366
  };
88776
- const _hoisted_1 = { class: "" };
88777
- const _hoisted_2 = { class: "" };
88778
- const _hoisted_3 = ["innerHTML"];
88367
+ const _hoisted_1$f = { class: "" };
88368
+ const _hoisted_2$f = { class: "" };
88369
+ const _hoisted_3$f = ["innerHTML"];
88779
88370
  const _sfc_main = /* @__PURE__ */ defineComponent({
88780
88371
  __name: "KatexBlockViewRenderer",
88781
88372
  props: nodeViewProps,
@@ -88804,8 +88395,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
88804
88395
  return (_ctx, _cache) => {
88805
88396
  return openBlock(), createBlock(unref(NodeViewWrapper), { class: "bg-gray-100 p-4" }, {
88806
88397
  default: withCtx(() => [
88807
- createElementVNode("div", _hoisted_1, [
88808
- createElementVNode("div", _hoisted_2, [
88398
+ createElementVNode("div", _hoisted_1$f, [
88399
+ createElementVNode("div", _hoisted_2$f, [
88809
88400
  createElementVNode("button", {
88810
88401
  onClick: _cache[0] || (_cache[0] = withModifiers(
88811
88402
  (...args) => _ctx.deleteNode && _ctx.deleteNode(...args),
@@ -88820,7 +88411,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
88820
88411
  }, null, 512), [
88821
88412
  [vModelText, rawText.value]
88822
88413
  ]),
88823
- createElementVNode("div", { innerHTML: unref(renderedKatex) }, null, 8, _hoisted_3)
88414
+ createElementVNode("div", { innerHTML: unref(renderedKatex) }, null, 8, _hoisted_3$f)
88824
88415
  ])
88825
88416
  ]),
88826
88417
  _: 1
@@ -88898,6 +88489,7 @@ const allExtensions = [
88898
88489
  Strike,
88899
88490
  Text$1,
88900
88491
  Image.configure({
88492
+ inline: true,
88901
88493
  HTMLAttributes: {
88902
88494
  loading: "lazy"
88903
88495
  }
@@ -88924,22 +88516,463 @@ const allExtensions = [
88924
88516
  placeholder: "\u8F93\u5165 / \u4EE5\u9009\u62E9\u8F93\u5165\u7C7B\u578B"
88925
88517
  }),
88926
88518
  ExtensionCommands.configure({
88927
- suggestion: CommandsSuggestion
88519
+ suggestion: {}
88928
88520
  }),
88929
88521
  ExtensionCodeBlock.configure({
88930
88522
  lowlight
88931
88523
  }),
88932
88524
  KatexBlock
88933
88525
  ];
88526
+ const _hoisted_1$e = {
88527
+ viewBox: "0 0 24 24",
88528
+ width: "1.2em",
88529
+ height: "1.2em"
88530
+ };
88531
+ const _hoisted_2$e = /* @__PURE__ */ createElementVNode("path", {
88532
+ fill: "currentColor",
88533
+ d: "M13.5 15.5H10v-3h3.5A1.5 1.5 0 0 1 15 14a1.5 1.5 0 0 1-1.5 1.5m-3.5-9h3A1.5 1.5 0 0 1 14.5 8A1.5 1.5 0 0 1 13 9.5h-3m5.6 1.29c.97-.68 1.65-1.79 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.1 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42Z"
88534
+ }, null, -1);
88535
+ const _hoisted_3$e = [
88536
+ _hoisted_2$e
88537
+ ];
88538
+ function render$e(_ctx, _cache) {
88539
+ return openBlock(), createElementBlock("svg", _hoisted_1$e, _hoisted_3$e);
88540
+ }
88541
+ const MdiFormatBold = { name: "mdi-format-bold", render: render$e };
88542
+ const _hoisted_1$d = {
88543
+ viewBox: "0 0 24 24",
88544
+ width: "1.2em",
88545
+ height: "1.2em"
88546
+ };
88547
+ const _hoisted_2$d = /* @__PURE__ */ createElementVNode("path", {
88548
+ fill: "currentColor",
88549
+ d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4h-8Z"
88550
+ }, null, -1);
88551
+ const _hoisted_3$d = [
88552
+ _hoisted_2$d
88553
+ ];
88554
+ function render$d(_ctx, _cache) {
88555
+ return openBlock(), createElementBlock("svg", _hoisted_1$d, _hoisted_3$d);
88556
+ }
88557
+ const MdiFormatItalic = { name: "mdi-format-italic", render: render$d };
88558
+ const _hoisted_1$c = {
88559
+ viewBox: "0 0 24 24",
88560
+ width: "1.2em",
88561
+ height: "1.2em"
88562
+ };
88563
+ const _hoisted_2$c = /* @__PURE__ */ createElementVNode("path", {
88564
+ fill: "currentColor",
88565
+ d: "M3 14h18v-2H3m2-8v3h5v3h4V7h5V4m-9 15h4v-3h-4v3Z"
88566
+ }, null, -1);
88567
+ const _hoisted_3$c = [
88568
+ _hoisted_2$c
88569
+ ];
88570
+ function render$c(_ctx, _cache) {
88571
+ return openBlock(), createElementBlock("svg", _hoisted_1$c, _hoisted_3$c);
88572
+ }
88573
+ const MdiFormatStrikethrough = { name: "mdi-format-strikethrough", render: render$c };
88574
+ const _hoisted_1$b = {
88575
+ viewBox: "0 0 24 24",
88576
+ width: "1.2em",
88577
+ height: "1.2em"
88578
+ };
88579
+ const _hoisted_2$b = /* @__PURE__ */ createElementVNode("path", {
88580
+ fill: "currentColor",
88581
+ d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m10 4h2.31l.32-3h2l-.32 3h2l.32-3h2l-.32 3H23v2h-1.9l-.2 2H23v2h-2.31l-.32 3h-2l.32-3h-2l-.32 3h-2l.32-3H13v-2h1.9l.2-2H13V8m4.1 2l-.2 2h2l.2-2h-2Z"
88582
+ }, null, -1);
88583
+ const _hoisted_3$b = [
88584
+ _hoisted_2$b
88585
+ ];
88586
+ function render$b(_ctx, _cache) {
88587
+ return openBlock(), createElementBlock("svg", _hoisted_1$b, _hoisted_3$b);
88588
+ }
88589
+ const MdiFormatHeaderPound = { name: "mdi-format-header-pound", render: render$b };
88590
+ const _hoisted_1$a = {
88591
+ viewBox: "0 0 24 24",
88592
+ width: "1.2em",
88593
+ height: "1.2em"
88594
+ };
88595
+ const _hoisted_2$a = /* @__PURE__ */ createElementVNode("path", {
88596
+ fill: "currentColor",
88597
+ d: "M13.5 7a6.5 6.5 0 0 1 6.5 6.5a6.5 6.5 0 0 1-6.5 6.5H10v-2h3.5c2.5 0 4.5-2 4.5-4.5S16 9 13.5 9H7.83l3.08 3.09L9.5 13.5L4 8l5.5-5.5l1.42 1.41L7.83 7h5.67M6 18h2v2H6v-2Z"
88598
+ }, null, -1);
88599
+ const _hoisted_3$a = [
88600
+ _hoisted_2$a
88601
+ ];
88602
+ function render$a(_ctx, _cache) {
88603
+ return openBlock(), createElementBlock("svg", _hoisted_1$a, _hoisted_3$a);
88604
+ }
88605
+ const MdiUndoVariant = { name: "mdi-undo-variant", render: render$a };
88606
+ const _hoisted_1$9 = {
88607
+ viewBox: "0 0 24 24",
88608
+ width: "1.2em",
88609
+ height: "1.2em"
88610
+ };
88611
+ const _hoisted_2$9 = /* @__PURE__ */ createElementVNode("path", {
88612
+ fill: "currentColor",
88613
+ d: "M10.5 7A6.5 6.5 0 0 0 4 13.5a6.5 6.5 0 0 0 6.5 6.5H14v-2h-3.5C8 18 6 16 6 13.5S8 9 10.5 9h5.67l-3.08 3.09l1.41 1.41L20 8l-5.5-5.5l-1.42 1.41L16.17 7H10.5M18 18h-2v2h2v-2Z"
88614
+ }, null, -1);
88615
+ const _hoisted_3$9 = [
88616
+ _hoisted_2$9
88617
+ ];
88618
+ function render$9(_ctx, _cache) {
88619
+ return openBlock(), createElementBlock("svg", _hoisted_1$9, _hoisted_3$9);
88620
+ }
88621
+ const MdiRedoVariant = { name: "mdi-redo-variant", render: render$9 };
88622
+ const _hoisted_1$8 = {
88623
+ viewBox: "0 0 24 24",
88624
+ width: "1.2em",
88625
+ height: "1.2em"
88626
+ };
88627
+ const _hoisted_2$8 = /* @__PURE__ */ createElementVNode("path", {
88628
+ fill: "currentColor",
88629
+ d: "M5 21h14v-2H5v2m7-4a6 6 0 0 0 6-6V3h-2.5v8a3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 8.5 11V3H6v8a6 6 0 0 0 6 6Z"
88630
+ }, null, -1);
88631
+ const _hoisted_3$8 = [
88632
+ _hoisted_2$8
88633
+ ];
88634
+ function render$8(_ctx, _cache) {
88635
+ return openBlock(), createElementBlock("svg", _hoisted_1$8, _hoisted_3$8);
88636
+ }
88637
+ const MdiFormatUnderline = { name: "mdi-format-underline", render: render$8 };
88638
+ const _hoisted_1$7 = {
88639
+ viewBox: "0 0 24 24",
88640
+ width: "1.2em",
88641
+ height: "1.2em"
88642
+ };
88643
+ const _hoisted_2$7 = /* @__PURE__ */ createElementVNode("path", {
88644
+ fill: "currentColor",
88645
+ d: "M3 3h18v2H3V3m0 4h12v2H3V7m0 4h18v2H3v-2m0 4h12v2H3v-2m0 4h18v2H3v-2Z"
88646
+ }, null, -1);
88647
+ const _hoisted_3$7 = [
88648
+ _hoisted_2$7
88649
+ ];
88650
+ function render$7(_ctx, _cache) {
88651
+ return openBlock(), createElementBlock("svg", _hoisted_1$7, _hoisted_3$7);
88652
+ }
88653
+ const MdiFormatAlignLeft = { name: "mdi-format-align-left", render: render$7 };
88654
+ const _hoisted_1$6 = {
88655
+ viewBox: "0 0 24 24",
88656
+ width: "1.2em",
88657
+ height: "1.2em"
88658
+ };
88659
+ const _hoisted_2$6 = /* @__PURE__ */ createElementVNode("path", {
88660
+ fill: "currentColor",
88661
+ d: "M3 3h18v2H3V3m4 4h10v2H7V7m-4 4h18v2H3v-2m4 4h10v2H7v-2m-4 4h18v2H3v-2Z"
88662
+ }, null, -1);
88663
+ const _hoisted_3$6 = [
88664
+ _hoisted_2$6
88665
+ ];
88666
+ function render$6(_ctx, _cache) {
88667
+ return openBlock(), createElementBlock("svg", _hoisted_1$6, _hoisted_3$6);
88668
+ }
88669
+ const MdiFormatAlignCenter = { name: "mdi-format-align-center", render: render$6 };
88670
+ const _hoisted_1$5 = {
88671
+ viewBox: "0 0 24 24",
88672
+ width: "1.2em",
88673
+ height: "1.2em"
88674
+ };
88675
+ const _hoisted_2$5 = /* @__PURE__ */ createElementVNode("path", {
88676
+ fill: "currentColor",
88677
+ d: "M3 3h18v2H3V3m6 4h12v2H9V7m-6 4h18v2H3v-2m6 4h12v2H9v-2m-6 4h18v2H3v-2Z"
88678
+ }, null, -1);
88679
+ const _hoisted_3$5 = [
88680
+ _hoisted_2$5
88681
+ ];
88682
+ function render$5(_ctx, _cache) {
88683
+ return openBlock(), createElementBlock("svg", _hoisted_1$5, _hoisted_3$5);
88684
+ }
88685
+ const MdiFormatAlignRight = { name: "mdi-format-align-right", render: render$5 };
88686
+ const _hoisted_1$4 = {
88687
+ viewBox: "0 0 24 24",
88688
+ width: "1.2em",
88689
+ height: "1.2em"
88690
+ };
88691
+ const _hoisted_2$4 = /* @__PURE__ */ createElementVNode("path", {
88692
+ fill: "currentColor",
88693
+ d: "M3 3h18v2H3V3m0 4h18v2H3V7m0 4h18v2H3v-2m0 4h18v2H3v-2m0 4h18v2H3v-2Z"
88694
+ }, null, -1);
88695
+ const _hoisted_3$4 = [
88696
+ _hoisted_2$4
88697
+ ];
88698
+ function render$4(_ctx, _cache) {
88699
+ return openBlock(), createElementBlock("svg", _hoisted_1$4, _hoisted_3$4);
88700
+ }
88701
+ const MdiFormatAlignJustify = { name: "mdi-format-align-justify", render: render$4 };
88702
+ const _hoisted_1$3 = {
88703
+ viewBox: "0 0 24 24",
88704
+ width: "1.2em",
88705
+ height: "1.2em"
88706
+ };
88707
+ const _hoisted_2$3 = /* @__PURE__ */ createElementVNode("path", {
88708
+ fill: "currentColor",
88709
+ d: "m10 7l-2 4h3v6H5v-6l2-4h3m8 0l-2 4h3v6h-6v-6l2-4h3Z"
88710
+ }, null, -1);
88711
+ const _hoisted_3$3 = [
88712
+ _hoisted_2$3
88713
+ ];
88714
+ function render$3(_ctx, _cache) {
88715
+ return openBlock(), createElementBlock("svg", _hoisted_1$3, _hoisted_3$3);
88716
+ }
88717
+ const MdiFormatQuoteOpen = { name: "mdi-format-quote-open", render: render$3 };
88718
+ const _hoisted_1$2 = {
88719
+ viewBox: "0 0 24 24",
88720
+ width: "1.2em",
88721
+ height: "1.2em"
88722
+ };
88723
+ const _hoisted_2$2 = /* @__PURE__ */ createElementVNode("path", {
88724
+ fill: "currentColor",
88725
+ d: "m14.6 16.6l4.6-4.6l-4.6-4.6L16 6l6 6l-6 6l-1.4-1.4m-5.2 0L4.8 12l4.6-4.6L8 6l-6 6l6 6l1.4-1.4Z"
88726
+ }, null, -1);
88727
+ const _hoisted_3$2 = [
88728
+ _hoisted_2$2
88729
+ ];
88730
+ function render$2(_ctx, _cache) {
88731
+ return openBlock(), createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
88732
+ }
88733
+ const MdiCodeTags = { name: "mdi-code-tags", render: render$2 };
88734
+ const _hoisted_1$1 = {
88735
+ viewBox: "0 0 24 24",
88736
+ width: "1.2em",
88737
+ height: "1.2em"
88738
+ };
88739
+ const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("path", {
88740
+ fill: "currentColor",
88741
+ d: "M16 7.41L11.41 12L16 16.59L14.59 18L10 13.41L5.41 18L4 16.59L8.59 12L4 7.41L5.41 6L10 10.59L14.59 6L16 7.41M21.85 9h-4.88V8l.89-.82c.76-.64 1.32-1.18 1.7-1.63c.37-.44.56-.85.57-1.23a.884.884 0 0 0-.27-.7c-.18-.19-.47-.28-.86-.29c-.31.01-.58.07-.84.17l-.66.39l-.45-1.17c.27-.22.59-.39.98-.53S18.85 2 19.32 2c.78 0 1.38.2 1.78.61c.4.39.62.93.62 1.57c-.01.56-.19 1.08-.54 1.55c-.34.48-.76.93-1.27 1.36l-.64.52v.02h2.58V9Z"
88742
+ }, null, -1);
88743
+ const _hoisted_3$1 = [
88744
+ _hoisted_2$1
88745
+ ];
88746
+ function render$1(_ctx, _cache) {
88747
+ return openBlock(), createElementBlock("svg", _hoisted_1$1, _hoisted_3$1);
88748
+ }
88749
+ const MdiFormatSuperscript = { name: "mdi-format-superscript", render: render$1 };
88750
+ const _hoisted_1 = {
88751
+ viewBox: "0 0 24 24",
88752
+ width: "1.2em",
88753
+ height: "1.2em"
88754
+ };
88755
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", {
88756
+ fill: "currentColor",
88757
+ d: "M16 7.41L11.41 12L16 16.59L14.59 18L10 13.41L5.41 18L4 16.59L8.59 12L4 7.41L5.41 6L10 10.59L14.59 6L16 7.41m5.85 13.62h-4.88v-1l.89-.8c.76-.65 1.32-1.19 1.7-1.63c.37-.44.56-.85.57-1.24a.898.898 0 0 0-.27-.7c-.18-.16-.47-.28-.86-.28c-.31 0-.58.06-.84.18l-.66.38l-.45-1.17c.27-.21.59-.39.98-.53s.82-.24 1.29-.24c.78.04 1.38.25 1.78.66c.4.41.62.93.62 1.57c-.01.56-.19 1.08-.54 1.55c-.34.47-.76.92-1.27 1.36l-.64.52v.02h2.58v1.35Z"
88758
+ }, null, -1);
88759
+ const _hoisted_3 = [
88760
+ _hoisted_2
88761
+ ];
88762
+ function render2(_ctx, _cache) {
88763
+ return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3);
88764
+ }
88765
+ const MdiFormatSubscript = { name: "mdi-format-subscript", render: render2 };
88766
+ function UndoMenuItem(editor) {
88767
+ return {
88768
+ type: "button",
88769
+ icon: MdiUndoVariant,
88770
+ title: "Undo",
88771
+ action: () => editor.chain().undo().run(),
88772
+ isActive: () => false
88773
+ };
88774
+ }
88775
+ function RedoMenuItem(editor) {
88776
+ return {
88777
+ type: "button",
88778
+ icon: MdiRedoVariant,
88779
+ title: "Redo",
88780
+ action: () => editor.chain().redo().run(),
88781
+ isActive: () => false
88782
+ };
88783
+ }
88784
+ function BoldMenuItem(editor) {
88785
+ return {
88786
+ type: "button",
88787
+ icon: MdiFormatBold,
88788
+ title: "Bold",
88789
+ action: () => editor.chain().focus().toggleBold().run(),
88790
+ isActive: () => editor.isActive("bold")
88791
+ };
88792
+ }
88793
+ function ItalicMenuItem(editor) {
88794
+ return {
88795
+ type: "button",
88796
+ icon: MdiFormatItalic,
88797
+ title: "Italic",
88798
+ action: () => editor.chain().focus().toggleItalic().run(),
88799
+ isActive: () => editor.isActive("italic")
88800
+ };
88801
+ }
88802
+ function UnderlineMenuItem(editor) {
88803
+ return {
88804
+ type: "button",
88805
+ icon: MdiFormatUnderline,
88806
+ title: "Underline",
88807
+ action: () => editor.chain().focus().toggleUnderline().run(),
88808
+ isActive: () => editor.isActive("underline")
88809
+ };
88810
+ }
88811
+ function StrikeMenuItem(editor) {
88812
+ return {
88813
+ type: "button",
88814
+ icon: MdiFormatStrikethrough,
88815
+ title: "Strikethrough",
88816
+ action: () => editor.chain().focus().toggleStrike().run(),
88817
+ isActive: () => editor.isActive("strike")
88818
+ };
88819
+ }
88820
+ function QuoteMenuItem(editor) {
88821
+ return {
88822
+ type: "button",
88823
+ icon: MdiFormatQuoteOpen,
88824
+ title: "Quote",
88825
+ action: () => editor.chain().focus().toggleBlockquote().run(),
88826
+ isActive: () => editor.isActive("blockquote")
88827
+ };
88828
+ }
88829
+ function CodeMenuItem(editor) {
88830
+ return {
88831
+ type: "button",
88832
+ icon: MdiCodeTags,
88833
+ title: "Code",
88834
+ action: () => editor.chain().focus().toggleCode().run(),
88835
+ isActive: () => editor.isActive("code")
88836
+ };
88837
+ }
88838
+ function SuperScriptMenuItem(editor) {
88839
+ return {
88840
+ type: "button",
88841
+ icon: MdiFormatSuperscript,
88842
+ title: "Superscript",
88843
+ action: () => editor.chain().focus().toggleSuperscript().run(),
88844
+ isActive: () => editor.isActive("superscript")
88845
+ };
88846
+ }
88847
+ function SubScriptMenuItem(editor) {
88848
+ return {
88849
+ type: "button",
88850
+ icon: MdiFormatSubscript,
88851
+ title: "Subscript",
88852
+ action: () => editor.chain().focus().toggleSubscript().run(),
88853
+ isActive: () => editor.isActive("subscript")
88854
+ };
88855
+ }
88856
+ function CodeBlockMenuItem(editor) {
88857
+ return {
88858
+ type: "button",
88859
+ icon: MdiCodeBracesBox,
88860
+ title: "Code Block",
88861
+ action: () => editor.chain().focus().toggleCodeBlock().run(),
88862
+ isActive: () => editor.isActive("codeBlock")
88863
+ };
88864
+ }
88865
+ function HeadingMenuItem(editor) {
88866
+ return {
88867
+ type: "button",
88868
+ icon: MdiFormatHeaderPound,
88869
+ title: "\u666E\u901A\u6587\u672C",
88870
+ isActive: () => editor.isActive("heading"),
88871
+ children: [
88872
+ {
88873
+ type: "button",
88874
+ icon: MdiFormatHeader1,
88875
+ title: "\u6807\u9898 1",
88876
+ action: () => editor.chain().focus().toggleHeading({ level: 1 }).run(),
88877
+ isActive: () => editor.isActive("heading", { level: 1 })
88878
+ },
88879
+ {
88880
+ type: "button",
88881
+ icon: MdiFormatHeader2,
88882
+ title: "\u6807\u9898 2",
88883
+ action: () => editor.chain().focus().toggleHeading({ level: 2 }).run(),
88884
+ isActive: () => editor.isActive("heading", { level: 1 })
88885
+ },
88886
+ {
88887
+ type: "button",
88888
+ icon: MdiFormatHeader3,
88889
+ title: "\u6807\u9898 3",
88890
+ action: () => editor.chain().focus().toggleHeading({ level: 3 }).run(),
88891
+ isActive: () => editor.isActive("heading", { level: 1 })
88892
+ },
88893
+ {
88894
+ type: "button",
88895
+ icon: MdiFormatHeader4,
88896
+ title: "\u6807\u9898 4",
88897
+ action: () => editor.chain().focus().toggleHeading({ level: 4 }).run(),
88898
+ isActive: () => editor.isActive("heading", { level: 1 })
88899
+ },
88900
+ {
88901
+ type: "button",
88902
+ icon: MdiFormatHeader5,
88903
+ title: "\u6807\u9898 5",
88904
+ action: () => editor.chain().focus().toggleHeading({ level: 5 }).run(),
88905
+ isActive: () => editor.isActive("heading", { level: 1 })
88906
+ },
88907
+ {
88908
+ type: "button",
88909
+ icon: MdiFormatHeader6,
88910
+ title: "\u6807\u9898 6",
88911
+ action: () => editor.chain().focus().toggleHeading({ level: 6 }).run(),
88912
+ isActive: () => editor.isActive("heading", { level: 1 })
88913
+ }
88914
+ ]
88915
+ };
88916
+ }
88917
+ function AlignLeftMenuItem(editor) {
88918
+ return {
88919
+ type: "button",
88920
+ icon: MdiFormatAlignLeft,
88921
+ title: "Align Left",
88922
+ action: () => editor.chain().focus().setTextAlign("left").run(),
88923
+ isActive: () => editor.isActive({ textAlign: "left" })
88924
+ };
88925
+ }
88926
+ function AlignCenterMenuItem(editor) {
88927
+ return {
88928
+ type: "button",
88929
+ icon: MdiFormatAlignCenter,
88930
+ title: "Align Center",
88931
+ action: () => editor.chain().focus().setTextAlign("center").run(),
88932
+ isActive: () => editor.isActive({ textAlign: "center" })
88933
+ };
88934
+ }
88935
+ function AlignRightMenuItem(editor) {
88936
+ return {
88937
+ type: "button",
88938
+ icon: MdiFormatAlignRight,
88939
+ title: "Align Right",
88940
+ action: () => editor.chain().focus().setTextAlign("right").run(),
88941
+ isActive: () => editor.isActive({ textAlign: "right" })
88942
+ };
88943
+ }
88944
+ function AlignJustifyMenuItem(editor) {
88945
+ return {
88946
+ type: "button",
88947
+ icon: MdiFormatAlignJustify,
88948
+ title: "Align Justify",
88949
+ action: () => editor.chain().focus().setTextAlign("justify").run(),
88950
+ isActive: () => editor.isActive({ textAlign: "justify" })
88951
+ };
88952
+ }
88934
88953
  const plugin = {
88935
88954
  install(app) {
88936
88955
  app.component("RichTextEditor", _sfc_main$3);
88937
88956
  }
88938
88957
  };
88939
88958
  export {
88959
+ AlignCenterMenuItem,
88960
+ AlignJustifyMenuItem,
88961
+ AlignLeftMenuItem,
88962
+ AlignRightMenuItem,
88963
+ BoldMenuItem,
88940
88964
  BubbleMenu,
88965
+ CodeBlockMenuItem,
88966
+ CodeMenuItem,
88967
+ CommandCodeBlock,
88968
+ CommandHeader1,
88969
+ CommandHeader2,
88970
+ CommandHeader3,
88971
+ CommandHeader4,
88972
+ CommandHeader5,
88973
+ CommandHeader6,
88941
88974
  CommandManager,
88942
- CommandsSuggestion,
88975
+ suggestion as CommandsSuggestion,
88943
88976
  Editor,
88944
88977
  EditorContent,
88945
88978
  Extension,
@@ -88977,15 +89010,24 @@ export {
88977
89010
  TextAlign as ExtensionTextAlign,
88978
89011
  Underline as ExtensionUnderline,
88979
89012
  FloatingMenu,
89013
+ HeadingMenuItem,
88980
89014
  InputRule,
89015
+ ItalicMenuItem,
88981
89016
  Mark,
88982
89017
  Node,
88983
89018
  NodeView,
88984
89019
  NodeViewContent,
88985
89020
  NodeViewWrapper,
88986
89021
  PasteRule,
89022
+ QuoteMenuItem,
89023
+ RedoMenuItem,
88987
89024
  _sfc_main$3 as RichTextEditor,
89025
+ StrikeMenuItem,
89026
+ SubScriptMenuItem,
89027
+ SuperScriptMenuItem,
88988
89028
  Tracker,
89029
+ UnderlineMenuItem,
89030
+ UndoMenuItem,
88989
89031
  VueNodeViewRenderer,
88990
89032
  VueRenderer,
88991
89033
  allExtensions,