@bluepic/embed 0.2.7 → 0.2.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/lib/bluepic-embed.es.js +3799 -3691
- package/lib/bluepic-embed.umd.js +47 -47
- package/lib/components/User/UserInfo.vue.d.ts +17 -3
- package/lib/components/User/UserInfo.vue.d.ts.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/style.css +1 -1
- package/lib/util/din.d.ts +48 -0
- package/lib/util/din.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DIN A sizes per ISO 216 have √2 aspect ratio, with A0 area = 1 m².
|
|
3
|
+
* A0: 841 × 1189 mm (exact by ISO rounding), each A(n+1) halves the long side (rounded to mm).
|
|
4
|
+
*/
|
|
5
|
+
export type DinLevel = `A${0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10}`;
|
|
6
|
+
export declare const DIN_LEVELS: DinLevel[];
|
|
7
|
+
/**
|
|
8
|
+
* Compute pixel size for a DIN level at given DPI.
|
|
9
|
+
* Returns both integer px and the precise float before rounding.
|
|
10
|
+
*/
|
|
11
|
+
export declare function dinPixels(level: DinLevel, dpi: number): {
|
|
12
|
+
widthPx: number;
|
|
13
|
+
heightPx: number;
|
|
14
|
+
widthPxExact: number;
|
|
15
|
+
heightPxExact: number;
|
|
16
|
+
aspect: number;
|
|
17
|
+
sizeMm: {
|
|
18
|
+
w: number;
|
|
19
|
+
h: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Identify if an arbitrary pixel size at a given DPI matches a DIN A format (A0..A10),
|
|
24
|
+
* irrespective of orientation, within a millimeter tolerance.
|
|
25
|
+
*
|
|
26
|
+
* @param widthPx width in pixels
|
|
27
|
+
* @param heightPx height in pixels
|
|
28
|
+
* @param dpi dots per inch used for the pixel dims
|
|
29
|
+
* @param toleranceMm allowed deviation per side in millimeters (default 2mm)
|
|
30
|
+
*/
|
|
31
|
+
export declare function identifyDin(widthPx: number, heightPx: number, dpi: number, toleranceMm?: number): null | {
|
|
32
|
+
level: DinLevel;
|
|
33
|
+
matchedOrientation: "portrait" | "landscape";
|
|
34
|
+
measuredMm: {
|
|
35
|
+
w: number;
|
|
36
|
+
h: number;
|
|
37
|
+
};
|
|
38
|
+
isoMm: {
|
|
39
|
+
w: number;
|
|
40
|
+
h: number;
|
|
41
|
+
};
|
|
42
|
+
deltaMm: {
|
|
43
|
+
dw: number;
|
|
44
|
+
dh: number;
|
|
45
|
+
};
|
|
46
|
+
aspectError: number;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=din.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"din.d.ts","sourceRoot":"","sources":["din.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,EAAE,EAAE,CAAC;AAEpD,eAAO,MAAM,UAAU,EAAE,QAAQ,EAEhC,CAAC;AAqCF;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAClC,CAcA;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,QAAQ,EAA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