@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,474 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { AccurateSum } from "./../core/AccurateSum.js";
|
|
3
|
+
import { InlineObjectPreferredStretchKind } from "./../core/InlineObjectPreferredStretchKind.js";
|
|
4
|
+
import { TiqianIllegalArgumentException } from "./../core/TiqianIllegalArgumentException.js";
|
|
5
|
+
import { PushInAllocation } from "./LineOptimization.js";
|
|
6
|
+
import { ProgressiveBreakTier } from "./ProgressiveBreakDecisions.js";
|
|
7
|
+
import { ProgressiveBreakTierPriority } from "./ProgressiveBreakTierPriority.js";
|
|
8
|
+
import { GlueKind } from "./PunctuationModel.js";
|
|
9
|
+
import { SortedTable, StringTools } from "../../../runtime.js";
|
|
10
|
+
export class JustificationOpportunity {
|
|
11
|
+
targetClusterIndex;
|
|
12
|
+
kind;
|
|
13
|
+
priority;
|
|
14
|
+
capacity;
|
|
15
|
+
reason;
|
|
16
|
+
constructor(targetClusterIndex, kind, priority, capacity, reason) {
|
|
17
|
+
reason = reason ?? null;
|
|
18
|
+
this.targetClusterIndex = targetClusterIndex;
|
|
19
|
+
this.kind = kind;
|
|
20
|
+
this.priority = priority;
|
|
21
|
+
this.capacity = capacity;
|
|
22
|
+
this.reason = reason;
|
|
23
|
+
}
|
|
24
|
+
toString() {
|
|
25
|
+
return `JustificationOpportunity(targetClusterIndex=${this.targetClusterIndex}, kind=${this.kind.kind}, priority=${this.priority}, capacity=${this.capacity}, reason=${this.reason})`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export class JustificationAllocation {
|
|
29
|
+
targetClusterIndex;
|
|
30
|
+
kind;
|
|
31
|
+
priority;
|
|
32
|
+
delta;
|
|
33
|
+
reason;
|
|
34
|
+
constructor(targetClusterIndex, kind, priority, delta, reason) {
|
|
35
|
+
this.targetClusterIndex = targetClusterIndex;
|
|
36
|
+
this.kind = kind;
|
|
37
|
+
this.priority = priority;
|
|
38
|
+
this.delta = delta;
|
|
39
|
+
this.reason = reason;
|
|
40
|
+
}
|
|
41
|
+
toString() {
|
|
42
|
+
return `JustificationAllocation(targetClusterIndex=${this.targetClusterIndex}, kind=${this.kind.kind}, priority=${this.priority}, delta=${this.delta}, reason=${this.reason})`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export class JustificationPlan {
|
|
46
|
+
lineClusterRange;
|
|
47
|
+
allocations;
|
|
48
|
+
deficitBefore;
|
|
49
|
+
unfilledDeficit;
|
|
50
|
+
fallbackReason;
|
|
51
|
+
constructor(lineClusterRange, allocations, deficitBefore, unfilledDeficit, fallbackReason) {
|
|
52
|
+
fallbackReason = fallbackReason ?? null;
|
|
53
|
+
this.lineClusterRange = lineClusterRange;
|
|
54
|
+
this.allocations = allocations;
|
|
55
|
+
this.deficitBefore = deficitBefore;
|
|
56
|
+
this.unfilledDeficit = unfilledDeficit;
|
|
57
|
+
this.fallbackReason = fallbackReason;
|
|
58
|
+
}
|
|
59
|
+
toString() {
|
|
60
|
+
return `JustificationPlan(lineClusterRange=${this.lineClusterRange.toString()}, allocations=${(() => { let out = "["; const n = this.allocations.length; for (let i = 0; i < n; i += 1) {
|
|
61
|
+
if (i > 0) {
|
|
62
|
+
out += ", ";
|
|
63
|
+
}
|
|
64
|
+
out += this.allocations[i].toString();
|
|
65
|
+
} out += "]"; return out; })()}, deficitBefore=${this.deficitBefore}, unfilledDeficit=${this.unfilledDeficit}, fallbackReason=${this.fallbackReason})`;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export class CompressionPlan {
|
|
69
|
+
allocations;
|
|
70
|
+
surplusBefore;
|
|
71
|
+
unfilledSurplus;
|
|
72
|
+
constructor(allocations, surplusBefore, unfilledSurplus) {
|
|
73
|
+
this.allocations = allocations;
|
|
74
|
+
this.surplusBefore = surplusBefore;
|
|
75
|
+
this.unfilledSurplus = unfilledSurplus;
|
|
76
|
+
}
|
|
77
|
+
toString() {
|
|
78
|
+
return `CompressionPlan(allocations=${(() => { let out = "["; const n = this.allocations.length; for (let i = 0; i < n; i += 1) {
|
|
79
|
+
if (i > 0) {
|
|
80
|
+
out += ", ";
|
|
81
|
+
}
|
|
82
|
+
out += this.allocations[i].toString();
|
|
83
|
+
} out += "]"; return out; })()}, surplusBefore=${this.surplusBefore}, unfilledSurplus=${this.unfilledSurplus})`;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export class Justifier {
|
|
87
|
+
wordSpaceMaxEm;
|
|
88
|
+
progressiveTechnicalWhitespaceStretchMaxEm;
|
|
89
|
+
constructor(wordSpaceMaxEm = null, progressiveTechnicalWhitespaceStretchMaxEm = null) {
|
|
90
|
+
this.wordSpaceMaxEm = wordSpaceMaxEm ?? 0.5;
|
|
91
|
+
this.progressiveTechnicalWhitespaceStretchMaxEm = progressiveTechnicalWhitespaceStretchMaxEm ?? 0.25;
|
|
92
|
+
}
|
|
93
|
+
progressiveTechnicalWhitespaceStretchCapacity(fontSize) {
|
|
94
|
+
return this.progressiveTechnicalWhitespaceStretchMaxEm * fontSize;
|
|
95
|
+
}
|
|
96
|
+
justify(adjustedClusters, clusterRoles, eastAsianSpacingEdges, lineClusterRange, maxWidth, fontSize, skip, skipReason, allowSinoWesternGapStretch, cjkLatinSpaceBaseEm, cjkLatinSpaceMaxEm, noStretchBoundaryClusters, noStretchBoundaryAfterClusters, westernBracketCjkInterCharBoundaryAfterClusters, attachedInlinePhysicalBoundaryAfterClusters, attachedInlineVirtualBoundaryAfterClusters, attachedInlineVirtualSinoWesternBoundaryAfterClusters, uniformInlineObjectBoundaryAfterClusters, preferredInlineObjectBoundaryAfterClusters, technicalBoundaryAfterClusters, emergencyTrackingBoundaryAfterClusters, preferredEmergencyTrackingBoundaryAfterClusters) {
|
|
97
|
+
noStretchBoundaryClusters = noStretchBoundaryClusters ?? null;
|
|
98
|
+
noStretchBoundaryAfterClusters = noStretchBoundaryAfterClusters ?? null;
|
|
99
|
+
westernBracketCjkInterCharBoundaryAfterClusters = westernBracketCjkInterCharBoundaryAfterClusters ?? null;
|
|
100
|
+
attachedInlinePhysicalBoundaryAfterClusters = attachedInlinePhysicalBoundaryAfterClusters ?? null;
|
|
101
|
+
attachedInlineVirtualBoundaryAfterClusters = attachedInlineVirtualBoundaryAfterClusters ?? null;
|
|
102
|
+
attachedInlineVirtualSinoWesternBoundaryAfterClusters = attachedInlineVirtualSinoWesternBoundaryAfterClusters ?? null;
|
|
103
|
+
uniformInlineObjectBoundaryAfterClusters = uniformInlineObjectBoundaryAfterClusters ?? null;
|
|
104
|
+
preferredInlineObjectBoundaryAfterClusters = preferredInlineObjectBoundaryAfterClusters ?? null;
|
|
105
|
+
technicalBoundaryAfterClusters = technicalBoundaryAfterClusters ?? null;
|
|
106
|
+
emergencyTrackingBoundaryAfterClusters = emergencyTrackingBoundaryAfterClusters ?? null;
|
|
107
|
+
preferredEmergencyTrackingBoundaryAfterClusters = preferredEmergencyTrackingBoundaryAfterClusters ?? null;
|
|
108
|
+
const ns = noStretchBoundaryClusters ?? SortedTable.setBuilder(SortedTable.compareInts).build();
|
|
109
|
+
const nsa = noStretchBoundaryAfterClusters ?? SortedTable.setBuilder(SortedTable.compareInts).build();
|
|
110
|
+
const br = westernBracketCjkInterCharBoundaryAfterClusters ?? SortedTable.setBuilder(SortedTable.compareInts).build();
|
|
111
|
+
const ph = attachedInlinePhysicalBoundaryAfterClusters ?? SortedTable.setBuilder(SortedTable.compareInts).build();
|
|
112
|
+
const vi = attachedInlineVirtualBoundaryAfterClusters ?? SortedTable.mapBuilder(SortedTable.compareInts).build();
|
|
113
|
+
const vs = attachedInlineVirtualSinoWesternBoundaryAfterClusters ?? SortedTable.setBuilder(SortedTable.compareInts).build();
|
|
114
|
+
const uo = uniformInlineObjectBoundaryAfterClusters ?? SortedTable.setBuilder(SortedTable.compareInts).build();
|
|
115
|
+
const pref = preferredInlineObjectBoundaryAfterClusters ?? SortedTable.mapBuilder(SortedTable.compareInts).build();
|
|
116
|
+
const te = technicalBoundaryAfterClusters ?? SortedTable.mapBuilder(SortedTable.compareInts).build();
|
|
117
|
+
const emg = emergencyTrackingBoundaryAfterClusters ?? SortedTable.mapBuilder(SortedTable.compareInts).build();
|
|
118
|
+
const pem = preferredEmergencyTrackingBoundaryAfterClusters ?? SortedTable.mapBuilder(SortedTable.compareInts).build();
|
|
119
|
+
if (clusterRoles.length !== adjustedClusters.length) {
|
|
120
|
+
throw new TiqianIllegalArgumentException({ kind: "Message", text: "clusterRoles must align with adjustedClusters." });
|
|
121
|
+
}
|
|
122
|
+
if (eastAsianSpacingEdges.length !== adjustedClusters.length) {
|
|
123
|
+
throw new TiqianIllegalArgumentException({ kind: "Message", text: "East_Asian_Spacing values must align with adjustedClusters." });
|
|
124
|
+
}
|
|
125
|
+
const widthTerms = [];
|
|
126
|
+
let i = lineClusterRange.start;
|
|
127
|
+
while (i <= lineClusterRange.end) {
|
|
128
|
+
widthTerms.push(adjustedClusters[i].advance);
|
|
129
|
+
i++;
|
|
130
|
+
}
|
|
131
|
+
const width = AccurateSum.of(widthTerms);
|
|
132
|
+
const deficit = Math.max(maxWidth - width, 0);
|
|
133
|
+
if (skip || deficit <= 0) {
|
|
134
|
+
return new JustificationPlan(lineClusterRange, [], deficit, deficit, (skip ? skipReason : null));
|
|
135
|
+
}
|
|
136
|
+
let remaining = deficit;
|
|
137
|
+
const out = [];
|
|
138
|
+
const boundaryIsClosed = (l, x) => {
|
|
139
|
+
return nsa.has(l) || ns.has(l) || ns.has(x);
|
|
140
|
+
};
|
|
141
|
+
const spaceGapIsClosed = (x) => {
|
|
142
|
+
return nsa.has(x - 1) || nsa.has(x) || ns.has(x - 1) || ns.has(x + 1);
|
|
143
|
+
};
|
|
144
|
+
const alloc = (ops, reason) => {
|
|
145
|
+
if (ops.length === 0 || remaining <= 0) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const capacityTerms = [];
|
|
149
|
+
{
|
|
150
|
+
let _g = 0;
|
|
151
|
+
while (_g < ops.length) {
|
|
152
|
+
const o = ops[_g];
|
|
153
|
+
_g++;
|
|
154
|
+
capacityTerms.push(o.capacity);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const total = AccurateSum.of(capacityTerms);
|
|
158
|
+
if (total <= 0) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (total >= remaining) {
|
|
162
|
+
const f = remaining / total;
|
|
163
|
+
ops.forEach((o) => {
|
|
164
|
+
const d = o.capacity * f;
|
|
165
|
+
if (d > 0) {
|
|
166
|
+
out.push(new JustificationAllocation(o.targetClusterIndex, o.kind, o.priority, d, ((o.reason === null ? reason : o.reason))));
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
remaining = 0;
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
ops.forEach((o) => {
|
|
173
|
+
if (o.capacity > 0) {
|
|
174
|
+
out.push(new JustificationAllocation(o.targetClusterIndex, o.kind, o.priority, o.capacity, ((o.reason === null ? reason : o.reason))));
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
remaining -= total;
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
const build = (kind, priority, cap, reason, p) => {
|
|
181
|
+
const a = [];
|
|
182
|
+
if (cap <= 0) {
|
|
183
|
+
return a;
|
|
184
|
+
}
|
|
185
|
+
let j = lineClusterRange.start;
|
|
186
|
+
while (j < lineClusterRange.end) {
|
|
187
|
+
if (p(j, j + 1)) {
|
|
188
|
+
a.push(new JustificationOpportunity(j, kind, priority, cap, reason));
|
|
189
|
+
}
|
|
190
|
+
j++;
|
|
191
|
+
}
|
|
192
|
+
return a;
|
|
193
|
+
};
|
|
194
|
+
const finish = (fallback) => {
|
|
195
|
+
return new JustificationPlan(lineClusterRange, out, deficit, Math.max(remaining, 0), fallback);
|
|
196
|
+
};
|
|
197
|
+
let ops = build(GlueKind.ProgressiveTechnical, ProgressiveBreakTierPriority.priority(ProgressiveBreakTier.Whitespace), this.progressiveTechnicalWhitespaceStretchCapacity(fontSize), "ProgressiveTechnicalWhitespaceStretch", (l, x) => {
|
|
198
|
+
const t = te.get(l);
|
|
199
|
+
return (t !== null && t.kind === "Whitespace") && Justifier_Fields_.allWhitespace(adjustedClusters[l].text);
|
|
200
|
+
});
|
|
201
|
+
alloc(ops, "ProgressiveTechnicalWhitespaceStretch");
|
|
202
|
+
if (remaining <= 0) {
|
|
203
|
+
return finish((null));
|
|
204
|
+
}
|
|
205
|
+
const ws = [];
|
|
206
|
+
i = lineClusterRange.start;
|
|
207
|
+
while (i <= lineClusterRange.end) {
|
|
208
|
+
if (Justifier_Fields_.wordSpaceBetweenNarrow(adjustedClusters, i, eastAsianSpacingEdges) && !spaceGapIsClosed(i)) {
|
|
209
|
+
const h = Math.max(this.wordSpaceMaxEm * fontSize - adjustedClusters[i].advance, 0);
|
|
210
|
+
if (adjustedClusters[i].advance > 0 && h > 0) {
|
|
211
|
+
ws.push(new JustificationOpportunity(i, GlueKind.WordSpace, 0, h, null));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
i++;
|
|
215
|
+
}
|
|
216
|
+
alloc(ws, "WordSpace");
|
|
217
|
+
if (remaining <= 0) {
|
|
218
|
+
return finish((null));
|
|
219
|
+
}
|
|
220
|
+
let sino = [];
|
|
221
|
+
if (allowSinoWesternGapStretch) {
|
|
222
|
+
sino = build(GlueKind.CjkLatinSpace, 1, Math.max((cjkLatinSpaceMaxEm - cjkLatinSpaceBaseEm) * fontSize, 0), (null), (l, x) => {
|
|
223
|
+
return Justifier_Fields_.wideNarrowBoundary(l, x, eastAsianSpacingEdges) && !ph.has(l) && !boundaryIsClosed(l, x) && adjustedClusters[l].text.indexOf(" ") < 0 && adjustedClusters[x].text.indexOf(" ") !== 0;
|
|
224
|
+
});
|
|
225
|
+
i = lineClusterRange.start;
|
|
226
|
+
while (i <= lineClusterRange.end) {
|
|
227
|
+
if (vs.has(i)) {
|
|
228
|
+
const prev = vi.get(i);
|
|
229
|
+
if (prev !== null && i >= lineClusterRange.start && i + 1 <= lineClusterRange.end && !ns.has((prev)) && !ns.has(i + 1)) {
|
|
230
|
+
sino.push(new JustificationOpportunity(i, GlueKind.CjkLatinSpace, 1, Math.max((cjkLatinSpaceMaxEm - cjkLatinSpaceBaseEm) * fontSize, 0), "AttachedInlineVirtualAutoSpace"));
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
if (Justifier_Fields_.wideNarrowTypedSpace(adjustedClusters, i, eastAsianSpacingEdges) && !spaceGapIsClosed(i) && adjustedClusters[i].advance > 0) {
|
|
234
|
+
const h2 = Math.max(cjkLatinSpaceMaxEm * fontSize - adjustedClusters[i].advance, 0);
|
|
235
|
+
if (h2 > 0) {
|
|
236
|
+
sino.push(new JustificationOpportunity(i, GlueKind.CjkLatinSpace, 1, h2, null));
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
i++;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
alloc(sino, "CjkLatinSpace");
|
|
243
|
+
if (remaining <= 0) {
|
|
244
|
+
return finish((null));
|
|
245
|
+
}
|
|
246
|
+
const kinds = [InlineObjectPreferredStretchKind.PunctuationTrailing, InlineObjectPreferredStretchKind.Relation, InlineObjectPreferredStretchKind.BinaryOperator];
|
|
247
|
+
let ki = 0;
|
|
248
|
+
while (ki < kinds.length) {
|
|
249
|
+
const po = [];
|
|
250
|
+
let mi = 0;
|
|
251
|
+
while (mi < pref.size()) {
|
|
252
|
+
const key = pref.keyAt(mi);
|
|
253
|
+
const pv = pref.get(key);
|
|
254
|
+
if (pv !== null && pv.kind === kinds[ki] && key >= lineClusterRange.start && key < lineClusterRange.end && !boundaryIsClosed(key, key + 1)) {
|
|
255
|
+
po.push(new JustificationOpportunity(key, Justifier_Fields_.glueKind(kinds[ki]), 2, pv.capacity, Justifier_Fields_.reason(kinds[ki])));
|
|
256
|
+
}
|
|
257
|
+
mi++;
|
|
258
|
+
}
|
|
259
|
+
alloc(po, Justifier_Fields_.reason(kinds[ki]));
|
|
260
|
+
if (remaining <= 0) {
|
|
261
|
+
return finish((null));
|
|
262
|
+
}
|
|
263
|
+
ki++;
|
|
264
|
+
}
|
|
265
|
+
ops = build(GlueKind.EmergencyGraphemeTracking, 3, remaining, (null), (l, x) => {
|
|
266
|
+
return pem.has(l);
|
|
267
|
+
});
|
|
268
|
+
const count = ops.length;
|
|
269
|
+
const pipeline_result = new Array(count);
|
|
270
|
+
for (let pipeline_index = 0; pipeline_index < count; pipeline_index += 1) {
|
|
271
|
+
const v = ops[pipeline_index];
|
|
272
|
+
pipeline_result[pipeline_index] = new JustificationOpportunity(v.targetClusterIndex, v.kind, v.priority, v.capacity, `TerminalTechnicalEmergencyTracking:${pem.get(v.targetClusterIndex)}`);
|
|
273
|
+
}
|
|
274
|
+
const pe = pipeline_result;
|
|
275
|
+
alloc(pe, "TerminalTechnicalEmergencyTracking");
|
|
276
|
+
if (remaining <= 0) {
|
|
277
|
+
return finish((null));
|
|
278
|
+
}
|
|
279
|
+
let hasCjk = false;
|
|
280
|
+
i = lineClusterRange.start;
|
|
281
|
+
while (i <= lineClusterRange.end) {
|
|
282
|
+
if (eastAsianSpacingEdges[i].containsWide) {
|
|
283
|
+
hasCjk = true;
|
|
284
|
+
}
|
|
285
|
+
i++;
|
|
286
|
+
}
|
|
287
|
+
let hasU = false;
|
|
288
|
+
i = lineClusterRange.start;
|
|
289
|
+
while (i < lineClusterRange.end) {
|
|
290
|
+
if (uo.has(i) && !boundaryIsClosed(i, i + 1)) {
|
|
291
|
+
hasU = true;
|
|
292
|
+
}
|
|
293
|
+
i++;
|
|
294
|
+
}
|
|
295
|
+
let hasE = false;
|
|
296
|
+
i = lineClusterRange.start;
|
|
297
|
+
while (i < lineClusterRange.end) {
|
|
298
|
+
if (emg.has(i)) {
|
|
299
|
+
hasE = true;
|
|
300
|
+
}
|
|
301
|
+
i++;
|
|
302
|
+
}
|
|
303
|
+
if (!hasCjk && !hasU && !hasE) {
|
|
304
|
+
return finish("WesternDominantLineNaturalSpacing");
|
|
305
|
+
}
|
|
306
|
+
let all = [];
|
|
307
|
+
const textOps = build(GlueKind.CjkInterChar, 3, remaining, (null), (l, x) => {
|
|
308
|
+
const both = Justifier_Fields_.isCjk(clusterRoles[l]) && Justifier_Fields_.isCjk(clusterRoles[x]);
|
|
309
|
+
const pw = clusterRoles[l].kind === "CjkPunctuation" && eastAsianSpacingEdges[x].leading.kind === "Narrow" || eastAsianSpacingEdges[l].trailing.kind === "Narrow" && clusterRoles[x].kind === "CjkPunctuation";
|
|
310
|
+
const vw = allowSinoWesternGapStretch && Justifier_Fields_.wideNarrowBoundary(l, x, eastAsianSpacingEdges);
|
|
311
|
+
return (both || pw || vw) && !br.has(l) && !ph.has(l) && !vi.has(l) && !uo.has(l) && !boundaryIsClosed(l, x);
|
|
312
|
+
});
|
|
313
|
+
all = all.concat(textOps);
|
|
314
|
+
all = all.concat(build(GlueKind.CjkInterChar, 3, remaining, "WesternBracketCjkInterChar", (l, x) => {
|
|
315
|
+
return br.has(l) && !ph.has(l) && !uo.has(l) && !boundaryIsClosed(l, x);
|
|
316
|
+
}));
|
|
317
|
+
all = all.concat(build(GlueKind.CjkInterChar, 3, remaining, "AttachedInlineVirtualInterChar", (l, x) => {
|
|
318
|
+
const pv2 = vi.get(l);
|
|
319
|
+
return pv2 !== null && (allowSinoWesternGapStretch || !vs.has(l)) && !uo.has(l) && !ns.has((pv2)) && !ns.has(x) && !nsa.has((pv2));
|
|
320
|
+
}));
|
|
321
|
+
all = all.concat(build(GlueKind.InlineObjectBoundary, 3, remaining, (null), (l, x) => {
|
|
322
|
+
return uo.has(l) && !boundaryIsClosed(l, x);
|
|
323
|
+
}));
|
|
324
|
+
i = lineClusterRange.start;
|
|
325
|
+
while (i <= lineClusterRange.end) {
|
|
326
|
+
if ((Justifier_Fields_.wordSpaceBetweenNarrow(adjustedClusters, i, eastAsianSpacingEdges) || allowSinoWesternGapStretch && Justifier_Fields_.wideNarrowTypedSpace(adjustedClusters, i, eastAsianSpacingEdges)) && !spaceGapIsClosed(i) && adjustedClusters[i].advance > 0) {
|
|
327
|
+
all.push(new JustificationOpportunity(i, GlueKind.CjkInterChar, 3, remaining, null));
|
|
328
|
+
}
|
|
329
|
+
i++;
|
|
330
|
+
}
|
|
331
|
+
alloc(all, "CjkInterChar");
|
|
332
|
+
if (remaining <= 0) {
|
|
333
|
+
return finish((null));
|
|
334
|
+
}
|
|
335
|
+
ops = build(GlueKind.EmergencyGraphemeTracking, 4, remaining, (null), (l, x) => {
|
|
336
|
+
return emg.has(l) && !pem.has(l);
|
|
337
|
+
});
|
|
338
|
+
const pipeline_result1 = new Array(ops.length);
|
|
339
|
+
for (let pipeline_index1 = 0; pipeline_index1 < ops.length; pipeline_index1 += 1) {
|
|
340
|
+
const v2 = ops[pipeline_index1];
|
|
341
|
+
pipeline_result1[pipeline_index1] = new JustificationOpportunity(v2.targetClusterIndex, v2.kind, v2.priority, v2.capacity, `EmergencyGraphemeTracking:${emg.get(v2.targetClusterIndex)}`);
|
|
342
|
+
}
|
|
343
|
+
const ee = pipeline_result1;
|
|
344
|
+
alloc(ee, "EmergencyGraphemeTracking");
|
|
345
|
+
return finish(((remaining > 0 && hasE ? "EmergencyTrackingNoOpenBoundary" : null)));
|
|
346
|
+
}
|
|
347
|
+
compress(surplus, shrinkOpportunities) {
|
|
348
|
+
if (surplus <= 0) {
|
|
349
|
+
return new CompressionPlan([], 0, 0);
|
|
350
|
+
}
|
|
351
|
+
let rem = surplus;
|
|
352
|
+
const out = [];
|
|
353
|
+
const pipeline_result = new Array();
|
|
354
|
+
for (let pipeline_index = 0, count2 = shrinkOpportunities.length; pipeline_index < count2; pipeline_index += 1) {
|
|
355
|
+
const v = shrinkOpportunities[pipeline_index];
|
|
356
|
+
if (v.capacity > 0) {
|
|
357
|
+
pipeline_result.push(v);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
const pipeline_builder = SortedTable.mapBuilder(SortedTable.compareInts);
|
|
361
|
+
for (let pipeline_index1 = 0, count3 = pipeline_result.length; pipeline_index1 < count3; pipeline_index1 += 1) {
|
|
362
|
+
const o = pipeline_result[pipeline_index1];
|
|
363
|
+
{
|
|
364
|
+
const pipeline_entry = { key: o.tier, value: o };
|
|
365
|
+
let pipeline_bucket = pipeline_builder.get(pipeline_entry.key);
|
|
366
|
+
if (pipeline_bucket === null) {
|
|
367
|
+
pipeline_bucket = new Array();
|
|
368
|
+
pipeline_builder.put(pipeline_entry.key, pipeline_bucket);
|
|
369
|
+
}
|
|
370
|
+
pipeline_bucket.push(pipeline_entry.value);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
const pipeline_result1 = pipeline_builder.build();
|
|
374
|
+
const m = pipeline_result1;
|
|
375
|
+
let k = 0;
|
|
376
|
+
while (k < m.size()) {
|
|
377
|
+
if (rem <= 0) {
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
const group = m.valueAt(k);
|
|
381
|
+
const groupTerms = [];
|
|
382
|
+
for (let gi = 0, count4 = group.length; gi < count4; gi += 1) {
|
|
383
|
+
groupTerms.push(group[gi].capacity);
|
|
384
|
+
}
|
|
385
|
+
const total = AccurateSum.of(groupTerms);
|
|
386
|
+
if (total <= 0) {
|
|
387
|
+
k++;
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
const f = Math.min(1, rem / total);
|
|
391
|
+
for (let pipeline_index2 = 0, count5 = group.length; pipeline_index2 < count5; pipeline_index2 += 1) {
|
|
392
|
+
const q = group[pipeline_index2];
|
|
393
|
+
const d = q.capacity * f;
|
|
394
|
+
if (d > 0) {
|
|
395
|
+
out.push(new PushInAllocation(q.clusterIndex, d, q.capacity, q.channel));
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
rem -= total * f;
|
|
399
|
+
k++;
|
|
400
|
+
}
|
|
401
|
+
return new CompressionPlan(out, surplus, Math.max(rem, 0));
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
export class Justifier_Fields_ {
|
|
405
|
+
static allWhitespace(s) {
|
|
406
|
+
if (s.length === 0) {
|
|
407
|
+
return false;
|
|
408
|
+
}
|
|
409
|
+
let i = 0;
|
|
410
|
+
while (i < s.length) {
|
|
411
|
+
if (!StringTools.isSpace(s, i)) {
|
|
412
|
+
return false;
|
|
413
|
+
}
|
|
414
|
+
i++;
|
|
415
|
+
}
|
|
416
|
+
return true;
|
|
417
|
+
}
|
|
418
|
+
static isCjk(r) {
|
|
419
|
+
return r.kind === "CjkText" || r.kind === "CjkPunctuation";
|
|
420
|
+
}
|
|
421
|
+
static glueKind(k) {
|
|
422
|
+
switch (k.kind) {
|
|
423
|
+
case "PunctuationTrailing":
|
|
424
|
+
return GlueKind.InlineObjectPunctuationTrailing;
|
|
425
|
+
case "Relation":
|
|
426
|
+
return GlueKind.InlineObjectRelation;
|
|
427
|
+
case "BinaryOperator":
|
|
428
|
+
return GlueKind.InlineObjectBinaryOperator;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
static reason(k) {
|
|
432
|
+
switch (k.kind) {
|
|
433
|
+
case "PunctuationTrailing":
|
|
434
|
+
return "InlineObjectPunctuationTrailing";
|
|
435
|
+
case "Relation":
|
|
436
|
+
return "InlineObjectRelation";
|
|
437
|
+
case "BinaryOperator":
|
|
438
|
+
return "InlineObjectBinaryOperator";
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
static wideNarrowBoundary(l, x, e) {
|
|
442
|
+
return Justifier_Fields_.wideNarrowPairWith(e[l].trailing, e[x].leading);
|
|
443
|
+
}
|
|
444
|
+
static wideNarrowPairWith(a, b) {
|
|
445
|
+
return (a !== null && a.kind === "Wide") && (b !== null && b.kind === "Narrow") || (a !== null && a.kind === "Narrow") && (b !== null && b.kind === "Wide");
|
|
446
|
+
}
|
|
447
|
+
static wordSpaceBetweenNarrow(c, i, e) {
|
|
448
|
+
if (i < 0 || i >= c.length || !Justifier_Fields_.allSpaces(c[i].text)) {
|
|
449
|
+
return false;
|
|
450
|
+
}
|
|
451
|
+
return i > 0 && i < c.length - 1 && e[i - 1].trailing.kind === "Narrow" && e[i + 1].leading.kind === "Narrow" && !Justifier_Fields_.allSpaces(c[i - 1].text) && !Justifier_Fields_.allSpaces(c[i + 1].text);
|
|
452
|
+
}
|
|
453
|
+
static wideNarrowTypedSpace(c, i, e) {
|
|
454
|
+
if (i < 0 || i >= c.length || !Justifier_Fields_.allSpaces(c[i].text)) {
|
|
455
|
+
return false;
|
|
456
|
+
}
|
|
457
|
+
const l = (i > 0 ? e[i - 1].trailing : null);
|
|
458
|
+
const x = (i + 1 < c.length ? e[i + 1].leading : null);
|
|
459
|
+
return Justifier_Fields_.wideNarrowPairWith(l, x);
|
|
460
|
+
}
|
|
461
|
+
static allSpaces(s) {
|
|
462
|
+
if (s.length === 0) {
|
|
463
|
+
return false;
|
|
464
|
+
}
|
|
465
|
+
let i = 0;
|
|
466
|
+
while (i < s.length) {
|
|
467
|
+
if (s.charAt(i) !== " ") {
|
|
468
|
+
return false;
|
|
469
|
+
}
|
|
470
|
+
i++;
|
|
471
|
+
}
|
|
472
|
+
return true;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { KinsokuLevel } from "./../clreq/KinsokuLevel.js";
|
|
2
|
+
import { type Cluster } from "./../core/Cluster.js";
|
|
3
|
+
export type KinsokuRuleForbiddenAtLineStartFn = (cluster: Cluster) => boolean;
|
|
4
|
+
export type KinsokuRuleForbiddenAtLineEndFn = (cluster: Cluster) => boolean;
|
|
5
|
+
export interface KinsokuRule {
|
|
6
|
+
readonly forbiddenAtLineStart: KinsokuRuleForbiddenAtLineStartFn;
|
|
7
|
+
readonly forbiddenAtLineEnd: KinsokuRuleForbiddenAtLineEndFn;
|
|
8
|
+
}
|
|
9
|
+
export declare class ClreqKinsokuRule implements KinsokuRule {
|
|
10
|
+
private readonly level;
|
|
11
|
+
constructor(level?: KinsokuLevel | null);
|
|
12
|
+
toString(): string;
|
|
13
|
+
forbiddenAtLineStart(cluster: Cluster): boolean;
|
|
14
|
+
forbiddenAtLineEnd(cluster: Cluster): boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { ClreqPunctuationPolicies } from "./../clreq/ClreqPunctuationPolicies.js";
|
|
3
|
+
import { KinsokuLevel } from "./../clreq/KinsokuLevel.js";
|
|
4
|
+
export class ClreqKinsokuRule {
|
|
5
|
+
level;
|
|
6
|
+
constructor(level = null) {
|
|
7
|
+
this.level = level ?? KinsokuLevel.Basic;
|
|
8
|
+
}
|
|
9
|
+
toString() {
|
|
10
|
+
return `ClreqKinsokuRule(level=${this.level.kind})`;
|
|
11
|
+
}
|
|
12
|
+
forbiddenAtLineStart(cluster) {
|
|
13
|
+
if (cluster.displayText.length === 0) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
return ClreqPunctuationPolicies.forbiddenAtLineStart(cluster.displayText.substring(0, 1), this.level);
|
|
17
|
+
}
|
|
18
|
+
forbiddenAtLineEnd(cluster) {
|
|
19
|
+
if (cluster.displayText.length === 0) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return ClreqPunctuationPolicies.forbiddenAtLineEnd(cluster.displayText.substring(0, 1), this.level);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type ClreqPunctuationGlyphSubstitutor } from "./../clreq/ClreqPunctuationGlyphSubstitutor.js";
|
|
2
|
+
import { type AutoSpaceDecisionInfo } from "./../core/AutoSpaceDecisionInfo.js";
|
|
3
|
+
import { type BopomofoDecisionInfo } from "./../core/BopomofoDecisionInfo.js";
|
|
4
|
+
import { type BreakOpportunityDecisionInfo } from "./../core/BreakOpportunityDecisionInfo.js";
|
|
5
|
+
import { type Cluster } from "./../core/Cluster.js";
|
|
6
|
+
import { type ClusterGeometryDecisionInfo } from "./../core/ClusterGeometryDecisionInfo.js";
|
|
7
|
+
import { type ContextualKinsokuDecisionInfo } from "./../core/ContextualKinsokuDecisionInfo.js";
|
|
8
|
+
import { type DecorationDecisionInfo } from "./../core/DecorationDecisionInfo.js";
|
|
9
|
+
import { type DecorationSegmentInfo } from "./../core/DecorationSegmentInfo.js";
|
|
10
|
+
import { type EmergencyTrackingEligibilityDecisionInfo } from "./../core/EmergencyTrackingEligibilityDecisionInfo.js";
|
|
11
|
+
import { type FirstLineIndentDecisionInfo } from "./../core/FirstLineIndentDecisionInfo.js";
|
|
12
|
+
import { type InlineBoxDecisionInfo } from "./../core/InlineBoxDecisionInfo.js";
|
|
13
|
+
import { type InlineObjectDecisionInfo } from "./../core/InlineObjectDecisionInfo.js";
|
|
14
|
+
import { type InlineObjectLineHeightDecisionInfo } from "./../core/InlineObjectLineHeightDecisionInfo.js";
|
|
15
|
+
import { type InlineObjectPunctuationAttachmentDecisionInfo } from "./../core/InlineObjectPunctuationAttachmentDecisionInfo.js";
|
|
16
|
+
import { type KinsokuDecisionInfo } from "./../core/KinsokuDecisionInfo.js";
|
|
17
|
+
import { LayoutDebugInfo } from "./../core/LayoutDebugInfo.js";
|
|
18
|
+
import { type LineBox } from "./../core/LineBox.js";
|
|
19
|
+
import { type LineEdgeTrimDecisionInfo } from "./../core/LineEdgeTrimDecisionInfo.js";
|
|
20
|
+
import { type LineLengthGridDecisionInfo } from "./../core/LineLengthGridDecisionInfo.js";
|
|
21
|
+
import { type LineSpacingDecisionInfo } from "./../core/LineSpacingDecisionInfo.js";
|
|
22
|
+
import { type MandatoryBreakDecisionInfo } from "./../core/MandatoryBreakDecisionInfo.js";
|
|
23
|
+
import { type MaxLinesDecisionInfo } from "./../core/MaxLinesDecisionInfo.js";
|
|
24
|
+
import { type RoleOverrideInfo } from "./../core/RoleOverrideInfo.js";
|
|
25
|
+
import { type RubyDecisionInfo } from "./../core/RubyDecisionInfo.js";
|
|
26
|
+
import { type RubyLineHeightDecisionInfo } from "./../core/RubyLineHeightDecisionInfo.js";
|
|
27
|
+
import { type ShapingDecisionInfo } from "./../core/ShapingDecisionInfo.js";
|
|
28
|
+
import { type TextRange } from "./../core/TextRange.js";
|
|
29
|
+
import { type ZeroWidthBreakDecisionInfo } from "./../core/ZeroWidthBreakDecisionInfo.js";
|
|
30
|
+
import { type FontDecision } from "./../font/FontPolicy.js";
|
|
31
|
+
import { type JustificationPlan } from "./Justifier.js";
|
|
32
|
+
import { type ClusterMetricDecision } from "./LineGeometryStage.js";
|
|
33
|
+
import { type LineSolution } from "./LineOptimization.js";
|
|
34
|
+
import { type ExplainableStubParagraphLayoutEngine } from "./ParagraphLayoutEngine.js";
|
|
35
|
+
import { type ProgressiveBreakOpportunity } from "./ProgressiveBreakDecisions.js";
|
|
36
|
+
import { type AttachedInlinePunctuationBoundaryResult } from "./PunctuationGeometryLedger.js";
|
|
37
|
+
import { type PunctuationAtom, type PunctuationSpacingCompressionResult } from "./PunctuationModel.js";
|
|
38
|
+
import { SortedMapTable } from "../../../runtime.js";
|
|
39
|
+
export declare class LayoutDebugStageInput {
|
|
40
|
+
readonly text: string;
|
|
41
|
+
readonly fontDecisions: FontDecision[];
|
|
42
|
+
readonly punctuationGlyphSubstitutor: ClreqPunctuationGlyphSubstitutor;
|
|
43
|
+
readonly substitutionRollbacks: SortedMapTable<TextRange, string>;
|
|
44
|
+
readonly shapingDecisions: ShapingDecisionInfo[];
|
|
45
|
+
readonly metricDecisions: ClusterMetricDecision[];
|
|
46
|
+
readonly punctuationAtoms: PunctuationAtom[];
|
|
47
|
+
readonly geometryDecisions: ClusterGeometryDecisionInfo[];
|
|
48
|
+
readonly spacingPlan: PunctuationSpacingCompressionResult;
|
|
49
|
+
readonly attachedPunctuationBoundary: AttachedInlinePunctuationBoundaryResult;
|
|
50
|
+
readonly roleOverrideInfos: RoleOverrideInfo[];
|
|
51
|
+
readonly laidOutLines: LineBox[];
|
|
52
|
+
readonly lineSolution: LineSolution;
|
|
53
|
+
readonly clusters: Cluster[];
|
|
54
|
+
readonly justificationPlans: (JustificationPlan | null)[];
|
|
55
|
+
readonly autoSpaceDecisions: AutoSpaceDecisionInfo[];
|
|
56
|
+
readonly edgeTrimDecisions: LineEdgeTrimDecisionInfo[];
|
|
57
|
+
readonly decorationDecisions: DecorationDecisionInfo[];
|
|
58
|
+
readonly decorationSegments: DecorationSegmentInfo[];
|
|
59
|
+
readonly rubyDecisions: RubyDecisionInfo[];
|
|
60
|
+
readonly bopomofoDecisions: BopomofoDecisionInfo[];
|
|
61
|
+
readonly mandatoryBreakDecisions: MandatoryBreakDecisionInfo[];
|
|
62
|
+
readonly maxLinesDecision: MaxLinesDecisionInfo | null;
|
|
63
|
+
readonly lineSpacingDecision: LineSpacingDecisionInfo | null;
|
|
64
|
+
readonly rubyLineHeightDecision: RubyLineHeightDecisionInfo | null;
|
|
65
|
+
readonly inlineObjectLineHeightDecision: InlineObjectLineHeightDecisionInfo | null;
|
|
66
|
+
readonly kinsokuDecision: KinsokuDecisionInfo;
|
|
67
|
+
readonly contextualKinsokuDecisions: ContextualKinsokuDecisionInfo[];
|
|
68
|
+
readonly lineLengthGridDecision: LineLengthGridDecisionInfo;
|
|
69
|
+
readonly firstLineIndentDecision: FirstLineIndentDecisionInfo;
|
|
70
|
+
readonly inlineBoxDecisions: InlineBoxDecisionInfo[];
|
|
71
|
+
readonly inlineObjectDecisions: InlineObjectDecisionInfo[];
|
|
72
|
+
readonly inlineObjectPunctuationAttachmentDecisions: InlineObjectPunctuationAttachmentDecisionInfo[];
|
|
73
|
+
readonly zeroWidthBreakDecisions: ZeroWidthBreakDecisionInfo[];
|
|
74
|
+
readonly breakOpportunityDecisions: BreakOpportunityDecisionInfo[];
|
|
75
|
+
readonly emergencyTrackingEligibilityDecisions: EmergencyTrackingEligibilityDecisionInfo[];
|
|
76
|
+
readonly progressiveBreakOpportunities: SortedMapTable<number, ProgressiveBreakOpportunity>;
|
|
77
|
+
constructor(text: string, fontDecisions: FontDecision[], punctuationGlyphSubstitutor: ClreqPunctuationGlyphSubstitutor, substitutionRollbacks: SortedMapTable<TextRange, string>, shapingDecisions: ShapingDecisionInfo[], metricDecisions: ClusterMetricDecision[], punctuationAtoms: PunctuationAtom[], geometryDecisions: ClusterGeometryDecisionInfo[], spacingPlan: PunctuationSpacingCompressionResult, attachedPunctuationBoundary: AttachedInlinePunctuationBoundaryResult, roleOverrideInfos: RoleOverrideInfo[], laidOutLines: LineBox[], lineSolution: LineSolution, clusters: Cluster[], justificationPlans: (JustificationPlan | null)[], autoSpaceDecisions: AutoSpaceDecisionInfo[], edgeTrimDecisions: LineEdgeTrimDecisionInfo[], decorationDecisions: DecorationDecisionInfo[], decorationSegments: DecorationSegmentInfo[], rubyDecisions: RubyDecisionInfo[], bopomofoDecisions: BopomofoDecisionInfo[], mandatoryBreakDecisions: MandatoryBreakDecisionInfo[], maxLinesDecision: MaxLinesDecisionInfo | null, lineSpacingDecision: LineSpacingDecisionInfo | null, rubyLineHeightDecision: RubyLineHeightDecisionInfo | null, inlineObjectLineHeightDecision: InlineObjectLineHeightDecisionInfo | null, kinsokuDecision: KinsokuDecisionInfo, contextualKinsokuDecisions: ContextualKinsokuDecisionInfo[], lineLengthGridDecision: LineLengthGridDecisionInfo, firstLineIndentDecision: FirstLineIndentDecisionInfo, inlineBoxDecisions: InlineBoxDecisionInfo[], inlineObjectDecisions: InlineObjectDecisionInfo[], inlineObjectPunctuationAttachmentDecisions: InlineObjectPunctuationAttachmentDecisionInfo[], zeroWidthBreakDecisions: ZeroWidthBreakDecisionInfo[], breakOpportunityDecisions: BreakOpportunityDecisionInfo[], emergencyTrackingEligibilityDecisions: EmergencyTrackingEligibilityDecisionInfo[], progressiveBreakOpportunities: SortedMapTable<number, ProgressiveBreakOpportunity>);
|
|
78
|
+
toString(): string;
|
|
79
|
+
}
|
|
80
|
+
export declare class LayoutDebugAssembly {
|
|
81
|
+
private static repairCandidateToDecisionInfo;
|
|
82
|
+
private static toPushInAllocations;
|
|
83
|
+
private static repairOptionToDecisionInfo;
|
|
84
|
+
private static repairOptionName;
|
|
85
|
+
private static progressiveBreakTierName;
|
|
86
|
+
static buildLayoutDebugInfo(engine: ExplainableStubParagraphLayoutEngine, stage: LayoutDebugStageInput): LayoutDebugInfo;
|
|
87
|
+
}
|