gum-jsx 1.1.0 → 1.1.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.
- package/index.d.ts +18 -9
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Type definitions for gum.js
|
|
2
2
|
// Visualization library using JSX-like syntax for SVG generation
|
|
3
3
|
|
|
4
|
-
declare module 'gum' {
|
|
4
|
+
declare module 'gum-jsx' {
|
|
5
5
|
// =============================================================================
|
|
6
6
|
// Core Types
|
|
7
7
|
// =============================================================================
|
|
@@ -69,8 +69,6 @@ declare module 'gum' {
|
|
|
69
69
|
fill?: string;
|
|
70
70
|
opacity?: number;
|
|
71
71
|
transform?: string;
|
|
72
|
-
clip_path?: string;
|
|
73
|
-
mask?: string;
|
|
74
72
|
[key: string]: any;
|
|
75
73
|
}
|
|
76
74
|
|
|
@@ -258,7 +256,7 @@ declare module 'gum' {
|
|
|
258
256
|
}
|
|
259
257
|
|
|
260
258
|
export class Points extends Group {
|
|
261
|
-
constructor(args?:
|
|
259
|
+
constructor(args?: PointsArgs);
|
|
262
260
|
}
|
|
263
261
|
|
|
264
262
|
export interface AnchorArgs extends GroupArgs {
|
|
@@ -336,11 +334,11 @@ declare module 'gum' {
|
|
|
336
334
|
export class Rect extends Element {
|
|
337
335
|
rounded: number | point | undefined;
|
|
338
336
|
|
|
339
|
-
constructor(args?:
|
|
337
|
+
constructor(args?: RectArgs);
|
|
340
338
|
}
|
|
341
339
|
|
|
342
340
|
export class Square extends Rect {
|
|
343
|
-
constructor(args?:
|
|
341
|
+
constructor(args?: RectArgs);
|
|
344
342
|
}
|
|
345
343
|
|
|
346
344
|
export class Ellipse extends Element {
|
|
@@ -824,7 +822,7 @@ declare module 'gum' {
|
|
|
824
822
|
constructor(args?: BoxLabelArgs);
|
|
825
823
|
}
|
|
826
824
|
|
|
827
|
-
export interface MeshArgs
|
|
825
|
+
export interface MeshArgs {
|
|
828
826
|
locs?: number | number[];
|
|
829
827
|
lim?: limit;
|
|
830
828
|
}
|
|
@@ -1202,6 +1200,14 @@ declare module 'gum' {
|
|
|
1202
1200
|
// =============================================================================
|
|
1203
1201
|
|
|
1204
1202
|
declare module 'gum/eval' {
|
|
1203
|
+
/** The name of a theme */
|
|
1204
|
+
export type themeName = 'light' | 'dark';
|
|
1205
|
+
|
|
1206
|
+
/** The arguments for the evaluate function */
|
|
1207
|
+
export type Svg = Element & {
|
|
1208
|
+
svg(): string;
|
|
1209
|
+
};
|
|
1210
|
+
|
|
1205
1211
|
export interface EvaluateOptions {
|
|
1206
1212
|
theme?: themeName | null;
|
|
1207
1213
|
debug?: boolean;
|
|
@@ -1216,7 +1222,10 @@ declare module 'gum/eval' {
|
|
|
1216
1222
|
// Rendering (from render.js)
|
|
1217
1223
|
// =============================================================================
|
|
1218
1224
|
|
|
1219
|
-
declare module 'gum/render' {
|
|
1225
|
+
declare module 'gum-jsx/render' {
|
|
1226
|
+
/** A point in 2D space [x, y] */
|
|
1227
|
+
export type point = [number, number];
|
|
1228
|
+
|
|
1220
1229
|
export interface RenderOptions {
|
|
1221
1230
|
size?: number | point;
|
|
1222
1231
|
background?: string;
|
|
@@ -1249,7 +1258,7 @@ declare module 'gum/render' {
|
|
|
1249
1258
|
// Error Types (from error.js)
|
|
1250
1259
|
// =============================================================================
|
|
1251
1260
|
|
|
1252
|
-
declare module 'gum/error' {
|
|
1261
|
+
declare module 'gum-jsx/error' {
|
|
1253
1262
|
/** Error when no code is provided */
|
|
1254
1263
|
export class ErrorNoCode extends Error {
|
|
1255
1264
|
constructor();
|