@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,457 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ import { Evidence } from "./Evidence.js";
3
+ import { Markup } from "./Markup.js";
4
+ import { PreparedDom } from "./PreparedDom.js";
5
+ import { PreparedDomException } from "./PreparedDomException.js";
6
+ export class PreparedArtifact {
7
+ static renderPreparedParagraphArtifact(plan, locale, options) {
8
+ const semantics = options.semantics;
9
+ const renderTextSpans = options.renderTextSpans;
10
+ const emphasisRanges = plan.emphasisRanges;
11
+ const inlineBoxes = PreparedArtifact.inlineBoxesFor(plan.inlineEdges, options.inlineBoxes);
12
+ const state = PreparedArtifact.newArtifactState(options.cjkStrongSemantics, options.liveSource);
13
+ const styleClassFor = options.styleClassFor;
14
+ let inlineObjectCount = 0;
15
+ let lineIndex = 0;
16
+ while (lineIndex < plan.lines.length) {
17
+ const line = plan.lines[lineIndex];
18
+ const height = line.bottom - line.top;
19
+ const first = (line.cells.length > 0 ? line.cells[0] : null);
20
+ const flowStart = (first !== null ? first.drawX - first.leadingLayoutAdvance : 0.0);
21
+ const firstInlineStart = (first !== null ? PreparedArtifact.inlineStartAt(inlineBoxes, first.rangeStart) : 0.0);
22
+ if (first !== null && Math.abs(first.leadingLayoutAdvance - firstInlineStart) > PreparedDom.RENDER_FLOW_EPSILON_PX) {
23
+ throw new PreparedDomException({ kind: "SnapshotRenderFlowMismatch", detail: `line=${lineIndex};leading-layout-advance` });
24
+ }
25
+ const cells = [];
26
+ let cellIndex = 0;
27
+ while (cellIndex < line.cells.length) {
28
+ const cell = line.cells[cellIndex];
29
+ const next = (cellIndex + 1 < line.cells.length ? line.cells[cellIndex + 1] : null);
30
+ const trailingInlineEdge = PreparedArtifact.inlineEndAt(inlineBoxes, cell.rangeEnd);
31
+ const nextLeadingInlineEdge = (next !== null ? PreparedArtifact.inlineStartAt(inlineBoxes, next.rangeStart) : 0.0);
32
+ const rawTrailingGap = (next !== null ? next.drawX - cell.drawX - cell.naturalWidth - trailingInlineEdge - nextLeadingInlineEdge : (line.hyphenAdvance > 0 ? 0.0 : line.indent + line.visualWidth - cell.drawX - cell.naturalWidth - trailingInlineEdge));
33
+ const layoutTrailingGap = (Math.abs(rawTrailingGap) < PreparedDom.SPACING_DUST_EPSILON ? 0.0 : rawTrailingGap);
34
+ const bopomofoHere = PreparedArtifact.bopomofoAt(plan.bopomofoDecisions, cell.rangeEnd);
35
+ const hasBopomofo = bopomofoHere.length > 0;
36
+ const naturalAdvance = (cell.advance !== null ? cell.advance : cell.naturalWidth);
37
+ const bopomofoAdvanceWidth = (!hasBopomofo ? 0.0 : (next !== null ? Math.max(layoutTrailingGap, 0.0) : Math.max(naturalAdvance - cell.naturalWidth - trailingInlineEdge, 0.0)));
38
+ const trailingGap = (hasBopomofo ? 0.0 : layoutTrailingGap);
39
+ const styleItalic = cell.style !== null && cell.style.italic === true;
40
+ const run = { rangeStart: cell.rangeStart, rangeEnd: cell.rangeEnd, source: cell.source, display: cell.display, drawX: cell.drawX, naturalWidth: cell.naturalWidth, shapingBoundary: cell.shapingBoundary, openTypeFeatures: cell.openTypeFeatures, renderFontFamilies: PreparedArtifact.renderFontFamiliesFor(renderTextSpans, cell.rangeStart, cell.rangeEnd), trailingGap, spacing: PreparedDom.preparedSpacing(cell.display, cell.naturalWidth, trailingGap), semanticPath: PreparedArtifact.semanticsFor(semantics, cell.rangeStart, cell.rangeEnd), styleDelta: cell.style, italicEffect: styleItalic || cell.latin && PreparedArtifact.rangeContains(emphasisRanges, cell.rangeStart), dashStrategy: cell.dashStrategy, shapingLanguage: cell.shapingLanguage, resolvedFace: cell.resolvedFace, glyphIds: cell.glyphIds, shapingEvidence: cell.shapingEvidence, punctuationInkFloor: cell.punctuationInkFloor, punctuationBodyWidth: cell.punctuationBodyWidth, evidenceRenderFontFamily: cell.renderFontFamily, inlineObjectAdvance: cell.inlineObject, bopomofoAdvanceWidth, styleSignature: cell.styleSignature, punctuationSignature: cell.punctuationSignature, semanticSignature: null };
41
+ cells.push(run);
42
+ cellIndex += 1;
43
+ }
44
+ let signatureIndex = 0;
45
+ while (signatureIndex < cells.length) {
46
+ cells[signatureIndex].semanticSignature = PreparedArtifact.pathSignature(cells[signatureIndex].semanticPath);
47
+ signatureIndex += 1;
48
+ }
49
+ const children = [];
50
+ let pending = null;
51
+ let childIndex = 0;
52
+ while (childIndex < cells.length) {
53
+ const cell2 = cells[childIndex];
54
+ if (cell2.inlineObjectAdvance !== null) {
55
+ if (pending !== null) {
56
+ children.push(PreparedArtifact.runChild((pending)));
57
+ pending = null;
58
+ }
59
+ children.push(PreparedArtifact.inlineObjectChild(cell2));
60
+ inlineObjectCount += 1;
61
+ childIndex += 1;
62
+ continue;
63
+ }
64
+ if (pending !== null && PreparedDom.canMergePreparedRun((pending), cell2)) {
65
+ PreparedDom.mergePreparedRun((pending), cell2);
66
+ }
67
+ else {
68
+ if (pending !== null) {
69
+ children.push(PreparedArtifact.runChild((pending)));
70
+ }
71
+ pending = cell2;
72
+ }
73
+ const rubyAtEnd = PreparedArtifact.rubyAt(plan.rubyDecisions, cell2.rangeEnd);
74
+ const bopomofoAtEnd = PreparedArtifact.bopomofoAt(plan.bopomofoDecisions, cell2.rangeEnd);
75
+ if (rubyAtEnd !== null || bopomofoAtEnd.length > 0) {
76
+ if (pending !== null) {
77
+ children.push(PreparedArtifact.runChild((pending)));
78
+ pending = null;
79
+ }
80
+ }
81
+ if (rubyAtEnd !== null) {
82
+ const ruby = rubyAtEnd;
83
+ children.push(PreparedArtifact.rubyChild(ruby, line.top, cell2.semanticPath));
84
+ }
85
+ let zoneIndex = 0;
86
+ while (zoneIndex < bopomofoAtEnd.length) {
87
+ const zone = bopomofoAtEnd[zoneIndex];
88
+ children.push(PreparedArtifact.bopomofoChild(zone, cell2.bopomofoAdvanceWidth, line.top, line.bottom - line.top, cell2.semanticPath));
89
+ zoneIndex += 1;
90
+ }
91
+ childIndex += 1;
92
+ }
93
+ if (pending !== null) {
94
+ children.push(PreparedArtifact.runChild((pending)));
95
+ pending = null;
96
+ }
97
+ const last = (line.cells.length > 0 ? line.cells[line.cells.length - 1] : null);
98
+ const flowEnd = (last !== null ? last.drawX + last.naturalWidth + PreparedArtifact.inlineEndAt(inlineBoxes, last.rangeEnd) : 0.0);
99
+ const hyphenLeadingGap = (line.hyphenAdvance > 0 ? line.indent + line.visualWidth - flowEnd : 0.0);
100
+ let inlineEdgeWidth = 0.0;
101
+ let edgeIndex = 0;
102
+ while (edgeIndex < line.cells.length) {
103
+ inlineEdgeWidth += PreparedArtifact.inlineStartAt(inlineBoxes, line.cells[edgeIndex].rangeStart) + PreparedArtifact.inlineEndAt(inlineBoxes, line.cells[edgeIndex].rangeEnd);
104
+ edgeIndex += 1;
105
+ }
106
+ let childFlow = 0.0;
107
+ let flowIndex = 0;
108
+ while (flowIndex < children.length) {
109
+ const child = children[flowIndex];
110
+ if (child.kind === "run") {
111
+ const run2 = child.run;
112
+ childFlow += run2.naturalWidth + run2.trailingGap;
113
+ }
114
+ else {
115
+ if (child.kind === "inlineObject") {
116
+ const cell3 = child.cell;
117
+ childFlow += cell3.naturalWidth + (Math.abs(child.carrierMargin) >= PreparedDom.SPACING_EPSILON ? child.carrierMargin : 0.0);
118
+ }
119
+ else {
120
+ if (child.kind === "bopomofo") {
121
+ childFlow += child.width;
122
+ }
123
+ }
124
+ }
125
+ flowIndex += 1;
126
+ }
127
+ const expectedFlowWidth = flowStart + inlineEdgeWidth + childFlow + hyphenLeadingGap + line.hyphenAdvance;
128
+ const coreLineWidth = line.indent + line.visualWidth + line.hyphenAdvance;
129
+ if (Math.abs(expectedFlowWidth - coreLineWidth) > PreparedDom.RENDER_FLOW_EPSILON_PX) {
130
+ throw new PreparedDomException({ kind: "SnapshotRenderFlowMismatch", detail: `line=${lineIndex}` });
131
+ }
132
+ const markerStyles = [`--tq-line-height:${Markup.px(height)}!important`, `--tq-line-baseline-offset:${Markup.px(-(line.bottom - line.baseline))}!important`];
133
+ if (Math.abs(flowStart) >= PreparedDom.SPACING_EPSILON) {
134
+ markerStyles.push(`--tq-line-flow-start:${Markup.px(flowStart)}!important`);
135
+ }
136
+ const markerAttributes = [];
137
+ Markup.setAttribute(markerAttributes, "aria-hidden", "true");
138
+ Markup.setAttribute(markerAttributes, "class", "tq-line");
139
+ Markup.setAttribute(markerAttributes, "data-tq-copy-ignore", "true");
140
+ Markup.setAttribute(markerAttributes, "data-tq-geometry", "true");
141
+ Markup.setAttribute(markerAttributes, "data-tq-line-empty", `${line.cells.length === 0}`);
142
+ Markup.setAttribute(markerAttributes, "data-tq-line-end", line.endReason);
143
+ Markup.setAttribute(markerAttributes, "data-tq-line-top", `${line.top}`);
144
+ Markup.setAttribute(markerAttributes, "data-tq-line-bottom", `${line.bottom}`);
145
+ Markup.setAttribute(markerAttributes, "data-tq-line-baseline", `${line.baseline}`);
146
+ Markup.setAttribute(markerAttributes, "data-tq-line-flow-width", `${expectedFlowWidth}`);
147
+ Markup.setAttribute(markerAttributes, "data-tq-line-index", `${lineIndex}`);
148
+ Markup.setAttribute(markerAttributes, "data-tq-line-range", `${line.rangeStart}-${line.rangeEnd}`);
149
+ if (Math.abs(flowStart) >= PreparedDom.SPACING_EPSILON) {
150
+ Markup.setAttribute(markerAttributes, "data-tq-line-shift", "true");
151
+ }
152
+ Markup.setAttribute(markerAttributes, "data-tq-line-width", `${coreLineWidth}`);
153
+ Markup.setAttribute(markerAttributes, "data-tq-paragraph-height", `${plan.height}`);
154
+ Markup.applyDynamicStyles(markerAttributes, markerStyles, styleClassFor);
155
+ PreparedArtifact.semanticContainerFor(state, state.activeSemantics).push(Markup.renderedElement("span", markerAttributes, null, false));
156
+ let renderIndex = 0;
157
+ while (renderIndex < children.length) {
158
+ const child2 = children[renderIndex];
159
+ const container = PreparedArtifact.semanticContainerFor(state, child2.semanticPath);
160
+ if (child2.kind === "run") {
161
+ const run3 = child2.run;
162
+ container.push(PreparedDom.renderRun(run3, styleClassFor));
163
+ }
164
+ else {
165
+ if (child2.kind === "inlineObject") {
166
+ const cell4 = child2.cell;
167
+ container.push(Evidence.inlineObjectPlaceholder(cell4, child2.carrierMargin, styleClassFor));
168
+ }
169
+ else {
170
+ if (child2.kind === "ruby") {
171
+ const ruby2 = child2.ruby;
172
+ container.push(Evidence.rubyAnnotationSpan(ruby2, child2.lineTop, styleClassFor));
173
+ }
174
+ else {
175
+ const zone2 = child2.zone;
176
+ container.push(Evidence.bopomofoAnnotationSpan(zone2, child2.width, child2.lineTop, child2.lineHeight, styleClassFor));
177
+ }
178
+ }
179
+ }
180
+ renderIndex += 1;
181
+ }
182
+ if (line.hyphenAdvance > 0) {
183
+ const hyphenAttributes = [];
184
+ Markup.setAttribute(hyphenAttributes, "aria-hidden", "true");
185
+ Markup.setAttribute(hyphenAttributes, "data-tq-advance", `${line.hyphenAdvance}`);
186
+ Markup.setAttribute(hyphenAttributes, "data-tq-copy-ignore", "true");
187
+ Markup.setAttribute(hyphenAttributes, "data-tq-engine-hyphen", "true");
188
+ Markup.setAttribute(hyphenAttributes, "data-tq-geometry", "true");
189
+ Markup.setAttribute(hyphenAttributes, "data-tq-x", `${line.indent + line.visualWidth}`);
190
+ Markup.setAttribute(hyphenAttributes, "lang", locale);
191
+ const hyphenStyles = [];
192
+ if (Math.abs(hyphenLeadingGap) >= PreparedDom.SPACING_EPSILON) {
193
+ hyphenStyles.push(`margin-left:${Markup.px(hyphenLeadingGap)}!important`);
194
+ }
195
+ Markup.applyDynamicStyles(hyphenAttributes, hyphenStyles, styleClassFor);
196
+ PreparedArtifact.semanticContainerFor(state, state.activeSemantics).push(Markup.renderedElement("span", hyphenAttributes, "-", false));
197
+ }
198
+ const boundaryContainer = PreparedArtifact.semanticContainerFor(state, PreparedArtifact.crossingSpans(semantics, line.rangeEnd));
199
+ const sentinelAttributes = [];
200
+ Markup.setAttribute(sentinelAttributes, "aria-hidden", "true");
201
+ Markup.setAttribute(sentinelAttributes, "data-tq-copy-ignore", "true");
202
+ Markup.setAttribute(sentinelAttributes, "data-tq-geometry", "true");
203
+ Markup.setAttribute(sentinelAttributes, "data-tq-line-end-sentinel", `${lineIndex}`);
204
+ boundaryContainer.push(Markup.renderedElement("span", sentinelAttributes, null, false));
205
+ if (line.endReason === "MandatoryBreak") {
206
+ const hardBreakAttributes = [];
207
+ Markup.setAttribute(hardBreakAttributes, "data-tq-geometry", "true");
208
+ Markup.setAttribute(hardBreakAttributes, "data-tq-hard-break", "true");
209
+ Markup.setAttribute(hardBreakAttributes, "data-tq-src", "\n");
210
+ boundaryContainer.push(Markup.renderedElement("span", hardBreakAttributes, null, false));
211
+ }
212
+ if (lineIndex < plan.lines.length - 1) {
213
+ const breakAttributes = [];
214
+ Markup.setAttribute(breakAttributes, "data-tq-engine-break", line.endReason);
215
+ if (line.endReason !== "MandatoryBreak") {
216
+ Markup.setAttribute(breakAttributes, "aria-hidden", "true");
217
+ Markup.setAttribute(breakAttributes, "data-tq-copy-ignore", "true");
218
+ }
219
+ boundaryContainer.push(Markup.renderedElement("br", breakAttributes, null, true));
220
+ }
221
+ lineIndex += 1;
222
+ }
223
+ PreparedArtifact.semanticContainerFor(state, []);
224
+ if (plan.lines.length > 0) {
225
+ const endAttributes = [];
226
+ Markup.setAttribute(endAttributes, "aria-hidden", "true");
227
+ Markup.setAttribute(endAttributes, "data-tq-copy-ignore", "true");
228
+ Markup.setAttribute(endAttributes, "data-tq-selection-end", "true");
229
+ state.nodes.push(Markup.renderedElement("span", endAttributes, "​", false));
230
+ }
231
+ const overlayPlan = { decorationSegments: plan.decorationSegments, emphasisDots: plan.emphasisDots, fontSize: plan.fontSize, overlayWidth: plan.overlayWidth, height: plan.height };
232
+ const overlayOptions = { emphasisDotColor: options.emphasisDotColor };
233
+ Evidence.appendEvidenceOverlays(state.nodes, overlayPlan, overlayOptions);
234
+ const artifacts = [];
235
+ let htmlOut = "";
236
+ let nodeIndex = 0;
237
+ while (nodeIndex < state.nodes.length) {
238
+ htmlOut += state.nodes[nodeIndex].html;
239
+ artifacts.push(state.nodes[nodeIndex].artifact);
240
+ nodeIndex += 1;
241
+ }
242
+ return { html: htmlOut, artifact: artifacts, liveSemanticCount: (options.liveSource ? semantics.length : 0), inlineObjectCount, markerCount: plan.lines.length };
243
+ }
244
+ static newArtifactState(cjkStrong, liveSource) {
245
+ return { nodes: [], activeSemantics: [], activeContainers: [], cjkStrong, liveSource };
246
+ }
247
+ static semanticContainerFor(state, path) {
248
+ const active = state.activeSemantics;
249
+ const limit = (active.length < path.length ? active.length : path.length);
250
+ let common = 0;
251
+ while (common < limit && active[common].index === path[common].index) {
252
+ common += 1;
253
+ }
254
+ const nextActive = [];
255
+ let keepIndex = 0;
256
+ while (keepIndex < common) {
257
+ nextActive.push(active[keepIndex]);
258
+ keepIndex += 1;
259
+ }
260
+ state.activeSemantics = nextActive;
261
+ const nextContainers = [];
262
+ let keepContainer = 0;
263
+ while (keepContainer < common) {
264
+ nextContainers.push(state.activeContainers[keepContainer]);
265
+ keepContainer += 1;
266
+ }
267
+ state.activeContainers = nextContainers;
268
+ let container = state.nodes;
269
+ if (state.activeContainers.length > 0) {
270
+ container = state.activeContainers[state.activeContainers.length - 1].children;
271
+ }
272
+ let pathIndex = common;
273
+ while (pathIndex < path.length) {
274
+ const semantic = path[pathIndex];
275
+ let cjkWeight = null;
276
+ let strongIndex = 0;
277
+ while (strongIndex < state.cjkStrong.length) {
278
+ const strong = state.cjkStrong[strongIndex];
279
+ if (strong.start === semantic.start && strong.end === semantic.end) {
280
+ cjkWeight = strong.weight;
281
+ break;
282
+ }
283
+ strongIndex += 1;
284
+ }
285
+ const attributes = [];
286
+ let wrapper;
287
+ if (state.liveSource) {
288
+ Markup.setAttribute(attributes, PreparedDom.LIVE_SEMANTIC_INDEX_ATTRIBUTE, `${semantic.sourceIndex}`);
289
+ wrapper = Markup.renderedContainer("span", attributes);
290
+ }
291
+ else {
292
+ let attrIndex = 0;
293
+ while (attrIndex < semantic.attributes.length) {
294
+ attributes.push({ name: semantic.attributes[attrIndex].name, value: semantic.attributes[attrIndex].value });
295
+ attrIndex += 1;
296
+ }
297
+ Markup.setAttribute(attributes, "data-tq-source-semantic", "true");
298
+ if (cjkWeight !== null) {
299
+ const weight = cjkWeight;
300
+ Markup.setAttribute(attributes, "data-tq-cjk-emphasis", "true");
301
+ Markup.setAttribute(attributes, "style", `font-weight:${weight}!important`);
302
+ }
303
+ wrapper = Markup.renderedContainer(semantic.tagName, attributes);
304
+ }
305
+ container.push(wrapper);
306
+ state.activeSemantics.push(semantic);
307
+ state.activeContainers.push(wrapper);
308
+ container = wrapper.children;
309
+ pathIndex += 1;
310
+ }
311
+ return container;
312
+ }
313
+ static inlineBoxesFor(edges, optionBoxes) {
314
+ if (edges.length === 0) {
315
+ return optionBoxes;
316
+ }
317
+ const entries = [];
318
+ let index = 0;
319
+ while (index < edges.length) {
320
+ const edge = edges[index];
321
+ if (edge.inlineStart !== null) {
322
+ const startPx = edge.inlineStart;
323
+ entries.push({ start: edge.offset, end: edge.offset, inlineStartPx: startPx, inlineEndPx: 0.0 });
324
+ }
325
+ if (edge.inlineEnd !== null) {
326
+ const endPx = edge.inlineEnd;
327
+ entries.push({ start: edge.offset, end: edge.offset, inlineStartPx: 0.0, inlineEndPx: endPx });
328
+ }
329
+ index += 1;
330
+ }
331
+ return entries;
332
+ }
333
+ static inlineStartAt(boxes, offset) {
334
+ let sum = 0.0;
335
+ let index = 0;
336
+ while (index < boxes.length) {
337
+ if (boxes[index].start === offset) {
338
+ sum += boxes[index].inlineStartPx;
339
+ }
340
+ index += 1;
341
+ }
342
+ return sum;
343
+ }
344
+ static inlineEndAt(boxes, offset) {
345
+ let sum = 0.0;
346
+ let index = 0;
347
+ while (index < boxes.length) {
348
+ if (boxes[index].end === offset) {
349
+ sum += boxes[index].inlineEndPx;
350
+ }
351
+ index += 1;
352
+ }
353
+ return sum;
354
+ }
355
+ static rubyAt(rubies, end) {
356
+ let index = 0;
357
+ while (index < rubies.length) {
358
+ if (rubies[index].baseRangeEnd === end) {
359
+ return rubies[index];
360
+ }
361
+ index += 1;
362
+ }
363
+ return null;
364
+ }
365
+ static bopomofoAt(zones, end) {
366
+ const matches = [];
367
+ let index = 0;
368
+ while (index < zones.length) {
369
+ if (zones[index].baseRangeEnd === end) {
370
+ matches.push(zones[index]);
371
+ }
372
+ index += 1;
373
+ }
374
+ return matches;
375
+ }
376
+ static semanticsFor(semantics, rangeStart, rangeEnd) {
377
+ const matches = [];
378
+ let index = 0;
379
+ while (index < semantics.length) {
380
+ const span = semantics[index];
381
+ if (rangeStart >= span.start && rangeEnd <= span.end) {
382
+ matches.push(span);
383
+ }
384
+ index += 1;
385
+ }
386
+ return matches;
387
+ }
388
+ static crossingSpans(semantics, offset) {
389
+ const matches = [];
390
+ let index = 0;
391
+ while (index < semantics.length) {
392
+ const span = semantics[index];
393
+ if (offset > span.start && offset < span.end) {
394
+ matches.push(span);
395
+ }
396
+ index += 1;
397
+ }
398
+ return matches;
399
+ }
400
+ static renderFontFamiliesFor(spans, rangeStart, rangeEnd) {
401
+ const owners = [];
402
+ let index = 0;
403
+ while (index < spans.length) {
404
+ const span = spans[index];
405
+ if (rangeStart >= span.start && rangeEnd <= span.end) {
406
+ owners.push(span);
407
+ }
408
+ index += 1;
409
+ }
410
+ if (owners.length === 0) {
411
+ return [];
412
+ }
413
+ const signature = owners[0].signature;
414
+ let ownerIndex = 1;
415
+ while (ownerIndex < owners.length) {
416
+ if (owners[ownerIndex].signature !== signature) {
417
+ throw new PreparedDomException({ kind: "ConflictingPreparedRenderTextSpan" });
418
+ }
419
+ ownerIndex += 1;
420
+ }
421
+ return owners[0].fontFamilies;
422
+ }
423
+ static rangeContains(ranges, offset) {
424
+ let index = 0;
425
+ while (index < ranges.length) {
426
+ if (offset >= ranges[index].start && offset < ranges[index].end) {
427
+ return true;
428
+ }
429
+ index += 1;
430
+ }
431
+ return false;
432
+ }
433
+ static pathSignature(path) {
434
+ let out = "[";
435
+ let index = 0;
436
+ while (index < path.length) {
437
+ if (index > 0) {
438
+ out += ",";
439
+ }
440
+ out += path[index].signature;
441
+ index += 1;
442
+ }
443
+ return out + "]";
444
+ }
445
+ static runChild(run) {
446
+ return { kind: "run", run, cell: null, carrierMargin: 0.0, ruby: null, zone: null, width: 0.0, lineTop: 0.0, lineHeight: 0.0, semanticPath: run.semanticPath };
447
+ }
448
+ static inlineObjectChild(cell) {
449
+ return { kind: "inlineObject", run: null, cell, carrierMargin: cell.trailingGap, ruby: null, zone: null, width: 0.0, lineTop: 0.0, lineHeight: 0.0, semanticPath: cell.semanticPath };
450
+ }
451
+ static rubyChild(ruby, lineTop, semanticPath) {
452
+ return { kind: "ruby", run: null, cell: null, carrierMargin: 0.0, ruby, zone: null, width: 0.0, lineTop, lineHeight: 0.0, semanticPath };
453
+ }
454
+ static bopomofoChild(zone, width, lineTop, lineHeight, semanticPath) {
455
+ return { kind: "bopomofo", run: null, cell: null, carrierMargin: 0.0, ruby: null, zone, width, lineTop, lineHeight, semanticPath };
456
+ }
457
+ }
@@ -0,0 +1,15 @@
1
+ import { type EmphasisDotColorResolver } from "./EmphasisDotColorResolver.js";
2
+ import { type InlineBoxEntry } from "./InlineBoxEntry.js";
3
+ import { type PreparedCjkStrongSemantic } from "./PreparedCjkStrongSemantic.js";
4
+ import { type PreparedRenderTextSpan } from "./PreparedRenderTextSpan.js";
5
+ import { type PreparedSemanticSpan } from "./PreparedSemanticSpan.js";
6
+ import { type StyleClassResolver } from "./StyleClassResolver.js";
7
+ export interface PreparedArtifactOptions {
8
+ styleClassFor: StyleClassResolver | null;
9
+ liveSource: boolean;
10
+ semantics: PreparedSemanticSpan[];
11
+ renderTextSpans: PreparedRenderTextSpan[];
12
+ cjkStrongSemantics: PreparedCjkStrongSemantic[];
13
+ inlineBoxes: InlineBoxEntry[];
14
+ emphasisDotColor: EmphasisDotColorResolver | null;
15
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ import { type MarkupArtifact } from "./MarkupArtifact.js";
2
+ export interface PreparedArtifactResult {
3
+ html: string;
4
+ artifact: MarkupArtifact[];
5
+ liveSemanticCount: number;
6
+ inlineObjectCount: number;
7
+ markerCount: number;
8
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ import { type MarkupNode } from "./MarkupNode.js";
2
+ import { type PreparedCjkStrongSemantic } from "./PreparedCjkStrongSemantic.js";
3
+ import { type PreparedSemanticSpan } from "./PreparedSemanticSpan.js";
4
+ import { type RenderedMarkupContainer } from "./RenderedMarkupContainer.js";
5
+ export interface PreparedArtifactState {
6
+ nodes: MarkupNode[];
7
+ activeSemantics: PreparedSemanticSpan[];
8
+ activeContainers: RenderedMarkupContainer[];
9
+ cjkStrong: PreparedCjkStrongSemantic[];
10
+ liveSource: boolean;
11
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface PreparedCjkStrongSemantic {
2
+ start: number;
3
+ end: number;
4
+ weight: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,28 @@
1
+ import { type MarkupNode } from "./MarkupNode.js";
2
+ import { type PreparedRunRenderInput } from "./PreparedRunRenderInput.js";
3
+ import { type PreparedRunSignature } from "./PreparedRunSignature.js";
4
+ import { type PreparedSpacingResult } from "./PreparedSpacingResult.js";
5
+ import { type StyleClassResolver } from "./StyleClassResolver.js";
6
+ export declare class PreparedDom {
7
+ static ROOT_SELECTOR: string;
8
+ static LINE_MARKER_SELECTOR: string;
9
+ static VALUE_STYLE_SCOPE_ATTRIBUTE: string;
10
+ static VALUE_STYLE_ELEMENT_ATTRIBUTE: string;
11
+ static LIVE_SEMANTIC_INDEX_ATTRIBUTE: string;
12
+ static SNAPSHOT_STYLE_OWNER: string;
13
+ static DEFAULT_LOCALE: string;
14
+ static SPACING_EPSILON: number;
15
+ static SPACING_DUST_EPSILON: number;
16
+ static RENDER_FLOW_EPSILON_PX: number;
17
+ private static BASE36;
18
+ static snapshotValueStyleClass(index: number): string;
19
+ static runtimeValueStyleClass(key: string): string;
20
+ static preparedSpacing(display: string, naturalWidth: number, trailingGap: number): PreparedSpacingResult;
21
+ static preparedFeatureSignature(openTypeFeatures: string[] | null): string;
22
+ static preparedRenderFontSignature(renderFontFamilies: string[]): string;
23
+ static isPreparedOpenTypeFeatureSignature(signature: string): boolean;
24
+ static canMergePreparedRun(left: PreparedRunSignature, right: PreparedRunSignature): boolean;
25
+ static mergePreparedRun(left: PreparedRunSignature, right: PreparedRunSignature): void;
26
+ static renderRun(input: PreparedRunRenderInput, styleClassFor: StyleClassResolver | null): MarkupNode;
27
+ private static base36;
28
+ }