@likec4/diagram 1.21.1 → 1.22.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.
Files changed (120) hide show
  1. package/dist/LikeC4Diagram.js +9 -13
  2. package/dist/base/index.d.ts +0 -1
  3. package/dist/base/primitives/element/styles.css.js +1 -1
  4. package/dist/{base → components}/Link.css.js +3 -3
  5. package/dist/components/SearchControl.css.d.ts +2 -0
  6. package/dist/components/SearchControl.css.js +7 -0
  7. package/dist/components/SearchControl.d.ts +5 -0
  8. package/dist/components/SearchControl.js +17 -0
  9. package/dist/context/DiagramFeatures.d.ts +1 -1
  10. package/dist/context/IconRenderer.d.ts +10 -0
  11. package/dist/context/IconRenderer.js +34 -0
  12. package/dist/hooks/useCurrentViewId.js +8 -0
  13. package/dist/hooks/useDiagram.d.ts +108 -72
  14. package/dist/hooks/useDiagram.js +3 -0
  15. package/dist/likec4diagram/DiagramActor.js +13 -2
  16. package/dist/likec4diagram/DiagramUI.js +0 -2
  17. package/dist/likec4diagram/XYFlow.d.ts +6 -1
  18. package/dist/likec4diagram/XYFlow.js +37 -31
  19. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +2 -1
  20. package/dist/likec4diagram/state/actorContext.d.ts +620 -468
  21. package/dist/likec4diagram/state/assign.js +1 -1
  22. package/dist/likec4diagram/state/machine.d.ts +120 -74
  23. package/dist/likec4diagram/state/machine.js +32 -12
  24. package/dist/likec4diagram/state/syncManualLayoutActor.js +4 -8
  25. package/dist/likec4diagram/ui/controls/Controls.js +65 -48
  26. package/dist/likec4diagram/ui/controls/NavigationButtons.js +44 -69
  27. package/dist/likec4diagram/ui/controls/ToggleReadonly.d.ts +1 -0
  28. package/dist/likec4diagram/ui/controls/ToggleReadonly.js +29 -0
  29. package/dist/likec4diagram/ui/controls/_shared.js +1 -1
  30. package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +1 -1
  31. package/dist/likec4diagram/ui/search/ElementsColumn.css.d.ts +15 -0
  32. package/dist/likec4diagram/ui/search/ElementsColumn.css.js +30 -0
  33. package/dist/likec4diagram/ui/search/ElementsColumn.d.ts +1 -0
  34. package/dist/likec4diagram/ui/search/ElementsColumn.js +243 -0
  35. package/dist/likec4diagram/ui/search/LikeC4Search.css.d.ts +8 -0
  36. package/dist/likec4diagram/ui/search/LikeC4Search.css.js +20 -0
  37. package/dist/likec4diagram/ui/search/LikeC4Search.d.ts +1 -0
  38. package/dist/likec4diagram/ui/search/LikeC4Search.js +265 -0
  39. package/dist/likec4diagram/ui/search/SearchInput.d.ts +1 -0
  40. package/dist/likec4diagram/ui/search/SearchInput.js +196 -0
  41. package/dist/likec4diagram/ui/search/ViewsColum.d.ts +9 -0
  42. package/dist/likec4diagram/ui/search/ViewsColum.js +130 -0
  43. package/dist/likec4diagram/ui/search/ViewsColumn.css.d.ts +5 -0
  44. package/dist/likec4diagram/ui/search/ViewsColumn.css.js +12 -0
  45. package/dist/likec4diagram/ui/search/_shared.css.d.ts +16 -0
  46. package/dist/likec4diagram/ui/search/_shared.css.js +5 -0
  47. package/dist/likec4diagram/ui/search/state.d.ts +19 -0
  48. package/dist/likec4diagram/ui/search/state.js +72 -0
  49. package/dist/likec4diagram/ui/search/utils.d.ts +3 -0
  50. package/dist/likec4diagram/ui/search/utils.js +23 -0
  51. package/dist/likec4diagram/useLayoutConstraints.js +4 -5
  52. package/dist/likec4model/useLikeC4ElementsTree.d.ts +1 -0
  53. package/dist/likec4model/useLikeC4ElementsTree.js +1 -0
  54. package/dist/overlays/Overlays.js +9 -9
  55. package/dist/overlays/element-details/ElementDetailsCard.js +20 -13
  56. package/dist/overlays/overlay/Overlay.d.ts +6 -2
  57. package/dist/overlays/overlay/Overlay.js +18 -29
  58. package/dist/overlays/relationship-details/SelectEdge.js +1 -3
  59. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -5
  60. package/dist/overlays/relationships-browser/SelectElement.js +10 -6
  61. package/dist/overlays/relationships-browser/actor.d.ts +2 -2
  62. package/dist/overlays/relationships-browser/actor.js +8 -8
  63. package/dist/overlays/relationships-browser/custom/nodeTypes.js +2 -2
  64. package/dist/style.css +1 -1
  65. package/package.json +13 -13
  66. package/src/LikeC4Diagram.tsx +0 -1
  67. package/src/base/index.ts +0 -2
  68. package/src/base/primitives/element/styles.css.ts +2 -2
  69. package/src/{base → components}/Link.css.ts +3 -3
  70. package/src/components/SearchControl.css.ts +69 -0
  71. package/src/components/SearchControl.tsx +33 -0
  72. package/src/context/DiagramFeatures.tsx +1 -1
  73. package/src/context/IconRenderer.tsx +54 -1
  74. package/src/globals.css.ts +0 -2
  75. package/src/hooks/useDiagram.ts +5 -0
  76. package/src/likec4diagram/DiagramActor.tsx +15 -2
  77. package/src/likec4diagram/DiagramUI.tsx +0 -4
  78. package/src/likec4diagram/XYFlow.tsx +39 -31
  79. package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +2 -1
  80. package/src/likec4diagram/state/assign.ts +1 -1
  81. package/src/likec4diagram/state/machine.ts +40 -14
  82. package/src/likec4diagram/state/syncManualLayoutActor.ts +6 -9
  83. package/src/likec4diagram/ui/controls/Controls.tsx +37 -25
  84. package/src/likec4diagram/ui/controls/NavigationButtons.tsx +36 -58
  85. package/src/likec4diagram/ui/controls/ToggleReadonly.tsx +31 -0
  86. package/src/likec4diagram/ui/controls/styles.css.ts +3 -1
  87. package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +1 -1
  88. package/src/likec4diagram/ui/search/ElementsColumn.css.ts +119 -0
  89. package/src/likec4diagram/ui/search/ElementsColumn.tsx +291 -0
  90. package/src/likec4diagram/ui/search/LikeC4Search.css.ts +117 -0
  91. package/src/likec4diagram/ui/search/LikeC4Search.tsx +312 -0
  92. package/src/likec4diagram/ui/search/SearchInput.tsx +235 -0
  93. package/src/likec4diagram/ui/search/ViewsColum.tsx +158 -0
  94. package/src/likec4diagram/ui/search/ViewsColumn.css.ts +37 -0
  95. package/src/likec4diagram/ui/search/_shared.css.ts +104 -0
  96. package/src/likec4diagram/ui/search/state.ts +76 -0
  97. package/src/likec4diagram/ui/search/utils.ts +20 -0
  98. package/src/likec4diagram/useLayoutConstraints.ts +4 -5
  99. package/src/likec4model/useLikeC4ElementsTree.ts +4 -4
  100. package/src/overlays/Overlays.tsx +31 -25
  101. package/src/overlays/element-details/ElementDetailsCard.css.ts +4 -4
  102. package/src/overlays/element-details/ElementDetailsCard.tsx +245 -240
  103. package/src/overlays/overlay/Overlay.css.ts +10 -9
  104. package/src/overlays/overlay/Overlay.tsx +38 -26
  105. package/src/overlays/relationship-details/SelectEdge.css.ts +1 -0
  106. package/src/overlays/relationship-details/SelectEdge.tsx +2 -4
  107. package/src/overlays/relationships-browser/RelationshipsBrowser.tsx +10 -5
  108. package/src/overlays/relationships-browser/SelectElement.tsx +88 -82
  109. package/src/overlays/relationships-browser/actor.ts +10 -10
  110. package/src/overlays/relationships-browser/custom/nodeTypes.tsx +2 -2
  111. package/dist/LikeC4Search.css.d.ts +0 -1
  112. package/dist/LikeC4Search.css.js +0 -5
  113. package/dist/LikeC4Search.d.ts +0 -2
  114. package/dist/LikeC4Search.js +0 -88
  115. package/src/LikeC4Search.css.ts +0 -12
  116. package/src/LikeC4Search.tsx +0 -91
  117. /package/dist/{base → components}/Link.css.d.ts +0 -0
  118. /package/dist/{base → components}/Link.d.ts +0 -0
  119. /package/dist/{base → components}/Link.js +0 -0
  120. /package/src/{base → components}/Link.tsx +0 -0
@@ -0,0 +1,37 @@
1
+ import { fallbackVar, globalStyle, style } from '@vanilla-extract/css'
2
+ import { mantine } from '../../../theme-vars'
3
+ import { button, description, descriptionColor, iconColor, title } from './_shared.css'
4
+
5
+ export { focusable } from './_shared.css'
6
+
7
+ export const viewButton = style([button, {
8
+ flexWrap: 'nowrap',
9
+ display: 'flex',
10
+ }])
11
+
12
+ globalStyle(`${viewButton} .mantine-ThemeIcon-root`, {
13
+ // transition: transitions.fast,
14
+ color: fallbackVar(iconColor, mantine.colors.dark[2]),
15
+ vars: {
16
+ '--ti-size': '24px',
17
+ },
18
+ })
19
+ globalStyle(`${viewButton}[data-disabled] .mantine-ThemeIcon-root`, {
20
+ opacity: 0.45,
21
+ })
22
+
23
+ export const viewTitle = style([title])
24
+ export const viewDescription = style([description])
25
+
26
+ export const viewButtonDescription = style({
27
+ marginTop: 4,
28
+ // transition: transitions.fast,
29
+ color: fallbackVar(descriptionColor, mantine.colors.dimmed),
30
+ fontSize: 13,
31
+ lineHeight: 1.4,
32
+ selectors: {
33
+ [`:where(${viewButton}[data-disabled]) &`]: {
34
+ opacity: 0.85,
35
+ },
36
+ },
37
+ })
@@ -0,0 +1,104 @@
1
+ import { type StyleRule, createVar, fallbackVar, globalStyle, style } from '@vanilla-extract/css'
2
+ import { mantine } from '../../../theme-vars'
3
+ import { whereDark, whereLight } from '../../../theme-vars.css'
4
+
5
+ export const titleColor = createVar('title-color')
6
+ export const descriptionColor = createVar('description-color')
7
+ export const iconColor = createVar('icon-color')
8
+
9
+ export const buttonFocused = {
10
+ outline: 'none',
11
+ backgroundColor: mantine.colors.primaryColors[8],
12
+ borderColor: mantine.colors.primaryColors[9],
13
+ vars: {
14
+ [iconColor]: mantine.colors.primaryColors[2],
15
+ [titleColor]: mantine.colors.primaryColors[0],
16
+ [descriptionColor]: mantine.colors.primaryColors[1],
17
+ },
18
+ } satisfies StyleRule
19
+
20
+ export const button = style({
21
+ display: 'flex',
22
+ width: '100%',
23
+ background: mantine.colors.body,
24
+ borderRadius: mantine.radius.sm,
25
+ padding: `12px 8px 12px 14px`,
26
+ minHeight: 60,
27
+ gap: 10,
28
+ // alignItems: 'flex-start',
29
+ // transition: `all 50ms ${easings.inOut}`,
30
+ border: `1px solid ${mantine.colors.defaultBorder}`,
31
+ vars: {
32
+ [titleColor]: mantine.colors.dark[1],
33
+ [iconColor]: mantine.colors.dimmed,
34
+ [descriptionColor]: mantine.colors.dimmed,
35
+ },
36
+ ':hover': {
37
+ ...buttonFocused,
38
+ borderColor: mantine.colors.primaryColors[9],
39
+ backgroundColor: `color-mix(in srgb, ${buttonFocused.backgroundColor}, transparent 40%)`,
40
+ },
41
+ ':focus': buttonFocused,
42
+ selectors: {
43
+ [`${whereDark} &`]: {
44
+ borderColor: 'transparent',
45
+ backgroundColor: `color-mix(in srgb, ${mantine.colors.dark[6]}, transparent 20%)`,
46
+ // background: mantine.colors.dark[6],
47
+ },
48
+ [`${whereLight} &`]: {
49
+ backgroundColor: `color-mix(in srgb, ${mantine.colors.white}, transparent 10%)`,
50
+ vars: {
51
+ [iconColor]: mantine.colors.gray[6],
52
+ [titleColor]: mantine.colors.gray[7],
53
+ },
54
+ },
55
+ [`${whereLight} &:hover`]: {
56
+ borderColor: mantine.colors.primaryColors[6],
57
+ backgroundColor: mantine.colors.primaryColors[5],
58
+ vars: {
59
+ [iconColor]: mantine.colors.primaryColors[3],
60
+ [titleColor]: mantine.colors.primaryColors[0],
61
+ [descriptionColor]: mantine.colors.primaryColors[1],
62
+ },
63
+ },
64
+ },
65
+ })
66
+
67
+ export const focusable = style({})
68
+
69
+ export const title = style({
70
+ color: fallbackVar(titleColor, mantine.colors.gray[7]),
71
+ fontSize: 16,
72
+ fontWeight: 500,
73
+ lineHeight: 1.1,
74
+ selectors: {
75
+ [`:where([data-disabled]) &`]: {
76
+ opacity: 0.4,
77
+ },
78
+ },
79
+ })
80
+ export const description = style({
81
+ marginTop: 4,
82
+ color: fallbackVar(descriptionColor, mantine.colors.dimmed),
83
+ fontSize: 12,
84
+ lineHeight: 1.4,
85
+ selectors: {
86
+ [`:where([data-disabled]) &`]: {
87
+ opacity: 0.85,
88
+ },
89
+ },
90
+ })
91
+
92
+ export const emptyBoX = style({
93
+ width: '100%',
94
+ height: '100%',
95
+ border: `2px dashed ${mantine.colors.defaultBorder}`,
96
+ borderRadius: mantine.radius.md,
97
+ display: 'flex',
98
+ justifyContent: 'center',
99
+ alignItems: 'center',
100
+ fontSize: mantine.fontSizes.md,
101
+ color: mantine.colors.dimmed,
102
+ padding: mantine.spacing.md,
103
+ paddingBlock: mantine.spacing.xl,
104
+ })
@@ -0,0 +1,76 @@
1
+ import { type Fqn, type LikeC4Model, type ViewId, DiagramNode } from '@likec4/core'
2
+ import { createSafeContext } from '@mantine/core'
3
+ import { useCallbackRef } from '@mantine/hooks'
4
+ import { useStore } from '@nanostores/react'
5
+ import { atom, computed, onMount } from 'nanostores'
6
+ import { useDeferredValue } from 'react'
7
+ import { useDiagram } from '../../../hooks/useDiagram'
8
+
9
+ const $search = atom('')
10
+
11
+ export function setSearch(term: string) {
12
+ $search.set(term)
13
+ }
14
+
15
+ export function useSearch() {
16
+ return useStore($search)
17
+ }
18
+
19
+ const $normalizedSearch = computed($search, search => {
20
+ const v = search.trim().toLowerCase()
21
+ return v.length > 1 ? v : ''
22
+ })
23
+ export function useNormalizedSearch() {
24
+ return useDeferredValue(useStore($normalizedSearch))
25
+ }
26
+
27
+ export const [LikeC4SearchContext, useCloseSearch] = createSafeContext<(cb?: () => void) => void>('LikeC4Search')
28
+
29
+ type PickView = {
30
+ elementFqn: Fqn
31
+ scoped: LikeC4Model.View[]
32
+ others: LikeC4Model.View[]
33
+ }
34
+ const $pickView = atom<PickView | null>(null)
35
+ onMount($search, () => {
36
+ // reset search on mount
37
+ $pickView.set(null)
38
+ })
39
+
40
+ export function usePickView() {
41
+ return useStore($pickView)
42
+ }
43
+ export function setPickView(data: PickView | null) {
44
+ $pickView.set(data)
45
+ }
46
+ export function wasResetPickView() {
47
+ if ($pickView.get() !== null) {
48
+ $pickView.set(null)
49
+ return true
50
+ }
51
+ return false
52
+ }
53
+
54
+ const $pickViewActive = computed($pickView, pickView => pickView !== null)
55
+ export function useIsPickViewActive() {
56
+ return useStore($pickViewActive)
57
+ }
58
+
59
+ export function useCloseSearchAndNavigateTo() {
60
+ const diagram = useDiagram()
61
+ const close = useCloseSearch()
62
+ return useCallbackRef((viewId: ViewId, fromElementFqn?: Fqn) => {
63
+ close(() => {
64
+ fromElementFqn ??= $pickView.get()?.elementFqn
65
+ setPickView(null)
66
+ const fromNode = fromElementFqn
67
+ ? diagram.getContext().view.nodes.find(n => DiagramNode.modelRef(n) === fromElementFqn)?.id
68
+ : undefined
69
+ if (diagram.currentView().id === viewId && fromNode) {
70
+ diagram.focusNode(fromNode)
71
+ return
72
+ }
73
+ diagram.navigateTo(viewId, fromNode)
74
+ })
75
+ })
76
+ }
@@ -0,0 +1,20 @@
1
+ export function stopAndPrevent(e: React.KeyboardEvent | KeyboardEvent) {
2
+ e.stopPropagation()
3
+ e.preventDefault()
4
+ return
5
+ }
6
+
7
+ export function centerY(element: HTMLElement) {
8
+ const rect = element.getBoundingClientRect()
9
+ const y = rect.y + Math.floor(rect.height / 2)
10
+ return y
11
+ }
12
+
13
+ export function moveFocusToSearchInput() {
14
+ const input = document.getElementById('likec4searchinput') as HTMLInputElement | null
15
+ if (input) {
16
+ const length = input.value.length
17
+ input.focus()
18
+ input.setSelectionRange(length, length)
19
+ }
20
+ }
@@ -5,7 +5,6 @@ import { useMemo, useRef } from 'react'
5
5
  import { filter, hasAtLeast, isNullish, map, pipe } from 'remeda'
6
6
  import { type XYStoreApi, useXYStoreApi } from '../hooks'
7
7
  // import { type XYStoreApi } from '../hooks/useXYFlow'
8
- import { useSyncedRef } from '@react-hookz/web'
9
8
  import { useDiagram } from '../hooks/useDiagram'
10
9
  import type { Types } from './types'
11
10
 
@@ -255,11 +254,11 @@ type LayoutConstraints = {
255
254
  */
256
255
  export function useLayoutConstraints(): LayoutConstraints {
257
256
  const xystore = useXYStoreApi()
258
- const diagram = useSyncedRef(useDiagram())
257
+ const diagram = useDiagram()
259
258
  const solverRef = useRef<ReturnType<typeof createLayoutConstraints>>(undefined)
260
259
  return useMemo((): LayoutConstraints => ({
261
260
  onNodeDragStart: (_event, xynode) => {
262
- diagram.current.cancelSaveManualLayout()
261
+ diagram.cancelSaveManualLayout()
263
262
  const { nodeLookup } = xystore.getState()
264
263
  const draggingNodes = pipe(
265
264
  Array.from(nodeLookup.values()),
@@ -280,9 +279,9 @@ export function useLayoutConstraints(): LayoutConstraints {
280
279
  },
281
280
  onNodeDragStop: () => {
282
281
  solverRef.current?.updateXYFlowNodes()
283
- diagram.current.scheduleSaveManualLayout()
282
+ diagram.scheduleSaveManualLayout()
284
283
  // diagramApi.getState().scheduleSaveManualLayout()
285
284
  solverRef.current = undefined
286
285
  },
287
- }), [xystore])
286
+ }), [xystore, diagram])
288
287
  }
@@ -1,4 +1,4 @@
1
- import { compareNatural, type Fqn, type LikeC4Model, type ViewId } from '@likec4/core'
1
+ import { type Fqn, type LikeC4Model, type ViewId, compareNatural } from '@likec4/core'
2
2
  import { useMemo } from 'react'
3
3
  import { useLikeC4Model } from './useLikeC4Model'
4
4
 
@@ -8,15 +8,15 @@ interface LikeC4ModelTreeNodeData {
8
8
  children: LikeC4ModelTreeNodeData[]
9
9
  }
10
10
 
11
- const sortByLabel = (a: LikeC4ModelTreeNodeData, b: LikeC4ModelTreeNodeData) => compareNatural(a.label, b.label)
11
+ export const sortByLabel = (a: LikeC4ModelTreeNodeData, b: LikeC4ModelTreeNodeData) => compareNatural(a.label, b.label)
12
12
 
13
13
  function buildNode(
14
- element: LikeC4Model.Node | LikeC4Model.Element
14
+ element: LikeC4Model.Node | LikeC4Model.Element,
15
15
  ): LikeC4ModelTreeNodeData {
16
16
  return {
17
17
  label: element.title,
18
18
  value: element.id,
19
- children: [...element.children()].map(buildNode).sort(sortByLabel)
19
+ children: [...element.children()].map(buildNode).sort(sortByLabel),
20
20
  }
21
21
  }
22
22
 
@@ -2,7 +2,7 @@ import { Box, Button, Code, Group, Notification } from '@mantine/core'
2
2
  import { useCallbackRef } from '@mantine/hooks'
3
3
  import { IconX } from '@tabler/icons-react'
4
4
  import { deepEqual } from 'fast-equals'
5
- import { useReducedMotion } from 'framer-motion'
5
+ import { AnimatePresence, useReducedMotion } from 'framer-motion'
6
6
  import { animate } from 'framer-motion/dom'
7
7
  import { memo, useEffect, useMemo } from 'react'
8
8
  import { type FallbackProps, ErrorBoundary } from 'react-error-boundary'
@@ -96,32 +96,38 @@ export const Overlays = memo(() => {
96
96
  return (
97
97
  <DiagramFeatures.Overlays>
98
98
  <ErrorBoundary FallbackComponent={Fallback} onReset={onClose}>
99
- {relationshipsBrowserActor && (
100
- <Overlay
101
- key={'relationships-browser'}
102
- onClose={onClose}>
103
- <RelationshipsBrowser actorRef={relationshipsBrowserActor} />
104
- </Overlay>
105
- )}
106
- {relationshipDetailsActor && (
107
- <Overlay
108
- key={'relationship-details'}
109
- onClose={onClose}>
110
- <RelationshipDetails actorRef={relationshipDetailsActor} />
111
- </Overlay>
112
- )}
99
+ <AnimatePresence onExitComplete={onClose}>
100
+ {relationshipsBrowserActor && (
101
+ <Overlay
102
+ key={'relationships-browser'}
103
+ onClose={() => relationshipsBrowserActor.send({ type: 'close' })}>
104
+ <RelationshipsBrowser actorRef={relationshipsBrowserActor} />
105
+ </Overlay>
106
+ )}
107
+ </AnimatePresence>
108
+ <AnimatePresence onExitComplete={onClose}>
109
+ {relationshipDetailsActor && (
110
+ <Overlay
111
+ key={'relationship-details'}
112
+ onClose={() => relationshipDetailsActor.send({ type: 'close' })}>
113
+ <RelationshipDetails actorRef={relationshipDetailsActor} />
114
+ </Overlay>
115
+ )}
116
+ </AnimatePresence>
113
117
 
114
118
  {/* TODO: Somehow ElementDetailsCard does not work properly inside AnimatePresence} */}
115
- {!!activeElementDetailsOf && (
116
- <ElementDetailsCard
117
- key={'element-details'}
118
- fqn={activeElementDetailsOf}
119
- viewId={viewId}
120
- fromNode={fromNode}
121
- rectFromNode={rectFromNode}
122
- onClose={onClose}
123
- />
124
- )}
119
+ <AnimatePresence>
120
+ {!!activeElementDetailsOf && (
121
+ <ElementDetailsCard
122
+ key={'element-details'}
123
+ fqn={activeElementDetailsOf}
124
+ viewId={viewId}
125
+ fromNode={fromNode}
126
+ rectFromNode={rectFromNode}
127
+ onClose={onClose}
128
+ />
129
+ )}
130
+ </AnimatePresence>
125
131
  </ErrorBoundary>
126
132
  </DiagramFeatures.Overlays>
127
133
  )
@@ -11,10 +11,10 @@ export const dialog = style({
11
11
  padding: 0,
12
12
  position: 'fixed',
13
13
  inset: 0,
14
- width: '100%',
15
- height: '100%',
16
- maxWidth: '100%',
17
- maxHeight: '100%',
14
+ width: '100vw',
15
+ height: '100vh',
16
+ maxWidth: '100vw',
17
+ maxHeight: '100vh',
18
18
  background: 'transparent',
19
19
  border: '0 solid transparent',
20
20
  vars: {