@vyaz/core 0.0.7 → 0.0.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/dist/index.browser.d.ts +52 -17
- package/dist/index.browser.js +24965 -2
- package/package.json +5 -3
package/dist/index.browser.d.ts
CHANGED
|
@@ -1,28 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vyaz/core — Browser entry point.
|
|
2
|
+
* @vyaz/core — Browser bundle entry point.
|
|
3
3
|
*
|
|
4
|
-
* Re-exports
|
|
5
|
-
*
|
|
6
|
-
* (`node:fs`, `get-system-fonts`).
|
|
4
|
+
* Re-exports all browser-safe APIs. Forces bundlers to inline the modules
|
|
5
|
+
* by using a single `export *`/re-export style that bun build inlines.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
* so tree-shakers can safely eliminate dead branches.
|
|
10
|
-
*
|
|
11
|
-
* ✅ Safe for Vite / webpack / Rollup / esbuild browser builds.
|
|
7
|
+
* ❌ NOT exported: SystemFontRegistry / systemFontRegistry — requires `node:fs`
|
|
12
8
|
*/
|
|
13
|
-
export type { TextFrame, Paragraph, ParagraphStyle, TextRun, InlineWidget, AutofitConfig, TextAlignment, WritingMode, TextOrientation, VerticalAlignment, ScriptType, WhiteSpace, MultiColumnConfig, DominantBaseline, LineFitEdge, TextAlignLast, WordBreak, LineBreak, OverflowWrap, TextDecorationStyle, TextTransform, ListType, NumberFormat, ListStylePosition, ListStyle, } from './types/Document.js';
|
|
14
|
-
export { DEFAULT_PARAGRAPH_STYLE, DEFAULT_TEXT_STYLE, } from './types/Document.js';
|
|
15
|
-
export type { ParagraphLayoutResult, Line, Span, SpanFontMetrics, SemanticParagraph, SemanticLine, SemanticFragment, } from './types/LayoutTypes.js';
|
|
16
|
-
export type { FontMetrics, IFontMetricsProvider, GlyphData, } from './types/FontTypes.js';
|
|
17
9
|
export { ParagraphLayoutEngine, paragraphLayoutEngine } from './layout/ParagraphLayoutEngine.js';
|
|
18
10
|
export { positionLines } from './layout/PositioningEngine.js';
|
|
19
11
|
export { assertLineInvariants, linesToYAML } from './layout/LineBoxValidator.js';
|
|
20
|
-
export type { InvariantError } from './layout/LineBoxValidator.js';
|
|
21
12
|
export { layoutTextFrame } from './layout/TextFrameLayoutEngine.js';
|
|
22
|
-
export type { TextFrameLayoutResult } from './layout/TextFrameLayoutEngine.js';
|
|
23
13
|
export { applyScale, findScale } from './layout/AutoFitEngine.js';
|
|
24
|
-
export
|
|
25
|
-
export { compileParagraph, getParagraphText, makeFontToken } from './compile/DocumentCompiler.js';
|
|
26
|
-
export type { PreparedRichInlineItem } from './compile/DocumentCompiler.js';
|
|
14
|
+
export { compileParagraph, getParagraphText, makeFontToken, collapseSegmentWhitespace, splitParagraphByHardBreaks } from './compile/DocumentCompiler.js';
|
|
27
15
|
export { FontMetricsProvider, fontMetricsProvider } from './measure/FontMetricsProvider.js';
|
|
16
|
+
export { createFontFace, getGlyphAdvance, computePixelMetrics, isFontEngineAvailable } from './measure/FontEngine.js';
|
|
17
|
+
export { getFontBuffer } from './utils/font.js';
|
|
28
18
|
export { FontNotFoundError } from './measure/FontNotFoundError.js';
|
|
19
|
+
export declare const DEFAULT_PARAGRAPH_STYLE: {
|
|
20
|
+
alignment: import("./index.js").TextAlignment;
|
|
21
|
+
lineHeight: number;
|
|
22
|
+
spaceBefore: number;
|
|
23
|
+
spaceAfter: number;
|
|
24
|
+
indent?: number;
|
|
25
|
+
leftIndent?: number;
|
|
26
|
+
rightIndent?: number;
|
|
27
|
+
textIndent?: number;
|
|
28
|
+
letterSpacing?: number;
|
|
29
|
+
textAlignLast?: import("./index.js").TextAlignLast;
|
|
30
|
+
wordBreak?: import("./index.js").WordBreak;
|
|
31
|
+
lineBreak?: import("./index.js").LineBreak;
|
|
32
|
+
overflowWrap?: import("./index.js").OverflowWrap;
|
|
33
|
+
hyphens?: boolean;
|
|
34
|
+
whiteSpace?: import("./index.js").WhiteSpace;
|
|
35
|
+
listStyle?: import("./index.js").ListStyle;
|
|
36
|
+
listRestart?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export declare const DEFAULT_TEXT_STYLE: {
|
|
39
|
+
type?: "text" | "inline-box" | undefined;
|
|
40
|
+
text?: string | undefined;
|
|
41
|
+
inlineWidget?: import("./index.js").InlineWidget | undefined;
|
|
42
|
+
fontFamily?: string | undefined;
|
|
43
|
+
fontSize?: number | undefined;
|
|
44
|
+
fontWeight?: number | "bold" | "normal" | undefined;
|
|
45
|
+
fontStyle?: "normal" | "italic" | undefined;
|
|
46
|
+
color?: string | undefined;
|
|
47
|
+
backgroundColor?: string | undefined;
|
|
48
|
+
letterSpacing?: number | undefined;
|
|
49
|
+
script?: import("./index.js").ScriptType | undefined;
|
|
50
|
+
underline?: boolean | undefined;
|
|
51
|
+
strikethrough?: boolean | undefined;
|
|
52
|
+
overline?: boolean | undefined;
|
|
53
|
+
textDecorationStyle?: import("./index.js").TextDecorationStyle | undefined;
|
|
54
|
+
textDecorationColor?: string | undefined;
|
|
55
|
+
textTransform?: import("./index.js").TextTransform | undefined;
|
|
56
|
+
fullWidth?: boolean | undefined;
|
|
57
|
+
fullSizeKana?: boolean | undefined;
|
|
58
|
+
};
|
|
59
|
+
export { transformText } from './utils/textTransform.js';
|
|
60
|
+
export declare const BULLET_CHARACTERS: {
|
|
61
|
+
[x: number]: string;
|
|
62
|
+
};
|
|
63
|
+
export { formatListNumber, defaultBulletChar } from './utils/list.js';
|