@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.
- package/dist/org/tiqian/clreq/AdjustmentStylePolicy.d.ts +11 -0
- package/dist/org/tiqian/clreq/AdjustmentStylePolicy.js +21 -0
- package/dist/org/tiqian/clreq/AutoSpaceMode.d.ts +16 -0
- package/dist/org/tiqian/clreq/AutoSpaceMode.js +17 -0
- package/dist/org/tiqian/clreq/AutoSpacePolicy.d.ts +13 -0
- package/dist/org/tiqian/clreq/AutoSpacePolicy.js +23 -0
- package/dist/org/tiqian/clreq/BopomofoReading.d.ts +12 -0
- package/dist/org/tiqian/clreq/BopomofoReading.js +86 -0
- package/dist/org/tiqian/clreq/BopomofoTone.d.ts +28 -0
- package/dist/org/tiqian/clreq/BopomofoTone.js +26 -0
- package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.d.ts +16 -0
- package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.js +17 -0
- package/dist/org/tiqian/clreq/ClreqProfile.d.ts +27 -0
- package/dist/org/tiqian/clreq/ClreqProfile.js +58 -0
- package/dist/org/tiqian/clreq/ClreqRegion.d.ts +20 -0
- package/dist/org/tiqian/clreq/ClreqRegion.js +20 -0
- package/dist/org/tiqian/clreq/ClreqStrictness.d.ts +16 -0
- package/dist/org/tiqian/clreq/ClreqStrictness.js +17 -0
- package/dist/org/tiqian/clreq/GlueSide.d.ts +16 -0
- package/dist/org/tiqian/clreq/GlueSide.js +17 -0
- package/dist/org/tiqian/clreq/HangingPunctuationStyle.d.ts +12 -0
- package/dist/org/tiqian/clreq/HangingPunctuationStyle.js +14 -0
- package/dist/org/tiqian/clreq/InteriorPunctuationStyle.d.ts +12 -0
- package/dist/org/tiqian/clreq/InteriorPunctuationStyle.js +14 -0
- package/dist/org/tiqian/clreq/KinsokuLevel.d.ts +20 -0
- package/dist/org/tiqian/clreq/KinsokuLevel.js +20 -0
- package/dist/org/tiqian/clreq/KinsokuMode.d.ts +14 -0
- package/dist/org/tiqian/clreq/KinsokuMode.js +2 -0
- package/dist/org/tiqian/clreq/KinsokuModes.d.ts +11 -0
- package/dist/org/tiqian/clreq/KinsokuModes.js +71 -0
- package/dist/org/tiqian/clreq/LineAdjustmentStrategy.d.ts +16 -0
- package/dist/org/tiqian/clreq/LineAdjustmentStrategy.js +17 -0
- package/dist/org/tiqian/clreq/LineEndPunctuationStyle.d.ts +12 -0
- package/dist/org/tiqian/clreq/LineEndPunctuationStyle.js +14 -0
- package/dist/org/tiqian/clreq/PunctuationClass.d.ts +44 -0
- package/dist/org/tiqian/clreq/PunctuationClass.js +38 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacement.d.ts +12 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacement.js +14 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacements.d.ts +9 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacements.js +49 -0
- package/dist/org/tiqian/clreq/PunctuationWidthPolicy.d.ts +8 -0
- package/dist/org/tiqian/clreq/PunctuationWidthPolicy.js +16 -0
- package/dist/org/tiqian/clreq/ResolvedKinsoku.d.ts +12 -0
- package/dist/org/tiqian/clreq/ResolvedKinsoku.js +43 -0
- package/dist/org/tiqian/core/Cluster.d.ts +13 -0
- package/dist/org/tiqian/core/Cluster.js +24 -0
- package/dist/org/tiqian/core/EastAsianSpacingData.d.ts +4 -0
- package/dist/org/tiqian/core/EastAsianSpacingData.js +399 -0
- package/dist/org/tiqian/core/EastAsianSpacingEdges.d.ts +8 -0
- package/dist/org/tiqian/core/EastAsianSpacingEdges.js +14 -0
- package/dist/org/tiqian/core/EastAsianSpacingValue.d.ts +20 -0
- package/dist/org/tiqian/core/EastAsianSpacingValue.js +20 -0
- package/dist/org/tiqian/core/Ic.d.ts +7 -0
- package/dist/org/tiqian/core/Ic.js +17 -0
- package/dist/org/tiqian/core/IllegalStateException.d.ts +4 -0
- package/dist/org/tiqian/core/IllegalStateException.js +8 -0
- package/dist/org/tiqian/core/IntRange.d.ts +12 -0
- package/dist/org/tiqian/core/IntRange.js +30 -0
- package/dist/org/tiqian/core/LineEndReason.d.ts +16 -0
- package/dist/org/tiqian/core/LineEndReason.js +17 -0
- package/dist/org/tiqian/core/SourceBoundaryBias.d.ts +16 -0
- package/dist/org/tiqian/core/SourceBoundaryBias.js +17 -0
- package/dist/org/tiqian/core/SourceInteractionBoundaries.d.ts +29 -0
- package/dist/org/tiqian/core/SourceInteractionBoundaries.js +193 -0
- package/dist/org/tiqian/core/TextRange.d.ts +11 -0
- package/dist/org/tiqian/core/TextRange.js +40 -0
- package/dist/org/tiqian/core/TextRangeError.d.ts +11 -0
- package/dist/org/tiqian/core/TextRangeError.js +2 -0
- package/dist/org/tiqian/core/TiqianIllegalArgumentException.d.ts +6 -0
- package/dist/org/tiqian/core/TiqianIllegalArgumentException.js +21 -0
- package/dist/org/tiqian/core/TiqianNoSuchElementException.d.ts +10 -0
- package/dist/org/tiqian/core/TiqianNoSuchElementException.js +16 -0
- package/dist/org/tiqian/core/UnicodeCombiningMarkData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeCombiningMarkData.js +109 -0
- package/dist/org/tiqian/core/UnicodeEastAsianSpacing.d.ts +16 -0
- package/dist/org/tiqian/core/UnicodeEastAsianSpacing.js +88 -0
- package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.js +35 -0
- package/dist/org/tiqian/core/UnicodeExtendedPictographicData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeExtendedPictographicData.js +64 -0
- package/dist/org/tiqian/core/UnicodeNumber.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeNumber.js +14 -0
- package/dist/org/tiqian/core/UnicodeNumberData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeNumberData.js +64 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidence.d.ts +16 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidence.js +17 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.d.ts +7 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.js +17 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceData.d.ts +4 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceData.js +295 -0
- package/dist/org/tiqian/core/UnicodeWordCharacter.d.ts +6 -0
- package/dist/org/tiqian/core/UnicodeWordCharacter.js +17 -0
- package/dist/org/tiqian/core/UnicodeWordCharacterData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeWordCharacterData.js +234 -0
- package/dist/org/tiqian/font/FontRole.d.ts +28 -0
- package/dist/org/tiqian/font/FontRole.js +26 -0
- package/dist/org/tiqian/font/FontRoleContext.d.ts +13 -0
- package/dist/org/tiqian/font/FontRoleContext.js +28 -0
- package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.d.ts +51 -0
- package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.js +305 -0
- package/dist/org/tiqian/layout/LineOptimization.d.ts +124 -0
- package/dist/org/tiqian/layout/LineOptimization.js +298 -0
- package/dist/org/tiqian/layout/ProgressiveBreakDecisions.d.ts +86 -0
- package/dist/org/tiqian/layout/ProgressiveBreakDecisions.js +415 -0
- package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.d.ts +5 -0
- package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.js +33 -0
- package/dist/org/tiqian/layout/QuotePairAnalyzer.d.ts +63 -0
- package/dist/org/tiqian/layout/QuotePairAnalyzer.js +251 -0
- package/dist/org/tiqian/linebreak/BreakKind.d.ts +20 -0
- package/dist/org/tiqian/linebreak/BreakKind.js +20 -0
- package/dist/org/tiqian/shared/SnapshotValueStyle.d.ts +11 -0
- package/dist/org/tiqian/shared/SnapshotValueStyle.js +64 -0
- package/dist/org/tiqian/shared/ValueStyleInterner.d.ts +7 -0
- package/dist/org/tiqian/shared/ValueStyleInterner.js +23 -0
- package/dist/org/tiqian/shared/html/CompoundSelector.d.ts +28 -0
- package/dist/org/tiqian/shared/html/CompoundSelector.js +247 -0
- package/dist/org/tiqian/shared/html/DomAttribute.d.ts +5 -0
- package/dist/org/tiqian/shared/html/DomAttribute.js +10 -0
- package/dist/org/tiqian/shared/html/DomNode.d.ts +10 -0
- package/dist/org/tiqian/shared/html/DomNode.js +2 -0
- package/dist/org/tiqian/shared/html/DomParser.d.ts +16 -0
- package/dist/org/tiqian/shared/html/DomParser.js +84 -0
- package/dist/org/tiqian/shared/html/HtmlAttributeInsertion.d.ts +4 -0
- package/dist/org/tiqian/shared/html/HtmlAttributeInsertion.js +2 -0
- package/dist/org/tiqian/shared/html/HtmlError.d.ts +16 -0
- package/dist/org/tiqian/shared/html/HtmlError.js +17 -0
- package/dist/org/tiqian/shared/html/HtmlNameCase.d.ts +3 -0
- package/dist/org/tiqian/shared/html/HtmlNameCase.js +20 -0
- package/dist/org/tiqian/shared/html/HtmlOpeningTag.d.ts +6 -0
- package/dist/org/tiqian/shared/html/HtmlOpeningTag.js +12 -0
- package/dist/org/tiqian/shared/html/HtmlParseException.d.ts +6 -0
- package/dist/org/tiqian/shared/html/HtmlParseException.js +19 -0
- package/dist/org/tiqian/shared/html/HtmlScan.d.ts +16 -0
- package/dist/org/tiqian/shared/html/HtmlScan.js +191 -0
- package/dist/org/tiqian/shared/prepared_dom/AttributeEntry.d.ts +5 -0
- package/dist/org/tiqian/shared/prepared_dom/AttributeEntry.js +10 -0
- package/dist/org/tiqian/shared/prepared_dom/BopomofoPlacement.d.ts +8 -0
- package/dist/org/tiqian/shared/prepared_dom/BopomofoPlacement.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/BopomofoPlacementCss.d.ts +6 -0
- package/dist/org/tiqian/shared/prepared_dom/BopomofoPlacementCss.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/BopomofoZone.d.ts +7 -0
- package/dist/org/tiqian/shared/prepared_dom/BopomofoZone.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/EmphasisDotColorResolver.d.ts +4 -0
- package/dist/org/tiqian/shared/prepared_dom/EmphasisDotColorResolver.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/Evidence.d.ts +33 -0
- package/dist/org/tiqian/shared/prepared_dom/Evidence.js +251 -0
- package/dist/org/tiqian/shared/prepared_dom/EvidenceDecorationKind.d.ts +12 -0
- package/dist/org/tiqian/shared/prepared_dom/EvidenceDecorationKind.js +14 -0
- package/dist/org/tiqian/shared/prepared_dom/EvidenceDecorationSegment.d.ts +7 -0
- package/dist/org/tiqian/shared/prepared_dom/EvidenceDecorationSegment.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/EvidenceEmphasisDot.d.ts +6 -0
- package/dist/org/tiqian/shared/prepared_dom/EvidenceEmphasisDot.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/EvidenceOverlayOptions.d.ts +4 -0
- package/dist/org/tiqian/shared/prepared_dom/EvidenceOverlayOptions.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/EvidenceOverlayPlan.d.ts +9 -0
- package/dist/org/tiqian/shared/prepared_dom/EvidenceOverlayPlan.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/FixedEmphasisDotColor.d.ts +5 -0
- package/dist/org/tiqian/shared/prepared_dom/FixedEmphasisDotColor.js +8 -0
- package/dist/org/tiqian/shared/prepared_dom/InlineBoxEntry.d.ts +6 -0
- package/dist/org/tiqian/shared/prepared_dom/InlineBoxEntry.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/InlineEdgeEntry.d.ts +5 -0
- package/dist/org/tiqian/shared/prepared_dom/InlineEdgeEntry.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/InlineObjectPlaceholderCell.d.ts +6 -0
- package/dist/org/tiqian/shared/prepared_dom/InlineObjectPlaceholderCell.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/Markup.d.ts +30 -0
- package/dist/org/tiqian/shared/prepared_dom/Markup.js +344 -0
- package/dist/org/tiqian/shared/prepared_dom/MarkupArtifact.d.ts +12 -0
- package/dist/org/tiqian/shared/prepared_dom/MarkupArtifact.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/MarkupContainer.d.ts +7 -0
- package/dist/org/tiqian/shared/prepared_dom/MarkupContainer.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/MarkupNode.d.ts +5 -0
- package/dist/org/tiqian/shared/prepared_dom/MarkupNode.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PlanBopomofoZone.d.ts +8 -0
- package/dist/org/tiqian/shared/prepared_dom/PlanBopomofoZone.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PlanRubyAnnotation.d.ts +10 -0
- package/dist/org/tiqian/shared/prepared_dom/PlanRubyAnnotation.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedArtifact.d.ts +22 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedArtifact.js +457 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactOptions.d.ts +15 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactOptions.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactResult.d.ts +8 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactResult.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactState.d.ts +11 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedArtifactState.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedCjkStrongSemantic.d.ts +5 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedCjkStrongSemantic.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedDom.d.ts +28 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedDom.js +184 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedDomError.d.ts +15 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedDomError.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedDomException.d.ts +6 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedDomException.js +25 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedDomTestSupport.d.ts +11 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedDomTestSupport.js +93 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedEmphasisRange.d.ts +4 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedEmphasisRange.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedLineChild.d.ts +16 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedLineChild.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedPlan.d.ts +19 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedPlan.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedPlanCell.d.ts +26 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedPlanCell.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedPlanLine.d.ts +13 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedPlanLine.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedRenderTextSpan.d.ts +6 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedRenderTextSpan.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedRunRenderInput.d.ts +23 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedRunRenderInput.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedRunSignature.d.ts +19 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedRunSignature.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedRunTyped.d.ts +32 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedRunTyped.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedSemanticSpan.d.ts +10 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedSemanticSpan.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedSpacingResult.d.ts +4 -0
- package/dist/org/tiqian/shared/prepared_dom/PreparedSpacingResult.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupContainer.d.ts +16 -0
- package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupContainer.js +48 -0
- package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupNode.d.ts +11 -0
- package/dist/org/tiqian/shared/prepared_dom/RenderedMarkupNode.js +21 -0
- package/dist/org/tiqian/shared/prepared_dom/RubyAnnotation.d.ts +9 -0
- package/dist/org/tiqian/shared/prepared_dom/RubyAnnotation.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/StyleClassResolver.d.ts +4 -0
- package/dist/org/tiqian/shared/prepared_dom/StyleClassResolver.js +2 -0
- package/dist/org/tiqian/shared/prepared_dom/StyleDelta.d.ts +5 -0
- package/dist/org/tiqian/shared/prepared_dom/StyleDelta.js +2 -0
- package/dist/org/tiqian/shared/snapshot/SnapshotSource.d.ts +24 -0
- package/dist/org/tiqian/shared/snapshot/SnapshotSource.js +135 -0
- package/dist/org/tiqian/test/TestHelpers.d.ts +5 -0
- package/dist/org/tiqian/test/TestHelpers.js +27 -0
- package/dist/org/tiqian/test/trace/TestTrace.d.ts +6 -0
- package/dist/org/tiqian/test/trace/TestTrace.js +8 -0
- package/dist/org/tiqian/test/trace/TestTracePlatform.d.ts +6 -0
- package/dist/org/tiqian/test/trace/TestTracePlatform.js +78 -0
- package/dist/org/tiqian/test/trace/TestTraceRecorder.d.ts +9 -0
- package/dist/org/tiqian/test/trace/TestTraceRecorder.js +36 -0
- package/dist/org/tiqian/test/trace/TestTraceRender.d.ts +47 -0
- package/dist/org/tiqian/test/trace/TestTraceRender.js +690 -0
- package/dist/org/tiqian/test/trace/TestTraceStore.d.ts +18 -0
- package/dist/org/tiqian/test/trace/TestTraceStore.js +149 -0
- package/dist/org/tiqian/test/trace/TraceAssertionError.d.ts +5 -0
- package/dist/org/tiqian/test/trace/TraceAssertionError.js +2 -0
- package/dist/org/tiqian/test/trace/TraceAssertionException.d.ts +6 -0
- package/dist/org/tiqian/test/trace/TraceAssertionException.js +16 -0
- package/dist/org/tiqian/test/trace/TraceField.d.ts +5 -0
- package/dist/org/tiqian/test/trace/TraceField.js +10 -0
- package/dist/org/tiqian/test/trace/TraceFormat.d.ts +21 -0
- package/dist/org/tiqian/test/trace/TraceFormat.js +184 -0
- package/dist/runtime.d.ts +96 -0
- package/dist/runtime.js +1612 -0
- package/dist/std/FsError.d.ts +48 -0
- package/dist/std/FsError.js +2 -0
- package/dist/std/FsException.d.ts +6 -0
- package/dist/std/FsException.js +45 -0
- package/dist/std/UStringException.d.ts +6 -0
- package/dist/std/UStringException.js +21 -0
- package/dist/std/UStringFault.d.ts +9 -0
- package/dist/std/UStringFault.js +2 -0
- package/package.json +22 -4
- package/README.md +0 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LineAdjustmentStrategy } from "./LineAdjustmentStrategy.js";
|
|
2
|
+
import { LineEndPunctuationStyle } from "./LineEndPunctuationStyle.js";
|
|
3
|
+
export declare class AdjustmentStylePolicy {
|
|
4
|
+
readonly lineEndPunctuation: LineEndPunctuationStyle;
|
|
5
|
+
readonly allowInlineStopCompression: boolean;
|
|
6
|
+
readonly allowSinoWesternGapAdjustment: boolean;
|
|
7
|
+
readonly lineAdjustment: LineAdjustmentStrategy;
|
|
8
|
+
constructor(lineEndPunctuation?: LineEndPunctuationStyle | null, allowInlineStopCompression?: boolean | null, allowSinoWesternGapAdjustment?: boolean | null, lineAdjustment?: LineAdjustmentStrategy | null);
|
|
9
|
+
toString(): string;
|
|
10
|
+
static samePolicy(a: AdjustmentStylePolicy, b: AdjustmentStylePolicy): boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { LineAdjustmentStrategy } from "./LineAdjustmentStrategy.js";
|
|
3
|
+
import { LineEndPunctuationStyle } from "./LineEndPunctuationStyle.js";
|
|
4
|
+
export class AdjustmentStylePolicy {
|
|
5
|
+
lineEndPunctuation;
|
|
6
|
+
allowInlineStopCompression;
|
|
7
|
+
allowSinoWesternGapAdjustment;
|
|
8
|
+
lineAdjustment;
|
|
9
|
+
constructor(lineEndPunctuation = null, allowInlineStopCompression = null, allowSinoWesternGapAdjustment = null, lineAdjustment = null) {
|
|
10
|
+
this.lineEndPunctuation = lineEndPunctuation ?? LineEndPunctuationStyle.ForceHalfWidth;
|
|
11
|
+
this.allowInlineStopCompression = allowInlineStopCompression ?? true;
|
|
12
|
+
this.allowSinoWesternGapAdjustment = allowSinoWesternGapAdjustment ?? true;
|
|
13
|
+
this.lineAdjustment = lineAdjustment ?? LineAdjustmentStrategy.PushInFirst;
|
|
14
|
+
}
|
|
15
|
+
toString() {
|
|
16
|
+
return `AdjustmentStylePolicy(lineEndPunctuation=${this.lineEndPunctuation.kind}, allowInlineStopCompression=${this.allowInlineStopCompression}, allowSinoWesternGapAdjustment=${this.allowSinoWesternGapAdjustment}, lineAdjustment=${this.lineAdjustment.kind})`;
|
|
17
|
+
}
|
|
18
|
+
static samePolicy(a, b) {
|
|
19
|
+
return a.lineEndPunctuation === b.lineEndPunctuation && a.allowInlineStopCompression === b.allowInlineStopCompression && a.allowSinoWesternGapAdjustment === b.allowSinoWesternGapAdjustment && a.lineAdjustment === b.lineAdjustment;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Disabled {
|
|
2
|
+
readonly kind: "Disabled";
|
|
3
|
+
}
|
|
4
|
+
export interface Replace {
|
|
5
|
+
readonly kind: "Replace";
|
|
6
|
+
}
|
|
7
|
+
export interface Insert {
|
|
8
|
+
readonly kind: "Insert";
|
|
9
|
+
}
|
|
10
|
+
export type AutoSpaceMode = Disabled | Replace | Insert;
|
|
11
|
+
export declare const AutoSpaceMode: Readonly<{
|
|
12
|
+
Disabled: Readonly<Disabled>;
|
|
13
|
+
Replace: Readonly<Replace>;
|
|
14
|
+
Insert: Readonly<Insert>;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function compareAutoSpaceMode(a: AutoSpaceMode, b: AutoSpaceMode): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const AutoSpaceMode = Object.freeze({
|
|
3
|
+
Disabled: Object.freeze({ kind: "Disabled" }),
|
|
4
|
+
Replace: Object.freeze({ kind: "Replace" }),
|
|
5
|
+
Insert: Object.freeze({ kind: "Insert" })
|
|
6
|
+
});
|
|
7
|
+
export function compareAutoSpaceMode(a, b) {
|
|
8
|
+
if (a === b)
|
|
9
|
+
return 0;
|
|
10
|
+
if (a.kind === "Disabled")
|
|
11
|
+
return 0 - (b.kind === "Disabled" ? 0 : 0);
|
|
12
|
+
if (a.kind === "Replace")
|
|
13
|
+
return 1 - (b.kind === "Replace" ? 1 : 0);
|
|
14
|
+
if (a.kind === "Insert")
|
|
15
|
+
return 2 - (b.kind === "Insert" ? 2 : 0);
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AutoSpaceMode } from "./AutoSpaceMode.js";
|
|
2
|
+
export declare class AutoSpacePolicy {
|
|
3
|
+
readonly cjkLatin: AutoSpaceMode;
|
|
4
|
+
readonly cjkDigit: AutoSpaceMode;
|
|
5
|
+
readonly gapEm: number;
|
|
6
|
+
readonly stretchMaxEm: number;
|
|
7
|
+
static readonly Default: AutoSpacePolicy;
|
|
8
|
+
static readonly Clreq: AutoSpacePolicy;
|
|
9
|
+
static readonly Disabled: AutoSpacePolicy;
|
|
10
|
+
constructor(cjkLatin?: AutoSpaceMode | null, cjkDigit?: AutoSpaceMode | null, gapEm?: number | null, stretchMaxEm?: number | null);
|
|
11
|
+
toString(): string;
|
|
12
|
+
static samePolicy(a: AutoSpacePolicy, b: AutoSpacePolicy): boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { AutoSpaceMode } from "./AutoSpaceMode.js";
|
|
3
|
+
export class AutoSpacePolicy {
|
|
4
|
+
cjkLatin;
|
|
5
|
+
cjkDigit;
|
|
6
|
+
gapEm;
|
|
7
|
+
stretchMaxEm;
|
|
8
|
+
static Default = new AutoSpacePolicy();
|
|
9
|
+
static Clreq = new AutoSpacePolicy(AutoSpaceMode.Insert, AutoSpaceMode.Insert, 0.25, 0.5);
|
|
10
|
+
static Disabled = new AutoSpacePolicy(AutoSpaceMode.Disabled, AutoSpaceMode.Disabled);
|
|
11
|
+
constructor(cjkLatin = null, cjkDigit = null, gapEm = null, stretchMaxEm = null) {
|
|
12
|
+
this.cjkLatin = cjkLatin ?? AutoSpaceMode.Insert;
|
|
13
|
+
this.cjkDigit = cjkDigit ?? AutoSpaceMode.Insert;
|
|
14
|
+
this.gapEm = gapEm ?? 0.125;
|
|
15
|
+
this.stretchMaxEm = stretchMaxEm ?? 1.0 / 3.0;
|
|
16
|
+
}
|
|
17
|
+
toString() {
|
|
18
|
+
return `AutoSpacePolicy(cjkLatin=${this.cjkLatin.kind}, cjkDigit=${this.cjkDigit.kind}, gapEm=${this.gapEm}, stretchMaxEm=${this.stretchMaxEm})`;
|
|
19
|
+
}
|
|
20
|
+
static samePolicy(a, b) {
|
|
21
|
+
return a.cjkLatin === b.cjkLatin && a.cjkDigit === b.cjkDigit && a.gapEm === b.gapEm && a.stretchMaxEm === b.stretchMaxEm;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type BopomofoTone } from "./BopomofoTone.js";
|
|
2
|
+
export declare class BopomofoReading {
|
|
3
|
+
readonly symbols: readonly string[];
|
|
4
|
+
readonly tone: BopomofoTone;
|
|
5
|
+
constructor(symbols: string[], tone: BopomofoTone);
|
|
6
|
+
copy(): BopomofoReading;
|
|
7
|
+
hashCode(): number;
|
|
8
|
+
private toneIndex;
|
|
9
|
+
toString(): string;
|
|
10
|
+
}
|
|
11
|
+
export declare function BopomofoReadingtoneOrder(v: BopomofoTone): number;
|
|
12
|
+
export declare function compareBopomofoReading(a: BopomofoReading, b: BopomofoReading): number;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export class BopomofoReading {
|
|
3
|
+
symbols;
|
|
4
|
+
tone;
|
|
5
|
+
constructor(symbols, tone) {
|
|
6
|
+
this.symbols = symbols;
|
|
7
|
+
this.tone = tone;
|
|
8
|
+
}
|
|
9
|
+
copy() {
|
|
10
|
+
const copiedSymbols = [];
|
|
11
|
+
let index = 0;
|
|
12
|
+
while (index < this.symbols.length) {
|
|
13
|
+
copiedSymbols.push(this.symbols[index]);
|
|
14
|
+
index += 1;
|
|
15
|
+
}
|
|
16
|
+
return new BopomofoReading(copiedSymbols, this.tone);
|
|
17
|
+
}
|
|
18
|
+
hashCode() {
|
|
19
|
+
let hash = 17;
|
|
20
|
+
hash = hash * 31 + this.toneIndex();
|
|
21
|
+
let index = 0;
|
|
22
|
+
while (index < this.symbols.length) {
|
|
23
|
+
const symbol = this.symbols[index];
|
|
24
|
+
let unitIndex = 0;
|
|
25
|
+
while (unitIndex < symbol.length) {
|
|
26
|
+
hash = hash * 31 + (Number.isNaN(symbol.charCodeAt(unitIndex)) ? null : symbol.charCodeAt(unitIndex));
|
|
27
|
+
unitIndex += 1;
|
|
28
|
+
}
|
|
29
|
+
index += 1;
|
|
30
|
+
}
|
|
31
|
+
return hash;
|
|
32
|
+
}
|
|
33
|
+
toneIndex() {
|
|
34
|
+
const value = this.tone;
|
|
35
|
+
switch (value.kind) {
|
|
36
|
+
case "Yinping":
|
|
37
|
+
return 0;
|
|
38
|
+
case "Yangping":
|
|
39
|
+
return 1;
|
|
40
|
+
case "Shang":
|
|
41
|
+
return 2;
|
|
42
|
+
case "Qu":
|
|
43
|
+
return 3;
|
|
44
|
+
case "Neutral":
|
|
45
|
+
return 4;
|
|
46
|
+
case "Ru":
|
|
47
|
+
return 5;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
toString() {
|
|
51
|
+
return `BopomofoReading(symbols=${(() => { let out = "["; const n = this.symbols.length; for (let i = 0; i < n; i += 1) {
|
|
52
|
+
if (i > 0) {
|
|
53
|
+
out += ", ";
|
|
54
|
+
}
|
|
55
|
+
out += this.symbols[i];
|
|
56
|
+
} out += "]"; return out; })()}, tone=${this.tone.kind})`;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export function BopomofoReadingtoneOrder(v) {
|
|
60
|
+
if (v.kind === "Yinping")
|
|
61
|
+
return 0;
|
|
62
|
+
if (v.kind === "Yangping")
|
|
63
|
+
return 1;
|
|
64
|
+
if (v.kind === "Shang")
|
|
65
|
+
return 2;
|
|
66
|
+
if (v.kind === "Qu")
|
|
67
|
+
return 3;
|
|
68
|
+
if (v.kind === "Neutral")
|
|
69
|
+
return 4;
|
|
70
|
+
if (v.kind === "Ru")
|
|
71
|
+
return 5;
|
|
72
|
+
return 0;
|
|
73
|
+
}
|
|
74
|
+
export function compareBopomofoReading(a, b) {
|
|
75
|
+
if (a === b)
|
|
76
|
+
return 0;
|
|
77
|
+
for (let i0 = 0, n0 = a.symbols.length < b.symbols.length ? a.symbols.length : b.symbols.length; i0 < n0; i0++) {
|
|
78
|
+
if (a.symbols[i0] !== b.symbols[i0])
|
|
79
|
+
return a.symbols[i0] < b.symbols[i0] ? -1 : 1;
|
|
80
|
+
}
|
|
81
|
+
if (a.symbols.length !== b.symbols.length)
|
|
82
|
+
return a.symbols.length - b.symbols.length;
|
|
83
|
+
if (BopomofoReadingtoneOrder(a.tone) !== BopomofoReadingtoneOrder(b.tone))
|
|
84
|
+
return BopomofoReadingtoneOrder(a.tone) - BopomofoReadingtoneOrder(b.tone);
|
|
85
|
+
return 0;
|
|
86
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface Yinping {
|
|
2
|
+
readonly kind: "Yinping";
|
|
3
|
+
}
|
|
4
|
+
export interface Yangping {
|
|
5
|
+
readonly kind: "Yangping";
|
|
6
|
+
}
|
|
7
|
+
export interface Shang {
|
|
8
|
+
readonly kind: "Shang";
|
|
9
|
+
}
|
|
10
|
+
export interface Qu {
|
|
11
|
+
readonly kind: "Qu";
|
|
12
|
+
}
|
|
13
|
+
export interface Neutral {
|
|
14
|
+
readonly kind: "Neutral";
|
|
15
|
+
}
|
|
16
|
+
export interface Ru {
|
|
17
|
+
readonly kind: "Ru";
|
|
18
|
+
}
|
|
19
|
+
export type BopomofoTone = Yinping | Yangping | Shang | Qu | Neutral | Ru;
|
|
20
|
+
export declare const BopomofoTone: Readonly<{
|
|
21
|
+
Yinping: Readonly<Yinping>;
|
|
22
|
+
Yangping: Readonly<Yangping>;
|
|
23
|
+
Shang: Readonly<Shang>;
|
|
24
|
+
Qu: Readonly<Qu>;
|
|
25
|
+
Neutral: Readonly<Neutral>;
|
|
26
|
+
Ru: Readonly<Ru>;
|
|
27
|
+
}>;
|
|
28
|
+
export declare function compareBopomofoTone(a: BopomofoTone, b: BopomofoTone): number;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const BopomofoTone = Object.freeze({
|
|
3
|
+
Yinping: Object.freeze({ kind: "Yinping" }),
|
|
4
|
+
Yangping: Object.freeze({ kind: "Yangping" }),
|
|
5
|
+
Shang: Object.freeze({ kind: "Shang" }),
|
|
6
|
+
Qu: Object.freeze({ kind: "Qu" }),
|
|
7
|
+
Neutral: Object.freeze({ kind: "Neutral" }),
|
|
8
|
+
Ru: Object.freeze({ kind: "Ru" })
|
|
9
|
+
});
|
|
10
|
+
export function compareBopomofoTone(a, b) {
|
|
11
|
+
if (a === b)
|
|
12
|
+
return 0;
|
|
13
|
+
if (a.kind === "Yinping")
|
|
14
|
+
return 0 - (b.kind === "Yinping" ? 0 : 0);
|
|
15
|
+
if (a.kind === "Yangping")
|
|
16
|
+
return 1 - (b.kind === "Yangping" ? 1 : 0);
|
|
17
|
+
if (a.kind === "Shang")
|
|
18
|
+
return 2 - (b.kind === "Shang" ? 2 : 0);
|
|
19
|
+
if (a.kind === "Qu")
|
|
20
|
+
return 3 - (b.kind === "Qu" ? 3 : 0);
|
|
21
|
+
if (a.kind === "Neutral")
|
|
22
|
+
return 4 - (b.kind === "Neutral" ? 4 : 0);
|
|
23
|
+
if (a.kind === "Ru")
|
|
24
|
+
return 5 - (b.kind === "Ru" ? 5 : 0);
|
|
25
|
+
return 0;
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface PreserveInput {
|
|
2
|
+
readonly kind: "PreserveInput";
|
|
3
|
+
}
|
|
4
|
+
export interface PreferClreqRecommendedCodepoints {
|
|
5
|
+
readonly kind: "PreferClreqRecommendedCodepoints";
|
|
6
|
+
}
|
|
7
|
+
export interface ForceClreqRecommendedCodepoints {
|
|
8
|
+
readonly kind: "ForceClreqRecommendedCodepoints";
|
|
9
|
+
}
|
|
10
|
+
export type CjkPunctuationGlyphPolicy = PreserveInput | PreferClreqRecommendedCodepoints | ForceClreqRecommendedCodepoints;
|
|
11
|
+
export declare const CjkPunctuationGlyphPolicy: Readonly<{
|
|
12
|
+
PreserveInput: Readonly<PreserveInput>;
|
|
13
|
+
PreferClreqRecommendedCodepoints: Readonly<PreferClreqRecommendedCodepoints>;
|
|
14
|
+
ForceClreqRecommendedCodepoints: Readonly<ForceClreqRecommendedCodepoints>;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function compareCjkPunctuationGlyphPolicy(a: CjkPunctuationGlyphPolicy, b: CjkPunctuationGlyphPolicy): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const CjkPunctuationGlyphPolicy = Object.freeze({
|
|
3
|
+
PreserveInput: Object.freeze({ kind: "PreserveInput" }),
|
|
4
|
+
PreferClreqRecommendedCodepoints: Object.freeze({ kind: "PreferClreqRecommendedCodepoints" }),
|
|
5
|
+
ForceClreqRecommendedCodepoints: Object.freeze({ kind: "ForceClreqRecommendedCodepoints" })
|
|
6
|
+
});
|
|
7
|
+
export function compareCjkPunctuationGlyphPolicy(a, b) {
|
|
8
|
+
if (a === b)
|
|
9
|
+
return 0;
|
|
10
|
+
if (a.kind === "PreserveInput")
|
|
11
|
+
return 0 - (b.kind === "PreserveInput" ? 0 : 0);
|
|
12
|
+
if (a.kind === "PreferClreqRecommendedCodepoints")
|
|
13
|
+
return 1 - (b.kind === "PreferClreqRecommendedCodepoints" ? 1 : 0);
|
|
14
|
+
if (a.kind === "ForceClreqRecommendedCodepoints")
|
|
15
|
+
return 2 - (b.kind === "ForceClreqRecommendedCodepoints" ? 2 : 0);
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AdjustmentStylePolicy } from "./AdjustmentStylePolicy.js";
|
|
2
|
+
import { AutoSpacePolicy } from "./AutoSpacePolicy.js";
|
|
3
|
+
import { CjkPunctuationGlyphPolicy } from "./CjkPunctuationGlyphPolicy.js";
|
|
4
|
+
import { ClreqRegion } from "./ClreqRegion.js";
|
|
5
|
+
import { ClreqStrictness } from "./ClreqStrictness.js";
|
|
6
|
+
import { type KinsokuMode } from "./KinsokuMode.js";
|
|
7
|
+
import { type PunctuationGluePlacement } from "./PunctuationGluePlacement.js";
|
|
8
|
+
import { PunctuationWidthPolicy } from "./PunctuationWidthPolicy.js";
|
|
9
|
+
export declare class ClreqProfile {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly strictness: ClreqStrictness;
|
|
12
|
+
readonly region: ClreqRegion;
|
|
13
|
+
readonly punctuationGlyphPolicy: CjkPunctuationGlyphPolicy;
|
|
14
|
+
readonly coalesceRepeatablePunctuation: readonly number[];
|
|
15
|
+
readonly autoSpace: AutoSpacePolicy;
|
|
16
|
+
readonly gluePlacement: PunctuationGluePlacement;
|
|
17
|
+
readonly adjustment: AdjustmentStylePolicy;
|
|
18
|
+
readonly kinsokuMode: KinsokuMode;
|
|
19
|
+
readonly punctuationWidth: PunctuationWidthPolicy;
|
|
20
|
+
static readonly DefaultCoalesceRepeatablePunctuation: readonly number[];
|
|
21
|
+
static readonly MainlandHorizontal: ClreqProfile;
|
|
22
|
+
static readonly TaiwanHorizontal: ClreqProfile;
|
|
23
|
+
static readonly HongKongHorizontal: ClreqProfile;
|
|
24
|
+
constructor(id: string, strictness: ClreqStrictness, region: ClreqRegion, punctuationGlyphPolicy: CjkPunctuationGlyphPolicy | null, coalesceRepeatablePunctuation: readonly number[] | null, autoSpace: AutoSpacePolicy | null, gluePlacement: PunctuationGluePlacement | null, adjustment: AdjustmentStylePolicy, kinsokuMode: KinsokuMode, punctuationWidth: PunctuationWidthPolicy);
|
|
25
|
+
toString(): string;
|
|
26
|
+
static sameProfile(a: ClreqProfile, b: ClreqProfile): boolean;
|
|
27
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { AdjustmentStylePolicy } from "./AdjustmentStylePolicy.js";
|
|
3
|
+
import { AutoSpacePolicy } from "./AutoSpacePolicy.js";
|
|
4
|
+
import { CjkPunctuationGlyphPolicy } from "./CjkPunctuationGlyphPolicy.js";
|
|
5
|
+
import { ClreqRegion } from "./ClreqRegion.js";
|
|
6
|
+
import { ClreqStrictness } from "./ClreqStrictness.js";
|
|
7
|
+
import { KinsokuModes } from "./KinsokuModes.js";
|
|
8
|
+
import { PunctuationGluePlacements } from "./PunctuationGluePlacements.js";
|
|
9
|
+
import { PunctuationWidthPolicy } from "./PunctuationWidthPolicy.js";
|
|
10
|
+
export class ClreqProfile {
|
|
11
|
+
id;
|
|
12
|
+
strictness;
|
|
13
|
+
region;
|
|
14
|
+
punctuationGlyphPolicy;
|
|
15
|
+
coalesceRepeatablePunctuation;
|
|
16
|
+
autoSpace;
|
|
17
|
+
gluePlacement;
|
|
18
|
+
adjustment;
|
|
19
|
+
kinsokuMode;
|
|
20
|
+
punctuationWidth;
|
|
21
|
+
static DefaultCoalesceRepeatablePunctuation = [8212, 8230, 8943];
|
|
22
|
+
static MainlandHorizontal = new ClreqProfile("clreq-mainland-horizontal", ClreqStrictness.Normal, ClreqRegion.Mainland, CjkPunctuationGlyphPolicy.PreferClreqRecommendedCodepoints, ClreqProfile.DefaultCoalesceRepeatablePunctuation, AutoSpacePolicy.Default, null, new AdjustmentStylePolicy(), { kind: "MeasureAdaptive", hangBelowEm: 14.0, gbAboveEm: 24.0, strictAboveEm: 32.0 }, new PunctuationWidthPolicy());
|
|
23
|
+
static TaiwanHorizontal = new ClreqProfile("clreq-taiwan-horizontal", ClreqStrictness.Normal, ClreqRegion.Taiwan, CjkPunctuationGlyphPolicy.PreferClreqRecommendedCodepoints, ClreqProfile.DefaultCoalesceRepeatablePunctuation, AutoSpacePolicy.Default, null, new AdjustmentStylePolicy(), { kind: "MeasureAdaptive", hangBelowEm: 14.0, gbAboveEm: 24.0, strictAboveEm: 32.0 }, new PunctuationWidthPolicy());
|
|
24
|
+
static HongKongHorizontal = new ClreqProfile("clreq-hongkong-horizontal", ClreqStrictness.Normal, ClreqRegion.HongKong, CjkPunctuationGlyphPolicy.PreferClreqRecommendedCodepoints, ClreqProfile.DefaultCoalesceRepeatablePunctuation, AutoSpacePolicy.Default, null, new AdjustmentStylePolicy(), { kind: "MeasureAdaptive", hangBelowEm: 14.0, gbAboveEm: 24.0, strictAboveEm: 32.0 }, new PunctuationWidthPolicy());
|
|
25
|
+
constructor(id, strictness, region, punctuationGlyphPolicy = null, coalesceRepeatablePunctuation = null, autoSpace = null, gluePlacement = null, adjustment, kinsokuMode, punctuationWidth) {
|
|
26
|
+
this.id = id;
|
|
27
|
+
this.strictness = strictness;
|
|
28
|
+
this.region = region;
|
|
29
|
+
this.punctuationGlyphPolicy = punctuationGlyphPolicy ?? CjkPunctuationGlyphPolicy.PreferClreqRecommendedCodepoints;
|
|
30
|
+
this.coalesceRepeatablePunctuation = coalesceRepeatablePunctuation ?? ClreqProfile.DefaultCoalesceRepeatablePunctuation;
|
|
31
|
+
this.autoSpace = autoSpace ?? AutoSpacePolicy.Default;
|
|
32
|
+
this.gluePlacement = gluePlacement ?? PunctuationGluePlacements.forRegion(region);
|
|
33
|
+
this.adjustment = adjustment;
|
|
34
|
+
this.kinsokuMode = kinsokuMode;
|
|
35
|
+
this.punctuationWidth = punctuationWidth;
|
|
36
|
+
}
|
|
37
|
+
toString() {
|
|
38
|
+
return `ClreqProfile(id=${this.id}, strictness=${this.strictness.kind}, region=${this.region.kind}, punctuationGlyphPolicy=${this.punctuationGlyphPolicy.kind}, coalesceRepeatablePunctuation=${(() => { let out = "["; const n = this.coalesceRepeatablePunctuation.length; for (let i = 0; i < n; i += 1) {
|
|
39
|
+
if (i > 0) {
|
|
40
|
+
out += ", ";
|
|
41
|
+
}
|
|
42
|
+
out += this.coalesceRepeatablePunctuation[i];
|
|
43
|
+
} out += "]"; return out; })()}, autoSpace=${this.autoSpace.toString()}, gluePlacement=${this.gluePlacement.kind}, adjustment=${this.adjustment.toString()}, kinsokuMode=${this.kinsokuMode.kind === "MeasureAdaptive" ? ("MeasureAdaptive(hangBelowEm=" + this.kinsokuMode.hangBelowEm + ", gbAboveEm=" + this.kinsokuMode.gbAboveEm + ", strictAboveEm=" + this.kinsokuMode.strictAboveEm + ")") : ("Fixed(level=" + this.kinsokuMode.level.kind + ", hanging=" + this.kinsokuMode.hanging.kind + ")")}, punctuationWidth=${this.punctuationWidth.toString()})`;
|
|
44
|
+
}
|
|
45
|
+
static sameProfile(a, b) {
|
|
46
|
+
if (a.id !== b.id || a.strictness !== b.strictness || a.region !== b.region || a.punctuationGlyphPolicy !== b.punctuationGlyphPolicy || a.coalesceRepeatablePunctuation.length !== b.coalesceRepeatablePunctuation.length || !AutoSpacePolicy.samePolicy(a.autoSpace, b.autoSpace) || a.gluePlacement !== b.gluePlacement || !AdjustmentStylePolicy.samePolicy(a.adjustment, b.adjustment) || !KinsokuModes.sameMode(a.kinsokuMode, b.kinsokuMode) || !PunctuationWidthPolicy.samePolicy(a.punctuationWidth, b.punctuationWidth)) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
let index = 0;
|
|
50
|
+
while (index < a.coalesceRepeatablePunctuation.length) {
|
|
51
|
+
if (a.coalesceRepeatablePunctuation[index] !== b.coalesceRepeatablePunctuation[index]) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
index += 1;
|
|
55
|
+
}
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface Mainland {
|
|
2
|
+
readonly kind: "Mainland";
|
|
3
|
+
}
|
|
4
|
+
export interface Taiwan {
|
|
5
|
+
readonly kind: "Taiwan";
|
|
6
|
+
}
|
|
7
|
+
export interface HongKong {
|
|
8
|
+
readonly kind: "HongKong";
|
|
9
|
+
}
|
|
10
|
+
export interface Custom {
|
|
11
|
+
readonly kind: "Custom";
|
|
12
|
+
}
|
|
13
|
+
export type ClreqRegion = Mainland | Taiwan | HongKong | Custom;
|
|
14
|
+
export declare const ClreqRegion: Readonly<{
|
|
15
|
+
Mainland: Readonly<Mainland>;
|
|
16
|
+
Taiwan: Readonly<Taiwan>;
|
|
17
|
+
HongKong: Readonly<HongKong>;
|
|
18
|
+
Custom: Readonly<Custom>;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function compareClreqRegion(a: ClreqRegion, b: ClreqRegion): number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const ClreqRegion = Object.freeze({
|
|
3
|
+
Mainland: Object.freeze({ kind: "Mainland" }),
|
|
4
|
+
Taiwan: Object.freeze({ kind: "Taiwan" }),
|
|
5
|
+
HongKong: Object.freeze({ kind: "HongKong" }),
|
|
6
|
+
Custom: Object.freeze({ kind: "Custom" })
|
|
7
|
+
});
|
|
8
|
+
export function compareClreqRegion(a, b) {
|
|
9
|
+
if (a === b)
|
|
10
|
+
return 0;
|
|
11
|
+
if (a.kind === "Mainland")
|
|
12
|
+
return 0 - (b.kind === "Mainland" ? 0 : 0);
|
|
13
|
+
if (a.kind === "Taiwan")
|
|
14
|
+
return 1 - (b.kind === "Taiwan" ? 1 : 0);
|
|
15
|
+
if (a.kind === "HongKong")
|
|
16
|
+
return 2 - (b.kind === "HongKong" ? 2 : 0);
|
|
17
|
+
if (a.kind === "Custom")
|
|
18
|
+
return 3 - (b.kind === "Custom" ? 3 : 0);
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Loose {
|
|
2
|
+
readonly kind: "Loose";
|
|
3
|
+
}
|
|
4
|
+
export interface Normal {
|
|
5
|
+
readonly kind: "Normal";
|
|
6
|
+
}
|
|
7
|
+
export interface Strict {
|
|
8
|
+
readonly kind: "Strict";
|
|
9
|
+
}
|
|
10
|
+
export type ClreqStrictness = Loose | Normal | Strict;
|
|
11
|
+
export declare const ClreqStrictness: Readonly<{
|
|
12
|
+
Loose: Readonly<Loose>;
|
|
13
|
+
Normal: Readonly<Normal>;
|
|
14
|
+
Strict: Readonly<Strict>;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function compareClreqStrictness(a: ClreqStrictness, b: ClreqStrictness): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const ClreqStrictness = Object.freeze({
|
|
3
|
+
Loose: Object.freeze({ kind: "Loose" }),
|
|
4
|
+
Normal: Object.freeze({ kind: "Normal" }),
|
|
5
|
+
Strict: Object.freeze({ kind: "Strict" })
|
|
6
|
+
});
|
|
7
|
+
export function compareClreqStrictness(a, b) {
|
|
8
|
+
if (a === b)
|
|
9
|
+
return 0;
|
|
10
|
+
if (a.kind === "Loose")
|
|
11
|
+
return 0 - (b.kind === "Loose" ? 0 : 0);
|
|
12
|
+
if (a.kind === "Normal")
|
|
13
|
+
return 1 - (b.kind === "Normal" ? 1 : 0);
|
|
14
|
+
if (a.kind === "Strict")
|
|
15
|
+
return 2 - (b.kind === "Strict" ? 2 : 0);
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface LeadingOnly {
|
|
2
|
+
readonly kind: "LeadingOnly";
|
|
3
|
+
}
|
|
4
|
+
export interface TrailingOnly {
|
|
5
|
+
readonly kind: "TrailingOnly";
|
|
6
|
+
}
|
|
7
|
+
export interface BothSides {
|
|
8
|
+
readonly kind: "BothSides";
|
|
9
|
+
}
|
|
10
|
+
export type GlueSide = LeadingOnly | TrailingOnly | BothSides;
|
|
11
|
+
export declare const GlueSide: Readonly<{
|
|
12
|
+
LeadingOnly: Readonly<LeadingOnly>;
|
|
13
|
+
TrailingOnly: Readonly<TrailingOnly>;
|
|
14
|
+
BothSides: Readonly<BothSides>;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function compareGlueSide(a: GlueSide, b: GlueSide): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const GlueSide = Object.freeze({
|
|
3
|
+
LeadingOnly: Object.freeze({ kind: "LeadingOnly" }),
|
|
4
|
+
TrailingOnly: Object.freeze({ kind: "TrailingOnly" }),
|
|
5
|
+
BothSides: Object.freeze({ kind: "BothSides" })
|
|
6
|
+
});
|
|
7
|
+
export function compareGlueSide(a, b) {
|
|
8
|
+
if (a === b)
|
|
9
|
+
return 0;
|
|
10
|
+
if (a.kind === "LeadingOnly")
|
|
11
|
+
return 0 - (b.kind === "LeadingOnly" ? 0 : 0);
|
|
12
|
+
if (a.kind === "TrailingOnly")
|
|
13
|
+
return 1 - (b.kind === "TrailingOnly" ? 1 : 0);
|
|
14
|
+
if (a.kind === "BothSides")
|
|
15
|
+
return 2 - (b.kind === "BothSides" ? 2 : 0);
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface Disabled {
|
|
2
|
+
readonly kind: "Disabled";
|
|
3
|
+
}
|
|
4
|
+
export interface PauseStops {
|
|
5
|
+
readonly kind: "PauseStops";
|
|
6
|
+
}
|
|
7
|
+
export type HangingPunctuationStyle = Disabled | PauseStops;
|
|
8
|
+
export declare const HangingPunctuationStyle: Readonly<{
|
|
9
|
+
Disabled: Readonly<Disabled>;
|
|
10
|
+
PauseStops: Readonly<PauseStops>;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function compareHangingPunctuationStyle(a: HangingPunctuationStyle, b: HangingPunctuationStyle): number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const HangingPunctuationStyle = Object.freeze({
|
|
3
|
+
Disabled: Object.freeze({ kind: "Disabled" }),
|
|
4
|
+
PauseStops: Object.freeze({ kind: "PauseStops" })
|
|
5
|
+
});
|
|
6
|
+
export function compareHangingPunctuationStyle(a, b) {
|
|
7
|
+
if (a === b)
|
|
8
|
+
return 0;
|
|
9
|
+
if (a.kind === "Disabled")
|
|
10
|
+
return 0 - (b.kind === "Disabled" ? 0 : 0);
|
|
11
|
+
if (a.kind === "PauseStops")
|
|
12
|
+
return 1 - (b.kind === "PauseStops" ? 1 : 0);
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface FullWidth {
|
|
2
|
+
readonly kind: "FullWidth";
|
|
3
|
+
}
|
|
4
|
+
export interface Kaiming {
|
|
5
|
+
readonly kind: "Kaiming";
|
|
6
|
+
}
|
|
7
|
+
export type InteriorPunctuationStyle = FullWidth | Kaiming;
|
|
8
|
+
export declare const InteriorPunctuationStyle: Readonly<{
|
|
9
|
+
FullWidth: Readonly<FullWidth>;
|
|
10
|
+
Kaiming: Readonly<Kaiming>;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function compareInteriorPunctuationStyle(a: InteriorPunctuationStyle, b: InteriorPunctuationStyle): number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const InteriorPunctuationStyle = Object.freeze({
|
|
3
|
+
FullWidth: Object.freeze({ kind: "FullWidth" }),
|
|
4
|
+
Kaiming: Object.freeze({ kind: "Kaiming" })
|
|
5
|
+
});
|
|
6
|
+
export function compareInteriorPunctuationStyle(a, b) {
|
|
7
|
+
if (a === b)
|
|
8
|
+
return 0;
|
|
9
|
+
if (a.kind === "FullWidth")
|
|
10
|
+
return 0 - (b.kind === "FullWidth" ? 0 : 0);
|
|
11
|
+
if (a.kind === "Kaiming")
|
|
12
|
+
return 1 - (b.kind === "Kaiming" ? 1 : 0);
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface None {
|
|
2
|
+
readonly kind: "None";
|
|
3
|
+
}
|
|
4
|
+
export interface Basic {
|
|
5
|
+
readonly kind: "Basic";
|
|
6
|
+
}
|
|
7
|
+
export interface GbStyle {
|
|
8
|
+
readonly kind: "GbStyle";
|
|
9
|
+
}
|
|
10
|
+
export interface Strict {
|
|
11
|
+
readonly kind: "Strict";
|
|
12
|
+
}
|
|
13
|
+
export type KinsokuLevel = None | Basic | GbStyle | Strict;
|
|
14
|
+
export declare const KinsokuLevel: Readonly<{
|
|
15
|
+
None: Readonly<None>;
|
|
16
|
+
Basic: Readonly<Basic>;
|
|
17
|
+
GbStyle: Readonly<GbStyle>;
|
|
18
|
+
Strict: Readonly<Strict>;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function compareKinsokuLevel(a: KinsokuLevel, b: KinsokuLevel): number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export const KinsokuLevel = Object.freeze({
|
|
3
|
+
None: Object.freeze({ kind: "None" }),
|
|
4
|
+
Basic: Object.freeze({ kind: "Basic" }),
|
|
5
|
+
GbStyle: Object.freeze({ kind: "GbStyle" }),
|
|
6
|
+
Strict: Object.freeze({ kind: "Strict" })
|
|
7
|
+
});
|
|
8
|
+
export function compareKinsokuLevel(a, b) {
|
|
9
|
+
if (a === b)
|
|
10
|
+
return 0;
|
|
11
|
+
if (a.kind === "None")
|
|
12
|
+
return 0 - (b.kind === "None" ? 0 : 0);
|
|
13
|
+
if (a.kind === "Basic")
|
|
14
|
+
return 1 - (b.kind === "Basic" ? 1 : 0);
|
|
15
|
+
if (a.kind === "GbStyle")
|
|
16
|
+
return 2 - (b.kind === "GbStyle" ? 2 : 0);
|
|
17
|
+
if (a.kind === "Strict")
|
|
18
|
+
return 3 - (b.kind === "Strict" ? 3 : 0);
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type HangingPunctuationStyle } from "./HangingPunctuationStyle.js";
|
|
2
|
+
import { type KinsokuLevel } from "./KinsokuLevel.js";
|
|
3
|
+
export interface Fixed {
|
|
4
|
+
readonly kind: "Fixed";
|
|
5
|
+
readonly level: KinsokuLevel;
|
|
6
|
+
readonly hanging: HangingPunctuationStyle;
|
|
7
|
+
}
|
|
8
|
+
export interface MeasureAdaptive {
|
|
9
|
+
readonly kind: "MeasureAdaptive";
|
|
10
|
+
readonly hangBelowEm: number;
|
|
11
|
+
readonly gbAboveEm: number;
|
|
12
|
+
readonly strictAboveEm: number;
|
|
13
|
+
}
|
|
14
|
+
export type KinsokuMode = Fixed | MeasureAdaptive;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type KinsokuMode } from "./KinsokuMode.js";
|
|
2
|
+
import { ResolvedKinsoku } from "./ResolvedKinsoku.js";
|
|
3
|
+
export declare class KinsokuModes {
|
|
4
|
+
static resolve(mode: KinsokuMode, measureEm: number): ResolvedKinsoku;
|
|
5
|
+
static render(mode: KinsokuMode): string;
|
|
6
|
+
static sameMode(a: KinsokuMode, b: KinsokuMode): boolean;
|
|
7
|
+
private static resolveFixed;
|
|
8
|
+
private static resolveMeasureAdaptive;
|
|
9
|
+
private static sameFixed;
|
|
10
|
+
private static sameMeasureAdaptive;
|
|
11
|
+
}
|