katanakit-js 2.2.1 → 2.12.9
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/README.md +72 -437
- package/dist/adapters/astro/astro.service.d.ts +103 -15
- package/dist/adapters/astro/astro.service.d.ts.map +1 -1
- package/dist/adapters/astro/astro.service.js +145 -75
- package/dist/adapters/astro/astro.service.js.map +1 -1
- package/dist/adapters/astro/index.d.ts +1 -1
- package/dist/adapters/astro/index.d.ts.map +1 -1
- package/dist/adapters/astro/index.js +1 -1
- package/dist/adapters/astro/index.js.map +1 -1
- package/dist/adapters/astro/rss.service.d.ts +85 -105
- package/dist/adapters/astro/rss.service.d.ts.map +1 -1
- package/dist/adapters/astro/rss.service.js +172 -168
- package/dist/adapters/astro/rss.service.js.map +1 -1
- package/dist/adapters/astro/seo.service.d.ts +10 -0
- package/dist/adapters/astro/seo.service.d.ts.map +1 -0
- package/dist/adapters/astro/seo.service.js +3 -0
- package/dist/adapters/astro/seo.service.js.map +1 -0
- package/dist/adapters/express/app.d.ts +30 -1
- package/dist/adapters/express/app.d.ts.map +1 -1
- package/dist/adapters/express/app.js +31 -3
- package/dist/adapters/express/app.js.map +1 -1
- package/dist/adapters/express/index.d.ts +2 -2
- package/dist/adapters/express/index.d.ts.map +1 -1
- package/dist/adapters/express/index.js +2 -2
- package/dist/adapters/express/index.js.map +1 -1
- package/dist/adapters/express/main.js +2 -2
- package/dist/adapters/express/main.js.map +1 -1
- package/dist/adapters/express/products.controller.d.ts +67 -8
- package/dist/adapters/express/products.controller.d.ts.map +1 -1
- package/dist/adapters/express/products.controller.js +105 -49
- package/dist/adapters/express/products.controller.js.map +1 -1
- package/dist/adapters/express/server.d.ts +37 -13
- package/dist/adapters/express/server.d.ts.map +1 -1
- package/dist/adapters/express/server.js +118 -53
- package/dist/adapters/express/server.js.map +1 -1
- package/dist/adapters/nuxt/nuxt.service.d.ts +8 -6
- package/dist/adapters/nuxt/nuxt.service.d.ts.map +1 -1
- package/dist/adapters/nuxt/nuxt.service.js +34 -10
- package/dist/adapters/nuxt/nuxt.service.js.map +1 -1
- package/dist/adapters/vue/vue.service.d.ts +5 -2
- package/dist/adapters/vue/vue.service.d.ts.map +1 -1
- package/dist/adapters/vue/vue.service.js +41 -7
- package/dist/adapters/vue/vue.service.js.map +1 -1
- package/dist/config/index.d.ts +2 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/seo-meta.types.d.ts +177 -0
- package/dist/config/seo-meta.types.d.ts.map +1 -0
- package/dist/config/seo-meta.types.js +11 -0
- package/dist/config/seo-meta.types.js.map +1 -0
- package/dist/config/seo.service.d.ts +41 -58
- package/dist/config/seo.service.d.ts.map +1 -1
- package/dist/config/seo.service.js +468 -136
- package/dist/config/seo.service.js.map +1 -1
- package/dist/config/site.config.d.ts +10 -50
- package/dist/config/site.config.d.ts.map +1 -1
- package/dist/config/site.config.js +8 -36
- package/dist/config/site.config.js.map +1 -1
- package/dist/core/index.d.ts +1 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/services/dates.service.d.ts +149 -22
- package/dist/core/services/dates.service.d.ts.map +1 -1
- package/dist/core/services/dates.service.js +201 -54
- package/dist/core/services/dates.service.js.map +1 -1
- package/dist/core/services/error.service.d.ts +32 -20
- package/dist/core/services/error.service.d.ts.map +1 -1
- package/dist/core/services/error.service.js +44 -32
- package/dist/core/services/error.service.js.map +1 -1
- package/dist/core/services/formatter.service.d.ts +245 -35
- package/dist/core/services/formatter.service.d.ts.map +1 -1
- package/dist/core/services/formatter.service.js +281 -57
- package/dist/core/services/formatter.service.js.map +1 -1
- package/dist/core/services/generator.service.d.ts +115 -26
- package/dist/core/services/generator.service.d.ts.map +1 -1
- package/dist/core/services/generator.service.js +191 -56
- package/dist/core/services/generator.service.js.map +1 -1
- package/dist/core/services/geometry.service.d.ts +369 -39
- package/dist/core/services/geometry.service.d.ts.map +1 -1
- package/dist/core/services/geometry.service.js +424 -66
- package/dist/core/services/geometry.service.js.map +1 -1
- package/dist/core/services/http.service.d.ts +244 -21
- package/dist/core/services/http.service.d.ts.map +1 -1
- package/dist/core/services/http.service.js +419 -98
- package/dist/core/services/http.service.js.map +1 -1
- package/dist/core/services/logger.service.d.ts +95 -29
- package/dist/core/services/logger.service.d.ts.map +1 -1
- package/dist/core/services/logger.service.js +167 -41
- package/dist/core/services/logger.service.js.map +1 -1
- package/dist/core/services/reactive.service.d.ts +146 -19
- package/dist/core/services/reactive.service.d.ts.map +1 -1
- package/dist/core/services/reactive.service.js +278 -137
- package/dist/core/services/reactive.service.js.map +1 -1
- package/dist/core/services/timing.service.d.ts +142 -20
- package/dist/core/services/timing.service.d.ts.map +1 -1
- package/dist/core/services/timing.service.js +324 -185
- package/dist/core/services/timing.service.js.map +1 -1
- package/dist/core/services/utils.service.d.ts +228 -43
- package/dist/core/services/utils.service.d.ts.map +1 -1
- package/dist/core/services/utils.service.js +305 -125
- package/dist/core/services/utils.service.js.map +1 -1
- package/dist/infrastructure/dom/dom.service.d.ts +307 -44
- package/dist/infrastructure/dom/dom.service.d.ts.map +1 -1
- package/dist/infrastructure/dom/dom.service.js +408 -129
- package/dist/infrastructure/dom/dom.service.js.map +1 -1
- package/dist/infrastructure/index.d.ts +0 -3
- package/dist/infrastructure/index.d.ts.map +1 -1
- package/dist/infrastructure/index.js +0 -3
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/infrastructure/observer/observer.service.d.ts +124 -31
- package/dist/infrastructure/observer/observer.service.d.ts.map +1 -1
- package/dist/infrastructure/observer/observer.service.js +227 -131
- package/dist/infrastructure/observer/observer.service.js.map +1 -1
- package/dist/infrastructure/sensors/sensors.service.d.ts +154 -22
- package/dist/infrastructure/sensors/sensors.service.d.ts.map +1 -1
- package/dist/infrastructure/sensors/sensors.service.js +264 -112
- package/dist/infrastructure/sensors/sensors.service.js.map +1 -1
- package/dist/infrastructure/storage/storage.service.d.ts +123 -45
- package/dist/infrastructure/storage/storage.service.d.ts.map +1 -1
- package/dist/infrastructure/storage/storage.service.js +236 -66
- package/dist/infrastructure/storage/storage.service.js.map +1 -1
- package/dist/infrastructure/theme/theme.service.d.ts +93 -29
- package/dist/infrastructure/theme/theme.service.d.ts.map +1 -1
- package/dist/infrastructure/theme/theme.service.js +198 -96
- package/dist/infrastructure/theme/theme.service.js.map +1 -1
- package/dist/infrastructure/viewport/viewport.service.d.ts +233 -35
- package/dist/infrastructure/viewport/viewport.service.d.ts.map +1 -1
- package/dist/infrastructure/viewport/viewport.service.js +358 -139
- package/dist/infrastructure/viewport/viewport.service.js.map +1 -1
- package/dist/infrastructure/worker/worker.service.d.ts +84 -38
- package/dist/infrastructure/worker/worker.service.d.ts.map +1 -1
- package/dist/infrastructure/worker/worker.service.js +234 -133
- package/dist/infrastructure/worker/worker.service.js.map +1 -1
- package/dist/prisma/index.d.ts +2 -0
- package/dist/prisma/index.d.ts.map +1 -0
- package/dist/prisma/index.js +2 -0
- package/dist/prisma/index.js.map +1 -0
- package/dist/prisma/schema.json +11 -33
- package/dist/prisma/use-prisma.d.ts +68 -0
- package/dist/prisma/use-prisma.d.ts.map +1 -0
- package/dist/prisma/use-prisma.js +82 -0
- package/dist/prisma/use-prisma.js.map +1 -0
- package/dist/types/index.d.ts +20 -12
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +124 -125
- package/CHANGELOG.md +0 -101
|
@@ -1,45 +1,375 @@
|
|
|
1
1
|
import type { GeometryFormatOptions } from "../../types/index.js";
|
|
2
|
-
/** Area calculations for geometric shapes. */
|
|
3
|
-
export declare class GeometryArea {
|
|
4
|
-
private constructor();
|
|
5
|
-
static useRectangle(width: number, height: number, options?: GeometryFormatOptions): string;
|
|
6
|
-
static useSquare(side: number, options?: GeometryFormatOptions): string;
|
|
7
|
-
static useTriangle(base: number, height: number, options?: GeometryFormatOptions): string;
|
|
8
|
-
static useCircle(radius: number, options?: GeometryFormatOptions): string;
|
|
9
|
-
static useTrapezoid(parallelSide1: number, parallelSide2: number, height: number, options?: GeometryFormatOptions): string;
|
|
10
|
-
static useHexagon(side: number, options?: GeometryFormatOptions): string;
|
|
11
|
-
static useEllipse(semiMajor: number, semiMinor: number, options?: GeometryFormatOptions): string;
|
|
12
|
-
static useParallelogram(base: number, height: number, options?: GeometryFormatOptions): string;
|
|
13
|
-
}
|
|
14
|
-
/** Perimeter calculations for geometric shapes. */
|
|
15
|
-
export declare class GeometryPerimeter {
|
|
16
|
-
private constructor();
|
|
17
|
-
static useRectangle(width: number, height: number, options?: GeometryFormatOptions): string;
|
|
18
|
-
static useSquare(side: number, options?: GeometryFormatOptions): string;
|
|
19
|
-
static useTriangle(side1: number, side2: number, side3: number, options?: GeometryFormatOptions): string;
|
|
20
|
-
static useCircle(radius: number, options?: GeometryFormatOptions): string;
|
|
21
|
-
static useHexagon(side: number, options?: GeometryFormatOptions): string;
|
|
22
|
-
static useTrapezoid(side1: number, side2: number, side3: number, side4: number, options?: GeometryFormatOptions): string;
|
|
23
|
-
static useEllipse(semiMajor: number, semiMinor: number, options?: GeometryFormatOptions): string;
|
|
24
|
-
static useParallelogram(side1: number, side2: number, options?: GeometryFormatOptions): string;
|
|
25
|
-
}
|
|
26
|
-
/** Volume calculations for 3D geometric shapes. */
|
|
27
|
-
export declare class GeometryVolume {
|
|
28
|
-
private constructor();
|
|
29
|
-
static useCube(side: number, options?: GeometryFormatOptions): string;
|
|
30
|
-
static useBox(length: number, width: number, height: number, options?: GeometryFormatOptions): string;
|
|
31
|
-
static useSphere(radius: number, options?: GeometryFormatOptions): string;
|
|
32
|
-
static useCylinder(radius: number, height: number, options?: GeometryFormatOptions): string;
|
|
33
|
-
static useCone(radius: number, height: number, options?: GeometryFormatOptions): string;
|
|
34
|
-
static usePyramid(baseArea: number, height: number, options?: GeometryFormatOptions): string;
|
|
35
|
-
}
|
|
36
2
|
/**
|
|
37
|
-
* Consolidated geometry utilities namespace.
|
|
38
|
-
* Groups area, perimeter and volume calculations.
|
|
3
|
+
* Consolidated pure geometry utilities namespace.
|
|
4
|
+
* Groups area, perimeter and volume calculations (no shared mutable state).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
9
|
+
*
|
|
10
|
+
* GeometryUtils.area.useCircle(5); // "78.54"
|
|
11
|
+
* GeometryUtils.perimeter.useCircle(5); // "31.42"
|
|
12
|
+
* GeometryUtils.volume.useSphere(3); // "113.10"
|
|
13
|
+
* ```
|
|
39
14
|
*/
|
|
40
15
|
export declare const GeometryUtils: {
|
|
41
|
-
area:
|
|
42
|
-
|
|
43
|
-
|
|
16
|
+
area: {
|
|
17
|
+
/**
|
|
18
|
+
* Calculates the area of a rectangle.
|
|
19
|
+
*
|
|
20
|
+
* @param width - The width of the rectangle.
|
|
21
|
+
* @param height - The height of the rectangle.
|
|
22
|
+
* @param options - Optional formatting options.
|
|
23
|
+
* @returns The formatted area string.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
28
|
+
*
|
|
29
|
+
* GeometryUtils.area.useRectangle(5, 10); // "50.00"
|
|
30
|
+
* GeometryUtils.area.useRectangle(5, 10, { unit: "m²" }); // "50.00 m²"
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
useRectangle(width: number, height: number, options?: GeometryFormatOptions): string;
|
|
34
|
+
/**
|
|
35
|
+
* Calculates the area of a square.
|
|
36
|
+
*
|
|
37
|
+
* @param side - The side length of the square.
|
|
38
|
+
* @param options - Optional formatting options.
|
|
39
|
+
* @returns The formatted area string.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
44
|
+
*
|
|
45
|
+
* GeometryUtils.area.useSquare(4); // "16.00"
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
useSquare(side: number, options?: GeometryFormatOptions): string;
|
|
49
|
+
/**
|
|
50
|
+
* Calculates the area of a triangle.
|
|
51
|
+
*
|
|
52
|
+
* @param base - The base length of the triangle.
|
|
53
|
+
* @param height - The height of the triangle.
|
|
54
|
+
* @param options - Optional formatting options.
|
|
55
|
+
* @returns The formatted area string.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
60
|
+
*
|
|
61
|
+
* GeometryUtils.area.useTriangle(6, 4); // "12.00"
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
useTriangle(base: number, height: number, options?: GeometryFormatOptions): string;
|
|
65
|
+
/**
|
|
66
|
+
* Calculates the area of a circle.
|
|
67
|
+
*
|
|
68
|
+
* @param radius - The radius of the circle.
|
|
69
|
+
* @param options - Optional formatting options.
|
|
70
|
+
* @returns The formatted area string.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
75
|
+
*
|
|
76
|
+
* GeometryUtils.area.useCircle(5); // "78.54"
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
useCircle(radius: number, options?: GeometryFormatOptions): string;
|
|
80
|
+
/**
|
|
81
|
+
* Calculates the area of a trapezoid.
|
|
82
|
+
*
|
|
83
|
+
* @param parallelSide1 - The length of the first parallel side.
|
|
84
|
+
* @param parallelSide2 - The length of the second parallel side.
|
|
85
|
+
* @param height - The height between parallel sides.
|
|
86
|
+
* @param options - Optional formatting options.
|
|
87
|
+
* @returns The formatted area string.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
92
|
+
*
|
|
93
|
+
* GeometryUtils.area.useTrapezoid(3, 5, 4); // "16.00"
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
useTrapezoid(parallelSide1: number, parallelSide2: number, height: number, options?: GeometryFormatOptions): string;
|
|
97
|
+
/**
|
|
98
|
+
* Calculates the area of a regular hexagon.
|
|
99
|
+
*
|
|
100
|
+
* @param side - The side length of the hexagon.
|
|
101
|
+
* @param options - Optional formatting options.
|
|
102
|
+
* @returns The formatted area string.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```ts
|
|
106
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
107
|
+
*
|
|
108
|
+
* GeometryUtils.area.useHexagon(3); // "23.38"
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
useHexagon(side: number, options?: GeometryFormatOptions): string;
|
|
112
|
+
/**
|
|
113
|
+
* Calculates the area of an ellipse.
|
|
114
|
+
*
|
|
115
|
+
* @param semiMajor - The semi-major axis length.
|
|
116
|
+
* @param semiMinor - The semi-minor axis length.
|
|
117
|
+
* @param options - Optional formatting options.
|
|
118
|
+
* @returns The formatted area string.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
123
|
+
*
|
|
124
|
+
* GeometryUtils.area.useEllipse(5, 3); // "47.12"
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
useEllipse(semiMajor: number, semiMinor: number, options?: GeometryFormatOptions): string;
|
|
128
|
+
/**
|
|
129
|
+
* Calculates the area of a parallelogram.
|
|
130
|
+
*
|
|
131
|
+
* @param base - The base length of the parallelogram.
|
|
132
|
+
* @param height - The height of the parallelogram.
|
|
133
|
+
* @param options - Optional formatting options.
|
|
134
|
+
* @returns The formatted area string.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
139
|
+
*
|
|
140
|
+
* GeometryUtils.area.useParallelogram(6, 4); // "24.00"
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
useParallelogram(base: number, height: number, options?: GeometryFormatOptions): string;
|
|
144
|
+
};
|
|
145
|
+
perimeter: {
|
|
146
|
+
/**
|
|
147
|
+
* Calculates the perimeter of a rectangle.
|
|
148
|
+
*
|
|
149
|
+
* @param width - The width of the rectangle.
|
|
150
|
+
* @param height - The height of the rectangle.
|
|
151
|
+
* @param options - Optional formatting options.
|
|
152
|
+
* @returns The formatted perimeter string.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```ts
|
|
156
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
157
|
+
*
|
|
158
|
+
* GeometryUtils.perimeter.useRectangle(5, 10); // "30.00"
|
|
159
|
+
* GeometryUtils.perimeter.useRectangle(5, 10, { unit: "m" }); // "30.00 m"
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
useRectangle(width: number, height: number, options?: GeometryFormatOptions): string;
|
|
163
|
+
/**
|
|
164
|
+
* Calculates the perimeter of a square.
|
|
165
|
+
*
|
|
166
|
+
* @param side - The side length of the square.
|
|
167
|
+
* @param options - Optional formatting options.
|
|
168
|
+
* @returns The formatted perimeter string.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```ts
|
|
172
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
173
|
+
*
|
|
174
|
+
* GeometryUtils.perimeter.useSquare(4); // "16.00"
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
useSquare(side: number, options?: GeometryFormatOptions): string;
|
|
178
|
+
/**
|
|
179
|
+
* Calculates the perimeter of a triangle.
|
|
180
|
+
*
|
|
181
|
+
* @param side1 - The length of the first side.
|
|
182
|
+
* @param side2 - The length of the second side.
|
|
183
|
+
* @param side3 - The length of the third side.
|
|
184
|
+
* @param options - Optional formatting options.
|
|
185
|
+
* @returns The formatted perimeter string.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* ```ts
|
|
189
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
190
|
+
*
|
|
191
|
+
* GeometryUtils.perimeter.useTriangle(3, 4, 5); // "12.00"
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
useTriangle(side1: number, side2: number, side3: number, options?: GeometryFormatOptions): string;
|
|
195
|
+
/**
|
|
196
|
+
* Calculates the perimeter (circumference) of a circle.
|
|
197
|
+
*
|
|
198
|
+
* @param radius - The radius of the circle.
|
|
199
|
+
* @param options - Optional formatting options.
|
|
200
|
+
* @returns The formatted perimeter string.
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```ts
|
|
204
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
205
|
+
*
|
|
206
|
+
* GeometryUtils.perimeter.useCircle(5); // "31.42"
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
useCircle(radius: number, options?: GeometryFormatOptions): string;
|
|
210
|
+
/**
|
|
211
|
+
* Calculates the perimeter of a regular hexagon.
|
|
212
|
+
*
|
|
213
|
+
* @param side - The side length of the hexagon.
|
|
214
|
+
* @param options - Optional formatting options.
|
|
215
|
+
* @returns The formatted perimeter string.
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* ```ts
|
|
219
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
220
|
+
*
|
|
221
|
+
* GeometryUtils.perimeter.useHexagon(3); // "18.00"
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
useHexagon(side: number, options?: GeometryFormatOptions): string;
|
|
225
|
+
/**
|
|
226
|
+
* Calculates the perimeter of a trapezoid.
|
|
227
|
+
*
|
|
228
|
+
* @param side1 - The length of the first side.
|
|
229
|
+
* @param side2 - The length of the second side.
|
|
230
|
+
* @param side3 - The length of the third side.
|
|
231
|
+
* @param side4 - The length of the fourth side.
|
|
232
|
+
* @param options - Optional formatting options.
|
|
233
|
+
* @returns The formatted perimeter string.
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* ```ts
|
|
237
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
238
|
+
*
|
|
239
|
+
* GeometryUtils.perimeter.useTrapezoid(3, 5, 4, 4); // "16.00"
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
useTrapezoid(side1: number, side2: number, side3: number, side4: number, options?: GeometryFormatOptions): string;
|
|
243
|
+
/**
|
|
244
|
+
* Calculates the perimeter of an ellipse using Ramanujan's approximation II.
|
|
245
|
+
*
|
|
246
|
+
* @param semiMajor - The semi-major axis length.
|
|
247
|
+
* @param semiMinor - The semi-minor axis length.
|
|
248
|
+
* @param options - Optional formatting options.
|
|
249
|
+
* @returns The formatted perimeter string.
|
|
250
|
+
*
|
|
251
|
+
* @example
|
|
252
|
+
* ```ts
|
|
253
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
254
|
+
*
|
|
255
|
+
* GeometryUtils.perimeter.useEllipse(5, 3); // "25.53"
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
useEllipse(semiMajor: number, semiMinor: number, options?: GeometryFormatOptions): string;
|
|
259
|
+
/**
|
|
260
|
+
* Calculates the perimeter of a parallelogram.
|
|
261
|
+
*
|
|
262
|
+
* @param side1 - The length of the first side.
|
|
263
|
+
* @param side2 - The length of the second side.
|
|
264
|
+
* @param options - Optional formatting options.
|
|
265
|
+
* @returns The formatted perimeter string.
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* ```ts
|
|
269
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
270
|
+
*
|
|
271
|
+
* GeometryUtils.perimeter.useParallelogram(5, 3); // "16.00"
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
useParallelogram(side1: number, side2: number, options?: GeometryFormatOptions): string;
|
|
275
|
+
};
|
|
276
|
+
volume: {
|
|
277
|
+
/**
|
|
278
|
+
* Calculates the volume of a cube.
|
|
279
|
+
*
|
|
280
|
+
* @param side - The side length of the cube.
|
|
281
|
+
* @param options - Optional formatting options.
|
|
282
|
+
* @returns The formatted volume string.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```ts
|
|
286
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
287
|
+
*
|
|
288
|
+
* GeometryUtils.volume.useCube(3); // "27.00"
|
|
289
|
+
* GeometryUtils.volume.useCube(3, { unit: "m³" }); // "27.00 m³"
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
useCube(side: number, options?: GeometryFormatOptions): string;
|
|
293
|
+
/**
|
|
294
|
+
* Calculates the volume of a box (rectangular prism).
|
|
295
|
+
*
|
|
296
|
+
* @param length - The length of the box.
|
|
297
|
+
* @param width - The width of the box.
|
|
298
|
+
* @param height - The height of the box.
|
|
299
|
+
* @param options - Optional formatting options.
|
|
300
|
+
* @returns The formatted volume string.
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* ```ts
|
|
304
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
305
|
+
*
|
|
306
|
+
* GeometryUtils.volume.useBox(2, 3, 4); // "24.00"
|
|
307
|
+
* ```
|
|
308
|
+
*/
|
|
309
|
+
useBox(length: number, width: number, height: number, options?: GeometryFormatOptions): string;
|
|
310
|
+
/**
|
|
311
|
+
* Calculates the volume of a sphere.
|
|
312
|
+
*
|
|
313
|
+
* @param radius - The radius of the sphere.
|
|
314
|
+
* @param options - Optional formatting options.
|
|
315
|
+
* @returns The formatted volume string.
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* ```ts
|
|
319
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
320
|
+
*
|
|
321
|
+
* GeometryUtils.volume.useSphere(3); // "113.10"
|
|
322
|
+
* ```
|
|
323
|
+
*/
|
|
324
|
+
useSphere(radius: number, options?: GeometryFormatOptions): string;
|
|
325
|
+
/**
|
|
326
|
+
* Calculates the volume of a cylinder.
|
|
327
|
+
*
|
|
328
|
+
* @param radius - The radius of the cylinder base.
|
|
329
|
+
* @param height - The height of the cylinder.
|
|
330
|
+
* @param options - Optional formatting options.
|
|
331
|
+
* @returns The formatted volume string.
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* ```ts
|
|
335
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
336
|
+
*
|
|
337
|
+
* GeometryUtils.volume.useCylinder(3, 5); // "141.37"
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
useCylinder(radius: number, height: number, options?: GeometryFormatOptions): string;
|
|
341
|
+
/**
|
|
342
|
+
* Calculates the volume of a cone.
|
|
343
|
+
*
|
|
344
|
+
* @param radius - The radius of the cone base.
|
|
345
|
+
* @param height - The height of the cone.
|
|
346
|
+
* @param options - Optional formatting options.
|
|
347
|
+
* @returns The formatted volume string.
|
|
348
|
+
*
|
|
349
|
+
* @example
|
|
350
|
+
* ```ts
|
|
351
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
352
|
+
*
|
|
353
|
+
* GeometryUtils.volume.useCone(3, 5); // "47.12"
|
|
354
|
+
* ```
|
|
355
|
+
*/
|
|
356
|
+
useCone(radius: number, height: number, options?: GeometryFormatOptions): string;
|
|
357
|
+
/**
|
|
358
|
+
* Calculates the volume of a pyramid.
|
|
359
|
+
*
|
|
360
|
+
* @param baseArea - The area of the pyramid base.
|
|
361
|
+
* @param height - The height of the pyramid.
|
|
362
|
+
* @param options - Optional formatting options.
|
|
363
|
+
* @returns The formatted volume string.
|
|
364
|
+
*
|
|
365
|
+
* @example
|
|
366
|
+
* ```ts
|
|
367
|
+
* import { GeometryUtils } from "katanakit-js";
|
|
368
|
+
*
|
|
369
|
+
* GeometryUtils.volume.usePyramid(12, 5); // "20.00"
|
|
370
|
+
* ```
|
|
371
|
+
*/
|
|
372
|
+
usePyramid(baseArea: number, height: number, options?: GeometryFormatOptions): string;
|
|
373
|
+
};
|
|
44
374
|
};
|
|
45
375
|
//# sourceMappingURL=geometry.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.service.d.ts","sourceRoot":"","sources":["../../../src/core/services/geometry.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"geometry.service.d.ts","sourceRoot":"","sources":["../../../src/core/services/geometry.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AA4dlE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa;;QAhdzB;;;;;;;;;;;;;;;WAeG;4BACiB,MAAM,UAAU,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIpF;;;;;;;;;;;;;WAaG;wBACa,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIhE;;;;;;;;;;;;;;WAcG;0BACe,MAAM,UAAU,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIlF;;;;;;;;;;;;;WAaG;0BACe,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIlE;;;;;;;;;;;;;;;WAeG;oCAEa,MAAM,iBACN,MAAM,UACb,MAAM,YACJ,qBAAqB,GAC7B,MAAM;QAIT;;;;;;;;;;;;;WAaG;yBACc,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIjE;;;;;;;;;;;;;;WAcG;8BACmB,MAAM,aAAa,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIzF;;;;;;;;;;;;;;WAcG;+BACoB,MAAM,UAAU,MAAM,YAAY,qBAAqB,GAAG,MAAM;;;QAUvF;;;;;;;;;;;;;;;WAeG;4BACiB,MAAM,UAAU,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIpF;;;;;;;;;;;;;WAaG;wBACa,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIhE;;;;;;;;;;;;;;;WAeG;2BACgB,MAAM,SAAS,MAAM,SAAS,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIjG;;;;;;;;;;;;;WAaG;0BACe,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIlE;;;;;;;;;;;;;WAaG;yBACc,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIjE;;;;;;;;;;;;;;;;WAgBG;4BAEK,MAAM,SACN,MAAM,SACN,MAAM,SACN,MAAM,YACH,qBAAqB,GAC7B,MAAM;QAIT;;;;;;;;;;;;;;WAcG;8BACmB,MAAM,aAAa,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAazF;;;;;;;;;;;;;;WAcG;gCACqB,MAAM,SAAS,MAAM,YAAY,qBAAqB,GAAG,MAAM;;;QAUvF;;;;;;;;;;;;;;WAcG;sBACW,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAI9D;;;;;;;;;;;;;;;WAeG;uBACY,MAAM,SAAS,MAAM,UAAU,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAI9F;;;;;;;;;;;;;WAaG;0BACe,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIlE;;;;;;;;;;;;;;WAcG;4BACiB,MAAM,UAAU,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIpF;;;;;;;;;;;;;;WAcG;wBACa,MAAM,UAAU,MAAM,YAAY,qBAAqB,GAAG,MAAM;QAIhF;;;;;;;;;;;;;;WAcG;6BACkB,MAAM,UAAU,MAAM,YAAY,qBAAqB,GAAG,MAAM;;CAsBrF,CAAC"}
|