@tiqian/engine 0.0.1 → 0.1.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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,10 @@
|
|
|
1
|
+
import { type LayoutResult } from "./../core/LayoutResult.js";
|
|
2
|
+
import { type Plan } from "./../protocol/Plan.js";
|
|
3
|
+
export declare class PlanLowering {
|
|
4
|
+
private static f32;
|
|
5
|
+
private static rangeKey;
|
|
6
|
+
private static styleAt;
|
|
7
|
+
static toPlan(result: LayoutResult, renderEvidence: boolean): Plan;
|
|
8
|
+
private static endReasonFrom;
|
|
9
|
+
private static toArray;
|
|
10
|
+
}
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { DecorationKind } from "./../core/DecorationKind.js";
|
|
3
|
+
import { LayoutQueries } from "./../core/LayoutQueries.js";
|
|
4
|
+
import { FontRole } from "./../font/FontRole.js";
|
|
5
|
+
import { PlanEndReason } from "./../protocol/PlanEndReason.js";
|
|
6
|
+
import { SortedTable, dictKey } from "../../../runtime.js";
|
|
7
|
+
export class PlanLowering {
|
|
8
|
+
static f32(v) {
|
|
9
|
+
return v;
|
|
10
|
+
}
|
|
11
|
+
static rangeKey(r) {
|
|
12
|
+
return String(r.start) + ":" + String(r.end);
|
|
13
|
+
}
|
|
14
|
+
static styleAt(result, offset) {
|
|
15
|
+
const spanSrc = result.input.content.spans;
|
|
16
|
+
for (let si = 0, count = spanSrc.length; si < count; si += 1) {
|
|
17
|
+
const span = spanSrc[si];
|
|
18
|
+
if (offset >= span.range.start && offset < span.range.end) {
|
|
19
|
+
return span.style;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return result.input.textStyle;
|
|
23
|
+
}
|
|
24
|
+
static toPlan(result, renderEvidence) {
|
|
25
|
+
const naturalB = SortedTable.mapBuilder(SortedTable.compareStrings);
|
|
26
|
+
const featuresB = SortedTable.mapBuilder(SortedTable.compareStrings);
|
|
27
|
+
const fontsB = SortedTable.mapBuilder(SortedTable.compareStrings);
|
|
28
|
+
const glyphIdsB = SortedTable.mapBuilder(SortedTable.compareStrings);
|
|
29
|
+
for (let ri = 0, count7 = result.glyphRuns.length; ri < count7; ri += 1) {
|
|
30
|
+
const run = result.glyphRuns[ri];
|
|
31
|
+
for (let gi = 0, count8 = run.glyphs.length; gi < count8; gi += 1) {
|
|
32
|
+
const glyph = run.glyphs[gi];
|
|
33
|
+
const k = PlanLowering.rangeKey(glyph.clusterRange);
|
|
34
|
+
const priorNatural = naturalB.get(k);
|
|
35
|
+
const priorN = (priorNatural === null ? 0.0 : priorNatural);
|
|
36
|
+
naturalB.put(k, priorN + glyph.advance);
|
|
37
|
+
if (run.openTypeFeatures.length > 0) {
|
|
38
|
+
let fs = featuresB.get(k);
|
|
39
|
+
if (fs === null) {
|
|
40
|
+
fs = [];
|
|
41
|
+
}
|
|
42
|
+
for (let fi = 0, count9 = run.openTypeFeatures.length; fi < count9; fi += 1) {
|
|
43
|
+
const f = run.openTypeFeatures[fi];
|
|
44
|
+
if (fs.indexOf(f) < 0) {
|
|
45
|
+
fs.push(f);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
featuresB.put(k, (fs));
|
|
49
|
+
}
|
|
50
|
+
const rfk = glyph.renderFontKey;
|
|
51
|
+
if (rfk !== null) {
|
|
52
|
+
fontsB.put(k, (rfk));
|
|
53
|
+
}
|
|
54
|
+
let ids = glyphIdsB.get(k);
|
|
55
|
+
if (ids === null) {
|
|
56
|
+
ids = [];
|
|
57
|
+
}
|
|
58
|
+
ids.push(String(glyph.id));
|
|
59
|
+
glyphIdsB.put(k, (ids));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const zeroB = SortedTable.mapBuilder(SortedTable.compareStrings);
|
|
63
|
+
const zeroSrc = result.debug.zeroWidthBreakDecisions;
|
|
64
|
+
for (let zi = 0, count2 = zeroSrc.length; zi < count2; zi += 1) {
|
|
65
|
+
zeroB.put(PlanLowering.rangeKey(zeroSrc[zi].range), true);
|
|
66
|
+
}
|
|
67
|
+
const shapingB = SortedTable.mapBuilder(SortedTable.compareStrings);
|
|
68
|
+
const shapingSrc = result.debug.shapingDecisions;
|
|
69
|
+
for (let zi2 = 0, count3 = shapingSrc.length; zi2 < count3; zi2 += 1) {
|
|
70
|
+
shapingB.put(PlanLowering.rangeKey(shapingSrc[zi2].range), shapingSrc[zi2]);
|
|
71
|
+
}
|
|
72
|
+
const punctB = SortedTable.mapBuilder(SortedTable.compareStrings);
|
|
73
|
+
const punctSrc = result.debug.punctuationDecisions;
|
|
74
|
+
for (let zi3 = 0, count4 = punctSrc.length; zi3 < count4; zi3 += 1) {
|
|
75
|
+
punctB.put(PlanLowering.rangeKey(punctSrc[zi3].range), punctSrc[zi3]);
|
|
76
|
+
}
|
|
77
|
+
const inlineAdvanceB = SortedTable.mapBuilder(SortedTable.compareStrings);
|
|
78
|
+
const inlineObjSrc = result.input.inlineObjects;
|
|
79
|
+
for (let zi4 = 0, count5 = inlineObjSrc.length; zi4 < count5; zi4 += 1) {
|
|
80
|
+
inlineAdvanceB.put(PlanLowering.rangeKey(inlineObjSrc[zi4].range), inlineObjSrc[zi4].advance);
|
|
81
|
+
}
|
|
82
|
+
const edgeStartB = SortedTable.mapBuilder(SortedTable.compareStrings);
|
|
83
|
+
const edgeEndB = SortedTable.mapBuilder(SortedTable.compareStrings);
|
|
84
|
+
const boxSrc = result.input.inlineBoxes;
|
|
85
|
+
for (let bi = 0, count6 = boxSrc.length; bi < count6; bi += 1) {
|
|
86
|
+
const b = boxSrc[bi];
|
|
87
|
+
if (b.inlineStart !== 0) {
|
|
88
|
+
const sk = String(b.range.start);
|
|
89
|
+
const priorStart = edgeStartB.get(sk);
|
|
90
|
+
const pStart = (priorStart === null ? 0.0 : priorStart);
|
|
91
|
+
edgeStartB.put(sk, pStart + b.inlineStart);
|
|
92
|
+
}
|
|
93
|
+
if (b.inlineEnd !== 0) {
|
|
94
|
+
const ek = String(b.range.end);
|
|
95
|
+
const priorEnd = edgeEndB.get(ek);
|
|
96
|
+
const pEnd = (priorEnd === null ? 0.0 : priorEnd);
|
|
97
|
+
edgeEndB.put(ek, pEnd + b.inlineEnd);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const natural = naturalB.build();
|
|
101
|
+
const features = featuresB.build();
|
|
102
|
+
const fonts = fontsB.build();
|
|
103
|
+
const glyphIds = glyphIdsB.build();
|
|
104
|
+
const zero = zeroB.build();
|
|
105
|
+
const shaping = shapingB.build();
|
|
106
|
+
const punct = punctB.build();
|
|
107
|
+
const inlineAdvance = inlineAdvanceB.build();
|
|
108
|
+
const edgeStart = edgeStartB.build();
|
|
109
|
+
const edgeEnd = edgeEndB.build();
|
|
110
|
+
const lines = [];
|
|
111
|
+
for (let li = 0, count10 = result.lines.length; li < count10; li += 1) {
|
|
112
|
+
const line = result.lines[li];
|
|
113
|
+
const cells = [];
|
|
114
|
+
{
|
|
115
|
+
const _g110 = LayoutQueries.positionedClustersForLine(result, line);
|
|
116
|
+
for (let _g_index = 0, count11 = _g110.length; _g_index < count11; _g_index += 1) {
|
|
117
|
+
const p = _g110[_g_index];
|
|
118
|
+
const c = result.clusters[p.clusterIndex];
|
|
119
|
+
const ck = PlanLowering.rangeKey(c.range);
|
|
120
|
+
if (!(c.displayText.length > 0 || zero.has(ck) || renderEvidence && inlineAdvance.has(ck))) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
const natW = (natural.has(ck) ? natural.get(ck) : c.advance);
|
|
124
|
+
let inlineObj = null;
|
|
125
|
+
let advOverride = null;
|
|
126
|
+
let renderFam = null;
|
|
127
|
+
let dash = null;
|
|
128
|
+
let lang = null;
|
|
129
|
+
let face = null;
|
|
130
|
+
let gIds = null;
|
|
131
|
+
let ev = null;
|
|
132
|
+
let inkFloor = null;
|
|
133
|
+
let bodyW = null;
|
|
134
|
+
let latin = false;
|
|
135
|
+
let styleDelta = null;
|
|
136
|
+
if (renderEvidence) {
|
|
137
|
+
inlineObj = (inlineAdvance.has(ck) ? inlineAdvance.get(ck) : null);
|
|
138
|
+
const glyphW = (inlineObj === null ? natW : inlineObj);
|
|
139
|
+
advOverride = (c.advance !== glyphW ? c.advance : null);
|
|
140
|
+
renderFam = (fonts.has(ck) ? fonts.get(ck) : null);
|
|
141
|
+
const sd = shaping.get(ck);
|
|
142
|
+
dash = (sd !== null ? sd.strategy : null);
|
|
143
|
+
lang = (sd !== null ? sd.language : null);
|
|
144
|
+
face = (sd !== null ? sd.resolvedFace : null);
|
|
145
|
+
gIds = (glyphIds.has(ck) && glyphIds.get(ck).length > 0 ? glyphIds.get(ck).join(",") : null);
|
|
146
|
+
ev = (sd !== null ? sd.reason : null);
|
|
147
|
+
const pd = punct.get(ck);
|
|
148
|
+
if (pd !== null && pd.inkContainmentApplied && pd.inkContainmentBodyFloor !== null) {
|
|
149
|
+
inkFloor = pd.inkContainmentBodyFloor;
|
|
150
|
+
bodyW = pd.bodyWidth;
|
|
151
|
+
}
|
|
152
|
+
const fdSrc = result.debug.fontDecisions;
|
|
153
|
+
for (let fi2 = 0, count12 = fdSrc.length; fi2 < count12; fi2 += 1) {
|
|
154
|
+
const fd = fdSrc[fi2];
|
|
155
|
+
if (c.range.start >= fd.range.start && c.range.end <= fd.range.end && fd.role === FontRole.LatinText.kind) {
|
|
156
|
+
latin = true;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
const cs = PlanLowering.styleAt(result, c.range.start);
|
|
160
|
+
styleDelta = (dictKey(cs) !== dictKey(result.input.textStyle) ? { fontSize: (cs.fontSize !== result.input.textStyle.fontSize ? cs.fontSize : null), fontWeight: (cs.fontWeight !== result.input.textStyle.fontWeight ? cs.fontWeight : null), italic: (cs.italic !== result.input.textStyle.italic ? cs.italic : null) } : null);
|
|
161
|
+
}
|
|
162
|
+
const feats = features.get(ck);
|
|
163
|
+
cells.push({ rangeStart: c.range.start, rangeEnd: c.range.end, source: c.text, display: c.displayText, drawX: p.drawX, naturalWidth: natW, leadingLayoutAdvance: c.leadingLayoutAdvance, shapingBoundary: c.range.end - c.range.start > 1, openTypeFeatures: (feats !== null ? feats : []), renderFontFamily: renderFam, dashStrategy: dash, shapingLanguage: lang, resolvedFace: face, glyphIds: gIds, shapingEvidence: ev, punctuationInkFloor: inkFloor, punctuationBodyWidth: bodyW, latin, advance: advOverride, inlineObject: inlineObj, styleDelta });
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
lines.push({ rangeStart: line.range.start, rangeEnd: line.range.end, top: line.top, bottom: line.bottom, baseline: line.baseline, indent: line.indent, visualWidth: line.visualWidth, hyphenAdvance: line.hyphenAdvance, endReason: PlanLowering.endReasonFrom(line.endReason), cells });
|
|
167
|
+
}
|
|
168
|
+
const emphasisRanges = [];
|
|
169
|
+
const inlineEdges = [];
|
|
170
|
+
const rubyDecisions = [];
|
|
171
|
+
const bopomofoDecisions = [];
|
|
172
|
+
const decorationSegments = [];
|
|
173
|
+
const emphasisDots = [];
|
|
174
|
+
let fontSize = null;
|
|
175
|
+
let overlayWidth = null;
|
|
176
|
+
if (renderEvidence) {
|
|
177
|
+
fontSize = result.input.textStyle.fontSize;
|
|
178
|
+
overlayWidth = result.size.width;
|
|
179
|
+
const emphSrc = result.input.decorations;
|
|
180
|
+
for (let ei = 0, count13 = emphSrc.length; ei < count13; ei += 1) {
|
|
181
|
+
const d = emphSrc[ei];
|
|
182
|
+
if (d.kind.kind === "Emphasis") {
|
|
183
|
+
emphasisRanges.push({ start: d.range.start, end: d.range.end });
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
const offsets = [];
|
|
187
|
+
const parseHexCode = (s) => { let a = 0, z = s.length; while (a < z) {
|
|
188
|
+
const c = s.charCodeAt(a);
|
|
189
|
+
if (c === 32 || (c >= 9 && c <= 13)) {
|
|
190
|
+
a++;
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
} while (z > a) {
|
|
196
|
+
const c = s.charCodeAt(z - 1);
|
|
197
|
+
if (c === 32 || (c >= 9 && c <= 13)) {
|
|
198
|
+
z--;
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
} let i = a; const c0 = s.charCodeAt(i); if (c0 === 43 || c0 === 45) {
|
|
204
|
+
i++;
|
|
205
|
+
} let radix = 10; if (i + 1 < z && s.charCodeAt(i) === 48 && (s.charCodeAt(i + 1) === 120 || s.charCodeAt(i + 1) === 88)) {
|
|
206
|
+
i += 2;
|
|
207
|
+
radix = 16;
|
|
208
|
+
} const st = i; while (i < z) {
|
|
209
|
+
const c = s.charCodeAt(i);
|
|
210
|
+
if ((c >= 48 && c <= 57) || (radix === 16 && ((c >= 97 && c <= 102) || (c >= 65 && c <= 70)))) {
|
|
211
|
+
i++;
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
} if (i === st || i !== z) {
|
|
217
|
+
return null;
|
|
218
|
+
} const n = Number.parseInt(s.substring(a, z), radix); if (n >= -2147483648 && n <= 2147483647) {
|
|
219
|
+
return n;
|
|
220
|
+
} return null; };
|
|
221
|
+
for (let oi = 0, count18 = edgeStart.size(); oi < count18; oi += 1) {
|
|
222
|
+
offsets.push((parseHexCode(edgeStart.keyAt(oi))));
|
|
223
|
+
}
|
|
224
|
+
const parseHexCode2 = (s) => { let a = 0, z = s.length; while (a < z) {
|
|
225
|
+
const c = s.charCodeAt(a);
|
|
226
|
+
if (c === 32 || (c >= 9 && c <= 13)) {
|
|
227
|
+
a++;
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
} while (z > a) {
|
|
233
|
+
const c = s.charCodeAt(z - 1);
|
|
234
|
+
if (c === 32 || (c >= 9 && c <= 13)) {
|
|
235
|
+
z--;
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
} let i = a; const c0 = s.charCodeAt(i); if (c0 === 43 || c0 === 45) {
|
|
241
|
+
i++;
|
|
242
|
+
} let radix = 10; if (i + 1 < z && s.charCodeAt(i) === 48 && (s.charCodeAt(i + 1) === 120 || s.charCodeAt(i + 1) === 88)) {
|
|
243
|
+
i += 2;
|
|
244
|
+
radix = 16;
|
|
245
|
+
} const st = i; while (i < z) {
|
|
246
|
+
const c = s.charCodeAt(i);
|
|
247
|
+
if ((c >= 48 && c <= 57) || (radix === 16 && ((c >= 97 && c <= 102) || (c >= 65 && c <= 70)))) {
|
|
248
|
+
i++;
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
} if (i === st || i !== z) {
|
|
254
|
+
return null;
|
|
255
|
+
} const n = Number.parseInt(s.substring(a, z), radix); if (n >= -2147483648 && n <= 2147483647) {
|
|
256
|
+
return n;
|
|
257
|
+
} return null; };
|
|
258
|
+
for (let ei2 = 0, count19 = edgeEnd.size(); ei2 < count19; ei2 += 1) {
|
|
259
|
+
const ev2 = parseHexCode2(edgeEnd.keyAt(ei2));
|
|
260
|
+
if (offsets.indexOf((ev2)) < 0) {
|
|
261
|
+
offsets.push((ev2));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
let oi2 = 1;
|
|
265
|
+
while (oi2 < offsets.length) {
|
|
266
|
+
const ov = offsets[oi2];
|
|
267
|
+
let oj = oi2 - 1;
|
|
268
|
+
while (oj >= 0 && offsets[oj] > ov) {
|
|
269
|
+
offsets[oj + 1] = offsets[oj];
|
|
270
|
+
oj--;
|
|
271
|
+
}
|
|
272
|
+
offsets[oj + 1] = ov;
|
|
273
|
+
oi2++;
|
|
274
|
+
}
|
|
275
|
+
for (let _g_index1 = 0, count20 = offsets.length; _g_index1 < count20; _g_index1 += 1) {
|
|
276
|
+
const offset = offsets[_g_index1];
|
|
277
|
+
const sk2 = String(offset);
|
|
278
|
+
inlineEdges.push({ offset, inlineStart: (edgeStart.has(sk2) ? edgeStart.get(sk2) : null), inlineEnd: (edgeEnd.has(sk2) ? edgeEnd.get(sk2) : null) });
|
|
279
|
+
}
|
|
280
|
+
const rubySrc = result.debug.rubyDecisions;
|
|
281
|
+
for (let ri2 = 0, count14 = rubySrc.length; ri2 < count14; ri2 += 1) {
|
|
282
|
+
const r = rubySrc[ri2];
|
|
283
|
+
rubyDecisions.push({ baseRangeStart: r.baseRange.start, baseRangeEnd: r.baseRange.end, text: r.text, centerX: r.centerX, baselineY: r.baselineY, fontSize: r.fontSize, fontWeight: r.fontWeight, fontFamilies: PlanLowering.toArray(r.fontFamilies), ascent: r.ascent });
|
|
284
|
+
}
|
|
285
|
+
const bopoSrc = result.debug.bopomofoDecisions;
|
|
286
|
+
for (let bi2 = 0, count15 = bopoSrc.length; bi2 < count15; bi2 += 1) {
|
|
287
|
+
const z = bopoSrc[bi2];
|
|
288
|
+
const placements = [];
|
|
289
|
+
for (let pj = 0, count21 = z.placements.length; pj < count21; pj += 1) {
|
|
290
|
+
const pl = z.placements[pj];
|
|
291
|
+
placements.push({ text: pl.text, role: pl.role.kind, left: pl.left, top: pl.top, width: pl.width, height: pl.height });
|
|
292
|
+
}
|
|
293
|
+
bopomofoDecisions.push({ baseRangeStart: z.baseRange.start, baseRangeEnd: z.baseRange.end, text: z.text, fontWeight: z.fontWeight, fontFamilies: PlanLowering.toArray(z.fontFamilies), placements });
|
|
294
|
+
}
|
|
295
|
+
const segSrc = result.debug.decorationSegments;
|
|
296
|
+
for (let si = 0, count16 = segSrc.length; si < count16; si += 1) {
|
|
297
|
+
const s = segSrc[si];
|
|
298
|
+
if (s.kind === DecorationKind.ProperNoun.kind || s.kind === DecorationKind.BookTitle.kind) {
|
|
299
|
+
decorationSegments.push({ kind: s.kind, left: s.left, top: s.top, right: s.right, sourceRangeStart: s.sourceRange.start, sourceRangeEnd: s.sourceRange.end });
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
const dotSrc = result.debug.decorationDecisions;
|
|
303
|
+
for (let di = 0, count17 = dotSrc.length; di < count17; di += 1) {
|
|
304
|
+
const d2 = dotSrc[di];
|
|
305
|
+
if (d2.applied && d2.kind === DecorationKind.Emphasis.kind && d2.dotDiameter > 0) {
|
|
306
|
+
emphasisDots.push({ clusterRangeStart: PlanLowering.f32(d2.clusterRange.start), anchorX: d2.anchorX, anchorY: d2.anchorY, dotDiameter: d2.dotDiameter });
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return { width: result.input.constraints.maxWidth, height: result.size.height, lines, emphasisRanges, inlineEdges, rubyDecisions, bopomofoDecisions, fontSize, overlayWidth, decorationSegments, emphasisDots };
|
|
311
|
+
}
|
|
312
|
+
static endReasonFrom(reason) {
|
|
313
|
+
switch (reason.kind) {
|
|
314
|
+
case "AutoWrap":
|
|
315
|
+
return PlanEndReason.AutoWrap;
|
|
316
|
+
case "MandatoryBreak":
|
|
317
|
+
return PlanEndReason.MandatoryBreak;
|
|
318
|
+
case "ParagraphEnd":
|
|
319
|
+
return PlanEndReason.ParagraphEnd;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
static toArray(src) {
|
|
323
|
+
const out = [];
|
|
324
|
+
for (let i = 0, count22 = src.length; i < count22; i += 1) {
|
|
325
|
+
out.push(src[i]);
|
|
326
|
+
}
|
|
327
|
+
return out;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type LayoutResult } from "./../core/LayoutResult.js";
|
|
2
|
+
import { type Plan } from "./../protocol/Plan.js";
|
|
3
|
+
export declare function ecmaJsonNumber(floatValue: number): string;
|
|
4
|
+
export declare class PreparedParagraphFns {
|
|
5
|
+
static toPreparedParagraphJson(result: LayoutResult, renderEvidence: boolean): string;
|
|
6
|
+
static toPlanWithDiagnosticsJson(result: LayoutResult, renderEvidence: boolean, zeroAdvanceEpsilonPx: number): string;
|
|
7
|
+
static toPlanWithDiagnostics(result: LayoutResult, renderEvidence: boolean, zeroAdvanceEpsilonPx: number): PlanWithDiagnostics;
|
|
8
|
+
static toPackedPlanBytes(result: LayoutResult): Uint8Array;
|
|
9
|
+
}
|
|
10
|
+
export interface PlanWithDiagnostics {
|
|
11
|
+
plan: Plan;
|
|
12
|
+
diagnostics: PlanDiagnostics;
|
|
13
|
+
}
|
|
14
|
+
export interface PlanDiagnostics {
|
|
15
|
+
capabilityIssues: PlanCapabilityIssue[];
|
|
16
|
+
advanceSuspects: PlanAdvanceSuspect[];
|
|
17
|
+
}
|
|
18
|
+
export interface PlanCapabilityIssue {
|
|
19
|
+
name: string;
|
|
20
|
+
reason: string;
|
|
21
|
+
rangeStart: number;
|
|
22
|
+
rangeEnd: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function comparePlanCapabilityIssue(a: PlanCapabilityIssue, b: PlanCapabilityIssue): number;
|
|
25
|
+
export interface PlanAdvanceSuspect {
|
|
26
|
+
displayText: string;
|
|
27
|
+
advance: string;
|
|
28
|
+
reason: string;
|
|
29
|
+
rangeStart: number;
|
|
30
|
+
rangeEnd: number;
|
|
31
|
+
}
|
|
32
|
+
export declare function comparePlanAdvanceSuspect(a: PlanAdvanceSuspect, b: PlanAdvanceSuspect): number;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { PlanLowering } from "./PlanLowering.js";
|
|
3
|
+
import { PlanJson } from "./../protocol/PlanJson.js";
|
|
4
|
+
import { PlanJsonNumber } from "./../protocol/PlanJsonNumber.js";
|
|
5
|
+
import { PlanPacked } from "./../protocol/PlanPacked.js";
|
|
6
|
+
import { formatFloatRuntime } from "../../../runtime.js";
|
|
7
|
+
export function ecmaJsonNumber(floatValue) {
|
|
8
|
+
return PlanJsonNumber.ecmaJsonNumber(floatValue);
|
|
9
|
+
}
|
|
10
|
+
export class PreparedParagraphFns {
|
|
11
|
+
static toPreparedParagraphJson(result, renderEvidence) {
|
|
12
|
+
const plan = PlanLowering.toPlan(result, renderEvidence);
|
|
13
|
+
return PlanJson.encode(plan);
|
|
14
|
+
}
|
|
15
|
+
static toPlanWithDiagnosticsJson(result, renderEvidence, zeroAdvanceEpsilonPx) {
|
|
16
|
+
const out = [];
|
|
17
|
+
out.push("{\"plan\":");
|
|
18
|
+
PlanJsonNumber.appendJsonString(out, PreparedParagraphFns.toPreparedParagraphJson(result, renderEvidence));
|
|
19
|
+
out.push(",\"diagnostics\":{\"capabilityIssues\":[");
|
|
20
|
+
let first = true;
|
|
21
|
+
const shapingDiagSrc = result.debug.shapingDecisions;
|
|
22
|
+
for (let di = 0, count = shapingDiagSrc.length; di < count; di += 1) {
|
|
23
|
+
const d = shapingDiagSrc[di];
|
|
24
|
+
if (d.capabilityIssue !== null) {
|
|
25
|
+
if (!first) {
|
|
26
|
+
out.push(",");
|
|
27
|
+
}
|
|
28
|
+
first = false;
|
|
29
|
+
out.push("{\"name\":");
|
|
30
|
+
PlanJsonNumber.appendJsonString(out, (d.capabilityIssue));
|
|
31
|
+
out.push(",\"reason\":");
|
|
32
|
+
PlanJsonNumber.appendJsonString(out, d.reason);
|
|
33
|
+
out.push(",\"rangeStart\":");
|
|
34
|
+
out.push(String(d.range.start));
|
|
35
|
+
out.push(",\"rangeEnd\":");
|
|
36
|
+
out.push(String(d.range.end));
|
|
37
|
+
out.push("}");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
out.push("],\"advanceSuspects\":[");
|
|
41
|
+
first = true;
|
|
42
|
+
for (let di2 = 0, count2 = shapingDiagSrc.length; di2 < count2; di2 += 1) {
|
|
43
|
+
const d2 = shapingDiagSrc[di2];
|
|
44
|
+
if (!(Number.isFinite(d2.advance) && d2.advance > zeroAdvanceEpsilonPx)) {
|
|
45
|
+
if (!first) {
|
|
46
|
+
out.push(",");
|
|
47
|
+
}
|
|
48
|
+
first = false;
|
|
49
|
+
out.push("{\"displayText\":");
|
|
50
|
+
PlanJsonNumber.appendJsonString(out, d2.displayText);
|
|
51
|
+
out.push(",\"advance\":\"");
|
|
52
|
+
out.push((Number.isFinite(d2.advance) ? PlanJsonNumber.ecmaJsonNumber(d2.advance) : formatFloatRuntime(d2.advance)));
|
|
53
|
+
out.push("\",\"reason\":");
|
|
54
|
+
PlanJsonNumber.appendJsonString(out, d2.reason);
|
|
55
|
+
out.push(",\"rangeStart\":");
|
|
56
|
+
out.push(String(d2.range.start));
|
|
57
|
+
out.push(",\"rangeEnd\":");
|
|
58
|
+
out.push(String(d2.range.end));
|
|
59
|
+
out.push("}");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
out.push("]}}");
|
|
63
|
+
return out.join("");
|
|
64
|
+
}
|
|
65
|
+
static toPlanWithDiagnostics(result, renderEvidence, zeroAdvanceEpsilonPx) {
|
|
66
|
+
const plan = PlanLowering.toPlan(result, renderEvidence);
|
|
67
|
+
const capabilityIssues = [];
|
|
68
|
+
const advanceSuspects = [];
|
|
69
|
+
const shapingDiagSrc = result.debug.shapingDecisions;
|
|
70
|
+
for (let _g_index = 0, count3 = shapingDiagSrc.length; _g_index < count3; _g_index += 1) {
|
|
71
|
+
const d = shapingDiagSrc[_g_index];
|
|
72
|
+
const issue = d.capabilityIssue;
|
|
73
|
+
if (issue !== null) {
|
|
74
|
+
capabilityIssues.push({ name: issue, reason: d.reason, rangeStart: d.range.start, rangeEnd: d.range.end });
|
|
75
|
+
}
|
|
76
|
+
if (!(Number.isFinite(d.advance) && d.advance > zeroAdvanceEpsilonPx)) {
|
|
77
|
+
advanceSuspects.push({ displayText: d.displayText, advance: (Number.isFinite(d.advance) ? PlanJsonNumber.ecmaJsonNumber(d.advance) : formatFloatRuntime(d.advance)), reason: d.reason, rangeStart: d.range.start, rangeEnd: d.range.end });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return { plan, diagnostics: { capabilityIssues, advanceSuspects } };
|
|
81
|
+
}
|
|
82
|
+
static toPackedPlanBytes(result) {
|
|
83
|
+
const plan = PlanLowering.toPlan(result, false);
|
|
84
|
+
return PlanPacked.encode(plan);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export function comparePlanCapabilityIssue(a, b) {
|
|
88
|
+
if (a === b)
|
|
89
|
+
return 0;
|
|
90
|
+
if (a.name !== b.name)
|
|
91
|
+
return a.name < b.name ? -1 : 1;
|
|
92
|
+
if (a.reason !== b.reason)
|
|
93
|
+
return a.reason < b.reason ? -1 : 1;
|
|
94
|
+
if (a.rangeStart !== b.rangeStart)
|
|
95
|
+
return a.rangeStart - b.rangeStart;
|
|
96
|
+
if (a.rangeEnd !== b.rangeEnd)
|
|
97
|
+
return a.rangeEnd - b.rangeEnd;
|
|
98
|
+
return 0;
|
|
99
|
+
}
|
|
100
|
+
export function comparePlanAdvanceSuspect(a, b) {
|
|
101
|
+
if (a === b)
|
|
102
|
+
return 0;
|
|
103
|
+
if (a.displayText !== b.displayText)
|
|
104
|
+
return a.displayText < b.displayText ? -1 : 1;
|
|
105
|
+
if (a.advance !== b.advance)
|
|
106
|
+
return a.advance < b.advance ? -1 : 1;
|
|
107
|
+
if (a.reason !== b.reason)
|
|
108
|
+
return a.reason < b.reason ? -1 : 1;
|
|
109
|
+
if (a.rangeStart !== b.rangeStart)
|
|
110
|
+
return a.rangeStart - b.rangeStart;
|
|
111
|
+
if (a.rangeEnd !== b.rangeEnd)
|
|
112
|
+
return a.rangeEnd - b.rangeEnd;
|
|
113
|
+
return 0;
|
|
114
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type Cluster } from "./../core/Cluster.js";
|
|
2
|
+
import { type IntRange } from "./../core/IntRange.js";
|
|
3
|
+
import { type TextRange } from "./../core/TextRange.js";
|
|
4
|
+
import { SortedMapTable, SortedSetTable } from "../../../runtime.js";
|
|
5
|
+
export declare class ProgressiveBreakOpportunity {
|
|
6
|
+
readonly tier: ProgressiveBreakTier;
|
|
7
|
+
readonly spanRange: TextRange;
|
|
8
|
+
readonly precedingWhitespaceStretchCapacity: number;
|
|
9
|
+
constructor(tier: ProgressiveBreakTier, spanRange: TextRange, precedingWhitespaceStretchCapacity?: number | null);
|
|
10
|
+
toString(): string;
|
|
11
|
+
}
|
|
12
|
+
export declare function lineLimit(maxWidth: number, firstLineIndent: number, lineStartCluster: number): number;
|
|
13
|
+
export declare class ProgressiveBreakDecisions {
|
|
14
|
+
static decideProgressiveBreak(lineStart: number, overflowAt: number, opportunities: SortedMapTable<number, ProgressiveBreakOpportunity>, adjustedClusters?: Cluster[] | null, lineLimit?: number | null, cjkInterCharBoundaries?: SortedSetTable<number> | null, maxCjkStretchPerGap?: number | null, sinoWesternBoundaries?: SortedSetTable<number> | null, sinoWesternStretchCap?: number | null): number;
|
|
15
|
+
static progressiveCandidateAllowed(lineStart: number, rawGreedy: number, candidateEnd: number, opportunities: SortedMapTable<number, ProgressiveBreakOpportunity>, adjustedClusters?: Cluster[] | null, lineLimit?: number | null, cjkInterCharBoundaries?: SortedSetTable<number> | null, maxCjkStretchPerGap?: number | null, sinoWesternBoundaries?: SortedSetTable<number> | null, sinoWesternStretchCap?: number | null): boolean;
|
|
16
|
+
private static progressiveBreakPriorityForLine;
|
|
17
|
+
private static progressiveCandidateStretchDensity;
|
|
18
|
+
private static hasWhitespaceUnit;
|
|
19
|
+
static decideHyphenBreak(lineStart: number, overflowAt: number, adjustedClusters: Cluster[], lineLimit: number, hyphenBreakClusters: SortedSetTable<number>, cjkInterCharBoundaries: SortedSetTable<number>, maxCjkStretchPerGap: number, sinoWesternBoundaries?: SortedSetTable<number> | null, sinoWesternStretchCap?: number | null): number;
|
|
20
|
+
static adjustBreakForLineEnd(breakAt: number, lineStart: number, forbiddenLineEndClusters: SortedSetTable<number>): number;
|
|
21
|
+
static adjustBreakForUnbreakables(breakAt: number, lineStart: number, unbreakableRanges: UnbreakableRanges): number;
|
|
22
|
+
}
|
|
23
|
+
export declare class ShrinkOpportunity {
|
|
24
|
+
readonly clusterIndex: number;
|
|
25
|
+
readonly tier: number;
|
|
26
|
+
readonly capacity: number;
|
|
27
|
+
readonly channel: ShrinkChannel;
|
|
28
|
+
readonly lineEndOnly: boolean;
|
|
29
|
+
constructor(clusterIndex: number, tier: number, capacity: number, channel: ShrinkChannel, lineEndOnly?: boolean | null);
|
|
30
|
+
toString(): string;
|
|
31
|
+
}
|
|
32
|
+
export declare class UnbreakableRanges {
|
|
33
|
+
readonly ranges: IntRange[];
|
|
34
|
+
private readonly byStart;
|
|
35
|
+
private readonly startsSorted;
|
|
36
|
+
private readonly prefixMaxLast;
|
|
37
|
+
static readonly Empty: UnbreakableRanges;
|
|
38
|
+
constructor(ranges: IntRange[]);
|
|
39
|
+
containsBoundary(candidate: number): boolean;
|
|
40
|
+
containingOrNull(candidate: number): IntRange | null;
|
|
41
|
+
containingFromClosedStartOrNull(index: number): IntRange | null;
|
|
42
|
+
}
|
|
43
|
+
export interface Whitespace {
|
|
44
|
+
readonly kind: "Whitespace";
|
|
45
|
+
}
|
|
46
|
+
export interface Structural {
|
|
47
|
+
readonly kind: "Structural";
|
|
48
|
+
}
|
|
49
|
+
export interface Syllable {
|
|
50
|
+
readonly kind: "Syllable";
|
|
51
|
+
}
|
|
52
|
+
export interface WholeToken {
|
|
53
|
+
readonly kind: "WholeToken";
|
|
54
|
+
}
|
|
55
|
+
export interface Emergency {
|
|
56
|
+
readonly kind: "Emergency";
|
|
57
|
+
}
|
|
58
|
+
export type ProgressiveBreakTier = Whitespace | Structural | Syllable | WholeToken | Emergency;
|
|
59
|
+
export declare const ProgressiveBreakTier: Readonly<{
|
|
60
|
+
Whitespace: Readonly<Whitespace>;
|
|
61
|
+
Structural: Readonly<Structural>;
|
|
62
|
+
Syllable: Readonly<Syllable>;
|
|
63
|
+
WholeToken: Readonly<WholeToken>;
|
|
64
|
+
Emergency: Readonly<Emergency>;
|
|
65
|
+
}>;
|
|
66
|
+
export declare function compareProgressiveBreakTier(a: ProgressiveBreakTier, b: ProgressiveBreakTier): number;
|
|
67
|
+
export interface TrailingGlue {
|
|
68
|
+
readonly kind: "TrailingGlue";
|
|
69
|
+
}
|
|
70
|
+
export interface LeadingGlue {
|
|
71
|
+
readonly kind: "LeadingGlue";
|
|
72
|
+
}
|
|
73
|
+
export interface LeadingAndTrailingGlue {
|
|
74
|
+
readonly kind: "LeadingAndTrailingGlue";
|
|
75
|
+
}
|
|
76
|
+
export interface RawAdvance {
|
|
77
|
+
readonly kind: "RawAdvance";
|
|
78
|
+
}
|
|
79
|
+
export type ShrinkChannel = TrailingGlue | LeadingGlue | LeadingAndTrailingGlue | RawAdvance;
|
|
80
|
+
export declare const ShrinkChannel: Readonly<{
|
|
81
|
+
TrailingGlue: Readonly<TrailingGlue>;
|
|
82
|
+
LeadingGlue: Readonly<LeadingGlue>;
|
|
83
|
+
LeadingAndTrailingGlue: Readonly<LeadingAndTrailingGlue>;
|
|
84
|
+
RawAdvance: Readonly<RawAdvance>;
|
|
85
|
+
}>;
|
|
86
|
+
export declare function compareShrinkChannel(a: ShrinkChannel, b: ShrinkChannel): number;
|