@tiqian/protocol 0.0.0-stage → 0.1.0-alpha.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/haxe/crypto/Sha256.d.ts +19 -0
- package/dist/haxe/crypto/Sha256.js +194 -0
- package/dist/org/tiqian/clreq/AdjustmentStylePolicy.d.ts +11 -0
- package/dist/org/tiqian/clreq/AdjustmentStylePolicy.js +21 -0
- package/dist/org/tiqian/clreq/AutoSpaceMode.d.ts +16 -0
- package/dist/org/tiqian/clreq/AutoSpaceMode.js +17 -0
- package/dist/org/tiqian/clreq/AutoSpacePolicy.d.ts +13 -0
- package/dist/org/tiqian/clreq/AutoSpacePolicy.js +23 -0
- package/dist/org/tiqian/clreq/BopomofoReading.d.ts +12 -0
- package/dist/org/tiqian/clreq/BopomofoReading.js +86 -0
- package/dist/org/tiqian/clreq/BopomofoTone.d.ts +28 -0
- package/dist/org/tiqian/clreq/BopomofoTone.js +26 -0
- package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.d.ts +16 -0
- package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.js +17 -0
- package/dist/org/tiqian/clreq/ClreqProfile.d.ts +27 -0
- package/dist/org/tiqian/clreq/ClreqProfile.js +58 -0
- package/dist/org/tiqian/clreq/ClreqRegion.d.ts +20 -0
- package/dist/org/tiqian/clreq/ClreqRegion.js +20 -0
- package/dist/org/tiqian/clreq/ClreqStrictness.d.ts +16 -0
- package/dist/org/tiqian/clreq/ClreqStrictness.js +17 -0
- package/dist/org/tiqian/clreq/GlueSide.d.ts +16 -0
- package/dist/org/tiqian/clreq/GlueSide.js +17 -0
- package/dist/org/tiqian/clreq/HangingPunctuationStyle.d.ts +12 -0
- package/dist/org/tiqian/clreq/HangingPunctuationStyle.js +14 -0
- package/dist/org/tiqian/clreq/InteriorPunctuationStyle.d.ts +12 -0
- package/dist/org/tiqian/clreq/InteriorPunctuationStyle.js +14 -0
- package/dist/org/tiqian/clreq/KinsokuLevel.d.ts +20 -0
- package/dist/org/tiqian/clreq/KinsokuLevel.js +20 -0
- package/dist/org/tiqian/clreq/KinsokuMode.d.ts +14 -0
- package/dist/org/tiqian/clreq/KinsokuMode.js +2 -0
- package/dist/org/tiqian/clreq/KinsokuModes.d.ts +11 -0
- package/dist/org/tiqian/clreq/KinsokuModes.js +71 -0
- package/dist/org/tiqian/clreq/LineAdjustmentStrategy.d.ts +16 -0
- package/dist/org/tiqian/clreq/LineAdjustmentStrategy.js +17 -0
- package/dist/org/tiqian/clreq/LineEndPunctuationStyle.d.ts +12 -0
- package/dist/org/tiqian/clreq/LineEndPunctuationStyle.js +14 -0
- package/dist/org/tiqian/clreq/PunctuationClass.d.ts +44 -0
- package/dist/org/tiqian/clreq/PunctuationClass.js +38 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacement.d.ts +12 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacement.js +14 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacements.d.ts +9 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacements.js +49 -0
- package/dist/org/tiqian/clreq/PunctuationWidthPolicy.d.ts +8 -0
- package/dist/org/tiqian/clreq/PunctuationWidthPolicy.js +16 -0
- package/dist/org/tiqian/clreq/ResolvedKinsoku.d.ts +12 -0
- package/dist/org/tiqian/clreq/ResolvedKinsoku.js +43 -0
- package/dist/org/tiqian/core/Cluster.d.ts +13 -0
- package/dist/org/tiqian/core/Cluster.js +24 -0
- package/dist/org/tiqian/core/EastAsianSpacingData.d.ts +4 -0
- package/dist/org/tiqian/core/EastAsianSpacingData.js +399 -0
- package/dist/org/tiqian/core/EastAsianSpacingEdges.d.ts +8 -0
- package/dist/org/tiqian/core/EastAsianSpacingEdges.js +14 -0
- package/dist/org/tiqian/core/EastAsianSpacingValue.d.ts +20 -0
- package/dist/org/tiqian/core/EastAsianSpacingValue.js +20 -0
- package/dist/org/tiqian/core/Ic.d.ts +7 -0
- package/dist/org/tiqian/core/Ic.js +17 -0
- package/dist/org/tiqian/core/IllegalStateException.d.ts +4 -0
- package/dist/org/tiqian/core/IllegalStateException.js +8 -0
- package/dist/org/tiqian/core/IntRange.d.ts +12 -0
- package/dist/org/tiqian/core/IntRange.js +30 -0
- package/dist/org/tiqian/core/LineEndReason.d.ts +16 -0
- package/dist/org/tiqian/core/LineEndReason.js +17 -0
- package/dist/org/tiqian/core/SourceBoundaryBias.d.ts +16 -0
- package/dist/org/tiqian/core/SourceBoundaryBias.js +17 -0
- package/dist/org/tiqian/core/SourceInteractionBoundaries.d.ts +29 -0
- package/dist/org/tiqian/core/SourceInteractionBoundaries.js +193 -0
- package/dist/org/tiqian/core/TextRange.d.ts +11 -0
- package/dist/org/tiqian/core/TextRange.js +40 -0
- package/dist/org/tiqian/core/TextRangeError.d.ts +11 -0
- package/dist/org/tiqian/core/TextRangeError.js +2 -0
- package/dist/org/tiqian/core/TiqianIllegalArgumentException.d.ts +6 -0
- package/dist/org/tiqian/core/TiqianIllegalArgumentException.js +21 -0
- package/dist/org/tiqian/core/TiqianNoSuchElementException.d.ts +10 -0
- package/dist/org/tiqian/core/TiqianNoSuchElementException.js +16 -0
- package/dist/org/tiqian/core/UnicodeCombiningMarkData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeCombiningMarkData.js +109 -0
- package/dist/org/tiqian/core/UnicodeEastAsianSpacing.d.ts +16 -0
- package/dist/org/tiqian/core/UnicodeEastAsianSpacing.js +88 -0
- package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.js +35 -0
- package/dist/org/tiqian/core/UnicodeExtendedPictographicData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeExtendedPictographicData.js +64 -0
- package/dist/org/tiqian/core/UnicodeNumber.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeNumber.js +14 -0
- package/dist/org/tiqian/core/UnicodeNumberData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeNumberData.js +64 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidence.d.ts +16 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidence.js +17 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.d.ts +7 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.js +17 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceData.d.ts +4 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceData.js +295 -0
- package/dist/org/tiqian/core/UnicodeWordCharacter.d.ts +6 -0
- package/dist/org/tiqian/core/UnicodeWordCharacter.js +17 -0
- package/dist/org/tiqian/core/UnicodeWordCharacterData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeWordCharacterData.js +234 -0
- package/dist/org/tiqian/font/FontRole.d.ts +28 -0
- package/dist/org/tiqian/font/FontRole.js +26 -0
- package/dist/org/tiqian/font/FontRoleContext.d.ts +13 -0
- package/dist/org/tiqian/font/FontRoleContext.js +28 -0
- package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.d.ts +51 -0
- package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.js +305 -0
- package/dist/org/tiqian/layout/LineOptimization.d.ts +124 -0
- package/dist/org/tiqian/layout/LineOptimization.js +298 -0
- package/dist/org/tiqian/layout/ProgressiveBreakDecisions.d.ts +86 -0
- package/dist/org/tiqian/layout/ProgressiveBreakDecisions.js +415 -0
- package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.d.ts +5 -0
- package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.js +33 -0
- package/dist/org/tiqian/layout/QuotePairAnalyzer.d.ts +63 -0
- package/dist/org/tiqian/layout/QuotePairAnalyzer.js +251 -0
- package/dist/org/tiqian/linebreak/BreakKind.d.ts +20 -0
- package/dist/org/tiqian/linebreak/BreakKind.js +20 -0
- package/dist/org/tiqian/protocol/Canonical.d.ts +55 -0
- package/dist/org/tiqian/protocol/Canonical.js +471 -0
- package/dist/org/tiqian/protocol/DecorationInput.d.ts +6 -0
- package/dist/org/tiqian/protocol/DecorationInput.js +12 -0
- package/dist/org/tiqian/protocol/EncodeResult.d.ts +9 -0
- package/dist/org/tiqian/protocol/EncodeResult.js +2 -0
- package/dist/org/tiqian/protocol/FaceInfo.d.ts +13 -0
- package/dist/org/tiqian/protocol/FaceInfo.js +2 -0
- package/dist/org/tiqian/protocol/FontContract.d.ts +25 -0
- package/dist/org/tiqian/protocol/FontContract.js +317 -0
- package/dist/org/tiqian/protocol/FontFaceRecord.d.ts +6 -0
- package/dist/org/tiqian/protocol/FontFaceRecord.js +2 -0
- package/dist/org/tiqian/protocol/FontFaceSpec.d.ts +11 -0
- package/dist/org/tiqian/protocol/FontFaceSpec.js +2 -0
- package/dist/org/tiqian/protocol/FontWeightSpec.d.ts +10 -0
- package/dist/org/tiqian/protocol/FontWeightSpec.js +2 -0
- package/dist/org/tiqian/protocol/InlineBoxInput.d.ts +7 -0
- package/dist/org/tiqian/protocol/InlineBoxInput.js +2 -0
- package/dist/org/tiqian/protocol/InlineObjectInput.d.ts +7 -0
- package/dist/org/tiqian/protocol/InlineObjectInput.js +2 -0
- package/dist/org/tiqian/protocol/JsCoerce.d.ts +19 -0
- package/dist/org/tiqian/protocol/JsCoerce.js +394 -0
- package/dist/org/tiqian/protocol/LayoutAttribute.d.ts +5 -0
- package/dist/org/tiqian/protocol/LayoutAttribute.js +10 -0
- package/dist/org/tiqian/protocol/LayoutFloatShape.d.ts +14 -0
- package/dist/org/tiqian/protocol/LayoutFloatShape.js +2 -0
- package/dist/org/tiqian/protocol/LayoutTree.d.ts +23 -0
- package/dist/org/tiqian/protocol/LayoutTree.js +2 -0
- package/dist/org/tiqian/protocol/LayoutVertex.d.ts +4 -0
- package/dist/org/tiqian/protocol/LayoutVertex.js +2 -0
- package/dist/org/tiqian/protocol/LineBreakSpanInput.d.ts +6 -0
- package/dist/org/tiqian/protocol/LineBreakSpanInput.js +12 -0
- package/dist/org/tiqian/protocol/MetricEntry.d.ts +11 -0
- package/dist/org/tiqian/protocol/MetricEntry.js +21 -0
- package/dist/org/tiqian/protocol/NamedError.d.ts +88 -0
- package/dist/org/tiqian/protocol/NamedError.js +71 -0
- package/dist/org/tiqian/protocol/NamedErrorNames.d.ts +5 -0
- package/dist/org/tiqian/protocol/NamedErrorNames.js +53 -0
- package/dist/org/tiqian/protocol/ParagraphRequest.d.ts +25 -0
- package/dist/org/tiqian/protocol/ParagraphRequest.js +2 -0
- package/dist/org/tiqian/protocol/ParagraphRequestChecks.d.ts +8 -0
- package/dist/org/tiqian/protocol/ParagraphRequestChecks.js +145 -0
- package/dist/org/tiqian/protocol/ParagraphRequestException.d.ts +6 -0
- package/dist/org/tiqian/protocol/ParagraphRequestException.js +55 -0
- package/dist/org/tiqian/protocol/ParagraphRequestFields.d.ts +3 -0
- package/dist/org/tiqian/protocol/ParagraphRequestFields.js +4 -0
- package/dist/org/tiqian/protocol/Plan.d.ts +101 -0
- package/dist/org/tiqian/protocol/Plan.js +10 -0
- package/dist/org/tiqian/protocol/PlanEndReason.d.ts +16 -0
- package/dist/org/tiqian/protocol/PlanEndReason.js +17 -0
- package/dist/org/tiqian/protocol/PlanJsonNumber.d.ts +43 -0
- package/dist/org/tiqian/protocol/PlanJsonNumber.js +362 -0
- package/dist/org/tiqian/protocol/PlanSchema.d.ts +4 -0
- package/dist/org/tiqian/protocol/PlanSchema.js +5 -0
- package/dist/org/tiqian/protocol/PlanStyleDelta.d.ts +5 -0
- package/dist/org/tiqian/protocol/PlanStyleDelta.js +2 -0
- package/dist/org/tiqian/protocol/Revision.d.ts +11 -0
- package/dist/org/tiqian/protocol/Revision.js +12 -0
- package/dist/org/tiqian/protocol/SessionFaceSpec.d.ts +5 -0
- package/dist/org/tiqian/protocol/SessionFaceSpec.js +2 -0
- package/dist/org/tiqian/protocol/SnapshotTableBinary.d.ts +55 -0
- package/dist/org/tiqian/protocol/SnapshotTableBinary.js +657 -0
- package/dist/org/tiqian/protocol/SnapshotTypography.d.ts +14 -0
- package/dist/org/tiqian/protocol/SnapshotTypography.js +2 -0
- package/dist/org/tiqian/protocol/StyleRow.d.ts +8 -0
- package/dist/org/tiqian/protocol/StyleRow.js +15 -0
- package/dist/org/tiqian/protocol/TableData.d.ts +25 -0
- package/dist/org/tiqian/protocol/TableData.js +45 -0
- package/dist/org/tiqian/protocol/TableInput.d.ts +13 -0
- package/dist/org/tiqian/protocol/TableInput.js +21 -0
- package/dist/org/tiqian/protocol/TableMetricRow.d.ts +9 -0
- package/dist/org/tiqian/protocol/TableMetricRow.js +17 -0
- package/dist/org/tiqian/protocol/TableProbe.d.ts +11 -0
- package/dist/org/tiqian/protocol/TableProbe.js +21 -0
- package/dist/org/tiqian/protocol/TextSpanInput.d.ts +9 -0
- package/dist/org/tiqian/protocol/TextSpanInput.js +2 -0
- package/dist/org/tiqian/protocol/ValueRow.d.ts +4 -0
- package/dist/org/tiqian/protocol/ValueRow.js +7 -0
- package/dist/org/tiqian/protocol/WireField.d.ts +5 -0
- package/dist/org/tiqian/protocol/WireField.js +2 -0
- package/dist/org/tiqian/protocol/WireValue.d.ts +25 -0
- package/dist/org/tiqian/protocol/WireValue.js +2 -0
- package/dist/org/tiqian/test/TestHelpers.d.ts +5 -0
- package/dist/org/tiqian/test/TestHelpers.js +27 -0
- package/dist/org/tiqian/test/trace/TestTrace.d.ts +6 -0
- package/dist/org/tiqian/test/trace/TestTrace.js +8 -0
- package/dist/org/tiqian/test/trace/TestTracePlatform.d.ts +6 -0
- package/dist/org/tiqian/test/trace/TestTracePlatform.js +78 -0
- package/dist/org/tiqian/test/trace/TestTraceRecorder.d.ts +9 -0
- package/dist/org/tiqian/test/trace/TestTraceRecorder.js +36 -0
- package/dist/org/tiqian/test/trace/TestTraceRender.d.ts +47 -0
- package/dist/org/tiqian/test/trace/TestTraceRender.js +690 -0
- package/dist/org/tiqian/test/trace/TestTraceStore.d.ts +18 -0
- package/dist/org/tiqian/test/trace/TestTraceStore.js +149 -0
- package/dist/org/tiqian/test/trace/TraceAssertionError.d.ts +5 -0
- package/dist/org/tiqian/test/trace/TraceAssertionError.js +2 -0
- package/dist/org/tiqian/test/trace/TraceAssertionException.d.ts +6 -0
- package/dist/org/tiqian/test/trace/TraceAssertionException.js +16 -0
- package/dist/org/tiqian/test/trace/TraceField.d.ts +5 -0
- package/dist/org/tiqian/test/trace/TraceField.js +10 -0
- package/dist/org/tiqian/test/trace/TraceFormat.d.ts +21 -0
- package/dist/org/tiqian/test/trace/TraceFormat.js +184 -0
- package/dist/org/tiqian/test/trace/TracedAssertions.d.ts +78 -0
- package/dist/org/tiqian/test/trace/TracedAssertions.js +749 -0
- package/dist/runtime.d.ts +96 -0
- package/dist/runtime.js +1612 -0
- package/dist/std/FsError.d.ts +48 -0
- package/dist/std/FsError.js +2 -0
- package/dist/std/FsException.d.ts +6 -0
- package/dist/std/FsException.js +45 -0
- package/dist/std/UStringException.d.ts +6 -0
- package/dist/std/UStringException.js +21 -0
- package/dist/std/UStringFault.d.ts +9 -0
- package/dist/std/UStringFault.js +2 -0
- package/package.json +26 -4
- package/README.md +0 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const ClreqStrictness = Object.freeze({
|
|
3
|
+
Loose: Object.freeze({ kind: "Loose" }),
|
|
4
|
+
Normal: Object.freeze({ kind: "Normal" }),
|
|
5
|
+
Strict: Object.freeze({ kind: "Strict" })
|
|
6
|
+
});
|
|
7
|
+
export function compareClreqStrictness(a, b) {
|
|
8
|
+
if (a === b)
|
|
9
|
+
return 0;
|
|
10
|
+
if (a.kind === "Loose")
|
|
11
|
+
return 0 - (b.kind === "Loose" ? 0 : 0);
|
|
12
|
+
if (a.kind === "Normal")
|
|
13
|
+
return 1 - (b.kind === "Normal" ? 1 : 0);
|
|
14
|
+
if (a.kind === "Strict")
|
|
15
|
+
return 2 - (b.kind === "Strict" ? 2 : 0);
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface LeadingOnly {
|
|
2
|
+
readonly kind: "LeadingOnly";
|
|
3
|
+
}
|
|
4
|
+
export interface TrailingOnly {
|
|
5
|
+
readonly kind: "TrailingOnly";
|
|
6
|
+
}
|
|
7
|
+
export interface BothSides {
|
|
8
|
+
readonly kind: "BothSides";
|
|
9
|
+
}
|
|
10
|
+
export type GlueSide = LeadingOnly | TrailingOnly | BothSides;
|
|
11
|
+
export declare const GlueSide: Readonly<{
|
|
12
|
+
LeadingOnly: Readonly<LeadingOnly>;
|
|
13
|
+
TrailingOnly: Readonly<TrailingOnly>;
|
|
14
|
+
BothSides: Readonly<BothSides>;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function compareGlueSide(a: GlueSide, b: GlueSide): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const GlueSide = Object.freeze({
|
|
3
|
+
LeadingOnly: Object.freeze({ kind: "LeadingOnly" }),
|
|
4
|
+
TrailingOnly: Object.freeze({ kind: "TrailingOnly" }),
|
|
5
|
+
BothSides: Object.freeze({ kind: "BothSides" })
|
|
6
|
+
});
|
|
7
|
+
export function compareGlueSide(a, b) {
|
|
8
|
+
if (a === b)
|
|
9
|
+
return 0;
|
|
10
|
+
if (a.kind === "LeadingOnly")
|
|
11
|
+
return 0 - (b.kind === "LeadingOnly" ? 0 : 0);
|
|
12
|
+
if (a.kind === "TrailingOnly")
|
|
13
|
+
return 1 - (b.kind === "TrailingOnly" ? 1 : 0);
|
|
14
|
+
if (a.kind === "BothSides")
|
|
15
|
+
return 2 - (b.kind === "BothSides" ? 2 : 0);
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface Disabled {
|
|
2
|
+
readonly kind: "Disabled";
|
|
3
|
+
}
|
|
4
|
+
export interface PauseStops {
|
|
5
|
+
readonly kind: "PauseStops";
|
|
6
|
+
}
|
|
7
|
+
export type HangingPunctuationStyle = Disabled | PauseStops;
|
|
8
|
+
export declare const HangingPunctuationStyle: Readonly<{
|
|
9
|
+
Disabled: Readonly<Disabled>;
|
|
10
|
+
PauseStops: Readonly<PauseStops>;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function compareHangingPunctuationStyle(a: HangingPunctuationStyle, b: HangingPunctuationStyle): number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const HangingPunctuationStyle = Object.freeze({
|
|
3
|
+
Disabled: Object.freeze({ kind: "Disabled" }),
|
|
4
|
+
PauseStops: Object.freeze({ kind: "PauseStops" })
|
|
5
|
+
});
|
|
6
|
+
export function compareHangingPunctuationStyle(a, b) {
|
|
7
|
+
if (a === b)
|
|
8
|
+
return 0;
|
|
9
|
+
if (a.kind === "Disabled")
|
|
10
|
+
return 0 - (b.kind === "Disabled" ? 0 : 0);
|
|
11
|
+
if (a.kind === "PauseStops")
|
|
12
|
+
return 1 - (b.kind === "PauseStops" ? 1 : 0);
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface FullWidth {
|
|
2
|
+
readonly kind: "FullWidth";
|
|
3
|
+
}
|
|
4
|
+
export interface Kaiming {
|
|
5
|
+
readonly kind: "Kaiming";
|
|
6
|
+
}
|
|
7
|
+
export type InteriorPunctuationStyle = FullWidth | Kaiming;
|
|
8
|
+
export declare const InteriorPunctuationStyle: Readonly<{
|
|
9
|
+
FullWidth: Readonly<FullWidth>;
|
|
10
|
+
Kaiming: Readonly<Kaiming>;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function compareInteriorPunctuationStyle(a: InteriorPunctuationStyle, b: InteriorPunctuationStyle): number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const InteriorPunctuationStyle = Object.freeze({
|
|
3
|
+
FullWidth: Object.freeze({ kind: "FullWidth" }),
|
|
4
|
+
Kaiming: Object.freeze({ kind: "Kaiming" })
|
|
5
|
+
});
|
|
6
|
+
export function compareInteriorPunctuationStyle(a, b) {
|
|
7
|
+
if (a === b)
|
|
8
|
+
return 0;
|
|
9
|
+
if (a.kind === "FullWidth")
|
|
10
|
+
return 0 - (b.kind === "FullWidth" ? 0 : 0);
|
|
11
|
+
if (a.kind === "Kaiming")
|
|
12
|
+
return 1 - (b.kind === "Kaiming" ? 1 : 0);
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface None {
|
|
2
|
+
readonly kind: "None";
|
|
3
|
+
}
|
|
4
|
+
export interface Basic {
|
|
5
|
+
readonly kind: "Basic";
|
|
6
|
+
}
|
|
7
|
+
export interface GbStyle {
|
|
8
|
+
readonly kind: "GbStyle";
|
|
9
|
+
}
|
|
10
|
+
export interface Strict {
|
|
11
|
+
readonly kind: "Strict";
|
|
12
|
+
}
|
|
13
|
+
export type KinsokuLevel = None | Basic | GbStyle | Strict;
|
|
14
|
+
export declare const KinsokuLevel: Readonly<{
|
|
15
|
+
None: Readonly<None>;
|
|
16
|
+
Basic: Readonly<Basic>;
|
|
17
|
+
GbStyle: Readonly<GbStyle>;
|
|
18
|
+
Strict: Readonly<Strict>;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function compareKinsokuLevel(a: KinsokuLevel, b: KinsokuLevel): number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const KinsokuLevel = Object.freeze({
|
|
3
|
+
None: Object.freeze({ kind: "None" }),
|
|
4
|
+
Basic: Object.freeze({ kind: "Basic" }),
|
|
5
|
+
GbStyle: Object.freeze({ kind: "GbStyle" }),
|
|
6
|
+
Strict: Object.freeze({ kind: "Strict" })
|
|
7
|
+
});
|
|
8
|
+
export function compareKinsokuLevel(a, b) {
|
|
9
|
+
if (a === b)
|
|
10
|
+
return 0;
|
|
11
|
+
if (a.kind === "None")
|
|
12
|
+
return 0 - (b.kind === "None" ? 0 : 0);
|
|
13
|
+
if (a.kind === "Basic")
|
|
14
|
+
return 1 - (b.kind === "Basic" ? 1 : 0);
|
|
15
|
+
if (a.kind === "GbStyle")
|
|
16
|
+
return 2 - (b.kind === "GbStyle" ? 2 : 0);
|
|
17
|
+
if (a.kind === "Strict")
|
|
18
|
+
return 3 - (b.kind === "Strict" ? 3 : 0);
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type HangingPunctuationStyle } from "./HangingPunctuationStyle.js";
|
|
2
|
+
import { type KinsokuLevel } from "./KinsokuLevel.js";
|
|
3
|
+
export interface Fixed {
|
|
4
|
+
readonly kind: "Fixed";
|
|
5
|
+
readonly level: KinsokuLevel;
|
|
6
|
+
readonly hanging: HangingPunctuationStyle;
|
|
7
|
+
}
|
|
8
|
+
export interface MeasureAdaptive {
|
|
9
|
+
readonly kind: "MeasureAdaptive";
|
|
10
|
+
readonly hangBelowEm: number;
|
|
11
|
+
readonly gbAboveEm: number;
|
|
12
|
+
readonly strictAboveEm: number;
|
|
13
|
+
}
|
|
14
|
+
export type KinsokuMode = Fixed | MeasureAdaptive;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type KinsokuMode } from "./KinsokuMode.js";
|
|
2
|
+
import { ResolvedKinsoku } from "./ResolvedKinsoku.js";
|
|
3
|
+
export declare class KinsokuModes {
|
|
4
|
+
static resolve(mode: KinsokuMode, measureEm: number): ResolvedKinsoku;
|
|
5
|
+
static render(mode: KinsokuMode): string;
|
|
6
|
+
static sameMode(a: KinsokuMode, b: KinsokuMode): boolean;
|
|
7
|
+
private static resolveFixed;
|
|
8
|
+
private static resolveMeasureAdaptive;
|
|
9
|
+
private static sameFixed;
|
|
10
|
+
private static sameMeasureAdaptive;
|
|
11
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { HangingPunctuationStyle } from "./HangingPunctuationStyle.js";
|
|
3
|
+
import { KinsokuLevel } from "./KinsokuLevel.js";
|
|
4
|
+
import { ResolvedKinsoku } from "./ResolvedKinsoku.js";
|
|
5
|
+
export class KinsokuModes {
|
|
6
|
+
static resolve(mode, measureEm) {
|
|
7
|
+
switch (mode.kind) {
|
|
8
|
+
case "Fixed":
|
|
9
|
+
{
|
|
10
|
+
return KinsokuModes.resolveFixed(mode.level, mode.hanging);
|
|
11
|
+
}
|
|
12
|
+
case "MeasureAdaptive":
|
|
13
|
+
{
|
|
14
|
+
return KinsokuModes.resolveMeasureAdaptive(measureEm, mode.hangBelowEm, mode.gbAboveEm, mode.strictAboveEm);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
static render(mode) {
|
|
19
|
+
switch (mode.kind) {
|
|
20
|
+
case "Fixed":
|
|
21
|
+
{
|
|
22
|
+
return `Fixed(level=${mode.level.kind}, hanging=${mode.hanging.kind})`;
|
|
23
|
+
}
|
|
24
|
+
case "MeasureAdaptive":
|
|
25
|
+
{
|
|
26
|
+
return `MeasureAdaptive(hangBelowEm=${mode.hangBelowEm}, gbAboveEm=${mode.gbAboveEm}, strictAboveEm=${mode.strictAboveEm})`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
static sameMode(a, b) {
|
|
31
|
+
switch (a.kind) {
|
|
32
|
+
case "Fixed":
|
|
33
|
+
{
|
|
34
|
+
return KinsokuModes.sameFixed(a.level, a.hanging, b);
|
|
35
|
+
}
|
|
36
|
+
case "MeasureAdaptive":
|
|
37
|
+
{
|
|
38
|
+
return KinsokuModes.sameMeasureAdaptive(a.hangBelowEm, a.gbAboveEm, a.strictAboveEm, b);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
static resolveFixed(level, hanging) {
|
|
43
|
+
return new ResolvedKinsoku(level, hanging, `Fixed:${level.kind}${(hanging.kind !== "Disabled" ? "+Hang" : "")}`);
|
|
44
|
+
}
|
|
45
|
+
static resolveMeasureAdaptive(measureEm, hangBelowEm, gbAboveEm, strictAboveEm) {
|
|
46
|
+
const level = (measureEm > strictAboveEm ? KinsokuLevel.Strict : (measureEm > gbAboveEm ? KinsokuLevel.GbStyle : KinsokuLevel.Basic));
|
|
47
|
+
const hanging = (measureEm < hangBelowEm ? HangingPunctuationStyle.PauseStops : HangingPunctuationStyle.Disabled);
|
|
48
|
+
const tag = `MeasureAdaptiveKinsoku:${Math.trunc(measureEm)}字→${level.kind}${(hanging.kind !== "Disabled" ? "+Hang" : "")}`;
|
|
49
|
+
return new ResolvedKinsoku(level, hanging, tag);
|
|
50
|
+
}
|
|
51
|
+
static sameFixed(level, hanging, b) {
|
|
52
|
+
switch (b.kind) {
|
|
53
|
+
case "Fixed":
|
|
54
|
+
{
|
|
55
|
+
return level === b.level && hanging === b.hanging;
|
|
56
|
+
}
|
|
57
|
+
case "MeasureAdaptive":
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
static sameMeasureAdaptive(hangBelowEm, gbAboveEm, strictAboveEm, b) {
|
|
62
|
+
switch (b.kind) {
|
|
63
|
+
case "Fixed":
|
|
64
|
+
return false;
|
|
65
|
+
case "MeasureAdaptive":
|
|
66
|
+
{
|
|
67
|
+
return hangBelowEm === b.hangBelowEm && gbAboveEm === b.gbAboveEm && strictAboveEm === b.strictAboveEm;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface PushInFirst {
|
|
2
|
+
readonly kind: "PushInFirst";
|
|
3
|
+
}
|
|
4
|
+
export interface PushOutFirst {
|
|
5
|
+
readonly kind: "PushOutFirst";
|
|
6
|
+
}
|
|
7
|
+
export interface PushOutOnly {
|
|
8
|
+
readonly kind: "PushOutOnly";
|
|
9
|
+
}
|
|
10
|
+
export type LineAdjustmentStrategy = PushInFirst | PushOutFirst | PushOutOnly;
|
|
11
|
+
export declare const LineAdjustmentStrategy: Readonly<{
|
|
12
|
+
PushInFirst: Readonly<PushInFirst>;
|
|
13
|
+
PushOutFirst: Readonly<PushOutFirst>;
|
|
14
|
+
PushOutOnly: Readonly<PushOutOnly>;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function compareLineAdjustmentStrategy(a: LineAdjustmentStrategy, b: LineAdjustmentStrategy): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const LineAdjustmentStrategy = Object.freeze({
|
|
3
|
+
PushInFirst: Object.freeze({ kind: "PushInFirst" }),
|
|
4
|
+
PushOutFirst: Object.freeze({ kind: "PushOutFirst" }),
|
|
5
|
+
PushOutOnly: Object.freeze({ kind: "PushOutOnly" })
|
|
6
|
+
});
|
|
7
|
+
export function compareLineAdjustmentStrategy(a, b) {
|
|
8
|
+
if (a === b)
|
|
9
|
+
return 0;
|
|
10
|
+
if (a.kind === "PushInFirst")
|
|
11
|
+
return 0 - (b.kind === "PushInFirst" ? 0 : 0);
|
|
12
|
+
if (a.kind === "PushOutFirst")
|
|
13
|
+
return 1 - (b.kind === "PushOutFirst" ? 1 : 0);
|
|
14
|
+
if (a.kind === "PushOutOnly")
|
|
15
|
+
return 2 - (b.kind === "PushOutOnly" ? 2 : 0);
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ForceHalfWidth {
|
|
2
|
+
readonly kind: "ForceHalfWidth";
|
|
3
|
+
}
|
|
4
|
+
export interface AllowFullWidth {
|
|
5
|
+
readonly kind: "AllowFullWidth";
|
|
6
|
+
}
|
|
7
|
+
export type LineEndPunctuationStyle = ForceHalfWidth | AllowFullWidth;
|
|
8
|
+
export declare const LineEndPunctuationStyle: Readonly<{
|
|
9
|
+
ForceHalfWidth: Readonly<ForceHalfWidth>;
|
|
10
|
+
AllowFullWidth: Readonly<AllowFullWidth>;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function compareLineEndPunctuationStyle(a: LineEndPunctuationStyle, b: LineEndPunctuationStyle): number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const LineEndPunctuationStyle = Object.freeze({
|
|
3
|
+
ForceHalfWidth: Object.freeze({ kind: "ForceHalfWidth" }),
|
|
4
|
+
AllowFullWidth: Object.freeze({ kind: "AllowFullWidth" })
|
|
5
|
+
});
|
|
6
|
+
export function compareLineEndPunctuationStyle(a, b) {
|
|
7
|
+
if (a === b)
|
|
8
|
+
return 0;
|
|
9
|
+
if (a.kind === "ForceHalfWidth")
|
|
10
|
+
return 0 - (b.kind === "ForceHalfWidth" ? 0 : 0);
|
|
11
|
+
if (a.kind === "AllowFullWidth")
|
|
12
|
+
return 1 - (b.kind === "AllowFullWidth" ? 1 : 0);
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface Opening {
|
|
2
|
+
readonly kind: "Opening";
|
|
3
|
+
}
|
|
4
|
+
export interface Closing {
|
|
5
|
+
readonly kind: "Closing";
|
|
6
|
+
}
|
|
7
|
+
export interface PauseOrStop {
|
|
8
|
+
readonly kind: "PauseOrStop";
|
|
9
|
+
}
|
|
10
|
+
export interface MiddleDot {
|
|
11
|
+
readonly kind: "MiddleDot";
|
|
12
|
+
}
|
|
13
|
+
export interface Interpunct {
|
|
14
|
+
readonly kind: "Interpunct";
|
|
15
|
+
}
|
|
16
|
+
export interface Connector {
|
|
17
|
+
readonly kind: "Connector";
|
|
18
|
+
}
|
|
19
|
+
export interface Solidus {
|
|
20
|
+
readonly kind: "Solidus";
|
|
21
|
+
}
|
|
22
|
+
export interface Ellipsis {
|
|
23
|
+
readonly kind: "Ellipsis";
|
|
24
|
+
}
|
|
25
|
+
export interface Dash {
|
|
26
|
+
readonly kind: "Dash";
|
|
27
|
+
}
|
|
28
|
+
export interface Other {
|
|
29
|
+
readonly kind: "Other";
|
|
30
|
+
}
|
|
31
|
+
export type PunctuationClass = Opening | Closing | PauseOrStop | MiddleDot | Interpunct | Connector | Solidus | Ellipsis | Dash | Other;
|
|
32
|
+
export declare const PunctuationClass: Readonly<{
|
|
33
|
+
Opening: Readonly<Opening>;
|
|
34
|
+
Closing: Readonly<Closing>;
|
|
35
|
+
PauseOrStop: Readonly<PauseOrStop>;
|
|
36
|
+
MiddleDot: Readonly<MiddleDot>;
|
|
37
|
+
Interpunct: Readonly<Interpunct>;
|
|
38
|
+
Connector: Readonly<Connector>;
|
|
39
|
+
Solidus: Readonly<Solidus>;
|
|
40
|
+
Ellipsis: Readonly<Ellipsis>;
|
|
41
|
+
Dash: Readonly<Dash>;
|
|
42
|
+
Other: Readonly<Other>;
|
|
43
|
+
}>;
|
|
44
|
+
export declare function comparePunctuationClass(a: PunctuationClass, b: PunctuationClass): number;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const PunctuationClass = Object.freeze({
|
|
3
|
+
Opening: Object.freeze({ kind: "Opening" }),
|
|
4
|
+
Closing: Object.freeze({ kind: "Closing" }),
|
|
5
|
+
PauseOrStop: Object.freeze({ kind: "PauseOrStop" }),
|
|
6
|
+
MiddleDot: Object.freeze({ kind: "MiddleDot" }),
|
|
7
|
+
Interpunct: Object.freeze({ kind: "Interpunct" }),
|
|
8
|
+
Connector: Object.freeze({ kind: "Connector" }),
|
|
9
|
+
Solidus: Object.freeze({ kind: "Solidus" }),
|
|
10
|
+
Ellipsis: Object.freeze({ kind: "Ellipsis" }),
|
|
11
|
+
Dash: Object.freeze({ kind: "Dash" }),
|
|
12
|
+
Other: Object.freeze({ kind: "Other" })
|
|
13
|
+
});
|
|
14
|
+
export function comparePunctuationClass(a, b) {
|
|
15
|
+
if (a === b)
|
|
16
|
+
return 0;
|
|
17
|
+
if (a.kind === "Opening")
|
|
18
|
+
return 0 - (b.kind === "Opening" ? 0 : 0);
|
|
19
|
+
if (a.kind === "Closing")
|
|
20
|
+
return 1 - (b.kind === "Closing" ? 1 : 0);
|
|
21
|
+
if (a.kind === "PauseOrStop")
|
|
22
|
+
return 2 - (b.kind === "PauseOrStop" ? 2 : 0);
|
|
23
|
+
if (a.kind === "MiddleDot")
|
|
24
|
+
return 3 - (b.kind === "MiddleDot" ? 3 : 0);
|
|
25
|
+
if (a.kind === "Interpunct")
|
|
26
|
+
return 4 - (b.kind === "Interpunct" ? 4 : 0);
|
|
27
|
+
if (a.kind === "Connector")
|
|
28
|
+
return 5 - (b.kind === "Connector" ? 5 : 0);
|
|
29
|
+
if (a.kind === "Solidus")
|
|
30
|
+
return 6 - (b.kind === "Solidus" ? 6 : 0);
|
|
31
|
+
if (a.kind === "Ellipsis")
|
|
32
|
+
return 7 - (b.kind === "Ellipsis" ? 7 : 0);
|
|
33
|
+
if (a.kind === "Dash")
|
|
34
|
+
return 8 - (b.kind === "Dash" ? 8 : 0);
|
|
35
|
+
if (a.kind === "Other")
|
|
36
|
+
return 9 - (b.kind === "Other" ? 9 : 0);
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface MainlandSimplified {
|
|
2
|
+
readonly kind: "MainlandSimplified";
|
|
3
|
+
}
|
|
4
|
+
export interface Traditional {
|
|
5
|
+
readonly kind: "Traditional";
|
|
6
|
+
}
|
|
7
|
+
export type PunctuationGluePlacement = MainlandSimplified | Traditional;
|
|
8
|
+
export declare const PunctuationGluePlacement: Readonly<{
|
|
9
|
+
MainlandSimplified: Readonly<MainlandSimplified>;
|
|
10
|
+
Traditional: Readonly<Traditional>;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function comparePunctuationGluePlacement(a: PunctuationGluePlacement, b: PunctuationGluePlacement): number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const PunctuationGluePlacement = Object.freeze({
|
|
3
|
+
MainlandSimplified: Object.freeze({ kind: "MainlandSimplified" }),
|
|
4
|
+
Traditional: Object.freeze({ kind: "Traditional" })
|
|
5
|
+
});
|
|
6
|
+
export function comparePunctuationGluePlacement(a, b) {
|
|
7
|
+
if (a === b)
|
|
8
|
+
return 0;
|
|
9
|
+
if (a.kind === "MainlandSimplified")
|
|
10
|
+
return 0 - (b.kind === "MainlandSimplified" ? 0 : 0);
|
|
11
|
+
if (a.kind === "Traditional")
|
|
12
|
+
return 1 - (b.kind === "Traditional" ? 1 : 0);
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ClreqRegion } from "./ClreqRegion.js";
|
|
2
|
+
import { GlueSide } from "./GlueSide.js";
|
|
3
|
+
import { type PunctuationClass } from "./PunctuationClass.js";
|
|
4
|
+
import { PunctuationGluePlacement } from "./PunctuationGluePlacement.js";
|
|
5
|
+
export declare class PunctuationGluePlacements {
|
|
6
|
+
static forRegion(region: ClreqRegion): PunctuationGluePlacement;
|
|
7
|
+
static glueSideFor(placement: PunctuationGluePlacement, punctuationClass: PunctuationClass): GlueSide;
|
|
8
|
+
private static mainlandGlueSide;
|
|
9
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { GlueSide } from "./GlueSide.js";
|
|
3
|
+
import { PunctuationGluePlacement } from "./PunctuationGluePlacement.js";
|
|
4
|
+
export class PunctuationGluePlacements {
|
|
5
|
+
static forRegion(region) {
|
|
6
|
+
switch (region.kind) {
|
|
7
|
+
case "Mainland":
|
|
8
|
+
return PunctuationGluePlacement.MainlandSimplified;
|
|
9
|
+
case "Taiwan":
|
|
10
|
+
return PunctuationGluePlacement.Traditional;
|
|
11
|
+
case "HongKong":
|
|
12
|
+
return PunctuationGluePlacement.Traditional;
|
|
13
|
+
case "Custom":
|
|
14
|
+
return PunctuationGluePlacement.MainlandSimplified;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
static glueSideFor(placement, punctuationClass) {
|
|
18
|
+
switch (placement.kind) {
|
|
19
|
+
case "MainlandSimplified":
|
|
20
|
+
return PunctuationGluePlacements.mainlandGlueSide(punctuationClass);
|
|
21
|
+
case "Traditional":
|
|
22
|
+
return GlueSide.BothSides;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
static mainlandGlueSide(punctuationClass) {
|
|
26
|
+
switch (punctuationClass.kind) {
|
|
27
|
+
case "Opening":
|
|
28
|
+
return GlueSide.LeadingOnly;
|
|
29
|
+
case "Closing":
|
|
30
|
+
return GlueSide.TrailingOnly;
|
|
31
|
+
case "PauseOrStop":
|
|
32
|
+
return GlueSide.TrailingOnly;
|
|
33
|
+
case "MiddleDot":
|
|
34
|
+
return GlueSide.BothSides;
|
|
35
|
+
case "Interpunct":
|
|
36
|
+
return GlueSide.BothSides;
|
|
37
|
+
case "Connector":
|
|
38
|
+
return GlueSide.BothSides;
|
|
39
|
+
case "Solidus":
|
|
40
|
+
return GlueSide.BothSides;
|
|
41
|
+
case "Ellipsis":
|
|
42
|
+
return GlueSide.BothSides;
|
|
43
|
+
case "Dash":
|
|
44
|
+
return GlueSide.BothSides;
|
|
45
|
+
case "Other":
|
|
46
|
+
return GlueSide.BothSides;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InteriorPunctuationStyle } from "./InteriorPunctuationStyle.js";
|
|
2
|
+
export declare class PunctuationWidthPolicy {
|
|
3
|
+
readonly interior: InteriorPunctuationStyle;
|
|
4
|
+
readonly gbFixedSeparators: boolean;
|
|
5
|
+
constructor(interior?: InteriorPunctuationStyle | null, gbFixedSeparators?: boolean | null);
|
|
6
|
+
toString(): string;
|
|
7
|
+
static samePolicy(a: PunctuationWidthPolicy, b: PunctuationWidthPolicy): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { InteriorPunctuationStyle } from "./InteriorPunctuationStyle.js";
|
|
3
|
+
export class PunctuationWidthPolicy {
|
|
4
|
+
interior;
|
|
5
|
+
gbFixedSeparators;
|
|
6
|
+
constructor(interior = null, gbFixedSeparators = null) {
|
|
7
|
+
this.interior = interior ?? InteriorPunctuationStyle.FullWidth;
|
|
8
|
+
this.gbFixedSeparators = gbFixedSeparators ?? false;
|
|
9
|
+
}
|
|
10
|
+
toString() {
|
|
11
|
+
return `PunctuationWidthPolicy(interior=${this.interior.kind}, gbFixedSeparators=${this.gbFixedSeparators})`;
|
|
12
|
+
}
|
|
13
|
+
static samePolicy(a, b) {
|
|
14
|
+
return a.interior === b.interior && a.gbFixedSeparators === b.gbFixedSeparators;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type HangingPunctuationStyle } from "./HangingPunctuationStyle.js";
|
|
2
|
+
import { type KinsokuLevel } from "./KinsokuLevel.js";
|
|
3
|
+
export declare class ResolvedKinsoku {
|
|
4
|
+
readonly level: KinsokuLevel;
|
|
5
|
+
readonly hanging: HangingPunctuationStyle;
|
|
6
|
+
readonly reason: string;
|
|
7
|
+
constructor(level: KinsokuLevel, hanging: HangingPunctuationStyle, reason: string);
|
|
8
|
+
toString(): string;
|
|
9
|
+
}
|
|
10
|
+
export declare function ResolvedKinsokulevelOrder(v: KinsokuLevel): number;
|
|
11
|
+
export declare function ResolvedKinsokuhangingOrder(v: HangingPunctuationStyle): number;
|
|
12
|
+
export declare function compareResolvedKinsoku(a: ResolvedKinsoku, b: ResolvedKinsoku): number;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export class ResolvedKinsoku {
|
|
3
|
+
level;
|
|
4
|
+
hanging;
|
|
5
|
+
reason;
|
|
6
|
+
constructor(level, hanging, reason) {
|
|
7
|
+
this.level = level;
|
|
8
|
+
this.hanging = hanging;
|
|
9
|
+
this.reason = reason;
|
|
10
|
+
}
|
|
11
|
+
toString() {
|
|
12
|
+
return `ResolvedKinsoku(level=${this.level.kind}, hanging=${this.hanging.kind}, reason=${this.reason})`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export function ResolvedKinsokulevelOrder(v) {
|
|
16
|
+
if (v.kind === "None")
|
|
17
|
+
return 0;
|
|
18
|
+
if (v.kind === "Basic")
|
|
19
|
+
return 1;
|
|
20
|
+
if (v.kind === "GbStyle")
|
|
21
|
+
return 2;
|
|
22
|
+
if (v.kind === "Strict")
|
|
23
|
+
return 3;
|
|
24
|
+
return 0;
|
|
25
|
+
}
|
|
26
|
+
export function ResolvedKinsokuhangingOrder(v) {
|
|
27
|
+
if (v.kind === "Disabled")
|
|
28
|
+
return 0;
|
|
29
|
+
if (v.kind === "PauseStops")
|
|
30
|
+
return 1;
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
33
|
+
export function compareResolvedKinsoku(a, b) {
|
|
34
|
+
if (a === b)
|
|
35
|
+
return 0;
|
|
36
|
+
if (ResolvedKinsokulevelOrder(a.level) !== ResolvedKinsokulevelOrder(b.level))
|
|
37
|
+
return ResolvedKinsokulevelOrder(a.level) - ResolvedKinsokulevelOrder(b.level);
|
|
38
|
+
if (ResolvedKinsokuhangingOrder(a.hanging) !== ResolvedKinsokuhangingOrder(b.hanging))
|
|
39
|
+
return ResolvedKinsokuhangingOrder(a.hanging) - ResolvedKinsokuhangingOrder(b.hanging);
|
|
40
|
+
if (a.reason !== b.reason)
|
|
41
|
+
return a.reason < b.reason ? -1 : 1;
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type TextRange } from "./TextRange.js";
|
|
2
|
+
export declare class Cluster {
|
|
3
|
+
readonly range: TextRange;
|
|
4
|
+
readonly text: string;
|
|
5
|
+
readonly displayText: string;
|
|
6
|
+
readonly fontKey: string;
|
|
7
|
+
readonly advance: number;
|
|
8
|
+
readonly baselineShift: number;
|
|
9
|
+
readonly leadingLayoutAdvance: number;
|
|
10
|
+
readonly glyphInlineShift: number;
|
|
11
|
+
constructor(range: TextRange, text: string, fontKey: string, advance: number, displayText?: string | null, baselineShift?: number | null, leadingLayoutAdvance?: number | null, glyphInlineShift?: number | null);
|
|
12
|
+
toString(): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export class Cluster {
|
|
3
|
+
range;
|
|
4
|
+
text;
|
|
5
|
+
displayText;
|
|
6
|
+
fontKey;
|
|
7
|
+
advance;
|
|
8
|
+
baselineShift;
|
|
9
|
+
leadingLayoutAdvance;
|
|
10
|
+
glyphInlineShift;
|
|
11
|
+
constructor(range, text, fontKey, advance, displayText = null, baselineShift = null, leadingLayoutAdvance = null, glyphInlineShift = null) {
|
|
12
|
+
this.range = range;
|
|
13
|
+
this.text = text;
|
|
14
|
+
this.displayText = displayText ?? text;
|
|
15
|
+
this.fontKey = fontKey;
|
|
16
|
+
this.advance = advance;
|
|
17
|
+
this.baselineShift = baselineShift ?? 0.0;
|
|
18
|
+
this.leadingLayoutAdvance = leadingLayoutAdvance ?? 0.0;
|
|
19
|
+
this.glyphInlineShift = glyphInlineShift ?? 0.0;
|
|
20
|
+
}
|
|
21
|
+
toString() {
|
|
22
|
+
return `Cluster(range=${this.range.toString()}, text=${this.text}, displayText=${this.displayText}, fontKey=${this.fontKey}, advance=${this.advance}, baselineShift=${this.baselineShift}, leadingLayoutAdvance=${this.leadingLayoutAdvance}, glyphInlineShift=${this.glyphInlineShift})`;
|
|
23
|
+
}
|
|
24
|
+
}
|