ranuts 0.1.0-alpha.14 → 0.1.0-alpha.16

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { MiddlewareFunction } from '@/node/server';
2
3
  interface ServerBody {
3
4
  uploadDir: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  export declare const runCommand: (command: string, args: string[]) => Promise<void>;
2
3
  interface PromptOption {
3
4
  message: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { IncomingMessage, ServerResponse } from 'node:http';
2
3
  import type { MiddlewareFunction } from '@/node/server';
3
4
  type ConnectMiddleware = (req: IncomingMessage, res: ServerResponse, next?: Function) => void;
@@ -1,3 +1,5 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
1
3
  import fs from 'node:fs';
2
4
  import type { Noop } from '@/utils/noop';
3
5
  export type FilePromiseResult = Promise<Ranuts.Identification> & {
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { IncomingMessage } from 'node:http';
2
3
  interface ParseUrl {
3
4
  search?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { FilePromiseResult } from '@/node/fs';
2
3
  /**
3
4
  * @description: 读取一个文件,读取成功返回状态码和文件内容
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { IncomingMessage, ServerResponse } from 'node:http';
2
3
  import http from 'node:http';
3
4
  export type Next = () => Promise<never> | Promise<void>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { ReadStream, WriteStream } from 'node:fs';
2
3
  interface ReadOption {
3
4
  path: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { Stats } from 'node:fs';
2
3
  type Caller = (relPath: string, absPath: string, stats: Stats) => any;
3
4
  /**
@@ -1,3 +1,7 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
4
+ /// <reference types="node" />
1
5
  import http from 'node:http';
2
6
  import type internal from 'node:stream';
3
7
  import EventEmitter from 'node:events';
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type http from 'node:http';
2
3
  /**
3
4
  * Create a WebSocket Server
@@ -2,11 +2,13 @@ import { Container } from '@/utils/visual/vertex/container';
2
2
  import { Polygon } from '@/utils/visual/shape/polygon';
3
3
  import type { Shape } from '@/utils/visual/shape/shape';
4
4
  import type { CanvasRenderer } from '@/utils/visual/render/canvasRenderer';
5
+ import type { Point } from '@/utils/visual/vertex/point';
5
6
  export declare class Graphics extends Container {
6
7
  private _lineStyle;
7
8
  private _fillStyle;
8
9
  private _geometry;
9
10
  currentPath: Polygon | null;
11
+ type: string;
10
12
  constructor();
11
13
  protected drawShape(shape: Shape): Graphics;
12
14
  /**
@@ -16,4 +18,5 @@ export declare class Graphics extends Container {
16
18
  beginFill(color?: string, alpha?: number): Graphics;
17
19
  drawRect(x: number, y: number, width: number, height: number): Graphics;
18
20
  protected renderCanvas(render: CanvasRenderer): void;
21
+ containsPoint(p: Point): boolean;
19
22
  }
@@ -2,9 +2,15 @@ import type { Shape } from '@/utils/visual/shape/shape';
2
2
  import type { Fill } from '@/utils/visual/style/fill';
3
3
  import type { Line } from '@/utils/visual/style/line';
4
4
  import { GraphicsData } from '@/utils/visual/graphics/graphicsData';
5
+ import type { Point } from '@/utils/visual/vertex/point';
5
6
  export declare class GraphicsGeometry {
6
7
  graphicsData: GraphicsData[];
7
8
  constructor();
8
9
  drawShape(shape: Shape, fillStyle: Fill, lineStyle: Line): void;
9
10
  clear(): void;
11
+ /**
12
+ * @param p 待检测点
13
+ * @returns {boolean} 待检测点是否落在某一个子图形内
14
+ */
15
+ containsPoint(p: Point): boolean;
10
16
  }