likec4 0.56.0 → 0.57.1
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/__app__/src/components/CopyToClipboard.jsx +9 -8
- package/dist/__app__/src/components/sidebar/DiagramsTree.jsx +1 -1
- package/dist/__app__/src/components/view-page/ViewActions.jsx +1 -0
- package/dist/__app__/src/pages/view-page/other-formats/ViewAsD2.jsx +1 -1
- package/dist/__app__/src/pages/view-page/other-formats/ViewAsDot.jsx +1 -1
- package/dist/__app__/src/pages/view-page/other-formats/ViewAsMmd.jsx +1 -1
- package/dist/__app__/src/pages/view.page.jsx +2 -1
- package/dist/cli/index.js +238 -232
- package/package.json +7 -7
- package/dist/__app__/tsconfig.json +0 -32
|
@@ -12,17 +12,18 @@ export function CopyToClipboard({ text }) {
|
|
|
12
12
|
setCopied(false);
|
|
13
13
|
}, [text]);
|
|
14
14
|
useEffect(() => {
|
|
15
|
-
if (copied) {
|
|
16
|
-
|
|
17
|
-
setCopied(false);
|
|
18
|
-
}, 800);
|
|
19
|
-
return () => clearTimeout(timeout);
|
|
15
|
+
if (!copied) {
|
|
16
|
+
return;
|
|
20
17
|
}
|
|
18
|
+
const timeout = setTimeout(() => {
|
|
19
|
+
setCopied(false);
|
|
20
|
+
}, 800);
|
|
21
|
+
return () => clearTimeout(timeout);
|
|
21
22
|
}, [copied]);
|
|
22
|
-
return (<Box position=
|
|
23
|
+
return (<Box position="absolute" top={'0'} right={'0'} p={'4'}>
|
|
23
24
|
<Tooltip content={copied ? 'Copied!' : 'Copy to clipboard'} {...(copied ? { open: true } : {})}>
|
|
24
|
-
<IconButton variant=
|
|
25
|
-
{copied ?
|
|
25
|
+
<IconButton variant="soft" color={copied ? 'green' : undefined} size={'2'} radius="large" onClick={copy} data-copied={copied} className={styles.copyButton}>
|
|
26
|
+
{copied ? <CheckCircledIcon width={16} height={16}/> : <CopyIcon width={16} height={16}/>}
|
|
26
27
|
</IconButton>
|
|
27
28
|
</Tooltip>
|
|
28
29
|
</Box>);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DashboardIcon, TriangleRightIcon } from '@radix-ui/react-icons';
|
|
2
2
|
import { Box, Flex, Text } from '@radix-ui/themes';
|
|
3
|
-
import TreeView from 'react-accessible-treeview';
|
|
3
|
+
import TreeView, {} from 'react-accessible-treeview';
|
|
4
4
|
import { useDiagramsTree } from '../../data';
|
|
5
5
|
import { $pages, useRoute } from '../../router';
|
|
6
6
|
import { cn } from '../../utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, Button, Code, ScrollArea } from '@radix-ui/themes';
|
|
1
|
+
import { Box, Button, Code, Flex, ScrollArea } from '@radix-ui/themes';
|
|
2
2
|
import { useAsync } from '@react-hookz/web';
|
|
3
3
|
import { d2Source } from 'virtual:likec4/d2-sources';
|
|
4
4
|
import { CopyToClipboard } from '../../../components';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, Code, ScrollArea } from '@radix-ui/themes';
|
|
1
|
+
import { Box, Code, Grid, ScrollArea } from '@radix-ui/themes';
|
|
2
2
|
import { dotSource, svgSource } from 'virtual:likec4/dot-sources';
|
|
3
3
|
import { CopyToClipboard } from '../../../components';
|
|
4
4
|
import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Suspense } from 'react';
|
|
1
|
+
import { Fragment, Suspense } from 'react';
|
|
2
2
|
import { DiagramNotFound } from '../components';
|
|
3
3
|
import { Header } from '../components/view-page/Header';
|
|
4
4
|
import { useLikeC4View } from '../data';
|
|
5
|
+
import { useSearchParams } from '../router';
|
|
5
6
|
import { ViewAs, ViewAsReact } from './view-page';
|
|
6
7
|
export function ViewPage({ viewId, viewMode, showUI = true }) {
|
|
7
8
|
const diagram = useLikeC4View(viewId);
|