@grahlnn/comps 0.1.0
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 +25 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4070 -0
- package/dist/torph/index.d.ts +1 -0
- package/dist/torph/src/components/Torph.d.ts +102 -0
- package/dist/torph/src/utils/text-layout/pretext.d.ts +2 -0
- package/dist/torph/src/utils/text-layout/pretextMorph.d.ts +37 -0
- package/dist/torph/src/vendor/pretext/analysis.d.ts +31 -0
- package/dist/torph/src/vendor/pretext/bidi.d.ts +1 -0
- package/dist/torph/src/vendor/pretext/layout.d.ts +70 -0
- package/dist/torph/src/vendor/pretext/line-break.d.ts +32 -0
- package/dist/torph/src/vendor/pretext/measurement.d.ts +28 -0
- package/package.json +38 -0
- package/torph/src/vendor/pretext/LICENSE +21 -0
- package/torph/src/vendor/pretext/NOTICE.md +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src/components/Torph";
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
export type SupportedWhiteSpace = "normal" | "nowrap" | "pre-wrap";
|
|
3
|
+
export type MorphCharacterLayout = {
|
|
4
|
+
glyph: string;
|
|
5
|
+
key: string;
|
|
6
|
+
left: number;
|
|
7
|
+
top: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
export type MorphSnapshot = {
|
|
12
|
+
text: string;
|
|
13
|
+
renderText: string;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
graphemes: MorphCharacterLayout[];
|
|
17
|
+
};
|
|
18
|
+
export type MorphMeasurement = {
|
|
19
|
+
snapshot: MorphSnapshot;
|
|
20
|
+
layoutInlineSize: number;
|
|
21
|
+
reservedInlineSize: number | null;
|
|
22
|
+
rootOrigin: {
|
|
23
|
+
left: number;
|
|
24
|
+
top: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type MorphVisualBridge = {
|
|
28
|
+
offsetX: number;
|
|
29
|
+
offsetY: number;
|
|
30
|
+
};
|
|
31
|
+
export type MorphLiveItem = MorphCharacterLayout & {
|
|
32
|
+
kind: "move" | "enter";
|
|
33
|
+
fromLeft: number | null;
|
|
34
|
+
fromTop: number | null;
|
|
35
|
+
};
|
|
36
|
+
export type MorphRenderPlan = {
|
|
37
|
+
frameWidth: number;
|
|
38
|
+
frameHeight: number;
|
|
39
|
+
layoutInlineSizeFrom: number;
|
|
40
|
+
layoutInlineSizeTo: number;
|
|
41
|
+
visualBridge: MorphVisualBridge;
|
|
42
|
+
liveItems: MorphLiveItem[];
|
|
43
|
+
exitItems: MorphCharacterLayout[];
|
|
44
|
+
};
|
|
45
|
+
type LayoutContext = {
|
|
46
|
+
display: string;
|
|
47
|
+
direction: string;
|
|
48
|
+
font: string;
|
|
49
|
+
fontFeatureSettings: string;
|
|
50
|
+
fontVariationSettings: string;
|
|
51
|
+
letterSpacingPx: number;
|
|
52
|
+
lineHeightPx: number;
|
|
53
|
+
parentDisplay: string;
|
|
54
|
+
textTransform: string;
|
|
55
|
+
whiteSpace: SupportedWhiteSpace;
|
|
56
|
+
width: number;
|
|
57
|
+
wordSpacingPx: number;
|
|
58
|
+
measurementVersion: number;
|
|
59
|
+
};
|
|
60
|
+
type MorphSegment = {
|
|
61
|
+
glyph: string;
|
|
62
|
+
key: string;
|
|
63
|
+
};
|
|
64
|
+
type MorphStage = "idle" | "prepare" | "animate";
|
|
65
|
+
type GlyphMove = {
|
|
66
|
+
kind: "move";
|
|
67
|
+
from: MorphCharacterLayout;
|
|
68
|
+
to: MorphCharacterLayout;
|
|
69
|
+
};
|
|
70
|
+
type GlyphEnter = {
|
|
71
|
+
kind: "enter";
|
|
72
|
+
to: MorphCharacterLayout;
|
|
73
|
+
};
|
|
74
|
+
type GlyphExit = {
|
|
75
|
+
kind: "exit";
|
|
76
|
+
from: MorphCharacterLayout;
|
|
77
|
+
};
|
|
78
|
+
type GlyphPairing = GlyphMove | GlyphEnter | GlyphExit;
|
|
79
|
+
export declare function measureMorphSnapshotFromLayer(text: string, renderText: string, segments: readonly MorphSegment[], layer: HTMLElement | null): MorphSnapshot;
|
|
80
|
+
export declare function pairMorphCharacters(previous: MorphCharacterLayout[], next: MorphCharacterLayout[]): GlyphPairing[];
|
|
81
|
+
export declare function resolveMorphFrameBounds(previous: MorphSnapshot, next: MorphSnapshot): {
|
|
82
|
+
width: number;
|
|
83
|
+
height: number;
|
|
84
|
+
};
|
|
85
|
+
export declare function buildMorphVisualBridge(previous: MorphMeasurement, next: MorphMeasurement): MorphVisualBridge;
|
|
86
|
+
export declare function buildMorphPlan(previous: MorphMeasurement, next: MorphMeasurement, visualBridge?: MorphVisualBridge): MorphRenderPlan;
|
|
87
|
+
export declare function getLiveTransform(item: MorphLiveItem, stage: MorphStage, visualBridge: MorphVisualBridge): string;
|
|
88
|
+
export declare function getLiveTransition(item: MorphLiveItem, stage: MorphStage): string | undefined;
|
|
89
|
+
export declare function getExitTransform(visualBridge: MorphVisualBridge): string;
|
|
90
|
+
export declare function getExitTransition(stage: MorphStage): string | undefined;
|
|
91
|
+
export declare function supportsIntrinsicWidthLock(display: string, parentDisplay: string): boolean;
|
|
92
|
+
export declare function getRootDisplay(layoutContext: LayoutContext | null): "grid" | "inline-grid";
|
|
93
|
+
export declare function getRootStyle(stage: MorphStage, plan: MorphRenderPlan | null, measurement: MorphMeasurement | null, layoutContext: LayoutContext | null): CSSProperties;
|
|
94
|
+
export declare function getMeasurementLayerStyle(layoutContext: LayoutContext | null, useContentInlineSize?: boolean): CSSProperties;
|
|
95
|
+
export declare function resolveFlowText(committedMeasurement: MorphMeasurement | null, stateMeasurement: MorphMeasurement | null, text: string): string;
|
|
96
|
+
export declare function resolveVisibleFlowText(pendingBootstrapText: string | null, committedMeasurement: MorphMeasurement | null, stateMeasurement: MorphMeasurement | null, text: string): string;
|
|
97
|
+
export declare function resolveActivationBootstrapText(isActivated: boolean, previousText: string, nextText: string): string | null;
|
|
98
|
+
export declare function Torph({ text, className, }: {
|
|
99
|
+
text: string;
|
|
100
|
+
className?: string;
|
|
101
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { clearCache, layout, layoutNextLine, layoutWithLines, prepare, prepareWithSegments, profilePrepare, setLocale, walkLineRanges, type LayoutCursor, type LayoutLine, type LayoutLineRange, type LayoutLinesResult, type LayoutResult, type PrepareOptions, type PrepareProfile, type PreparedText, type PreparedTextWithSegments, } from "../../vendor/pretext/layout.js";
|
|
2
|
+
export type { AnalysisChunk, SegmentBreakKind, TextAnalysis, WhiteSpaceMode, } from "../../vendor/pretext/analysis.js";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type PretextMorphWhiteSpace = "normal" | "nowrap" | "pre-wrap";
|
|
2
|
+
export type PretextMorphMeasurementBackend = "pretext" | "probe" | "dom";
|
|
3
|
+
export type PretextMorphLayoutContext = {
|
|
4
|
+
display: string;
|
|
5
|
+
font: string;
|
|
6
|
+
lineHeightPx: number;
|
|
7
|
+
parentDisplay: string;
|
|
8
|
+
whiteSpace: PretextMorphWhiteSpace;
|
|
9
|
+
width: number;
|
|
10
|
+
direction: string;
|
|
11
|
+
textTransform: string;
|
|
12
|
+
letterSpacingPx: number;
|
|
13
|
+
wordSpacingPx: number;
|
|
14
|
+
fontFeatureSettings: string;
|
|
15
|
+
fontVariationSettings: string;
|
|
16
|
+
};
|
|
17
|
+
export type PretextMorphCharacterLayout = {
|
|
18
|
+
glyph: string;
|
|
19
|
+
key: string;
|
|
20
|
+
left: number;
|
|
21
|
+
top: number;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
};
|
|
25
|
+
export type PretextMorphSnapshot = {
|
|
26
|
+
text: string;
|
|
27
|
+
renderText: string;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
graphemes: PretextMorphCharacterLayout[];
|
|
31
|
+
};
|
|
32
|
+
export declare function clearPretextMorphCaches(): void;
|
|
33
|
+
export declare function getPretextMorphRenderedText(text: string, layoutContext: Pick<PretextMorphLayoutContext, "whiteSpace"> | null): string;
|
|
34
|
+
export declare function getPretextMorphStyleSignature(layoutContext: PretextMorphLayoutContext | null): string | null;
|
|
35
|
+
export declare function getPretextMorphMeasurementBackend(text: string, layoutContext: PretextMorphLayoutContext | null): PretextMorphMeasurementBackend;
|
|
36
|
+
export declare function canUsePretextMorphFastPath(text: string, layoutContext: PretextMorphLayoutContext | null): boolean;
|
|
37
|
+
export declare function measureMorphSnapshotWithPretext(text: string, layoutContext: PretextMorphLayoutContext): PretextMorphSnapshot;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type WhiteSpaceMode = "normal" | "pre-wrap";
|
|
2
|
+
export type SegmentBreakKind = "text" | "space" | "preserved-space" | "tab" | "glue" | "zero-width-break" | "soft-hyphen" | "hard-break";
|
|
3
|
+
export type MergedSegmentation = {
|
|
4
|
+
len: number;
|
|
5
|
+
texts: string[];
|
|
6
|
+
isWordLike: boolean[];
|
|
7
|
+
kinds: SegmentBreakKind[];
|
|
8
|
+
starts: number[];
|
|
9
|
+
};
|
|
10
|
+
export type AnalysisChunk = {
|
|
11
|
+
startSegmentIndex: number;
|
|
12
|
+
endSegmentIndex: number;
|
|
13
|
+
consumedEndSegmentIndex: number;
|
|
14
|
+
};
|
|
15
|
+
export type TextAnalysis = {
|
|
16
|
+
normalized: string;
|
|
17
|
+
chunks: AnalysisChunk[];
|
|
18
|
+
} & MergedSegmentation;
|
|
19
|
+
export type AnalysisProfile = {
|
|
20
|
+
carryCJKAfterClosingQuote: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function normalizeWhitespaceNormal(text: string): string;
|
|
23
|
+
export declare function normalizeWhitespacePreWrap(text: string): string;
|
|
24
|
+
export declare function clearAnalysisCaches(): void;
|
|
25
|
+
export declare function setAnalysisLocale(locale?: string): void;
|
|
26
|
+
export declare function isCJK(s: string): boolean;
|
|
27
|
+
export declare const kinsokuStart: Set<string>;
|
|
28
|
+
export declare const kinsokuEnd: Set<string>;
|
|
29
|
+
export declare const leftStickyPunctuation: Set<string>;
|
|
30
|
+
export declare function endsWithClosingQuote(text: string): boolean;
|
|
31
|
+
export declare function analyzeText(text: string, profile: AnalysisProfile, whiteSpace?: WhiteSpaceMode): TextAnalysis;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function computeSegmentLevels(normalized: string, segStarts: number[]): Int8Array | null;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { type SegmentBreakKind, type WhiteSpaceMode } from './analysis.js';
|
|
2
|
+
declare const preparedTextBrand: unique symbol;
|
|
3
|
+
type PreparedCore = {
|
|
4
|
+
widths: number[];
|
|
5
|
+
lineEndFitAdvances: number[];
|
|
6
|
+
lineEndPaintAdvances: number[];
|
|
7
|
+
kinds: SegmentBreakKind[];
|
|
8
|
+
simpleLineWalkFastPath: boolean;
|
|
9
|
+
segLevels: Int8Array | null;
|
|
10
|
+
breakableWidths: (number[] | null)[];
|
|
11
|
+
breakablePrefixWidths: (number[] | null)[];
|
|
12
|
+
discretionaryHyphenWidth: number;
|
|
13
|
+
tabStopAdvance: number;
|
|
14
|
+
chunks: PreparedLineChunk[];
|
|
15
|
+
};
|
|
16
|
+
export type PreparedText = {
|
|
17
|
+
readonly [preparedTextBrand]: true;
|
|
18
|
+
};
|
|
19
|
+
type InternalPreparedText = PreparedText & PreparedCore;
|
|
20
|
+
export type PreparedTextWithSegments = InternalPreparedText & {
|
|
21
|
+
segments: string[];
|
|
22
|
+
};
|
|
23
|
+
export type LayoutCursor = {
|
|
24
|
+
segmentIndex: number;
|
|
25
|
+
graphemeIndex: number;
|
|
26
|
+
};
|
|
27
|
+
export type LayoutResult = {
|
|
28
|
+
lineCount: number;
|
|
29
|
+
height: number;
|
|
30
|
+
};
|
|
31
|
+
export type LayoutLine = {
|
|
32
|
+
text: string;
|
|
33
|
+
width: number;
|
|
34
|
+
start: LayoutCursor;
|
|
35
|
+
end: LayoutCursor;
|
|
36
|
+
};
|
|
37
|
+
export type LayoutLineRange = {
|
|
38
|
+
width: number;
|
|
39
|
+
start: LayoutCursor;
|
|
40
|
+
end: LayoutCursor;
|
|
41
|
+
};
|
|
42
|
+
export type LayoutLinesResult = LayoutResult & {
|
|
43
|
+
lines: LayoutLine[];
|
|
44
|
+
};
|
|
45
|
+
export type PrepareProfile = {
|
|
46
|
+
analysisMs: number;
|
|
47
|
+
measureMs: number;
|
|
48
|
+
totalMs: number;
|
|
49
|
+
analysisSegments: number;
|
|
50
|
+
preparedSegments: number;
|
|
51
|
+
breakableSegments: number;
|
|
52
|
+
};
|
|
53
|
+
export type PrepareOptions = {
|
|
54
|
+
whiteSpace?: WhiteSpaceMode;
|
|
55
|
+
};
|
|
56
|
+
export type PreparedLineChunk = {
|
|
57
|
+
startSegmentIndex: number;
|
|
58
|
+
endSegmentIndex: number;
|
|
59
|
+
consumedEndSegmentIndex: number;
|
|
60
|
+
};
|
|
61
|
+
export declare function profilePrepare(text: string, font: string, options?: PrepareOptions): PrepareProfile;
|
|
62
|
+
export declare function prepare(text: string, font: string, options?: PrepareOptions): PreparedText;
|
|
63
|
+
export declare function prepareWithSegments(text: string, font: string, options?: PrepareOptions): PreparedTextWithSegments;
|
|
64
|
+
export declare function layout(prepared: PreparedText, maxWidth: number, lineHeight: number): LayoutResult;
|
|
65
|
+
export declare function walkLineRanges(prepared: PreparedTextWithSegments, maxWidth: number, onLine: (line: LayoutLineRange) => void): number;
|
|
66
|
+
export declare function layoutNextLine(prepared: PreparedTextWithSegments, start: LayoutCursor, maxWidth: number): LayoutLine | null;
|
|
67
|
+
export declare function layoutWithLines(prepared: PreparedTextWithSegments, maxWidth: number, lineHeight: number): LayoutLinesResult;
|
|
68
|
+
export declare function clearCache(): void;
|
|
69
|
+
export declare function setLocale(locale?: string): void;
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SegmentBreakKind } from './analysis.js';
|
|
2
|
+
export type LineBreakCursor = {
|
|
3
|
+
segmentIndex: number;
|
|
4
|
+
graphemeIndex: number;
|
|
5
|
+
};
|
|
6
|
+
export type PreparedLineBreakData = {
|
|
7
|
+
widths: number[];
|
|
8
|
+
lineEndFitAdvances: number[];
|
|
9
|
+
lineEndPaintAdvances: number[];
|
|
10
|
+
kinds: SegmentBreakKind[];
|
|
11
|
+
simpleLineWalkFastPath: boolean;
|
|
12
|
+
breakableWidths: (number[] | null)[];
|
|
13
|
+
breakablePrefixWidths: (number[] | null)[];
|
|
14
|
+
discretionaryHyphenWidth: number;
|
|
15
|
+
tabStopAdvance: number;
|
|
16
|
+
chunks: {
|
|
17
|
+
startSegmentIndex: number;
|
|
18
|
+
endSegmentIndex: number;
|
|
19
|
+
consumedEndSegmentIndex: number;
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
export type InternalLayoutLine = {
|
|
23
|
+
startSegmentIndex: number;
|
|
24
|
+
startGraphemeIndex: number;
|
|
25
|
+
endSegmentIndex: number;
|
|
26
|
+
endGraphemeIndex: number;
|
|
27
|
+
width: number;
|
|
28
|
+
};
|
|
29
|
+
export declare function normalizeLineStart(prepared: PreparedLineBreakData, start: LineBreakCursor): LineBreakCursor | null;
|
|
30
|
+
export declare function countPreparedLines(prepared: PreparedLineBreakData, maxWidth: number): number;
|
|
31
|
+
export declare function walkPreparedLines(prepared: PreparedLineBreakData, maxWidth: number, onLine?: (line: InternalLayoutLine) => void): number;
|
|
32
|
+
export declare function layoutNextLineRange(prepared: PreparedLineBreakData, start: LineBreakCursor, maxWidth: number): InternalLayoutLine | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type SegmentMetrics = {
|
|
2
|
+
width: number;
|
|
3
|
+
containsCJK: boolean;
|
|
4
|
+
emojiCount?: number;
|
|
5
|
+
graphemeWidths?: number[] | null;
|
|
6
|
+
graphemePrefixWidths?: number[] | null;
|
|
7
|
+
};
|
|
8
|
+
export type EngineProfile = {
|
|
9
|
+
lineFitEpsilon: number;
|
|
10
|
+
carryCJKAfterClosingQuote: boolean;
|
|
11
|
+
preferPrefixWidthsForBreakableRuns: boolean;
|
|
12
|
+
preferEarlySoftHyphenBreak: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare function getMeasureContext(): CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
|
|
15
|
+
export declare function getSegmentMetricCache(font: string): Map<string, SegmentMetrics>;
|
|
16
|
+
export declare function getSegmentMetrics(seg: string, cache: Map<string, SegmentMetrics>): SegmentMetrics;
|
|
17
|
+
export declare function getEngineProfile(): EngineProfile;
|
|
18
|
+
export declare function parseFontSize(font: string): number;
|
|
19
|
+
export declare function textMayContainEmoji(text: string): boolean;
|
|
20
|
+
export declare function getCorrectedSegmentWidth(seg: string, metrics: SegmentMetrics, emojiCorrection: number): number;
|
|
21
|
+
export declare function getSegmentGraphemeWidths(seg: string, metrics: SegmentMetrics, cache: Map<string, SegmentMetrics>, emojiCorrection: number): number[] | null;
|
|
22
|
+
export declare function getSegmentGraphemePrefixWidths(seg: string, metrics: SegmentMetrics, cache: Map<string, SegmentMetrics>, emojiCorrection: number): number[] | null;
|
|
23
|
+
export declare function getFontMeasurementState(font: string, needsEmojiCorrection: boolean): {
|
|
24
|
+
cache: Map<string, SegmentMetrics>;
|
|
25
|
+
fontSize: number;
|
|
26
|
+
emojiCorrection: number;
|
|
27
|
+
};
|
|
28
|
+
export declare function clearMeasurementCaches(): void;
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grahlnn/comps",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React components from grahlnn/comps.",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"torph/src/vendor/pretext/LICENSE",
|
|
19
|
+
"torph/src/vendor/pretext/NOTICE.md"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "bun run build:js && bun run build:types",
|
|
23
|
+
"build:js": "bun build ./index.ts --outdir ./dist --format esm --target browser --external react --external react/jsx-runtime",
|
|
24
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
25
|
+
"prepublishOnly": "bun run build"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/bun": "latest",
|
|
32
|
+
"@types/react": "^19.2.14"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": "^19.2.4",
|
|
36
|
+
"typescript": "^5"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pretext contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Vendored from `C:\Users\admin\pretext` under the MIT license.
|
|
2
|
+
|
|
3
|
+
Upstream files copied here:
|
|
4
|
+
- `src/analysis.ts`
|
|
5
|
+
- `src/bidi.ts`
|
|
6
|
+
- `src/layout.ts`
|
|
7
|
+
- `src/line-break.ts`
|
|
8
|
+
- `src/measurement.ts`
|
|
9
|
+
|
|
10
|
+
Local project code should import through `src/utils/text-layout/pretext.ts`
|
|
11
|
+
instead of importing these vendor files directly.
|