@likec4/diagram 1.59.2 → 1.59.4
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/README.md +53 -0
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +36 -21
- package/dist/LikeC4Diagram.props.d.ts +23 -0
- package/dist/LikeC4MantineProvider.d.ts +24 -0
- package/dist/LikeC4MantineProvider.js +156 -0
- package/dist/LikeC4ProjectsOverview.js +1 -1
- package/dist/LikeC4ProjectsProvider.d.ts +17 -2
- package/dist/LikeC4Styles.d.ts +13 -3
- package/dist/LikeC4Styles.js +10 -6
- package/dist/LikeC4View.js +2 -2
- package/dist/StaticLikeC4Diagram.d.ts +1 -1
- package/dist/base/BaseXYFlow.d.ts +1 -1
- package/dist/base/BaseXYFlow.js +19 -9
- package/dist/base/const.d.ts +1 -0
- package/dist/base/const.js +3 -1
- package/dist/base-primitives/Markdown.d.ts +3 -3
- package/dist/base-primitives/compound/CompoundNodeContainer.js +2 -3
- package/dist/base-primitives/compound/CompoundTitle.js +5 -4
- package/dist/base-primitives/compound/actionbtns.css.d.ts +3 -3
- package/dist/base-primitives/compound/actionbtns.css.js +3 -3
- package/dist/base-primitives/element/ElementData.js +6 -1
- package/dist/base-primitives/element/ElementShape.js +9 -10
- package/dist/base-primitives/element/ElementTags.d.ts +2 -2
- package/dist/base-primitives/element/ElementTags.js +5 -5
- package/dist/components/EmptyBox.d.ts +3 -0
- package/dist/components/EmptyBox.js +9 -0
- package/dist/components/ErrorFallback.js +7 -6
- package/dist/components/FloatingWindow.d.ts +18 -0
- package/dist/components/FloatingWindow.js +89 -0
- package/dist/components/Link.js +7 -7
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +5 -6
- package/dist/components/SearchControl.css.js +10 -12
- package/dist/components/ViewIcon.d.ts +11 -0
- package/dist/components/ViewIcon.js +71 -0
- package/dist/context/CurrentViewModelProvider.js +2 -1
- package/dist/context/DiagramEventHandlers.js +4 -2
- package/dist/context/EnsureMantine.js +3 -3
- package/dist/context/IconRenderer.d.ts +2 -1
- package/dist/context/IconRenderer.js +78 -26
- package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
- package/dist/context/TagStylesContext.d.ts +11 -4
- package/dist/context/TagStylesContext.js +39 -27
- package/dist/custom/index.d.ts +3 -0
- package/dist/custom/index.js +7 -4
- package/dist/editor/LikeC4EditorCallbacks.d.ts +20 -1
- package/dist/editor/LikeC4EditorCallbacks.js +4 -1
- package/dist/editor/actor/setup.d.ts +1 -0
- package/dist/editor/actor/setup.js +17 -12
- package/dist/editor/actor/state.sync-queue.js +1 -0
- package/dist/editor/applyChangesToManualLayout.js +5 -2
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/useEditorActorLogic.js +10 -3
- package/dist/hooks/safeContext.d.ts +12 -4
- package/dist/hooks/safeContext.js +2 -2
- package/dist/hooks/useCurrentView.js +5 -5
- package/dist/hooks/useDiagram.js +3 -23
- package/dist/hooks/useDiagramCompareLayout.d.ts +16 -6
- package/dist/hooks/useDiagramCompareLayout.js +20 -17
- package/dist/hooks/useEditorActor.js +3 -5
- package/dist/hooks/useLikeC4Model.js +8 -3
- package/dist/hooks/useLikeC4Project.d.ts +4 -3
- package/dist/hooks/useOverlaysActor.d.ts +1 -1
- package/dist/hooks/useUpdateEffect.js +2 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +8 -6
- package/dist/likec4diagram/DiagramUI.js +4 -3
- package/dist/likec4diagram/DiagramXYFlow.d.ts +6 -0
- package/dist/likec4diagram/DiagramXYFlow.js +33 -19
- package/dist/likec4diagram/custom/edges/EdgeDrifts.js +4 -4
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +2 -4
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +1 -3
- package/dist/likec4diagram/custom/edges/edges.css.js +13 -13
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +3 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +2 -2
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +4 -4
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +2 -2
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.js +8 -5
- package/dist/likec4diagram/custom/nodes/nodes.js +8 -5
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +9 -8
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +3 -2
- package/dist/likec4diagram/relationship-popover/components.d.ts +1 -1
- package/dist/likec4diagram/relationship-popover/components.js +6 -2
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +7 -2
- package/dist/likec4diagram/state/DiagramActorProvider.js +20 -4
- package/dist/likec4diagram/state/assign.js +1 -1
- package/dist/likec4diagram/state/createViewChange.js +1 -6
- package/dist/likec4diagram/state/diagram-api.d.ts +2 -2
- package/dist/likec4diagram/state/diagram-api.js +3 -2
- package/dist/likec4diagram/state/machine.actions.js +15 -8
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +1 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +7 -5
- package/dist/likec4diagram/state/machine.setup.d.ts +10 -1
- package/dist/likec4diagram/state/machine.setup.js +15 -9
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +2 -26
- package/dist/likec4diagram/state/machine.state.initializing.js +9 -6
- package/dist/likec4diagram/state/machine.state.navigating.js +1 -1
- package/dist/likec4diagram/state/machine.state.ready.d.ts +134 -3
- package/dist/likec4diagram/state/machine.state.ready.js +2 -1
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +106 -1
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +40 -7
- package/dist/likec4diagram/state/utils.d.ts +1 -1
- package/dist/likec4diagram/state/utils.js +7 -4
- package/dist/likec4diagram/ui/FloatingSequenceActors.js +2 -1
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +16 -10
- package/dist/likec4diagram/ui/index.d.ts +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +13 -15
- package/dist/likec4diagram/ui/notation/NotationPanel.js +9 -9
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.d.ts +9 -0
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.js +81 -0
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.d.ts +11 -0
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.js +70 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.js +106 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.js +140 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.d.ts +17 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.js +83 -0
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.d.ts +4 -0
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.js +49 -525
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.d.ts +8 -0
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.js +52 -0
- package/dist/likec4diagram/ui/sequence-outline/StepRow.d.ts +7 -0
- package/dist/likec4diagram/ui/sequence-outline/StepRow.js +190 -0
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.d.ts +238 -0
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.js +94 -0
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.d.ts +21 -0
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.js +71 -0
- package/dist/likec4diagram/ui/sequence-outline/index.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/motion.d.ts +13 -0
- package/dist/likec4diagram/ui/sequence-outline/motion.js +21 -0
- package/dist/likec4diagram/ui/sequence-outline/presentation.d.ts +10 -0
- package/dist/likec4diagram/ui/sequence-outline/presentation.js +80 -0
- package/dist/likec4diagram/ui/sequence-outline/tree.d.ts +9 -0
- package/dist/likec4diagram/ui/sequence-outline/tree.js +67 -0
- package/dist/likec4diagram/ui/sequence-outline/{state.d.ts → types.d.ts} +4 -2
- package/dist/likec4diagram/ui/sequence-outline/types.js +12 -0
- package/dist/likec4diagram/useLayoutConstraints.js +13 -1
- package/dist/likec4diagram/xyflow-sequence/layouter.js +8 -10
- package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.js +1 -0
- package/dist/likec4diagram/xyflow-sequence/utils.js +0 -1
- package/dist/navigationpanel/NavigationPanel.js +45 -41
- package/dist/navigationpanel/NavigationPanelControls.js +102 -63
- package/dist/navigationpanel/NavigationPanelDropdown.js +52 -77
- package/dist/navigationpanel/_common.d.ts +6 -6
- package/dist/navigationpanel/_common.js +31 -42
- package/dist/navigationpanel/actor.actions.js +6 -5
- package/dist/navigationpanel/actor.js +2 -2
- package/dist/navigationpanel/actor.setup.d.ts +6 -6
- package/dist/navigationpanel/actor.setup.js +2 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -4
- package/dist/navigationpanel/comparepanel/ComparePanel.js +8 -10
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +11 -9
- package/dist/navigationpanel/controls/LayoutWarning.js +69 -72
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +8 -8
- package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
- package/dist/navigationpanel/controls/OpenSource.js +5 -8
- package/dist/navigationpanel/controls/SearchControl.js +24 -9
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +4 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +56 -76
- package/dist/navigationpanel/controls/ViewDetailsButton.d.ts +5 -0
- package/dist/navigationpanel/controls/ViewDetailsButton.js +121 -0
- package/dist/navigationpanel/controls/index.d.ts +1 -1
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +27 -16
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.js +2 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +12 -10
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +2 -0
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +19 -10
- package/dist/navigationpanel/editorpanel/styles.js +8 -15
- package/dist/navigationpanel/hooks.d.ts +6 -2
- package/dist/navigationpanel/styles.css.d.ts +2 -2
- package/dist/navigationpanel/styles.css.js +0 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -2
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +5 -4
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +10 -39
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.d.ts +1 -0
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.js +49 -0
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +8 -8
- package/dist/navigationpanel/windows/ViewDetailsWindow.d.ts +1 -0
- package/dist/navigationpanel/windows/ViewDetailsWindow.js +379 -0
- package/dist/overlays/Overlays.js +29 -17
- package/dist/overlays/element-details/ElementDetailsCard.css.js +28 -36
- package/dist/overlays/element-details/ElementDetailsCard.js +3 -3
- package/dist/overlays/element-details/MetadataValue.js +18 -16
- package/dist/overlays/element-details/TabPanelDeployments.css.js +6 -14
- package/dist/overlays/element-details/TabPanelRelationships.css.js +8 -12
- package/dist/overlays/element-details/TabPanelStructure.css.js +4 -8
- package/dist/overlays/hooks.d.ts +3 -1
- package/dist/overlays/overlay/Overlay.js +8 -7
- package/dist/overlays/overlaysActor.js +20 -17
- package/dist/overlays/relationship-details/RelationshipDetails.js +2 -1
- package/dist/overlays/relationship-details/SelectEdge.css.js +14 -9
- package/dist/overlays/relationship-details/actor.js +1 -1
- package/dist/overlays/relationship-details/hooks.js +2 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +6 -0
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +15 -8
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -8
- package/dist/overlays/relationships-browser/SelectElement.js +5 -1
- package/dist/overlays/relationships-browser/actor.js +3 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.js +39 -38
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +7 -9
- package/dist/overlays/relationships-browser/hooks.js +2 -1
- package/dist/projects-overview/ProjectsOverview.js +8 -7
- package/dist/projects-overview/actor.js +1 -1
- package/dist/projects-overview/hooks.js +2 -1
- package/dist/search/Search.js +9 -7
- package/dist/search/components/ElementsColumn.css.js +6 -5
- package/dist/search/components/ElementsColumn.js +4 -3
- package/dist/search/components/SearchByTags.js +3 -3
- package/dist/search/components/ViewsColum.js +46 -43
- package/dist/search/components/ViewsColumn.css.js +4 -4
- package/dist/search/components/_shared.css.d.ts +2 -2
- package/dist/search/components/_shared.css.js +31 -46
- package/dist/search/components/styles.css.js +4 -4
- package/dist/search/hooks.js +2 -1
- package/dist/shadowroot/ShadowRoot.js +6 -5
- package/dist/styles2.js +1 -1
- package/dist/utils/index.js +3 -3
- package/package.json +29 -29
- package/panda.buildinfo.json +342 -299
- package/styles-min.css +1 -1
- package/styles-xyflow.css +1 -1
- package/styles.css +1 -1
- package/dist/context/DefaultMantineProvider.d.ts +0 -2
- package/dist/context/DefaultMantineProvider.js +0 -48
- package/dist/likec4diagram/ui/sequence-outline/state.js +0 -55
- package/dist/navigationpanel/controls/DetailsControls.d.ts +0 -2
- package/dist/navigationpanel/controls/DetailsControls.js +0 -223
|
@@ -16,45 +16,46 @@ var ElementActions = (props) => {
|
|
|
16
16
|
const browser = useRelationshipsBrowser();
|
|
17
17
|
const subject = useRelationshipsBrowserState(selectSubject);
|
|
18
18
|
const { navigateTo, fqn } = props.data;
|
|
19
|
+
const buttons = useMemo(() => {
|
|
20
|
+
const buttons = [];
|
|
21
|
+
if (navigateTo && enableNavigateTo && currentViewId !== navigateTo) buttons.push({
|
|
22
|
+
key: "navigate",
|
|
23
|
+
icon: /* @__PURE__ */ jsx(IconZoomScan, {}),
|
|
24
|
+
onClick: (e) => {
|
|
25
|
+
e.stopPropagation();
|
|
26
|
+
diagram.navigateTo(navigateTo);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
if (fqn !== subject) buttons.push({
|
|
30
|
+
key: "relationships",
|
|
31
|
+
icon: /* @__PURE__ */ jsx(IconTransform, {}),
|
|
32
|
+
onClick: (e) => {
|
|
33
|
+
e.stopPropagation();
|
|
34
|
+
browser.navigateTo(fqn, props.id);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
if (enableVscode) buttons.push({
|
|
38
|
+
key: "goToSource",
|
|
39
|
+
icon: /* @__PURE__ */ jsx(IconFileSymlink, {}),
|
|
40
|
+
onClick: (e) => {
|
|
41
|
+
e.stopPropagation();
|
|
42
|
+
diagram.openSource({ element: fqn });
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return buttons;
|
|
46
|
+
}, [
|
|
47
|
+
navigateTo,
|
|
48
|
+
enableNavigateTo,
|
|
49
|
+
currentViewId,
|
|
50
|
+
fqn,
|
|
51
|
+
subject,
|
|
52
|
+
enableVscode,
|
|
53
|
+
diagram,
|
|
54
|
+
browser,
|
|
55
|
+
props.id
|
|
56
|
+
]);
|
|
19
57
|
return /* @__PURE__ */ jsx(ElementActionButtons, {
|
|
20
|
-
buttons
|
|
21
|
-
const buttons = [];
|
|
22
|
-
if (navigateTo && enableNavigateTo && currentViewId !== navigateTo) buttons.push({
|
|
23
|
-
key: "navigate",
|
|
24
|
-
icon: /* @__PURE__ */ jsx(IconZoomScan, {}),
|
|
25
|
-
onClick: (e) => {
|
|
26
|
-
e.stopPropagation();
|
|
27
|
-
diagram.navigateTo(navigateTo);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
if (fqn !== subject) buttons.push({
|
|
31
|
-
key: "relationships",
|
|
32
|
-
icon: /* @__PURE__ */ jsx(IconTransform, {}),
|
|
33
|
-
onClick: (e) => {
|
|
34
|
-
e.stopPropagation();
|
|
35
|
-
browser.navigateTo(fqn, props.id);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
if (enableVscode) buttons.push({
|
|
39
|
-
key: "goToSource",
|
|
40
|
-
icon: /* @__PURE__ */ jsx(IconFileSymlink, {}),
|
|
41
|
-
onClick: (e) => {
|
|
42
|
-
e.stopPropagation();
|
|
43
|
-
diagram.openSource({ element: fqn });
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
return buttons;
|
|
47
|
-
}, [
|
|
48
|
-
navigateTo,
|
|
49
|
-
enableNavigateTo,
|
|
50
|
-
currentViewId,
|
|
51
|
-
fqn,
|
|
52
|
-
subject,
|
|
53
|
-
enableVscode,
|
|
54
|
-
diagram,
|
|
55
|
-
browser,
|
|
56
|
-
props.id
|
|
57
|
-
]),
|
|
58
|
+
buttons,
|
|
58
59
|
...props
|
|
59
60
|
});
|
|
60
61
|
};
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import "../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { Box as Box$1 } from "@likec4/styles/jsx";
|
|
3
|
+
import { Box, Txt } from "@likec4/styles/jsx";
|
|
5
4
|
//#region src/overlays/relationships-browser/custom/EmptyNode.tsx
|
|
6
5
|
function EmptyNode({ data: { column } }) {
|
|
7
|
-
return /* @__PURE__ */ jsx(Box
|
|
6
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
8
7
|
css: {
|
|
9
8
|
width: "100%",
|
|
10
9
|
height: "100%",
|
|
11
|
-
border: `3px dashed`,
|
|
12
|
-
borderColor: `default.border`,
|
|
10
|
+
border: `[3px dashed {colors.border.default}]`,
|
|
13
11
|
borderRadius: "md",
|
|
14
12
|
display: "flex",
|
|
15
13
|
justifyContent: "center",
|
|
16
14
|
alignItems: "center"
|
|
17
15
|
},
|
|
18
|
-
children: /* @__PURE__ */ jsxs(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
children: /* @__PURE__ */ jsxs(Txt, {
|
|
17
|
+
textStyle: "dimmed",
|
|
18
|
+
fontSize: "lg",
|
|
19
|
+
medium: true,
|
|
22
20
|
children: ["No ", column === "incomers" ? "incoming" : "outgoing"]
|
|
23
21
|
})
|
|
24
22
|
});
|
|
@@ -9,7 +9,8 @@ function useRelationshipsBrowserActor() {
|
|
|
9
9
|
return nonNullable(useContext(RelationshipsBrowserActorContext), "No RelationshipsBrowserActorContext");
|
|
10
10
|
}
|
|
11
11
|
function useRelationshipsBrowserState(selector, compare = shallowEqual) {
|
|
12
|
-
|
|
12
|
+
const actor = useRelationshipsBrowserActor();
|
|
13
|
+
return useSelector(actor, selector, compare);
|
|
13
14
|
}
|
|
14
15
|
function useRelationshipsBrowser() {
|
|
15
16
|
const actor = useRelationshipsBrowserActor();
|
|
@@ -36,16 +36,17 @@ function ProjectsOverview({ view, onNavigateToProject, fitViewPadding = {
|
|
|
36
36
|
};
|
|
37
37
|
}, [actorRef]);
|
|
38
38
|
const bounds = view.bounds;
|
|
39
|
+
const initialRef = useRef({
|
|
40
|
+
initialNodes: [],
|
|
41
|
+
initialEdges: [],
|
|
42
|
+
initialWidth: bounds.width,
|
|
43
|
+
initialHeight: bounds.height,
|
|
44
|
+
fitView: false
|
|
45
|
+
});
|
|
39
46
|
return /* @__PURE__ */ jsx(ProjectsOverviewActorContextProvider, {
|
|
40
47
|
value: actorRef,
|
|
41
48
|
children: /* @__PURE__ */ jsxs(ReactFlowProvider, {
|
|
42
|
-
...
|
|
43
|
-
initialNodes: [],
|
|
44
|
-
initialEdges: [],
|
|
45
|
-
initialWidth: bounds.width,
|
|
46
|
-
initialHeight: bounds.height,
|
|
47
|
-
fitView: false
|
|
48
|
-
}).current,
|
|
49
|
+
...initialRef.current,
|
|
49
50
|
children: [/* @__PURE__ */ jsx(LayoutGroup, {
|
|
50
51
|
id: actorRef.sessionId,
|
|
51
52
|
inherit: false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { Base } from "../base/Base.js";
|
|
3
2
|
import { MinZoom } from "../base/const.js";
|
|
3
|
+
import { Base } from "../base/Base.js";
|
|
4
4
|
import { layoutedProjectsViewToXYFlow } from "./layouted-to-xyflow.js";
|
|
5
5
|
import { ProjectsOverviewViewportPersistence } from "./persistence.js";
|
|
6
6
|
import { applyEdgeChanges, applyNodeChanges, getViewportForBounds } from "@xyflow/react";
|
|
@@ -5,7 +5,8 @@ import { shallowEqual } from "fast-equals";
|
|
|
5
5
|
import { useSelector } from "@xstate/react";
|
|
6
6
|
//#region src/projects-overview/hooks.ts
|
|
7
7
|
function useProjectsOverviewState(selector, compare = shallowEqual) {
|
|
8
|
-
|
|
8
|
+
const actor = useProjectsOverviewActor();
|
|
9
|
+
return useSelector(actor, selector, compare);
|
|
9
10
|
}
|
|
10
11
|
function useProjectsOverviewXYStoreApi() {
|
|
11
12
|
return useStoreApi();
|
package/dist/search/Search.js
CHANGED
|
@@ -80,7 +80,7 @@ var Search = memo(({ searchActorRef }) => {
|
|
|
80
80
|
]]);
|
|
81
81
|
return /* @__PURE__ */ jsx(AnimatePresence, {
|
|
82
82
|
onExitComplete: () => {
|
|
83
|
-
|
|
83
|
+
searchActorRef.send({ type: "animation.presence.end" });
|
|
84
84
|
},
|
|
85
85
|
children: isOpened && /* @__PURE__ */ jsx(Overlay, {
|
|
86
86
|
fullscreen: true,
|
|
@@ -90,7 +90,7 @@ var Search = memo(({ searchActorRef }) => {
|
|
|
90
90
|
dialog: dialogCss,
|
|
91
91
|
body: bodyCss
|
|
92
92
|
},
|
|
93
|
-
openDelay:
|
|
93
|
+
openDelay: 100,
|
|
94
94
|
onClose: close,
|
|
95
95
|
"data-likec4-search": "true",
|
|
96
96
|
children: /* @__PURE__ */ jsx(XStateSearchAdapter, {
|
|
@@ -127,7 +127,7 @@ var SearchPanelContent = forwardRef((_, ref) => {
|
|
|
127
127
|
moveFocusToSearchInput(contentRef.current);
|
|
128
128
|
},
|
|
129
129
|
children: /* @__PURE__ */ jsxs(VStack, {
|
|
130
|
-
flex: 1,
|
|
130
|
+
flex: "1",
|
|
131
131
|
px: "sm",
|
|
132
132
|
children: [/* @__PURE__ */ jsx(LikeC4SearchInput, {}), /* @__PURE__ */ jsx(SearchByTags, {})]
|
|
133
133
|
})
|
|
@@ -138,7 +138,7 @@ var SearchPanelContent = forwardRef((_, ref) => {
|
|
|
138
138
|
component: "div",
|
|
139
139
|
order: 6,
|
|
140
140
|
c: "dimmed",
|
|
141
|
-
pl: "
|
|
141
|
+
pl: "md",
|
|
142
142
|
children: "Elements"
|
|
143
143
|
})
|
|
144
144
|
}), /* @__PURE__ */ jsx(GridCol, {
|
|
@@ -168,8 +168,7 @@ var SearchPanelContent = forwardRef((_, ref) => {
|
|
|
168
168
|
children: /* @__PURE__ */ jsx(LayoutGroup, {
|
|
169
169
|
id: "likec4-search-elements",
|
|
170
170
|
children: /* @__PURE__ */ jsx(AnimatePresence, {
|
|
171
|
-
|
|
172
|
-
anchorY: "top",
|
|
171
|
+
initial: false,
|
|
173
172
|
children: /* @__PURE__ */ jsx(ElementsColumn, {})
|
|
174
173
|
})
|
|
175
174
|
})
|
|
@@ -183,7 +182,10 @@ var SearchPanelContent = forwardRef((_, ref) => {
|
|
|
183
182
|
scrollbars: "y",
|
|
184
183
|
children: /* @__PURE__ */ jsx(LayoutGroup, {
|
|
185
184
|
id: "likec4-search-views",
|
|
186
|
-
children: /* @__PURE__ */ jsx(
|
|
185
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, {
|
|
186
|
+
initial: false,
|
|
187
|
+
children: /* @__PURE__ */ jsx(ViewsColumn, {})
|
|
188
|
+
})
|
|
187
189
|
})
|
|
188
190
|
})
|
|
189
191
|
})]
|
|
@@ -9,6 +9,7 @@ var treeNode = css({
|
|
|
9
9
|
});
|
|
10
10
|
var treeRoot = css(container.raw({ containerName: "likec4-tree" }), {
|
|
11
11
|
containerType: "inline-size",
|
|
12
|
+
px: "4",
|
|
12
13
|
height: "100%"
|
|
13
14
|
});
|
|
14
15
|
var treeLabel = css({
|
|
@@ -25,8 +26,8 @@ var elementTitleAndId = css({ [whenContainerIsNarrow]: {
|
|
|
25
26
|
gap: "0.5"
|
|
26
27
|
} });
|
|
27
28
|
var elementId = css({
|
|
28
|
-
fontSize: "
|
|
29
|
-
lineHeight: "
|
|
29
|
+
fontSize: "xxs",
|
|
30
|
+
lineHeight: "sm",
|
|
30
31
|
display: "block",
|
|
31
32
|
fontWeight: "medium",
|
|
32
33
|
whiteSpace: "nowrap",
|
|
@@ -40,11 +41,11 @@ var elementIcon = css({
|
|
|
40
41
|
[whenContainerIsNarrow]: { ["--likec4-icon-size"]: "18px" }
|
|
41
42
|
});
|
|
42
43
|
var elementViewsCount = css({
|
|
43
|
-
flex: 0,
|
|
44
|
-
fontSize: "
|
|
44
|
+
flex: "[0]",
|
|
45
|
+
fontSize: "xxs",
|
|
45
46
|
fontWeight: "medium",
|
|
46
47
|
whiteSpace: "nowrap",
|
|
47
|
-
lineHeight: "1.1",
|
|
48
|
+
lineHeight: "[1.1]",
|
|
48
49
|
[whenContainerIsNarrow]: { display: "none" }
|
|
49
50
|
});
|
|
50
51
|
//#endregion
|
|
@@ -167,11 +167,12 @@ function ElementTreeNode({ node, elementProps, expanded, handleClick, searchTerm
|
|
|
167
167
|
});
|
|
168
168
|
const key = `@tree.${node.value}`;
|
|
169
169
|
return /* @__PURE__ */ jsxs(m.div, {
|
|
170
|
+
layout: "position",
|
|
170
171
|
layoutId: key,
|
|
171
172
|
...elementProps,
|
|
172
173
|
children: [/* @__PURE__ */ jsx(ActionIcon, {
|
|
173
174
|
variant: "transparent",
|
|
174
|
-
size:
|
|
175
|
+
size: 20,
|
|
175
176
|
tabIndex: -1,
|
|
176
177
|
className: cx(elementExpandIcon),
|
|
177
178
|
style: { visibility: node.hasChildren ? "visible" : "hidden" },
|
|
@@ -179,8 +180,7 @@ function ElementTreeNode({ node, elementProps, expanded, handleClick, searchTerm
|
|
|
179
180
|
stroke: 3.5,
|
|
180
181
|
style: {
|
|
181
182
|
transition: "transform 150ms ease",
|
|
182
|
-
transform: `rotate(${expanded ? "90deg" : "0"})
|
|
183
|
-
width: "100%"
|
|
183
|
+
transform: `rotate(${expanded ? "90deg" : "0"})`
|
|
184
184
|
}
|
|
185
185
|
})
|
|
186
186
|
}), /* @__PURE__ */ jsxs(UnstyledButton, {
|
|
@@ -208,6 +208,7 @@ function ElementTreeNode({ node, elementProps, expanded, handleClick, searchTerm
|
|
|
208
208
|
component: "div",
|
|
209
209
|
highlight: searchTerms,
|
|
210
210
|
className: btn.title,
|
|
211
|
+
lineClamp: 1,
|
|
211
212
|
children: label
|
|
212
213
|
}), /* @__PURE__ */ jsx(Tooltip, {
|
|
213
214
|
label: element.id,
|
|
@@ -35,16 +35,16 @@ function SearchByTags() {
|
|
|
35
35
|
css: {
|
|
36
36
|
gap: "1.5",
|
|
37
37
|
flexWrap: "wrap",
|
|
38
|
-
opacity: isFiltered ? 1 : .3,
|
|
38
|
+
opacity: isFiltered ? "1" : "0.3",
|
|
39
39
|
grayscale: isFiltered ? 0 : .9,
|
|
40
40
|
filter: "auto",
|
|
41
41
|
transition: "fast",
|
|
42
42
|
_groupHover: {
|
|
43
|
-
opacity: 1,
|
|
43
|
+
opacity: "1",
|
|
44
44
|
grayscale: 0
|
|
45
45
|
},
|
|
46
46
|
_groupFocusWithin: {
|
|
47
|
-
opacity: 1,
|
|
47
|
+
opacity: "1",
|
|
48
48
|
grayscale: 0
|
|
49
49
|
}
|
|
50
50
|
},
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { useLikeC4Model } from "../../hooks/useLikeC4Model.js";
|
|
3
|
+
import { EmptyBox } from "../../components/EmptyBox.js";
|
|
4
|
+
import { ViewIcon } from "../../components/ViewIcon.js";
|
|
3
5
|
import { useSearchContext } from "../SearchContext.js";
|
|
4
6
|
import { useNormalizedSearch } from "../hooks.js";
|
|
5
|
-
import { buttonsva,
|
|
7
|
+
import { buttonsva, focusable } from "./_shared.css.js";
|
|
6
8
|
import { centerY, moveFocusToSearchInput, queryAllFocusable } from "./utils.js";
|
|
7
9
|
import { viewButton } from "./ViewsColumn.css.js";
|
|
8
10
|
import { cx } from "@likec4/styles/css";
|
|
9
|
-
import { IconStack2, IconZoomScan } from "@tabler/icons-react";
|
|
10
11
|
import { memo, useMemo, useRef } from "react";
|
|
11
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
13
|
import { first } from "remeda";
|
|
13
|
-
import { Badge, Group, Highlight,
|
|
14
|
-
import {
|
|
14
|
+
import { Badge, Group, Highlight, ThemeIcon, UnstyledButton, VisuallyHidden, createScopedKeydownHandler } from "@mantine/core";
|
|
15
|
+
import { m } from "motion/react";
|
|
15
16
|
import { preferSummary } from "@likec4/core/types";
|
|
16
|
-
import
|
|
17
|
+
import { Box as Box$1 } from "@likec4/styles/jsx";
|
|
18
|
+
import { vstack } from "@likec4/styles/patterns";
|
|
17
19
|
//#region src/search/components/ViewsColum.tsx
|
|
18
|
-
var NothingFound = () => /* @__PURE__ */ jsx(
|
|
19
|
-
|
|
20
|
+
var NothingFound = () => /* @__PURE__ */ jsx(EmptyBox, {
|
|
21
|
+
fullsize: true,
|
|
22
|
+
as: m.div,
|
|
20
23
|
children: "Nothing found"
|
|
21
24
|
});
|
|
22
25
|
var useFoundViews = () => {
|
|
@@ -25,14 +28,16 @@ var useFoundViews = () => {
|
|
|
25
28
|
const search = useNormalizedSearch();
|
|
26
29
|
return useMemo(() => {
|
|
27
30
|
let views = [...likec4model.views()];
|
|
28
|
-
if (search)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
if (search) {
|
|
32
|
+
if (search.startsWith("kind:")) views = [];
|
|
33
|
+
else {
|
|
34
|
+
const searchTag = search.startsWith("#") ? search.slice(1) : null;
|
|
35
|
+
views = views.filter((view) => {
|
|
36
|
+
if (searchTag) return view.tags.some((tag) => tag.toLocaleLowerCase().includes(searchTag));
|
|
37
|
+
const desc = preferSummary(view.$view)?.md || " ";
|
|
38
|
+
return `${view.id} ${view.title} ${desc}`.toLocaleLowerCase().includes(search);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
36
41
|
}
|
|
37
42
|
return [
|
|
38
43
|
views,
|
|
@@ -48,13 +53,11 @@ var useFoundViews = () => {
|
|
|
48
53
|
var ViewsColumn = memo(() => {
|
|
49
54
|
const ref = useRef(null);
|
|
50
55
|
const [views, search, currentViewId] = useFoundViews();
|
|
51
|
-
return /* @__PURE__ */
|
|
56
|
+
if (views.length === 0) return /* @__PURE__ */ jsx(NothingFound, {}, "nothing-found");
|
|
57
|
+
return /* @__PURE__ */ jsxs(m.div, {
|
|
52
58
|
ref,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
...props
|
|
56
|
-
}),
|
|
57
|
-
gap: 8,
|
|
59
|
+
layout: true,
|
|
60
|
+
className: vstack({ gap: "2" }),
|
|
58
61
|
"data-likec4-search-views": true,
|
|
59
62
|
onKeyDown: (e) => {
|
|
60
63
|
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
@@ -69,27 +72,23 @@ var ViewsColumn = memo(() => {
|
|
|
69
72
|
return;
|
|
70
73
|
}
|
|
71
74
|
},
|
|
72
|
-
children: [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
})
|
|
90
|
-
}, view.id))
|
|
91
|
-
]
|
|
92
|
-
});
|
|
75
|
+
children: [views.length > 0 && /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx(UnstyledButton, {
|
|
76
|
+
"data-likec4-view": true,
|
|
77
|
+
tabIndex: -1,
|
|
78
|
+
onFocus: (e) => {
|
|
79
|
+
e.stopPropagation();
|
|
80
|
+
moveFocusToSearchInput(ref.current);
|
|
81
|
+
}
|
|
82
|
+
}) }), views.map((view, i) => /* @__PURE__ */ jsx(m.div, {
|
|
83
|
+
layout: "position",
|
|
84
|
+
children: /* @__PURE__ */ jsx(ViewButton, {
|
|
85
|
+
view,
|
|
86
|
+
currentViewId: currentViewId ?? "",
|
|
87
|
+
search,
|
|
88
|
+
tabIndex: i === 0 ? 0 : -1
|
|
89
|
+
})
|
|
90
|
+
}, `@view${view.id}`))]
|
|
91
|
+
}, "views-column");
|
|
93
92
|
});
|
|
94
93
|
var btn = buttonsva();
|
|
95
94
|
function ViewButton({ className, view, loop = false, search, focusOnElement, currentViewId, ...props }) {
|
|
@@ -124,7 +123,10 @@ function ViewButton({ className, view, loop = false, search, focusOnElement, cur
|
|
|
124
123
|
children: [/* @__PURE__ */ jsx(ThemeIcon, {
|
|
125
124
|
variant: "transparent",
|
|
126
125
|
className: btn.icon,
|
|
127
|
-
children:
|
|
126
|
+
children: /* @__PURE__ */ jsx(ViewIcon, {
|
|
127
|
+
type: view._type,
|
|
128
|
+
size: 16
|
|
129
|
+
})
|
|
128
130
|
}), /* @__PURE__ */ jsxs(Box$1, {
|
|
129
131
|
style: { flexGrow: 1 },
|
|
130
132
|
children: [/* @__PURE__ */ jsxs(Group, {
|
|
@@ -135,6 +137,7 @@ function ViewButton({ className, view, loop = false, search, focusOnElement, cur
|
|
|
135
137
|
component: "div",
|
|
136
138
|
highlight: search,
|
|
137
139
|
className: btn.title,
|
|
140
|
+
lineClamp: 1,
|
|
138
141
|
children: view.titleOrUntitled
|
|
139
142
|
}), isCurrentView && /* @__PURE__ */ jsx(Badge, {
|
|
140
143
|
size: "xs",
|
|
@@ -3,13 +3,13 @@ import { css, cx } from "@likec4/styles/css";
|
|
|
3
3
|
var viewButton = cx(css({
|
|
4
4
|
flexWrap: "nowrap",
|
|
5
5
|
display: "flex",
|
|
6
|
-
"&[data-disabled] .mantine-ThemeIcon-root": { opacity: .45 }
|
|
6
|
+
"&[data-disabled] .mantine-ThemeIcon-root": { opacity: "0.45" }
|
|
7
7
|
}), "likec4-view-btn");
|
|
8
8
|
css({
|
|
9
9
|
marginTop: "1",
|
|
10
|
-
fontSize: "
|
|
11
|
-
lineHeight: "
|
|
12
|
-
[`:where(.likec4-view-btn[data-disabled]) &`]: { opacity: .85 }
|
|
10
|
+
fontSize: "sm",
|
|
11
|
+
lineHeight: "md",
|
|
12
|
+
[`:where(.likec4-view-btn[data-disabled]) &`]: { opacity: "0.85" }
|
|
13
13
|
});
|
|
14
14
|
//#endregion
|
|
15
15
|
export { viewButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SlotRecipeRuntimeFn, SlotRecipeVariantRecord } from '
|
|
1
|
+
import { SlotRecipeRuntimeFn, SlotRecipeVariantRecord } from '@likec4/styles/types';
|
|
2
2
|
export declare const focusable = "likec4-focusable";
|
|
3
3
|
export declare const emptyBoX: string;
|
|
4
|
-
export declare const buttonsva: SlotRecipeRuntimeFn<"
|
|
4
|
+
export declare const buttonsva: SlotRecipeRuntimeFn<"icon" | "title" | "description" | "root" | "descriptionColor", SlotRecipeVariantRecord<"icon" | "title" | "description" | "root" | "descriptionColor">>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { css, sva } from "@likec4/styles/css";
|
|
2
|
+
import { emptyBox } from "@likec4/styles/recipes";
|
|
2
3
|
//#region src/search/components/_shared.css.ts
|
|
3
4
|
var buttonFocused = css.raw({
|
|
4
5
|
outline: "none",
|
|
5
|
-
background: "
|
|
6
|
-
borderColor: "
|
|
6
|
+
background: "likec4.accent.8",
|
|
7
|
+
borderColor: "likec4.accent.9"
|
|
7
8
|
});
|
|
8
9
|
var _treenodefocus = ".mantine-Tree-node:focus > .mantine-Tree-label &";
|
|
9
10
|
var button = css.raw({
|
|
@@ -12,14 +13,13 @@ var button = css.raw({
|
|
|
12
13
|
background: "surface.default",
|
|
13
14
|
rounded: "sm",
|
|
14
15
|
padding: `[12px 8px 12px 14px]`,
|
|
15
|
-
minHeight: "60px",
|
|
16
|
+
minHeight: "[60px]",
|
|
16
17
|
gap: "2",
|
|
17
|
-
border: `
|
|
18
|
-
borderColor: "default.border",
|
|
18
|
+
border: `default`,
|
|
19
19
|
_hover: {
|
|
20
20
|
...buttonFocused,
|
|
21
|
-
borderColor: "
|
|
22
|
-
background: `
|
|
21
|
+
borderColor: "likec4.accent.9",
|
|
22
|
+
background: `likec4.accent.8/60`
|
|
23
23
|
},
|
|
24
24
|
_focus: buttonFocused,
|
|
25
25
|
[_treenodefocus]: buttonFocused,
|
|
@@ -28,26 +28,24 @@ var button = css.raw({
|
|
|
28
28
|
background: `mantine.dark[6]/80`
|
|
29
29
|
},
|
|
30
30
|
_light: {
|
|
31
|
-
background: `
|
|
31
|
+
background: `white/80`,
|
|
32
32
|
_hover: {
|
|
33
|
-
borderColor: "
|
|
34
|
-
backgroundColor: "
|
|
33
|
+
borderColor: "likec4.accent.6",
|
|
34
|
+
backgroundColor: "likec4.accent.5"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
var focusable = "likec4-focusable";
|
|
39
|
-
var iconSize = { ref: "
|
|
39
|
+
var iconSize = { ref: "24px" };
|
|
40
40
|
var icon = css.raw({
|
|
41
41
|
color: {
|
|
42
42
|
base: "text.dimmed",
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
_groupFocus: "mantine.primary[0]"
|
|
43
|
+
_groupHover: "likec4.accent.0",
|
|
44
|
+
_groupFocus: "likec4.accent.0"
|
|
46
45
|
},
|
|
47
|
-
[_treenodefocus]: { color: "
|
|
48
|
-
flex: `0 0 ${iconSize.ref}`,
|
|
49
|
-
|
|
50
|
-
width: iconSize.ref,
|
|
46
|
+
[_treenodefocus]: { color: "likec4.accent.0" },
|
|
47
|
+
flex: `[0 0 ${iconSize.ref}]`,
|
|
48
|
+
boxSize: `[${iconSize.ref}]`,
|
|
51
49
|
display: "flex",
|
|
52
50
|
alignItems: "center",
|
|
53
51
|
justifyContent: "center",
|
|
@@ -63,24 +61,24 @@ var icon = css.raw({
|
|
|
63
61
|
"&.likec4-shape-icon svg": { strokeWidth: "[1.5]" }
|
|
64
62
|
});
|
|
65
63
|
var title = css.raw({
|
|
66
|
-
fontSize: "
|
|
64
|
+
fontSize: "lg",
|
|
67
65
|
fontWeight: "medium",
|
|
68
|
-
lineHeight: "
|
|
69
|
-
[`:where([data-disabled]) &`]: { opacity: .4 },
|
|
66
|
+
lineHeight: "snug",
|
|
67
|
+
[`:where([data-disabled]) &`]: { opacity: "[0.4]" },
|
|
70
68
|
color: {
|
|
71
69
|
base: "mantine.dark[1]",
|
|
72
70
|
_light: "mantine.gray[7]",
|
|
73
71
|
_groupHover: {
|
|
74
|
-
base: "
|
|
72
|
+
base: "likec4.accent.1",
|
|
75
73
|
_light: "white"
|
|
76
74
|
},
|
|
77
75
|
_groupFocus: {
|
|
78
|
-
base: "
|
|
76
|
+
base: "likec4.accent.1",
|
|
79
77
|
_light: "white"
|
|
80
78
|
}
|
|
81
79
|
},
|
|
82
80
|
[_treenodefocus]: { color: {
|
|
83
|
-
base: "
|
|
81
|
+
base: "likec4.accent.1",
|
|
84
82
|
_light: "white"
|
|
85
83
|
} }
|
|
86
84
|
});
|
|
@@ -88,33 +86,20 @@ var descriptionColor = css.raw({
|
|
|
88
86
|
color: {
|
|
89
87
|
base: "text.dimmed",
|
|
90
88
|
_groupHover: {
|
|
91
|
-
base: "
|
|
92
|
-
_light: "
|
|
89
|
+
base: "likec4.accent.1",
|
|
90
|
+
_light: "likec4.accent.0"
|
|
93
91
|
},
|
|
94
|
-
_groupFocus: "
|
|
92
|
+
_groupFocus: "likec4.accent.0"
|
|
95
93
|
},
|
|
96
|
-
[_treenodefocus]: { color: "
|
|
94
|
+
[_treenodefocus]: { color: "likec4.accent.0" }
|
|
97
95
|
});
|
|
98
96
|
var description = css.raw(descriptionColor, {
|
|
99
97
|
marginTop: "1",
|
|
100
|
-
fontSize: "
|
|
101
|
-
lineHeight: "
|
|
102
|
-
[`:where([data-disabled]) &`]: { opacity: .85 }
|
|
103
|
-
});
|
|
104
|
-
var emptyBoX = css({
|
|
105
|
-
width: "100%",
|
|
106
|
-
height: "100%",
|
|
107
|
-
border: `2px dashed`,
|
|
108
|
-
borderColor: "default.border",
|
|
109
|
-
rounded: "md",
|
|
110
|
-
display: "flex",
|
|
111
|
-
justifyContent: "center",
|
|
112
|
-
alignItems: "center",
|
|
113
|
-
fontSize: "md",
|
|
114
|
-
color: "text.dimmed",
|
|
115
|
-
padding: "md",
|
|
116
|
-
paddingBlock: "xl"
|
|
98
|
+
fontSize: "sm",
|
|
99
|
+
lineHeight: "sm",
|
|
100
|
+
[`:where([data-disabled]) &`]: { opacity: "[0.85]" }
|
|
117
101
|
});
|
|
102
|
+
emptyBox({ fullsize: true });
|
|
118
103
|
var buttonsva = sva({
|
|
119
104
|
slots: [
|
|
120
105
|
"root",
|
|
@@ -133,4 +118,4 @@ var buttonsva = sva({
|
|
|
133
118
|
}
|
|
134
119
|
});
|
|
135
120
|
//#endregion
|
|
136
|
-
export { buttonsva,
|
|
121
|
+
export { buttonsva, focusable };
|
|
@@ -21,7 +21,7 @@ var pickviewBackdrop = css({
|
|
|
21
21
|
width: "100%",
|
|
22
22
|
height: "100%",
|
|
23
23
|
backgroundColor: "[rgb(34 34 34 / 0.7)]",
|
|
24
|
-
zIndex: 902,
|
|
24
|
+
zIndex: "[902]",
|
|
25
25
|
backdropFilter: "auto",
|
|
26
26
|
backdropBlur: "10px",
|
|
27
27
|
_light: { backgroundColor: "[rgb(255 255 255 / 0.6)]" }
|
|
@@ -31,10 +31,10 @@ var pickview = css({
|
|
|
31
31
|
top: "[2rem]",
|
|
32
32
|
left: "[50%]",
|
|
33
33
|
width: "100%",
|
|
34
|
-
maxWidth: "600px",
|
|
35
|
-
minWidth: "200px",
|
|
34
|
+
maxWidth: "[600px]",
|
|
35
|
+
minWidth: "[200px]",
|
|
36
36
|
transform: "translateX(-50%)",
|
|
37
|
-
zIndex: 903
|
|
37
|
+
zIndex: "[903]"
|
|
38
38
|
});
|
|
39
39
|
var pickviewGroup = css({
|
|
40
40
|
marginTop: "2",
|
package/dist/search/hooks.js
CHANGED
|
@@ -3,7 +3,8 @@ import { useSearchContext } from "./SearchContext.js";
|
|
|
3
3
|
import { useCallback, useDeferredValue } from "react";
|
|
4
4
|
//#region src/search/hooks.ts
|
|
5
5
|
function useNormalizedSearch() {
|
|
6
|
-
|
|
6
|
+
const ctx = useSearchContext();
|
|
7
|
+
return useDeferredValue(ctx.normalizedSearch);
|
|
7
8
|
}
|
|
8
9
|
function useUpdateSearch() {
|
|
9
10
|
const { setSearchValue } = useSearchContext();
|