@intlayer/design-system 2.0.12 → 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.
- package/dist/.vite/manifest.json +70 -23
- package/dist/{MarkDownRender-BeQGOIow.cjs → MarkDownRender-7oiSvDiM.cjs} +1 -1
- package/dist/{MarkDownRender-gURA8GAt.js → MarkDownRender-JEDIcxQT.js} +138 -137
- package/dist/chevron-right-D3LPoNy5.js +14 -0
- package/dist/chevron-right-bKrhRS9t.cjs +6 -0
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.js +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.es.js +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs.js +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.es.js +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs.js +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.es.js +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs.js +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.es.js +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs.js +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.es.js +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.cjs.js +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/index.es.js +4 -2
- package/dist/components/IDE/CodeRender.cjs.js +18 -3
- package/dist/components/IDE/CodeRender.es.js +22239 -200
- package/dist/components/IDE/FileTree.cjs.js +1 -0
- package/dist/components/IDE/FileTree.d.ts +10 -0
- package/dist/components/IDE/FileTree.es.js +112 -0
- package/dist/components/IDE/IDE.cjs.js +1 -1
- package/dist/components/IDE/IDE.d.ts +5 -4
- package/dist/components/IDE/IDE.es.js +109 -49
- package/dist/components/IDE/MarkDownRender.cjs.js +1 -1
- package/dist/components/IDE/MarkDownRender.es.js +2 -2
- package/dist/components/IDE/createFileTree.cjs.js +1 -0
- package/dist/components/IDE/createFileTree.d.ts +6 -0
- package/dist/components/IDE/createFileTree.es.js +25 -0
- package/dist/components/MarkDownRender/index.cjs.js +1 -1
- package/dist/components/MarkDownRender/index.es.js +1 -1
- package/dist/components/RedirectionButton/RedirectionButton.cjs.js +1 -6
- package/dist/components/RedirectionButton/RedirectionButton.es.js +5 -13
- package/dist/components/RightDrawer/RightDrawer.cjs.js +3 -3
- package/dist/components/RightDrawer/RightDrawer.es.js +36 -30
- package/dist/components/WithResizer/index.cjs.js +1 -0
- package/dist/components/WithResizer/index.d.ts +9 -0
- package/dist/components/WithResizer/index.es.js +82 -0
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.es.js +16 -14
- package/dist/index-CJEkIqT6.cjs +1 -0
- package/dist/index-DBWNacRP.js +133 -0
- package/package.json +5 -8
- package/dist/index-B2ncVbtX.cjs +0 -1
- package/dist/index-D-PWvdb-.js +0 -91
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-D6agescH.cjs"),c=require("../../styled-components.browser.esm-GqWwDlfY.cjs"),f=require("react"),v=require("../MaxHeightSmoother/index.cjs.js"),j=require("./createFileTree.cjs.js"),k=require("../../chevron-right-bKrhRS9t.cjs"),S=c.pt.div({display:"flex",width:"100%",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start",paddingTop:"0.25rem",paddingBottom:"0.25rem","--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=c.pt.div(({$isActive:t})=>[{display:"flex",width:"100%",alignItems:"flex-start",justifyContent:"flex-start",whiteSpace:"pre",textWrap:"nowrap",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"},t?{"--tw-bg-opacity":"1",backgroundColor:"rgba(209, 209, 209, var(--tw-bg-opacity))",'&:where([data-theme="dark"], [data-theme="dark"] *)':{"--tw-bg-opacity":"1",backgroundColor:"rgba(79, 79, 79, var(--tw-bg-opacity))"}}:{cursor:"pointer","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgba(176, 176, 176, var(--tw-bg-opacity))"},'&:where([data-theme="dark"], [data-theme="dark"] *):hover':{"--tw-bg-opacity":"1",backgroundColor:"rgba(61, 61, 61, var(--tw-bg-opacity))"}}]),E=c.pt.span(({$isFile:t})=>[{whiteSpace:"pre"},t&&{marginLeft:"0.5rem"}]),T=c.pt(k.ChevronRight)(({$isActive:t})=>[{transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"},t&&{"--tw-rotate":"90deg",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))"}]),P=c.pt(v.MaxHeightSmoother)({overflowX:"hidden"}),g=t=>t.join("/"),q=({filesPaths:t,path:r,subPath:d,onClickFile:a,activeFile:l,prePaths:o,isFile:i})=>{const[n,h]=f.useState(!0),p=o.length+1,m=g([...o.slice(p-1,p),r]),x=g([...o,r]),w=t.map(s=>s.replace(/^\/?/,"")).filter(s=>s.startsWith(m)).map(s=>s.replace(m,"").replace(/^\/?/,"")),b=x===l,y=new Array(p).fill(" ").join("");return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(R,{$isActive:b,onClick:()=>{i?a==null||a(x):h(!n)},children:[e.jsxRuntimeExports.jsx(E,{$isFile:i,children:y}),!i&&e.jsxRuntimeExports.jsx(T,{size:16,$isActive:n}),r]},r),d&&e.jsxRuntimeExports.jsx(P,{isHidden:!n,children:e.jsxRuntimeExports.jsx(u,{filesPaths:w,activeFile:l,onClickFile:a,prePaths:[...o,r]})})]})},u=({filesPaths:t,activeFile:r,onClickFile:d,prePaths:a=[]})=>{const l=j.createFileTree(t);return e.jsxRuntimeExports.jsx(S,{children:l.map(({path:o,subPath:i,isFile:n})=>e.jsxRuntimeExports.jsx(q,{isFile:n,subPath:i,path:o,onClickFile:d,activeFile:r,prePaths:a,filesPaths:t},o))})};exports.FileTree=u;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as e } from "../../jsx-runtime-Tw_Kw2GZ.js";
|
|
3
|
+
import { p as c } from "../../styled-components.browser.esm-D6kkzXl4.js";
|
|
4
|
+
import { useState as y } from "react";
|
|
5
|
+
import { MaxHeightSmoother as u } from "../MaxHeightSmoother/index.es.js";
|
|
6
|
+
import { createFileTree as v } from "./createFileTree.es.js";
|
|
7
|
+
import { C as k } from "../../chevron-right-D3LPoNy5.js";
|
|
8
|
+
const j = c.div({
|
|
9
|
+
display: "flex",
|
|
10
|
+
width: "100%",
|
|
11
|
+
flexDirection: "column",
|
|
12
|
+
alignItems: "flex-start",
|
|
13
|
+
justifyContent: "flex-start",
|
|
14
|
+
paddingTop: "0.25rem",
|
|
15
|
+
paddingBottom: "0.25rem",
|
|
16
|
+
"--tw-text-opacity": "1",
|
|
17
|
+
color: "rgba(93, 93, 93, var(--tw-text-opacity))",
|
|
18
|
+
'&:where([data-theme="dark"], [data-theme="dark"] *)': {
|
|
19
|
+
"--tw-text-opacity": "1",
|
|
20
|
+
color: "rgba(136, 136, 136, var(--tw-text-opacity))"
|
|
21
|
+
}
|
|
22
|
+
}), S = c.div(({
|
|
23
|
+
$isActive: t
|
|
24
|
+
}) => [{
|
|
25
|
+
display: "flex",
|
|
26
|
+
width: "100%",
|
|
27
|
+
alignItems: "flex-start",
|
|
28
|
+
justifyContent: "flex-start",
|
|
29
|
+
whiteSpace: "pre",
|
|
30
|
+
textWrap: "nowrap",
|
|
31
|
+
paddingLeft: "0.5rem",
|
|
32
|
+
paddingRight: "0.5rem",
|
|
33
|
+
paddingTop: "0.25rem",
|
|
34
|
+
paddingBottom: "0.25rem",
|
|
35
|
+
fontSize: "0.75rem",
|
|
36
|
+
lineHeight: "1rem",
|
|
37
|
+
transitionProperty: "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
|
|
38
|
+
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
39
|
+
transitionDuration: "150ms"
|
|
40
|
+
}, t ? {
|
|
41
|
+
"--tw-bg-opacity": "1",
|
|
42
|
+
backgroundColor: "rgba(209, 209, 209, var(--tw-bg-opacity))",
|
|
43
|
+
'&:where([data-theme="dark"], [data-theme="dark"] *)': {
|
|
44
|
+
"--tw-bg-opacity": "1",
|
|
45
|
+
backgroundColor: "rgba(79, 79, 79, var(--tw-bg-opacity))"
|
|
46
|
+
}
|
|
47
|
+
} : {
|
|
48
|
+
cursor: "pointer",
|
|
49
|
+
"&:hover": {
|
|
50
|
+
"--tw-bg-opacity": "1",
|
|
51
|
+
backgroundColor: "rgba(176, 176, 176, var(--tw-bg-opacity))"
|
|
52
|
+
},
|
|
53
|
+
'&:where([data-theme="dark"], [data-theme="dark"] *):hover': {
|
|
54
|
+
"--tw-bg-opacity": "1",
|
|
55
|
+
backgroundColor: "rgba(61, 61, 61, var(--tw-bg-opacity))"
|
|
56
|
+
}
|
|
57
|
+
}]), P = c.span(({
|
|
58
|
+
$isFile: t
|
|
59
|
+
}) => [{
|
|
60
|
+
whiteSpace: "pre"
|
|
61
|
+
}, t && {
|
|
62
|
+
marginLeft: "0.5rem"
|
|
63
|
+
}]), T = c(k)(({
|
|
64
|
+
$isActive: t
|
|
65
|
+
}) => [{
|
|
66
|
+
transitionProperty: "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
|
|
67
|
+
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
68
|
+
transitionDuration: "150ms"
|
|
69
|
+
}, t && {
|
|
70
|
+
"--tw-rotate": "90deg",
|
|
71
|
+
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))"
|
|
72
|
+
}]), C = c(u)({
|
|
73
|
+
overflowX: "hidden"
|
|
74
|
+
}), w = (t) => t.join("/"), z = ({
|
|
75
|
+
filesPaths: t,
|
|
76
|
+
path: r,
|
|
77
|
+
subPath: d,
|
|
78
|
+
onClickFile: a,
|
|
79
|
+
activeFile: l,
|
|
80
|
+
prePaths: o,
|
|
81
|
+
isFile: i
|
|
82
|
+
}) => {
|
|
83
|
+
const [n, h] = y(!0), m = o.length + 1, p = w([...o.slice(m - 1, m), r]), g = w([...o, r]), f = t.map(
|
|
84
|
+
(s) => s.replace(/^\/?/, "")
|
|
85
|
+
// This regex matches the first slash, if it exists, at the start of the string)
|
|
86
|
+
).filter((s) => s.startsWith(p)).map((s) => s.replace(p, "").replace(/^\/?/, "")), b = g === l, x = new Array(m).fill(" ").join("");
|
|
87
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
88
|
+
/* @__PURE__ */ e.jsxs(S, { $isActive: b, onClick: () => {
|
|
89
|
+
i ? a == null || a(g) : h(!n);
|
|
90
|
+
}, children: [
|
|
91
|
+
/* @__PURE__ */ e.jsx(P, { $isFile: i, children: x }),
|
|
92
|
+
!i && /* @__PURE__ */ e.jsx(T, { size: 16, $isActive: n }),
|
|
93
|
+
r
|
|
94
|
+
] }, r),
|
|
95
|
+
d && /* @__PURE__ */ e.jsx(C, { isHidden: !n, children: /* @__PURE__ */ e.jsx(A, { filesPaths: f, activeFile: l, onClickFile: a, prePaths: [...o, r] }) })
|
|
96
|
+
] });
|
|
97
|
+
}, A = ({
|
|
98
|
+
filesPaths: t,
|
|
99
|
+
activeFile: r,
|
|
100
|
+
onClickFile: d,
|
|
101
|
+
prePaths: a = []
|
|
102
|
+
}) => {
|
|
103
|
+
const l = v(t);
|
|
104
|
+
return /* @__PURE__ */ e.jsx(j, { children: l.map(({
|
|
105
|
+
path: o,
|
|
106
|
+
subPath: i,
|
|
107
|
+
isFile: n
|
|
108
|
+
}) => /* @__PURE__ */ e.jsx(z, { isFile: n, subPath: i, path: o, onClickFile: d, activeFile: r, prePaths: a, filesPaths: t }, o)) });
|
|
109
|
+
};
|
|
110
|
+
export {
|
|
111
|
+
A as FileTree
|
|
112
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../jsx-runtime-D6agescH.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../jsx-runtime-D6agescH.cjs"),e=require("../../styled-components.browser.esm-GqWwDlfY.cjs"),g=require("react"),j=require("../Container/index.cjs.js"),k=require("../WithResizer/index.cjs.js"),C=require("./FileTree.cjs.js"),R=require("../../MarkDownRender-7oiSvDiM.cjs"),S=e.pt(j.Container)({display:"flex",height:"100%",width:"100%",flexDirection:"column",justifyContent:"flex-start",overflow:"scroll","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"}),E=e.pt.div({position:"relative",display:"flex",height:"100%",width:"100%",flex:"1 1 0%",flexDirection:"row",justifyContent:"flex-start","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"}),T=e.pt.div({marginLeft:"0.5rem",marginRight:"0.5rem",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem",padding:"0.25rem"}),I=e.pt.div({position:"absolute",left:"0px",top:"0px",height:"100%",width:"100%"}),p=e.pt.div({height:"0.75rem",width:"0.75rem",borderRadius:"9999px"}),D=e.pt(p)({"--tw-bg-opacity":"1",backgroundColor:"rgb(239 68 68 / var(--tw-bg-opacity))"}),_=e.pt(p)({"--tw-bg-opacity":"1",backgroundColor:"rgb(234 179 8 / var(--tw-bg-opacity))"}),z=e.pt(p)({"--tw-bg-opacity":"1",backgroundColor:"rgb(34 197 94 / var(--tw-bg-opacity))"}),q=e.pt.div({display:"flex",height:"100%",width:"100%",overflowY:"auto"}),B=e.pt.div({display:"flex",width:"auto",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:"0.25rem",borderTopLeftRadius:"1.5rem",borderTopRightRadius:"1.5rem","--tw-bg-opacity":"1",backgroundColor:"rgba(209, 209, 209, var(--tw-bg-opacity))",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-bg-opacity":"1",backgroundColor:"rgba(48, 48, 48, var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgba(136, 136, 136, var(--tw-text-opacity))"}}),P=e.pt.div(({$isActive:a})=>[{display:"flex",height:"2rem",minWidth:"5rem",alignItems:"center",justifyContent:"flex-start",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"},a?{"--tw-bg-opacity":"1",backgroundColor:"rgba(231, 231, 231, var(--tw-bg-opacity))",'&:where([data-theme="dark"], [data-theme="dark"] *)':{"--tw-bg-opacity":"1",backgroundColor:"rgba(39, 39, 39, var(--tw-bg-opacity))"}}:{cursor:"pointer","--tw-bg-opacity":"1",backgroundColor:"rgba(209, 209, 209, var(--tw-bg-opacity))","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgba(176, 176, 176, var(--tw-bg-opacity))"},'&:where([data-theme="dark"], [data-theme="dark"] *)':{"--tw-bg-opacity":"1",backgroundColor:"rgba(48, 48, 48, var(--tw-bg-opacity))"},'&:where([data-theme="dark"], [data-theme="dark"] *):hover':{"--tw-bg-opacity":"1",backgroundColor:"rgba(39, 39, 39, var(--tw-bg-opacity))"}}]),W=e.pt.div({height:"100%",width:"100%",flex:"1 1 0%",overflow:"auto",paddingTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem","@media (min-width: 768px)":{fontSize:"0.875rem",lineHeight:"1.25rem"}}),F=e.pt.div({display:"flex",height:"100%",width:"100%"}),M=({pages:a,isDarkMode:h,...w})=>{const[n,b]=g.useState(a),c=n.filter(({isOpen:o})=>o),m=c.findIndex(({isOpen:o})=>o),[l,x]=g.useState(m),{content:u,path:y}=n[l],f=a.map(({path:o})=>o),v=o=>{if(!n.find(({path:r})=>r===o))return;const i=n.map(r=>r.path===o?{...r,isOpen:!0}:r);b(i);const s=i.findIndex(({path:r})=>r===o);x(s)};return t.jsxRuntimeExports.jsxs(S,{roundedSize:"3xl",transparency:"none",...w,children:[t.jsxRuntimeExports.jsxs(B,{children:[t.jsxRuntimeExports.jsxs(T,{children:[t.jsxRuntimeExports.jsx(D,{}),t.jsxRuntimeExports.jsx(_,{}),t.jsxRuntimeExports.jsx(z,{})]}),t.jsxRuntimeExports.jsx(q,{children:c.map(({path:o},d)=>{const i=o.split("/"),s=i[i.length-1];return t.jsxRuntimeExports.jsx(P,{onClick:()=>x(d),$isActive:l===d,children:s},s)})})]}),t.jsxRuntimeExports.jsx(E,{children:t.jsxRuntimeExports.jsx(I,{children:t.jsxRuntimeExports.jsxs(F,{children:[t.jsxRuntimeExports.jsx(k.WithResizer,{initialWidth:20,children:t.jsxRuntimeExports.jsx(C.FileTree,{filesPaths:f,activeFile:y,onClickFile:v})}),t.jsxRuntimeExports.jsx(W,{children:t.jsxRuntimeExports.jsx(R.MarkdownRenderer,{isDarkMode:h,children:u})})]})})})]})};exports.IDE=M;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { HTMLAttributes, FC } from 'react';
|
|
2
2
|
|
|
3
3
|
export type IDEProps = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
pages: {
|
|
5
|
+
path: string;
|
|
6
6
|
content: string;
|
|
7
|
+
isOpen?: boolean;
|
|
7
8
|
}[];
|
|
8
9
|
isDarkMode?: boolean;
|
|
9
|
-
}
|
|
10
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
10
11
|
export declare const IDE: FC<IDEProps>;
|
|
@@ -1,39 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as t } from "../../jsx-runtime-Tw_Kw2GZ.js";
|
|
3
3
|
import { p as o } from "../../styled-components.browser.esm-D6kkzXl4.js";
|
|
4
|
-
import { useState as
|
|
5
|
-
import { Container as
|
|
6
|
-
import {
|
|
7
|
-
|
|
4
|
+
import { useState as h } from "react";
|
|
5
|
+
import { Container as k } from "../Container/index.es.js";
|
|
6
|
+
import { WithResizer as C } from "../WithResizer/index.es.js";
|
|
7
|
+
import { FileTree as j } from "./FileTree.es.js";
|
|
8
|
+
import { M as S } from "../../MarkDownRender-JEDIcxQT.js";
|
|
9
|
+
const T = o(k)({
|
|
8
10
|
display: "flex",
|
|
9
11
|
height: "100%",
|
|
10
12
|
width: "100%",
|
|
11
13
|
flexDirection: "column",
|
|
14
|
+
justifyContent: "flex-start",
|
|
12
15
|
overflow: "scroll",
|
|
13
16
|
"--tw-shadow": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
14
17
|
"--tw-shadow-colored": "0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",
|
|
15
18
|
boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"
|
|
16
|
-
}),
|
|
19
|
+
}), R = o.div({
|
|
20
|
+
position: "relative",
|
|
17
21
|
display: "flex",
|
|
22
|
+
height: "100%",
|
|
18
23
|
width: "100%",
|
|
19
|
-
|
|
24
|
+
flex: "1 1 0%",
|
|
25
|
+
flexDirection: "row",
|
|
20
26
|
justifyContent: "flex-start",
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
backgroundColor: "rgba(209, 209, 209, var(--tw-bg-opacity))",
|
|
26
|
-
fontSize: "0.75rem",
|
|
27
|
-
lineHeight: "1rem",
|
|
28
|
-
"--tw-text-opacity": "1",
|
|
29
|
-
color: "rgba(93, 93, 93, var(--tw-text-opacity))",
|
|
30
|
-
'&:where([data-theme="dark"], [data-theme="dark"] *)': {
|
|
31
|
-
"--tw-bg-opacity": "1",
|
|
32
|
-
backgroundColor: "rgba(48, 48, 48, var(--tw-bg-opacity))",
|
|
33
|
-
"--tw-text-opacity": "1",
|
|
34
|
-
color: "rgba(136, 136, 136, var(--tw-text-opacity))"
|
|
35
|
-
}
|
|
36
|
-
}), w = o.div({
|
|
27
|
+
"--tw-shadow": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
28
|
+
"--tw-shadow-colored": "0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",
|
|
29
|
+
boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"
|
|
30
|
+
}), z = o.div({
|
|
37
31
|
marginLeft: "0.5rem",
|
|
38
32
|
marginRight: "0.5rem",
|
|
39
33
|
display: "flex",
|
|
@@ -41,27 +35,59 @@ const b = o(s)({
|
|
|
41
35
|
justifyContent: "flex-start",
|
|
42
36
|
gap: "0.5rem",
|
|
43
37
|
padding: "0.25rem"
|
|
44
|
-
}),
|
|
38
|
+
}), I = o.div({
|
|
39
|
+
position: "absolute",
|
|
40
|
+
left: "0px",
|
|
41
|
+
top: "0px",
|
|
42
|
+
height: "100%",
|
|
43
|
+
width: "100%"
|
|
44
|
+
}), c = o.div({
|
|
45
45
|
height: "0.75rem",
|
|
46
46
|
width: "0.75rem",
|
|
47
47
|
borderRadius: "9999px"
|
|
48
|
-
}),
|
|
48
|
+
}), B = o(c)({
|
|
49
49
|
"--tw-bg-opacity": "1",
|
|
50
50
|
backgroundColor: "rgb(239 68 68 / var(--tw-bg-opacity))"
|
|
51
|
-
}),
|
|
51
|
+
}), D = o(c)({
|
|
52
52
|
"--tw-bg-opacity": "1",
|
|
53
53
|
backgroundColor: "rgb(234 179 8 / var(--tw-bg-opacity))"
|
|
54
|
-
}),
|
|
54
|
+
}), P = o(c)({
|
|
55
55
|
"--tw-bg-opacity": "1",
|
|
56
56
|
backgroundColor: "rgb(34 197 94 / var(--tw-bg-opacity))"
|
|
57
|
-
}),
|
|
58
|
-
|
|
57
|
+
}), W = o.div({
|
|
58
|
+
display: "flex",
|
|
59
|
+
height: "100%",
|
|
60
|
+
width: "100%",
|
|
61
|
+
overflowY: "auto"
|
|
62
|
+
}), F = o.div({
|
|
63
|
+
display: "flex",
|
|
64
|
+
width: "auto",
|
|
65
|
+
flexDirection: "row",
|
|
66
|
+
alignItems: "center",
|
|
67
|
+
justifyContent: "flex-start",
|
|
68
|
+
gap: "0.25rem",
|
|
69
|
+
borderTopLeftRadius: "1.5rem",
|
|
70
|
+
borderTopRightRadius: "1.5rem",
|
|
71
|
+
"--tw-bg-opacity": "1",
|
|
72
|
+
backgroundColor: "rgba(209, 209, 209, var(--tw-bg-opacity))",
|
|
73
|
+
fontSize: "0.75rem",
|
|
74
|
+
lineHeight: "1rem",
|
|
75
|
+
"--tw-text-opacity": "1",
|
|
76
|
+
color: "rgba(93, 93, 93, var(--tw-text-opacity))",
|
|
77
|
+
'&:where([data-theme="dark"], [data-theme="dark"] *)': {
|
|
78
|
+
"--tw-bg-opacity": "1",
|
|
79
|
+
backgroundColor: "rgba(48, 48, 48, var(--tw-bg-opacity))",
|
|
80
|
+
"--tw-text-opacity": "1",
|
|
81
|
+
color: "rgba(136, 136, 136, var(--tw-text-opacity))"
|
|
82
|
+
}
|
|
83
|
+
}), M = o.div(({
|
|
84
|
+
$isActive: i
|
|
59
85
|
}) => [{
|
|
60
86
|
display: "flex",
|
|
61
87
|
height: "2rem",
|
|
62
88
|
minWidth: "5rem",
|
|
63
89
|
alignItems: "center",
|
|
64
|
-
justifyContent: "
|
|
90
|
+
justifyContent: "flex-start",
|
|
65
91
|
paddingLeft: "0.75rem",
|
|
66
92
|
paddingRight: "0.75rem",
|
|
67
93
|
paddingTop: "0.25rem",
|
|
@@ -69,7 +95,7 @@ const b = o(s)({
|
|
|
69
95
|
transitionProperty: "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
|
|
70
96
|
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
71
97
|
transitionDuration: "150ms"
|
|
72
|
-
},
|
|
98
|
+
}, i ? {
|
|
73
99
|
"--tw-bg-opacity": "1",
|
|
74
100
|
backgroundColor: "rgba(231, 231, 231, var(--tw-bg-opacity))",
|
|
75
101
|
'&:where([data-theme="dark"], [data-theme="dark"] *)': {
|
|
@@ -92,8 +118,11 @@ const b = o(s)({
|
|
|
92
118
|
"--tw-bg-opacity": "1",
|
|
93
119
|
backgroundColor: "rgba(39, 39, 39, var(--tw-bg-opacity))"
|
|
94
120
|
}
|
|
95
|
-
}]),
|
|
96
|
-
|
|
121
|
+
}]), A = o.div({
|
|
122
|
+
height: "100%",
|
|
123
|
+
width: "100%",
|
|
124
|
+
flex: "1 1 0%",
|
|
125
|
+
overflow: "auto",
|
|
97
126
|
paddingTop: "0.5rem",
|
|
98
127
|
fontSize: "0.75rem",
|
|
99
128
|
lineHeight: "1rem",
|
|
@@ -101,27 +130,58 @@ const b = o(s)({
|
|
|
101
130
|
fontSize: "0.875rem",
|
|
102
131
|
lineHeight: "1.25rem"
|
|
103
132
|
}
|
|
104
|
-
}),
|
|
105
|
-
|
|
106
|
-
|
|
133
|
+
}), H = o.div({
|
|
134
|
+
display: "flex",
|
|
135
|
+
height: "100%",
|
|
136
|
+
width: "100%"
|
|
137
|
+
}), J = ({
|
|
138
|
+
pages: i,
|
|
139
|
+
isDarkMode: w,
|
|
140
|
+
...x
|
|
107
141
|
}) => {
|
|
108
|
-
const [
|
|
109
|
-
|
|
110
|
-
} =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
142
|
+
const [n, b] = h(i), l = n.filter(({
|
|
143
|
+
isOpen: e
|
|
144
|
+
}) => e), m = l.findIndex(({
|
|
145
|
+
isOpen: e
|
|
146
|
+
}) => e), [p, g] = h(m), {
|
|
147
|
+
content: f,
|
|
148
|
+
path: y
|
|
149
|
+
} = n[p], u = i.map(({
|
|
150
|
+
path: e
|
|
151
|
+
}) => e), v = (e) => {
|
|
152
|
+
if (!n.find(({
|
|
153
|
+
path: r
|
|
154
|
+
}) => r === e)) return;
|
|
155
|
+
const a = n.map((r) => r.path === e ? {
|
|
156
|
+
...r,
|
|
157
|
+
isOpen: !0
|
|
158
|
+
} : r);
|
|
159
|
+
b(a);
|
|
160
|
+
const d = a.findIndex(({
|
|
161
|
+
path: r
|
|
162
|
+
}) => r === e);
|
|
163
|
+
g(d);
|
|
164
|
+
};
|
|
165
|
+
return /* @__PURE__ */ t.jsxs(T, { roundedSize: "3xl", transparency: "none", ...x, children: [
|
|
166
|
+
/* @__PURE__ */ t.jsxs(F, { children: [
|
|
167
|
+
/* @__PURE__ */ t.jsxs(z, { children: [
|
|
168
|
+
/* @__PURE__ */ t.jsx(B, {}),
|
|
169
|
+
/* @__PURE__ */ t.jsx(D, {}),
|
|
170
|
+
/* @__PURE__ */ t.jsx(P, {})
|
|
117
171
|
] }),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
},
|
|
172
|
+
/* @__PURE__ */ t.jsx(W, { children: l.map(({
|
|
173
|
+
path: e
|
|
174
|
+
}, s) => {
|
|
175
|
+
const a = e.split("/"), d = a[a.length - 1];
|
|
176
|
+
return /* @__PURE__ */ t.jsx(M, { onClick: () => g(s), $isActive: p === s, children: d }, d);
|
|
177
|
+
}) })
|
|
121
178
|
] }),
|
|
122
|
-
/* @__PURE__ */ t.jsx(
|
|
179
|
+
/* @__PURE__ */ t.jsx(R, { children: /* @__PURE__ */ t.jsx(I, { children: /* @__PURE__ */ t.jsxs(H, { children: [
|
|
180
|
+
/* @__PURE__ */ t.jsx(C, { initialWidth: 20, children: /* @__PURE__ */ t.jsx(j, { filesPaths: u, activeFile: y, onClickFile: v }) }),
|
|
181
|
+
/* @__PURE__ */ t.jsx(A, { children: /* @__PURE__ */ t.jsx(S, { isDarkMode: w, children: f }) })
|
|
182
|
+
] }) }) })
|
|
123
183
|
] });
|
|
124
184
|
};
|
|
125
185
|
export {
|
|
126
|
-
|
|
186
|
+
J as IDE
|
|
127
187
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../jsx-runtime-D6agescH.cjs");const e=require("../../MarkDownRender-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../jsx-runtime-D6agescH.cjs");const e=require("../../MarkDownRender-7oiSvDiM.cjs");require("./CodeRender.cjs.js");exports.MarkdownRenderer=e.MarkdownRenderer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../jsx-runtime-Tw_Kw2GZ.js";
|
|
3
|
-
import {
|
|
3
|
+
import { M as i } from "../../MarkDownRender-JEDIcxQT.js";
|
|
4
4
|
import "./CodeRender.es.js";
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as MarkdownRenderer
|
|
7
7
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=h=>{const r={path:"",subPath:[],isFile:!1};return h.forEach(n=>{const a=n.split("/").filter(t=>t!=="");let e=r;for(let t=0;t<a.length;t++){const i=a[t],l=t===a.length-1;e.subPath||(e.subPath=[]);let s=e.subPath.find(o=>o.path===i);s||(s={path:i,isFile:l,subPath:l?void 0:[]},e.subPath.push(s)),e=s}}),r.subPath??[]};exports.createFileTree=u;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const u = (l) => {
|
|
3
|
+
const h = {
|
|
4
|
+
path: "",
|
|
5
|
+
subPath: [],
|
|
6
|
+
isFile: !1
|
|
7
|
+
};
|
|
8
|
+
return l.forEach((n) => {
|
|
9
|
+
const a = n.split("/").filter((t) => t !== "");
|
|
10
|
+
let e = h;
|
|
11
|
+
for (let t = 0; t < a.length; t++) {
|
|
12
|
+
const i = a[t], r = t === a.length - 1;
|
|
13
|
+
e.subPath || (e.subPath = []);
|
|
14
|
+
let s = e.subPath.find((o) => o.path === i);
|
|
15
|
+
s || (s = {
|
|
16
|
+
path: i,
|
|
17
|
+
isFile: r,
|
|
18
|
+
subPath: r ? void 0 : []
|
|
19
|
+
}, e.subPath.push(s)), e = s;
|
|
20
|
+
}
|
|
21
|
+
}), h.subPath ?? [];
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
u as createFileTree
|
|
25
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../jsx-runtime-D6agescH.cjs"),r=require("../../styled-components.browser.esm-GqWwDlfY.cjs"),d=require("../../MarkDownRender-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../jsx-runtime-D6agescH.cjs"),r=require("../../styled-components.browser.esm-GqWwDlfY.cjs"),d=require("../../MarkDownRender-7oiSvDiM.cjs"),c=require("../Container/index.cjs.js"),o=require("../Headers/index.cjs.js"),i=require("../Headers/SectionScroller.cjs.js"),s=require("../IDE/CodeRender.cjs.js");require("../IDE/IDE.cjs.js");const p=r.pt.strong({borderRadius:"0.25rem",backgroundColor:"rgba(231, 231, 231, 0.6)",padding:"0.25rem","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)","--tw-backdrop-blur":"blur(8px)",backdropFilter:"var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)",'&:where([data-theme="dark"], [data-theme="dark"] *)':{backgroundColor:"rgba(39, 39, 39, 0.6)"}}),l=r.pt.ul({marginTop:"1.25rem",display:"flex",flexDirection:"column",gap:"0.75rem",paddingLeft:"1.25rem"}),x=r.pt.ul({marginTop:"1.25rem",display:"flex",flexDirection:"column",gap:"0.75rem",paddingLeft:"1.25rem"}),m=r.pt.div({display:"flex",flexDirection:"column",gap:"1.5rem",padding:"2.5rem","--tw-text-opacity":"1",color:"rgba(18, 18, 18, var(--tw-text-opacity))",'&:where([data-theme="dark"], [data-theme="dark"] *)':{"--tw-text-opacity":"1",color:"rgba(255, 245, 237, var(--tw-text-opacity))"}}),w=r.pt.a({"--tw-text-opacity":"1",color:"rgba(93, 93, 93, var(--tw-text-opacity))",textDecorationLine:"underline",'&:where([data-theme="dark"], [data-theme="dark"] *)':{"--tw-text-opacity":"1",color:"rgba(136, 136, 136, var(--tw-text-opacity))"}}),u=r.pt.img({maxWidth:"100%",borderRadius:"0.375rem"}),b=r.pt.blockquote({marginTop:"1.25rem",display:"flex",flexDirection:"column",gap:"0.75rem",borderLeftWidth:"4px","--tw-border-opacity":"1",borderColor:"rgba(231, 231, 231, var(--tw-border-opacity))",paddingLeft:"1.25rem","--tw-text-opacity":"1",color:"rgba(93, 93, 93, var(--tw-text-opacity))",'&:where([data-theme="dark"], [data-theme="dark"] *)':{"--tw-border-opacity":"1",borderColor:"rgba(39, 39, 39, var(--tw-border-opacity))","--tw-text-opacity":"1",color:"rgba(136, 136, 136, var(--tw-text-opacity))"}}),g=({children:a,isDarkMode:n})=>t.jsxRuntimeExports.jsx(d.Markdown,{options:{overrides:{h1:{component:o.H1},h2:{component:o.H2},h3:{component:o.H3},code:{component:e=>typeof e.className>"u"?t.jsxRuntimeExports.jsx(p,{children:e.children}):t.jsxRuntimeExports.jsx(c.Container,{className:"max-w-full overflow-x-scroll",children:t.jsxRuntimeExports.jsx(s.Code,{isDarkMode:n,showLineNumbers:!1,...e})})},blockquote:e=>t.jsxRuntimeExports.jsx(b,{...e}),ul:l,ol:x,img:e=>t.jsxRuntimeExports.jsx(u,{...e,loading:"lazy",src:`${e.src}?raw=true`}),a:w},wrapper:e=>t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(i.SectionScroller,{}),t.jsxRuntimeExports.jsx(m,{...e})]})},children:a??""});exports.MarkdownRenderer=g;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as t } from "../../jsx-runtime-Tw_Kw2GZ.js";
|
|
3
3
|
import { p as o } from "../../styled-components.browser.esm-D6kkzXl4.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as d } from "../../MarkDownRender-JEDIcxQT.js";
|
|
5
5
|
import { Container as c } from "../Container/index.es.js";
|
|
6
6
|
import { H1 as i, H2 as l, H3 as p } from "../Headers/index.es.js";
|
|
7
7
|
import { SectionScroller as n } from "../Headers/SectionScroller.es.js";
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-D6agescH.cjs"),r=require("../../styled-components.browser.esm-GqWwDlfY.cjs"),s=require("../../
|
|
2
|
-
* @license lucide-react v0.376.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const i=s.createLucideIcon("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),c=r.pt.button({display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",gap:"0.5rem",borderRadius:"0.25rem",padding:"0.5rem","&:hover":{backgroundColor:"rgb(241 245 249 / 0.3)"},"&:focus":{outline:"2px solid transparent",outlineOffset:"2px"},"&:disabled":{cursor:"not-allowed",opacity:"0.5"}}),u=({children:t,label:o,...n})=>e.jsxRuntimeExports.jsxs(c,{"aria-label":o,...n,children:[t,e.jsxRuntimeExports.jsx(i,{})]});exports.RedirectionButton=u;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-D6agescH.cjs"),r=require("../../styled-components.browser.esm-GqWwDlfY.cjs"),s=require("../../chevron-right-bKrhRS9t.cjs"),i=r.pt.button({display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",gap:"0.5rem",borderRadius:"0.25rem",padding:"0.5rem","&:hover":{backgroundColor:"rgb(241 245 249 / 0.3)"},"&:focus":{outline:"2px solid transparent",outlineOffset:"2px"},"&:disabled":{cursor:"not-allowed",opacity:"0.5"}}),u=({children:t,label:o,...n})=>e.jsxRuntimeExports.jsxs(i,{"aria-label":o,...n,children:[t,e.jsxRuntimeExports.jsx(s.ChevronRight,{})]});exports.RedirectionButton=u;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as t } from "../../jsx-runtime-Tw_Kw2GZ.js";
|
|
3
3
|
import { p as n } from "../../styled-components.browser.esm-D6kkzXl4.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
* @license lucide-react v0.376.0 - ISC
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the ISC license.
|
|
9
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/
|
|
11
|
-
const s = i("ChevronRight", [
|
|
12
|
-
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
13
|
-
]), a = n.button({
|
|
4
|
+
import { C as s } from "../../chevron-right-D3LPoNy5.js";
|
|
5
|
+
const i = n.button({
|
|
14
6
|
display: "flex",
|
|
15
7
|
width: "100%",
|
|
16
8
|
alignItems: "center",
|
|
@@ -29,14 +21,14 @@ const s = i("ChevronRight", [
|
|
|
29
21
|
cursor: "not-allowed",
|
|
30
22
|
opacity: "0.5"
|
|
31
23
|
}
|
|
32
|
-
}),
|
|
24
|
+
}), d = ({
|
|
33
25
|
children: e,
|
|
34
26
|
label: o,
|
|
35
27
|
...r
|
|
36
|
-
}) => /* @__PURE__ */ t.jsxs(
|
|
28
|
+
}) => /* @__PURE__ */ t.jsxs(i, { "aria-label": o, ...r, children: [
|
|
37
29
|
e,
|
|
38
30
|
/* @__PURE__ */ t.jsx(s, {})
|
|
39
31
|
] });
|
|
40
32
|
export {
|
|
41
|
-
|
|
33
|
+
d as RedirectionButton
|
|
42
34
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-D6agescH.cjs"),t=require("../../styled-components.browser.esm-GqWwDlfY.cjs"),c=require("react"),g=require("../../hooks/useDevice.cjs.js"),j=require("../../hooks/useScrollBlockage/index.cjs.js"),y=require("../Container/index.cjs.js"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-D6agescH.cjs"),t=require("../../styled-components.browser.esm-GqWwDlfY.cjs"),c=require("react"),g=require("../../hooks/useDevice.cjs.js"),j=require("../../hooks/useScrollBlockage/index.cjs.js"),y=require("../Container/index.cjs.js"),w=require("../MaxWidthSmoother/index.cjs.js"),S=require("./useRightDrawerStore.cjs.js"),R=require("../../createLucideIcon-ZOnO-fn6.cjs"),v=require("../../x-DIXoN4xe.cjs");/**
|
|
2
2
|
* @license lucide-react v0.376.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const C=
|
|
6
|
+
*/const C=R.createLucideIcon("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),E=t.pt.div({position:"fixed",right:"0px",top:"0px",zIndex:"50",display:"flex",height:"100%",justifyContent:"flex-end"}),_=t.pt(y.Container)(()=>[{position:"relative",display:"flex",height:"100vh",width:"100vw",flexDirection:"column","--tw-text-opacity":"1",color:"rgba(18, 18, 18, var(--tw-text-opacity))","@media (min-width: 768px)":{width:"400px"},'&:where([data-theme="dark"], [data-theme="dark"] *)':{"--tw-text-opacity":"1",color:"rgba(255, 245, 237, var(--tw-text-opacity))"}}]),D=t.pt.div({display:"flex",flexDirection:"column",gap:"0.75rem",padding:"1.5rem"}),q=t.pt.div({display:"flex",justifyContent:"space-between",gap:"0.75rem"}),k=t.pt.div({display:"flex",height:"100%",flexDirection:"column",overflowY:"auto",padding:"0.5rem"}),L=t.pt.div({flex:"1 1 0%"}),I=t.pt.button({display:"flex",cursor:"pointer",flexDirection:"row",alignItems:"center",gap:"0.25rem",textAlign:"left"}),b=t.pt.h2({display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.125rem",lineHeight:"1.75rem",fontWeight:"700"}),M=t.pt(v.X)`
|
|
7
7
|
${{marginLeft:"auto",cursor:"pointer"}}
|
|
8
|
-
`,
|
|
8
|
+
`,z=({title:a,identifier:s,children:x,header:u,closeOnOutsideClick:d=!0,backButton:n})=>{const{isMobile:p}=g.useDevice("md"),l=c.useRef(null),h=c.useRef(null),{isOpen:i,close:o}=S.useRightDrawerStore(s)();j.useScrollBlockage({disableScroll:i,key:s?"right_drawer":`right_drawer_${s}`}),c.useEffect(()=>{const r=f=>{i&&d&&l.current&&!l.current.contains(f.target)&&o()};return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[i,o,d]);const m=r=>{r.target===r.currentTarget&&p&&o()};return e.jsxRuntimeExports.jsx(E,{children:e.jsxRuntimeExports.jsx(w.MaxWidthSmoother,{isHidden:!i,align:"right",children:e.jsxRuntimeExports.jsxs(_,{ref:l,roundedSize:"none",children:[e.jsxRuntimeExports.jsxs(D,{children:[e.jsxRuntimeExports.jsxs(q,{children:[e.jsxRuntimeExports.jsx("div",{children:n&&e.jsxRuntimeExports.jsxs(I,{onClick:n.onBack,children:[e.jsxRuntimeExports.jsx(C,{}),n==null?void 0:n.text]})}),e.jsxRuntimeExports.jsx(M,{onClick:o})]}),e.jsxRuntimeExports.jsx(b,{children:a}),u]}),e.jsxRuntimeExports.jsx(k,{children:e.jsxRuntimeExports.jsx(L,{onClick:m,ref:h,children:x})})]})})})};exports.RightDrawer=z;
|