@tiqian/engine 0.0.0-stage.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,299 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { IntRange } from "./../core/IntRange.js";
|
|
3
|
+
import { LineEndReason } from "./../core/LineEndReason.js";
|
|
4
|
+
import { TiqianIllegalArgumentException } from "./../core/TiqianIllegalArgumentException.js";
|
|
5
|
+
import { ShrinkChannel } from "./ProgressiveBreakDecisions.js";
|
|
6
|
+
import { SortedTable } from "../../../runtime.js";
|
|
7
|
+
export class BreakCandidate {
|
|
8
|
+
index;
|
|
9
|
+
kind;
|
|
10
|
+
naturalWidth;
|
|
11
|
+
compressedWidth;
|
|
12
|
+
expandedWidth;
|
|
13
|
+
forbiddenReason;
|
|
14
|
+
repairOptions;
|
|
15
|
+
constructor(index, kind, naturalWidth, compressedWidth, expandedWidth, forbiddenReason, repairOptions = null) {
|
|
16
|
+
forbiddenReason = forbiddenReason ?? null;
|
|
17
|
+
this.index = index;
|
|
18
|
+
this.kind = kind;
|
|
19
|
+
this.naturalWidth = naturalWidth;
|
|
20
|
+
this.compressedWidth = compressedWidth;
|
|
21
|
+
this.expandedWidth = expandedWidth;
|
|
22
|
+
this.forbiddenReason = forbiddenReason;
|
|
23
|
+
this.repairOptions = repairOptions ?? [];
|
|
24
|
+
}
|
|
25
|
+
toString() {
|
|
26
|
+
return `BreakCandidate(index=${this.index}, kind=${this.kind.kind}, naturalWidth=${this.naturalWidth}, compressedWidth=${this.compressedWidth}, expandedWidth=${this.expandedWidth}, forbiddenReason=${this.forbiddenReason}, repairOptions=${(() => { let out = "["; const n = this.repairOptions.length; for (let i = 0; i < n; i += 1) {
|
|
27
|
+
if (i > 0) {
|
|
28
|
+
out += ", ";
|
|
29
|
+
}
|
|
30
|
+
out += this.repairOptions[i].kind === "LeaveRagged" ? ("LeaveRagged(penalty=" + this.repairOptions[i].penalty + ", reason=" + this.repairOptions[i].reason + ", offenderClusterIndex=" + this.repairOptions[i].offenderClusterIndex + ")") : this.repairOptions[i].kind === "CarryNext" ? ("CarryNext(penalty=" + this.repairOptions[i].penalty + ", reason=" + this.repairOptions[i].reason + ", movedClusterIndex=" + this.repairOptions[i].movedClusterIndex + ")") : this.repairOptions[i].kind === "CarryPrevious" ? ("CarryPrevious(penalty=" + this.repairOptions[i].penalty + ", reason=" + this.repairOptions[i].reason + ", offenderClusterIndex=" + this.repairOptions[i].offenderClusterIndex + ", carriedClusterIndex=" + this.repairOptions[i].carriedClusterIndex + ")") : this.repairOptions[i].kind === "Hang" ? ("Hang(penalty=" + this.repairOptions[i].penalty + ", reason=" + this.repairOptions[i].reason + ", offenderClusterIndex=" + this.repairOptions[i].offenderClusterIndex + ")") : ("PushIn(penalty=" + this.repairOptions[i].penalty + ", reason=" + this.repairOptions[i].reason + ", offenderClusterIndex=" + this.repairOptions[i].offenderClusterIndex + ", allocations=" + (() => { let out = "["; const n = this.repairOptions[i].allocations.length; for (let i = 0; i < n; i += 1) {
|
|
31
|
+
if (i > 0) {
|
|
32
|
+
out += ", ";
|
|
33
|
+
}
|
|
34
|
+
out += this.repairOptions[i].allocations[i].toString();
|
|
35
|
+
} out += "]"; return out; })() + ", totalShrink=" + this.repairOptions[i].totalShrink + ", totalAvailableCapacity=" + this.repairOptions[i].totalAvailableCapacity + ")");
|
|
36
|
+
} out += "]"; return out; })()})`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export class RepairOptions {
|
|
40
|
+
static penalty(o) {
|
|
41
|
+
switch (o.kind) {
|
|
42
|
+
case "PushIn":
|
|
43
|
+
{
|
|
44
|
+
return o.penalty;
|
|
45
|
+
}
|
|
46
|
+
case "Hang":
|
|
47
|
+
{
|
|
48
|
+
return o.penalty;
|
|
49
|
+
}
|
|
50
|
+
case "CarryPrevious":
|
|
51
|
+
{
|
|
52
|
+
return o.penalty;
|
|
53
|
+
}
|
|
54
|
+
case "CarryNext":
|
|
55
|
+
{
|
|
56
|
+
return o.penalty;
|
|
57
|
+
}
|
|
58
|
+
case "LeaveRagged":
|
|
59
|
+
{
|
|
60
|
+
return o.penalty;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static reason(o) {
|
|
65
|
+
switch (o.kind) {
|
|
66
|
+
case "PushIn":
|
|
67
|
+
{
|
|
68
|
+
return o.reason;
|
|
69
|
+
}
|
|
70
|
+
case "Hang":
|
|
71
|
+
{
|
|
72
|
+
return o.reason;
|
|
73
|
+
}
|
|
74
|
+
case "CarryPrevious":
|
|
75
|
+
{
|
|
76
|
+
return o.reason;
|
|
77
|
+
}
|
|
78
|
+
case "CarryNext":
|
|
79
|
+
{
|
|
80
|
+
return o.reason;
|
|
81
|
+
}
|
|
82
|
+
case "LeaveRagged":
|
|
83
|
+
{
|
|
84
|
+
return o.reason;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
static hangOffender(o) {
|
|
89
|
+
switch (o.kind) {
|
|
90
|
+
case "PushIn":
|
|
91
|
+
return null;
|
|
92
|
+
case "Hang":
|
|
93
|
+
{
|
|
94
|
+
return o.offenderClusterIndex;
|
|
95
|
+
}
|
|
96
|
+
case "CarryPrevious":
|
|
97
|
+
return null;
|
|
98
|
+
case "CarryNext":
|
|
99
|
+
return null;
|
|
100
|
+
case "LeaveRagged":
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
static pushInReasonOf(o) {
|
|
105
|
+
switch (o.kind) {
|
|
106
|
+
case "PushIn":
|
|
107
|
+
{
|
|
108
|
+
return o.reason;
|
|
109
|
+
}
|
|
110
|
+
case "Hang":
|
|
111
|
+
return null;
|
|
112
|
+
case "CarryPrevious":
|
|
113
|
+
return null;
|
|
114
|
+
case "CarryNext":
|
|
115
|
+
return null;
|
|
116
|
+
case "LeaveRagged":
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
static pushInAllocations(o) {
|
|
121
|
+
switch (o.kind) {
|
|
122
|
+
case "PushIn":
|
|
123
|
+
{
|
|
124
|
+
return o.allocations;
|
|
125
|
+
}
|
|
126
|
+
case "Hang":
|
|
127
|
+
return null;
|
|
128
|
+
case "CarryPrevious":
|
|
129
|
+
return null;
|
|
130
|
+
case "CarryNext":
|
|
131
|
+
return null;
|
|
132
|
+
case "LeaveRagged":
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
export class PushInAllocation {
|
|
138
|
+
clusterIndex;
|
|
139
|
+
shrink;
|
|
140
|
+
availableCapacity;
|
|
141
|
+
channel;
|
|
142
|
+
constructor(clusterIndex, shrink, availableCapacity, channel = null) {
|
|
143
|
+
this.clusterIndex = clusterIndex;
|
|
144
|
+
this.shrink = shrink;
|
|
145
|
+
this.availableCapacity = availableCapacity;
|
|
146
|
+
this.channel = channel ?? ShrinkChannel.TrailingGlue;
|
|
147
|
+
}
|
|
148
|
+
toString() {
|
|
149
|
+
return `PushInAllocation(clusterIndex=${this.clusterIndex}, shrink=${this.shrink}, availableCapacity=${this.availableCapacity}, channel=${this.channel.kind})`;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
export class LineCandidate {
|
|
153
|
+
clusterRange;
|
|
154
|
+
sourceRange;
|
|
155
|
+
naturalWidth;
|
|
156
|
+
adjustedWidth;
|
|
157
|
+
endReason;
|
|
158
|
+
repair;
|
|
159
|
+
repairCandidates;
|
|
160
|
+
hangingClusterIndices;
|
|
161
|
+
constructor(clusterRange, sourceRange, naturalWidth, adjustedWidth, endReason = null, repair, repairCandidates = null, hangingClusterIndices = null) {
|
|
162
|
+
repair = repair ?? null;
|
|
163
|
+
this.clusterRange = clusterRange;
|
|
164
|
+
this.sourceRange = sourceRange;
|
|
165
|
+
this.naturalWidth = naturalWidth;
|
|
166
|
+
this.adjustedWidth = adjustedWidth;
|
|
167
|
+
this.endReason = endReason ?? LineEndReason.AutoWrap;
|
|
168
|
+
this.repair = repair;
|
|
169
|
+
this.repairCandidates = repairCandidates ?? [];
|
|
170
|
+
this.hangingClusterIndices = hangingClusterIndices ?? LineCandidate.emptyHanging();
|
|
171
|
+
if (this.hangingClusterIndices.size() > 0) {
|
|
172
|
+
const firstHanging = this.hangingClusterIndices.at(0);
|
|
173
|
+
const lastHanging = this.hangingClusterIndices.at(this.hangingClusterIndices.size() - 1);
|
|
174
|
+
if (!(clusterRange.start <= firstHanging && firstHanging <= clusterRange.end && lastHanging === clusterRange.end)) {
|
|
175
|
+
throw new TiqianIllegalArgumentException({ kind: "Message", text: `Hanging clusters must be a trailing line suffix: line=${LineCandidates.renderRange(clusterRange)} hanging=${(() => { let out = "["; const n = this.hangingClusterIndices.size(); for (let i = 0; i < n; i += 1) {
|
|
176
|
+
if (i > 0) {
|
|
177
|
+
out += ", ";
|
|
178
|
+
}
|
|
179
|
+
out += this.hangingClusterIndices.at(i);
|
|
180
|
+
} out += "]"; return out; })()}` });
|
|
181
|
+
}
|
|
182
|
+
if (this.hangingClusterIndices.size() !== clusterRange.end - firstHanging + 1) {
|
|
183
|
+
throw new TiqianIllegalArgumentException({ kind: "Message", text: `Hanging clusters must be contiguous: line=${LineCandidates.renderRange(clusterRange)} hanging=${(() => { let out = "["; const n = this.hangingClusterIndices.size(); for (let i = 0; i < n; i += 1) {
|
|
184
|
+
if (i > 0) {
|
|
185
|
+
out += ", ";
|
|
186
|
+
}
|
|
187
|
+
out += this.hangingClusterIndices.at(i);
|
|
188
|
+
} out += "]"; return out; })()}` });
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
get hangingClusterIndex() {
|
|
193
|
+
return this.get_hangingClusterIndex();
|
|
194
|
+
}
|
|
195
|
+
get_hangingClusterIndex() {
|
|
196
|
+
const fromRepair = (this.repair === null ? null : RepairOptions.hangOffender((this.repair)));
|
|
197
|
+
const last = (this.hangingClusterIndices.size() === 0 ? null : this.hangingClusterIndices.at(this.hangingClusterIndices.size() - 1));
|
|
198
|
+
return (fromRepair !== null ? fromRepair : last);
|
|
199
|
+
}
|
|
200
|
+
get inMeasureClusterRange() {
|
|
201
|
+
return this.get_inMeasureClusterRange();
|
|
202
|
+
}
|
|
203
|
+
get_inMeasureClusterRange() {
|
|
204
|
+
const firstHanging = (this.hangingClusterIndices.size() === 0 ? null : this.hangingClusterIndices.at(0));
|
|
205
|
+
return (firstHanging === null ? this.clusterRange : new IntRange(this.clusterRange.start, firstHanging - 1));
|
|
206
|
+
}
|
|
207
|
+
toString() {
|
|
208
|
+
return `LineCandidate(clusterRange=${this.clusterRange.toString()}, sourceRange=${this.sourceRange.toString()}, naturalWidth=${this.naturalWidth}, adjustedWidth=${this.adjustedWidth}, endReason=${this.endReason.kind}, repair=${(this.repair === null ? "null" : this.repair.kind === "LeaveRagged" ? ("LeaveRagged(penalty=" + this.repair.penalty + ", reason=" + this.repair.reason + ", offenderClusterIndex=" + this.repair.offenderClusterIndex + ")") : this.repair.kind === "CarryNext" ? ("CarryNext(penalty=" + this.repair.penalty + ", reason=" + this.repair.reason + ", movedClusterIndex=" + this.repair.movedClusterIndex + ")") : this.repair.kind === "CarryPrevious" ? ("CarryPrevious(penalty=" + this.repair.penalty + ", reason=" + this.repair.reason + ", offenderClusterIndex=" + this.repair.offenderClusterIndex + ", carriedClusterIndex=" + this.repair.carriedClusterIndex + ")") : this.repair.kind === "Hang" ? ("Hang(penalty=" + this.repair.penalty + ", reason=" + this.repair.reason + ", offenderClusterIndex=" + this.repair.offenderClusterIndex + ")") : ("PushIn(penalty=" + this.repair.penalty + ", reason=" + this.repair.reason + ", offenderClusterIndex=" + this.repair.offenderClusterIndex + ", allocations=" + (() => { let out = "["; const n = this.repair.allocations.length; for (let i = 0; i < n; i += 1) {
|
|
209
|
+
if (i > 0) {
|
|
210
|
+
out += ", ";
|
|
211
|
+
}
|
|
212
|
+
out += this.repair.allocations[i].toString();
|
|
213
|
+
} out += "]"; return out; })() + ", totalShrink=" + this.repair.totalShrink + ", totalAvailableCapacity=" + this.repair.totalAvailableCapacity + ")"))}, repairCandidates=${(() => { let out = "["; const n = this.repairCandidates.length; for (let i = 0; i < n; i += 1) {
|
|
214
|
+
if (i > 0) {
|
|
215
|
+
out += ", ";
|
|
216
|
+
}
|
|
217
|
+
out += this.repairCandidates[i].toString();
|
|
218
|
+
} out += "]"; return out; })()}, hangingClusterIndices=${(() => { let out = "["; const n = this.hangingClusterIndices.size(); for (let i = 0; i < n; i += 1) {
|
|
219
|
+
if (i > 0) {
|
|
220
|
+
out += ", ";
|
|
221
|
+
}
|
|
222
|
+
out += this.hangingClusterIndices.at(i);
|
|
223
|
+
} out += "]"; return out; })()})`;
|
|
224
|
+
}
|
|
225
|
+
static emptyHanging() {
|
|
226
|
+
const b = SortedTable.setBuilder(SortedTable.compareInts);
|
|
227
|
+
return b.build();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
export class LineCandidates {
|
|
231
|
+
static renderRange(r) {
|
|
232
|
+
return r.start + ".." + r.end;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
export class RepairCandidate {
|
|
236
|
+
kind;
|
|
237
|
+
reasonCode;
|
|
238
|
+
offenderClusterIndex;
|
|
239
|
+
penalty;
|
|
240
|
+
accepted;
|
|
241
|
+
rejectionReason;
|
|
242
|
+
targetClusterIndex;
|
|
243
|
+
carriedClusterIndex;
|
|
244
|
+
shrink;
|
|
245
|
+
requiredShrink;
|
|
246
|
+
availableCapacity;
|
|
247
|
+
constructor(kind, reasonCode, offenderClusterIndex, penalty, accepted, rejectionReason, targetClusterIndex, carriedClusterIndex, shrink = null, requiredShrink = null, availableCapacity = null) {
|
|
248
|
+
rejectionReason = rejectionReason ?? null;
|
|
249
|
+
targetClusterIndex = targetClusterIndex ?? null;
|
|
250
|
+
carriedClusterIndex = carriedClusterIndex ?? null;
|
|
251
|
+
this.kind = kind;
|
|
252
|
+
this.reasonCode = reasonCode;
|
|
253
|
+
this.offenderClusterIndex = offenderClusterIndex;
|
|
254
|
+
this.penalty = penalty;
|
|
255
|
+
this.accepted = accepted;
|
|
256
|
+
this.rejectionReason = rejectionReason;
|
|
257
|
+
this.targetClusterIndex = targetClusterIndex;
|
|
258
|
+
this.carriedClusterIndex = carriedClusterIndex;
|
|
259
|
+
this.shrink = shrink ?? 0;
|
|
260
|
+
this.requiredShrink = requiredShrink ?? 0;
|
|
261
|
+
this.availableCapacity = availableCapacity ?? 0;
|
|
262
|
+
}
|
|
263
|
+
toString() {
|
|
264
|
+
return `RepairCandidate(kind=${this.kind}, reasonCode=${this.reasonCode}, offenderClusterIndex=${this.offenderClusterIndex}, penalty=${this.penalty}, accepted=${this.accepted}, rejectionReason=${this.rejectionReason}, targetClusterIndex=${this.targetClusterIndex}, carriedClusterIndex=${this.carriedClusterIndex}, shrink=${this.shrink}, requiredShrink=${this.requiredShrink}, availableCapacity=${this.availableCapacity})`;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
export class LineSolution {
|
|
268
|
+
lines;
|
|
269
|
+
totalBadness;
|
|
270
|
+
constructor(lines = null, totalBadness = null) {
|
|
271
|
+
this.lines = lines ?? [];
|
|
272
|
+
this.totalBadness = totalBadness ?? 0;
|
|
273
|
+
}
|
|
274
|
+
toString() {
|
|
275
|
+
return `LineSolution(lines=${(() => { let out = "["; const n = this.lines.length; for (let i = 0; i < n; i += 1) {
|
|
276
|
+
if (i > 0) {
|
|
277
|
+
out += ", ";
|
|
278
|
+
}
|
|
279
|
+
out += this.lines[i].toString();
|
|
280
|
+
} out += "]"; return out; })()}, totalBadness=${this.totalBadness})`;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
export const LineOptimizationStrategy = Object.freeze({
|
|
284
|
+
Greedy: Object.freeze({ kind: "Greedy" }),
|
|
285
|
+
Lookahead: Object.freeze({ kind: "Lookahead" }),
|
|
286
|
+
ParagraphDynamicProgramming: Object.freeze({ kind: "ParagraphDynamicProgramming" })
|
|
287
|
+
});
|
|
288
|
+
export function compareLineOptimizationStrategy(a, b) {
|
|
289
|
+
if (a === b)
|
|
290
|
+
return 0;
|
|
291
|
+
if (a.kind === "Greedy")
|
|
292
|
+
return 0 - (b.kind === "Greedy" ? 0 : 0);
|
|
293
|
+
if (a.kind === "Lookahead")
|
|
294
|
+
return 1 - (b.kind === "Lookahead" ? 1 : 0);
|
|
295
|
+
if (a.kind === "ParagraphDynamicProgramming")
|
|
296
|
+
return 2 - (b.kind === "ParagraphDynamicProgramming" ? 2 : 0);
|
|
297
|
+
return 0;
|
|
298
|
+
}
|
|
299
|
+
export const LINE_OPTIMIZATION_STRATEGY_ALL = Object.freeze([LineOptimizationStrategy.Greedy, LineOptimizationStrategy.Lookahead, LineOptimizationStrategy.ParagraphDynamicProgramming]);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Cluster } from "./../core/Cluster.js";
|
|
2
|
+
import { IntRange } from "./../core/IntRange.js";
|
|
3
|
+
import { type KinsokuRule } from "./KinsokuRule.js";
|
|
4
|
+
import { LineCandidate, LineSolution, RepairCandidate } from "./LineOptimization.js";
|
|
5
|
+
import { type ProgressiveBreakOpportunity, ShrinkOpportunity, UnbreakableRanges } from "./ProgressiveBreakDecisions.js";
|
|
6
|
+
import { SortedMapTable, SortedSetTable } from "../../../runtime.js";
|
|
7
|
+
export declare class PushInResult {
|
|
8
|
+
readonly previous: LineCandidate;
|
|
9
|
+
readonly current: LineCandidate | null;
|
|
10
|
+
readonly candidate: RepairCandidate;
|
|
11
|
+
constructor(previous: LineCandidate, current: LineCandidate | null, candidate: RepairCandidate);
|
|
12
|
+
toString(): string;
|
|
13
|
+
}
|
|
14
|
+
export declare class LineRepair {
|
|
15
|
+
static applyKinsokuRepairs(initial: LineCandidate[], naturalClusters: Cluster[], adjustedClusters: Cluster[], maxWidth: number, kinsoku: KinsokuRule, shrinkOpportunities: ShrinkOpportunity[], pushInPenalty: number, carryPreviousPenalty: number, leaveRaggedPenalty: number, unbreakableRanges?: UnbreakableRanges | null, firstLineIndent?: number | null, hangableClusters?: SortedSetTable<number> | null, extendableHangRanges?: IntRange[] | null, hangPenalty?: number | null, forbiddenLineStartClusters?: SortedSetTable<number> | null): LineSolution;
|
|
16
|
+
static tryPushIn(prev: LineCandidate, curr: LineCandidate, naturalClusters: Cluster[], adjustedClusters: Cluster[], maxWidth: number, shrinkOpportunities: ShrinkOpportunity[], pushInPenalty: number, mergeThroughClusterIndex?: number | null, reasonCode?: string | null): PushInResult;
|
|
17
|
+
private static mandatoryBreakTailEnd;
|
|
18
|
+
private static distributePushInShrink;
|
|
19
|
+
private static sortByClusterIndex;
|
|
20
|
+
private static toPortableDebugString;
|
|
21
|
+
private static emptyIntSet;
|
|
22
|
+
private static isContinuableZeroShrinkFillPushIn;
|
|
23
|
+
static fillPushInGroupEnd(curr: LineCandidate, forbiddenLineStartClusters: SortedSetTable<number> | null, forbiddenLineEndClusters: SortedSetTable<number>, unbreakableRanges: UnbreakableRanges): number | null;
|
|
24
|
+
static applyFillPushIn(lines: LineCandidate[], naturalClusters: Cluster[], adjustedClusters: Cluster[], maxWidth: number, shrinkOpportunities: ShrinkOpportunity[], firstLineIndent: number, compressBias: number, forbiddenLineStartClusters: SortedSetTable<number> | null, forbiddenLineEndClusters: SortedSetTable<number>, unbreakableRanges: UnbreakableRanges, pushInPenalty: number, gapBoundaries?: SortedSetTable<number> | null, progressiveBreakOpportunities?: SortedMapTable<number, ProgressiveBreakOpportunity> | null): LineCandidate[];
|
|
25
|
+
static withFillPushIn(solution: LineSolution, enabled: boolean, naturalClusters: Cluster[], adjustedClusters: Cluster[], maxWidth: number, shrinkOpportunities: ShrinkOpportunity[], firstLineIndent: number, compressBias: number, forbiddenLineStartClusters: SortedSetTable<number> | null, forbiddenLineEndClusters: SortedSetTable<number>, unbreakableRanges: UnbreakableRanges, pushInPenalty: number, gapBoundaries?: SortedSetTable<number> | null, progressiveBreakOpportunities?: SortedMapTable<number, ProgressiveBreakOpportunity> | null): LineSolution;
|
|
26
|
+
}
|
|
27
|
+
export interface ShrinkTierEntry {
|
|
28
|
+
key: number;
|
|
29
|
+
value: ShrinkOpportunity;
|
|
30
|
+
}
|