@mapcreator/api 5.0.0-alpha.24 → 5.0.0-alpha.25
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/cjs/api/dimension.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ApiCommonData, ApiError, ApiSuccess, Flatten, Revivers } from '../utils.js';
|
|
2
|
-
export type
|
|
2
|
+
export type OutputUnit = 'millimeter' | 'centimeter' | 'inch' | 'pixel' | 'pica';
|
|
3
3
|
export type Dimension = {
|
|
4
4
|
id: number;
|
|
5
5
|
dimensionSetId: number;
|
|
@@ -7,7 +7,7 @@ export type Dimension = {
|
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
9
|
dpi: number;
|
|
10
|
-
unit:
|
|
10
|
+
unit: OutputUnit;
|
|
11
11
|
};
|
|
12
12
|
export type ApiDimension = {
|
|
13
13
|
data: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimension.d.ts","sourceRoot":"","sources":["../../src/api/dimension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE1F,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"dimension.d.ts","sourceRoot":"","sources":["../../src/api/dimension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE1F,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,YAAY,GACZ,MAAM,GACN,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,gBAAgB,EAAE,MAAM,CAAC;QACzB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,aAAa,CAAC;CACnB,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC;AAExC,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAUhF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,YAAY,EAAE,SAAS,CAE/D,CAAC"}
|
package/cjs/api/dimension.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimension.js","sourceRoot":"","sources":["../../src/api/dimension.ts"],"names":[],"mappings":";;;AAiCA,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"dimension.js","sourceRoot":"","sources":["../../src/api/dimension.ts"],"names":[],"mappings":";;;AAiCA,MAAM,SAAS,GAAkC;IAC/C,EAAE,EAAE,YAAY;IAChB,EAAE,EAAE,YAAY;IAChB,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,MAAM;CACb,CAAC;AAEW,QAAA,iBAAiB,GAAsC;IAClE,IAAI,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;CACvD,CAAC"}
|
package/esm/api/dimension.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ApiCommonData, ApiError, ApiSuccess, Flatten, Revivers } from '../utils.js';
|
|
2
|
-
export type
|
|
2
|
+
export type OutputUnit = 'millimeter' | 'centimeter' | 'inch' | 'pixel' | 'pica';
|
|
3
3
|
export type Dimension = {
|
|
4
4
|
id: number;
|
|
5
5
|
dimensionSetId: number;
|
|
@@ -7,7 +7,7 @@ export type Dimension = {
|
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
9
|
dpi: number;
|
|
10
|
-
unit:
|
|
10
|
+
unit: OutputUnit;
|
|
11
11
|
};
|
|
12
12
|
export type ApiDimension = {
|
|
13
13
|
data: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimension.d.ts","sourceRoot":"","sources":["../../src/api/dimension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE1F,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"dimension.d.ts","sourceRoot":"","sources":["../../src/api/dimension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE1F,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,YAAY,GACZ,MAAM,GACN,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,gBAAgB,EAAE,MAAM,CAAC;QACzB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,aAAa,CAAC;CACnB,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC;AAExC,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAUhF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,YAAY,EAAE,SAAS,CAE/D,CAAC"}
|
package/esm/api/dimension.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimension.js","sourceRoot":"","sources":["../../src/api/dimension.ts"],"names":[],"mappings":"AAiCA,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"dimension.js","sourceRoot":"","sources":["../../src/api/dimension.ts"],"names":[],"mappings":"AAiCA,MAAM,SAAS,GAAkC;IAC/C,EAAE,EAAE,YAAY;IAChB,EAAE,EAAE,YAAY;IAChB,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAsC;IAClE,IAAI,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;CACvD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapcreator/api",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.25",
|
|
4
4
|
"description": "Mapcreator JavaScript API",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"main": "./cjs/index.js",
|
|
@@ -77,4 +77,4 @@
|
|
|
77
77
|
"eslint": "~8.57",
|
|
78
78
|
"typescript": "~5.6.3"
|
|
79
79
|
}
|
|
80
|
-
}
|
|
80
|
+
}
|
package/src/api/dimension.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiCommonData, ApiError, ApiSuccess, Flatten, Revivers } from '../utils.js';
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type OutputUnit =
|
|
4
4
|
| 'millimeter'
|
|
5
5
|
| 'centimeter'
|
|
6
6
|
| 'inch'
|
|
@@ -14,7 +14,7 @@ export type Dimension = {
|
|
|
14
14
|
width: number;
|
|
15
15
|
height: number;
|
|
16
16
|
dpi: number;
|
|
17
|
-
unit:
|
|
17
|
+
unit: OutputUnit;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export type ApiDimension = {
|
|
@@ -31,7 +31,7 @@ export type ApiDimension = {
|
|
|
31
31
|
|
|
32
32
|
export type ApiDimensionData = Flatten<Exclude<ApiDimension, ApiError>['data']>;
|
|
33
33
|
|
|
34
|
-
const keyToUnit: { [key: string]:
|
|
34
|
+
const keyToUnit: { [key: string]: OutputUnit } = {
|
|
35
35
|
MM: 'millimeter',
|
|
36
36
|
CM: 'centimeter',
|
|
37
37
|
IN: 'inch',
|