@qilin-agent/client-ui-primitives 3.1.6 → 3.1.7
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/lib/Tooltip.module.css +18 -3
- package/lib/index.js +2776 -1259
- package/lib/types/LinkIcon.d.ts +15 -30
- package/lib/types/Menu.d.ts +7 -2
- package/lib/types/PermissionIcon.d.ts +51 -0
- package/lib/types/ReferenceIcon.d.ts +12 -7
- package/lib/types/SiteGlyph.d.ts +1 -1
- package/lib/types/Tooltip.d.ts +26 -16
- package/lib/types/code-file-types.d.ts +1 -1
- package/lib/types/icons/index.d.ts +397 -216
- package/lib/types/icons/props.d.ts +1 -1
- package/lib/types/icons/shared-artwork.d.ts +43 -0
- package/lib/types/index.d.ts +3 -2
- package/lib/types/tooltip-placement.d.ts +35 -0
- package/package.json +3 -3
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { IconProps } from './props.ts';
|
|
2
|
+
interface WeightedArtworkProps extends IconProps {
|
|
3
|
+
strokeWidth: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Render new-conversation geometry — the bubble around a plus — for product icons.
|
|
7
|
+
* @param props - Size, optional CSS class, and inherited stroke width.
|
|
8
|
+
* @returns The decorative SVG artwork.
|
|
9
|
+
*/
|
|
10
|
+
export declare const NewChatOutlineArtwork: ({ size, className, strokeWidth }: WeightedArtworkProps) => import("react").JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* Render shared conversation geometry — the chat bubble around two text
|
|
13
|
+
* lines — for the queue product icon and session reference icons.
|
|
14
|
+
* @param props - Size, optional CSS class, and inherited stroke width.
|
|
15
|
+
* @returns The decorative SVG artwork.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ChatLinesOutlineArtwork: ({ size, className, strokeWidth }: WeightedArtworkProps) => import("react").JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* Render shared globe geometry for product and link icons.
|
|
20
|
+
* @param props - Size, optional CSS class, and inherited stroke width.
|
|
21
|
+
* @returns The decorative SVG artwork.
|
|
22
|
+
*/
|
|
23
|
+
export declare const GlobeOutlineArtwork: ({ size, className, strokeWidth }: WeightedArtworkProps) => import("react").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Render shared code-bracket geometry for product and link icons.
|
|
26
|
+
* @param props - Size, optional CSS class, and inherited stroke width.
|
|
27
|
+
* @returns The decorative SVG artwork.
|
|
28
|
+
*/
|
|
29
|
+
export declare const CodeBracketsArtwork: ({ size, className, strokeWidth }: WeightedArtworkProps) => import("react").JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* Render shared document-browse geometry for product and reference icons.
|
|
32
|
+
* @param props - Size, optional CSS class, and inherited stroke width.
|
|
33
|
+
* @returns The decorative SVG artwork.
|
|
34
|
+
*/
|
|
35
|
+
export declare const BrowseOutlineArtwork: ({ size, className, strokeWidth }: WeightedArtworkProps) => import("react").JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Render shared closed-folder geometry for product, reference, and link icons.
|
|
38
|
+
* @param props - Size, optional CSS class, and inherited stroke width.
|
|
39
|
+
* @returns The decorative SVG artwork.
|
|
40
|
+
*/
|
|
41
|
+
export declare const FolderCloseArtwork: ({ size, className, strokeWidth }: WeightedArtworkProps) => import("react").JSX.Element;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=shared-artwork.d.ts.map
|
package/lib/types/index.d.ts
CHANGED
|
@@ -45,9 +45,10 @@ export type { RiskConfirmationProps } from './RiskConfirmation.tsx';
|
|
|
45
45
|
export { ConnectionIndicator } from './ConnectionIndicator.tsx';
|
|
46
46
|
export type { ConnectionIndicatorState } from './ConnectionIndicator.tsx';
|
|
47
47
|
export { QilinSeal } from './QilinSeal.tsx';
|
|
48
|
-
export {
|
|
48
|
+
export { PermissionIconAutoReviewMedium, PermissionIconAutoReviewRegular, PermissionIconFullAccessMedium, PermissionIconFullAccessRegular, PermissionIconReadOnlyMedium, PermissionIconReadOnlyRegular, PermissionIconWorkspaceWriteMedium, PermissionIconWorkspaceWriteRegular, } from './PermissionIcon.tsx';
|
|
49
|
+
export { ReferenceIconMedium, ReferenceIconRegular } from './ReferenceIcon.tsx';
|
|
49
50
|
export type { ReferenceIconKind, ReferenceIconProps } from './ReferenceIcon.tsx';
|
|
50
|
-
export {
|
|
51
|
+
export { LinkIconMedium, LinkIconRegular, classifyLinkPath } from './LinkIcon.tsx';
|
|
51
52
|
export type { LinkIconKind, LinkIconProps } from './LinkIcon.tsx';
|
|
52
53
|
export { FileTypeIcon, classifyFileType, fileExtension } from './FileTypeIcon.tsx';
|
|
53
54
|
export type { CodeFileType, FileType, FileTypeIconProps, FileTypeKind, FileTypeProjectContext, } from './FileTypeIcon.tsx';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Deterministic tooltip placement using measured border boxes and viewport coordinates. */
|
|
2
|
+
/** Bubble placement relative to the anchor. */
|
|
3
|
+
export type TooltipSide = 'right' | 'left' | 'bottom' | 'top';
|
|
4
|
+
interface PlacementInput {
|
|
5
|
+
anchor: {
|
|
6
|
+
left: number;
|
|
7
|
+
right: number;
|
|
8
|
+
top: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
};
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
viewportWidth: number;
|
|
14
|
+
viewportHeight: number;
|
|
15
|
+
side: TooltipSide;
|
|
16
|
+
align: 'center' | 'end';
|
|
17
|
+
gap: number;
|
|
18
|
+
}
|
|
19
|
+
interface TooltipPlacement {
|
|
20
|
+
left: number;
|
|
21
|
+
top: number;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
side: TooltipSide;
|
|
25
|
+
/** No complete side fits, so placement is bounded by the viewport instead. */
|
|
26
|
+
overflow: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Prefer the requested side, its opposite, then perpendicular sides without covering the anchor.
|
|
30
|
+
* @param input - Observed dimensions, anchor edges, viewport and requested placement; horizontal gaps remain 10px.
|
|
31
|
+
* @returns Border-box coordinates and the selected side; if no side fits, a viewport-bounded fallback.
|
|
32
|
+
*/
|
|
33
|
+
export declare function placeTooltip(input: PlacementInput): TooltipPlacement;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=tooltip-placement.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/client-ui-primitives",
|
|
3
3
|
"description": "Pure React atoms for the qilin web UI: controls, icons, markdown, and JSON inspectors (zero cordis)",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.7",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"shiki": "^4.3.1",
|
|
53
53
|
"simple-icons": "16.31.0",
|
|
54
54
|
"@qilin-agent/kylin": "~4.0.5",
|
|
55
|
-
"@qilin-agent/
|
|
56
|
-
"@qilin-agent/
|
|
55
|
+
"@qilin-agent/util-workspace-path": "3.1.7",
|
|
56
|
+
"@qilin-agent/client-store": "3.1.7"
|
|
57
57
|
},
|
|
58
58
|
"files": [
|
|
59
59
|
"lib/index.js",
|