@intlayer/design-system 2.0.11 → 2.0.13

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.
Files changed (47) hide show
  1. package/dist/.vite/manifest.json +70 -23
  2. package/dist/{MarkDownRender-BeQGOIow.cjs → MarkDownRender-7oiSvDiM.cjs} +1 -1
  3. package/dist/{MarkDownRender-gURA8GAt.js → MarkDownRender-JEDIcxQT.js} +138 -137
  4. package/dist/chevron-right-D3LPoNy5.js +14 -0
  5. package/dist/chevron-right-bKrhRS9t.cjs +6 -0
  6. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.js +1 -1
  7. package/dist/components/DictionaryEditor/DictionaryEditor.es.js +1 -1
  8. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs.js +1 -1
  9. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.es.js +1 -1
  10. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs.js +1 -1
  11. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.es.js +1 -1
  12. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs.js +1 -1
  13. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.es.js +1 -1
  14. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs.js +1 -1
  15. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.es.js +1 -1
  16. package/dist/components/DictionaryEditor/NodeWrapper/index.cjs.js +1 -1
  17. package/dist/components/DictionaryEditor/NodeWrapper/index.es.js +4 -2
  18. package/dist/components/IDE/CodeRender.cjs.js +18 -3
  19. package/dist/components/IDE/CodeRender.es.js +22239 -200
  20. package/dist/components/IDE/FileTree.cjs.js +1 -0
  21. package/dist/components/IDE/FileTree.d.ts +10 -0
  22. package/dist/components/IDE/FileTree.es.js +112 -0
  23. package/dist/components/IDE/IDE.cjs.js +1 -1
  24. package/dist/components/IDE/IDE.d.ts +5 -4
  25. package/dist/components/IDE/IDE.es.js +109 -49
  26. package/dist/components/IDE/MarkDownRender.cjs.js +1 -1
  27. package/dist/components/IDE/MarkDownRender.es.js +2 -2
  28. package/dist/components/IDE/createFileTree.cjs.js +1 -0
  29. package/dist/components/IDE/createFileTree.d.ts +6 -0
  30. package/dist/components/IDE/createFileTree.es.js +25 -0
  31. package/dist/components/MarkDownRender/index.cjs.js +1 -1
  32. package/dist/components/MarkDownRender/index.es.js +1 -1
  33. package/dist/components/RedirectionButton/RedirectionButton.cjs.js +1 -6
  34. package/dist/components/RedirectionButton/RedirectionButton.es.js +5 -13
  35. package/dist/components/RightDrawer/RightDrawer.cjs.js +3 -3
  36. package/dist/components/RightDrawer/RightDrawer.es.js +36 -30
  37. package/dist/components/WithResizer/index.cjs.js +1 -0
  38. package/dist/components/WithResizer/index.d.ts +9 -0
  39. package/dist/components/WithResizer/index.es.js +82 -0
  40. package/dist/components/index.cjs.js +1 -1
  41. package/dist/components/index.d.ts +1 -0
  42. package/dist/components/index.es.js +16 -14
  43. package/dist/index-CJEkIqT6.cjs +1 -0
  44. package/dist/index-DBWNacRP.js +133 -0
  45. package/package.json +5 -8
  46. package/dist/index-B2ncVbtX.cjs +0 -1
  47. package/dist/index-D-PWvdb-.js +0 -91
@@ -3,11 +3,11 @@ import { j as e } from "../../jsx-runtime-Tw_Kw2GZ.js";
3
3
  import { p as t } from "../../styled-components.browser.esm-D6kkzXl4.js";
4
4
  import { useRef as c, useEffect as g } from "react";
5
5
  import { useDevice as y } from "../../hooks/useDevice.es.js";
6
- import { useScrollBlockage as S } from "../../hooks/useScrollBlockage/index.es.js";
7
- import { Container as j } from "../Container/index.es.js";
8
- import { MaxWidthSmoother as v } from "../MaxWidthSmoother/index.es.js";
9
- import { useRightDrawerStore as C } from "./useRightDrawerStore.es.js";
10
- import { c as w } from "../../createLucideIcon-DlZEiEGq.js";
6
+ import { useScrollBlockage as v } from "../../hooks/useScrollBlockage/index.es.js";
7
+ import { Container as w } from "../Container/index.es.js";
8
+ import { MaxWidthSmoother as S } from "../MaxWidthSmoother/index.es.js";
9
+ import { useRightDrawerStore as j } from "./useRightDrawerStore.es.js";
10
+ import { c as C } from "../../createLucideIcon-DlZEiEGq.js";
11
11
  import { X as D } from "../../x-BKwnSvvj.js";
12
12
  /**
13
13
  * @license lucide-react v0.376.0 - ISC
@@ -15,7 +15,7 @@ import { X as D } from "../../x-BKwnSvvj.js";
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
17
  */
18
- const L = w("ChevronLeft", [
18
+ const L = C("ChevronLeft", [
19
19
  ["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
20
20
  ]), R = t.div({
21
21
  position: "fixed",
@@ -25,21 +25,27 @@ const L = w("ChevronLeft", [
25
25
  display: "flex",
26
26
  height: "100%",
27
27
  justifyContent: "flex-end"
28
- }), E = t(j)(() => [{
28
+ }), k = t(w)(() => [{
29
29
  position: "relative",
30
30
  display: "flex",
31
31
  height: "100vh",
32
32
  width: "100vw",
33
33
  flexDirection: "column",
34
+ "--tw-text-opacity": "1",
35
+ color: "rgba(18, 18, 18, var(--tw-text-opacity))",
34
36
  "@media (min-width: 768px)": {
35
37
  width: "400px"
38
+ },
39
+ '&:where([data-theme="dark"], [data-theme="dark"] *)': {
40
+ "--tw-text-opacity": "1",
41
+ color: "rgba(255, 245, 237, var(--tw-text-opacity))"
36
42
  }
37
- }]), I = t.div({
43
+ }]), E = t.div({
38
44
  display: "flex",
39
45
  flexDirection: "column",
40
46
  gap: "0.75rem",
41
47
  padding: "1.5rem"
42
- }), k = t.div({
48
+ }), I = t.div({
43
49
  display: "flex",
44
50
  justifyContent: "space-between",
45
51
  gap: "0.75rem"
@@ -70,37 +76,37 @@ const L = w("ChevronLeft", [
70
76
  marginLeft: "auto",
71
77
  cursor: "pointer"
72
78
  }}
73
- `, G = ({
79
+ `, F = ({
74
80
  title: a,
75
81
  identifier: l,
76
82
  children: m,
77
- header: f,
83
+ header: p,
78
84
  closeOnOutsideClick: d = !0,
79
85
  backButton: r
80
86
  }) => {
81
87
  const {
82
- isMobile: p
83
- } = y("md"), s = c(null), h = c(null), {
84
- isOpen: i,
88
+ isMobile: f
89
+ } = y("md"), s = c(null), x = c(null), {
90
+ isOpen: n,
85
91
  close: o
86
- } = C(l)();
87
- S({
88
- disableScroll: i,
92
+ } = j(l)();
93
+ v({
94
+ disableScroll: n,
89
95
  key: l ? "right_drawer" : `right_drawer_${l}`
90
96
  }), g(() => {
91
- const n = (u) => {
92
- i && d && s.current && !s.current.contains(u.target) && o();
97
+ const i = (u) => {
98
+ n && d && s.current && !s.current.contains(u.target) && o();
93
99
  };
94
- return document.addEventListener("mousedown", n), () => {
95
- document.removeEventListener("mousedown", n);
100
+ return document.addEventListener("mousedown", i), () => {
101
+ document.removeEventListener("mousedown", i);
96
102
  };
97
- }, [i, o, d]);
98
- const x = (n) => {
99
- n.target === n.currentTarget && p && o();
103
+ }, [n, o, d]);
104
+ const h = (i) => {
105
+ i.target === i.currentTarget && f && o();
100
106
  };
101
- return /* @__PURE__ */ e.jsx(R, { children: /* @__PURE__ */ e.jsx(v, { isHidden: !i, align: "right", children: /* @__PURE__ */ e.jsxs(E, { ref: s, roundedSize: "none", children: [
102
- /* @__PURE__ */ e.jsxs(I, { children: [
103
- /* @__PURE__ */ e.jsxs(k, { children: [
107
+ return /* @__PURE__ */ e.jsx(R, { children: /* @__PURE__ */ e.jsx(S, { isHidden: !n, align: "right", children: /* @__PURE__ */ e.jsxs(k, { ref: s, roundedSize: "none", children: [
108
+ /* @__PURE__ */ e.jsxs(E, { children: [
109
+ /* @__PURE__ */ e.jsxs(I, { children: [
104
110
  /* @__PURE__ */ e.jsx("div", { children: r && /* @__PURE__ */ e.jsxs(_, { onClick: r.onBack, children: [
105
111
  /* @__PURE__ */ e.jsx(L, {}),
106
112
  r == null ? void 0 : r.text
@@ -108,11 +114,11 @@ const L = w("ChevronLeft", [
108
114
  /* @__PURE__ */ e.jsx(P, { onClick: o })
109
115
  ] }),
110
116
  /* @__PURE__ */ e.jsx(M, { children: a }),
111
- f
117
+ p
112
118
  ] }),
113
- /* @__PURE__ */ e.jsx(z, { children: /* @__PURE__ */ e.jsx(H, { onClick: x, ref: h, children: m }) })
119
+ /* @__PURE__ */ e.jsx(z, { children: /* @__PURE__ */ e.jsx(H, { onClick: h, ref: x, children: m }) })
114
120
  ] }) }) });
115
121
  };
116
122
  export {
117
- G as RightDrawer
123
+ F as RightDrawer
118
124
  };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../jsx-runtime-D6agescH.cjs"),h=require("../../styled-components.browser.esm-GqWwDlfY.cjs"),e=require("react"),y=h.pt.div(({$minWidth:n,$maxWidth:a})=>[n&&{},a&&{},{position:"relative",height:"100%",width:"100%",maxWidth:"80%",cursor:"ew-resize",borderRightWidth:"2px","--tw-border-opacity":"1",borderColor:"rgba(209, 209, 209, var(--tw-border-opacity))",'&:where([data-theme="dark"], [data-theme="dark"] *)':{"--tw-border-opacity":"1",borderColor:"rgba(48, 48, 48, var(--tw-border-opacity))"}},{"&::after":{content:"var(--tw-content)",position:"absolute",right:"0px",top:"50%",display:"block",height:"2.5rem",width:"0.5rem","--tw-translate-y":"-50%",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))","--tw-translate-x":"50%",cursor:"ew-resize",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgba(209, 209, 209, var(--tw-bg-opacity))","--tw-content":'""'},'&:where([data-theme="dark"], [data-theme="dark"] *)::after':{content:"var(--tw-content)","--tw-bg-opacity":"1",backgroundColor:"rgba(48, 48, 48, var(--tw-bg-opacity))"}}]),k=h.pt.div({position:"absolute",left:"0px",top:"0px",height:"100%",width:"100%",cursor:"default",overflow:"hidden"}),R=({initialWidth:n,maxWidth:a,minWidth:p=0,children:v})=>{const s=e.useRef(null),[m,b]=e.useState(n),[c,d]=e.useState(!1),w=e.useCallback(t=>{d(!0),t.preventDefault()},[]),o=e.useCallback(()=>{d(!1)},[]),r=e.useCallback(t=>{const l=s.current;if(c&&l&&parent){const{left:g}=l.getBoundingClientRect();let i=0;t instanceof MouseEvent?i=t.clientX:t instanceof TouchEvent&&(i=t.touches[0].clientX);const x=i-g,f=Math.max(x,0);b(f)}},[c]);return e.useEffect(()=>(window.addEventListener("mousemove",r),window.addEventListener("mouseup",o),window.addEventListener("touchmove",r),window.addEventListener("touchend",o),()=>{window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",o),window.removeEventListener("touchmove",r),window.removeEventListener("touchend",o)}),[r,o]),u.jsxRuntimeExports.jsx(y,{style:{width:`${m}px`},$maxWidth:`max-w-[${a}px]`,$minWidth:`min-w-[${p}px]`,ref:s,onMouseDown:w,onTouchStart:w,children:u.jsxRuntimeExports.jsx(k,{onMouseDown:t=>t.stopPropagation(),onTouchStart:t=>t.stopPropagation(),children:v})})};exports.WithResizer=R;
@@ -0,0 +1,9 @@
1
+ import { PropsWithChildren, FC } from 'react';
2
+
3
+ type WithResizerProps = {
4
+ initialWidth: number;
5
+ maxWidth?: number;
6
+ minWidth?: number;
7
+ };
8
+ export declare const WithResizer: FC<PropsWithChildren<WithResizerProps>>;
9
+ export {};
@@ -0,0 +1,82 @@
1
+ "use client";
2
+ import { j as p } from "../../jsx-runtime-Tw_Kw2GZ.js";
3
+ import { p as u } from "../../styled-components.browser.esm-D6kkzXl4.js";
4
+ import { useRef as k, useState as h, useCallback as i, useEffect as R } from "react";
5
+ const E = u.div(({
6
+ $minWidth: r,
7
+ $maxWidth: n
8
+ }) => [r && {}, n && {}, {
9
+ position: "relative",
10
+ height: "100%",
11
+ width: "100%",
12
+ maxWidth: "80%",
13
+ cursor: "ew-resize",
14
+ borderRightWidth: "2px",
15
+ "--tw-border-opacity": "1",
16
+ borderColor: "rgba(209, 209, 209, var(--tw-border-opacity))",
17
+ '&:where([data-theme="dark"], [data-theme="dark"] *)': {
18
+ "--tw-border-opacity": "1",
19
+ borderColor: "rgba(48, 48, 48, var(--tw-border-opacity))"
20
+ }
21
+ }, {
22
+ "&::after": {
23
+ content: "var(--tw-content)",
24
+ position: "absolute",
25
+ right: "0px",
26
+ top: "50%",
27
+ display: "block",
28
+ height: "2.5rem",
29
+ width: "0.5rem",
30
+ "--tw-translate-y": "-50%",
31
+ transform: "translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",
32
+ "--tw-translate-x": "50%",
33
+ cursor: "ew-resize",
34
+ borderRadius: "9999px",
35
+ "--tw-bg-opacity": "1",
36
+ backgroundColor: "rgba(209, 209, 209, var(--tw-bg-opacity))",
37
+ "--tw-content": '""'
38
+ },
39
+ '&:where([data-theme="dark"], [data-theme="dark"] *)::after': {
40
+ content: "var(--tw-content)",
41
+ "--tw-bg-opacity": "1",
42
+ backgroundColor: "rgba(48, 48, 48, var(--tw-bg-opacity))"
43
+ }
44
+ }]), L = u.div({
45
+ position: "absolute",
46
+ left: "0px",
47
+ top: "0px",
48
+ height: "100%",
49
+ width: "100%",
50
+ cursor: "default",
51
+ overflow: "hidden"
52
+ }), S = ({
53
+ initialWidth: r,
54
+ maxWidth: n,
55
+ minWidth: v = 0,
56
+ children: m
57
+ }) => {
58
+ const s = k(null), [f, g] = h(r), [c, d] = h(!1), w = i((t) => {
59
+ d(!0), t.preventDefault();
60
+ }, []), e = i(() => {
61
+ d(!1);
62
+ }, []), o = i((t) => {
63
+ const l = s.current;
64
+ if (c && l && parent) {
65
+ const {
66
+ left: b
67
+ } = l.getBoundingClientRect();
68
+ let a = 0;
69
+ t instanceof MouseEvent ? a = t.clientX : t instanceof TouchEvent && (a = t.touches[0].clientX);
70
+ const x = a - b, y = Math.max(x, 0);
71
+ g(y);
72
+ }
73
+ }, [c]);
74
+ return R(() => (window.addEventListener("mousemove", o), window.addEventListener("mouseup", e), window.addEventListener("touchmove", o), window.addEventListener("touchend", e), () => {
75
+ window.removeEventListener("mousemove", o), window.removeEventListener("mouseup", e), window.removeEventListener("touchmove", o), window.removeEventListener("touchend", e);
76
+ }), [o, e]), /* @__PURE__ */ p.jsx(E, { style: {
77
+ width: `${f}px`
78
+ }, $maxWidth: `max-w-[${n}px]`, $minWidth: `min-w-[${v}px]`, ref: s, onMouseDown: w, onTouchStart: w, children: /* @__PURE__ */ p.jsx(L, { onMouseDown: (t) => t.stopPropagation(), onTouchStart: (t) => t.stopPropagation(), children: m }) });
79
+ };
80
+ export {
81
+ S as WithResizer
82
+ };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./MaxHeightSmoother/index.cjs.js"),n=require("./MaxWidthSmoother/index.cjs.js"),i=require("./RightDrawer/RightDrawer.cjs.js"),o=require("./RightDrawer/useRightDrawerStore.cjs.js"),c=require("./PressableDiv/PressableDiv.cjs.js"),s=require("./ContentEditor/ContentEditor.cjs.js"),a=require("./ContentSelector/ContentSelector.cjs.js"),_=require("./DictionaryEditor/DictionaryEditor.cjs.js"),D=require("./DropDown/index.cjs.js"),d=require("./LocaleSwitcherDropDown/LocaleSwitcher.cjs.js"),p=require("./ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.js"),h=require("./ThemeSwitcherDropDown/MobileThemeSwitcher.cjs.js"),m=require("./ThemeSwitcherDropDown/types.cjs.js"),u=require("./RedirectionButton/RedirectionButton.cjs.js"),w=require("./Button/index.cjs.js"),t=require("./Container/index.cjs.js"),S=require("./Footer/index.cjs.js"),q=require("./Navbar/index.cjs.js"),l=require("./ProfileDropDown/index.cjs.js"),g=require("./Avatar/index.cjs.js"),x=require("./Logo/index.cjs.js"),R=require("./IDE/CodeRender.cjs.js"),C=require("./IDE/IDE.cjs.js"),M=require("./Popover/index.cjs.js"),v=require("./MarkDownRender/index.cjs.js"),e=require("./Headers/index.cjs.js"),H=require("./Loader/index.cjs.js");exports.MaxHeightSmoother=r.MaxHeightSmoother;exports.MaxWidthSmoother=n.MaxWidthSmoother;exports.RightDrawer=i.RightDrawer;exports.createRightDrawerStore=o.createRightDrawerStore;exports.useRightDrawerStore=o.useRightDrawerStore;exports.PressableDiv=c.PressableDiv;exports.ContentEditor=s.ContentEditor;exports.ContentSelector=a.ContentSelector;exports.DictionaryEditor=_.DictionaryEditor;exports.DropDown=D.DropDown;exports.LocaleSwitcher=d.LocaleSwitcher;exports.DesktopThemeSwitcher=p.DesktopThemeSwitcher;exports.MobileThemeSwitcher=h.MobileThemeSwitcher;exports.Modes=m.Modes;exports.RedirectionButton=u.RedirectionButton;exports.Button=w.Button;exports.Container=t.Container;exports.getContainerStyles=t.getContainerStyles;exports.Footer=S.Footer;exports.Navbar=q.Navbar;exports.ProfileDropDown=l.ProfileDropDown;exports.Avatar=g.Avatar;exports.Logo=x.Logo;exports.Code=R.Code;exports.IDE=C.IDE;exports.Popover=M.Popover;exports.MarkdownRenderer=v.MarkdownRenderer;exports.H1=e.H1;exports.H2=e.H2;exports.H3=e.H3;exports.H4=e.H4;exports.H5=e.H5;exports.Loader=H.Loader;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./MaxHeightSmoother/index.cjs.js"),n=require("./MaxWidthSmoother/index.cjs.js"),i=require("./RightDrawer/RightDrawer.cjs.js"),o=require("./RightDrawer/useRightDrawerStore.cjs.js"),c=require("./PressableDiv/PressableDiv.cjs.js"),s=require("./ContentEditor/ContentEditor.cjs.js"),a=require("./ContentSelector/ContentSelector.cjs.js"),_=require("./DictionaryEditor/DictionaryEditor.cjs.js"),d=require("./DropDown/index.cjs.js"),h=require("./LocaleSwitcherDropDown/LocaleSwitcher.cjs.js"),D=require("./ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.js"),p=require("./ThemeSwitcherDropDown/MobileThemeSwitcher.cjs.js"),m=require("./ThemeSwitcherDropDown/types.cjs.js"),u=require("./RedirectionButton/RedirectionButton.cjs.js"),w=require("./Button/index.cjs.js"),t=require("./Container/index.cjs.js"),S=require("./Footer/index.cjs.js"),q=require("./Navbar/index.cjs.js"),l=require("./ProfileDropDown/index.cjs.js"),x=require("./Avatar/index.cjs.js"),R=require("./Logo/index.cjs.js"),g=require("./IDE/CodeRender.cjs.js"),C=require("./IDE/IDE.cjs.js"),M=require("./Popover/index.cjs.js"),v=require("./MarkDownRender/index.cjs.js"),e=require("./Headers/index.cjs.js"),H=require("./Loader/index.cjs.js"),E=require("./WithResizer/index.cjs.js");exports.MaxHeightSmoother=r.MaxHeightSmoother;exports.MaxWidthSmoother=n.MaxWidthSmoother;exports.RightDrawer=i.RightDrawer;exports.createRightDrawerStore=o.createRightDrawerStore;exports.useRightDrawerStore=o.useRightDrawerStore;exports.PressableDiv=c.PressableDiv;exports.ContentEditor=s.ContentEditor;exports.ContentSelector=a.ContentSelector;exports.DictionaryEditor=_.DictionaryEditor;exports.DropDown=d.DropDown;exports.LocaleSwitcher=h.LocaleSwitcher;exports.DesktopThemeSwitcher=D.DesktopThemeSwitcher;exports.MobileThemeSwitcher=p.MobileThemeSwitcher;exports.Modes=m.Modes;exports.RedirectionButton=u.RedirectionButton;exports.Button=w.Button;exports.Container=t.Container;exports.getContainerStyles=t.getContainerStyles;exports.Footer=S.Footer;exports.Navbar=q.Navbar;exports.ProfileDropDown=l.ProfileDropDown;exports.Avatar=x.Avatar;exports.Logo=R.Logo;exports.Code=g.Code;exports.IDE=C.IDE;exports.Popover=M.Popover;exports.MarkdownRenderer=v.MarkdownRenderer;exports.H1=e.H1;exports.H2=e.H2;exports.H3=e.H3;exports.H4=e.H4;exports.H5=e.H5;exports.Loader=H.Loader;exports.WithResizer=E.WithResizer;
@@ -21,3 +21,4 @@ export * from './Popover';
21
21
  export * from './MarkDownRender';
22
22
  export * from './Headers';
23
23
  export * from './Loader';
24
+ export * from './WithResizer';
@@ -6,18 +6,18 @@ import { createRightDrawerStore as i, useRightDrawerStore as a } from "./RightDr
6
6
  import { PressableDiv as h } from "./PressableDiv/PressableDiv.es.js";
7
7
  import { ContentEditor as c } from "./ContentEditor/ContentEditor.es.js";
8
8
  import { ContentSelector as w } from "./ContentSelector/ContentSelector.es.js";
9
- import { DictionaryEditor as l } from "./DictionaryEditor/DictionaryEditor.es.js";
9
+ import { DictionaryEditor as s } from "./DictionaryEditor/DictionaryEditor.es.js";
10
10
  import { DropDown as g } from "./DropDown/index.es.js";
11
- import { LocaleSwitcher as C } from "./LocaleSwitcherDropDown/LocaleSwitcher.es.js";
12
- import { DesktopThemeSwitcher as R } from "./ThemeSwitcherDropDown/DesktopThemeSwitcher.es.js";
11
+ import { LocaleSwitcher as R } from "./LocaleSwitcherDropDown/LocaleSwitcher.es.js";
12
+ import { DesktopThemeSwitcher as M } from "./ThemeSwitcherDropDown/DesktopThemeSwitcher.es.js";
13
13
  import { MobileThemeSwitcher as v } from "./ThemeSwitcherDropDown/MobileThemeSwitcher.es.js";
14
14
  import { Modes as E } from "./ThemeSwitcherDropDown/types.es.js";
15
15
  import { RedirectionButton as P } from "./RedirectionButton/RedirectionButton.es.js";
16
16
  import { Button as y } from "./Button/index.es.js";
17
- import { Container as T, getContainerStyles as A } from "./Container/index.es.js";
18
- import { Footer as I } from "./Footer/index.es.js";
19
- import { Navbar as W } from "./Navbar/index.es.js";
20
- import { ProfileDropDown as q } from "./ProfileDropDown/index.es.js";
17
+ import { Container as T, getContainerStyles as W } from "./Container/index.es.js";
18
+ import { Footer as A } from "./Footer/index.es.js";
19
+ import { Navbar as I } from "./Navbar/index.es.js";
20
+ import { ProfileDropDown as j } from "./ProfileDropDown/index.es.js";
21
21
  import { Avatar as G } from "./Avatar/index.es.js";
22
22
  import { Logo as K } from "./Logo/index.es.js";
23
23
  import { Code as Q } from "./IDE/CodeRender.es.js";
@@ -26,6 +26,7 @@ import { Popover as Y } from "./Popover/index.es.js";
26
26
  import { MarkdownRenderer as _ } from "./MarkDownRender/index.es.js";
27
27
  import { H1 as oo, H2 as ro, H3 as eo, H4 as to, H5 as mo } from "./Headers/index.es.js";
28
28
  import { Loader as xo } from "./Loader/index.es.js";
29
+ import { WithResizer as io } from "./WithResizer/index.es.js";
29
30
  export {
30
31
  G as Avatar,
31
32
  y as Button,
@@ -33,10 +34,10 @@ export {
33
34
  T as Container,
34
35
  c as ContentEditor,
35
36
  w as ContentSelector,
36
- R as DesktopThemeSwitcher,
37
- l as DictionaryEditor,
37
+ M as DesktopThemeSwitcher,
38
+ s as DictionaryEditor,
38
39
  g as DropDown,
39
- I as Footer,
40
+ A as Footer,
40
41
  oo as H1,
41
42
  ro as H2,
42
43
  eo as H3,
@@ -44,20 +45,21 @@ export {
44
45
  mo as H5,
45
46
  V as IDE,
46
47
  xo as Loader,
47
- C as LocaleSwitcher,
48
+ R as LocaleSwitcher,
48
49
  K as Logo,
49
50
  _ as MarkdownRenderer,
50
51
  e as MaxHeightSmoother,
51
52
  m as MaxWidthSmoother,
52
53
  v as MobileThemeSwitcher,
53
54
  E as Modes,
54
- W as Navbar,
55
+ I as Navbar,
55
56
  Y as Popover,
56
57
  h as PressableDiv,
57
- q as ProfileDropDown,
58
+ j as ProfileDropDown,
58
59
  P as RedirectionButton,
59
60
  x as RightDrawer,
61
+ io as WithResizer,
60
62
  i as createRightDrawerStore,
61
- A as getContainerStyles,
63
+ W as getContainerStyles,
62
64
  a as useRightDrawerStore
63
65
  };
@@ -0,0 +1 @@
1
+ "use client";"use strict";const n=require("./jsx-runtime-D6agescH.cjs"),x=require("./styled-components.browser.esm-GqWwDlfY.cjs");require("./localeList-DlUgKn8J.cjs");const l=require("react"),h=require("./StringWrapper-DUDqtkwz.cjs"),m=require("./components/DictionaryEditor/ItemLayout.cjs.js");var u=(t=>(t.Translation="translation",t.Enumeration="enumeration",t))(u||{});const j=t=>{const{keyPath:e,section:i,onFocusKeyPath:s,focusedKeyPath:a=[]}=t;return i.map((r,o)=>{const c={key:o,type:"ArrayExpression"},p=[...e,c];return n.jsxRuntimeExports.jsx(m.ItemLayout,{level:e.length,title:`${o}`,description:"",isSelected:h.isSameKeyPath(p,a),onClick:g=>{g.stopPropagation(),s(p)},children:l.createElement(y,{...t,key:o,keyPath:p,section:r})},o)})},K=x.pt.div({marginLeft:"0.5rem",display:"grid",gridTemplateColumns:"auto 1fr",gap:"0.5rem"}),W=x.pt.span({display:"flex",alignItems:"center",fontWeight:"700"}),E=t=>{const{keyPath:e,section:i}=t;return n.jsxRuntimeExports.jsx(K,{children:Object.keys(i).filter(s=>!d.includes(s)).map(s=>{const a={type:u.Enumeration,key:s},r=[...e,a],o=i.enumeration[s];return n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(W,{children:s}),l.createElement(y,{...t,key:s,keyPath:r,section:o})]})})})},f=t=>{const{keyPath:e,section:i,focusedKeyPath:s=[],onFocusKeyPath:a}=t;return Object.keys(i).filter(r=>!d.includes(r)).map(r=>{const o={key:r,type:"ObjectExpression"},c=[...e,o];return n.jsxRuntimeExports.jsx(m.ItemLayout,{level:e.length,title:r,description:"",isSelected:h.isSameKeyPath(c,s),onClick:p=>{p.stopPropagation(),a(c)},children:n.jsxRuntimeExports.jsx(y,{...t,keyPath:c,section:i[r]})},r)})},P=t=>{const{keyPath:e,section:i,locale:s}=t,a={type:u.Translation,key:s},r=[...e,a],o=i.translation[s];return n.jsxRuntimeExports.jsx(y,{...t,keyPath:r,section:o})},d=["filePath","id","nodeType"],b=t=>typeof(t==null?void 0:t.key)<"u"&&typeof(t==null?void 0:t.props)<"u",w=x.pt.span({fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgba(93, 93, 93, var(--tw-text-opacity))",'&:where([data-theme="dark"], [data-theme="dark"] *)':{"--tw-text-opacity":"1",color:"rgba(136, 136, 136, var(--tw-text-opacity))"}}),R=t=>{if(typeof t=="string")return t;const i=(r=>{if(r!=null&&r.props&&typeof r.props.children=="object"){const o=[],{children:c}=r.props;return Object.keys(c).forEach(p=>{o.push(R(c[p]))}),{...r,props:{...r.props,children:o}}}return{...r,props:{...r.props,children:r.props.children}}})(t),{type:s,props:a}=i;return l.createElement(s??"div",a,...a.children)},y=t=>{const{section:e}=t;if(typeof e=="object")return b(e)?n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[R(e),n.jsxRuntimeExports.jsx(w,{children:"React node not editable"})]}):e.nodeType===u.Translation?n.jsxRuntimeExports.jsx(P,{...t,section:e}):e.nodeType===u.Enumeration?n.jsxRuntimeExports.jsx(E,{...t,section:e}):Array.isArray(e)?n.jsxRuntimeExports.jsx(j,{...t,section:e}):n.jsxRuntimeExports.jsx(f,{...t,section:e});if(typeof e=="string")return n.jsxRuntimeExports.jsx(h.StringWrapper,{...t,section:e})};exports.ArrayWrapper=j;exports.EnumerationWrapper=E;exports.NestedObjectWrapper=f;exports.NodeWrapper=y;exports.TranslationWrapper=P;exports.traceKeys=d;
@@ -0,0 +1,133 @@
1
+ "use client";
2
+ import { j as n } from "./jsx-runtime-Tw_Kw2GZ.js";
3
+ import { p as h } from "./styled-components.browser.esm-D6kkzXl4.js";
4
+ import "./localeList-CaRF-907.js";
5
+ import { createElement as u } from "react";
6
+ import { i as d, S as j } from "./StringWrapper-CW70GPXq.js";
7
+ import { ItemLayout as f } from "./components/DictionaryEditor/ItemLayout.es.js";
8
+ var l = /* @__PURE__ */ ((t) => (t.Translation = "translation", t.Enumeration = "enumeration", t))(l || {});
9
+ const g = (t) => {
10
+ const {
11
+ keyPath: e,
12
+ section: o,
13
+ onFocusKeyPath: s,
14
+ focusedKeyPath: i = []
15
+ } = t;
16
+ return o.map((r, a) => {
17
+ const c = {
18
+ key: a,
19
+ type: "ArrayExpression"
20
+ }, p = [...e, c];
21
+ return /* @__PURE__ */ n.jsx(f, { level: e.length, title: `${a}`, description: "", isSelected: d(p, i), onClick: (P) => {
22
+ P.stopPropagation(), s(p);
23
+ }, children: /* @__PURE__ */ u(y, { ...t, key: a, keyPath: p, section: r }) }, a);
24
+ });
25
+ }, E = h.div({
26
+ marginLeft: "0.5rem",
27
+ display: "grid",
28
+ gridTemplateColumns: "auto 1fr",
29
+ gap: "0.5rem"
30
+ }), K = h.span({
31
+ display: "flex",
32
+ alignItems: "center",
33
+ fontWeight: "700"
34
+ }), w = (t) => {
35
+ const {
36
+ keyPath: e,
37
+ section: o
38
+ } = t;
39
+ return /* @__PURE__ */ n.jsx(E, { children: Object.keys(o).filter((s) => !m.includes(s)).map((s) => {
40
+ const i = {
41
+ type: l.Enumeration,
42
+ key: s
43
+ }, r = [...e, i], a = o.enumeration[s];
44
+ return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
45
+ /* @__PURE__ */ n.jsx(K, { children: s }),
46
+ /* @__PURE__ */ u(y, { ...t, key: s, keyPath: r, section: a })
47
+ ] });
48
+ }) });
49
+ }, b = (t) => {
50
+ const {
51
+ keyPath: e,
52
+ section: o,
53
+ focusedKeyPath: s = [],
54
+ onFocusKeyPath: i
55
+ } = t;
56
+ return Object.keys(o).filter((r) => !m.includes(r)).map((r) => {
57
+ const a = {
58
+ key: r,
59
+ type: "ObjectExpression"
60
+ }, c = [...e, a];
61
+ return /* @__PURE__ */ n.jsx(f, { level: e.length, title: r, description: "", isSelected: d(c, s), onClick: (p) => {
62
+ p.stopPropagation(), i(c);
63
+ }, children: /* @__PURE__ */ n.jsx(y, { ...t, keyPath: c, section: o[r] }) }, r);
64
+ });
65
+ }, S = (t) => {
66
+ const {
67
+ keyPath: e,
68
+ section: o,
69
+ locale: s
70
+ } = t, i = {
71
+ type: l.Translation,
72
+ key: s
73
+ }, r = [...e, i], a = o.translation[s];
74
+ return /* @__PURE__ */ n.jsx(y, { ...t, keyPath: r, section: a });
75
+ }, m = ["filePath", "id", "nodeType"], v = (t) => typeof (t == null ? void 0 : t.key) < "u" && typeof (t == null ? void 0 : t.props) < "u", A = h.span({
76
+ fontSize: "0.75rem",
77
+ lineHeight: "1rem",
78
+ "--tw-text-opacity": "1",
79
+ color: "rgba(93, 93, 93, var(--tw-text-opacity))",
80
+ '&:where([data-theme="dark"], [data-theme="dark"] *)': {
81
+ "--tw-text-opacity": "1",
82
+ color: "rgba(136, 136, 136, var(--tw-text-opacity))"
83
+ }
84
+ }), x = (t) => {
85
+ if (typeof t == "string")
86
+ return t;
87
+ const o = ((r) => {
88
+ if (r != null && r.props && typeof r.props.children == "object") {
89
+ const a = [], {
90
+ children: c
91
+ } = r.props;
92
+ return Object.keys(c).forEach((p) => {
93
+ a.push(x(c[p]));
94
+ }), {
95
+ ...r,
96
+ props: {
97
+ ...r.props,
98
+ children: a
99
+ }
100
+ };
101
+ }
102
+ return {
103
+ ...r,
104
+ props: {
105
+ ...r.props,
106
+ children: r.props.children
107
+ }
108
+ };
109
+ })(t), {
110
+ type: s,
111
+ props: i
112
+ } = o;
113
+ return u(s ?? "div", i, ...i.children);
114
+ }, y = (t) => {
115
+ const {
116
+ section: e
117
+ } = t;
118
+ if (typeof e == "object")
119
+ return v(e) ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
120
+ x(e),
121
+ /* @__PURE__ */ n.jsx(A, { children: "React node not editable" })
122
+ ] }) : e.nodeType === l.Translation ? /* @__PURE__ */ n.jsx(S, { ...t, section: e }) : e.nodeType === l.Enumeration ? /* @__PURE__ */ n.jsx(w, { ...t, section: e }) : Array.isArray(e) ? /* @__PURE__ */ n.jsx(g, { ...t, section: e }) : /* @__PURE__ */ n.jsx(b, { ...t, section: e });
123
+ if (typeof e == "string")
124
+ return /* @__PURE__ */ n.jsx(j, { ...t, section: e });
125
+ };
126
+ export {
127
+ g as A,
128
+ w as E,
129
+ y as N,
130
+ S as T,
131
+ b as a,
132
+ m as t
133
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/design-system",
3
- "version": "2.0.11",
3
+ "version": "2.0.13",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -26,13 +26,15 @@
26
26
  "dependencies": {
27
27
  "@emotion/is-prop-valid": "^1.2.2",
28
28
  "@tailwindcss/aspect-ratio": "^0.4.2",
29
+ "clsx": "^2.1.1",
29
30
  "framer-motion": "^11.2.12",
30
31
  "markdown-to-jsx": "^7.4.7",
31
32
  "react-copy-to-clipboard": "^5.1.0",
32
33
  "react-markdown": "^9.0.1",
34
+ "react-syntax-highlighter": "^15.5.0",
33
35
  "tailwindcss-animate": "^1.0.7",
34
- "@intlayer/config": "^2.0.11",
35
- "@intlayer/core": "^2.0.11"
36
+ "@intlayer/config": "^2.0.13",
37
+ "@intlayer/core": "^2.0.13"
36
38
  },
37
39
  "devDependencies": {
38
40
  "@types/react": "^18.3.3",
@@ -42,15 +44,11 @@
42
44
  "@typescript-eslint/eslint-plugin": "^7.14.1",
43
45
  "@typescript-eslint/parser": "^7.14.1",
44
46
  "@vitejs/plugin-react": "^4.3.1",
45
- "clsx": "^2.1.1",
46
47
  "eslint": "^8.57.0",
47
48
  "eslint-plugin-react-hooks": "^4.6.2",
48
49
  "eslint-plugin-react-refresh": "^0.4.7",
49
50
  "glob": "^10.4.2",
50
51
  "lucide-react": "^0.376.0",
51
- "react-syntax-highlighter": "^15.5.0",
52
- "rehype-raw": "^7.0.0",
53
- "remark-gfm": "^4.0.0",
54
52
  "rollup-plugin-preserve-directives": "^0.4.0",
55
53
  "styled-components": "^6.1.11",
56
54
  "tailwind-merge": "^2.3.0",
@@ -65,7 +63,6 @@
65
63
  "peerDependencies": {
66
64
  "react": "^18.2.0",
67
65
  "react-dom": "^18.2.0",
68
- "react-syntax-highlighter": "^15.5.0",
69
66
  "rehype-raw": "^7.0.0",
70
67
  "remark-gfm": "^4.0.0",
71
68
  "zustand": "^4.5.2"
@@ -1 +0,0 @@
1
- "use client";"use strict";const r=require("./jsx-runtime-D6agescH.cjs");require("./localeList-DlUgKn8J.cjs");const y=require("react"),m=require("./StringWrapper-DUDqtkwz.cjs"),j=require("./components/DictionaryEditor/ItemLayout.cjs.js"),d=require("./styled-components.browser.esm-GqWwDlfY.cjs");var p=(e=>(e.Translation="translation",e.Enumeration="enumeration",e))(p||{});const h=e=>{const{keyPath:t,section:i,onFocusKeyPath:n,focusedKeyPath:a=[]}=e;return i.map((s,o)=>{const c={key:o,type:"ArrayExpression"},u=[...t,c];return r.jsxRuntimeExports.jsx(j.ItemLayout,{level:t.length,title:`${o}`,description:"",isSelected:m.isSameKeyPath(u,a),onClick:f=>{f.stopPropagation(),n(u)},children:y.createElement(l,{...e,key:o,keyPath:u,section:s})},o)})},W=d.pt.div({marginLeft:"0.5rem",display:"grid",gridTemplateColumns:"auto 1fr",gap:"0.5rem"}),g=d.pt.span({display:"flex",alignItems:"center",fontWeight:"700"}),E=e=>{const{keyPath:t,section:i}=e;return r.jsxRuntimeExports.jsx(W,{children:Object.keys(i).filter(n=>!x.includes(n)).map(n=>{const a={type:p.Enumeration,key:n},s=[...t,a],o=i.enumeration[n];return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(g,{children:n}),y.createElement(l,{...e,key:n,keyPath:s,section:o})]})})})},P=e=>{const{keyPath:t,section:i,focusedKeyPath:n=[],onFocusKeyPath:a}=e;return Object.keys(i).filter(s=>!x.includes(s)).map(s=>{const o={key:s,type:"ObjectExpression"},c=[...t,o];return r.jsxRuntimeExports.jsx(j.ItemLayout,{level:t.length,title:s,description:"",isSelected:m.isSameKeyPath(c,n),onClick:u=>{u.stopPropagation(),a(c)},children:r.jsxRuntimeExports.jsx(l,{...e,keyPath:c,section:i[s]})},s)})},K=e=>{const{keyPath:t,section:i,locale:n}=e,a={type:p.Translation,key:n},s=[...t,a],o=i.translation[n];return r.jsxRuntimeExports.jsx(l,{...e,keyPath:s,section:o})},x=["filePath","id","nodeType"],l=e=>{const{section:t}=e;if(typeof t=="object")return t.nodeType===p.Translation?r.jsxRuntimeExports.jsx(K,{...e,section:t}):t.nodeType===p.Enumeration?r.jsxRuntimeExports.jsx(E,{...e,section:t}):Array.isArray(t)?r.jsxRuntimeExports.jsx(h,{...e,section:t}):r.jsxRuntimeExports.jsx(P,{...e,section:t});if(typeof t=="string")return r.jsxRuntimeExports.jsx(m.StringWrapper,{...e,section:t})};exports.ArrayWrapper=h;exports.EnumerationWrapper=E;exports.NestedObjectWrapper=P;exports.NodeWrapper=l;exports.TranslationWrapper=K;exports.traceKeys=x;
@@ -1,91 +0,0 @@
1
- "use client";
2
- import { j as r } from "./jsx-runtime-Tw_Kw2GZ.js";
3
- import "./localeList-CaRF-907.js";
4
- import { createElement as m } from "react";
5
- import { i as h, S as j } from "./StringWrapper-CW70GPXq.js";
6
- import { ItemLayout as p } from "./components/DictionaryEditor/ItemLayout.es.js";
7
- import { p as d } from "./styled-components.browser.esm-D6kkzXl4.js";
8
- var y = /* @__PURE__ */ ((t) => (t.Translation = "translation", t.Enumeration = "enumeration", t))(y || {});
9
- const x = (t) => {
10
- const {
11
- keyPath: e,
12
- section: o,
13
- onFocusKeyPath: n,
14
- focusedKeyPath: i = []
15
- } = t;
16
- return o.map((a, s) => {
17
- const c = {
18
- key: s,
19
- type: "ArrayExpression"
20
- }, l = [...e, c];
21
- return /* @__PURE__ */ r.jsx(p, { level: e.length, title: `${s}`, description: "", isSelected: h(l, i), onClick: (f) => {
22
- f.stopPropagation(), n(l);
23
- }, children: /* @__PURE__ */ m(u, { ...t, key: s, keyPath: l, section: a }) }, s);
24
- });
25
- }, K = d.div({
26
- marginLeft: "0.5rem",
27
- display: "grid",
28
- gridTemplateColumns: "auto 1fr",
29
- gap: "0.5rem"
30
- }), E = d.span({
31
- display: "flex",
32
- alignItems: "center",
33
- fontWeight: "700"
34
- }), g = (t) => {
35
- const {
36
- keyPath: e,
37
- section: o
38
- } = t;
39
- return /* @__PURE__ */ r.jsx(K, { children: Object.keys(o).filter((n) => !P.includes(n)).map((n) => {
40
- const i = {
41
- type: y.Enumeration,
42
- key: n
43
- }, a = [...e, i], s = o.enumeration[n];
44
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
45
- /* @__PURE__ */ r.jsx(E, { children: n }),
46
- /* @__PURE__ */ m(u, { ...t, key: n, keyPath: a, section: s })
47
- ] });
48
- }) });
49
- }, S = (t) => {
50
- const {
51
- keyPath: e,
52
- section: o,
53
- focusedKeyPath: n = [],
54
- onFocusKeyPath: i
55
- } = t;
56
- return Object.keys(o).filter((a) => !P.includes(a)).map((a) => {
57
- const s = {
58
- key: a,
59
- type: "ObjectExpression"
60
- }, c = [...e, s];
61
- return /* @__PURE__ */ r.jsx(p, { level: e.length, title: a, description: "", isSelected: h(c, n), onClick: (l) => {
62
- l.stopPropagation(), i(c);
63
- }, children: /* @__PURE__ */ r.jsx(u, { ...t, keyPath: c, section: o[a] }) }, a);
64
- });
65
- }, w = (t) => {
66
- const {
67
- keyPath: e,
68
- section: o,
69
- locale: n
70
- } = t, i = {
71
- type: y.Translation,
72
- key: n
73
- }, a = [...e, i], s = o.translation[n];
74
- return /* @__PURE__ */ r.jsx(u, { ...t, keyPath: a, section: s });
75
- }, P = ["filePath", "id", "nodeType"], u = (t) => {
76
- const {
77
- section: e
78
- } = t;
79
- if (typeof e == "object")
80
- return e.nodeType === y.Translation ? /* @__PURE__ */ r.jsx(w, { ...t, section: e }) : e.nodeType === y.Enumeration ? /* @__PURE__ */ r.jsx(g, { ...t, section: e }) : Array.isArray(e) ? /* @__PURE__ */ r.jsx(x, { ...t, section: e }) : /* @__PURE__ */ r.jsx(S, { ...t, section: e });
81
- if (typeof e == "string")
82
- return /* @__PURE__ */ r.jsx(j, { ...t, section: e });
83
- };
84
- export {
85
- x as A,
86
- g as E,
87
- u as N,
88
- w as T,
89
- S as a,
90
- P as t
91
- };