@tiqian/shared 0.0.0-stage → 0.1.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/dist/org/tiqian/clreq/AdjustmentStylePolicy.d.ts +11 -0
  2. package/dist/org/tiqian/clreq/AdjustmentStylePolicy.js +21 -0
  3. package/dist/org/tiqian/clreq/AutoSpaceMode.d.ts +16 -0
  4. package/dist/org/tiqian/clreq/AutoSpaceMode.js +17 -0
  5. package/dist/org/tiqian/clreq/AutoSpacePolicy.d.ts +13 -0
  6. package/dist/org/tiqian/clreq/AutoSpacePolicy.js +23 -0
  7. package/dist/org/tiqian/clreq/BopomofoReading.d.ts +12 -0
  8. package/dist/org/tiqian/clreq/BopomofoReading.js +86 -0
  9. package/dist/org/tiqian/clreq/BopomofoTone.d.ts +28 -0
  10. package/dist/org/tiqian/clreq/BopomofoTone.js +26 -0
  11. package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.d.ts +16 -0
  12. package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.js +17 -0
  13. package/dist/org/tiqian/clreq/ClreqProfile.d.ts +27 -0
  14. package/dist/org/tiqian/clreq/ClreqProfile.js +58 -0
  15. package/dist/org/tiqian/clreq/ClreqRegion.d.ts +20 -0
  16. package/dist/org/tiqian/clreq/ClreqRegion.js +20 -0
  17. package/dist/org/tiqian/clreq/ClreqStrictness.d.ts +16 -0
  18. package/dist/org/tiqian/clreq/ClreqStrictness.js +17 -0
  19. package/dist/org/tiqian/clreq/GlueSide.d.ts +16 -0
  20. package/dist/org/tiqian/clreq/GlueSide.js +17 -0
  21. package/dist/org/tiqian/clreq/HangingPunctuationStyle.d.ts +12 -0
  22. package/dist/org/tiqian/clreq/HangingPunctuationStyle.js +14 -0
  23. package/dist/org/tiqian/clreq/InteriorPunctuationStyle.d.ts +12 -0
  24. package/dist/org/tiqian/clreq/InteriorPunctuationStyle.js +14 -0
  25. package/dist/org/tiqian/clreq/KinsokuLevel.d.ts +20 -0
  26. package/dist/org/tiqian/clreq/KinsokuLevel.js +20 -0
  27. package/dist/org/tiqian/clreq/KinsokuMode.d.ts +14 -0
  28. package/dist/org/tiqian/clreq/KinsokuMode.js +2 -0
  29. package/dist/org/tiqian/clreq/KinsokuModes.d.ts +11 -0
  30. package/dist/org/tiqian/clreq/KinsokuModes.js +71 -0
  31. package/dist/org/tiqian/clreq/LineAdjustmentStrategy.d.ts +16 -0
  32. package/dist/org/tiqian/clreq/LineAdjustmentStrategy.js +17 -0
  33. package/dist/org/tiqian/clreq/LineEndPunctuationStyle.d.ts +12 -0
  34. package/dist/org/tiqian/clreq/LineEndPunctuationStyle.js +14 -0
  35. package/dist/org/tiqian/clreq/PunctuationClass.d.ts +44 -0
  36. package/dist/org/tiqian/clreq/PunctuationClass.js +38 -0
  37. package/dist/org/tiqian/clreq/PunctuationGluePlacement.d.ts +12 -0
  38. package/dist/org/tiqian/clreq/PunctuationGluePlacement.js +14 -0
  39. package/dist/org/tiqian/clreq/PunctuationGluePlacements.d.ts +9 -0
  40. package/dist/org/tiqian/clreq/PunctuationGluePlacements.js +49 -0
  41. package/dist/org/tiqian/clreq/PunctuationWidthPolicy.d.ts +8 -0
  42. package/dist/org/tiqian/clreq/PunctuationWidthPolicy.js +16 -0
  43. package/dist/org/tiqian/clreq/ResolvedKinsoku.d.ts +12 -0
  44. package/dist/org/tiqian/clreq/ResolvedKinsoku.js +43 -0
  45. package/dist/org/tiqian/core/Cluster.d.ts +13 -0
  46. package/dist/org/tiqian/core/Cluster.js +24 -0
  47. package/dist/org/tiqian/core/EastAsianSpacingData.d.ts +4 -0
  48. package/dist/org/tiqian/core/EastAsianSpacingData.js +399 -0
  49. package/dist/org/tiqian/core/EastAsianSpacingEdges.d.ts +8 -0
  50. package/dist/org/tiqian/core/EastAsianSpacingEdges.js +14 -0
  51. package/dist/org/tiqian/core/EastAsianSpacingValue.d.ts +20 -0
  52. package/dist/org/tiqian/core/EastAsianSpacingValue.js +20 -0
  53. package/dist/org/tiqian/core/Ic.d.ts +7 -0
  54. package/dist/org/tiqian/core/Ic.js +17 -0
  55. package/dist/org/tiqian/core/IllegalStateException.d.ts +4 -0
  56. package/dist/org/tiqian/core/IllegalStateException.js +8 -0
  57. package/dist/org/tiqian/core/IntRange.d.ts +12 -0
  58. package/dist/org/tiqian/core/IntRange.js +30 -0
  59. package/dist/org/tiqian/core/LineEndReason.d.ts +16 -0
  60. package/dist/org/tiqian/core/LineEndReason.js +17 -0
  61. package/dist/org/tiqian/core/SourceBoundaryBias.d.ts +16 -0
  62. package/dist/org/tiqian/core/SourceBoundaryBias.js +17 -0
  63. package/dist/org/tiqian/core/SourceInteractionBoundaries.d.ts +29 -0
  64. package/dist/org/tiqian/core/SourceInteractionBoundaries.js +193 -0
  65. package/dist/org/tiqian/core/TextRange.d.ts +11 -0
  66. package/dist/org/tiqian/core/TextRange.js +40 -0
  67. package/dist/org/tiqian/core/TextRangeError.d.ts +11 -0
  68. package/dist/org/tiqian/core/TextRangeError.js +2 -0
  69. package/dist/org/tiqian/core/TiqianIllegalArgumentException.d.ts +6 -0
  70. package/dist/org/tiqian/core/TiqianIllegalArgumentException.js +21 -0
  71. package/dist/org/tiqian/core/TiqianNoSuchElementException.d.ts +10 -0
  72. package/dist/org/tiqian/core/TiqianNoSuchElementException.js +16 -0
  73. package/dist/org/tiqian/core/UnicodeCombiningMarkData.d.ts +3 -0
  74. package/dist/org/tiqian/core/UnicodeCombiningMarkData.js +109 -0
  75. package/dist/org/tiqian/core/UnicodeEastAsianSpacing.d.ts +16 -0
  76. package/dist/org/tiqian/core/UnicodeEastAsianSpacing.js +88 -0
  77. package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.d.ts +3 -0
  78. package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.js +35 -0
  79. package/dist/org/tiqian/core/UnicodeExtendedPictographicData.d.ts +3 -0
  80. package/dist/org/tiqian/core/UnicodeExtendedPictographicData.js +64 -0
  81. package/dist/org/tiqian/core/UnicodeNumber.d.ts +3 -0
  82. package/dist/org/tiqian/core/UnicodeNumber.js +14 -0
  83. package/dist/org/tiqian/core/UnicodeNumberData.d.ts +3 -0
  84. package/dist/org/tiqian/core/UnicodeNumberData.js +64 -0
  85. package/dist/org/tiqian/core/UnicodeScriptEvidence.d.ts +16 -0
  86. package/dist/org/tiqian/core/UnicodeScriptEvidence.js +17 -0
  87. package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.d.ts +7 -0
  88. package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.js +17 -0
  89. package/dist/org/tiqian/core/UnicodeScriptEvidenceData.d.ts +4 -0
  90. package/dist/org/tiqian/core/UnicodeScriptEvidenceData.js +295 -0
  91. package/dist/org/tiqian/core/UnicodeWordCharacter.d.ts +6 -0
  92. package/dist/org/tiqian/core/UnicodeWordCharacter.js +17 -0
  93. package/dist/org/tiqian/core/UnicodeWordCharacterData.d.ts +3 -0
  94. package/dist/org/tiqian/core/UnicodeWordCharacterData.js +234 -0
  95. package/dist/org/tiqian/font/FontRole.d.ts +28 -0
  96. package/dist/org/tiqian/font/FontRole.js +26 -0
  97. package/dist/org/tiqian/font/FontRoleContext.d.ts +13 -0
  98. package/dist/org/tiqian/font/FontRoleContext.js +28 -0
  99. package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.d.ts +51 -0
  100. package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.js +305 -0
  101. package/dist/org/tiqian/layout/LineOptimization.d.ts +124 -0
  102. package/dist/org/tiqian/layout/LineOptimization.js +298 -0
  103. package/dist/org/tiqian/layout/ProgressiveBreakDecisions.d.ts +86 -0
  104. package/dist/org/tiqian/layout/ProgressiveBreakDecisions.js +415 -0
  105. package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.d.ts +5 -0
  106. package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.js +33 -0
  107. package/dist/org/tiqian/layout/QuotePairAnalyzer.d.ts +63 -0
  108. package/dist/org/tiqian/layout/QuotePairAnalyzer.js +251 -0
  109. package/dist/org/tiqian/linebreak/BreakKind.d.ts +20 -0
  110. package/dist/org/tiqian/linebreak/BreakKind.js +20 -0
  111. package/dist/org/tiqian/shared/SnapshotValueStyle.d.ts +11 -0
  112. package/dist/org/tiqian/shared/SnapshotValueStyle.js +64 -0
  113. package/dist/org/tiqian/shared/ValueStyleInterner.d.ts +7 -0
  114. package/dist/org/tiqian/shared/ValueStyleInterner.js +23 -0
  115. package/dist/org/tiqian/shared/html/CompoundSelector.d.ts +28 -0
  116. package/dist/org/tiqian/shared/html/CompoundSelector.js +247 -0
  117. package/dist/org/tiqian/shared/html/DomAttribute.d.ts +5 -0
  118. package/dist/org/tiqian/shared/html/DomAttribute.js +10 -0
  119. package/dist/org/tiqian/shared/html/DomNode.d.ts +10 -0
  120. package/dist/org/tiqian/shared/html/DomNode.js +2 -0
  121. package/dist/org/tiqian/shared/html/DomParser.d.ts +16 -0
  122. package/dist/org/tiqian/shared/html/DomParser.js +84 -0
  123. package/dist/org/tiqian/shared/html/HtmlAttributeInsertion.d.ts +4 -0
  124. package/dist/org/tiqian/shared/html/HtmlAttributeInsertion.js +2 -0
  125. package/dist/org/tiqian/shared/html/HtmlError.d.ts +16 -0
  126. package/dist/org/tiqian/shared/html/HtmlError.js +17 -0
  127. package/dist/org/tiqian/shared/html/HtmlNameCase.d.ts +3 -0
  128. package/dist/org/tiqian/shared/html/HtmlNameCase.js +20 -0
  129. package/dist/org/tiqian/shared/html/HtmlOpeningTag.d.ts +6 -0
  130. package/dist/org/tiqian/shared/html/HtmlOpeningTag.js +12 -0
  131. package/dist/org/tiqian/shared/html/HtmlParseException.d.ts +6 -0
  132. package/dist/org/tiqian/shared/html/HtmlParseException.js +19 -0
  133. package/dist/org/tiqian/shared/html/HtmlScan.d.ts +16 -0
  134. package/dist/org/tiqian/shared/html/HtmlScan.js +191 -0
  135. package/dist/org/tiqian/shared/prepared_dom/AttributeEntry.d.ts +5 -0
  136. package/dist/org/tiqian/shared/prepared_dom/AttributeEntry.js +10 -0
  137. package/dist/org/tiqian/shared/prepared_dom/BopomofoPlacement.d.ts +8 -0
  138. package/dist/org/tiqian/shared/prepared_dom/BopomofoPlacement.js +2 -0
  139. package/dist/org/tiqian/shared/prepared_dom/BopomofoPlacementCss.d.ts +6 -0
  140. package/dist/org/tiqian/shared/prepared_dom/BopomofoPlacementCss.js +2 -0
  141. package/dist/org/tiqian/shared/prepared_dom/BopomofoZone.d.ts +7 -0
  142. package/dist/org/tiqian/shared/prepared_dom/BopomofoZone.js +2 -0
  143. package/dist/org/tiqian/shared/prepared_dom/EmphasisDotColorResolver.d.ts +4 -0
  144. package/dist/org/tiqian/shared/prepared_dom/EmphasisDotColorResolver.js +2 -0
  145. package/dist/org/tiqian/shared/prepared_dom/Evidence.d.ts +33 -0
  146. package/dist/org/tiqian/shared/prepared_dom/Evidence.js +251 -0
  147. package/dist/org/tiqian/shared/prepared_dom/EvidenceDecorationKind.d.ts +12 -0
  148. package/dist/org/tiqian/shared/prepared_dom/EvidenceDecorationKind.js +14 -0
  149. package/dist/org/tiqian/shared/prepared_dom/EvidenceDecorationSegment.d.ts +7 -0
  150. package/dist/org/tiqian/shared/prepared_dom/EvidenceDecorationSegment.js +2 -0
  151. package/dist/org/tiqian/shared/prepared_dom/EvidenceEmphasisDot.d.ts +6 -0
  152. package/dist/org/tiqian/shared/prepared_dom/EvidenceEmphasisDot.js +2 -0
  153. package/dist/org/tiqian/shared/prepared_dom/EvidenceOverlayOptions.d.ts +4 -0
  154. package/dist/org/tiqian/shared/prepared_dom/EvidenceOverlayOptions.js +2 -0
  155. package/dist/org/tiqian/shared/prepared_dom/EvidenceOverlayPlan.d.ts +9 -0
  156. package/dist/org/tiqian/shared/prepared_dom/EvidenceOverlayPlan.js +2 -0
  157. package/dist/org/tiqian/shared/prepared_dom/FixedEmphasisDotColor.d.ts +5 -0
  158. package/dist/org/tiqian/shared/prepared_dom/FixedEmphasisDotColor.js +8 -0
  159. package/dist/org/tiqian/shared/prepared_dom/InlineBoxEntry.d.ts +6 -0
  160. package/dist/org/tiqian/shared/prepared_dom/InlineBoxEntry.js +2 -0
  161. package/dist/org/tiqian/shared/prepared_dom/InlineEdgeEntry.d.ts +5 -0
  162. package/dist/org/tiqian/shared/prepared_dom/InlineEdgeEntry.js +2 -0
  163. package/dist/org/tiqian/shared/prepared_dom/InlineObjectPlaceholderCell.d.ts +6 -0
  164. package/dist/org/tiqian/shared/prepared_dom/InlineObjectPlaceholderCell.js +2 -0
  165. package/dist/org/tiqian/shared/prepared_dom/Markup.d.ts +30 -0
  166. package/dist/org/tiqian/shared/prepared_dom/Markup.js +344 -0
  167. package/dist/org/tiqian/shared/prepared_dom/MarkupArtifact.d.ts +12 -0
  168. package/dist/org/tiqian/shared/prepared_dom/MarkupArtifact.js +2 -0
  169. package/dist/org/tiqian/shared/prepared_dom/MarkupContainer.d.ts +7 -0
  170. package/dist/org/tiqian/shared/prepared_dom/MarkupContainer.js +2 -0
  171. package/dist/org/tiqian/shared/prepared_dom/MarkupNode.d.ts +5 -0
  172. package/dist/org/tiqian/shared/prepared_dom/MarkupNode.js +2 -0
  173. package/dist/org/tiqian/shared/prepared_dom/PlanBopomofoZone.d.ts +8 -0
  174. package/dist/org/tiqian/shared/prepared_dom/PlanBopomofoZone.js +2 -0
  175. package/dist/org/tiqian/shared/prepared_dom/PlanRubyAnnotation.d.ts +10 -0
  176. package/dist/org/tiqian/shared/prepared_dom/PlanRubyAnnotation.js +2 -0
  177. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifact.d.ts +22 -0
  178. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifact.js +457 -0
  179. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactOptions.d.ts +15 -0
  180. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactOptions.js +2 -0
  181. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactResult.d.ts +8 -0
  182. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactResult.js +2 -0
  183. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactState.d.ts +11 -0
  184. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactState.js +2 -0
  185. package/dist/org/tiqian/shared/prepared_dom/PreparedCjkStrongSemantic.d.ts +5 -0
  186. package/dist/org/tiqian/shared/prepared_dom/PreparedCjkStrongSemantic.js +2 -0
  187. package/dist/org/tiqian/shared/prepared_dom/PreparedDom.d.ts +28 -0
  188. package/dist/org/tiqian/shared/prepared_dom/PreparedDom.js +184 -0
  189. package/dist/org/tiqian/shared/prepared_dom/PreparedDomError.d.ts +15 -0
  190. package/dist/org/tiqian/shared/prepared_dom/PreparedDomError.js +2 -0
  191. package/dist/org/tiqian/shared/prepared_dom/PreparedDomException.d.ts +6 -0
  192. package/dist/org/tiqian/shared/prepared_dom/PreparedDomException.js +25 -0
  193. package/dist/org/tiqian/shared/prepared_dom/PreparedDomTestSupport.d.ts +11 -0
  194. package/dist/org/tiqian/shared/prepared_dom/PreparedDomTestSupport.js +93 -0
  195. package/dist/org/tiqian/shared/prepared_dom/PreparedEmphasisRange.d.ts +4 -0
  196. package/dist/org/tiqian/shared/prepared_dom/PreparedEmphasisRange.js +2 -0
  197. package/dist/org/tiqian/shared/prepared_dom/PreparedLineChild.d.ts +16 -0
  198. package/dist/org/tiqian/shared/prepared_dom/PreparedLineChild.js +2 -0
  199. package/dist/org/tiqian/shared/prepared_dom/PreparedPlan.d.ts +19 -0
  200. package/dist/org/tiqian/shared/prepared_dom/PreparedPlan.js +2 -0
  201. package/dist/org/tiqian/shared/prepared_dom/PreparedPlanCell.d.ts +26 -0
  202. package/dist/org/tiqian/shared/prepared_dom/PreparedPlanCell.js +2 -0
  203. package/dist/org/tiqian/shared/prepared_dom/PreparedPlanLine.d.ts +13 -0
  204. package/dist/org/tiqian/shared/prepared_dom/PreparedPlanLine.js +2 -0
  205. package/dist/org/tiqian/shared/prepared_dom/PreparedRenderTextSpan.d.ts +6 -0
  206. package/dist/org/tiqian/shared/prepared_dom/PreparedRenderTextSpan.js +2 -0
  207. package/dist/org/tiqian/shared/prepared_dom/PreparedRunRenderInput.d.ts +23 -0
  208. package/dist/org/tiqian/shared/prepared_dom/PreparedRunRenderInput.js +2 -0
  209. package/dist/org/tiqian/shared/prepared_dom/PreparedRunSignature.d.ts +19 -0
  210. package/dist/org/tiqian/shared/prepared_dom/PreparedRunSignature.js +2 -0
  211. package/dist/org/tiqian/shared/prepared_dom/PreparedRunTyped.d.ts +32 -0
  212. package/dist/org/tiqian/shared/prepared_dom/PreparedRunTyped.js +2 -0
  213. package/dist/org/tiqian/shared/prepared_dom/PreparedSemanticSpan.d.ts +10 -0
  214. package/dist/org/tiqian/shared/prepared_dom/PreparedSemanticSpan.js +2 -0
  215. package/dist/org/tiqian/shared/prepared_dom/PreparedSpacingResult.d.ts +4 -0
  216. package/dist/org/tiqian/shared/prepared_dom/PreparedSpacingResult.js +2 -0
  217. package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupContainer.d.ts +16 -0
  218. package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupContainer.js +48 -0
  219. package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupNode.d.ts +11 -0
  220. package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupNode.js +21 -0
  221. package/dist/org/tiqian/shared/prepared_dom/RubyAnnotation.d.ts +9 -0
  222. package/dist/org/tiqian/shared/prepared_dom/RubyAnnotation.js +2 -0
  223. package/dist/org/tiqian/shared/prepared_dom/StyleClassResolver.d.ts +4 -0
  224. package/dist/org/tiqian/shared/prepared_dom/StyleClassResolver.js +2 -0
  225. package/dist/org/tiqian/shared/prepared_dom/StyleDelta.d.ts +5 -0
  226. package/dist/org/tiqian/shared/prepared_dom/StyleDelta.js +2 -0
  227. package/dist/org/tiqian/shared/snapshot/SnapshotSource.d.ts +24 -0
  228. package/dist/org/tiqian/shared/snapshot/SnapshotSource.js +135 -0
  229. package/dist/org/tiqian/test/TestHelpers.d.ts +5 -0
  230. package/dist/org/tiqian/test/TestHelpers.js +27 -0
  231. package/dist/org/tiqian/test/trace/TestTrace.d.ts +6 -0
  232. package/dist/org/tiqian/test/trace/TestTrace.js +8 -0
  233. package/dist/org/tiqian/test/trace/TestTracePlatform.d.ts +6 -0
  234. package/dist/org/tiqian/test/trace/TestTracePlatform.js +78 -0
  235. package/dist/org/tiqian/test/trace/TestTraceRecorder.d.ts +9 -0
  236. package/dist/org/tiqian/test/trace/TestTraceRecorder.js +36 -0
  237. package/dist/org/tiqian/test/trace/TestTraceRender.d.ts +47 -0
  238. package/dist/org/tiqian/test/trace/TestTraceRender.js +690 -0
  239. package/dist/org/tiqian/test/trace/TestTraceStore.d.ts +18 -0
  240. package/dist/org/tiqian/test/trace/TestTraceStore.js +149 -0
  241. package/dist/org/tiqian/test/trace/TraceAssertionError.d.ts +5 -0
  242. package/dist/org/tiqian/test/trace/TraceAssertionError.js +2 -0
  243. package/dist/org/tiqian/test/trace/TraceAssertionException.d.ts +6 -0
  244. package/dist/org/tiqian/test/trace/TraceAssertionException.js +16 -0
  245. package/dist/org/tiqian/test/trace/TraceField.d.ts +5 -0
  246. package/dist/org/tiqian/test/trace/TraceField.js +10 -0
  247. package/dist/org/tiqian/test/trace/TraceFormat.d.ts +21 -0
  248. package/dist/org/tiqian/test/trace/TraceFormat.js +184 -0
  249. package/dist/runtime.d.ts +96 -0
  250. package/dist/runtime.js +1612 -0
  251. package/dist/std/FsError.d.ts +48 -0
  252. package/dist/std/FsError.js +2 -0
  253. package/dist/std/FsException.d.ts +6 -0
  254. package/dist/std/FsException.js +45 -0
  255. package/dist/std/UStringException.d.ts +6 -0
  256. package/dist/std/UStringException.js +21 -0
  257. package/dist/std/UStringFault.d.ts +9 -0
  258. package/dist/std/UStringFault.js +2 -0
  259. package/package.json +22 -4
  260. package/README.md +0 -3
@@ -0,0 +1,184 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ import { Markup } from "./Markup.js";
3
+ import { PreparedDomException } from "./PreparedDomException.js";
4
+ export class PreparedDom {
5
+ static ROOT_SELECTOR = "tiqian-prose, [data-tiqian-root]";
6
+ static LINE_MARKER_SELECTOR = "[data-tq-line-flow-width]";
7
+ static VALUE_STYLE_SCOPE_ATTRIBUTE = "data-tq-value-style-scope";
8
+ static VALUE_STYLE_ELEMENT_ATTRIBUTE = "data-tq-prepared-value-styles";
9
+ static LIVE_SEMANTIC_INDEX_ATTRIBUTE = "data-tq-live-semantic-index";
10
+ static SNAPSHOT_STYLE_OWNER = "tiqian-snapshot-style-owner";
11
+ static DEFAULT_LOCALE = "zh-Hans";
12
+ static SPACING_EPSILON = 0.01;
13
+ static SPACING_DUST_EPSILON = 1e-6;
14
+ static RENDER_FLOW_EPSILON_PX = 0.01;
15
+ static BASE36 = "0123456789abcdefghijklmnopqrstuvwxyz";
16
+ static snapshotValueStyleClass(index) {
17
+ return `tqv-${PreparedDom.base36(index)}`;
18
+ }
19
+ static runtimeValueStyleClass(key) {
20
+ return `tqvr-${key}`;
21
+ }
22
+ static preparedSpacing(display, naturalWidth, trailingGap) {
23
+ if (Math.abs(trailingGap) < PreparedDom.SPACING_DUST_EPSILON) {
24
+ return { kind: "none", px: 0.0 };
25
+ }
26
+ if (display.length === 1 && naturalWidth + trailingGap >= 0) {
27
+ return { kind: "letter", px: trailingGap };
28
+ }
29
+ if (trailingGap < 0) {
30
+ return { kind: "overlap", px: trailingGap };
31
+ }
32
+ return { kind: "trailing-letter", px: trailingGap };
33
+ }
34
+ static preparedFeatureSignature(openTypeFeatures) {
35
+ if (openTypeFeatures === null) {
36
+ return "";
37
+ }
38
+ return openTypeFeatures.join(",");
39
+ }
40
+ static preparedRenderFontSignature(renderFontFamilies) {
41
+ return renderFontFamilies.join("");
42
+ }
43
+ static isPreparedOpenTypeFeatureSignature(signature) {
44
+ return signature === "pwid,palt" || signature === "fwid";
45
+ }
46
+ static canMergePreparedRun(left, right) {
47
+ if (left.rangeEnd !== right.rangeStart || left.semanticSignature !== right.semanticSignature || left.shapingBoundary || right.shapingBoundary || PreparedDom.preparedFeatureSignature(left.openTypeFeatures) !== PreparedDom.preparedFeatureSignature(right.openTypeFeatures) || PreparedDom.preparedRenderFontSignature(left.renderFontFamilies) !== PreparedDom.preparedRenderFontSignature(right.renderFontFamilies) || left.dashStrategy !== null || right.dashStrategy !== null || left.styleSignature !== right.styleSignature || left.punctuationSignature !== right.punctuationSignature || left.italicEffect !== right.italicEffect || left.evidenceRenderFontFamily !== right.evidenceRenderFontFamily) {
48
+ return false;
49
+ }
50
+ if (left.spacing.kind === "none" && right.spacing.kind === "none") {
51
+ return true;
52
+ }
53
+ return left.spacing.kind === "letter" && right.spacing.kind === "letter" && Math.abs(left.spacing.px - right.spacing.px) < PreparedDom.SPACING_EPSILON;
54
+ }
55
+ static mergePreparedRun(left, right) {
56
+ left.rangeEnd = right.rangeEnd;
57
+ left.source += right.source;
58
+ left.display += right.display;
59
+ left.naturalWidth += right.naturalWidth;
60
+ left.trailingGap += right.trailingGap;
61
+ }
62
+ static renderRun(input, styleClassFor) {
63
+ const featureSignature = PreparedDom.preparedFeatureSignature(input.openTypeFeatures);
64
+ const renderFontFamilies = input.renderFontFamilies;
65
+ const needsElement = input.shapingBoundary || featureSignature !== "" || renderFontFamilies.length > 0 || input.source !== input.display || input.spacing.kind !== "none" || input.styleDelta !== null || input.italicEffect || input.evidenceRenderFontFamily !== null || input.dashStrategy !== null || input.punctuationInkFloor !== null;
66
+ if (!needsElement) {
67
+ return Markup.renderedText(input.display);
68
+ }
69
+ const attributes = [];
70
+ const advance = (input.spacing.kind === "letter" || input.spacing.kind === "trailing-letter" ? input.naturalWidth + input.trailingGap : input.naturalWidth);
71
+ Markup.setAttribute(attributes, "data-tq-advance", `${advance}`);
72
+ Markup.setAttribute(attributes, "data-tq-geometry", "true");
73
+ Markup.setAttribute(attributes, "data-tq-x", `${input.drawX}`);
74
+ if (input.shapingBoundary || featureSignature !== "") {
75
+ Markup.setAttribute(attributes, "data-tq-shaping-boundary", "");
76
+ }
77
+ if (featureSignature !== "") {
78
+ if (!PreparedDom.isPreparedOpenTypeFeatureSignature(featureSignature)) {
79
+ throw new PreparedDomException({ kind: "UnsupportedOpenTypeFeatures", signature: featureSignature });
80
+ }
81
+ Markup.setAttribute(attributes, "data-tq-open-type-features", featureSignature);
82
+ }
83
+ if (input.source !== input.display) {
84
+ Markup.setAttribute(attributes, "data-tq-src", input.source);
85
+ }
86
+ if (input.dashStrategy !== null) {
87
+ const dashStrategy = input.dashStrategy;
88
+ Markup.setAttribute(attributes, "data-tq-dash-strategy", dashStrategy);
89
+ Markup.setAttribute(attributes, "data-tq-dash-advance", `${input.naturalWidth}`);
90
+ if (input.evidenceRenderFontFamily !== null) {
91
+ const evidenceRenderFontFamily = input.evidenceRenderFontFamily;
92
+ Markup.setAttribute(attributes, "data-tq-dash-font-family", evidenceRenderFontFamily);
93
+ }
94
+ if (input.resolvedFace !== null) {
95
+ const resolvedFace = input.resolvedFace;
96
+ Markup.setAttribute(attributes, "data-tq-dash-face", resolvedFace);
97
+ }
98
+ if (input.glyphIds !== null) {
99
+ const glyphIds = input.glyphIds;
100
+ Markup.setAttribute(attributes, "data-tq-dash-glyph-ids", glyphIds);
101
+ }
102
+ if (input.shapingEvidence !== null) {
103
+ const shapingEvidence = input.shapingEvidence;
104
+ Markup.setAttribute(attributes, "data-tq-dash-evidence", shapingEvidence);
105
+ }
106
+ if (input.shapingLanguage !== null) {
107
+ const shapingLanguage = input.shapingLanguage;
108
+ Markup.setAttribute(attributes, "lang", shapingLanguage);
109
+ }
110
+ }
111
+ if (input.punctuationInkFloor !== null) {
112
+ const punctuationInkFloor = input.punctuationInkFloor;
113
+ Markup.setAttribute(attributes, "data-tq-punctuation-ink-floor", `${punctuationInkFloor}`);
114
+ if (input.punctuationBodyWidth !== null) {
115
+ const punctuationBodyWidth = input.punctuationBodyWidth;
116
+ Markup.setAttribute(attributes, "data-tq-punctuation-body-width", `${punctuationBodyWidth}`);
117
+ }
118
+ }
119
+ const styles = [];
120
+ if (renderFontFamilies.length > 0) {
121
+ Markup.setAttribute(attributes, "data-tq-render-font-projection", "true");
122
+ styles.push(`font-family:${Markup.cssFamilyList(renderFontFamilies)}!important`);
123
+ }
124
+ if (input.evidenceRenderFontFamily !== null) {
125
+ Markup.setAttribute(attributes, "data-tq-render-font-projection", "true");
126
+ const evidenceRenderFontFamily2 = input.evidenceRenderFontFamily;
127
+ styles.push(`font-family:${Markup.cssString(evidenceRenderFontFamily2)}!important`);
128
+ }
129
+ if (input.italicEffect && (input.styleDelta === null || input.styleDelta.italic !== true)) {
130
+ styles.push("font-style:italic!important");
131
+ }
132
+ if (input.styleDelta !== null) {
133
+ const styleDelta = input.styleDelta;
134
+ if (styleDelta.fontSize !== null) {
135
+ const fontSize = styleDelta.fontSize;
136
+ styles.push(`font-size:${Markup.px(fontSize)}!important`);
137
+ }
138
+ if (styleDelta.fontWeight !== null) {
139
+ const fontWeight = styleDelta.fontWeight;
140
+ styles.push(`font-weight:${fontWeight}!important`);
141
+ }
142
+ if (styleDelta.italic === true) {
143
+ styles.push("font-style:italic!important");
144
+ }
145
+ else {
146
+ if (styleDelta.italic === false) {
147
+ styles.push("font-style:normal!important");
148
+ }
149
+ }
150
+ }
151
+ if (input.spacing.kind === "letter") {
152
+ styles.push(`letter-spacing:${Markup.px(input.spacing.px)}!important`);
153
+ }
154
+ else {
155
+ if (input.spacing.kind === "overlap") {
156
+ styles.push(`margin-right:${Markup.px(input.spacing.px)}!important`);
157
+ }
158
+ }
159
+ Markup.applyDynamicStyles(attributes, styles, styleClassFor);
160
+ if (input.spacing.kind === "trailing-letter") {
161
+ const container = Markup.renderedContainer("span", attributes);
162
+ container.children.push(Markup.renderedText(input.display));
163
+ const carrierEntries = [{ name: "aria-hidden", value: "true" }, { name: "data-tq-copy-ignore", value: "true" }, { name: "data-tq-geometry", value: "true" }, { name: "data-tq-spacing-carrier", value: "true" }];
164
+ const carrierStyles = ["display:inline-block!important", `inline-size:${Markup.px(input.spacing.px)}!important`, "height:0!important", "line-height:0!important", `letter-spacing:${Markup.px(input.spacing.px)}!important`, "overflow:hidden!important", "vertical-align:baseline!important", "white-space:pre!important"];
165
+ Markup.applyDynamicStyles(carrierEntries, carrierStyles, styleClassFor);
166
+ container.children.push(Markup.renderedElement("span", carrierEntries, String.fromCodePoint(160), false));
167
+ return container;
168
+ }
169
+ return Markup.renderedElement("span", attributes, input.display, false);
170
+ }
171
+ static base36(value) {
172
+ if (value === 0) {
173
+ return "0";
174
+ }
175
+ let s = "";
176
+ let n = value;
177
+ while (n > 0) {
178
+ const d = n % 36;
179
+ s = PreparedDom.BASE36.charAt(d) + s;
180
+ n = Math.trunc(n / 36);
181
+ }
182
+ return s;
183
+ }
184
+ }
@@ -0,0 +1,15 @@
1
+ export interface UnsupportedOpenTypeFeatures {
2
+ readonly kind: "UnsupportedOpenTypeFeatures";
3
+ readonly signature: string;
4
+ }
5
+ export interface InvalidPreparedOverlayGeometry {
6
+ readonly kind: "InvalidPreparedOverlayGeometry";
7
+ }
8
+ export interface SnapshotRenderFlowMismatch {
9
+ readonly kind: "SnapshotRenderFlowMismatch";
10
+ readonly detail: string;
11
+ }
12
+ export interface ConflictingPreparedRenderTextSpan {
13
+ readonly kind: "ConflictingPreparedRenderTextSpan";
14
+ }
15
+ export type PreparedDomError = UnsupportedOpenTypeFeatures | InvalidPreparedOverlayGeometry | SnapshotRenderFlowMismatch | ConflictingPreparedRenderTextSpan;
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ import { type PreparedDomError } from "./PreparedDomError.js";
2
+ export declare class PreparedDomException extends Error {
3
+ readonly error: PreparedDomError;
4
+ constructor(error: PreparedDomError);
5
+ static describe(error: PreparedDomError): string;
6
+ }
@@ -0,0 +1,25 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export class PreparedDomException extends Error {
3
+ error;
4
+ constructor(error) {
5
+ super(PreparedDomException.describe(error));
6
+ this.name = "PreparedDomException";
7
+ this.error = error;
8
+ }
9
+ static describe(error) {
10
+ switch (error.kind) {
11
+ case "UnsupportedOpenTypeFeatures":
12
+ {
13
+ return `UnsupportedPreparedOpenTypeFeatures: ${error.signature}`;
14
+ }
15
+ case "InvalidPreparedOverlayGeometry":
16
+ return "InvalidPreparedOverlayGeometry";
17
+ case "SnapshotRenderFlowMismatch":
18
+ {
19
+ return `SnapshotRenderFlowMismatch:${error.detail}`;
20
+ }
21
+ case "ConflictingPreparedRenderTextSpan":
22
+ return "ConflictingPreparedRenderTextSpan";
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,11 @@
1
+ import { type MarkupArtifact } from "./MarkupArtifact.js";
2
+ import { type PreparedRunRenderInput } from "./PreparedRunRenderInput.js";
3
+ import { type PreparedSpacingResult } from "./PreparedSpacingResult.js";
4
+ import { type StyleDelta } from "./StyleDelta.js";
5
+ export declare class PreparedDomTestSupport {
6
+ static input(source: string, display: string, drawX: number, naturalWidth: number, shapingBoundary: boolean, openTypeFeatures: string[] | null, renderFontFamilies: string[], trailingGap: number, spacing: PreparedSpacingResult, styleDelta: StyleDelta | null, italicEffect: boolean, dashStrategy: string | null, shapingLanguage: string | null, resolvedFace: string | null, glyphIds: string | null, shapingEvidence: string | null, punctuationInkFloor: number | null, punctuationBodyWidth: number | null, evidenceRenderFontFamily: string | null): PreparedRunRenderInput;
7
+ static artifactToJson(artifact: MarkupArtifact): string;
8
+ private static serializeElement;
9
+ private static jsonString;
10
+ private static hex4;
11
+ }
@@ -0,0 +1,93 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export class PreparedDomTestSupport {
3
+ static input(source, display, drawX, naturalWidth, shapingBoundary, openTypeFeatures, renderFontFamilies, trailingGap, spacing, styleDelta, italicEffect, dashStrategy, shapingLanguage, resolvedFace, glyphIds, shapingEvidence, punctuationInkFloor, punctuationBodyWidth, evidenceRenderFontFamily) {
4
+ return { source, display, drawX, naturalWidth, shapingBoundary, openTypeFeatures, renderFontFamilies, trailingGap, spacing, styleDelta, italicEffect, dashStrategy, shapingLanguage, resolvedFace, glyphIds, shapingEvidence, punctuationInkFloor, punctuationBodyWidth, evidenceRenderFontFamily };
5
+ }
6
+ static artifactToJson(artifact) {
7
+ switch (artifact.kind) {
8
+ case "Text":
9
+ {
10
+ return `["#",${PreparedDomTestSupport.jsonString(artifact.text)}]`;
11
+ }
12
+ case "Element":
13
+ {
14
+ return PreparedDomTestSupport.serializeElement(artifact.tag, artifact.entries, artifact.children);
15
+ }
16
+ }
17
+ }
18
+ static serializeElement(tag, entries, children) {
19
+ let out = `[${PreparedDomTestSupport.jsonString(tag)},[`;
20
+ let i = 0;
21
+ while (i < entries.length) {
22
+ if (i > 0) {
23
+ out += ",";
24
+ }
25
+ out += `[${PreparedDomTestSupport.jsonString(entries[i].name)},${PreparedDomTestSupport.jsonString(entries[i].value)}]`;
26
+ i += 1;
27
+ }
28
+ out += "],[";
29
+ let j = 0;
30
+ while (j < children.length) {
31
+ if (j > 0) {
32
+ out += ",";
33
+ }
34
+ out += PreparedDomTestSupport.artifactToJson(children[j]);
35
+ j += 1;
36
+ }
37
+ return out + "]]";
38
+ }
39
+ static jsonString(value) {
40
+ let out = "\"";
41
+ let i = 0;
42
+ while (i < value.length) {
43
+ const c = (Number.isNaN(value.charCodeAt(i)) ? null : value.charCodeAt(i));
44
+ if (c === 34) {
45
+ out += "\\\"";
46
+ }
47
+ else {
48
+ if (c === 92) {
49
+ out += "\\\\";
50
+ }
51
+ else {
52
+ if (c === 8) {
53
+ out += "\\b";
54
+ }
55
+ else {
56
+ if (c === 9) {
57
+ out += "\\t";
58
+ }
59
+ else {
60
+ if (c === 10) {
61
+ out += "\\n";
62
+ }
63
+ else {
64
+ if (c === 12) {
65
+ out += "\\f";
66
+ }
67
+ else {
68
+ if (c === 13) {
69
+ out += "\\r";
70
+ }
71
+ else {
72
+ if (c < 32) {
73
+ out += `\\u${PreparedDomTestSupport.hex4((c))}`;
74
+ }
75
+ else {
76
+ out += String.fromCodePoint((c));
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ i += 1;
86
+ }
87
+ return out + "\"";
88
+ }
89
+ static hex4(value) {
90
+ const digits = "0123456789abcdef";
91
+ return digits.substr((value >> 12) & 15, 1) + digits.substr((value >> 8) & 15, 1) + digits.substr((value >> 4) & 15, 1) + digits.substr(value & 15, 1);
92
+ }
93
+ }
@@ -0,0 +1,4 @@
1
+ export interface PreparedEmphasisRange {
2
+ start: number;
3
+ end: number;
4
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,16 @@
1
+ import { type PlanBopomofoZone } from "./PlanBopomofoZone.js";
2
+ import { type PlanRubyAnnotation } from "./PlanRubyAnnotation.js";
3
+ import { type PreparedRunTyped } from "./PreparedRunTyped.js";
4
+ import { type PreparedSemanticSpan } from "./PreparedSemanticSpan.js";
5
+ export interface PreparedLineChild {
6
+ kind: string;
7
+ run: PreparedRunTyped | null;
8
+ cell: PreparedRunTyped | null;
9
+ carrierMargin: number;
10
+ ruby: PlanRubyAnnotation | null;
11
+ zone: PlanBopomofoZone | null;
12
+ width: number;
13
+ lineTop: number;
14
+ lineHeight: number;
15
+ semanticPath: PreparedSemanticSpan[];
16
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,19 @@
1
+ import { type EvidenceDecorationSegment } from "./EvidenceDecorationSegment.js";
2
+ import { type EvidenceEmphasisDot } from "./EvidenceEmphasisDot.js";
3
+ import { type InlineEdgeEntry } from "./InlineEdgeEntry.js";
4
+ import { type PlanBopomofoZone } from "./PlanBopomofoZone.js";
5
+ import { type PlanRubyAnnotation } from "./PlanRubyAnnotation.js";
6
+ import { type PreparedEmphasisRange } from "./PreparedEmphasisRange.js";
7
+ import { type PreparedPlanLine } from "./PreparedPlanLine.js";
8
+ export interface PreparedPlan {
9
+ height: number;
10
+ lines: PreparedPlanLine[];
11
+ emphasisRanges: PreparedEmphasisRange[];
12
+ rubyDecisions: PlanRubyAnnotation[];
13
+ bopomofoDecisions: PlanBopomofoZone[];
14
+ inlineEdges: InlineEdgeEntry[];
15
+ decorationSegments: EvidenceDecorationSegment[] | null;
16
+ emphasisDots: EvidenceEmphasisDot[] | null;
17
+ fontSize: number;
18
+ overlayWidth: number;
19
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,26 @@
1
+ import { type StyleDelta } from "./StyleDelta.js";
2
+ export interface PreparedPlanCell {
3
+ rangeStart: number;
4
+ rangeEnd: number;
5
+ source: string;
6
+ display: string;
7
+ drawX: number;
8
+ naturalWidth: number;
9
+ leadingLayoutAdvance: number;
10
+ advance: number | null;
11
+ shapingBoundary: boolean;
12
+ openTypeFeatures: string[] | null;
13
+ style: StyleDelta | null;
14
+ styleSignature: string;
15
+ punctuationSignature: string;
16
+ latin: boolean;
17
+ dashStrategy: string | null;
18
+ shapingLanguage: string | null;
19
+ resolvedFace: string | null;
20
+ glyphIds: string | null;
21
+ shapingEvidence: string | null;
22
+ punctuationInkFloor: number | null;
23
+ punctuationBodyWidth: number | null;
24
+ renderFontFamily: string | null;
25
+ inlineObject: number | null;
26
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,13 @@
1
+ import { type PreparedPlanCell } from "./PreparedPlanCell.js";
2
+ export interface PreparedPlanLine {
3
+ cells: PreparedPlanCell[];
4
+ top: number;
5
+ bottom: number;
6
+ baseline: number;
7
+ indent: number;
8
+ visualWidth: number;
9
+ hyphenAdvance: number;
10
+ endReason: string;
11
+ rangeStart: number;
12
+ rangeEnd: number;
13
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface PreparedRenderTextSpan {
2
+ start: number;
3
+ end: number;
4
+ fontFamilies: string[];
5
+ signature: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,23 @@
1
+ import { type PreparedSpacingResult } from "./PreparedSpacingResult.js";
2
+ import { type StyleDelta } from "./StyleDelta.js";
3
+ export interface PreparedRunRenderInput {
4
+ source: string;
5
+ display: string;
6
+ drawX: number;
7
+ naturalWidth: number;
8
+ shapingBoundary: boolean;
9
+ openTypeFeatures: string[] | null;
10
+ renderFontFamilies: string[];
11
+ trailingGap: number;
12
+ spacing: PreparedSpacingResult;
13
+ styleDelta: StyleDelta | null;
14
+ italicEffect: boolean;
15
+ dashStrategy: string | null;
16
+ shapingLanguage: string | null;
17
+ resolvedFace: string | null;
18
+ glyphIds: string | null;
19
+ shapingEvidence: string | null;
20
+ punctuationInkFloor: number | null;
21
+ punctuationBodyWidth: number | null;
22
+ evidenceRenderFontFamily: string | null;
23
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,19 @@
1
+ import { type PreparedSpacingResult } from "./PreparedSpacingResult.js";
2
+ export interface PreparedRunSignature {
3
+ rangeStart: number;
4
+ rangeEnd: number;
5
+ source: string;
6
+ display: string;
7
+ naturalWidth: number;
8
+ trailingGap: number;
9
+ shapingBoundary: boolean;
10
+ openTypeFeatures: string[] | null;
11
+ renderFontFamilies: string[];
12
+ spacing: PreparedSpacingResult;
13
+ italicEffect: boolean;
14
+ dashStrategy: string | null;
15
+ evidenceRenderFontFamily: string | null;
16
+ styleSignature: string;
17
+ punctuationSignature: string;
18
+ semanticSignature: string | null;
19
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,32 @@
1
+ import { type PreparedSemanticSpan } from "./PreparedSemanticSpan.js";
2
+ import { type PreparedSpacingResult } from "./PreparedSpacingResult.js";
3
+ import { type StyleDelta } from "./StyleDelta.js";
4
+ export interface PreparedRunTyped {
5
+ rangeStart: number;
6
+ rangeEnd: number;
7
+ source: string;
8
+ display: string;
9
+ drawX: number;
10
+ naturalWidth: number;
11
+ shapingBoundary: boolean;
12
+ openTypeFeatures: string[] | null;
13
+ renderFontFamilies: string[];
14
+ trailingGap: number;
15
+ spacing: PreparedSpacingResult;
16
+ semanticPath: PreparedSemanticSpan[];
17
+ styleDelta: StyleDelta | null;
18
+ italicEffect: boolean;
19
+ dashStrategy: string | null;
20
+ shapingLanguage: string | null;
21
+ resolvedFace: string | null;
22
+ glyphIds: string | null;
23
+ shapingEvidence: string | null;
24
+ punctuationInkFloor: number | null;
25
+ punctuationBodyWidth: number | null;
26
+ evidenceRenderFontFamily: string | null;
27
+ inlineObjectAdvance: number | null;
28
+ bopomofoAdvanceWidth: number;
29
+ styleSignature: string;
30
+ punctuationSignature: string;
31
+ semanticSignature: string | null;
32
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ import { type AttributeEntry } from "./AttributeEntry.js";
2
+ export interface PreparedSemanticSpan {
3
+ index: number;
4
+ start: number;
5
+ end: number;
6
+ tagName: string;
7
+ sourceIndex: number;
8
+ attributes: AttributeEntry[];
9
+ signature: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface PreparedSpacingResult {
2
+ kind: string;
3
+ px: number;
4
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,16 @@
1
+ import { type AttributeEntry } from "./AttributeEntry.js";
2
+ import { type MarkupArtifact } from "./MarkupArtifact.js";
3
+ import { type MarkupContainer } from "./MarkupContainer.js";
4
+ import { type MarkupNode } from "./MarkupNode.js";
5
+ export declare class RenderedMarkupContainer implements MarkupNode, MarkupContainer {
6
+ private readonly _tag;
7
+ private readonly _entries;
8
+ private readonly _children;
9
+ constructor(tag: string, entries: AttributeEntry[]);
10
+ get children(): MarkupNode[];
11
+ private get_children;
12
+ get html(): string;
13
+ private get_html;
14
+ get artifact(): MarkupArtifact;
15
+ private get_artifact;
16
+ }
@@ -0,0 +1,48 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ import { Markup } from "./Markup.js";
3
+ export class RenderedMarkupContainer {
4
+ _tag;
5
+ _entries;
6
+ _children;
7
+ constructor(tag, entries) {
8
+ this._children = [];
9
+ this._tag = tag;
10
+ this._entries = entries;
11
+ }
12
+ get children() {
13
+ return this.get_children();
14
+ }
15
+ get_children() {
16
+ return this._children;
17
+ }
18
+ get html() {
19
+ return this.get_html();
20
+ }
21
+ get_html() {
22
+ let out = `<${this._tag}`;
23
+ const ser = Markup.serializeAttributeEntries(this._entries);
24
+ if (ser.length > 0) {
25
+ out += ` ${ser}`;
26
+ }
27
+ out += ">";
28
+ let i = 0;
29
+ while (i < this._children.length) {
30
+ out += this._children[i].html;
31
+ i += 1;
32
+ }
33
+ out += `</${this._tag}>`;
34
+ return out;
35
+ }
36
+ get artifact() {
37
+ return this.get_artifact();
38
+ }
39
+ get_artifact() {
40
+ const childArtifacts = [];
41
+ let i = 0;
42
+ while (i < this._children.length) {
43
+ childArtifacts.push(this._children[i].artifact);
44
+ i += 1;
45
+ }
46
+ return { kind: "Element", tag: this._tag, entries: this._entries, children: childArtifacts };
47
+ }
48
+ }