@likec4/diagram 1.19.1 → 1.19.2
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/globals.css.js +0 -1
- package/dist/theme-vars.css.js +1 -0
- package/dist/xyflow/nodes/compound/CompoundNode.js +1 -1
- package/dist/xyflow/nodes/element/ElementNode.js +1 -1
- package/package.json +4 -4
- package/src/xyflow/nodes/compound/CompoundNode.tsx +2 -1
- package/src/xyflow/nodes/element/ElementNode.tsx +2 -1
package/dist/globals.css.js
CHANGED
|
@@ -84,7 +84,6 @@ import "./node_modules/@mantine/core/esm/components/Timeline/Timeline.module.css
|
|
|
84
84
|
import "./node_modules/@mantine/core/esm/components/Title/Title.module.css.mjs.vanilla.css.js";
|
|
85
85
|
import "./node_modules/@mantine/core/esm/components/Tree/Tree.module.css.mjs.vanilla.css.js";
|
|
86
86
|
import "./node_modules/@mantine/core/esm/components/TypographyStylesProvider/TypographyStylesProvider.module.css.mjs.vanilla.css.js";
|
|
87
|
-
import "./theme-vars.css.ts.vanilla.css.js";
|
|
88
87
|
/* empty css */
|
|
89
88
|
var rootClassName = "likec4-diagram-root";
|
|
90
89
|
export {
|
package/dist/theme-vars.css.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "./theme-vars.css.ts.vanilla.css.js";
|
|
1
2
|
var vars = { safariAnimationHook: "var(--likec4-safari-animation-hook)", "default": { font: "var(--likec4-default-font-family)" }, likec4: { font: "var(--likec4-font-family)", background: { color: "var(--likec4-background-color)", pattern: { color: "var(--likec4-background-pattern-color)" } } }, compound: { font: "var(--likec4-compound-font-family)", titleColor: "var(--likec4-compound-title-color)" }, element: { font: "var(--likec4-element-font-family)", fill: "var(--likec4-element-fill)", stroke: "var(--likec4-element-stroke)", hiContrast: "var(--likec4-element-hiContrast)", loContrast: "var(--likec4-element-loContrast)" }, relation: { lineColor: "var(--likec4-relation-lineColor)", labelColor: "var(--likec4-relation-labelColor)", labelBgColor: "var(--likec4-relation-labelBg)" }, optionsPanel: { top: "var(--likec4-options-webview-top)", right: "var(--likec4-options-webview-right)" }, navigationPanel: { top: "var(--likec4-navigation-webview-top)", left: "var(--likec4-navigation-webview-left)" } };
|
|
2
3
|
var xyvars = { background: { color: "var(--xy-background-color)", pattern: { color: "var(--xy-background-pattern-color)" } }, edge: { stroke: "var(--xy-edge-stroke)", strokeSelected: "var(--xy-edge-stroke-selected)", labelColor: "var(--xy-edge-label-color)", labelBgColor: "var(--xy-edge-label-background-color)", strokeWidth: "var(--xy-edge-stroke-width)" }, node: { color: "var(--xy-node-color)", border: "var(--xy-node-border)", backgroundColor: "var(--xy-node-background-color)", groupBackgroundColor: "var(--xy-node-group-background-color)", boxshadowHover: "var(--xy-node-boxshadow-hover)", boxshadowSelected: "var(--xy-node-boxshadow-selected)", borderRadius: "var(--xy-node-border-radius)" } };
|
|
3
4
|
export {
|
|
@@ -93,7 +93,7 @@ const CompoundNodeMemo = /* @__PURE__ */ memo(({
|
|
|
93
93
|
}
|
|
94
94
|
const isHovered = Array.isArray(animateVariant) && animateVariant.includes("hovered");
|
|
95
95
|
const _isToolbarVisible = isNotViewGroup && (selected && !dragging || isHovered);
|
|
96
|
-
const [isToolbarVisible] = useDebouncedValue(_isToolbarVisible, _isToolbarVisible ? 500 :
|
|
96
|
+
const [isToolbarVisible] = useDebouncedValue(_isToolbarVisible, _isToolbarVisible ? 500 : 1e3);
|
|
97
97
|
const nodeVariants = NodeVariants(w, h, {
|
|
98
98
|
selectedScaleBy: 0,
|
|
99
99
|
hoveredScaleBy: 0,
|
|
@@ -84,7 +84,7 @@ const ElementNodeMemo = memo(function ElementNode({
|
|
|
84
84
|
}
|
|
85
85
|
const isHovered = !!animateVariants && animateVariants.includes("hovered");
|
|
86
86
|
const _isToolbarVisible = selected && !dragging || isHovered;
|
|
87
|
-
const [isToolbarVisible] = useDebouncedValue(_isToolbarVisible, _isToolbarVisible ? 500 :
|
|
87
|
+
const [isToolbarVisible] = useDebouncedValue(_isToolbarVisible, _isToolbarVisible ? 500 : 1e3);
|
|
88
88
|
const elementIcon$1 = ElementIcon({
|
|
89
89
|
element,
|
|
90
90
|
viewId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likec4/diagram",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bugs": "https://github.com/likec4/likec4/issues",
|
|
6
6
|
"homepage": "https://likec4.dev",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"./style.css": "./dist/style.css"
|
|
31
31
|
},
|
|
32
|
-
"packageManager": "yarn@4.
|
|
32
|
+
"packageManager": "yarn@4.6.0",
|
|
33
33
|
"scripts": {
|
|
34
34
|
"typecheck": "tsc --noEmit",
|
|
35
35
|
"build": "vite build",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@dagrejs/dagre": "1.1.4",
|
|
42
|
-
"@likec4/core": "1.19.
|
|
42
|
+
"@likec4/core": "1.19.2",
|
|
43
43
|
"@mantine/vanilla-extract": "7.15.2",
|
|
44
44
|
"@react-hookz/web": "^24.0.4",
|
|
45
45
|
"@tabler/icons-react": "3.17.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"react-dom": "^18.3.1"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@likec4/tsconfig": "1.19.
|
|
67
|
+
"@likec4/tsconfig": "1.19.2",
|
|
68
68
|
"@mantine/core": "7.15.2",
|
|
69
69
|
"@mantine/hooks": "7.15.2",
|
|
70
70
|
"@mantine/spotlight": "7.15.2",
|
|
@@ -108,7 +108,8 @@ export const CompoundNodeMemo = /* @__PURE__ */ memo<CompoundNodeProps>((
|
|
|
108
108
|
const isHovered = Array.isArray(animateVariant) && animateVariant.includes('hovered')
|
|
109
109
|
|
|
110
110
|
const _isToolbarVisible = isNotViewGroup && ((selected && !dragging) || isHovered)
|
|
111
|
-
|
|
111
|
+
// TODO: This is a workaround to prevent the toolbar from flickering when the node unhovered
|
|
112
|
+
const [isToolbarVisible] = useDebouncedValue(_isToolbarVisible, _isToolbarVisible ? 500 : 1000)
|
|
112
113
|
|
|
113
114
|
const nodeVariants = NodeVariants(w, h, {
|
|
114
115
|
selectedScaleBy: 0,
|
|
@@ -102,7 +102,8 @@ export const ElementNodeMemo = memo<ElementNodeProps>(function ElementNode({
|
|
|
102
102
|
const isHovered = !!animateVariants && animateVariants.includes('hovered')
|
|
103
103
|
|
|
104
104
|
const _isToolbarVisible = (selected && !dragging) || isHovered
|
|
105
|
-
|
|
105
|
+
// TODO: This is a workaround to prevent the toolbar from flickering when the node unhovered
|
|
106
|
+
const [isToolbarVisible] = useDebouncedValue(_isToolbarVisible, _isToolbarVisible ? 500 : 1000)
|
|
106
107
|
|
|
107
108
|
const elementIcon = ElementIcon({
|
|
108
109
|
element,
|