@dss-kit/ui-kit 0.3.5 → 0.3.7

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.
@@ -8,10 +8,10 @@ import { MarkdownShortcutPlugin as U } from "@lexical/react/LexicalMarkdownShort
8
8
  import { OnChangePlugin as W } from "@lexical/react/LexicalOnChangePlugin";
9
9
  import { TablePlugin as H } from "@lexical/react/LexicalTablePlugin";
10
10
  import { useState as u, useMemo as a, useCallback as p } from "react";
11
- import { getEditorConfig as K } from "./configs/editor.config.js";
12
- import { MARKDOWN_TOOLBAR_DEFAULT_ACTIONS as q } from "./MarkdownTextEditor.const.js";
13
- import { MarkdownTextEditorLocaleProvider as z } from "./MarkdownTextEditor.locale.js";
11
+ import { MARKDOWN_TOOLBAR_DEFAULT_ACTIONS as K } from "./MarkdownTextEditor.const.js";
12
+ import { MarkdownTextEditorLocaleProvider as q } from "./MarkdownTextEditor.locale.js";
14
13
  import { EDITOR_TRANSFORMERS as g } from "./transformers/index.js";
14
+ import { getEditorConfig as z } from "./configs/editor.config.js";
15
15
  import { EditorStateContext as G } from "./contexts/EditorStateContext/EditorStateContext.js";
16
16
  import { ToolbarContext as J } from "./contexts/ToolbarContext/ToolbarContext.js";
17
17
  import { EditorToolbar as Q } from "./components/EditorToolbar/EditorToolbar.js";
@@ -40,7 +40,7 @@ function No({
40
40
  fieldClassName: R,
41
41
  previewClassName: v
42
42
  }) {
43
- const [d, A] = u(""), [i, N] = u(!1), { availableActions: s, onImagesUpload: O } = P || {}, I = a(() => K(), []), L = a(
43
+ const [d, A] = u(""), [i, N] = u(!1), { availableActions: s, onImagesUpload: O } = P || {}, I = a(() => z(), []), L = a(
44
44
  () => ({
45
45
  isEditable: !m,
46
46
  isPreviewMode: i,
@@ -49,7 +49,7 @@ function No({
49
49
  }),
50
50
  [m, i, d]
51
51
  ), F = a(() => ({
52
- availableActions: s || q
52
+ availableActions: s || K
53
53
  }), [s]), f = p(
54
54
  (t) => {
55
55
  A(t), r.onMarkdownChange && r.onMarkdownChange(t);
@@ -64,7 +64,7 @@ function No({
64
64
  },
65
65
  [f, r]
66
66
  );
67
- return /* @__PURE__ */ o(z, { locale: M, children: /* @__PURE__ */ o(D, { initialConfig: I, children: /* @__PURE__ */ o(G.Provider, { value: L, children: /* @__PURE__ */ c(J.Provider, { value: F, children: [
67
+ return /* @__PURE__ */ o(q, { locale: M, children: /* @__PURE__ */ o(D, { initialConfig: I, children: /* @__PURE__ */ o(G.Provider, { value: L, children: /* @__PURE__ */ c(J.Provider, { value: F, children: [
68
68
  /* @__PURE__ */ c(
69
69
  h,
70
70
  {
@@ -3,12 +3,12 @@ import { cx as k } from "@emotion/css";
3
3
  import { useState as y, useCallback as h, useMemo as B, Fragment as I } from "react";
4
4
  import P from "../../../../../../assets/svg/markdown/dots-horizontal.svg.js";
5
5
  import { rowStyle as S, rowStyleInteractive as j } from "./ActionMenuButton.styles.js";
6
+ import { IconButton as z } from "../../../../IconButton/IconButton.js";
6
7
  import { Box as c } from "../../../../../builders/Box/Box.js";
7
- import { theme as z } from "../../../../../../utils/theme/index.js";
8
- import { Text as A } from "../../../../../builders/Text/Text.js";
9
- import { Popover as O } from "../../../../../shared/Popover/Popover.js";
10
- import { IconButton as T } from "../../../../IconButton/IconButton.js";
11
- const { color: x, spacing: v } = z;
8
+ import { theme as A } from "../../../../../../utils/theme/index.js";
9
+ import { Text as O } from "../../../../../builders/Text/Text.js";
10
+ import { Popover as T } from "../../../../../shared/Popover/Popover.js";
11
+ const { color: x, spacing: v } = A;
12
12
  function K({
13
13
  groups: n,
14
14
  toolbarVisibleActionsCount: m,
@@ -40,7 +40,7 @@ function K({
40
40
  color: x.icon.tertiary
41
41
  }
42
42
  ),
43
- /* @__PURE__ */ e(A, { variant: "body-2", children: o.label })
43
+ /* @__PURE__ */ e(O, { variant: "body-2", children: o.label })
44
44
  ]
45
45
  },
46
46
  o.id
@@ -67,13 +67,13 @@ function K({
67
67
  ] }, t.flatMap((i) => i.id).join("-"));
68
68
  }), [n, f, m]);
69
69
  return /* @__PURE__ */ e(
70
- O,
70
+ T,
71
71
  {
72
72
  content: /* @__PURE__ */ e(c, { flex: !0, children: g }),
73
73
  placement: "bottom",
74
74
  open: w,
75
75
  onChange: a,
76
- children: /* @__PURE__ */ e(T, { size: "xs", color: "no-bg", disabled: r, children: /* @__PURE__ */ e(P, {}) })
76
+ children: /* @__PURE__ */ e(z, { size: "xs", color: "no-bg", disabled: r, children: /* @__PURE__ */ e(P, {}) })
77
77
  }
78
78
  );
79
79
  }
@@ -6,11 +6,11 @@ import { ContentEditable as f } from "@lexical/react/LexicalContentEditable";
6
6
  import { LexicalErrorBoundary as c } from "@lexical/react/LexicalErrorBoundary";
7
7
  import { RichTextPlugin as p } from "@lexical/react/LexicalRichTextPlugin";
8
8
  import { useMemo as s } from "react";
9
- import { getEditorConfig as u } from "../../controls/MarkdownTextEditor/configs/editor.config.js";
10
- import { EDITOR_TRANSFORMERS as x } from "../../controls/MarkdownTextEditor/transformers/index.js";
11
- import { markdownTextStyle as w } from "./MarkdownText.styles.js";
12
- import { Text as E } from "../../builders/Text/Text.js";
13
- import { EditorStateContext as k } from "../../controls/MarkdownTextEditor/contexts/EditorStateContext/EditorStateContext.js";
9
+ import { EDITOR_TRANSFORMERS as u } from "../../controls/MarkdownTextEditor/transformers/index.js";
10
+ import { markdownTextStyle as x } from "./MarkdownText.styles.js";
11
+ import { Text as w } from "../../builders/Text/Text.js";
12
+ import { EditorStateContext as E } from "../../controls/MarkdownTextEditor/contexts/EditorStateContext/EditorStateContext.js";
13
+ import { getEditorConfig as k } from "../../controls/MarkdownTextEditor/configs/editor.config.js";
14
14
  function F({
15
15
  markdown: t,
16
16
  className: i,
@@ -27,15 +27,15 @@ function F({
27
27
  }),
28
28
  [r]
29
29
  );
30
- return r ? /* @__PURE__ */ o(k.Provider, { value: a, children: /* @__PURE__ */ o(
30
+ return r ? /* @__PURE__ */ o(E.Provider, { value: a, children: /* @__PURE__ */ o(
31
31
  d,
32
32
  {
33
33
  initialConfig: {
34
- ...u(),
34
+ ...k(),
35
35
  editable: !1,
36
36
  namespace: "ui-kit-markdown-text-viewer",
37
37
  editorState: () => {
38
- l(r, x);
38
+ l(r, u);
39
39
  }
40
40
  },
41
41
  children: /* @__PURE__ */ o(
@@ -44,7 +44,7 @@ function F({
44
44
  contentEditable: /* @__PURE__ */ o(
45
45
  f,
46
46
  {
47
- className: m(w, i),
47
+ className: m(x, i),
48
48
  "aria-placeholder": "markdown text",
49
49
  placeholder: () => null
50
50
  }
@@ -56,7 +56,7 @@ function F({
56
56
  },
57
57
  r
58
58
  ) }) : typeof e == "string" ? /* @__PURE__ */ o(
59
- E,
59
+ w,
60
60
  {
61
61
  variant: "body-2",
62
62
  colorName: "tertiary",