@tiqian/engine 0.0.1 → 0.1.0-alpha.10
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/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/BopomofoParser.d.ts +10 -0
- package/dist/org/tiqian/clreq/BopomofoParser.js +46 -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/CjkPunctuationGlyphSubstitution.d.ts +8 -0
- package/dist/org/tiqian/clreq/CjkPunctuationGlyphSubstitution.js +25 -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/ClreqProfileResolver.d.ts +10 -0
- package/dist/org/tiqian/clreq/ClreqProfileResolver.js +13 -0
- package/dist/org/tiqian/clreq/ClreqPunctuationAdvancePolicy.d.ts +7 -0
- package/dist/org/tiqian/clreq/ClreqPunctuationAdvancePolicy.js +40 -0
- package/dist/org/tiqian/clreq/ClreqPunctuationGlyphSubstitutor.d.ts +19 -0
- package/dist/org/tiqian/clreq/ClreqPunctuationGlyphSubstitutor.js +93 -0
- package/dist/org/tiqian/clreq/ClreqPunctuationPolicies.d.ts +26 -0
- package/dist/org/tiqian/clreq/ClreqPunctuationPolicies.js +137 -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/NumberSymbolCohesion.d.ts +8 -0
- package/dist/org/tiqian/clreq/NumberSymbolCohesion.js +56 -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/PunctuationPolicy.d.ts +10 -0
- package/dist/org/tiqian/clreq/PunctuationPolicy.js +18 -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/AccurateSum.d.ts +3 -0
- package/dist/org/tiqian/core/AccurateSum.js +9 -0
- package/dist/org/tiqian/core/AutoSpaceDecisionInfo.d.ts +13 -0
- package/dist/org/tiqian/core/AutoSpaceDecisionInfo.js +24 -0
- package/dist/org/tiqian/core/BopomofoDecisionInfo.d.ts +13 -0
- package/dist/org/tiqian/core/BopomofoDecisionInfo.js +32 -0
- package/dist/org/tiqian/core/BopomofoGlyphPlacement.d.ts +16 -0
- package/dist/org/tiqian/core/BopomofoGlyphPlacement.js +33 -0
- package/dist/org/tiqian/core/BopomofoGlyphRole.d.ts +16 -0
- package/dist/org/tiqian/core/BopomofoGlyphRole.js +17 -0
- package/dist/org/tiqian/core/BreakOpportunityDecisionInfo.d.ts +11 -0
- package/dist/org/tiqian/core/BreakOpportunityDecisionInfo.js +52 -0
- package/dist/org/tiqian/core/BuiltInLayoutProfiles.d.ts +4 -0
- package/dist/org/tiqian/core/BuiltInLayoutProfiles.js +5 -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/ClusterGeometryDecisionInfo.d.ts +21 -0
- package/dist/org/tiqian/core/ClusterGeometryDecisionInfo.js +40 -0
- package/dist/org/tiqian/core/ColorSpan.d.ts +8 -0
- package/dist/org/tiqian/core/ColorSpan.js +25 -0
- package/dist/org/tiqian/core/ContextualKinsokuDecisionInfo.d.ts +12 -0
- package/dist/org/tiqian/core/ContextualKinsokuDecisionInfo.js +47 -0
- package/dist/org/tiqian/core/DecorationDecisionInfo.d.ts +13 -0
- package/dist/org/tiqian/core/DecorationDecisionInfo.js +24 -0
- package/dist/org/tiqian/core/DecorationKind.d.ts +20 -0
- package/dist/org/tiqian/core/DecorationKind.js +20 -0
- package/dist/org/tiqian/core/DecorationSegmentInfo.d.ts +15 -0
- package/dist/org/tiqian/core/DecorationSegmentInfo.js +28 -0
- package/dist/org/tiqian/core/DecorationSpan.d.ts +10 -0
- package/dist/org/tiqian/core/DecorationSpan.js +36 -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/EmergencyTrackingEligibilityDecisionInfo.d.ts +9 -0
- package/dist/org/tiqian/core/EmergencyTrackingEligibilityDecisionInfo.js +29 -0
- package/dist/org/tiqian/core/FirstLineIndentDecisionInfo.d.ts +8 -0
- package/dist/org/tiqian/core/FirstLineIndentDecisionInfo.js +16 -0
- package/dist/org/tiqian/core/FittedLinePatternGeometry.d.ts +2 -0
- package/dist/org/tiqian/core/FittedLinePatternGeometry.js +84 -0
- package/dist/org/tiqian/core/FontDecisionInfo.d.ts +13 -0
- package/dist/org/tiqian/core/FontDecisionInfo.js +45 -0
- package/dist/org/tiqian/core/Glyph.d.ts +15 -0
- package/dist/org/tiqian/core/Glyph.js +30 -0
- package/dist/org/tiqian/core/GlyphRun.d.ts +11 -0
- package/dist/org/tiqian/core/GlyphRun.js +28 -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/InlineAttachment.d.ts +12 -0
- package/dist/org/tiqian/core/InlineAttachment.js +14 -0
- package/dist/org/tiqian/core/InlineBoxDecisionInfo.d.ts +12 -0
- package/dist/org/tiqian/core/InlineBoxDecisionInfo.js +22 -0
- package/dist/org/tiqian/core/InlineBoxOuterSpacing.d.ts +12 -0
- package/dist/org/tiqian/core/InlineBoxOuterSpacing.js +14 -0
- package/dist/org/tiqian/core/InlineBoxSpan.d.ts +10 -0
- package/dist/org/tiqian/core/InlineBoxSpan.js +17 -0
- package/dist/org/tiqian/core/InlineObjectBoundaryAdjustment.d.ts +12 -0
- package/dist/org/tiqian/core/InlineObjectBoundaryAdjustment.js +31 -0
- package/dist/org/tiqian/core/InlineObjectDecisionInfo.d.ts +28 -0
- package/dist/org/tiqian/core/InlineObjectDecisionInfo.js +54 -0
- package/dist/org/tiqian/core/InlineObjectLineHeightDecisionInfo.d.ts +16 -0
- package/dist/org/tiqian/core/InlineObjectLineHeightDecisionInfo.js +57 -0
- package/dist/org/tiqian/core/InlineObjectPreferredStretch.d.ts +11 -0
- package/dist/org/tiqian/core/InlineObjectPreferredStretch.js +30 -0
- package/dist/org/tiqian/core/InlineObjectPreferredStretchKind.d.ts +16 -0
- package/dist/org/tiqian/core/InlineObjectPreferredStretchKind.js +17 -0
- package/dist/org/tiqian/core/InlineObjectPunctuationAttachmentDecisionInfo.d.ts +12 -0
- package/dist/org/tiqian/core/InlineObjectPunctuationAttachmentDecisionInfo.js +22 -0
- package/dist/org/tiqian/core/InlineObjectSpan.d.ts +13 -0
- package/dist/org/tiqian/core/InlineObjectSpan.js +22 -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/IntRangeFns.d.ts +2 -0
- package/dist/org/tiqian/core/IntRangeFns.js +4 -0
- package/dist/org/tiqian/core/JustificationAllocationInfo.d.ts +10 -0
- package/dist/org/tiqian/core/JustificationAllocationInfo.js +18 -0
- package/dist/org/tiqian/core/JustificationDecisionInfo.d.ts +10 -0
- package/dist/org/tiqian/core/JustificationDecisionInfo.js +21 -0
- package/dist/org/tiqian/core/KinsokuDecisionInfo.d.ts +8 -0
- package/dist/org/tiqian/core/KinsokuDecisionInfo.js +16 -0
- package/dist/org/tiqian/core/LastLineAlignment.d.ts +16 -0
- package/dist/org/tiqian/core/LastLineAlignment.js +17 -0
- package/dist/org/tiqian/core/LayoutConstraints.d.ts +7 -0
- package/dist/org/tiqian/core/LayoutConstraints.js +24 -0
- package/dist/org/tiqian/core/LayoutDebugInfo.d.ts +70 -0
- package/dist/org/tiqian/core/LayoutDebugInfo.js +205 -0
- package/dist/org/tiqian/core/LayoutInput.d.ts +22 -0
- package/dist/org/tiqian/core/LayoutInput.js +56 -0
- package/dist/org/tiqian/core/LayoutPaintBounds.d.ts +18 -0
- package/dist/org/tiqian/core/LayoutPaintBounds.js +131 -0
- package/dist/org/tiqian/core/LayoutProfileId.d.ts +6 -0
- package/dist/org/tiqian/core/LayoutProfileId.js +17 -0
- package/dist/org/tiqian/core/LayoutQueries.d.ts +121 -0
- package/dist/org/tiqian/core/LayoutQueries.js +1297 -0
- package/dist/org/tiqian/core/LayoutQueryFns.d.ts +27 -0
- package/dist/org/tiqian/core/LayoutQueryFns.js +65 -0
- package/dist/org/tiqian/core/LayoutResult.d.ts +16 -0
- package/dist/org/tiqian/core/LayoutResult.js +36 -0
- package/dist/org/tiqian/core/LayoutResultFns.d.ts +3 -0
- package/dist/org/tiqian/core/LayoutResultFns.js +5 -0
- package/dist/org/tiqian/core/LayoutResultLineFns.d.ts +4 -0
- package/dist/org/tiqian/core/LayoutResultLineFns.js +5 -0
- package/dist/org/tiqian/core/LayoutResultReplayIndex.d.ts +37 -0
- package/dist/org/tiqian/core/LayoutResultReplayIndex.js +379 -0
- package/dist/org/tiqian/core/LineBox.d.ts +23 -0
- package/dist/org/tiqian/core/LineBox.js +43 -0
- package/dist/org/tiqian/core/LineBreakPolicy.d.ts +8 -0
- package/dist/org/tiqian/core/LineBreakPolicy.js +11 -0
- package/dist/org/tiqian/core/LineBreakSpan.d.ts +10 -0
- package/dist/org/tiqian/core/LineBreakSpan.js +30 -0
- package/dist/org/tiqian/core/LineDebugInfo.d.ts +7 -0
- package/dist/org/tiqian/core/LineDebugInfo.js +18 -0
- package/dist/org/tiqian/core/LineDecisionInfo.d.ts +14 -0
- package/dist/org/tiqian/core/LineDecisionInfo.js +32 -0
- package/dist/org/tiqian/core/LineEdgeTrimDecisionInfo.d.ts +12 -0
- package/dist/org/tiqian/core/LineEdgeTrimDecisionInfo.js +22 -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/LineLengthGrid.d.ts +7 -0
- package/dist/org/tiqian/core/LineLengthGrid.js +12 -0
- package/dist/org/tiqian/core/LineLengthGridDecisionInfo.d.ts +13 -0
- package/dist/org/tiqian/core/LineLengthGridDecisionInfo.js +26 -0
- package/dist/org/tiqian/core/LineRepairAllocationInfo.d.ts +8 -0
- package/dist/org/tiqian/core/LineRepairAllocationInfo.js +14 -0
- package/dist/org/tiqian/core/LineRepairCandidateInfo.d.ts +16 -0
- package/dist/org/tiqian/core/LineRepairCandidateInfo.js +30 -0
- package/dist/org/tiqian/core/LineRepairDecisionInfo.d.ts +15 -0
- package/dist/org/tiqian/core/LineRepairDecisionInfo.js +31 -0
- package/dist/org/tiqian/core/LineSpacingDecisionInfo.d.ts +10 -0
- package/dist/org/tiqian/core/LineSpacingDecisionInfo.js +20 -0
- package/dist/org/tiqian/core/LinkAddressDisplay.d.ts +3 -0
- package/dist/org/tiqian/core/LinkAddressDisplay.js +12 -0
- package/dist/org/tiqian/core/MandatoryBreakDecisionInfo.d.ts +10 -0
- package/dist/org/tiqian/core/MandatoryBreakDecisionInfo.js +33 -0
- package/dist/org/tiqian/core/MaxLinesDecisionInfo.d.ts +8 -0
- package/dist/org/tiqian/core/MaxLinesDecisionInfo.js +25 -0
- package/dist/org/tiqian/core/MeasureAdaptiveFirstLineIndent.d.ts +8 -0
- package/dist/org/tiqian/core/MeasureAdaptiveFirstLineIndent.js +17 -0
- package/dist/org/tiqian/core/MetricDecisionInfo.d.ts +19 -0
- package/dist/org/tiqian/core/MetricDecisionInfo.js +36 -0
- package/dist/org/tiqian/core/ParagraphStyle.d.ts +22 -0
- package/dist/org/tiqian/core/ParagraphStyle.js +36 -0
- package/dist/org/tiqian/core/PositionedCluster.d.ts +22 -0
- package/dist/org/tiqian/core/PositionedCluster.js +52 -0
- package/dist/org/tiqian/core/PunctuationDecisionInfo.d.ts +29 -0
- package/dist/org/tiqian/core/PunctuationDecisionInfo.js +54 -0
- package/dist/org/tiqian/core/Rect.d.ts +12 -0
- package/dist/org/tiqian/core/Rect.js +28 -0
- package/dist/org/tiqian/core/RichTextBackgroundDrawStyle.d.ts +15 -0
- package/dist/org/tiqian/core/RichTextBackgroundDrawStyle.js +25 -0
- package/dist/org/tiqian/core/RichTextBackgroundMetricPolicy.d.ts +16 -0
- package/dist/org/tiqian/core/RichTextBackgroundMetricPolicy.js +17 -0
- package/dist/org/tiqian/core/RichTextBackgroundPaint.d.ts +19 -0
- package/dist/org/tiqian/core/RichTextBackgroundPaint.js +51 -0
- package/dist/org/tiqian/core/RichTextCornerRadii.d.ts +12 -0
- package/dist/org/tiqian/core/RichTextCornerRadii.js +28 -0
- package/dist/org/tiqian/core/RichTextLayoutProjection.d.ts +6 -0
- package/dist/org/tiqian/core/RichTextLayoutProjection.js +62 -0
- package/dist/org/tiqian/core/RichTextLinePattern.d.ts +24 -0
- package/dist/org/tiqian/core/RichTextLinePattern.js +46 -0
- package/dist/org/tiqian/core/RichTextLineSegment.d.ts +25 -0
- package/dist/org/tiqian/core/RichTextLineSegment.js +55 -0
- package/dist/org/tiqian/core/RichTextPaint.d.ts +17 -0
- package/dist/org/tiqian/core/RichTextPaint.js +64 -0
- package/dist/org/tiqian/core/RichTextProjectionFns.d.ts +7 -0
- package/dist/org/tiqian/core/RichTextProjectionFns.js +102 -0
- package/dist/org/tiqian/core/RichTextRole.d.ts +35 -0
- package/dist/org/tiqian/core/RichTextRole.js +57 -0
- package/dist/org/tiqian/core/RichTextSpan.d.ts +11 -0
- package/dist/org/tiqian/core/RichTextSpan.js +34 -0
- package/dist/org/tiqian/core/RoleOverrideInfo.d.ts +12 -0
- package/dist/org/tiqian/core/RoleOverrideInfo.js +41 -0
- package/dist/org/tiqian/core/RubyDecisionInfo.d.ts +20 -0
- package/dist/org/tiqian/core/RubyDecisionInfo.js +46 -0
- package/dist/org/tiqian/core/RubyKind.d.ts +12 -0
- package/dist/org/tiqian/core/RubyKind.js +14 -0
- package/dist/org/tiqian/core/RubyLineHeightDecisionInfo.d.ts +13 -0
- package/dist/org/tiqian/core/RubyLineHeightDecisionInfo.js +36 -0
- package/dist/org/tiqian/core/RubyLineHeightMode.d.ts +12 -0
- package/dist/org/tiqian/core/RubyLineHeightMode.js +14 -0
- package/dist/org/tiqian/core/RubySpan.d.ts +13 -0
- package/dist/org/tiqian/core/RubySpan.js +60 -0
- package/dist/org/tiqian/core/ShapingDecisionInfo.d.ts +21 -0
- package/dist/org/tiqian/core/ShapingDecisionInfo.js +40 -0
- package/dist/org/tiqian/core/Size.d.ts +6 -0
- package/dist/org/tiqian/core/Size.js +12 -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/SpacingDecisionInfo.d.ts +13 -0
- package/dist/org/tiqian/core/SpacingDecisionInfo.js +24 -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/TextSpan.d.ts +8 -0
- package/dist/org/tiqian/core/TextSpan.js +12 -0
- package/dist/org/tiqian/core/TextStyle.d.ts +12 -0
- package/dist/org/tiqian/core/TextStyle.js +28 -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/TiqianTextContent.d.ts +12 -0
- package/dist/org/tiqian/core/TiqianTextContent.js +38 -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/core/Units.d.ts +7 -0
- package/dist/org/tiqian/core/Units.js +11 -0
- package/dist/org/tiqian/core/WritingMode.d.ts +12 -0
- package/dist/org/tiqian/core/WritingMode.js +14 -0
- package/dist/org/tiqian/core/ZeroWidthBreakDecisionInfo.d.ts +10 -0
- package/dist/org/tiqian/core/ZeroWidthBreakDecisionInfo.js +33 -0
- package/dist/org/tiqian/font/BaselineClass.d.ts +24 -0
- package/dist/org/tiqian/font/BaselineClass.js +23 -0
- package/dist/org/tiqian/font/BaselinePolicy.d.ts +17 -0
- package/dist/org/tiqian/font/BaselinePolicy.js +18 -0
- package/dist/org/tiqian/font/CjkDashCapabilityPolicy.d.ts +4 -0
- package/dist/org/tiqian/font/CjkDashCapabilityPolicy.js +9 -0
- package/dist/org/tiqian/font/CjkFontRoleClassifier.d.ts +8 -0
- package/dist/org/tiqian/font/CjkFontRoleClassifier.js +43 -0
- package/dist/org/tiqian/font/FontMetricSource.d.ts +24 -0
- package/dist/org/tiqian/font/FontMetricSource.js +23 -0
- package/dist/org/tiqian/font/FontMetrics.d.ts +39 -0
- package/dist/org/tiqian/font/FontMetrics.js +106 -0
- package/dist/org/tiqian/font/FontMetricsPolicy.d.ts +21 -0
- package/dist/org/tiqian/font/FontMetricsPolicy.js +21 -0
- package/dist/org/tiqian/font/FontPolicy.d.ts +36 -0
- package/dist/org/tiqian/font/FontPolicy.js +157 -0
- package/dist/org/tiqian/font/FontRole.d.ts +29 -0
- package/dist/org/tiqian/font/FontRole.js +27 -0
- package/dist/org/tiqian/font/FontRoleContext.d.ts +13 -0
- package/dist/org/tiqian/font/FontRoleContext.js +28 -0
- package/dist/org/tiqian/font/InlineShapingStylePolicy.d.ts +4 -0
- package/dist/org/tiqian/font/InlineShapingStylePolicy.js +18 -0
- package/dist/org/tiqian/font/LayoutFontMetrics.d.ts +18 -0
- package/dist/org/tiqian/font/LayoutFontMetrics.js +29 -0
- package/dist/org/tiqian/font/MetricBox.d.ts +20 -0
- package/dist/org/tiqian/font/MetricBox.js +20 -0
- package/dist/org/tiqian/font/PreferCjkForAmbiguousPunctuationResolver.d.ts +10 -0
- package/dist/org/tiqian/font/PreferCjkForAmbiguousPunctuationResolver.js +30 -0
- package/dist/org/tiqian/font/PunctuationFontPolicy.d.ts +21 -0
- package/dist/org/tiqian/font/PunctuationFontPolicy.js +21 -0
- package/dist/org/tiqian/font/RawFontMetrics.d.ts +11 -0
- package/dist/org/tiqian/font/RawFontMetrics.js +23 -0
- package/dist/org/tiqian/font/UnicodeEmojiData.d.ts +3 -0
- package/dist/org/tiqian/font/UnicodeEmojiData.js +63 -0
- package/dist/org/tiqian/font/UnicodeEmojiPresentationData.d.ts +3 -0
- package/dist/org/tiqian/font/UnicodeEmojiPresentationData.js +46 -0
- package/dist/org/tiqian/font/UnicodeEmojiStyleVariationData.d.ts +3 -0
- package/dist/org/tiqian/font/UnicodeEmojiStyleVariationData.js +71 -0
- package/dist/org/tiqian/font/UnicodeSymbolData.d.ts +3 -0
- package/dist/org/tiqian/font/UnicodeSymbolData.js +88 -0
- package/dist/org/tiqian/layout/AnnotationGeometryStage.d.ts +57 -0
- package/dist/org/tiqian/layout/AnnotationGeometryStage.js +622 -0
- package/dist/org/tiqian/layout/AsciiPointMarkKinsokuTestSupport.d.ts +52 -0
- package/dist/org/tiqian/layout/AsciiPointMarkKinsokuTestSupport.js +209 -0
- package/dist/org/tiqian/layout/ClusterRoleResolution.d.ts +30 -0
- package/dist/org/tiqian/layout/ClusterRoleResolution.js +215 -0
- package/dist/org/tiqian/layout/ContextualDashEllipsisRoleResolver.d.ts +54 -0
- package/dist/org/tiqian/layout/ContextualDashEllipsisRoleResolver.js +326 -0
- package/dist/org/tiqian/layout/ContextualPunctuationDisplaySubstitution.d.ts +6 -0
- package/dist/org/tiqian/layout/ContextualPunctuationDisplaySubstitution.js +8 -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/DefaultHyphenator.d.ts +4 -0
- package/dist/org/tiqian/layout/DefaultHyphenator.js +7 -0
- package/dist/org/tiqian/layout/Justifier.d.ts +64 -0
- package/dist/org/tiqian/layout/Justifier.js +474 -0
- package/dist/org/tiqian/layout/KinsokuRule.d.ts +15 -0
- package/dist/org/tiqian/layout/KinsokuRule.js +24 -0
- package/dist/org/tiqian/layout/LayoutDebugAssembly.d.ts +87 -0
- package/dist/org/tiqian/layout/LayoutDebugAssembly.js +371 -0
- package/dist/org/tiqian/layout/LineAdjustmentStage.d.ts +29 -0
- package/dist/org/tiqian/layout/LineAdjustmentStage.js +797 -0
- package/dist/org/tiqian/layout/LineBreakPlanningStage.d.ts +149 -0
- package/dist/org/tiqian/layout/LineBreakPlanningStage.js +769 -0
- package/dist/org/tiqian/layout/LineBreaker.d.ts +54 -0
- package/dist/org/tiqian/layout/LineBreaker.js +457 -0
- package/dist/org/tiqian/layout/LineGeometryStage.d.ts +63 -0
- package/dist/org/tiqian/layout/LineGeometryStage.js +344 -0
- package/dist/org/tiqian/layout/LineOptimization.d.ts +125 -0
- package/dist/org/tiqian/layout/LineOptimization.js +299 -0
- package/dist/org/tiqian/layout/LineRepair.d.ts +30 -0
- package/dist/org/tiqian/layout/LineRepair.js +471 -0
- package/dist/org/tiqian/layout/ParagraphDpLineBreaker.d.ts +80 -0
- package/dist/org/tiqian/layout/ParagraphDpLineBreaker.js +556 -0
- package/dist/org/tiqian/layout/ParagraphDpLineBreakerTestSupport.d.ts +23 -0
- package/dist/org/tiqian/layout/ParagraphDpLineBreakerTestSupport.js +135 -0
- package/dist/org/tiqian/layout/ParagraphLayoutEngine.d.ts +48 -0
- package/dist/org/tiqian/layout/ParagraphLayoutEngine.js +199 -0
- package/dist/org/tiqian/layout/ParagraphShapingStage.d.ts +63 -0
- package/dist/org/tiqian/layout/ParagraphShapingStage.js +1471 -0
- package/dist/org/tiqian/layout/PlanLowering.d.ts +10 -0
- package/dist/org/tiqian/layout/PlanLowering.js +329 -0
- package/dist/org/tiqian/layout/PreparedParagraph.d.ts +32 -0
- package/dist/org/tiqian/layout/PreparedParagraph.js +114 -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/PunctuationGeometryLedger.d.ts +92 -0
- package/dist/org/tiqian/layout/PunctuationGeometryLedger.js +617 -0
- package/dist/org/tiqian/layout/PunctuationGeometryStage.d.ts +73 -0
- package/dist/org/tiqian/layout/PunctuationGeometryStage.js +631 -0
- package/dist/org/tiqian/layout/PunctuationModel.d.ts +181 -0
- package/dist/org/tiqian/layout/PunctuationModel.js +414 -0
- package/dist/org/tiqian/layout/QuotePairAnalyzer.d.ts +63 -0
- package/dist/org/tiqian/layout/QuotePairAnalyzer.js +251 -0
- package/dist/org/tiqian/layout/UnicodePunctuationBoundaryResolver.d.ts +88 -0
- package/dist/org/tiqian/layout/UnicodePunctuationBoundaryResolver.js +495 -0
- package/dist/org/tiqian/layout/WidthIndependentAnnotationCache.d.ts +102 -0
- package/dist/org/tiqian/layout/WidthIndependentAnnotationCache.js +1207 -0
- package/dist/org/tiqian/linebreak/BreakKind.d.ts +20 -0
- package/dist/org/tiqian/linebreak/BreakKind.js +20 -0
- package/dist/org/tiqian/linebreak/BreakOpportunity.d.ts +19 -0
- package/dist/org/tiqian/linebreak/BreakOpportunity.js +64 -0
- package/dist/org/tiqian/linebreak/EnglishHyphenation.d.ts +5 -0
- package/dist/org/tiqian/linebreak/EnglishHyphenation.js +14 -0
- package/dist/org/tiqian/linebreak/EnglishHyphenationPatterns.d.ts +4 -0
- package/dist/org/tiqian/linebreak/EnglishHyphenationPatterns.js +4294 -0
- package/dist/org/tiqian/linebreak/Hyphenator.d.ts +17 -0
- package/dist/org/tiqian/linebreak/Hyphenator.js +24 -0
- package/dist/org/tiqian/linebreak/LiangHyphenator.d.ts +10 -0
- package/dist/org/tiqian/linebreak/LiangHyphenator.js +67 -0
- package/dist/org/tiqian/linebreak/LineBreakAnalyzer.d.ts +9 -0
- package/dist/org/tiqian/linebreak/LineBreakAnalyzer.js +23 -0
- package/dist/org/tiqian/linebreak/LineBreakFns.d.ts +2 -0
- package/dist/org/tiqian/linebreak/LineBreakFns.js +7 -0
- package/dist/org/tiqian/linebreak/ParseTexHyphenationPatterns.d.ts +7 -0
- package/dist/org/tiqian/linebreak/ParseTexHyphenationPatterns.js +108 -0
- package/dist/org/tiqian/linebreak/ParsedTexHyphenation.d.ts +6 -0
- package/dist/org/tiqian/linebreak/ParsedTexHyphenation.js +9 -0
- package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreak.d.ts +63 -0
- package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreak.js +103 -0
- package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreakData.d.ts +3 -0
- package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreakData.js +164 -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/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/PlanJson.d.ts +10 -0
- package/dist/org/tiqian/protocol/PlanJson.js +442 -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/PlanPacked.d.ts +34 -0
- package/dist/org/tiqian/protocol/PlanPacked.js +1166 -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/shaping/ReplayableFontBackend.d.ts +48 -0
- package/dist/org/tiqian/shaping/ReplayableFontBackend.js +97 -0
- package/dist/org/tiqian/shaping/TextShaper.d.ts +71 -0
- package/dist/org/tiqian/shaping/TextShaper.js +176 -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 +22 -4
- package/README.md +0 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { IntRange } from "./../core/IntRange.js";
|
|
3
|
+
import { UnicodeNumberData } from "./../core/UnicodeNumberData.js";
|
|
4
|
+
import { readUnit } from "../../../runtime.js";
|
|
5
|
+
export class NumberSymbolCohesion {
|
|
6
|
+
static unbreakableRanges(text) {
|
|
7
|
+
const result = [];
|
|
8
|
+
let i = 0;
|
|
9
|
+
while (i < text.length) {
|
|
10
|
+
if (!UnicodeNumberData.contains((Number.isNaN(text.charCodeAt(i)) ? null : text.charCodeAt(i)))) {
|
|
11
|
+
i += 1;
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
let end = i;
|
|
15
|
+
while (end + 1 < text.length) {
|
|
16
|
+
const unit = readUnit(text, end + 1);
|
|
17
|
+
if (UnicodeNumberData.contains(unit)) {
|
|
18
|
+
end += 1;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
if ((unit === 46 || unit === 44) && end + 2 < text.length && UnicodeNumberData.contains(readUnit(text, end + 2))) {
|
|
22
|
+
end += 2;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
let start = i;
|
|
30
|
+
if (start > 0 && (NumberSymbolCohesion.isPrefixSign(readUnit(text, start - 1)) || NumberSymbolCohesion.isFrontCurrency(readUnit(text, start - 1)))) {
|
|
31
|
+
start -= 1;
|
|
32
|
+
}
|
|
33
|
+
while (end + 1 < text.length && NumberSymbolCohesion.isSuffixUnit(readUnit(text, end + 1))) {
|
|
34
|
+
end += 1;
|
|
35
|
+
}
|
|
36
|
+
if (end + 1 < text.length && NumberSymbolCohesion.isBackCurrency(readUnit(text, end + 1))) {
|
|
37
|
+
end += 1;
|
|
38
|
+
}
|
|
39
|
+
result.push(new IntRange(start, end));
|
|
40
|
+
i = end + 1;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
static isPrefixSign(unit) {
|
|
45
|
+
return unit === 43 || unit === 45 || unit === 177;
|
|
46
|
+
}
|
|
47
|
+
static isSuffixUnit(unit) {
|
|
48
|
+
return unit === 37 || unit === 8240 || unit === 176 || unit === 8451 || unit === 8457 || unit === 8242 || unit === 8243;
|
|
49
|
+
}
|
|
50
|
+
static isFrontCurrency(unit) {
|
|
51
|
+
return unit === 165 || unit === 65509 || unit === 36 || unit === 65284 || unit === 8364 || unit === 163 || unit === 8361 || unit === 8381 || unit === 8377 || unit === 3647;
|
|
52
|
+
}
|
|
53
|
+
static isBackCurrency(unit) {
|
|
54
|
+
return unit === 8363;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -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,10 @@
|
|
|
1
|
+
import { type PunctuationClass } from "./PunctuationClass.js";
|
|
2
|
+
export declare class PunctuationPolicy {
|
|
3
|
+
readonly punctuationClass: PunctuationClass;
|
|
4
|
+
readonly allowAtLineStart: boolean;
|
|
5
|
+
readonly allowAtLineEnd: boolean;
|
|
6
|
+
readonly defaultBodyEm: number;
|
|
7
|
+
readonly defaultAdvanceEm: number;
|
|
8
|
+
constructor(punctuationClass: PunctuationClass, allowAtLineStart: boolean, allowAtLineEnd: boolean, defaultBodyEm: number, defaultAdvanceEm?: number | null);
|
|
9
|
+
toString(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export class PunctuationPolicy {
|
|
3
|
+
punctuationClass;
|
|
4
|
+
allowAtLineStart;
|
|
5
|
+
allowAtLineEnd;
|
|
6
|
+
defaultBodyEm;
|
|
7
|
+
defaultAdvanceEm;
|
|
8
|
+
constructor(punctuationClass, allowAtLineStart, allowAtLineEnd, defaultBodyEm, defaultAdvanceEm = null) {
|
|
9
|
+
this.punctuationClass = punctuationClass;
|
|
10
|
+
this.allowAtLineStart = allowAtLineStart;
|
|
11
|
+
this.allowAtLineEnd = allowAtLineEnd;
|
|
12
|
+
this.defaultBodyEm = defaultBodyEm;
|
|
13
|
+
this.defaultAdvanceEm = defaultAdvanceEm ?? 1.0;
|
|
14
|
+
}
|
|
15
|
+
toString() {
|
|
16
|
+
return `PunctuationPolicy(punctuationClass=${this.punctuationClass.kind}, allowAtLineStart=${this.allowAtLineStart}, allowAtLineEnd=${this.allowAtLineEnd}, defaultBodyEm=${this.defaultBodyEm}, defaultAdvanceEm=${this.defaultAdvanceEm})`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -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 AutoSpaceDecisionInfo {
|
|
3
|
+
readonly clusterRange: TextRange;
|
|
4
|
+
readonly side: string;
|
|
5
|
+
readonly boundaryRole: string;
|
|
6
|
+
readonly mode: string;
|
|
7
|
+
readonly charactersAffected: number;
|
|
8
|
+
readonly reductionPerChar: number;
|
|
9
|
+
readonly totalReduction: number;
|
|
10
|
+
readonly reason: string;
|
|
11
|
+
constructor(clusterRange: TextRange, side: string, boundaryRole: string, mode: string, charactersAffected: number, reductionPerChar: number, totalReduction: number, reason: string);
|
|
12
|
+
toString(): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export class AutoSpaceDecisionInfo {
|
|
3
|
+
clusterRange;
|
|
4
|
+
side;
|
|
5
|
+
boundaryRole;
|
|
6
|
+
mode;
|
|
7
|
+
charactersAffected;
|
|
8
|
+
reductionPerChar;
|
|
9
|
+
totalReduction;
|
|
10
|
+
reason;
|
|
11
|
+
constructor(clusterRange, side, boundaryRole, mode, charactersAffected, reductionPerChar, totalReduction, reason) {
|
|
12
|
+
this.clusterRange = clusterRange;
|
|
13
|
+
this.side = side;
|
|
14
|
+
this.boundaryRole = boundaryRole;
|
|
15
|
+
this.mode = mode;
|
|
16
|
+
this.charactersAffected = charactersAffected;
|
|
17
|
+
this.reductionPerChar = reductionPerChar;
|
|
18
|
+
this.totalReduction = totalReduction;
|
|
19
|
+
this.reason = reason;
|
|
20
|
+
}
|
|
21
|
+
toString() {
|
|
22
|
+
return `AutoSpaceDecisionInfo(clusterRange=${this.clusterRange.toString()}, side=${this.side}, boundaryRole=${this.boundaryRole}, mode=${this.mode}, charactersAffected=${this.charactersAffected}, reductionPerChar=${this.reductionPerChar}, totalReduction=${this.totalReduction}, reason=${this.reason})`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type BopomofoGlyphPlacement } from "./BopomofoGlyphPlacement.js";
|
|
2
|
+
import { type TextRange } from "./TextRange.js";
|
|
3
|
+
export declare class BopomofoDecisionInfo {
|
|
4
|
+
readonly baseRange: TextRange;
|
|
5
|
+
readonly text: string;
|
|
6
|
+
readonly lineIndex: number;
|
|
7
|
+
readonly placements: readonly BopomofoGlyphPlacement[];
|
|
8
|
+
readonly fontFamilies: readonly string[];
|
|
9
|
+
readonly fontWeight: number;
|
|
10
|
+
readonly locale: string;
|
|
11
|
+
constructor(baseRange: TextRange, text: string, lineIndex: number, placements: BopomofoGlyphPlacement[], fontFamilies?: string[] | null, fontWeight?: number | null, locale?: string | null);
|
|
12
|
+
toString(): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export class BopomofoDecisionInfo {
|
|
3
|
+
baseRange;
|
|
4
|
+
text;
|
|
5
|
+
lineIndex;
|
|
6
|
+
placements;
|
|
7
|
+
fontFamilies;
|
|
8
|
+
fontWeight;
|
|
9
|
+
locale;
|
|
10
|
+
constructor(baseRange, text, lineIndex, placements, fontFamilies = null, fontWeight = null, locale = null) {
|
|
11
|
+
this.baseRange = baseRange;
|
|
12
|
+
this.text = text;
|
|
13
|
+
this.lineIndex = lineIndex;
|
|
14
|
+
this.placements = placements;
|
|
15
|
+
this.fontFamilies = fontFamilies ?? [];
|
|
16
|
+
this.fontWeight = fontWeight ?? 400;
|
|
17
|
+
this.locale = locale ?? "zh-Hans";
|
|
18
|
+
}
|
|
19
|
+
toString() {
|
|
20
|
+
return `BopomofoDecisionInfo(baseRange=${this.baseRange.toString()}, text=${this.text}, lineIndex=${this.lineIndex}, placements=${(() => { let out = "["; const n = this.placements.length; for (let i = 0; i < n; i += 1) {
|
|
21
|
+
if (i > 0) {
|
|
22
|
+
out += ", ";
|
|
23
|
+
}
|
|
24
|
+
out += this.placements[i].toString();
|
|
25
|
+
} out += "]"; return out; })()}, fontFamilies=${(() => { let out = "["; const n = this.fontFamilies.length; for (let i = 0; i < n; i += 1) {
|
|
26
|
+
if (i > 0) {
|
|
27
|
+
out += ", ";
|
|
28
|
+
}
|
|
29
|
+
out += this.fontFamilies[i];
|
|
30
|
+
} out += "]"; return out; })()}, fontWeight=${this.fontWeight}, locale=${this.locale})`;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type BopomofoGlyphRole } from "./BopomofoGlyphRole.js";
|
|
2
|
+
import { type Glyph } from "./Glyph.js";
|
|
3
|
+
export declare class BopomofoGlyphPlacement {
|
|
4
|
+
readonly text: string;
|
|
5
|
+
readonly left: number;
|
|
6
|
+
readonly top: number;
|
|
7
|
+
readonly width: number;
|
|
8
|
+
readonly height: number;
|
|
9
|
+
readonly role: BopomofoGlyphRole;
|
|
10
|
+
readonly glyphs: readonly Glyph[];
|
|
11
|
+
readonly drawX: number;
|
|
12
|
+
readonly baselineY: number;
|
|
13
|
+
readonly fontSize: number;
|
|
14
|
+
constructor(text: string, left: number, top: number, width: number, height: number, role: BopomofoGlyphRole, glyphs: Glyph[] | null, drawX: number, baselineY: number, fontSize: number);
|
|
15
|
+
toString(): string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export class BopomofoGlyphPlacement {
|
|
3
|
+
text;
|
|
4
|
+
left;
|
|
5
|
+
top;
|
|
6
|
+
width;
|
|
7
|
+
height;
|
|
8
|
+
role;
|
|
9
|
+
glyphs;
|
|
10
|
+
drawX;
|
|
11
|
+
baselineY;
|
|
12
|
+
fontSize;
|
|
13
|
+
constructor(text, left, top, width, height, role, glyphs = null, drawX, baselineY, fontSize) {
|
|
14
|
+
this.text = text;
|
|
15
|
+
this.left = left;
|
|
16
|
+
this.top = top;
|
|
17
|
+
this.width = width;
|
|
18
|
+
this.height = height;
|
|
19
|
+
this.role = role;
|
|
20
|
+
this.glyphs = glyphs ?? [];
|
|
21
|
+
this.drawX = drawX;
|
|
22
|
+
this.baselineY = baselineY;
|
|
23
|
+
this.fontSize = fontSize;
|
|
24
|
+
}
|
|
25
|
+
toString() {
|
|
26
|
+
return `BopomofoGlyphPlacement(text=${this.text}, left=${this.left}, top=${this.top}, width=${this.width}, height=${this.height}, role=${this.role.kind}, glyphs=${(() => { let out = "["; const n = this.glyphs.length; for (let i = 0; i < n; i += 1) {
|
|
27
|
+
if (i > 0) {
|
|
28
|
+
out += ", ";
|
|
29
|
+
}
|
|
30
|
+
out += this.glyphs[i].toString();
|
|
31
|
+
} out += "]"; return out; })()}, drawX=${this.drawX}, baselineY=${this.baselineY}, fontSize=${this.fontSize})`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Symbol {
|
|
2
|
+
readonly kind: "Symbol";
|
|
3
|
+
}
|
|
4
|
+
export interface Tone {
|
|
5
|
+
readonly kind: "Tone";
|
|
6
|
+
}
|
|
7
|
+
export interface Neutral {
|
|
8
|
+
readonly kind: "Neutral";
|
|
9
|
+
}
|
|
10
|
+
export type BopomofoGlyphRole = Symbol | Tone | Neutral;
|
|
11
|
+
export declare const BopomofoGlyphRole: Readonly<{
|
|
12
|
+
Symbol: Readonly<Symbol>;
|
|
13
|
+
Tone: Readonly<Tone>;
|
|
14
|
+
Neutral: Readonly<Neutral>;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function compareBopomofoGlyphRole(a: BopomofoGlyphRole, b: BopomofoGlyphRole): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const BopomofoGlyphRole = Object.freeze({
|
|
3
|
+
Symbol: Object.freeze({ kind: "Symbol" }),
|
|
4
|
+
Tone: Object.freeze({ kind: "Tone" }),
|
|
5
|
+
Neutral: Object.freeze({ kind: "Neutral" })
|
|
6
|
+
});
|
|
7
|
+
export function compareBopomofoGlyphRole(a, b) {
|
|
8
|
+
if (a === b)
|
|
9
|
+
return 0;
|
|
10
|
+
if (a.kind === "Symbol")
|
|
11
|
+
return 0 - (b.kind === "Symbol" ? 0 : 0);
|
|
12
|
+
if (a.kind === "Tone")
|
|
13
|
+
return 1 - (b.kind === "Tone" ? 1 : 0);
|
|
14
|
+
if (a.kind === "Neutral")
|
|
15
|
+
return 2 - (b.kind === "Neutral" ? 2 : 0);
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type TextRange } from "./TextRange.js";
|
|
2
|
+
export declare class BreakOpportunityDecisionInfo {
|
|
3
|
+
readonly range: TextRange;
|
|
4
|
+
readonly sourceText: string;
|
|
5
|
+
readonly breakOffsets: readonly number[];
|
|
6
|
+
readonly reason: string;
|
|
7
|
+
readonly tier: string | null;
|
|
8
|
+
constructor(range: TextRange, sourceText: string, breakOffsets: number[], reason: string, tier?: string | null);
|
|
9
|
+
toString(): string;
|
|
10
|
+
}
|
|
11
|
+
export declare function compareBreakOpportunityDecisionInfo(a: BreakOpportunityDecisionInfo, b: BreakOpportunityDecisionInfo): number;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { compareTextRange } from "./TextRange.js";
|
|
3
|
+
export class BreakOpportunityDecisionInfo {
|
|
4
|
+
range;
|
|
5
|
+
sourceText;
|
|
6
|
+
breakOffsets;
|
|
7
|
+
reason;
|
|
8
|
+
tier;
|
|
9
|
+
constructor(range, sourceText, breakOffsets, reason, tier = null) {
|
|
10
|
+
this.range = range;
|
|
11
|
+
this.sourceText = sourceText;
|
|
12
|
+
this.breakOffsets = breakOffsets;
|
|
13
|
+
this.reason = reason;
|
|
14
|
+
this.tier = tier ?? null;
|
|
15
|
+
}
|
|
16
|
+
toString() {
|
|
17
|
+
return `BreakOpportunityDecisionInfo(range=${this.range.toString()}, sourceText=${this.sourceText}, breakOffsets=${(() => { let out = "["; const n = this.breakOffsets.length; for (let i = 0; i < n; i += 1) {
|
|
18
|
+
if (i > 0) {
|
|
19
|
+
out += ", ";
|
|
20
|
+
}
|
|
21
|
+
out += this.breakOffsets[i];
|
|
22
|
+
} out += "]"; return out; })()}, reason=${this.reason}, tier=${this.tier})`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export function compareBreakOpportunityDecisionInfo(a, b) {
|
|
26
|
+
if (a === b)
|
|
27
|
+
return 0;
|
|
28
|
+
{
|
|
29
|
+
const cmp = compareTextRange(a.range, b.range);
|
|
30
|
+
if (cmp !== 0)
|
|
31
|
+
return cmp;
|
|
32
|
+
}
|
|
33
|
+
if (a.sourceText !== b.sourceText)
|
|
34
|
+
return a.sourceText < b.sourceText ? -1 : 1;
|
|
35
|
+
for (let i0 = 0, n0 = a.breakOffsets.length < b.breakOffsets.length ? a.breakOffsets.length : b.breakOffsets.length; i0 < n0; i0++) {
|
|
36
|
+
if (a.breakOffsets[i0] !== b.breakOffsets[i0])
|
|
37
|
+
return a.breakOffsets[i0] - b.breakOffsets[i0];
|
|
38
|
+
}
|
|
39
|
+
if (a.breakOffsets.length !== b.breakOffsets.length)
|
|
40
|
+
return a.breakOffsets.length - b.breakOffsets.length;
|
|
41
|
+
if (a.reason !== b.reason)
|
|
42
|
+
return a.reason < b.reason ? -1 : 1;
|
|
43
|
+
if (a.tier === null && b.tier !== null)
|
|
44
|
+
return -1;
|
|
45
|
+
if (a.tier !== null && b.tier === null)
|
|
46
|
+
return 1;
|
|
47
|
+
if (a.tier !== null && b.tier !== null) {
|
|
48
|
+
if (a.tier !== b.tier)
|
|
49
|
+
return a.tier < b.tier ? -1 : 1;
|
|
50
|
+
}
|
|
51
|
+
return 0;
|
|
52
|
+
}
|
|
@@ -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
|
+
}
|