oasis-editor 0.0.42 → 0.0.43

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.
@@ -0,0 +1,18 @@
1
+ /** CSS device pixels per inch. */
2
+ export declare const PX_PER_INCH = 96;
3
+ /** Typographic points per inch. */
4
+ export declare const POINTS_PER_INCH = 72;
5
+ /** CSS pixels per typographic point (96 / 72). Also the point→px factor. */
6
+ export declare const PX_PER_POINT: number;
7
+ /** Typographic points per CSS pixel (72 / 96). Inverse of {@link PX_PER_POINT}. */
8
+ export declare const PT_PER_PX: number;
9
+ /** CSS pixels per centimetre (96 / 2.54 ≈ 37.795). */
10
+ export declare const PX_PER_CM: number;
11
+ /** English Metric Units per CSS pixel (OOXML drawing geometry). */
12
+ export declare const EMU_PER_PX = 9525;
13
+ /** English Metric Units per typographic point. */
14
+ export declare const EMU_PER_PT = 12700;
15
+ /** Twentieths of a point ("twips") per inch. */
16
+ export declare const TWIPS_PER_INCH = 1440;
17
+ /** Twentieths of a point ("twips") per typographic point. */
18
+ export declare const TWIPS_PER_POINT = 20;
@@ -1,5 +1,4 @@
1
- export declare const EMU_PER_PX = 9525;
2
- export declare const EMU_PER_PT = 12700;
1
+ export { EMU_PER_PX, EMU_PER_PT } from '../../../core/units.js';
3
2
  export declare const DOCX_HIGHLIGHT_COLORS: Record<string, [number, number, number]>;
4
3
  export declare const DOCX_HIGHLIGHT_HEX_ALIASES: Record<string, string>;
5
4
  export declare const OOXML_PERCENT_DENOMINATOR = 100000;
@@ -1,5 +1,6 @@
1
1
  import { EditorTextStyle } from '../../core/model.js';
2
2
 
3
+ /** Points per pixel (72 / 96). Named PX_TO_PT for historical call sites. */
3
4
  export declare const PX_TO_PT: number;
4
5
  export declare const DEFAULT_FONT_SIZE_PX = 14.6667;
5
6
  export declare function pxToPt(value: number): number;
@@ -1,10 +1,9 @@
1
- export declare const EMU_PER_PX = 9525;
2
- export declare const EMU_PER_PT = 12700;
1
+ import { EMU_PER_PX, EMU_PER_PT, PX_PER_INCH, PX_PER_POINT } from '../../../core/units.js';
2
+
3
+ export { EMU_PER_PX, EMU_PER_PT, PX_PER_INCH, PX_PER_POINT };
3
4
  export declare const OOXML_PERCENT_DENOMINATOR = 100000;
4
5
  export declare const OOXML_ROTATION_UNITS = 60000;
5
6
  export declare const VML_FRACTION_DENOMINATOR = 65536;
6
- export declare const PX_PER_INCH = 96;
7
- export declare const PX_PER_POINT: number;
8
7
  export declare function emuToPx(value: string | null | undefined): number | undefined;
9
8
  export declare function parseOptionalInt(value: string | null | undefined): number | undefined;
10
9
  export declare function parseCssLengthToPx(value: string | null | undefined): number | null;
@@ -1,5 +1,6 @@
1
- export declare const TWIPS_PER_INCH = 1440;
2
- export declare const PX_PER_INCH = 96;
1
+ import { TWIPS_PER_INCH, PX_PER_INCH } from '../../core/units.js';
2
+
3
+ export { TWIPS_PER_INCH, PX_PER_INCH };
3
4
  export declare const PAGE_BREAK_MARKER = "\f";
4
5
  export declare const DOCX_IMPLICIT_SINGLE_LINE_HEIGHT = 1.1;
5
6
  export declare function twipsToPx(value: string | null | undefined, fallback: number): number;