@starweb-libs/ui 0.0.1 → 0.0.2
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/LICENSE +21 -21
- package/README.md +17 -17
- package/dist/button.d.mts +12 -0
- package/dist/button.mjs +24 -0
- package/dist/button.mjs.map +1 -0
- package/dist/layout.d.mts +14 -0
- package/dist/layout.mjs +23 -0
- package/dist/layout.mjs.map +1 -0
- package/dist/slider.d.mts +13 -0
- package/dist/slider.mjs +31 -0
- package/dist/slider.mjs.map +1 -0
- package/dist/types.d.mts +37 -0
- package/dist/types.mjs +1 -0
- package/package.json +48 -41
- package/dist/button.d.ts +0 -8
- package/dist/button.d.ts.map +0 -1
- package/dist/button.js +0 -18
- package/dist/button.js.map +0 -1
- package/dist/layout.d.ts +0 -11
- package/dist/layout.d.ts.map +0 -1
- package/dist/layout.js +0 -19
- package/dist/layout.js.map +0 -1
- package/dist/slider.d.ts +0 -9
- package/dist/slider.d.ts.map +0 -1
- package/dist/slider.js +0 -26
- package/dist/slider.js.map +0 -1
- package/dist/types.d.ts +0 -34
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Starweb Libraries, Mason L'Etoile
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Starweb Libraries, Mason L'Etoile
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# Starweb UI
|
|
2
|
-
|
|
3
|
-
Canvas UI primitives for browser games
|
|
4
|
-
|
|
5
|
-
## Tech Stack
|
|
6
|
-
<p align="left">
|
|
7
|
-
<img height="35" src="https://img.shields.io/badge/TypeScript-%23007ACC?logo=typescript&logoColor=white&style=for-the-badge"/>
|
|
8
|
-
<img height="35" src="https://img.shields.io/badge/Canvas%20API-black?logo=html5&logoColor=white&style=for-the-badge"/>
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
```bash
|
|
13
|
-
npm install github:starweb-libs/ui
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## License
|
|
17
|
-
MIT License - see [LICENSE](./LICENSE) for details.
|
|
1
|
+
# Starweb UI
|
|
2
|
+
|
|
3
|
+
Canvas UI primitives for browser games
|
|
4
|
+
|
|
5
|
+
## Tech Stack
|
|
6
|
+
<p align="left">
|
|
7
|
+
<img height="35" src="https://img.shields.io/badge/TypeScript-%23007ACC?logo=typescript&logoColor=white&style=for-the-badge"/>
|
|
8
|
+
<img height="35" src="https://img.shields.io/badge/Canvas%20API-black?logo=html5&logoColor=white&style=for-the-badge"/>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
```bash
|
|
13
|
+
npm install github:starweb-libs/ui
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## License
|
|
17
|
+
MIT License - see [LICENSE](./LICENSE) for details.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Button, ButtonState } from "./types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/button.d.ts
|
|
4
|
+
declare function getButtonState(b: Button, pointer: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
clicked: boolean;
|
|
8
|
+
}): ButtonState;
|
|
9
|
+
declare function drawButton(ctx: CanvasRenderingContext2D, b: Button, ui: ButtonState): void;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { drawButton, getButtonState };
|
|
12
|
+
//# sourceMappingURL=button.d.mts.map
|
package/dist/button.mjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/button.ts
|
|
2
|
+
function getButtonState(b, pointer) {
|
|
3
|
+
const hovered = pointer.x >= b.x && pointer.x <= b.x + b.w && pointer.y >= b.y && pointer.y <= b.y + b.h;
|
|
4
|
+
return {
|
|
5
|
+
hovered,
|
|
6
|
+
clicked: hovered && pointer.clicked
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function drawButton(ctx, b, ui) {
|
|
10
|
+
ctx.fillStyle = ui.hovered ? "#444" : "#222";
|
|
11
|
+
ctx.fillRect(b.x, b.y, b.w, b.h);
|
|
12
|
+
ctx.strokeStyle = "#fff";
|
|
13
|
+
ctx.lineWidth = 2;
|
|
14
|
+
ctx.strokeRect(b.x, b.y, b.w, b.h);
|
|
15
|
+
ctx.fillStyle = "#fff";
|
|
16
|
+
ctx.font = `${b.h * .4}px sans-serif`;
|
|
17
|
+
ctx.textAlign = "center";
|
|
18
|
+
ctx.textBaseline = "middle";
|
|
19
|
+
ctx.fillText(b.label, b.x + b.w / 2, b.y + b.h / 2);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { drawButton, getButtonState };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.mjs","names":[],"sources":["../src/button.ts"],"sourcesContent":["import type { Button, ButtonState } from \"./types.ts\";\n\nexport function getButtonState(\n b: Button,\n pointer: { x: number; y: number; clicked: boolean }\n): ButtonState {\n const hovered = pointer.x >= b.x && pointer.x <= b.x + b.w\n && pointer.y >= b.y && pointer.y <= b.y + b.h;\n return { hovered, clicked: hovered && pointer.clicked };\n}\n\nexport function drawButton(ctx: CanvasRenderingContext2D, b: Button, ui: ButtonState): void {\n ctx.fillStyle = ui.hovered ? \"#444\" : \"#222\";\n ctx.fillRect(b.x, b.y, b.w, b.h);\n ctx.strokeStyle = \"#fff\";\n ctx.lineWidth = 2;\n ctx.strokeRect(b.x, b.y, b.w, b.h);\n ctx.fillStyle = \"#fff\";\n ctx.font = `${b.h * 0.4}px sans-serif`;\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(b.label, b.x + b.w / 2, b.y + b.h / 2);\n}\n"],"mappings":";AAEA,SAAgB,eACd,GACA,SACa;CACb,MAAM,UAAU,QAAQ,KAAK,EAAE,KAAK,QAAQ,KAAK,EAAE,IAAI,EAAE,KACzC,QAAQ,KAAK,EAAE,KAAK,QAAQ,KAAK,EAAE,IAAI,EAAE;CACzD,OAAO;EAAE;EAAS,SAAS,WAAW,QAAQ;CAAQ;AACxD;AAEA,SAAgB,WAAW,KAA+B,GAAW,IAAuB;CAC1F,IAAI,YAAY,GAAG,UAAU,SAAS;CACtC,IAAI,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;CAC/B,IAAI,cAAc;CAClB,IAAI,YAAY;CAChB,IAAI,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;CACjC,IAAI,YAAY;CAChB,IAAI,OAAO,GAAG,EAAE,IAAI,GAAI;CACxB,IAAI,YAAY;CAChB,IAAI,eAAe;CACnB,IAAI,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;AACpD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/layout.d.ts
|
|
2
|
+
interface Layout {
|
|
3
|
+
scale: number;
|
|
4
|
+
gap: number;
|
|
5
|
+
cx: number;
|
|
6
|
+
cy: number;
|
|
7
|
+
btnW: number;
|
|
8
|
+
btnH: number;
|
|
9
|
+
}
|
|
10
|
+
declare function getLayout(w: number, h: number): Layout;
|
|
11
|
+
declare function drawTitle(ctx: CanvasRenderingContext2D, text: string, x: number, y: number, scale: number, scaleFactor?: number): void;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Layout, drawTitle, getLayout };
|
|
14
|
+
//# sourceMappingURL=layout.d.mts.map
|
package/dist/layout.mjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/layout.ts
|
|
2
|
+
function getLayout(w, h) {
|
|
3
|
+
const scale = Math.min(w, h);
|
|
4
|
+
return {
|
|
5
|
+
scale,
|
|
6
|
+
gap: scale * .03,
|
|
7
|
+
cx: w / 2,
|
|
8
|
+
cy: h / 2,
|
|
9
|
+
btnW: scale * .4,
|
|
10
|
+
btnH: scale * .1
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function drawTitle(ctx, text, x, y, scale, scaleFactor = .1) {
|
|
14
|
+
ctx.fillStyle = "#fff";
|
|
15
|
+
ctx.font = `bold ${Math.floor(scale * scaleFactor)}px sans-serif`;
|
|
16
|
+
ctx.textAlign = "center";
|
|
17
|
+
ctx.textBaseline = "middle";
|
|
18
|
+
ctx.fillText(text, x, y);
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { drawTitle, getLayout };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=layout.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.mjs","names":[],"sources":["../src/layout.ts"],"sourcesContent":["export interface Layout {\n scale: number;\n gap: number;\n cx: number;\n cy: number;\n btnW: number;\n btnH: number;\n}\n\nexport function getLayout(w: number, h: number): Layout {\n const scale = Math.min(w, h);\n return {\n scale,\n gap: scale * 0.03,\n cx: w / 2,\n cy: h / 2,\n btnW: scale * 0.4,\n btnH: scale * 0.1,\n };\n}\n\nexport function drawTitle(\n ctx: CanvasRenderingContext2D,\n text: string,\n x: number, y: number,\n scale: number, scaleFactor = 0.1\n): void {\n ctx.fillStyle = \"#fff\";\n ctx.font = `bold ${Math.floor(scale * scaleFactor)}px sans-serif`;\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(text, x, y);\n}\n"],"mappings":";AASA,SAAgB,UAAU,GAAW,GAAmB;CACtD,MAAM,QAAQ,KAAK,IAAI,GAAG,CAAC;CAC3B,OAAO;EACL;EACA,KAAK,QAAQ;EACb,IAAI,IAAI;EACR,IAAI,IAAI;EACR,MAAM,QAAQ;EACd,MAAM,QAAQ;CAChB;AACF;AAEA,SAAgB,UACd,KACA,MACA,GAAW,GACX,OAAe,cAAc,IACvB;CACN,IAAI,YAAY;CAChB,IAAI,OAAO,QAAQ,KAAK,MAAM,QAAQ,WAAW,EAAE;CACnD,IAAI,YAAY;CAChB,IAAI,eAAe;CACnB,IAAI,SAAS,MAAM,GAAG,CAAC;AACzB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Slider, SliderState } from "./types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/slider.d.ts
|
|
4
|
+
declare function updateSlider(s: Slider, state: SliderState, pointer: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
down: boolean;
|
|
8
|
+
clicked: boolean;
|
|
9
|
+
}): SliderState;
|
|
10
|
+
declare function drawSlider(ctx: CanvasRenderingContext2D, s: Slider, value: number): void;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { drawSlider, updateSlider };
|
|
13
|
+
//# sourceMappingURL=slider.d.mts.map
|
package/dist/slider.mjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/slider.ts
|
|
2
|
+
function updateSlider(s, state, pointer) {
|
|
3
|
+
if (!pointer.down) return {
|
|
4
|
+
...state,
|
|
5
|
+
dragging: false
|
|
6
|
+
};
|
|
7
|
+
const dragging = state.dragging || pointer.clicked && pointer.x >= s.x && pointer.x <= s.x + s.w && pointer.y >= s.y && pointer.y <= s.y + s.h;
|
|
8
|
+
if (!dragging) return state;
|
|
9
|
+
return {
|
|
10
|
+
dragging,
|
|
11
|
+
value: Math.max(0, Math.min(1, (pointer.x - s.x) / s.w))
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function drawSlider(ctx, s, value) {
|
|
15
|
+
ctx.fillStyle = "#222";
|
|
16
|
+
ctx.fillRect(s.x, s.y, s.w, s.h);
|
|
17
|
+
ctx.fillStyle = "#666";
|
|
18
|
+
ctx.fillRect(s.x, s.y, s.w * value, s.h);
|
|
19
|
+
ctx.strokeStyle = "#fff";
|
|
20
|
+
ctx.lineWidth = 2;
|
|
21
|
+
ctx.strokeRect(s.x, s.y, s.w, s.h);
|
|
22
|
+
ctx.fillStyle = "#fff";
|
|
23
|
+
ctx.font = `${s.h * .4}px sans-serif`;
|
|
24
|
+
ctx.textAlign = "center";
|
|
25
|
+
ctx.textBaseline = "middle";
|
|
26
|
+
ctx.fillText(`${s.label}: ${Math.round(value * 100)}%`, s.x + s.w / 2, s.y + s.h / 2);
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { drawSlider, updateSlider };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=slider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.mjs","names":[],"sources":["../src/slider.ts"],"sourcesContent":["import type { Slider, SliderState } from \"./types.ts\";\n\nexport function updateSlider(\n s: Slider,\n state: SliderState,\n pointer: { x: number; y: number; down: boolean; clicked: boolean }\n): SliderState {\n if (!pointer.down) return { ...state, dragging: false };\n\n const dragging = state.dragging || (pointer.clicked\n && pointer.x >= s.x && pointer.x <= s.x + s.w\n && pointer.y >= s.y && pointer.y <= s.y + s.h\n );\n if (!dragging) return state;\n\n const value = Math.max(0, Math.min(1, (pointer.x - s.x) / s.w));\n return { dragging, value };\n}\n\nexport function drawSlider(ctx: CanvasRenderingContext2D, s: Slider, value: number): void {\n ctx.fillStyle = \"#222\";\n ctx.fillRect(s.x, s.y, s.w, s.h);\n\n ctx.fillStyle = \"#666\";\n ctx.fillRect(s.x, s.y, s.w * value, s.h);\n\n ctx.strokeStyle = \"#fff\";\n ctx.lineWidth = 2;\n ctx.strokeRect(s.x, s.y, s.w, s.h);\n\n ctx.fillStyle = \"#fff\";\n ctx.font = `${s.h * 0.4}px sans-serif`;\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(`${s.label}: ${Math.round(value * 100)}%`, s.x + s.w / 2, s.y + s.h / 2);\n}\n"],"mappings":";AAEA,SAAgB,aACd,GACA,OACA,SACa;CACb,IAAI,CAAC,QAAQ,MAAM,OAAO;EAAE,GAAG;EAAO,UAAU;CAAM;CAEtD,MAAM,WAAW,MAAM,YAAa,QAAQ,WACL,QAAQ,KAAK,EAAE,KAAK,QAAQ,KAAK,EAAE,IAAI,EAAE,KACzC,QAAQ,KAAK,EAAE,KAAK,QAAQ,KAAK,EAAE,IAAI,EAAE;CAEhF,IAAI,CAAC,UAAU,OAAO;CAGtB,OAAO;EAAE;EAAU,OADL,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI,QAAQ,IAAI,EAAE,KAAK,EAAE,CAAC,CACtC;CAAE;AAC3B;AAEA,SAAgB,WAAW,KAA+B,GAAW,OAAqB;CACxF,IAAI,YAAY;CAChB,IAAI,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;CAE/B,IAAI,YAAY;CAChB,IAAI,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,OAAO,EAAE,CAAC;CAEvC,IAAI,cAAc;CAClB,IAAI,YAAY;CAChB,IAAI,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;CAEjC,IAAI,YAAY;CAChB,IAAI,OAAO,GAAG,EAAE,IAAI,GAAI;CACxB,IAAI,YAAY;CAChB,IAAI,eAAe;CACnB,IAAI,SAAS,GAAG,EAAE,MAAM,IAAI,KAAK,MAAM,QAAQ,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;AACtF"}
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/types.d.ts
|
|
2
|
+
interface UIRect {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
w: number;
|
|
6
|
+
h: number;
|
|
7
|
+
}
|
|
8
|
+
interface Button extends UIRect {
|
|
9
|
+
label: string;
|
|
10
|
+
}
|
|
11
|
+
interface Slider extends UIRect {
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
interface ButtonState {
|
|
15
|
+
hovered: boolean;
|
|
16
|
+
clicked: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface SliderState {
|
|
19
|
+
dragging: boolean;
|
|
20
|
+
value: number;
|
|
21
|
+
}
|
|
22
|
+
interface ButtonEntry {
|
|
23
|
+
btn: Button;
|
|
24
|
+
state: ButtonState;
|
|
25
|
+
}
|
|
26
|
+
interface SliderEntry {
|
|
27
|
+
slider: Slider;
|
|
28
|
+
state: SliderState;
|
|
29
|
+
}
|
|
30
|
+
interface MenuLayout {
|
|
31
|
+
cx: number;
|
|
32
|
+
scale: number;
|
|
33
|
+
titleY: number;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Button, ButtonEntry, ButtonState, MenuLayout, Slider, SliderEntry, SliderState, UIRect };
|
|
37
|
+
//# sourceMappingURL=types.d.mts.map
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,41 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@starweb-libs/ui",
|
|
3
|
-
"description": "Canvas UI primitives for browser games",
|
|
4
|
-
"author": "Mason L'Etoile",
|
|
5
|
-
"version": "0.0.
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/starweb-libs/ui.git"
|
|
10
|
-
},
|
|
11
|
-
"homepage": "https://github.com/starweb-libs/ui#readme",
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/starweb-libs/ui/issues"
|
|
14
|
-
},
|
|
15
|
-
"keywords": ["ui", "canvas", "imgui", "2d", "typescript", "browser", "starweb"],
|
|
16
|
-
"type": "module",
|
|
17
|
-
"devDependencies": {
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"import": "./dist/
|
|
31
|
-
},
|
|
32
|
-
"./
|
|
33
|
-
"types": "./dist/
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@starweb-libs/ui",
|
|
3
|
+
"description": "Canvas UI primitives for browser games",
|
|
4
|
+
"author": "Mason L'Etoile",
|
|
5
|
+
"version": "0.0.2",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/starweb-libs/ui.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/starweb-libs/ui#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/starweb-libs/ui/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": ["ui", "canvas", "imgui", "2d", "typescript", "browser", "starweb"],
|
|
16
|
+
"type": "module",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"typescript": "~6.0.2",
|
|
19
|
+
"tsdown": "^0.22.0"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsdown",
|
|
23
|
+
"prepare": "npm run build"
|
|
24
|
+
},
|
|
25
|
+
"files": ["dist"],
|
|
26
|
+
"exports": {
|
|
27
|
+
"./button.js": {
|
|
28
|
+
"types": "./dist/button.d.mts",
|
|
29
|
+
"@starweb-libs/source": "./src/button.ts",
|
|
30
|
+
"import": "./dist/button.mjs"
|
|
31
|
+
},
|
|
32
|
+
"./layout.js": {
|
|
33
|
+
"types": "./dist/layout.d.mts",
|
|
34
|
+
"@starweb-libs/source": "./src/layout.ts",
|
|
35
|
+
"import": "./dist/layout.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./slider.js": {
|
|
38
|
+
"types": "./dist/slider.d.mts",
|
|
39
|
+
"@starweb-libs/source": "./src/slider.ts",
|
|
40
|
+
"import": "./dist/slider.mjs"
|
|
41
|
+
},
|
|
42
|
+
"./types.js": {
|
|
43
|
+
"types": "./dist/types.d.mts",
|
|
44
|
+
"@starweb-libs/source": "./src/types.ts",
|
|
45
|
+
"import": "./dist/types.mjs"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
package/dist/button.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Button, ButtonState } from "./types.ts";
|
|
2
|
-
export declare function getButtonState(b: Button, pointer: {
|
|
3
|
-
x: number;
|
|
4
|
-
y: number;
|
|
5
|
-
clicked: boolean;
|
|
6
|
-
}): ButtonState;
|
|
7
|
-
export declare function drawButton(ctx: CanvasRenderingContext2D, b: Button, ui: ButtonState): void;
|
|
8
|
-
//# sourceMappingURL=button.d.ts.map
|
package/dist/button.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../src/button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtD,wBAAgB,cAAc,CAC5B,CAAC,EAAE,MAAM,EACT,OAAO,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAClD,WAAW,CAIb;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,wBAAwB,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,GAAG,IAAI,CAW1F"}
|
package/dist/button.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export function getButtonState(b, pointer) {
|
|
2
|
-
const hovered = pointer.x >= b.x && pointer.x <= b.x + b.w
|
|
3
|
-
&& pointer.y >= b.y && pointer.y <= b.y + b.h;
|
|
4
|
-
return { hovered, clicked: hovered && pointer.clicked };
|
|
5
|
-
}
|
|
6
|
-
export function drawButton(ctx, b, ui) {
|
|
7
|
-
ctx.fillStyle = ui.hovered ? "#444" : "#222";
|
|
8
|
-
ctx.fillRect(b.x, b.y, b.w, b.h);
|
|
9
|
-
ctx.strokeStyle = "#fff";
|
|
10
|
-
ctx.lineWidth = 2;
|
|
11
|
-
ctx.strokeRect(b.x, b.y, b.w, b.h);
|
|
12
|
-
ctx.fillStyle = "#fff";
|
|
13
|
-
ctx.font = `${b.h * 0.4}px sans-serif`;
|
|
14
|
-
ctx.textAlign = "center";
|
|
15
|
-
ctx.textBaseline = "middle";
|
|
16
|
-
ctx.fillText(b.label, b.x + b.w / 2, b.y + b.h / 2);
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=button.js.map
|
package/dist/button.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../src/button.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,cAAc,CAC5B,CAAS,EACT,OAAmD;IAEnD,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;WAC1C,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAA6B,EAAE,CAAS,EAAE,EAAe;IAClF,GAAG,CAAC,SAAS,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAC7C,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,GAAG,CAAC,WAAW,GAAG,MAAM,CAAC;IACzB,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;IAClB,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC;IACvB,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,eAAe,CAAC;IACvC,GAAG,CAAC,SAAS,GAAG,QAAQ,CAAC;IACzB,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC;IAC5B,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACtD,CAAC"}
|
package/dist/layout.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface Layout {
|
|
2
|
-
scale: number;
|
|
3
|
-
gap: number;
|
|
4
|
-
cx: number;
|
|
5
|
-
cy: number;
|
|
6
|
-
btnW: number;
|
|
7
|
-
btnH: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function getLayout(w: number, h: number): Layout;
|
|
10
|
-
export declare function drawTitle(ctx: CanvasRenderingContext2D, text: string, x: number, y: number, scale: number, scaleFactor?: number): void;
|
|
11
|
-
//# sourceMappingURL=layout.d.ts.map
|
package/dist/layout.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAUtD;AAED,wBAAgB,SAAS,CACvB,GAAG,EAAE,wBAAwB,EAC7B,IAAI,EAAE,MAAM,EACZ,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,EAAE,WAAW,SAAM,GAC/B,IAAI,CAMN"}
|
package/dist/layout.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export function getLayout(w, h) {
|
|
2
|
-
const scale = Math.min(w, h);
|
|
3
|
-
return {
|
|
4
|
-
scale,
|
|
5
|
-
gap: scale * 0.03,
|
|
6
|
-
cx: w / 2,
|
|
7
|
-
cy: h / 2,
|
|
8
|
-
btnW: scale * 0.4,
|
|
9
|
-
btnH: scale * 0.1,
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export function drawTitle(ctx, text, x, y, scale, scaleFactor = 0.1) {
|
|
13
|
-
ctx.fillStyle = "#fff";
|
|
14
|
-
ctx.font = `bold ${Math.floor(scale * scaleFactor)}px sans-serif`;
|
|
15
|
-
ctx.textAlign = "center";
|
|
16
|
-
ctx.textBaseline = "middle";
|
|
17
|
-
ctx.fillText(text, x, y);
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=layout.js.map
|
package/dist/layout.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,SAAS,CAAC,CAAS,EAAE,CAAS;IAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,OAAO;QACL,KAAK;QACL,GAAG,EAAE,KAAK,GAAG,IAAI;QACjB,EAAE,EAAE,CAAC,GAAG,CAAC;QACT,EAAE,EAAE,CAAC,GAAG,CAAC;QACT,IAAI,EAAE,KAAK,GAAG,GAAG;QACjB,IAAI,EAAE,KAAK,GAAG,GAAG;KAClB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS,CACvB,GAA6B,EAC7B,IAAY,EACZ,CAAS,EAAE,CAAS,EACpB,KAAa,EAAE,WAAW,GAAG,GAAG;IAEhC,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC;IACvB,GAAG,CAAC,IAAI,GAAG,QAAQ,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC,eAAe,CAAC;IAClE,GAAG,CAAC,SAAS,GAAG,QAAQ,CAAC;IACzB,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC;IAC5B,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3B,CAAC"}
|
package/dist/slider.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Slider, SliderState } from "./types.ts";
|
|
2
|
-
export declare function updateSlider(s: Slider, state: SliderState, pointer: {
|
|
3
|
-
x: number;
|
|
4
|
-
y: number;
|
|
5
|
-
down: boolean;
|
|
6
|
-
clicked: boolean;
|
|
7
|
-
}): SliderState;
|
|
8
|
-
export declare function drawSlider(ctx: CanvasRenderingContext2D, s: Slider, value: number): void;
|
|
9
|
-
//# sourceMappingURL=slider.d.ts.map
|
package/dist/slider.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../src/slider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtD,wBAAgB,YAAY,CAC1B,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACjE,WAAW,CAWb;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,wBAAwB,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAgBxF"}
|
package/dist/slider.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export function updateSlider(s, state, pointer) {
|
|
2
|
-
if (!pointer.down)
|
|
3
|
-
return { ...state, dragging: false };
|
|
4
|
-
const dragging = state.dragging || (pointer.clicked
|
|
5
|
-
&& pointer.x >= s.x && pointer.x <= s.x + s.w
|
|
6
|
-
&& pointer.y >= s.y && pointer.y <= s.y + s.h);
|
|
7
|
-
if (!dragging)
|
|
8
|
-
return state;
|
|
9
|
-
const value = Math.max(0, Math.min(1, (pointer.x - s.x) / s.w));
|
|
10
|
-
return { dragging, value };
|
|
11
|
-
}
|
|
12
|
-
export function drawSlider(ctx, s, value) {
|
|
13
|
-
ctx.fillStyle = "#222";
|
|
14
|
-
ctx.fillRect(s.x, s.y, s.w, s.h);
|
|
15
|
-
ctx.fillStyle = "#666";
|
|
16
|
-
ctx.fillRect(s.x, s.y, s.w * value, s.h);
|
|
17
|
-
ctx.strokeStyle = "#fff";
|
|
18
|
-
ctx.lineWidth = 2;
|
|
19
|
-
ctx.strokeRect(s.x, s.y, s.w, s.h);
|
|
20
|
-
ctx.fillStyle = "#fff";
|
|
21
|
-
ctx.font = `${s.h * 0.4}px sans-serif`;
|
|
22
|
-
ctx.textAlign = "center";
|
|
23
|
-
ctx.textBaseline = "middle";
|
|
24
|
-
ctx.fillText(`${s.label}: ${Math.round(value * 100)}%`, s.x + s.w / 2, s.y + s.h / 2);
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=slider.js.map
|
package/dist/slider.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slider.js","sourceRoot":"","sources":["../src/slider.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,YAAY,CAC1B,CAAS,EACT,KAAkB,EAClB,OAAkE;IAElE,IAAI,CAAC,OAAO,CAAC,IAAI;QAAE,OAAO,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAExD,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,OAAO;WACZ,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;WAC1C,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAC7C,CAAC;IACrC,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5B,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAA6B,EAAE,CAAS,EAAE,KAAa;IAChF,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC;IACvB,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAEjC,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC;IACvB,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzC,GAAG,CAAC,WAAW,GAAG,MAAM,CAAC;IACzB,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;IAClB,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnC,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC;IACvB,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,eAAe,CAAC;IACvC,GAAG,CAAC,SAAS,GAAG,QAAQ,CAAC;IACzB,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC;IAC5B,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACxF,CAAC"}
|
package/dist/types.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export interface UIRect {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
w: number;
|
|
5
|
-
h: number;
|
|
6
|
-
}
|
|
7
|
-
export interface Button extends UIRect {
|
|
8
|
-
label: string;
|
|
9
|
-
}
|
|
10
|
-
export interface Slider extends UIRect {
|
|
11
|
-
label: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ButtonState {
|
|
14
|
-
hovered: boolean;
|
|
15
|
-
clicked: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface SliderState {
|
|
18
|
-
dragging: boolean;
|
|
19
|
-
value: number;
|
|
20
|
-
}
|
|
21
|
-
export interface ButtonEntry {
|
|
22
|
-
btn: Button;
|
|
23
|
-
state: ButtonState;
|
|
24
|
-
}
|
|
25
|
-
export interface SliderEntry {
|
|
26
|
-
slider: Slider;
|
|
27
|
-
state: SliderState;
|
|
28
|
-
}
|
|
29
|
-
export interface MenuLayout {
|
|
30
|
-
cx: number;
|
|
31
|
-
scale: number;
|
|
32
|
-
titleY: number;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,MAAO,SAAQ,MAAM;IACpC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,MAAO,SAAQ,MAAM;IACpC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAK,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAI,MAAM,CAAC;IACd,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAG,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAM,MAAM,CAAC;IACf,KAAK,EAAG,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
package/dist/types.js
DELETED
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|