@tiqian/shared 0.0.0-stage.1 → 0.1.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) 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/NumericFeatureContract.d.ts +4 -0
  174. package/dist/org/tiqian/shared/prepared_dom/NumericFeatureContract.js +2 -0
  175. package/dist/org/tiqian/shared/prepared_dom/NumericFeatures.d.ts +8 -0
  176. package/dist/org/tiqian/shared/prepared_dom/NumericFeatures.js +50 -0
  177. package/dist/org/tiqian/shared/prepared_dom/PlanBopomofoZone.d.ts +8 -0
  178. package/dist/org/tiqian/shared/prepared_dom/PlanBopomofoZone.js +2 -0
  179. package/dist/org/tiqian/shared/prepared_dom/PlanRubyAnnotation.d.ts +10 -0
  180. package/dist/org/tiqian/shared/prepared_dom/PlanRubyAnnotation.js +2 -0
  181. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifact.d.ts +23 -0
  182. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifact.js +477 -0
  183. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactOptions.d.ts +15 -0
  184. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactOptions.js +2 -0
  185. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactResult.d.ts +8 -0
  186. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactResult.js +2 -0
  187. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactState.d.ts +11 -0
  188. package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactState.js +2 -0
  189. package/dist/org/tiqian/shared/prepared_dom/PreparedCjkStrongSemantic.d.ts +5 -0
  190. package/dist/org/tiqian/shared/prepared_dom/PreparedCjkStrongSemantic.js +2 -0
  191. package/dist/org/tiqian/shared/prepared_dom/PreparedDom.d.ts +29 -0
  192. package/dist/org/tiqian/shared/prepared_dom/PreparedDom.js +191 -0
  193. package/dist/org/tiqian/shared/prepared_dom/PreparedDomError.d.ts +15 -0
  194. package/dist/org/tiqian/shared/prepared_dom/PreparedDomError.js +2 -0
  195. package/dist/org/tiqian/shared/prepared_dom/PreparedDomException.d.ts +6 -0
  196. package/dist/org/tiqian/shared/prepared_dom/PreparedDomException.js +25 -0
  197. package/dist/org/tiqian/shared/prepared_dom/PreparedDomTestSupport.d.ts +11 -0
  198. package/dist/org/tiqian/shared/prepared_dom/PreparedDomTestSupport.js +93 -0
  199. package/dist/org/tiqian/shared/prepared_dom/PreparedEmphasisRange.d.ts +4 -0
  200. package/dist/org/tiqian/shared/prepared_dom/PreparedEmphasisRange.js +2 -0
  201. package/dist/org/tiqian/shared/prepared_dom/PreparedLineChild.d.ts +16 -0
  202. package/dist/org/tiqian/shared/prepared_dom/PreparedLineChild.js +2 -0
  203. package/dist/org/tiqian/shared/prepared_dom/PreparedPlan.d.ts +19 -0
  204. package/dist/org/tiqian/shared/prepared_dom/PreparedPlan.js +2 -0
  205. package/dist/org/tiqian/shared/prepared_dom/PreparedPlanCell.d.ts +26 -0
  206. package/dist/org/tiqian/shared/prepared_dom/PreparedPlanCell.js +2 -0
  207. package/dist/org/tiqian/shared/prepared_dom/PreparedPlanLine.d.ts +13 -0
  208. package/dist/org/tiqian/shared/prepared_dom/PreparedPlanLine.js +2 -0
  209. package/dist/org/tiqian/shared/prepared_dom/PreparedRenderTextSpan.d.ts +6 -0
  210. package/dist/org/tiqian/shared/prepared_dom/PreparedRenderTextSpan.js +2 -0
  211. package/dist/org/tiqian/shared/prepared_dom/PreparedRunRenderInput.d.ts +23 -0
  212. package/dist/org/tiqian/shared/prepared_dom/PreparedRunRenderInput.js +2 -0
  213. package/dist/org/tiqian/shared/prepared_dom/PreparedRunSignature.d.ts +19 -0
  214. package/dist/org/tiqian/shared/prepared_dom/PreparedRunSignature.js +2 -0
  215. package/dist/org/tiqian/shared/prepared_dom/PreparedRunTyped.d.ts +32 -0
  216. package/dist/org/tiqian/shared/prepared_dom/PreparedRunTyped.js +2 -0
  217. package/dist/org/tiqian/shared/prepared_dom/PreparedSemanticSpan.d.ts +10 -0
  218. package/dist/org/tiqian/shared/prepared_dom/PreparedSemanticSpan.js +2 -0
  219. package/dist/org/tiqian/shared/prepared_dom/PreparedSpacingResult.d.ts +4 -0
  220. package/dist/org/tiqian/shared/prepared_dom/PreparedSpacingResult.js +2 -0
  221. package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupContainer.d.ts +16 -0
  222. package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupContainer.js +48 -0
  223. package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupNode.d.ts +11 -0
  224. package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupNode.js +21 -0
  225. package/dist/org/tiqian/shared/prepared_dom/RubyAnnotation.d.ts +9 -0
  226. package/dist/org/tiqian/shared/prepared_dom/RubyAnnotation.js +2 -0
  227. package/dist/org/tiqian/shared/prepared_dom/StyleClassResolver.d.ts +4 -0
  228. package/dist/org/tiqian/shared/prepared_dom/StyleClassResolver.js +2 -0
  229. package/dist/org/tiqian/shared/prepared_dom/StyleDelta.d.ts +5 -0
  230. package/dist/org/tiqian/shared/prepared_dom/StyleDelta.js +2 -0
  231. package/dist/org/tiqian/shared/snapshot/SnapshotSource.d.ts +24 -0
  232. package/dist/org/tiqian/shared/snapshot/SnapshotSource.js +135 -0
  233. package/dist/org/tiqian/test/TestHelpers.d.ts +5 -0
  234. package/dist/org/tiqian/test/TestHelpers.js +27 -0
  235. package/dist/org/tiqian/test/trace/TestTrace.d.ts +6 -0
  236. package/dist/org/tiqian/test/trace/TestTrace.js +8 -0
  237. package/dist/org/tiqian/test/trace/TestTracePlatform.d.ts +6 -0
  238. package/dist/org/tiqian/test/trace/TestTracePlatform.js +78 -0
  239. package/dist/org/tiqian/test/trace/TestTraceRecorder.d.ts +9 -0
  240. package/dist/org/tiqian/test/trace/TestTraceRecorder.js +36 -0
  241. package/dist/org/tiqian/test/trace/TestTraceRender.d.ts +47 -0
  242. package/dist/org/tiqian/test/trace/TestTraceRender.js +690 -0
  243. package/dist/org/tiqian/test/trace/TestTraceStore.d.ts +18 -0
  244. package/dist/org/tiqian/test/trace/TestTraceStore.js +149 -0
  245. package/dist/org/tiqian/test/trace/TraceAssertionError.d.ts +5 -0
  246. package/dist/org/tiqian/test/trace/TraceAssertionError.js +2 -0
  247. package/dist/org/tiqian/test/trace/TraceAssertionException.d.ts +6 -0
  248. package/dist/org/tiqian/test/trace/TraceAssertionException.js +16 -0
  249. package/dist/org/tiqian/test/trace/TraceField.d.ts +5 -0
  250. package/dist/org/tiqian/test/trace/TraceField.js +10 -0
  251. package/dist/org/tiqian/test/trace/TraceFormat.d.ts +21 -0
  252. package/dist/org/tiqian/test/trace/TraceFormat.js +184 -0
  253. package/dist/runtime.d.ts +96 -0
  254. package/dist/runtime.js +1612 -0
  255. package/dist/std/FsError.d.ts +48 -0
  256. package/dist/std/FsError.js +2 -0
  257. package/dist/std/FsException.d.ts +6 -0
  258. package/dist/std/FsException.js +45 -0
  259. package/dist/std/UStringException.d.ts +6 -0
  260. package/dist/std/UStringException.js +21 -0
  261. package/dist/std/UStringFault.d.ts +9 -0
  262. package/dist/std/UStringFault.js +2 -0
  263. package/package.json +22 -4
  264. package/README.md +0 -3
@@ -0,0 +1,251 @@
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 Evidence {
5
+ static SPACING_EPSILON = 0.01;
6
+ static RUBY_ASCENT_RATIO = 0.8;
7
+ static BOPOMOFO_LANG = "zh-Hant-TW";
8
+ static BOPOMOFO_TONE_TARGET_INK_WIDTH_SCALE = 0.82;
9
+ static BOPOMOFO_TONE_SLASH_INK_WIDTH_EM_REGULAR = 0.404;
10
+ static BOPOMOFO_TONE_SLASH_INK_WIDTH_EM_SEMIBOLD = 0.446;
11
+ static BOPOMOFO_TONE_CARON_INK_WIDTH_EM_REGULAR = 0.644;
12
+ static BOPOMOFO_TONE_CARON_INK_WIDTH_EM_SEMIBOLD = 0.682;
13
+ static LINE_THICKNESS_EM = 0.08;
14
+ static WAVY_HALF_WAVE_EM = 0.2;
15
+ static WAVY_AMPLITUDE_EM = 0.06;
16
+ static WAVY_ENDPOINT_EPSILON_PX = 0.01;
17
+ static inlineObjectPlaceholder(cell, trailingGap, styleClassFor) {
18
+ const carriesTrailingMargin = Math.abs(trailingGap) >= Evidence.SPACING_EPSILON;
19
+ const attributes = [];
20
+ Markup.setAttribute(attributes, "data-tq-advance", `${cell.naturalWidth}`);
21
+ Markup.setAttribute(attributes, "data-tq-geometry", "true");
22
+ Markup.setAttribute(attributes, "data-tq-inline-object", "pending");
23
+ Markup.setAttribute(attributes, "data-tq-object-range", `${cell.rangeStart}-${cell.rangeEnd}`);
24
+ if (carriesTrailingMargin) {
25
+ Markup.setAttribute(attributes, "data-tq-object-trailing-margin", `${trailingGap}`);
26
+ }
27
+ Markup.setAttribute(attributes, "data-tq-x", `${cell.drawX}`);
28
+ const styles = ["display:inline-block!important", "box-sizing:border-box!important", `inline-size:${Markup.px(cell.naturalWidth)}!important`];
29
+ if (carriesTrailingMargin) {
30
+ styles.push(`margin-right:${Markup.px(trailingGap)}!important`);
31
+ }
32
+ Markup.applyDynamicStyles(attributes, styles, styleClassFor);
33
+ return Markup.renderedElement("span", attributes, null, false);
34
+ }
35
+ static rubyAnnotationSpan(ruby, lineTop, styleClassFor) {
36
+ const fontSize = ruby.fontSize;
37
+ const planAscent = ruby.ascent;
38
+ const ascent = (Number.isFinite(planAscent) ? planAscent : fontSize * Evidence.RUBY_ASCENT_RATIO);
39
+ const families = ruby.fontFamilies;
40
+ const attributes = [];
41
+ Markup.setAttribute(attributes, "data-tq-geometry", "true");
42
+ Markup.setAttribute(attributes, "data-tq-src", `(${ruby.text})`);
43
+ const styles = ["color:currentColor!important"];
44
+ if (families.length > 0) {
45
+ styles.push(`font-family:${Markup.cssFamilyList(families)}!important`);
46
+ }
47
+ styles.push(`font-size:${Markup.px(fontSize)}!important`);
48
+ styles.push(`font-weight:${ruby.fontWeight}!important`);
49
+ styles.push(`left:${Markup.px(ruby.centerX)}!important`);
50
+ styles.push("line-height:1!important");
51
+ styles.push("position:absolute!important");
52
+ styles.push(`top:${Markup.px(ruby.baselineY - lineTop - ascent)}!important`);
53
+ styles.push("transform:translateX(-50%)!important");
54
+ styles.push("white-space:pre!important");
55
+ Markup.applyDynamicStyles(attributes, styles, styleClassFor);
56
+ return Markup.renderedElement("span", attributes, ruby.text, false);
57
+ }
58
+ static bopomofoAnnotationSpan(zone, width, lineTop, lineHeight, styleClassFor) {
59
+ const fontWeight = zone.fontWeight;
60
+ const families = zone.fontFamilies;
61
+ const placements = zone.placements;
62
+ const attributes = [];
63
+ Markup.setAttribute(attributes, "data-tq-geometry", "true");
64
+ Markup.setAttribute(attributes, "data-tq-src", `(${zone.text})`);
65
+ Markup.setAttribute(attributes, "lang", Evidence.BOPOMOFO_LANG);
66
+ const styles = ["box-sizing:border-box!important", "display:inline-block!important", `height:${Markup.px(lineHeight)}!important`, `line-height:${Markup.px(lineHeight)}!important`, "overflow:visible!important", "position:relative!important", "user-select:all!important", "vertical-align:top!important", "-webkit-user-select:all!important", "white-space:pre!important", `width:${Markup.px(width)}!important`];
67
+ Markup.applyDynamicStyles(attributes, styles, styleClassFor);
68
+ const container = Markup.renderedContainer("span", attributes);
69
+ const zoneLeft = Evidence.bopomofoZoneLeft(placements);
70
+ let i = 0;
71
+ while (i < placements.length) {
72
+ const placement = placements[i];
73
+ const text = placement.text;
74
+ const css = Evidence.bopomofoCssPlacement(text, placement.role, fontWeight, placement.left, placement.top, placement.width, placement.height);
75
+ const glyphAttributes = [];
76
+ Markup.setAttribute(glyphAttributes, "data-tq-geometry", "true");
77
+ Markup.setAttribute(glyphAttributes, "lang", Evidence.BOPOMOFO_LANG);
78
+ const glyphStyles = ["color:currentColor!important"];
79
+ if (families.length > 0) {
80
+ glyphStyles.push(`font-family:${Markup.cssFamilyList(families)}!important`);
81
+ }
82
+ glyphStyles.push("font-feature-settings:'vert' 1, 'vrt2' 1!important");
83
+ glyphStyles.push(`font-size:${Markup.px(css.fontSize)}!important`);
84
+ glyphStyles.push("font-style:normal!important");
85
+ glyphStyles.push(`font-weight:${fontWeight}!important`);
86
+ glyphStyles.push(`left:${Markup.px(css.left - zoneLeft)}!important`);
87
+ glyphStyles.push(`line-height:${Markup.px(css.lineHeight)}!important`);
88
+ glyphStyles.push("overflow:visible!important");
89
+ glyphStyles.push("pointer-events:none!important");
90
+ glyphStyles.push("position:absolute!important");
91
+ glyphStyles.push(`top:${Markup.px(css.top - lineTop)}!important`);
92
+ glyphStyles.push("white-space:pre!important");
93
+ glyphStyles.push("display:inline-block!important");
94
+ glyphStyles.push("text-orientation:upright!important");
95
+ glyphStyles.push("writing-mode:vertical-rl!important");
96
+ Markup.applyDynamicStyles(glyphAttributes, glyphStyles, styleClassFor);
97
+ container.children.push(Markup.renderedElement("span", glyphAttributes, text, false));
98
+ i += 1;
99
+ }
100
+ return container;
101
+ }
102
+ static appendEvidenceOverlays(nodes, plan, options) {
103
+ const segments = (plan.decorationSegments === null ? [] : plan.decorationSegments);
104
+ const dots = (plan.emphasisDots === null ? [] : plan.emphasisDots);
105
+ const emphasisDotColor = options.emphasisDotColor;
106
+ if (segments.length > 0) {
107
+ const fontSize = plan.fontSize;
108
+ const width = plan.overlayWidth;
109
+ const height = plan.height;
110
+ if (!Number.isFinite(fontSize) || !Number.isFinite(width) || !Number.isFinite(height)) {
111
+ throw new PreparedDomException({ kind: "InvalidPreparedOverlayGeometry" });
112
+ }
113
+ const strokeWidth = fontSize * Evidence.LINE_THICKNESS_EM;
114
+ const svg = Markup.renderedContainer("svg", Evidence.overlayAttributes(width, height));
115
+ let i = 0;
116
+ while (i < segments.length) {
117
+ const segment = segments[i];
118
+ const left = segment.left;
119
+ const top = segment.top;
120
+ const right = segment.right;
121
+ const style = `--tq-decoration-color:currentColor;--tq-decoration-stroke-width:${Markup.px(strokeWidth)}`;
122
+ {
123
+ const _g = segment.kind;
124
+ switch (_g.kind) {
125
+ case "ProperNoun":
126
+ svg.children.push(Evidence.decorationLine(left, top, right, strokeWidth, style));
127
+ break;
128
+ case "BookTitle":
129
+ svg.children.push(Evidence.decorationWave(left, top, right, fontSize, strokeWidth, style));
130
+ break;
131
+ }
132
+ }
133
+ i += 1;
134
+ }
135
+ nodes.push(svg);
136
+ }
137
+ if (dots.length > 0) {
138
+ const width2 = plan.overlayWidth;
139
+ const height2 = plan.height;
140
+ if (!Number.isFinite(width2) || !Number.isFinite(height2)) {
141
+ throw new PreparedDomException({ kind: "InvalidPreparedOverlayGeometry" });
142
+ }
143
+ const svg2 = Markup.renderedContainer("svg", Evidence.overlayAttributes(width2, height2));
144
+ let j = 0;
145
+ while (j < dots.length) {
146
+ const dot = dots[j];
147
+ const color = (emphasisDotColor === null ? "" : emphasisDotColor.resolve(dot.clusterRangeStart));
148
+ const dotColor = (color.length === 0 ? "currentColor" : color);
149
+ const circleEntries = [];
150
+ Markup.setAttribute(circleEntries, "cx", `${dot.anchorX}`);
151
+ Markup.setAttribute(circleEntries, "cy", `${dot.anchorY}`);
152
+ Markup.setAttribute(circleEntries, "data-tq-decoration-dot", "true");
153
+ Markup.setAttribute(circleEntries, "fill", dotColor);
154
+ Markup.setAttribute(circleEntries, "r", `${dot.dotDiameter / 2}`);
155
+ Markup.setAttribute(circleEntries, "style", `--tq-decoration-color:${dotColor}`);
156
+ svg2.children.push(Markup.renderedElement("circle", circleEntries, null, false));
157
+ j += 1;
158
+ }
159
+ nodes.push(svg2);
160
+ }
161
+ }
162
+ static decorationLine(left, top, right, strokeWidth, style) {
163
+ const entries = [];
164
+ Markup.setAttribute(entries, "data-tq-decoration-line", "true");
165
+ Markup.setAttribute(entries, "stroke", "currentColor");
166
+ Markup.setAttribute(entries, "style", style);
167
+ Markup.setAttribute(entries, "stroke-linecap", "butt");
168
+ Markup.setAttribute(entries, "stroke-width", `${strokeWidth}`);
169
+ Markup.setAttribute(entries, "x1", `${left}`);
170
+ Markup.setAttribute(entries, "x2", `${right}`);
171
+ Markup.setAttribute(entries, "y1", `${top}`);
172
+ Markup.setAttribute(entries, "y2", `${top}`);
173
+ return Markup.renderedElement("line", entries, null, false);
174
+ }
175
+ static decorationWave(left, top, right, fontSize, strokeWidth, style) {
176
+ const entries = [];
177
+ Markup.setAttribute(entries, "data-tq-decoration-wave", "true");
178
+ Markup.setAttribute(entries, "d", Evidence.wavyLinePath(left, right, top, fontSize));
179
+ Markup.setAttribute(entries, "fill", "none");
180
+ Markup.setAttribute(entries, "stroke", "currentColor");
181
+ Markup.setAttribute(entries, "style", style);
182
+ Markup.setAttribute(entries, "stroke-linecap", "butt");
183
+ Markup.setAttribute(entries, "stroke-linejoin", "round");
184
+ Markup.setAttribute(entries, "stroke-width", `${strokeWidth}`);
185
+ return Markup.renderedElement("path", entries, null, false);
186
+ }
187
+ static bopomofoToneInkWidthEm(text, fontWeight) {
188
+ const caron = text === "ˇ";
189
+ const regular = (caron ? Evidence.BOPOMOFO_TONE_CARON_INK_WIDTH_EM_REGULAR : Evidence.BOPOMOFO_TONE_SLASH_INK_WIDTH_EM_REGULAR);
190
+ const semibold = (caron ? Evidence.BOPOMOFO_TONE_CARON_INK_WIDTH_EM_SEMIBOLD : Evidence.BOPOMOFO_TONE_SLASH_INK_WIDTH_EM_SEMIBOLD);
191
+ const t = Math.min(Math.max((fontWeight - 400) / 300, 0), 1);
192
+ return regular + (semibold - regular) * t;
193
+ }
194
+ static bopomofoCssPlacement(text, role, fontWeight, boxLeft, boxTop, boxWidth, boxHeight) {
195
+ if (role === "Symbol") {
196
+ return { left: boxLeft, top: boxTop, fontSize: boxHeight, lineHeight: boxWidth };
197
+ }
198
+ if (role === "Neutral") {
199
+ const neutralFontSize = boxWidth;
200
+ return { left: boxLeft, top: boxTop + (boxHeight - neutralFontSize) / 2, fontSize: neutralFontSize, lineHeight: boxWidth };
201
+ }
202
+ const inkWidthEm = Math.max(Evidence.bopomofoToneInkWidthEm(text, fontWeight), 0.1);
203
+ const toneFontSize = boxWidth * Evidence.BOPOMOFO_TONE_TARGET_INK_WIDTH_SCALE / inkWidthEm;
204
+ return { left: boxLeft, top: boxTop + (boxHeight - toneFontSize) / 2, fontSize: toneFontSize, lineHeight: boxWidth };
205
+ }
206
+ static bopomofoZoneLeft(placements) {
207
+ let i = 0;
208
+ while (i < placements.length) {
209
+ if (placements[i].role === "Symbol") {
210
+ return placements[i].left - placements[i].width / 9;
211
+ }
212
+ i += 1;
213
+ }
214
+ if (placements.length === 0) {
215
+ return 0;
216
+ }
217
+ let min = placements[0].left;
218
+ let j = 1;
219
+ while (j < placements.length) {
220
+ if (placements[j].left < min) {
221
+ min = placements[j].left;
222
+ }
223
+ j += 1;
224
+ }
225
+ return min;
226
+ }
227
+ static wavyLinePath(left, right, y, fontSize) {
228
+ const halfWave = Math.max(fontSize * Evidence.WAVY_HALF_WAVE_EM, 1);
229
+ const amplitude = fontSize * Evidence.WAVY_AMPLITUDE_EM;
230
+ let out = `M ${left} ${y}`;
231
+ let x = left;
232
+ let up = true;
233
+ while (x < right - Evidence.WAVY_ENDPOINT_EPSILON_PX) {
234
+ const rawNextX = x + halfWave;
235
+ const nextX = (rawNextX >= right - Evidence.WAVY_ENDPOINT_EPSILON_PX ? right : rawNextX);
236
+ const controlY = (up ? y - amplitude * 2 : y + amplitude * 2);
237
+ out += ` Q ${(x + nextX) / 2} ${controlY} ${nextX} ${y}`;
238
+ x = nextX;
239
+ up = !up;
240
+ }
241
+ return out;
242
+ }
243
+ static overlayAttributes(width, height) {
244
+ const attributes = [];
245
+ Markup.setAttribute(attributes, "aria-hidden", "true");
246
+ Markup.setAttribute(attributes, "data-tq-copy-ignore", "true");
247
+ Markup.setAttribute(attributes, "data-tq-geometry", "true");
248
+ Markup.setAttribute(attributes, "style", `--tq-overlay-width:${Markup.px(width)};--tq-overlay-height:${Markup.px(height)}`);
249
+ return attributes;
250
+ }
251
+ }
@@ -0,0 +1,12 @@
1
+ export interface ProperNoun {
2
+ readonly kind: "ProperNoun";
3
+ }
4
+ export interface BookTitle {
5
+ readonly kind: "BookTitle";
6
+ }
7
+ export type EvidenceDecorationKind = ProperNoun | BookTitle;
8
+ export declare const EvidenceDecorationKind: Readonly<{
9
+ ProperNoun: Readonly<ProperNoun>;
10
+ BookTitle: Readonly<BookTitle>;
11
+ }>;
12
+ export declare function compareEvidenceDecorationKind(a: EvidenceDecorationKind, b: EvidenceDecorationKind): number;
@@ -0,0 +1,14 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export const EvidenceDecorationKind = Object.freeze({
3
+ ProperNoun: Object.freeze({ kind: "ProperNoun" }),
4
+ BookTitle: Object.freeze({ kind: "BookTitle" })
5
+ });
6
+ export function compareEvidenceDecorationKind(a, b) {
7
+ if (a === b)
8
+ return 0;
9
+ if (a.kind === "ProperNoun")
10
+ return 0 - (b.kind === "ProperNoun" ? 0 : 0);
11
+ if (a.kind === "BookTitle")
12
+ return 1 - (b.kind === "BookTitle" ? 1 : 0);
13
+ return 0;
14
+ }
@@ -0,0 +1,7 @@
1
+ import { type EvidenceDecorationKind } from "./EvidenceDecorationKind.js";
2
+ export interface EvidenceDecorationSegment {
3
+ left: number;
4
+ top: number;
5
+ right: number;
6
+ kind: EvidenceDecorationKind;
7
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface EvidenceEmphasisDot {
2
+ clusterRangeStart: number;
3
+ anchorX: number;
4
+ anchorY: number;
5
+ dotDiameter: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ import { type EmphasisDotColorResolver } from "./EmphasisDotColorResolver.js";
2
+ export interface EvidenceOverlayOptions {
3
+ emphasisDotColor: EmphasisDotColorResolver | null;
4
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ import { type EvidenceDecorationSegment } from "./EvidenceDecorationSegment.js";
2
+ import { type EvidenceEmphasisDot } from "./EvidenceEmphasisDot.js";
3
+ export interface EvidenceOverlayPlan {
4
+ decorationSegments: EvidenceDecorationSegment[] | null;
5
+ emphasisDots: EvidenceEmphasisDot[] | null;
6
+ fontSize: number;
7
+ overlayWidth: number;
8
+ height: number;
9
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import { type EmphasisDotColorResolver } from "./EmphasisDotColorResolver.js";
2
+ export declare class FixedEmphasisDotColor implements EmphasisDotColorResolver {
3
+ constructor();
4
+ resolve(_clusterRangeStart: number): string;
5
+ }
@@ -0,0 +1,8 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export class FixedEmphasisDotColor {
3
+ constructor() {
4
+ }
5
+ resolve(_clusterRangeStart) {
6
+ return "rgb(17, 34, 51)";
7
+ }
8
+ }
@@ -0,0 +1,6 @@
1
+ export interface InlineBoxEntry {
2
+ start: number;
3
+ end: number;
4
+ inlineStartPx: number;
5
+ inlineEndPx: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface InlineEdgeEntry {
2
+ offset: number;
3
+ inlineStart: number | null;
4
+ inlineEnd: number | null;
5
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface InlineObjectPlaceholderCell {
2
+ naturalWidth: number;
3
+ rangeStart: number;
4
+ rangeEnd: number;
5
+ drawX: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ export {};
@@ -0,0 +1,30 @@
1
+ import { type AttributeEntry } from "./AttributeEntry.js";
2
+ import { type MarkupNode } from "./MarkupNode.js";
3
+ import { RenderedMarkupContainer } from "./RenderedMarkupContainer.js";
4
+ import { type StyleClassResolver } from "./StyleClassResolver.js";
5
+ export declare class Markup {
6
+ static escapeText(value: string): string;
7
+ static escapeAttribute(value: string): string;
8
+ static cssString(value: string): string;
9
+ static px(value: number): string;
10
+ static applyDynamicStyles(entries: AttributeEntry[], styles: string[], styleClassFor: StyleClassResolver | null): void;
11
+ static setAttribute(entries: AttributeEntry[], name: string, value: string): void;
12
+ static sortedAttributeEntries(entries: AttributeEntry[]): AttributeEntry[];
13
+ static serializeAttributeEntries(entries: AttributeEntry[]): string;
14
+ static cssFamilyList(families: string[]): string;
15
+ static renderedText(value: string): MarkupNode;
16
+ static renderedElement(tag: string, entries: AttributeEntry[], text: string | null, voidElement: boolean): MarkupNode;
17
+ static renderedContainer(tag: string, entries: AttributeEntry[]): RenderedMarkupContainer;
18
+ private static compareEntryNames;
19
+ private static roundToFiveDecimals;
20
+ private static formatFixed;
21
+ private static timesSmall;
22
+ private static addDecimal;
23
+ private static multiplyDecimal;
24
+ private static fivePower;
25
+ private static twoPower;
26
+ private static truncateLast;
27
+ private static reverse;
28
+ private static stripFractionZeros;
29
+ private static zeros;
30
+ }