@linxiraos/pi-utils 1.0.0
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/CHANGELOG.md +449 -0
- package/README.md +36 -0
- package/dist/types/abortable.d.ts +32 -0
- package/dist/types/acp/connection.d.ts +118 -0
- package/dist/types/acp/protocol.d.ts +526 -0
- package/dist/types/acp/schema.d.ts +41 -0
- package/dist/types/acp/stream.d.ts +8 -0
- package/dist/types/acp/transport.d.ts +81 -0
- package/dist/types/acp.d.ts +6 -0
- package/dist/types/async.d.ts +20 -0
- package/dist/types/binary.d.ts +17 -0
- package/dist/types/browsers.d.ts +68 -0
- package/dist/types/chalk.d.ts +125 -0
- package/dist/types/cli.d.ts +134 -0
- package/dist/types/color.d.ts +102 -0
- package/dist/types/dates.d.ts +7 -0
- package/dist/types/dirs.d.ts +282 -0
- package/dist/types/docx/converter.d.ts +46 -0
- package/dist/types/docx/xml.d.ts +26 -0
- package/dist/types/docx/zip.d.ts +6 -0
- package/dist/types/docx.d.ts +11 -0
- package/dist/types/dom/core.d.ts +431 -0
- package/dist/types/dom/parser.d.ts +7 -0
- package/dist/types/dom/selector.d.ts +5 -0
- package/dist/types/dom.d.ts +5 -0
- package/dist/types/env.d.ts +124 -0
- package/dist/types/fetch-retry.d.ts +96 -0
- package/dist/types/file-lock.d.ts +23 -0
- package/dist/types/format.d.ts +37 -0
- package/dist/types/frontmatter.d.ts +46 -0
- package/dist/types/fs-error.d.ts +31 -0
- package/dist/types/glob.d.ts +28 -0
- package/dist/types/headers.d.ts +34 -0
- package/dist/types/index.d.ts +39 -0
- package/dist/types/json-parse.d.ts +74 -0
- package/dist/types/json.d.ts +14 -0
- package/dist/types/logger/rotating-file.d.ts +18 -0
- package/dist/types/logger.d.ts +96 -0
- package/dist/types/loop-phase.d.ts +10 -0
- package/dist/types/lru.d.ts +46 -0
- package/dist/types/marked/core.d.ts +445 -0
- package/dist/types/marked.d.ts +2 -0
- package/dist/types/mermaid-ascii.d.ts +11 -0
- package/dist/types/mime.d.ts +29 -0
- package/dist/types/module-timer.d.ts +1 -0
- package/dist/types/path-tree.d.ts +76 -0
- package/dist/types/path.d.ts +2 -0
- package/dist/types/peek-file.d.ts +29 -0
- package/dist/types/postmortem.d.ts +104 -0
- package/dist/types/process-name.d.ts +7 -0
- package/dist/types/procmgr.d.ts +74 -0
- package/dist/types/prompt.d.ts +18 -0
- package/dist/types/ptree.d.ts +110 -0
- package/dist/types/readability/readability.d.ts +9 -0
- package/dist/types/readability/readerable.d.ts +10 -0
- package/dist/types/readability/types.d.ts +70 -0
- package/dist/types/readability.d.ts +4 -0
- package/dist/types/ring.d.ts +93 -0
- package/dist/types/runtime-install.d.ts +78 -0
- package/dist/types/sanitize-text.d.ts +29 -0
- package/dist/types/snowflake.d.ts +25 -0
- package/dist/types/stderr-guard.d.ts +22 -0
- package/dist/types/stream.d.ts +67 -0
- package/dist/types/tab-spacing.d.ts +24 -0
- package/dist/types/temp.d.ts +17 -0
- package/dist/types/template.d.ts +62 -0
- package/dist/types/timing-buffer.d.ts +22 -0
- package/dist/types/tls-fetch.d.ts +37 -0
- package/dist/types/turndown/gfm.d.ts +11 -0
- package/dist/types/turndown/html.d.ts +5 -0
- package/dist/types/turndown/service.d.ts +21 -0
- package/dist/types/turndown/types.d.ts +70 -0
- package/dist/types/turndown.d.ts +4 -0
- package/dist/types/type-guards.d.ts +5 -0
- package/dist/types/vendor/mermaid-ascii/ascii/ansi.d.ts +41 -0
- package/dist/types/vendor/mermaid-ascii/ascii/canvas.d.ts +89 -0
- package/dist/types/vendor/mermaid-ascii/ascii/class-diagram.d.ts +7 -0
- package/dist/types/vendor/mermaid-ascii/ascii/converter.d.ts +12 -0
- package/dist/types/vendor/mermaid-ascii/ascii/draw.d.ts +66 -0
- package/dist/types/vendor/mermaid-ascii/ascii/edge-bundling.d.ts +48 -0
- package/dist/types/vendor/mermaid-ascii/ascii/edge-routing.d.ts +43 -0
- package/dist/types/vendor/mermaid-ascii/ascii/er-diagram.d.ts +7 -0
- package/dist/types/vendor/mermaid-ascii/ascii/grid.d.ts +56 -0
- package/dist/types/vendor/mermaid-ascii/ascii/index.d.ts +65 -0
- package/dist/types/vendor/mermaid-ascii/ascii/multiline-utils.d.ts +27 -0
- package/dist/types/vendor/mermaid-ascii/ascii/pathfinder.d.ts +17 -0
- package/dist/types/vendor/mermaid-ascii/ascii/sequence.d.ts +7 -0
- package/dist/types/vendor/mermaid-ascii/ascii/shapes/circle.d.ts +11 -0
- package/dist/types/vendor/mermaid-ascii/ascii/shapes/corners.d.ts +34 -0
- package/dist/types/vendor/mermaid-ascii/ascii/shapes/diamond.d.ts +11 -0
- package/dist/types/vendor/mermaid-ascii/ascii/shapes/hexagon.d.ts +11 -0
- package/dist/types/vendor/mermaid-ascii/ascii/shapes/index.d.ts +26 -0
- package/dist/types/vendor/mermaid-ascii/ascii/shapes/rectangle.d.ts +31 -0
- package/dist/types/vendor/mermaid-ascii/ascii/shapes/rounded.d.ts +11 -0
- package/dist/types/vendor/mermaid-ascii/ascii/shapes/special.d.ts +59 -0
- package/dist/types/vendor/mermaid-ascii/ascii/shapes/stadium.d.ts +17 -0
- package/dist/types/vendor/mermaid-ascii/ascii/shapes/state.d.ts +30 -0
- package/dist/types/vendor/mermaid-ascii/ascii/shapes/types.d.ts +55 -0
- package/dist/types/vendor/mermaid-ascii/ascii/types.d.ts +206 -0
- package/dist/types/vendor/mermaid-ascii/ascii/validate.d.ts +51 -0
- package/dist/types/vendor/mermaid-ascii/ascii/xychart.d.ts +2 -0
- package/dist/types/vendor/mermaid-ascii/class/parser.d.ts +6 -0
- package/dist/types/vendor/mermaid-ascii/class/types.d.ts +102 -0
- package/dist/types/vendor/mermaid-ascii/er/parser.d.ts +6 -0
- package/dist/types/vendor/mermaid-ascii/er/types.d.ts +76 -0
- package/dist/types/vendor/mermaid-ascii/index.d.ts +1 -0
- package/dist/types/vendor/mermaid-ascii/multiline-utils.d.ts +9 -0
- package/dist/types/vendor/mermaid-ascii/parser.d.ts +7 -0
- package/dist/types/vendor/mermaid-ascii/sequence/parser.d.ts +6 -0
- package/dist/types/vendor/mermaid-ascii/sequence/types.d.ts +130 -0
- package/dist/types/vendor/mermaid-ascii/text-metrics.d.ts +21 -0
- package/dist/types/vendor/mermaid-ascii/types.d.ts +114 -0
- package/dist/types/vendor/mermaid-ascii/xychart/colors.d.ts +25 -0
- package/dist/types/vendor/mermaid-ascii/xychart/parser.d.ts +6 -0
- package/dist/types/vendor/mermaid-ascii/xychart/types.d.ts +145 -0
- package/dist/types/version.d.ts +18 -0
- package/dist/types/vterm/buffer.d.ts +99 -0
- package/dist/types/vterm/terminal.d.ts +44 -0
- package/dist/types/vterm.d.ts +8 -0
- package/dist/types/which.d.ts +37 -0
- package/dist/types/worker-host.d.ts +51 -0
- package/dist/types/xml.d.ts +31 -0
- package/package.json +59 -0
- package/src/abortable.ts +109 -0
- package/src/acp/connection.ts +344 -0
- package/src/acp/protocol.ts +466 -0
- package/src/acp/schema.ts +160 -0
- package/src/acp/stream.ts +82 -0
- package/src/acp/transport.ts +213 -0
- package/src/acp.ts +6 -0
- package/src/async.ts +91 -0
- package/src/binary.ts +50 -0
- package/src/browsers.ts +501 -0
- package/src/chalk.ts +312 -0
- package/src/cli.ts +529 -0
- package/src/color.ts +302 -0
- package/src/dates.ts +194 -0
- package/src/dirs.ts +1026 -0
- package/src/docx/converter.ts +681 -0
- package/src/docx/xml.ts +166 -0
- package/src/docx/zip.ts +87 -0
- package/src/docx.ts +20 -0
- package/src/dom/core.ts +1254 -0
- package/src/dom/parser.ts +370 -0
- package/src/dom/selector.ts +290 -0
- package/src/dom.ts +33 -0
- package/src/env.ts +400 -0
- package/src/fetch-retry.ts +379 -0
- package/src/file-lock.ts +69 -0
- package/src/format.ts +113 -0
- package/src/frontmatter.ts +205 -0
- package/src/fs-error.ts +56 -0
- package/src/glob.ts +189 -0
- package/src/headers.ts +167 -0
- package/src/index.ts +59 -0
- package/src/json-parse.ts +821 -0
- package/src/json.ts +23 -0
- package/src/logger/rotating-file.ts +149 -0
- package/src/logger.ts +798 -0
- package/src/loop-phase.ts +49 -0
- package/src/lru.ts +185 -0
- package/src/marked/core.ts +1576 -0
- package/src/marked.ts +2 -0
- package/src/mermaid-ascii.ts +31 -0
- package/src/mime.ts +159 -0
- package/src/module-timer.ts +148 -0
- package/src/path-tree.ts +147 -0
- package/src/path.ts +28 -0
- package/src/peek-file.ts +188 -0
- package/src/postmortem.ts +433 -0
- package/src/process-name.ts +57 -0
- package/src/procmgr.ts +247 -0
- package/src/prompt.ts +545 -0
- package/src/ptree.ts +412 -0
- package/src/readability/readability.ts +533 -0
- package/src/readability/readerable.ts +51 -0
- package/src/readability/types.ts +72 -0
- package/src/readability.ts +11 -0
- package/src/ring.ts +169 -0
- package/src/runtime-install.ts +393 -0
- package/src/sanitize-text.ts +96 -0
- package/src/snowflake.ts +121 -0
- package/src/stderr-guard.ts +155 -0
- package/src/stream.ts +454 -0
- package/src/tab-spacing.ts +336 -0
- package/src/temp.ts +134 -0
- package/src/template.ts +586 -0
- package/src/timing-buffer.ts +47 -0
- package/src/tls-fetch.ts +178 -0
- package/src/turndown/gfm.ts +106 -0
- package/src/turndown/html.ts +257 -0
- package/src/turndown/service.ts +334 -0
- package/src/turndown/types.ts +81 -0
- package/src/turndown.ts +5 -0
- package/src/type-guards.ts +17 -0
- package/src/vendor/mermaid-ascii/NOTICE +33 -0
- package/src/vendor/mermaid-ascii/ascii/ansi.ts +409 -0
- package/src/vendor/mermaid-ascii/ascii/canvas.ts +476 -0
- package/src/vendor/mermaid-ascii/ascii/class-diagram.ts +699 -0
- package/src/vendor/mermaid-ascii/ascii/converter.ts +271 -0
- package/src/vendor/mermaid-ascii/ascii/draw.ts +1382 -0
- package/src/vendor/mermaid-ascii/ascii/edge-bundling.ts +328 -0
- package/src/vendor/mermaid-ascii/ascii/edge-routing.ts +297 -0
- package/src/vendor/mermaid-ascii/ascii/er-diagram.ts +441 -0
- package/src/vendor/mermaid-ascii/ascii/grid.ts +578 -0
- package/src/vendor/mermaid-ascii/ascii/index.ts +187 -0
- package/src/vendor/mermaid-ascii/ascii/multiline-utils.ts +78 -0
- package/src/vendor/mermaid-ascii/ascii/pathfinder.ts +277 -0
- package/src/vendor/mermaid-ascii/ascii/sequence.ts +460 -0
- package/src/vendor/mermaid-ascii/ascii/shapes/circle.ts +27 -0
- package/src/vendor/mermaid-ascii/ascii/shapes/corners.ts +127 -0
- package/src/vendor/mermaid-ascii/ascii/shapes/diamond.ts +27 -0
- package/src/vendor/mermaid-ascii/ascii/shapes/hexagon.ts +27 -0
- package/src/vendor/mermaid-ascii/ascii/shapes/index.ts +101 -0
- package/src/vendor/mermaid-ascii/ascii/shapes/rectangle.ts +175 -0
- package/src/vendor/mermaid-ascii/ascii/shapes/rounded.ts +27 -0
- package/src/vendor/mermaid-ascii/ascii/shapes/special.ts +296 -0
- package/src/vendor/mermaid-ascii/ascii/shapes/stadium.ts +114 -0
- package/src/vendor/mermaid-ascii/ascii/shapes/state.ts +192 -0
- package/src/vendor/mermaid-ascii/ascii/shapes/types.ts +73 -0
- package/src/vendor/mermaid-ascii/ascii/types.ts +273 -0
- package/src/vendor/mermaid-ascii/ascii/validate.ts +120 -0
- package/src/vendor/mermaid-ascii/ascii/xychart.ts +875 -0
- package/src/vendor/mermaid-ascii/class/parser.ts +290 -0
- package/src/vendor/mermaid-ascii/class/types.ts +121 -0
- package/src/vendor/mermaid-ascii/er/parser.ts +181 -0
- package/src/vendor/mermaid-ascii/er/types.ts +91 -0
- package/src/vendor/mermaid-ascii/index.ts +14 -0
- package/src/vendor/mermaid-ascii/multiline-utils.ts +30 -0
- package/src/vendor/mermaid-ascii/parser.ts +645 -0
- package/src/vendor/mermaid-ascii/sequence/parser.ts +207 -0
- package/src/vendor/mermaid-ascii/sequence/types.ts +146 -0
- package/src/vendor/mermaid-ascii/text-metrics.ts +71 -0
- package/src/vendor/mermaid-ascii/types.ts +164 -0
- package/src/vendor/mermaid-ascii/xychart/colors.ts +140 -0
- package/src/vendor/mermaid-ascii/xychart/parser.ts +115 -0
- package/src/vendor/mermaid-ascii/xychart/types.ts +150 -0
- package/src/version.ts +99 -0
- package/src/vterm/buffer.ts +218 -0
- package/src/vterm/terminal.ts +773 -0
- package/src/vterm.ts +8 -0
- package/src/which.ts +234 -0
- package/src/worker-host.ts +100 -0
- package/src/xml.ts +313 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export interface MermaidGraph {
|
|
2
|
+
direction: Direction;
|
|
3
|
+
nodes: Map<string, MermaidNode>;
|
|
4
|
+
edges: MermaidEdge[];
|
|
5
|
+
subgraphs: MermaidSubgraph[];
|
|
6
|
+
classDefs: Map<string, Record<string, string>>;
|
|
7
|
+
/** Maps node IDs to their class names (from `class X className` or `:::className` shorthand) */
|
|
8
|
+
classAssignments: Map<string, string>;
|
|
9
|
+
/** Maps node IDs to inline styles (from `style X fill:#f00,stroke:#333`) */
|
|
10
|
+
nodeStyles: Map<string, Record<string, string>>;
|
|
11
|
+
/** Maps edge indices (or 'default') to inline styles from `linkStyle` directives */
|
|
12
|
+
linkStyles: Map<number | 'default', Record<string, string>>;
|
|
13
|
+
}
|
|
14
|
+
export type Direction = 'TD' | 'TB' | 'LR' | 'BT' | 'RL';
|
|
15
|
+
export interface MermaidNode {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
shape: NodeShape;
|
|
19
|
+
}
|
|
20
|
+
export type NodeShape = 'rectangle' | 'rounded' | 'diamond' | 'stadium' | 'circle' | 'subroutine' | 'doublecircle' | 'hexagon' | 'cylinder' | 'asymmetric' | 'trapezoid' | 'trapezoid-alt' | 'state-start' | 'state-end';
|
|
21
|
+
export interface MermaidEdge {
|
|
22
|
+
source: string;
|
|
23
|
+
target: string;
|
|
24
|
+
label?: string;
|
|
25
|
+
style: EdgeStyle;
|
|
26
|
+
/** Whether to render an arrowhead at the start (source end) of the edge */
|
|
27
|
+
hasArrowStart: boolean;
|
|
28
|
+
/** Whether to render an arrowhead at the end (target end) of the edge */
|
|
29
|
+
hasArrowEnd: boolean;
|
|
30
|
+
}
|
|
31
|
+
export type EdgeStyle = 'solid' | 'dotted' | 'thick';
|
|
32
|
+
export interface MermaidSubgraph {
|
|
33
|
+
id: string;
|
|
34
|
+
label: string;
|
|
35
|
+
nodeIds: string[];
|
|
36
|
+
children: MermaidSubgraph[];
|
|
37
|
+
/** Optional direction override for this subgraph's internal layout */
|
|
38
|
+
direction?: Direction;
|
|
39
|
+
}
|
|
40
|
+
export interface PositionedGraph {
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
nodes: PositionedNode[];
|
|
44
|
+
edges: PositionedEdge[];
|
|
45
|
+
groups: PositionedGroup[];
|
|
46
|
+
}
|
|
47
|
+
export interface PositionedNode {
|
|
48
|
+
id: string;
|
|
49
|
+
label: string;
|
|
50
|
+
shape: NodeShape;
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
/** Inline styles resolved from classDef + explicit `style` statements — override theme defaults */
|
|
56
|
+
inlineStyle?: Record<string, string>;
|
|
57
|
+
}
|
|
58
|
+
export interface PositionedEdge {
|
|
59
|
+
source: string;
|
|
60
|
+
target: string;
|
|
61
|
+
label?: string;
|
|
62
|
+
style: EdgeStyle;
|
|
63
|
+
hasArrowStart: boolean;
|
|
64
|
+
hasArrowEnd: boolean;
|
|
65
|
+
/** Full path including bends — array of {x, y} points */
|
|
66
|
+
points: Point[];
|
|
67
|
+
/** Layout-computed label center position (avoids label-label collisions) */
|
|
68
|
+
labelPosition?: Point;
|
|
69
|
+
/** Inline styles resolved from `linkStyle` directives — override theme defaults */
|
|
70
|
+
inlineStyle?: Record<string, string>;
|
|
71
|
+
}
|
|
72
|
+
export interface Point {
|
|
73
|
+
x: number;
|
|
74
|
+
y: number;
|
|
75
|
+
}
|
|
76
|
+
export interface PositionedGroup {
|
|
77
|
+
id: string;
|
|
78
|
+
label: string;
|
|
79
|
+
x: number;
|
|
80
|
+
y: number;
|
|
81
|
+
width: number;
|
|
82
|
+
height: number;
|
|
83
|
+
children: PositionedGroup[];
|
|
84
|
+
}
|
|
85
|
+
export interface RenderOptions {
|
|
86
|
+
/** Background color → CSS variable --bg. Default: '#FFFFFF' */
|
|
87
|
+
bg?: string;
|
|
88
|
+
/** Foreground / primary text color → CSS variable --fg. Default: '#27272A' */
|
|
89
|
+
fg?: string;
|
|
90
|
+
/** Edge/connector color → CSS variable --line */
|
|
91
|
+
line?: string;
|
|
92
|
+
/** Arrow heads, highlights → CSS variable --accent */
|
|
93
|
+
accent?: string;
|
|
94
|
+
/** Secondary text, edge labels → CSS variable --muted */
|
|
95
|
+
muted?: string;
|
|
96
|
+
/** Node/box fill tint → CSS variable --surface */
|
|
97
|
+
surface?: string;
|
|
98
|
+
/** Node/group stroke color → CSS variable --border */
|
|
99
|
+
border?: string;
|
|
100
|
+
/** Font family for all text. Default: 'Inter' */
|
|
101
|
+
font?: string;
|
|
102
|
+
/** Canvas padding in px. Default: 40 */
|
|
103
|
+
padding?: number;
|
|
104
|
+
/** Horizontal spacing between sibling nodes. Default: 24 */
|
|
105
|
+
nodeSpacing?: number;
|
|
106
|
+
/** Vertical spacing between layers. Default: 40 */
|
|
107
|
+
layerSpacing?: number;
|
|
108
|
+
/** Spacing between disconnected components. Default: nodeSpacing (24) */
|
|
109
|
+
componentSpacing?: number;
|
|
110
|
+
/** Render with transparent background (no background style on SVG). Default: false */
|
|
111
|
+
transparent?: boolean;
|
|
112
|
+
/** Enable hover tooltips on chart data points (xychart only). Default: false */
|
|
113
|
+
interactive?: boolean;
|
|
114
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Default accent for charts when the theme doesn't provide one. */
|
|
2
|
+
export declare const CHART_ACCENT_FALLBACK = "#3b82f6";
|
|
3
|
+
/** Check whether a string is a valid 6-digit hex color (e.g. "#3b82f6"). */
|
|
4
|
+
export declare function isValidHex(color: string): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Detect whether a background color is dark (lightness < 50%).
|
|
7
|
+
*/
|
|
8
|
+
export declare function isDarkBackground(bgHex: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Mix two hex colors in RGB space.
|
|
11
|
+
* `ratio` controls how much of `fgHex` shows: 0 = pure bg, 1 = pure fg.
|
|
12
|
+
* Equivalent to alpha-compositing fg over bg at the given opacity.
|
|
13
|
+
*/
|
|
14
|
+
export declare function mixHexColors(bgHex: string, fgHex: string, ratio: number): string;
|
|
15
|
+
/**
|
|
16
|
+
* Get the hex color for a series index.
|
|
17
|
+
* Index 0 returns the accent color as-is.
|
|
18
|
+
* Index 1+ alternate between darker and lighter shades of the same hue
|
|
19
|
+
* with subtle hue drift (±8-12° per tier) to stay in the same family.
|
|
20
|
+
*
|
|
21
|
+
* When `bgColor` is provided, shade direction adapts to the background:
|
|
22
|
+
* - Light bg: odd = darker, even = lighter (default)
|
|
23
|
+
* - Dark bg: odd = lighter, even = darker (so shades stay visible)
|
|
24
|
+
*/
|
|
25
|
+
export declare function getSeriesColor(index: number, accentColor: string, bgColor?: string): string;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/** Parsed XY chart — logical structure from mermaid text */
|
|
2
|
+
export interface XYChart {
|
|
3
|
+
/** Optional chart title */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Chart orientation: vertical (default) or horizontal */
|
|
6
|
+
horizontal: boolean;
|
|
7
|
+
/** X-axis configuration */
|
|
8
|
+
xAxis: XYAxis;
|
|
9
|
+
/** Y-axis configuration */
|
|
10
|
+
yAxis: XYAxis;
|
|
11
|
+
/** Data series (bar and/or line) */
|
|
12
|
+
series: XYChartSeries[];
|
|
13
|
+
}
|
|
14
|
+
/** Axis configuration — categorical (labels) or numeric (range) */
|
|
15
|
+
export interface XYAxis {
|
|
16
|
+
/** Optional axis title/label */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** Categorical labels (e.g., ["jan", "feb", "mar"]) — mutually exclusive with range */
|
|
19
|
+
categories?: string[];
|
|
20
|
+
/** Numeric range — mutually exclusive with categories */
|
|
21
|
+
range?: {
|
|
22
|
+
min: number;
|
|
23
|
+
max: number;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** A single data series (bar or line) */
|
|
27
|
+
export interface XYChartSeries {
|
|
28
|
+
/** Series type */
|
|
29
|
+
type: 'bar' | 'line';
|
|
30
|
+
/** Data values — one per category, or evenly spaced across numeric range */
|
|
31
|
+
data: number[];
|
|
32
|
+
}
|
|
33
|
+
export interface PositionedXYChart {
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
/** Whether this is a horizontal (rotated) chart */
|
|
37
|
+
horizontal?: boolean;
|
|
38
|
+
/** Title text and position (if present) */
|
|
39
|
+
title?: PositionedTitle;
|
|
40
|
+
/** Positioned x-axis with tick marks and labels */
|
|
41
|
+
xAxis: PositionedAxis;
|
|
42
|
+
/** Positioned y-axis with tick marks and labels */
|
|
43
|
+
yAxis: PositionedAxis;
|
|
44
|
+
/** The plot area bounds (inside axes) */
|
|
45
|
+
plotArea: PlotArea;
|
|
46
|
+
/** Positioned bar groups */
|
|
47
|
+
bars: PositionedBar[];
|
|
48
|
+
/** Positioned line polylines */
|
|
49
|
+
lines: PositionedLine[];
|
|
50
|
+
/** Horizontal grid lines for readability */
|
|
51
|
+
gridLines: GridLine[];
|
|
52
|
+
/** Legend items (shown when multiple series) */
|
|
53
|
+
legend: LegendItem[];
|
|
54
|
+
}
|
|
55
|
+
export interface LegendItem {
|
|
56
|
+
/** Display label */
|
|
57
|
+
label: string;
|
|
58
|
+
/** Position of the swatch/icon */
|
|
59
|
+
x: number;
|
|
60
|
+
y: number;
|
|
61
|
+
/** Series type determines swatch shape (rect for bar, line+dot for line) */
|
|
62
|
+
type: 'bar' | 'line';
|
|
63
|
+
/** Series index within its type (for layout grouping) */
|
|
64
|
+
seriesIndex: number;
|
|
65
|
+
/** Global color index across all series (for unified color assignment) */
|
|
66
|
+
colorIndex: number;
|
|
67
|
+
}
|
|
68
|
+
export interface PositionedTitle {
|
|
69
|
+
text: string;
|
|
70
|
+
x: number;
|
|
71
|
+
y: number;
|
|
72
|
+
}
|
|
73
|
+
export interface PositionedAxis {
|
|
74
|
+
/** Optional axis title text and position */
|
|
75
|
+
title?: {
|
|
76
|
+
text: string;
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
rotate?: number;
|
|
80
|
+
};
|
|
81
|
+
/** Tick positions along the axis */
|
|
82
|
+
ticks: AxisTick[];
|
|
83
|
+
/** Axis line: start and end coordinates */
|
|
84
|
+
line: {
|
|
85
|
+
x1: number;
|
|
86
|
+
y1: number;
|
|
87
|
+
x2: number;
|
|
88
|
+
y2: number;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export interface AxisTick {
|
|
92
|
+
/** Label text for this tick */
|
|
93
|
+
label: string;
|
|
94
|
+
/** Position of the tick mark on the axis */
|
|
95
|
+
x: number;
|
|
96
|
+
y: number;
|
|
97
|
+
/** End of the tick mark (short perpendicular line) */
|
|
98
|
+
tx: number;
|
|
99
|
+
ty: number;
|
|
100
|
+
/** Label anchor position */
|
|
101
|
+
labelX: number;
|
|
102
|
+
labelY: number;
|
|
103
|
+
/** Text anchor for label */
|
|
104
|
+
textAnchor: 'start' | 'middle' | 'end';
|
|
105
|
+
}
|
|
106
|
+
export interface PlotArea {
|
|
107
|
+
x: number;
|
|
108
|
+
y: number;
|
|
109
|
+
width: number;
|
|
110
|
+
height: number;
|
|
111
|
+
}
|
|
112
|
+
export interface PositionedBar {
|
|
113
|
+
/** Bar rectangle in SVG coordinates */
|
|
114
|
+
x: number;
|
|
115
|
+
y: number;
|
|
116
|
+
width: number;
|
|
117
|
+
height: number;
|
|
118
|
+
/** Original data value */
|
|
119
|
+
value: number;
|
|
120
|
+
/** Category label for this bar (e.g. "Jan") */
|
|
121
|
+
label?: string;
|
|
122
|
+
/** Series index within bar type (for layout grouping) */
|
|
123
|
+
seriesIndex: number;
|
|
124
|
+
/** Global color index across all series */
|
|
125
|
+
colorIndex: number;
|
|
126
|
+
}
|
|
127
|
+
export interface PositionedLine {
|
|
128
|
+
/** Polyline points */
|
|
129
|
+
points: Array<{
|
|
130
|
+
x: number;
|
|
131
|
+
y: number;
|
|
132
|
+
value: number;
|
|
133
|
+
label?: string;
|
|
134
|
+
}>;
|
|
135
|
+
/** Series index within line type (for layout grouping) */
|
|
136
|
+
seriesIndex: number;
|
|
137
|
+
/** Global color index across all series */
|
|
138
|
+
colorIndex: number;
|
|
139
|
+
}
|
|
140
|
+
export interface GridLine {
|
|
141
|
+
x1: number;
|
|
142
|
+
y1: number;
|
|
143
|
+
x2: number;
|
|
144
|
+
y2: number;
|
|
145
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compare two version strings.
|
|
3
|
+
*
|
|
4
|
+
* Canonical comparator that supersedes the historical in-repo copies
|
|
5
|
+
* (update-cli, hackage scraper, release scripts):
|
|
6
|
+
* - inputs are trimmed and at most one leading `v`/`V` is stripped
|
|
7
|
+
* - dot-separated segments are compared numerically, missing trailing
|
|
8
|
+
* segments count as 0, so `1.2` === `1.2.0` and any segment count works
|
|
9
|
+
* - a SemVer-2.0 prerelease suffix sorts before the plain release
|
|
10
|
+
* (`1.0.0-beta` < `1.0.0`); prerelease identifiers follow SemVer order
|
|
11
|
+
* (numeric < alphanumeric, numeric compared by value, alphanumeric
|
|
12
|
+
* compared lexically, longer sets of equal fields win)
|
|
13
|
+
* - SemVer build metadata begins at the first `+` and does not participate
|
|
14
|
+
* in precedence; it is stripped before core/prerelease parsing
|
|
15
|
+
* - malformed numeric segments compare as 0 (`1.2.x` === `1.2.0`)
|
|
16
|
+
* - never throws; returns only -1 | 0 | 1
|
|
17
|
+
*/
|
|
18
|
+
export declare function compareVersions(a: string, b: string): number;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/** Cell rendition tracked by the virtual terminal. */
|
|
2
|
+
export interface CellAttributes {
|
|
3
|
+
bold: boolean;
|
|
4
|
+
dim: boolean;
|
|
5
|
+
italic: boolean;
|
|
6
|
+
underline: boolean;
|
|
7
|
+
inverse: boolean;
|
|
8
|
+
strikethrough: boolean;
|
|
9
|
+
overline: boolean;
|
|
10
|
+
fgMode: 0 | 1 | 2;
|
|
11
|
+
fg: number;
|
|
12
|
+
bgMode: 0 | 1 | 2;
|
|
13
|
+
bg: number;
|
|
14
|
+
}
|
|
15
|
+
/** A mutable terminal grid cell. */
|
|
16
|
+
export interface CellData {
|
|
17
|
+
chars: string;
|
|
18
|
+
width: number;
|
|
19
|
+
attrs: CellAttributes;
|
|
20
|
+
}
|
|
21
|
+
/** Creates the default rendition. */
|
|
22
|
+
export declare function defaultAttributes(): CellAttributes;
|
|
23
|
+
/** Creates an empty cell with the supplied rendition. */
|
|
24
|
+
export declare function blankCell(attrs?: CellAttributes): CellData;
|
|
25
|
+
/** Proposed xterm-compatible cell readback object. */
|
|
26
|
+
export declare class BufferCell {
|
|
27
|
+
#private;
|
|
28
|
+
/** Reuses this object for another grid cell. */
|
|
29
|
+
setFrom(cell: CellData): this;
|
|
30
|
+
/** Returns the grapheme stored in this cell. */
|
|
31
|
+
getChars(): string;
|
|
32
|
+
/** Returns the cell width, with zero denoting a wide-cell continuation. */
|
|
33
|
+
getWidth(): number;
|
|
34
|
+
/** Returns the packed foreground palette index or RGB value. */
|
|
35
|
+
getFgColor(): number;
|
|
36
|
+
/** Returns the packed background palette index or RGB value. */
|
|
37
|
+
getBgColor(): number;
|
|
38
|
+
/** Reports bold rendition. */
|
|
39
|
+
isBold(): number;
|
|
40
|
+
/** Reports dim rendition. */
|
|
41
|
+
isDim(): number;
|
|
42
|
+
/** Reports italic rendition. */
|
|
43
|
+
isItalic(): number;
|
|
44
|
+
/** Reports underline rendition. */
|
|
45
|
+
isUnderline(): number;
|
|
46
|
+
/** Reports inverse rendition. */
|
|
47
|
+
isInverse(): number;
|
|
48
|
+
/** Reports strikethrough rendition. */
|
|
49
|
+
isStrikethrough(): number;
|
|
50
|
+
/** Reports overline rendition. */
|
|
51
|
+
isOverline(): number;
|
|
52
|
+
/** Reports a true-color foreground. */
|
|
53
|
+
isFgRGB(): boolean;
|
|
54
|
+
/** Reports a true-color background. */
|
|
55
|
+
isBgRGB(): boolean;
|
|
56
|
+
/** Reports a palette foreground. */
|
|
57
|
+
isFgPalette(): boolean;
|
|
58
|
+
/** Reports a palette background. */
|
|
59
|
+
isBgPalette(): boolean;
|
|
60
|
+
}
|
|
61
|
+
/** One physical row in a terminal buffer. */
|
|
62
|
+
export declare class BufferLine {
|
|
63
|
+
cells: CellData[];
|
|
64
|
+
isWrapped: boolean;
|
|
65
|
+
constructor(columns: number, attrs?: CellAttributes);
|
|
66
|
+
/** Number of grid columns in the line. */
|
|
67
|
+
get length(): number;
|
|
68
|
+
/** Reads a cell, optionally reusing the caller's object. */
|
|
69
|
+
getCell(column: number, cell?: BufferCell): BufferCell | undefined;
|
|
70
|
+
/** Converts a column range to text. */
|
|
71
|
+
translateToString(trimRight?: boolean, startColumn?: number, endColumn?: number): string;
|
|
72
|
+
}
|
|
73
|
+
/** Storage backing one terminal screen and its history. */
|
|
74
|
+
export interface BufferState {
|
|
75
|
+
lines: BufferLine[];
|
|
76
|
+
baseY: number;
|
|
77
|
+
viewportY: number;
|
|
78
|
+
cursorX: number;
|
|
79
|
+
cursorY: number;
|
|
80
|
+
}
|
|
81
|
+
/** Public xterm-compatible view over a buffer state. */
|
|
82
|
+
export declare class BufferView {
|
|
83
|
+
private readonly state;
|
|
84
|
+
constructor(state: () => BufferState);
|
|
85
|
+
/** Number of physical lines, including scrollback. */
|
|
86
|
+
get length(): number;
|
|
87
|
+
/** First row of the live screen in the full buffer. */
|
|
88
|
+
get baseY(): number;
|
|
89
|
+
/** First row currently exposed by the viewport. */
|
|
90
|
+
get viewportY(): number;
|
|
91
|
+
/** Cursor column in the live screen. */
|
|
92
|
+
get cursorX(): number;
|
|
93
|
+
/** Cursor row in the live screen. */
|
|
94
|
+
get cursorY(): number;
|
|
95
|
+
/** Reads a physical buffer line. */
|
|
96
|
+
getLine(row: number): BufferLine | undefined;
|
|
97
|
+
/** Creates a reusable empty cell readback object. */
|
|
98
|
+
getNullCell(): BufferCell;
|
|
99
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BufferView } from "./buffer.js";
|
|
2
|
+
/** Construction options supported by the headless virtual terminal. */
|
|
3
|
+
export interface TerminalOptions {
|
|
4
|
+
cols?: number;
|
|
5
|
+
rows?: number;
|
|
6
|
+
scrollback?: number;
|
|
7
|
+
allowProposedApi?: boolean;
|
|
8
|
+
disableStdin?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Disposable event subscription. */
|
|
11
|
+
export interface Disposable {
|
|
12
|
+
dispose(): void;
|
|
13
|
+
}
|
|
14
|
+
/** Observable terminal modes used by interactive input normalization. */
|
|
15
|
+
export interface TerminalModes {
|
|
16
|
+
applicationCursorKeysMode: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Buffer collection exposed by the virtual terminal. */
|
|
19
|
+
export interface TerminalBuffers {
|
|
20
|
+
readonly active: BufferView;
|
|
21
|
+
readonly normal: BufferView;
|
|
22
|
+
readonly alternate: BufferView;
|
|
23
|
+
}
|
|
24
|
+
/** Behavior-compatible reimplementation of @xterm/headless's used surface. */
|
|
25
|
+
export declare class Terminal {
|
|
26
|
+
#private;
|
|
27
|
+
/** Current terminal column count. */
|
|
28
|
+
cols: number;
|
|
29
|
+
/** Current terminal row count. */
|
|
30
|
+
rows: number;
|
|
31
|
+
/** Normal, alternate, and active buffer views. */
|
|
32
|
+
readonly buffer: TerminalBuffers;
|
|
33
|
+
/** Currently active input modes. */
|
|
34
|
+
readonly modes: TerminalModes;
|
|
35
|
+
constructor(options?: TerminalOptions);
|
|
36
|
+
/** Parses terminal output and invokes the callback after the write is committed. */
|
|
37
|
+
write(data: string | Uint8Array, callback?: () => void): void;
|
|
38
|
+
/** Changes the terminal grid and reflows wrapped normal-buffer lines. */
|
|
39
|
+
resize(columns: number, rows: number): void;
|
|
40
|
+
/** Subscribes to terminal-generated input replies. */
|
|
41
|
+
onData(listener: (data: string) => void): Disposable;
|
|
42
|
+
/** Releases parser state and event listeners. */
|
|
43
|
+
dispose(): void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Behavior-compatible reimplementation of @xterm/headless's used surface. */
|
|
2
|
+
export * from "./vterm/buffer.js";
|
|
3
|
+
export * from "./vterm/terminal.js";
|
|
4
|
+
import { Terminal } from "./vterm/terminal.js";
|
|
5
|
+
declare const vterm: {
|
|
6
|
+
Terminal: typeof Terminal;
|
|
7
|
+
};
|
|
8
|
+
export default vterm;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cache policy for which lookups.
|
|
3
|
+
*/
|
|
4
|
+
export declare const enum WhichCachePolicy {
|
|
5
|
+
/**
|
|
6
|
+
* Use cached result if available.
|
|
7
|
+
*/
|
|
8
|
+
Cached = 0,
|
|
9
|
+
/**
|
|
10
|
+
* Bypass cache and perform a new lookup.
|
|
11
|
+
*/
|
|
12
|
+
Bypass = 1,
|
|
13
|
+
/**
|
|
14
|
+
* Always update cache.
|
|
15
|
+
*/
|
|
16
|
+
Fresh = 2,
|
|
17
|
+
/**
|
|
18
|
+
* Read-only, serves from cache if present, but doesn't write.
|
|
19
|
+
*/
|
|
20
|
+
ReadOnly = 3
|
|
21
|
+
}
|
|
22
|
+
export interface WhichOptions extends Bun.WhichOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Cache policy for the lookup.
|
|
25
|
+
* Defaults to `WhichCachePolicy.Fresh`.
|
|
26
|
+
*/
|
|
27
|
+
cache?: WhichCachePolicy;
|
|
28
|
+
}
|
|
29
|
+
export declare const whichFresh: typeof Bun.which;
|
|
30
|
+
/**
|
|
31
|
+
* Locate binary on PATH (with flexible caching).
|
|
32
|
+
*
|
|
33
|
+
* @param command - Binary name to resolve
|
|
34
|
+
* @param options - Bun.WhichOptions plus `cache` control
|
|
35
|
+
* @returns Filesystem path if found, else null
|
|
36
|
+
*/
|
|
37
|
+
export declare function $which(command: string, options?: WhichOptions): string | null;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Prefix reserved for argv selectors dispatched by the shared CLI worker host. */
|
|
2
|
+
export declare const WORKER_HOST_SELECTOR_PREFIX = "__omp_worker_";
|
|
3
|
+
/** Whether an argv value selects a worker hosted by the shared CLI entrypoint. */
|
|
4
|
+
export declare function isWorkerHostSelector(value: string | undefined): value is string;
|
|
5
|
+
/** Called by CLI entrypoints whose main module dispatches worker argv selectors. */
|
|
6
|
+
export declare function declareWorkerHostEntry(): void;
|
|
7
|
+
/** Main-module path of the self-dispatching CLI host, or null outside it. */
|
|
8
|
+
export declare function workerHostEntry(): string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Buffers messages a Bun worker thread receives before its real handler is
|
|
11
|
+
* attached, then hands them off once it is.
|
|
12
|
+
*
|
|
13
|
+
* Bun delivers messages the parent posted before the worker spawned exactly
|
|
14
|
+
* once — when the worker entry module's top-level evaluation completes — to the
|
|
15
|
+
* `message` listeners present at that moment. A worker whose handler attaches
|
|
16
|
+
* via a later `await import(...)` therefore misses that flush. The
|
|
17
|
+
* self-dispatching CLI host imports each worker module dynamically from inside
|
|
18
|
+
* its argv dispatch, so the worker's own `parentPort.on("message")` lands after
|
|
19
|
+
* the flush and the parent's synchronously-posted `init` handshake is dropped —
|
|
20
|
+
* every run then stalls until the init timeout fires and silently falls back to
|
|
21
|
+
* the inline worker (issue: eval cells always taking the full timeout).
|
|
22
|
+
*
|
|
23
|
+
* The host calls {@link installWorkerInbox} synchronously in the entry's sync
|
|
24
|
+
* prefix (before importing the worker module) so a `parentPort` listener exists
|
|
25
|
+
* at flush time; the worker module then {@link consumeWorkerInbox}es it and
|
|
26
|
+
* binds the real handler, replaying anything buffered. Re-dispatching through
|
|
27
|
+
* `parentPort.emit("message", …)` is not an option — Bun's port is an
|
|
28
|
+
* `EventTarget` whose `emit` throws — so the inbox calls the handler directly.
|
|
29
|
+
*/
|
|
30
|
+
export interface WorkerInbox {
|
|
31
|
+
/** Route buffered and subsequent messages to `handler`; returns an unbind fn. */
|
|
32
|
+
bind(handler: (message: unknown) => void): () => void;
|
|
33
|
+
}
|
|
34
|
+
/** Minimal `parentPort` surface the inbox needs (Node/Bun `MessagePort`). */
|
|
35
|
+
interface MessageListenerPort {
|
|
36
|
+
on(event: "message", listener: (value: unknown) => void): unknown;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Attach a buffering `message` listener on `port` synchronously and stash the
|
|
40
|
+
* resulting inbox for the worker module to {@link consumeWorkerInbox}. MUST be
|
|
41
|
+
* called in the entry module's synchronous prefix — before the worker module is
|
|
42
|
+
* imported — so the listener exists when Bun flushes pre-spawn messages.
|
|
43
|
+
*/
|
|
44
|
+
export declare function installWorkerInbox(port: MessageListenerPort): WorkerInbox;
|
|
45
|
+
/**
|
|
46
|
+
* Take the inbox installed by {@link installWorkerInbox} for this worker, or
|
|
47
|
+
* `null` when the worker module was loaded directly (no host pre-buffering, so
|
|
48
|
+
* the module's own synchronous top-level listener already wins the flush).
|
|
49
|
+
*/
|
|
50
|
+
export declare function consumeWorkerInbox(): WorkerInbox | null;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Behavior-compatible reimplementation of fast-xml-parser's used surface. */
|
|
2
|
+
/** Context supplied to an array-selection callback. */
|
|
3
|
+
export type XMLArraySelector = (tagName: string, jPath: string, isLeafNode: boolean, isAttribute: boolean | null) => boolean;
|
|
4
|
+
/** Options supported by {@link XMLParser}. */
|
|
5
|
+
export interface XMLParserOptions {
|
|
6
|
+
/** Omits attributes when true (default). */
|
|
7
|
+
ignoreAttributes?: boolean;
|
|
8
|
+
/** Prefix applied to attribute property names. */
|
|
9
|
+
attributeNamePrefix?: string;
|
|
10
|
+
/** Property used for text alongside children or attributes. */
|
|
11
|
+
textNodeName?: string;
|
|
12
|
+
/** Trims ordinary text and attribute values. */
|
|
13
|
+
trimValues?: boolean;
|
|
14
|
+
/** Coerces numeric and boolean element text. */
|
|
15
|
+
parseTagValue?: boolean;
|
|
16
|
+
/** Coerces numeric and boolean attribute values. */
|
|
17
|
+
parseAttributeValue?: boolean;
|
|
18
|
+
/** Controls entity processing and its expansion ceiling. */
|
|
19
|
+
processEntities?: boolean | {
|
|
20
|
+
maxTotalExpansions?: number;
|
|
21
|
+
};
|
|
22
|
+
/** Selects element or attribute properties that must always be arrays. */
|
|
23
|
+
isArray?: XMLArraySelector;
|
|
24
|
+
}
|
|
25
|
+
/** Parses XML into the object shape used by the document converters. */
|
|
26
|
+
export declare class XMLParser {
|
|
27
|
+
#private;
|
|
28
|
+
constructor(options?: XMLParserOptions);
|
|
29
|
+
/** Parses one XML document. */
|
|
30
|
+
parse(xml: string): unknown;
|
|
31
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "module",
|
|
3
|
+
"name": "@linxiraos/pi-utils",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Shared utilities for pi packages",
|
|
6
|
+
"homepage": "https://linxira-os.github.io",
|
|
7
|
+
"author": "Can Boluk",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/Linxira-OS/linxira-zeta.git",
|
|
12
|
+
"directory": "packages/utils"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/can1357/oh-my-pi/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"utilities",
|
|
19
|
+
"cli",
|
|
20
|
+
"logging",
|
|
21
|
+
"streams"
|
|
22
|
+
],
|
|
23
|
+
"main": "./src/index.ts",
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
25
|
+
"scripts": {
|
|
26
|
+
"check": "biome check . && bun run check:types",
|
|
27
|
+
"check:types": "tsgo -p tsconfig.json --noEmit",
|
|
28
|
+
"lint": "biome lint .",
|
|
29
|
+
"test": "bun test --parallel",
|
|
30
|
+
"fix": "biome check --write --unsafe .",
|
|
31
|
+
"fmt": "biome format --write ."
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@linxiraos/pi-natives": "1.0.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/bun": "^1.3.14"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"bun": ">=1.3.14"
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"src",
|
|
44
|
+
"README.md",
|
|
45
|
+
"CHANGELOG.md",
|
|
46
|
+
"dist/types"
|
|
47
|
+
],
|
|
48
|
+
"exports": {
|
|
49
|
+
".": {
|
|
50
|
+
"types": "./dist/types/index.d.ts",
|
|
51
|
+
"import": "./src/index.ts"
|
|
52
|
+
},
|
|
53
|
+
"./*": {
|
|
54
|
+
"types": "./dist/types/*.d.ts",
|
|
55
|
+
"import": "./src/*.ts"
|
|
56
|
+
},
|
|
57
|
+
"./*.js": "./src/*.ts"
|
|
58
|
+
}
|
|
59
|
+
}
|