@crysound/crychart 0.0.0-stage → 1.0.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 (82) hide show
  1. package/LICENSE.md +288 -0
  2. package/LICENSE.zh-CN.md +290 -0
  3. package/README.md +83 -3
  4. package/README.zh-CN.md +79 -0
  5. package/dist/crychart.cjs +25234 -0
  6. package/dist/crychart.global.js +25236 -0
  7. package/dist/crychart.js +25211 -0
  8. package/dist/themes.js +357 -0
  9. package/dist/types/adapters/opentest.d.ts +69 -0
  10. package/dist/types/annotation-interaction.d.ts +36 -0
  11. package/dist/types/axis-canvas.d.ts +78 -0
  12. package/dist/types/axis-layout.d.ts +10 -0
  13. package/dist/types/axis-scroll-animation.d.ts +16 -0
  14. package/dist/types/axis.d.ts +532 -0
  15. package/dist/types/axis3d-label-layout.d.ts +45 -0
  16. package/dist/types/chart-events.d.ts +89 -0
  17. package/dist/types/chart.d.ts +674 -0
  18. package/dist/types/compatibility-types.d.ts +55 -0
  19. package/dist/types/component-highlight.d.ts +21 -0
  20. package/dist/types/contracts.d.ts +88 -0
  21. package/dist/types/core/data.d.ts +204 -0
  22. package/dist/types/core/events.d.ts +16 -0
  23. package/dist/types/core/line-delta-certificate.d.ts +70 -0
  24. package/dist/types/core/paged-columns.d.ts +180 -0
  25. package/dist/types/core/styles.d.ts +350 -0
  26. package/dist/types/css-text-fonts.d.ts +13 -0
  27. package/dist/types/cursor-api.d.ts +47 -0
  28. package/dist/types/custom-icon.d.ts +46 -0
  29. package/dist/types/data-bounds.d.ts +28 -0
  30. package/dist/types/data-order.d.ts +49 -0
  31. package/dist/types/data-runs.d.ts +15 -0
  32. package/dist/types/date-time-formatting.d.ts +32 -0
  33. package/dist/types/date-time-grid.d.ts +56 -0
  34. package/dist/types/formatting-functions.d.ts +16 -0
  35. package/dist/types/geometry.d.ts +378 -0
  36. package/dist/types/gradients.d.ts +37 -0
  37. package/dist/types/grid-layout.d.ts +10 -0
  38. package/dist/types/heatmap-stream.d.ts +38 -0
  39. package/dist/types/hierarchy.d.ts +191 -0
  40. package/dist/types/index.d.ts +75 -0
  41. package/dist/types/interaction-policy.d.ts +56 -0
  42. package/dist/types/line-block-cache.d.ts +146 -0
  43. package/dist/types/line-coverage-geometry.d.ts +28 -0
  44. package/dist/types/line-display-arena.d.ts +64 -0
  45. package/dist/types/line-display-cache.d.ts +144 -0
  46. package/dist/types/line-display-packets.d.ts +43 -0
  47. package/dist/types/line-extrema-pair-proof.d.ts +23 -0
  48. package/dist/types/line-palette-3d.d.ts +6 -0
  49. package/dist/types/line-selection-ledger.d.ts +143 -0
  50. package/dist/types/map.d.ts +219 -0
  51. package/dist/types/mesh3d.d.ts +306 -0
  52. package/dist/types/native-legend.d.ts +208 -0
  53. package/dist/types/point-fill.d.ts +14 -0
  54. package/dist/types/point-stroke-geometry.d.ts +12 -0
  55. package/dist/types/polar-heatmap.d.ts +68 -0
  56. package/dist/types/polar-layout.d.ts +100 -0
  57. package/dist/types/polar-series.d.ts +79 -0
  58. package/dist/types/raster-clip.d.ts +37 -0
  59. package/dist/types/render-heatmap.d.ts +117 -0
  60. package/dist/types/render-line-coverage.d.ts +95 -0
  61. package/dist/types/render-line-direction.d.ts +27 -0
  62. package/dist/types/render-line-offsets.d.ts +61 -0
  63. package/dist/types/render-line-strip.d.ts +102 -0
  64. package/dist/types/render-line-texture.d.ts +30 -0
  65. package/dist/types/render.d.ts +66 -0
  66. package/dist/types/render3d.d.ts +137 -0
  67. package/dist/types/result-table-layout.d.ts +39 -0
  68. package/dist/types/series-attributes.d.ts +7 -0
  69. package/dist/types/series.d.ts +404 -0
  70. package/dist/types/specialty.d.ts +551 -0
  71. package/dist/types/streaming-line-policy.d.ts +11 -0
  72. package/dist/types/stroke-geometry.d.ts +5 -0
  73. package/dist/types/themes.d.ts +32 -0
  74. package/dist/types/time-formatting.d.ts +23 -0
  75. package/dist/types/time-grid.d.ts +26 -0
  76. package/dist/types/ui.d.ts +207 -0
  77. package/dist/types/viewport.d.ts +18 -0
  78. package/dist/types/world-axis.d.ts +21 -0
  79. package/dist/types/world-camera.d.ts +88 -0
  80. package/dist/types/zoom-clock.d.ts +36 -0
  81. package/docs/npm-usage.md +31 -0
  82. package/package.json +68 -6
@@ -0,0 +1,207 @@
1
+ import { EventHub, type EventToken } from './core/events.js';
2
+ import { Icon } from './custom-icon.js';
3
+ import { FontSettings, type FillStyle, type LineStyle, type Theme, type ValueOrMutator } from './core/styles.js';
4
+ import type { Rect } from './contracts.js';
5
+ import { type ResultTableLayout } from './result-table-layout.js';
6
+ export interface UIPoint {
7
+ x: number;
8
+ y: number;
9
+ [key: string]: any;
10
+ }
11
+ export interface UIHost {
12
+ invalidate?(): void;
13
+ readonly theme?: Partial<Theme>;
14
+ readonly overlay?: HTMLCanvasElement;
15
+ readonly resolveTextFont?: (font: FontSettings) => FontSettings;
16
+ }
17
+ export type UIProject = (position: UIPoint, coordinates?: any) => UIPoint;
18
+ export declare const fillCSS: (fill: any, fallback?: string) => string;
19
+ export declare function applyLine(ctx: CanvasRenderingContext2D, style: any): boolean;
20
+ export declare class UIBackground {
21
+ private readonly change;
22
+ fill: FillStyle;
23
+ stroke: LineStyle;
24
+ constructor(change?: () => void);
25
+ setFillStyle(value: ValueOrMutator<FillStyle>): this;
26
+ getFillStyle(): FillStyle;
27
+ setStrokeStyle(value: ValueOrMutator<LineStyle>): this;
28
+ getStrokeStyle(): LineStyle;
29
+ }
30
+ export declare class UIElement {
31
+ readonly events: EventHub;
32
+ readonly owner: UIHost;
33
+ readonly kind: string;
34
+ readonly coordinates: any;
35
+ position: UIPoint;
36
+ origin: UIPoint;
37
+ visible: boolean;
38
+ disposed: boolean;
39
+ text: string;
40
+ font: FontSettings;
41
+ fill: FillStyle;
42
+ background: UIBackground;
43
+ padding: number;
44
+ margin: number;
45
+ pointerEvents: boolean;
46
+ checked: boolean;
47
+ effect: boolean;
48
+ bounds: Rect;
49
+ rotation: number;
50
+ private lastDrawingContext?;
51
+ constructor(owner?: UIHost, builder?: any, coordinates?: any);
52
+ protected changed(): void;
53
+ setText(value: string): this;
54
+ getText(): string;
55
+ setTextFont(value: ValueOrMutator<FontSettings>): this;
56
+ getTextFont(): FontSettings;
57
+ private textMeasurementContext;
58
+ private measureTextBox;
59
+ /** Pixel size in public UISpace: content(0), padded content/background(1/2), or everything(3). */
60
+ getSize(spaceOfInterest?: number): UIPoint;
61
+ setFont(value: ValueOrMutator<FontSettings>): this;
62
+ setTextFillStyle(value: ValueOrMutator<FillStyle>): this;
63
+ getTextFillStyle(): FillStyle;
64
+ setPosition(value: UIPoint): this;
65
+ getPosition(): UIPoint;
66
+ setOrigin(value: UIPoint): this;
67
+ getOrigin(): UIPoint;
68
+ setVisible(value: boolean): this;
69
+ getVisible(): boolean;
70
+ setBackground(value: ValueOrMutator<UIBackground>): this;
71
+ getBackground(): UIBackground;
72
+ setPadding(value: number | {
73
+ left?: number;
74
+ right?: number;
75
+ top?: number;
76
+ bottom?: number;
77
+ }): this;
78
+ setMargin(value: number): this;
79
+ setPointerEvents(value: boolean): this;
80
+ setMouseInteractions(value: boolean): this;
81
+ setEffect(value: boolean): this;
82
+ setRotation(value: number): this;
83
+ setTextRotation(value: number): this;
84
+ setChecked(value: boolean): this;
85
+ getChecked(): boolean;
86
+ on(type: string, listener: (...args: any[]) => void): EventToken;
87
+ off(token: EventToken): boolean;
88
+ off(type: string, token: EventToken): boolean;
89
+ onDispose(listener: (element: this) => void): EventToken;
90
+ offDispose(token: EventToken): boolean;
91
+ onMouseClick(listener: (...args: any[]) => void): EventToken;
92
+ onCheckedChange(listener: (...args: any[]) => void): EventToken;
93
+ onPositionChange(listener: (...args: any[]) => void): EventToken;
94
+ isDisposed(): boolean;
95
+ dispose(): this;
96
+ hitTest(point: UIPoint): boolean;
97
+ handlePointer(type: string, point: UIPoint, event?: unknown): boolean;
98
+ protected pixelPosition(rect: Rect, project?: UIProject): UIPoint;
99
+ protected drawBox(ctx: CanvasRenderingContext2D, bounds: Rect): void;
100
+ draw(ctx: CanvasRenderingContext2D, rect: Rect, project?: UIProject): void;
101
+ }
102
+ export declare class ResultTable extends UIElement {
103
+ content: any[][];
104
+ setContent(value: any[][]): this;
105
+ getContent(): any[][];
106
+ clear(): this;
107
+ addRow(...cells: any[]): this;
108
+ prepareLayout(ctx: CanvasRenderingContext2D): ResultTableLayout;
109
+ draw(ctx: CanvasRenderingContext2D, rect: Rect, project?: UIProject, prepared?: ResultTableLayout): void;
110
+ }
111
+ /** Public XY cursor coordinates. Point and result table scales are independent. */
112
+ export interface CursorPositionXY {
113
+ pointMarker: UIPoint;
114
+ pointMarkerScale?: any;
115
+ resultTable?: UIPoint;
116
+ resultTableScale?: any;
117
+ pointMarkerFillStyle?: FillStyle;
118
+ pointMarkerStrokeStyle?: LineStyle;
119
+ pointMarkerShape?: number | string | Icon;
120
+ pointMarkerSize?: UIPoint;
121
+ }
122
+ export type CursorPosition2D = CursorPositionXY;
123
+ export type CursorPositionInput = UIPoint | CursorPositionXY;
124
+ /** Mutable cursor marker styling, matching the consumer's mutator contract. */
125
+ export declare class CursorPointMarker {
126
+ private readonly change;
127
+ private shape;
128
+ private size;
129
+ private fill;
130
+ private stroke;
131
+ constructor(change?: () => void);
132
+ setShape(shape: number | string | Icon): this;
133
+ getShape(): number | string | Icon;
134
+ setSize(size: number | UIPoint): this;
135
+ getSize(): UIPoint;
136
+ setFillStyle(style: ValueOrMutator<FillStyle>): this;
137
+ getFillStyle(): FillStyle;
138
+ setStrokeStyle(style: ValueOrMutator<LineStyle>): this;
139
+ getStrokeStyle(): LineStyle;
140
+ }
141
+ export declare class Cursor extends UIElement {
142
+ private readonly visibilityFollowsPosition;
143
+ gridX: LineStyle;
144
+ gridY: LineStyle;
145
+ tickX: boolean;
146
+ tickY: boolean;
147
+ pointMarker: boolean;
148
+ resultVisible: boolean;
149
+ positioned: boolean;
150
+ resultTable: ResultTable;
151
+ points: UIPoint[];
152
+ solveMode: any;
153
+ autoTextStyle: boolean;
154
+ private positions;
155
+ private markerStyle;
156
+ private autoFit;
157
+ private withinAxisBounds;
158
+ constructor(owner?: UIHost, visibilityFollowsPosition?: boolean);
159
+ getVisible(): boolean;
160
+ setPosition(...positions: CursorPositionInput[]): this;
161
+ /** CRY extension: immutable-by-copy position metadata; axis instances retain identity. */
162
+ getPositions(): CursorPositionXY[];
163
+ clearPosition(): this;
164
+ setGridStrokeXStyle(value: ValueOrMutator<LineStyle>): this;
165
+ getGridStrokeXStyle(): LineStyle;
166
+ setGridStrokeYStyle(value: ValueOrMutator<LineStyle>): this;
167
+ getGridStrokeYStyle(): LineStyle;
168
+ setTickMarkerXVisible(value: boolean): this;
169
+ getTickMarkerXVisible(): boolean;
170
+ setTickMarkerYVisible(value: boolean): this;
171
+ getTickMarkerYVisible(): boolean;
172
+ setPointMarkerVisible(value: boolean): this;
173
+ getPointMarkerVisible(): boolean;
174
+ setPointMarker(value: ValueOrMutator<CursorPointMarker>): this;
175
+ getPointMarker(): CursorPointMarker;
176
+ setResultTableVisible(value: boolean): this;
177
+ getResultTableVisible(): boolean;
178
+ setResultTable(value: ValueOrMutator<ResultTable>): this;
179
+ getResultTable(): ResultTable;
180
+ setSolveMode(value: any): this;
181
+ setResultTableAutoTextStyle(value: boolean): this;
182
+ setAutoFit(value: boolean): this;
183
+ getAutoFit(): boolean;
184
+ setKeepWithinAxisBoundaries(value: boolean): this;
185
+ getKeepWithinAxisBoundaries(): boolean;
186
+ dispose(): this;
187
+ private drawPointMarker;
188
+ /** @internal Shared measured table placement for native XY and Polar cursors. */
189
+ drawResultTable(ctx: CanvasRenderingContext2D, rect: Rect, anchor: UIPoint, prepared?: ResultTableLayout): void;
190
+ draw(ctx: CanvasRenderingContext2D, rect: Rect, project?: UIProject, formats?: {
191
+ x: (value: number, position: CursorPositionXY) => string;
192
+ y: (value: number, position: CursorPositionXY) => string;
193
+ }): void;
194
+ }
195
+ export declare class LegendBox extends UIElement {
196
+ private entries;
197
+ private entryRects;
198
+ title: string;
199
+ rowHeight: number;
200
+ constructor(owner?: UIHost, options?: any);
201
+ add(target: any): this;
202
+ remove(target: any): this;
203
+ getEntries(): any[];
204
+ setTitle(title: string): this;
205
+ draw(ctx: CanvasRenderingContext2D, rect: Rect, project?: UIProject): void;
206
+ handlePointer(type: string, point: UIPoint, event?: unknown): boolean;
207
+ }
@@ -0,0 +1,18 @@
1
+ import type { DrawPacket } from './contracts.js';
2
+ import type { DataSetXY } from './core/data.js';
3
+ /** Source-precision segment range for a linear X axis. Ordering must hold over
4
+ * the entire retained column. The result uses absolute sample indices and does
5
+ * not create snapshots of implicit time columns or discard retained history.
6
+ */
7
+ export declare function visibleSourceSegments(data: DataSetXY, column: string, interval: {
8
+ start: number;
9
+ end: number;
10
+ }, plotWidth: number, thickness: number): {
11
+ first: number;
12
+ end: number;
13
+ } | undefined;
14
+ /** Select all potentially visible samples without resampling or copying geometry. */
15
+ export declare function visibleSampleRange(packet: DrawPacket, plotWidth: number): {
16
+ first: number;
17
+ count: number;
18
+ };
@@ -0,0 +1,21 @@
1
+ import type { Interval } from './contracts.js';
2
+ export interface WorldAxisConversion {
3
+ readonly requested: Readonly<Interval>;
4
+ /** The conversion operates in linear/log10 coordinates; the public domain is unchanged. */
5
+ readonly transformed: Readonly<Interval>;
6
+ readonly logarithmic: boolean;
7
+ readonly worldSpan: number;
8
+ readonly geometryMargin: Readonly<{
9
+ start: number;
10
+ end: number;
11
+ }>;
12
+ }
13
+ /** Public style-size/world-coordinate calibration, independently measured using
14
+ * 0/1/2/4/8 thickness and a unit box. This is a geometry unit, not camera padding. */
15
+ export declare const WORLD_STYLE_UNIT3D: number;
16
+ export declare function createWorldAxisConversion(requested: Interval, logarithmic: boolean, worldSpan: number, geometryMargin: {
17
+ start: number;
18
+ end: number;
19
+ }): WorldAxisConversion;
20
+ export declare function worldAxisValueToFraction(value: number, conversion: WorldAxisConversion, inverted?: boolean): number;
21
+ export declare function worldAxisFractionToValue(fraction: number, conversion: WorldAxisConversion, inverted?: boolean): number;
@@ -0,0 +1,88 @@
1
+ import type { Rect } from './contracts.js';
2
+ export interface Vec3 {
3
+ x: number;
4
+ y: number;
5
+ z: number;
6
+ }
7
+ export type Projection3D = 'perspective' | 'orthographic';
8
+ export interface WorldCameraFrame {
9
+ readonly position: Vec3;
10
+ readonly forward: Vec3;
11
+ readonly right: Vec3;
12
+ readonly up: Vec3;
13
+ readonly viewport: Rect;
14
+ readonly clip: Rect;
15
+ readonly safe: Rect;
16
+ readonly box: Vec3;
17
+ readonly projection: Projection3D;
18
+ readonly scale: Vec3;
19
+ readonly radius: number;
20
+ readonly near: number;
21
+ readonly far: number;
22
+ readonly focal: number;
23
+ readonly matrix: Float32Array;
24
+ readonly rotation: Float32Array;
25
+ readonly fit: {
26
+ enabled: boolean;
27
+ iterations: number;
28
+ verified: boolean;
29
+ fallback: boolean;
30
+ };
31
+ }
32
+ export declare function unit3(a: Vec3): Vec3;
33
+ export declare const DEFAULT_WORLD_ORBIT: Readonly<Vec3>;
34
+ export declare function validateBox3D(box: Vec3): Vec3;
35
+ export declare function worldScale3D(box: Vec3): Vec3;
36
+ export declare function normalizedToWorld3D(point: Vec3, box: Vec3): Vec3;
37
+ export declare function worldToNormalized3D(point: Vec3, box: Vec3): Vec3;
38
+ export declare function clampManualCamera3D(value: Vec3): Vec3;
39
+ export declare function lookAtBasis3D(forward: Vec3): {
40
+ forward: Vec3;
41
+ right: Vec3;
42
+ up: Vec3;
43
+ };
44
+ /** Camera input scale independently measured from public single-step positions.
45
+ * It is not derived from a vendor shader or controller implementation. */
46
+ export declare const CAMERA_ORBIT_RADIANS_PER_CSS_PIXEL: number;
47
+ /** Rodrigues rotation around a normalized local camera basis vector. */
48
+ export declare function rotateVectorAroundAxis3D(value: Vec3, axis: Vec3, angle: number): Vec3;
49
+ /** Original local-basis orbit. Horizontal rotation changes global elevation.
50
+ * The vertical pole margin is a deliberate finite-projection boundary policy. */
51
+ export declare function orbitWorldCamera3D(position: Vec3, dx: number, dy: number, sensitivity?: number): Vec3;
52
+ /** An unanimated wheel event changes radius once; magnitude does not affect it. */
53
+ export declare function zoomWorldCameraStep3D(position: Vec3, deltaY: number, sensitivity?: number): Vec3;
54
+ export declare function boxCorners3D(box: Vec3): Vec3[];
55
+ export declare function symmetricFitRect3D(viewport: Rect, clip: Rect): Rect;
56
+ export declare function createWorldCameraFrame(options: {
57
+ position: Vec3;
58
+ forward?: Vec3;
59
+ projection: Projection3D;
60
+ autoFit: boolean;
61
+ box: Vec3;
62
+ viewport: Rect;
63
+ clip: Rect;
64
+ fitArea?: Rect;
65
+ }): WorldCameraFrame;
66
+ export declare function projectWorld3D(point: Vec3, frame: WorldCameraFrame): {
67
+ x: number;
68
+ y: number;
69
+ depth: number;
70
+ visible: boolean;
71
+ };
72
+ export declare function projectWorldNormalized3D(point: Vec3, frame: WorldCameraFrame): {
73
+ x: number;
74
+ y: number;
75
+ depth: number;
76
+ visible: boolean;
77
+ };
78
+ export declare function clipWorldSegment3D(a: Vec3, b: Vec3, frame: WorldCameraFrame): [{
79
+ x: number;
80
+ y: number;
81
+ depth: number;
82
+ visible: boolean;
83
+ }, {
84
+ x: number;
85
+ y: number;
86
+ depth: number;
87
+ visible: boolean;
88
+ }] | undefined;
@@ -0,0 +1,36 @@
1
+ import { type Vec3 } from './world-camera.js';
2
+ export declare const WORLD_ZOOM_NOMINAL_FRAME_MS: number;
3
+ /** This cutoff is an original compatibility policy. Public observations bound
4
+ * the transition between49.8 and50.1ms; they do not establish an exact private
5
+ * implementation threshold. */
6
+ export declare function normalizeWorldZoomDelta(elapsedMS: number | undefined): number;
7
+ export interface WorldZoomStep {
8
+ readonly position: Vec3;
9
+ readonly pendingBefore: number;
10
+ readonly pendingAfter: number;
11
+ readonly elapsedMS: number | undefined;
12
+ readonly appliedMS: number;
13
+ readonly changed: boolean;
14
+ }
15
+ /** Original input integrator. Its chosen unit is one signed wheel event at
16
+ * sensitivity1. No reference private variable or callback is read. */
17
+ export declare class WorldZoomInput {
18
+ private pending;
19
+ getPending(): number;
20
+ clear(): void;
21
+ enqueue(deltaY: number, sensitivity?: number): boolean;
22
+ advance(position: Vec3, elapsedMS: number | undefined, instantFactor?: number): WorldZoomStep;
23
+ }
24
+ /** Constant-space staging for already classified discrete input. Public
25
+ * observations require a product of input scales, applied to the latest pose
26
+ * on the scheduled frame; clipping happens after the inertia action. */
27
+ export declare class WorldZoomInstantInput {
28
+ private factor;
29
+ private active;
30
+ hasPending(): boolean;
31
+ getStoredScalarCount(): 0 | 1;
32
+ getPendingFactor(): number | undefined;
33
+ clear(): void;
34
+ enqueue(deltaY: number, sensitivity?: number): boolean;
35
+ takeFactor(): number | undefined;
36
+ }
@@ -0,0 +1,31 @@
1
+ # 安装和使用 CRYChart
2
+
3
+ 在应用目录安装固定版本:
4
+
5
+ ```powershell
6
+ pnpm add --save-exact @crysound/crychart@1.0.1 --registry=https://registry.npmjs.org/
7
+ ```
8
+
9
+ ES 模块和 TypeScript 使用相同入口:
10
+
11
+ ```ts
12
+ import { cryChart } from '@crysound/crychart'
13
+ import type { CRYChartOptions } from '@crysound/crychart'
14
+
15
+ const options: CRYChartOptions = {}
16
+ const context = cryChart(options)
17
+ const chart = context.ChartXY({ container: document.getElementById('chart')! })
18
+ const line = chart.addLineSeries({ schema: { x: { auto: true }, y: {} } })
19
+ line.appendSamples({ y: new Float32Array([1, 2, 3]) }, { start: 0, step: 1 })
20
+
21
+ // 在页面或组件卸载时调用。
22
+ context.dispose()
23
+ ```
24
+
25
+ 图表容器需要明确的宽度和高度。CommonJS 使用 `require('@crysound/crychart')`。ES 模块主题入口为 `@crysound/crychart/themes`;CommonJS 从主入口取得主题。浏览器普通脚本为 `dist/crychart.global.js`,全局对象仍为 `CRYChart`。
26
+
27
+ 从旧 `crychart` 包迁移时,将主入口和主题入口改为上述作用域包名。图表工厂、类型和浏览器全局名称保持不变。提交应用的 `package.json` 和 `pnpm-lock.yaml`,后续安装执行 `pnpm install --frozen-lockfile`。
28
+
29
+ 运行包不包含源码、示例工程或历史验收报告。完整说明见[源码仓库使用手册](https://github.com/crysound/CRYChart/blob/main/docs/使用手册.md)。
30
+
31
+ CRYChart 采用 [CRYChart Community License 1.0](../LICENSE.md),并提供[中文版](../LICENSE.zh-CN.md)。商业分发、OEM、设备配套交付及付费托管遵循协议第 7 条。
package/package.json CHANGED
@@ -1,6 +1,68 @@
1
- {
2
- "name": "@crysound/crychart",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
1
+ {
2
+ "name": "@crysound/crychart",
3
+ "version": "1.0.1",
4
+ "description": "CRYChart chart engine with streaming data, interactive axes and WebGL rendering",
5
+ "type": "module",
6
+ "main": "./dist/crychart.cjs",
7
+ "module": "./dist/crychart.js",
8
+ "types": "./dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/index.d.ts",
12
+ "import": "./dist/crychart.js",
13
+ "require": "./dist/crychart.cjs"
14
+ },
15
+ "./themes": {
16
+ "types": "./dist/types/themes.d.ts",
17
+ "import": "./dist/themes.js"
18
+ }
19
+ },
20
+ "files": [
21
+ "LICENSE.md",
22
+ "LICENSE.zh-CN.md",
23
+ "dist/crychart.js",
24
+ "dist/crychart.cjs",
25
+ "dist/crychart.global.js",
26
+ "dist/themes.js",
27
+ "dist/types",
28
+ "README.md",
29
+ "README.zh-CN.md",
30
+ "docs/npm-usage.md"
31
+ ],
32
+ "scripts": {
33
+ "prepack": "npm run build && node scripts/check-package.mjs",
34
+ "prepublishOnly": "npm run typecheck && npm test && npm run test:opentest-contract",
35
+ "build": "node scripts/build.mjs",
36
+ "typecheck": "tsc --noEmit",
37
+ "test": "node scripts/test.mjs",
38
+ "test:browser": "node scripts/browser-test.mjs",
39
+ "test:gallery": "node scripts/test-gallery.mjs",
40
+ "test:opentest-contract": "node scripts/test.mjs --opentest",
41
+ "benchmark": "node scripts/benchmark.mjs",
42
+ "dev": "node scripts/serve.mjs",
43
+ "verify": "npm run typecheck && npm test && npm run build && npm run test:browser && npm run test:gallery"
44
+ },
45
+ "devDependencies": {
46
+ "@types/node": "24.10.0",
47
+ "esbuild": "0.25.12",
48
+ "playwright": "1.58.2",
49
+ "prettier": "3.6.2",
50
+ "typescript": "5.9.3"
51
+ },
52
+ "engines": {
53
+ "node": ">=20"
54
+ },
55
+ "license": "SEE LICENSE IN LICENSE.md",
56
+ "publishConfig": {
57
+ "access": "public",
58
+ "registry": "https://registry.npmjs.org/"
59
+ },
60
+ "repository": {
61
+ "type": "git",
62
+ "url": "git+https://github.com/crysound/CRYChart.git"
63
+ },
64
+ "homepage": "https://github.com/crysound/CRYChart#readme",
65
+ "bugs": {
66
+ "url": "https://github.com/crysound/CRYChart/issues"
67
+ }
68
+ }