@itwin/core-common 5.2.0-dev.8 → 5.3.0-dev.2

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 (82) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/lib/cjs/BriefcaseTypes.d.ts +2 -0
  3. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  4. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  5. package/lib/cjs/ElementProps.d.ts +8 -0
  6. package/lib/cjs/ElementProps.d.ts.map +1 -1
  7. package/lib/cjs/ElementProps.js.map +1 -1
  8. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  9. package/lib/cjs/FeatureSymbology.js +0 -2
  10. package/lib/cjs/FeatureSymbology.js.map +1 -1
  11. package/lib/cjs/annotation/TextAnnotation.d.ts +1 -1
  12. package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
  13. package/lib/cjs/annotation/TextAnnotation.js +1 -1
  14. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  15. package/lib/cjs/annotation/TextBlock.d.ts +114 -104
  16. package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
  17. package/lib/cjs/annotation/TextBlock.js +227 -108
  18. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  19. package/lib/cjs/annotation/TextBlockLayoutResult.d.ts +3 -5
  20. package/lib/cjs/annotation/TextBlockLayoutResult.d.ts.map +1 -1
  21. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  22. package/lib/cjs/annotation/TextField.d.ts +86 -0
  23. package/lib/cjs/annotation/TextField.d.ts.map +1 -0
  24. package/lib/cjs/annotation/TextField.js +10 -0
  25. package/lib/cjs/annotation/TextField.js.map +1 -0
  26. package/lib/cjs/annotation/TextStyle.d.ts +63 -1
  27. package/lib/cjs/annotation/TextStyle.d.ts.map +1 -1
  28. package/lib/cjs/annotation/TextStyle.js +44 -4
  29. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  30. package/lib/cjs/core-common.d.ts +1 -0
  31. package/lib/cjs/core-common.d.ts.map +1 -1
  32. package/lib/cjs/core-common.js +1 -0
  33. package/lib/cjs/core-common.js.map +1 -1
  34. package/lib/cjs/internal/annotations/FieldFormatter.d.ts +18 -0
  35. package/lib/cjs/internal/annotations/FieldFormatter.d.ts.map +1 -0
  36. package/lib/cjs/internal/annotations/FieldFormatter.js +66 -0
  37. package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -0
  38. package/lib/cjs/internal/cross-package.d.ts +1 -0
  39. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  40. package/lib/cjs/internal/cross-package.js +4 -1
  41. package/lib/cjs/internal/cross-package.js.map +1 -1
  42. package/lib/esm/BriefcaseTypes.d.ts +2 -0
  43. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  44. package/lib/esm/BriefcaseTypes.js.map +1 -1
  45. package/lib/esm/ElementProps.d.ts +8 -0
  46. package/lib/esm/ElementProps.d.ts.map +1 -1
  47. package/lib/esm/ElementProps.js.map +1 -1
  48. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  49. package/lib/esm/FeatureSymbology.js +0 -2
  50. package/lib/esm/FeatureSymbology.js.map +1 -1
  51. package/lib/esm/annotation/TextAnnotation.d.ts +1 -1
  52. package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
  53. package/lib/esm/annotation/TextAnnotation.js +1 -1
  54. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  55. package/lib/esm/annotation/TextBlock.d.ts +114 -104
  56. package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
  57. package/lib/esm/annotation/TextBlock.js +223 -107
  58. package/lib/esm/annotation/TextBlock.js.map +1 -1
  59. package/lib/esm/annotation/TextBlockLayoutResult.d.ts +3 -5
  60. package/lib/esm/annotation/TextBlockLayoutResult.d.ts.map +1 -1
  61. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  62. package/lib/esm/annotation/TextField.d.ts +86 -0
  63. package/lib/esm/annotation/TextField.d.ts.map +1 -0
  64. package/lib/esm/annotation/TextField.js +9 -0
  65. package/lib/esm/annotation/TextField.js.map +1 -0
  66. package/lib/esm/annotation/TextStyle.d.ts +63 -1
  67. package/lib/esm/annotation/TextStyle.d.ts.map +1 -1
  68. package/lib/esm/annotation/TextStyle.js +43 -3
  69. package/lib/esm/annotation/TextStyle.js.map +1 -1
  70. package/lib/esm/core-common.d.ts +1 -0
  71. package/lib/esm/core-common.d.ts.map +1 -1
  72. package/lib/esm/core-common.js +1 -0
  73. package/lib/esm/core-common.js.map +1 -1
  74. package/lib/esm/internal/annotations/FieldFormatter.d.ts +18 -0
  75. package/lib/esm/internal/annotations/FieldFormatter.d.ts.map +1 -0
  76. package/lib/esm/internal/annotations/FieldFormatter.js +62 -0
  77. package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -0
  78. package/lib/esm/internal/cross-package.d.ts +1 -0
  79. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  80. package/lib/esm/internal/cross-package.js +1 -0
  81. package/lib/esm/internal/cross-package.js.map +1 -1
  82. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"TextBlock.js","sourceRoot":"","sources":["../../../src/annotation/TextBlock.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAA0B,MAAM,aAAa,CAAC;AA4CxE;;;GAGG;AACH,MAAM,OAAgB,kBAAkB;IAC9B,eAAe,CAAyB;IAEhD,gBAAgB;IAChB,YAAsB,KAA+B;QACnD,IAAI,CAAC,eAAe,GAAG,iBAAiB,CAAC,UAAU,CAAC,KAAK,EAAE,cAAc,IAAI,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;OAGG;IACH,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,IAAW,cAAc,CAAC,SAAiC;QACzD,IAAI,CAAC,eAAe,GAAG,iBAAiB,CAAC,U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IAC3B,CAAC;IAEe,MAAM,CAAC,KAAyB;QAC9C,IAAI,CAAC,CAAC,KAAK,YAAY,SAAS,CAAC,EAAE,CAAC;YAClC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3D,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YACnI,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAC1E,KAAK,KAAM,KAAK,CAAC,OAAe,CAAC,GAAG,CAAC,CACtC,CAAC;QAEF,IAAI,CAAC,eAAe;YAAE,OAAO,KAAK,CAAC;QAEnC,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChG,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { TextStyleSettings, TextStyleSettingsProps } from \"./TextStyle\";\n\n/** Options supplied to [[TextBlockComponent.clearStyleOverrides]] to control how the style overrides are cleared on the component and its child components.\n * @beta\n */\nexport interface ClearTextStyleOptions {\n /** Controls whether the styleOverrides of any child components are retained.\n * By default, all overrides are cleared.\n */\n preserveChildrenOverrides?: boolean;\n}\n\n/** The JSON representation of a [[TextBlockComponent]].\n * @beta\n */\nexport interface TextBlockComponentProps {\n /** Deviations from the base [[TextStyleSettings]] defined by the [AnnotationTextStyle]($backend) applied to this component.\n * This permits you to, e.g., create a [[TextBlock]] using \"Arial\" font and override one of its [[TextRun]]s to use \"Comic Sans\" instead.\n */\n styleOverrides?: TextStyleSettingsProps;\n}\n\n/** Options supplied to [[TextBlockComponent.stringify]] to control how the content is formatted.\n * @beta\n */\nexport interface TextBlockStringifyOptions {\n /** A string to insert in between each [[Paragraph]].\n * Default: \" \" - a single space.\n */\n paragraphBreak?: string;\n /** A string to insert for each [[LineBreakRun]].\n * Default: \" \" - a single space.\n */\n lineBreak?: string;\n /** A string to insert between the numerator and denominator of each [[FractionRun]].\n * Default: \"/\"\n */\n fractionSeparator?: string;\n /** The number of spaces to use for tabs. If not provided, tabs will be represented by a tab character: \"\\t\".\n * Default: \"undefined\" - use \"\\t\".\n */\n tabsAsSpaces?: number;\n}\n\n/** Abstract representation of any of the building blocks that make up a [[TextBlock]] document - namely [[Run]]s, [[Paragraph]]s, and [[TextBlock]] itself.\n * The [[TextBlock]] can specify an [AnnotationTextStyle]($backend) that formats its contents. Each component can specify an optional [[styleOverrides]] to customize that formatting.\n * @beta\n */\nexport abstract class TextBlockComponent {\n private _styleOverrides: TextStyleSettingsProps;\n\n /** @internal */\n protected constructor(props?: TextBlockComponentProps) {\n this._styleOverrides = TextStyleSettings.cloneProps(props?.styleOverrides ?? {});\n }\n\n /** Deviations in individual properties of the [[TextStyleSettings]] in the [AnnotationTextStyle]($backend) specified by `styleId` on the [[TextBlock]].\n * For example, if the style uses the \"Arial\" font, you can override that by settings `styleOverrides.fontName` to \"Comic Sans\".\n * @see [[clearStyleOverrides]] to reset this to an empty object.\n */\n public get styleOverrides(): TextStyleSettingsProps {\n return this._styleOverrides;\n }\n\n public set styleOverrides(overrides: TextStyleSettingsProps) {\n this._styleOverrides = TextStyleSettings.cloneProps(overrides);\n }\n\n /** Reset any [[styleOverrides]] applied to this component. */\n public clearStyleOverrides(_options?: ClearTextStyleOptions): void {\n this.styleOverrides = {};\n }\n\n /** Returns true if [[styleOverrides]] specifies any deviations from the [[TextBlock]]'s [AnnotationTextStyle]($backend). */\n public get overridesStyle(): boolean {\n return Object.keys(this.styleOverrides).length > 0;\n }\n\n /** Create a deep copy of this component. */\n public abstract clone(): TextBlockComponent;\n\n /** Compute a string representation of the contents of this component and all of its sub-components. */\n public abstract stringify(options?: TextBlockStringifyOptions): string;\n\n /**\n * Returns true if the string representation of this component consists only of whitespace characters.\n * Useful for checking if the component is visually empty (producing no graphics) or contains only spaces, tabs, or line breaks.\n */\n public get isWhitespace(): boolean {\n return /^\\s*$/g.test(this.stringify());\n };\n\n /** Convert this component to its JSON representation. */\n public toJSON(): TextBlockComponentProps {\n return {\n styleOverrides: TextStyleSettings.cloneProps(this.styleOverrides),\n };\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public equals(other: TextBlockComponent): boolean {\n const myKeys = Object.keys(this.styleOverrides);\n const yrKeys = Object.keys(other._styleOverrides);\n if (myKeys.length !== yrKeys.length) {\n return false;\n }\n\n for (const name of myKeys) {\n const key = name as keyof TextStyleSettingsProps;\n if (this.styleOverrides[key] !== other.styleOverrides[key]) {\n return false;\n }\n }\n\n return true;\n }\n}\n\n/** [[TextBlockComponent]]s contained within a [[Paragraph]].\n * @beta\n */\nexport type Run = TextRun | FractionRun | TabRun | LineBreakRun | FieldRun;\n\n/** The JSON representation of a [[Run]].\n * Use the `type` field to discriminate between the different kinds of runs.\n * @beta\n */\nexport type RunProps = TextRunProps | FractionRunProps | TabRunProps | LineBreakRunProps | FieldRunProps;\n\n/** A sequence of characters within a [[Paragraph]] that share a single style. Runs are the leaf nodes of a [[TextBlock]] document. When laid out for display, a single run may span\n * multiple lines, but it will never contain different styling.\n * Use the `type` field to discriminate between the different kinds of runs.\n * @beta\n */\nexport namespace Run { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Create a run from its JSON representation.\n * @see [[TextRun.create]], [[FractionRun.create]], and [[LineBreakRun.create]] to create a run directly.\n */\n export function fromJSON(props: RunProps): Run {\n switch (props.type) {\n case \"text\": return TextRun.create(props);\n case \"fraction\": return FractionRun.create(props);\n case \"tab\": return TabRun.create(props);\n case \"linebreak\": return LineBreakRun.create(props);\n case \"field\": return FieldRun.create(props);\n }\n }\n}\n\n/** Describes whether the characters of a [[TextRun]] should be displayed normally, in subscript, or in superscript.\n * [[TextStyleSettings.superScriptScale]], [[TextStyleSettings.subScriptScale]], [[TextStyleSettings.superScriptOffsetFactor]], and [[TextStyleSettings.subScriptOffsetFactor]]\n * affect how the content is rendered.\n * @beta\n */\nexport type BaselineShift = \"subscript\" | \"superscript\" | \"none\";\n\n/** JSON representation of a [[TextRun]].\n * @beta\n */\nexport interface TextRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"text\";\n /** The characters displayed by the run.\n * Default: an empty string.\n */\n content?: string;\n /** Whether to display [[content]] as a subscript, superscript, or normally.\n * Default: \"none\"\n */\n baselineShift?: BaselineShift;\n}\n\n/** The most common type of [[Run]], containing a sequence of characters to be displayed using a single style.\n * @beta\n */\nexport class TextRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"text\";\n /** The sequence of characters to be displayed by the run. */\n public content: string;\n /** Whether to display [[content]] as a subscript, superscript, or normally. */\n public baselineShift: BaselineShift;\n\n private constructor(props?: Omit<TextRunProps, \"type\">) {\n super(props);\n this.content = props?.content ?? \"\";\n this.baselineShift = props?.baselineShift ?? \"none\";\n }\n\n public override clone(): TextRun {\n return new TextRun(this.toJSON());\n }\n\n public override toJSON(): TextRunProps {\n return {\n ...super.toJSON(),\n type: \"text\",\n content: this.content,\n baselineShift: this.baselineShift,\n };\n }\n\n public static create(props?: Omit<TextRunProps, \"type\">): TextRun {\n return new TextRun(props);\n }\n\n /** Simply returns [[content]]. */\n public override stringify(): string {\n return this.content;\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof TextRun && this.content === other.content && this.baselineShift === other.baselineShift && super.equals(other);\n }\n}\n\n/** JSON representation of a [[FractionRun]].\n * @beta\n */\nexport interface FractionRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"fraction\";\n /** The text displayed before or above the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\n numerator?: string;\n /** The text displayed after or below the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\n denominator?: string;\n}\n\n/** A [[Run]] containing a numeric ratio to be displayed as a numerator and denominator separated by a horizontal or diagonal bar.\n * @note The [[numerator]] and [[denominator]] are stored as strings. They are not technically required to contain a numeric representation.\n * @beta\n */\nexport class FractionRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"fraction\";\n /** The fraction's numerator. */\n public numerator: string;\n /** The fraction's denominator. */\n public denominator: string;\n\n private constructor(props?: Omit<FractionRunProps, \"type\">) {\n super(props);\n this.numerator = props?.numerator ?? \"\";\n this.denominator = props?.denominator ?? \"\";\n }\n\n public override toJSON(): FractionRunProps {\n return {\n ...super.toJSON(),\n type: \"fraction\",\n numerator: this.numerator,\n denominator: this.denominator,\n };\n }\n\n public override clone(): FractionRun {\n return new FractionRun(this.toJSON());\n }\n\n public static create(props?: Omit<FractionRunProps, \"type\">): FractionRun {\n return new FractionRun(props);\n }\n\n /** Formats the fraction as a string with the [[numerator]] and [[denominator]] separated by [[TextBlockStringifyOptions.fractionSeparator]]. */\n public override stringify(options?: TextBlockStringifyOptions): string {\n const sep = options?.fractionSeparator ?? \"/\";\n return `${this.numerator}${sep}${this.denominator}`;\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof FractionRun && this.numerator === other.numerator && this.denominator === other.denominator && super.equals(other);\n }\n}\n\n/** JSON representation of a [[LineBreakRun]].\n * @beta\n */\nexport interface LineBreakRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"linebreak\";\n}\n\n/** A [[Run]] that represents the end of a line of text within a [[Paragraph]]. It contains no content of its own - it simply causes subsequent content to display on a new line.\n * @beta\n */\nexport class LineBreakRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"linebreak\";\n\n private constructor(props?: TextBlockComponentProps) {\n super(props);\n }\n\n public override toJSON(): LineBreakRunProps {\n return {\n ...super.toJSON(),\n type: \"linebreak\",\n };\n }\n\n public static create(props?: TextBlockComponentProps) {\n return new LineBreakRun(props);\n }\n\n public override clone(): LineBreakRun {\n return new LineBreakRun(this.toJSON());\n }\n\n /** Simply returns [[TextBlockStringifyOptions.lineBreak]]. */\n public override stringify(options?: TextBlockStringifyOptions): string {\n return options?.lineBreak ?? \" \";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof LineBreakRun && super.equals(other);\n }\n}\n\n/** JSON representation of a [[TabRun]].\n * @beta\n */\nexport interface TabRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"tab\";\n}\n\n/** A [[TabRun]] is used to shift the next tab stop.\n * @note Only left-justified tabs are supported at this tab.\n * @beta\n */\nexport class TabRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"tab\";\n\n public override toJSON(): TabRunProps {\n return {\n ...super.toJSON(),\n type: \"tab\",\n };\n }\n\n public override clone(): TabRun {\n return new TabRun(this.toJSON());\n }\n\n public static create(props?: Omit<TabRunProps, \"type\">): TabRun {\n return new TabRun(props);\n }\n\n /**\n * Converts a [[TabRun]] to its string representation.\n * If the `tabsAsSpaces` option is provided, returns a string of spaces of the specified length.\n * Otherwise, returns a tab character (\"\\t\").\n */\n public override stringify(options?: TextBlockStringifyOptions): string {\n if (options?.tabsAsSpaces) {\n return \" \".repeat(options.tabsAsSpaces);\n }\n\n return \"\\t\";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof TabRun && super.equals(other);\n }\n}\n\n/** A chain of property accesses that resolves to a primitive value that forms the basis of the displayed content\n * of a [[FieldRun]].\n * The simplest property paths consist of a [[propertyName]] and nothing else, where `propertyName` identifies\n * a primitive property.\n * If `propertyName` identifies a struct or array property, then additional [[accessors]] are required to identify the specific value.\n * If `propertyName` (including any [[accessors]]) resolves to a JSON property, then additional [[jsonAccessors]] are required to identify a specific value within the JSON.\n * Some examples:\n * ```\n * | Access String | propertyName | accessors | jsonAccessors |\n * | ------------- | ------------ | --------- | ------------- |\n * | name | \"name\" | undefined | undefined |\n * | spouse.name | \"spouse\" | [name] | undefined |\n * | colors[2] | \"colors\" | [2] | undefined |\n * | spouse.favoriteRestaurants[1].address | \"spouse\" | [\"favoriteRestaurants\", 1, \"address\"] | undefined |\n * | jsonProperties.contactInfo.email | \"jsonProperties\" | undefined | [\"contactInfo\", \"email\"] |\n * | spouse.jsonProperties.contactInfo.phoneNumbers[0].areaCode | \"spouse\" | [\"jsonProperties\"] | [\"contactInfo\", \"phoneNumbers\", 0, \"areaCode\"] |\n * ```\n * @beta\n */\nexport interface FieldPropertyPath {\n /** The name of the BIS property of the [[FieldPropertyHost]] that serves as the root of the path. */\n propertyName: string;\n /** Property names and/or array indices describing the path from [[propertyName]] to the ultimate BIS property. */\n accessors?: Array<string | number>;\n /** If [[propertyName]] and [[accessors]] (if defined) resolve to a BIS property of extended type `Json`, property names and/or\n * array indices for selecting a primitive value within the JSON.\n */\n jsonAccessors?: Array<string | number>;\n}\n\n/** Describes the source of the property value against which a [[FieldPropertyPath]] is evaluated.\n * A field property is always hosted by an [Element]($backend). It may be a property of the element's BIS class itself,\n * or that of one of its [ElementAspect]($backend)s.\n * The [[schemaName]] and [[className]] should always identify the exact class that contains [[FieldPropertyPath.propertyName]] - not a subclass thereof.\n * @beta\n */\nexport interface FieldPropertyHost {\n /** The Id of the [Element]($backend) that hosts the property. */\n elementId: Id64String;\n /** The name of the schema containing the class identified by [[className]]. */\n schemaName: string;\n /** The name of the exact class (not a subclass) containing the property identified by [[FieldPropertyPath.propertyName]]. */\n className: string;\n}\n\n/** Placeholder type for a description of how to format the raw property value resolved by a [[FieldPropertyPath]] into a [[FieldRun]]'s display string.\n * *** COMING SOON ***\n * @beta\n */\nexport interface FieldFormatter { [k: string]: any }\n\n/** JSON representation of a [[FieldRun]].\n * @beta\n */\nexport interface FieldRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"field\";\n /** The element and BIS class containing the property described by [[propertyPath]]. */\n propertyHost: FieldPropertyHost;\n /** Describes how to obtain the property value from [[propertyHost]]. */\n propertyPath: FieldPropertyPath;\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]]. */\n formatter?: FieldFormatter;\n /** The field's most recently evaluated display string. */\n cachedContent?: string;\n}\n\n/** A [[Run]] that displays the formatted value of a property of some [Element]($backend).\n * When a [[TextBlock]] containing a [[FieldRun]] is written into the iModel as an [ITextAnnotation]($backend) element,\n * a dependency is established between the two elements via the [ElementDrivesTextAnnotation]($backend) relationship such that\n * whenever the source element specified by [[propertyHost]] is modified, the field(s) in the `ITextAnnotation` element are automatically\n * recalculated, causing their [[cachedContent]] to update. If the field's display string cannot be evaluated (for example, because the specified element or\n * property does not exist), then its cached content is set to [[FieldRun.invalidContentIndicator]].\n * A [[FieldRun]] displays its [[cachedContent]] in the same way that [[TextRun]]s display their `content`, including word wrapping where appropriate.\n * @beta\n */\nexport class FieldRun extends TextBlockComponent {\n /** Display string used to signal an error in computing the field's value. */\n public static invalidContentIndicator = \"####\";\n\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"field\";\n /** The element and BIS class containing the property described by [[propertyPath]]. */\n public readonly propertyHost: Readonly<FieldPropertyHost>;\n /** Describes how to obtain the property value from [[propertyHost]]. */\n public readonly propertyPath: Readonly<FieldPropertyPath>;\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]]. */\n public readonly formatter?: FieldFormatter;\n private _cachedContent: string;\n\n /** The field's most recently evaluated display string. */\n public get cachedContent(): string {\n return this._cachedContent;\n }\n\n /** @internal Used by core-backend when re-evaluating field content. */\n public setCachedContent(content: string | undefined): void {\n this._cachedContent = content ?? FieldRun.invalidContentIndicator;\n }\n\n private constructor(props: Omit<FieldRunProps, \"type\">) {\n super(props);\n\n this._cachedContent = props.cachedContent ?? FieldRun.invalidContentIndicator;\n this.propertyHost = props.propertyHost\n this.propertyPath = props.propertyPath;\n this.formatter = props.formatter;\n }\n\n /** Create a FieldRun from its JSON representation. */\n public static create(props: Omit<FieldRunProps, \"type\">): FieldRun {\n return new FieldRun({\n ...props,\n propertyHost: { ...props.propertyHost },\n propertyPath: structuredClone(props.propertyPath),\n formatter: structuredClone(props.formatter),\n });\n }\n\n /** Convert the FieldRun to its JSON representation. */\n public override toJSON(): FieldRunProps {\n const json: FieldRunProps = {\n ...super.toJSON(),\n type: \"field\",\n propertyHost: { ...this.propertyHost },\n propertyPath: structuredClone(this.propertyPath),\n };\n\n if (this.cachedContent !== FieldRun.invalidContentIndicator) {\n json.cachedContent = this.cachedContent;\n }\n\n if (this.formatter) {\n json.formatter = structuredClone(this.formatter);\n }\n\n return json;\n }\n\n /** Create a deep copy of this FieldRun. */\n public override clone(): FieldRun {\n return new FieldRun(this.toJSON());\n }\n\n /** Convert this FieldRun to a simple string representation. */\n public override stringify(): string {\n return this.cachedContent;\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public override equals(other: TextBlockComponent): boolean {\n if (!(other instanceof FieldRun) || !super.equals(other)) {\n return false;\n }\n\n if (\n this.propertyHost.elementId !== other.propertyHost.elementId ||\n this.propertyHost.className !== other.propertyHost.className ||\n this.propertyHost.schemaName !== other.propertyHost.schemaName\n ) {\n return false;\n }\n\n if (this.propertyPath.propertyName !== other.propertyPath.propertyName) {\n return false;\n }\n\n const thisAccessors = this.propertyPath.accessors ?? [];\n const otherAccessors = other.propertyPath.accessors ?? [];\n const thisJsonAccessors = this.propertyPath.jsonAccessors ?? [];\n const otherJsonAccessors = other.propertyPath.jsonAccessors ?? [];\n\n if (thisAccessors.length !== otherAccessors.length || thisJsonAccessors.length !== otherJsonAccessors.length) {\n return false;\n }\n\n if (!thisAccessors.every((value, index) => value === otherAccessors[index])) {\n return false;\n }\n\n if (!thisJsonAccessors.every((value, index) => value === otherJsonAccessors[index])) {\n return false;\n }\n\n if (this.formatter && other.formatter) {\n // ###TODO better comparison of formatter objects.\n if (JSON.stringify(this.formatter) !== JSON.stringify(other.formatter)) {\n return false;\n }\n } else if (this.formatter || other.formatter) {\n return false;\n }\n\n return true;\n }\n}\n\n/** JSON representation of a [[Paragraph]].\n * @beta\n */\nexport interface ParagraphProps extends TextBlockComponentProps {\n /** The collection of [[Run]]s within the paragraph.\n * Default: an empty array.\n */\n runs?: RunProps[];\n}\n\n/** A collection of [[Run]]s within a [[TextBlock]]. Each paragraph within a text block is laid out on a separate line.\n * @beta\n */\nexport class Paragraph extends TextBlockComponent {\n /** The runs within the paragraph. You can modify the contents of this array to change the content of the paragraph. */\n public readonly runs: Run[];\n\n private constructor(props?: ParagraphProps) {\n super(props);\n this.runs = props?.runs?.map((run) => Run.fromJSON(run)) ?? [];\n }\n\n public override toJSON(): ParagraphProps {\n return {\n ...super.toJSON(),\n runs: this.runs.map((run) => run.toJSON()),\n };\n }\n\n /** Create a paragraph from its JSON representation. */\n public static create(props?: ParagraphProps): Paragraph {\n return new Paragraph(props);\n }\n\n public override clone(): Paragraph {\n return new Paragraph(this.toJSON());\n }\n\n /**\n * Clears any [[styleOverrides]] applied to this Paragraph.\n * Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.\n */\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\n super.clearStyleOverrides();\n if (options?.preserveChildrenOverrides)\n return;\n\n for (const run of this.runs) {\n run.clearStyleOverrides();\n }\n }\n\n /** Compute a string representation of this paragraph by concatenating the string representations of all of its [[runs]]. */\n public override stringify(options?: TextBlockStringifyOptions): string {\n return this.runs.map((x) => x.stringify(options)).join(\"\");\n }\n\n public override equals(other: TextBlockComponent): boolean {\n if (!(other instanceof Paragraph)) {\n return false;\n }\n\n if (this.runs.length !== other.runs.length || !super.equals(other)) {\n return false;\n }\n\n return this.runs.every((run, index) => run.equals(other.runs[index]));\n }\n}\n\n/** Describes the relative alignment of the content of a [[TextBlock]].\n * @beta\n */\nexport type TextBlockJustification = \"left\" | \"center\" | \"right\";\n\n/** Describes the margins around the content inside a [[TextBlock]]. It's measured in meters.\n * @beta\n */\nexport interface TextBlockMargins {\n /** The left margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n left: number;\n /** The right margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n right: number;\n /** The top margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n top: number;\n /** The bottom margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n bottom: number;\n};\n\n/** JSON representation of a [[TextBlock]].\n * @beta\n */\nexport interface TextBlockProps extends TextBlockComponentProps {\n /** The ID of an [AnnotationTextStyle]($backend) stored in the iModel from which the base [[TextStyleSettings]] applied to the [[TextBlock]] originates. */\n styleId: Id64String;\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\n * A value less than or equal to zero indicates no wrapping is to be applied.\n * Default: 0\n */\n width?: number;\n /** The alignment of the document content. Default: \"left\". */\n justification?: TextBlockJustification;\n /** The margins to surround the document content. Default: 0 margins on all sides */\n margins?: Partial<TextBlockMargins>;\n /** The paragraphs within the text block. Default: an empty array. */\n paragraphs?: ParagraphProps[];\n}\n\n/** Represents a formatted text document consisting of a series of [[Paragraph]]s, each laid out on a separate line and containing their own content in the form of [[Run]]s.\n * You can change the content of the document by directly modifying the contents of its [[paragraphs]], or via [[appendParagraph]] and [[appendRun]].\n * No word-wrapping is applied to the document unless a [[width]] greater than zero is specified.\n * @see [[TextAnnotation]] to position a text block as an annotation in 2d or 3d space.\n * @beta\n */\nexport class TextBlock extends TextBlockComponent {\n /** The ID of the [AnnotationTextStyle]($backend) that provides the base formatting for the contents of this TextBlock.\n * @note Assigning to this property retains all style overrides on the TextBlock and its child components.\n * Call [[clearStyleOverrides]] to clear the TextBlock's and optionally all children's style overrides.\n */\n public styleId: Id64String;\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\n * A value less than or equal to zero indicates no wrapping is to be applied.\n * Default: 0\n */\n public width: number;\n /** The alignment of the document's content. */\n public justification: TextBlockJustification;\n /** The margins of the document. */\n public margins: TextBlockMargins;\n /** The ordered list of paragraphs within the document. */\n public readonly paragraphs: Paragraph[];\n\n private constructor(props: TextBlockProps) {\n super(props);\n this.styleId = props.styleId;\n this.width = props.width ?? 0;\n this.justification = props.justification ?? \"left\";\n\n // Assign default margins if not provided\n this.margins = {\n left: props.margins?.left ?? 0,\n right: props.margins?.right ?? 0,\n top: props.margins?.top ?? 0,\n bottom: props.margins?.bottom ?? 0,\n };\n\n this.paragraphs = props.paragraphs?.map((x) => Paragraph.create(x)) ?? [];\n }\n\n public override toJSON(): TextBlockProps {\n return {\n ...super.toJSON(),\n styleId: this.styleId,\n width: this.width,\n justification: this.justification,\n margins: this.margins,\n paragraphs: this.paragraphs.map((x) => x.toJSON()),\n };\n }\n\n /** Create a text block from its JSON representation. */\n public static create(props: TextBlockProps): TextBlock {\n return new TextBlock(props);\n }\n\n /** Create an empty text block containing no [[paragraphs]] and an empty [[styleId]]. */\n public static createEmpty(): TextBlock {\n return TextBlock.create({ styleId: \"\" });\n }\n\n /** Returns true if every paragraph in this text block is empty. */\n public get isEmpty(): boolean {\n return this.paragraphs.every((p) => p.runs.length === 0);\n }\n\n public override clone(): TextBlock {\n return new TextBlock(this.toJSON());\n }\n\n /**\n * Clears any [[styleOverrides]] applied to this TextBlock.\n * Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.\n */\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\n super.clearStyleOverrides();\n if (options?.preserveChildrenOverrides)\n return;\n\n for (const paragraph of this.paragraphs) {\n paragraph.clearStyleOverrides();\n }\n }\n\n /** Compute a string representation of the document's contents by concatenating the string representations of each of its [[paragraphs]], separated by [[TextBlockStringifyOptions.paragraphBreak]]. */\n public stringify(options?: TextBlockStringifyOptions): string {\n return this.paragraphs.map((x) => x.stringify(options)).join(options?.paragraphBreak ?? \" \");\n }\n\n /** Add and return a new paragraph.\n * By default, the paragraph will be created with no [[styleOverrides]], so that it inherits the style of this block.\n * @param seedFromLast If true and [[paragraphs]] is not empty, the new paragraph will inherit the style overrides of the last [[Paragraph]] in this block.\n */\n public appendParagraph(seedFromLast: boolean = false): Paragraph {\n let styleOverrides: TextStyleSettingsProps = {};\n\n if (seedFromLast && this.paragraphs.length > 0) {\n const seed = this.paragraphs[this.paragraphs.length - 1];\n styleOverrides = { ...seed.styleOverrides };\n }\n\n const paragraph = Paragraph.create({\n styleOverrides\n });\n\n this.paragraphs.push(paragraph);\n return paragraph;\n }\n\n /** Append a run to the last [[Paragraph]] in this block.\n * If the block contains no [[paragraphs]], a new one will first be created using [[appendParagraph]].\n */\n public appendRun(run: Run): void {\n const paragraph = this.paragraphs[this.paragraphs.length - 1] ?? this.appendParagraph();\n paragraph.runs.push(run);\n }\n\n public override equals(other: TextBlockComponent): boolean {\n if (!(other instanceof TextBlock)) {\n return false;\n }\n\n if (this.styleId !== other.styleId || !super.equals(other)) {\n return false;\n }\n\n if (this.width !== other.width || this.justification !== other.justification || this.paragraphs.length !== other.paragraphs.length) {\n return false;\n }\n\n const marginsAreEqual = Object.entries(this.margins).every(([key, value]) =>\n value === (other.margins as any)[key]\n );\n\n if (!marginsAreEqual) return false;\n\n return this.paragraphs.every((paragraph, index) => paragraph.equals(other.paragraphs[index]));\n }\n}\n"]}
1
+ {"version":3,"file":"TextBl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AC,EAAE,CAAC;IAEzG,OAAO,GAAG,YAAY,GAAG,UAAU,EAAE,CAAC;AACxC,CAAC;AAED;;;;;GAKG;AACH,SAAS,cAAc,CAAC,GAAW;IACjC,MAAM,MAAM,GACV,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACzD,MAAM,OAAO,GACX,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1E,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,OAAO,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;YACxB,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;YACpB,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,SAAS,cAAc,CAAC,GAAW;IACjC,MAAM,YAAY,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,EAAE,GAAG,YAAY,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { ListMarker, ListMarkerEnumerator, TextStyleSettings, TextStyleSettingsProps } from \"./TextStyle\";\nimport { FieldFormatOptions, FieldPropertyHost, FieldPropertyPath } from \"./TextField\";\n\n/** Options supplied to [[TextBlockComponent.clearStyleOverrides]] to control how the style overrides are cleared on the component and its child components.\n * @beta\n */\nexport interface ClearTextStyleOptions {\n /** Controls whether the styleOverrides of any child components are retained.\n * By default, all overrides are cleared.\n */\n preserveChildrenOverrides?: boolean;\n}\n\n/** The JSON representation of a [[TextBlockComponent]].\n * @beta\n */\nexport interface TextBlockComponentProps {\n /** Deviations from the base [[TextStyleSettings]] defined by the [AnnotationTextStyle]($backend) applied to this component.\n * This permits you to, e.g., create a [[TextBlock]] using \"Arial\" font and override one of its [[TextRun]]s to use \"Comic Sans\" instead.\n */\n styleOverrides?: TextStyleSettingsProps;\n}\n\n/** Options supplied to [[TextBlockComponent.stringify]] to control how the content is formatted.\n * @beta\n */\nexport interface TextBlockStringifyOptions {\n /** A string to insert in between each [[Paragraph]].\n * Default: \" \" - a single space.\n */\n paragraphBreak?: string;\n /** A string to insert for each [[LineBreakRun]].\n * Default: \" \" - a single space.\n */\n lineBreak?: string;\n /** A string to insert between the numerator and denominator of each [[FractionRun]].\n * Default: \"/\"\n */\n fractionSeparator?: string;\n /** The number of spaces to use for tabs. If not provided, tabs will be represented by a tab character: \"\\t\".\n * Default: \"undefined\" - use \"\\t\".\n */\n tabsAsSpaces?: number;\n /** A string to insert in between the list marker and the list item.\n * Default: \" \" - a single space.\n */\n listMarkerBreak?: string;\n}\n\n/**\n * Context information that may be useful when converting a [[TextBlock]] to a string.\n * @beta\n */\nexport interface TextBlockStringifyContext {\n /** The current depth of the text block in the document structure. */\n depth: number;\n}\n\nfunction clearStyleOverrides(component: StructuralTextBlockComponent, options?: ClearTextStyleOptions): void {\n component.styleOverrides = {};\n if (!options?.preserveChildrenOverrides) {\n for (const child of component.children) {\n child.clearStyleOverrides(options);\n }\n }\n}\n\n/**\n * Abstract representation of any of the building blocks that make up a [[TextBlock]] document - namely [[Run]]s and [[StructuralTextBlockComponent]]s.\n * The [[TextBlock]] can specify an [AnnotationTextStyle]($backend) that formats its contents.\n * Each component can specify an optional [[styleOverrides]] to customize that formatting.\n * @beta\n */\nexport abstract class TextBlockComponent {\n private _styleOverrides: TextStyleSettingsProps;\n\n /** @internal */\n protected constructor(props?: TextBlockComponentProps) {\n this._styleOverrides = TextStyleSettings.cloneProps(props?.styleOverrides ?? {});\n }\n\n /** Deviations in individual properties of the [[TextStyleSettings]] in the [AnnotationTextStyle]($backend).\n * For example, if the style uses the \"Arial\" font, you can override that by settings `styleOverrides.fontName` to \"Comic Sans\".\n * @see [[clearStyleOverrides]] to reset this to an empty object.\n */\n public get styleOverrides(): TextStyleSettingsProps {\n return this._styleOverrides;\n }\n\n public set styleOverrides(overrides: TextStyleSettingsProps) {\n this._styleOverrides = TextStyleSettings.cloneProps(overrides);\n }\n\n /** Reset any [[styleOverrides]] applied to this component. */\n public clearStyleOverrides(_options?: ClearTextStyleOptions): void {\n this.styleOverrides = {};\n }\n\n /** Returns true if [[styleOverrides]] specifies any deviations from the [[TextBlock]]'s [AnnotationTextStyle]($backend). */\n public get overridesStyle(): boolean {\n return Object.keys(this.styleOverrides).length > 0;\n }\n\n /** Create a deep copy of this component. */\n public abstract clone(): TextBlockComponent;\n\n /** Compute a string representation of the contents of this component and all of its sub-components. */\n public abstract stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string;\n\n /** Returns true if this component has no content or children. */\n public abstract get isEmpty(): boolean;\n\n /**\n * Returns true if the string representation of this component consists only of whitespace characters.\n * Useful for checking if the component is visually empty (producing no graphics) or contains only spaces, tabs, or line breaks.\n */\n public get isWhitespace(): boolean {\n return /^\\s*$/g.test(this.stringify());\n };\n\n /** Convert this component to its JSON representation. */\n public toJSON(): TextBlockComponentProps {\n return {\n styleOverrides: TextStyleSettings.cloneProps(this.styleOverrides),\n };\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public equals(other: TextBlockComponent): boolean {\n const myKeys = Object.keys(this.styleOverrides);\n const yrKeys = Object.keys(other._styleOverrides);\n if (myKeys.length !== yrKeys.length) {\n return false;\n }\n\n for (const name of myKeys) {\n const key = name as keyof TextStyleSettingsProps;\n if (this.styleOverrides[key] !== other.styleOverrides[key]) {\n return false;\n }\n }\n\n return true;\n }\n}\n\n/** [[TextBlockComponent]]s contained within a [[Paragraph]].\n * @beta\n */\nexport type Run = TextRun | FractionRun | TabRun | LineBreakRun | FieldRun;\n\n/** The JSON representation of a [[Run]].\n * Use the `type` field to discriminate between the different kinds of runs.\n * @beta\n */\nexport type RunProps = TextRunProps | FractionRunProps | TabRunProps | LineBreakRunProps | FieldRunProps;\n\n/** A sequence of characters within a [[Paragraph]] that share a single style. Runs are the leaf nodes of a [[TextBlock]] document. When laid out for display, a single run may span\n * multiple lines, but it will never contain different styling.\n * Use the `type` field to discriminate between the different kinds of runs.\n * @beta\n */\nexport namespace Run { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Create a run from its JSON representation.\n * @see [[TextRun.create]], [[FractionRun.create]], [[FieldRun.create]], [[TabRun.create]], and [[LineBreakRun.create]] to create a run directly.\n */\n export function fromJSON(props: RunProps): Run {\n switch (props.type) {\n case \"field\": return FieldRun.create(props);\n case \"fraction\": return FractionRun.create(props);\n case \"linebreak\": return LineBreakRun.create(props);\n case \"tab\": return TabRun.create(props);\n case \"text\": return TextRun.create(props);\n }\n }\n}\n\n/** Describes whether the characters of a [[TextRun]] should be displayed normally, in subscript, or in superscript.\n * [[TextStyleSettings.superScriptScale]], [[TextStyleSettings.subScriptScale]], [[TextStyleSettings.superScriptOffsetFactor]], and [[TextStyleSettings.subScriptOffsetFactor]]\n * affect how the content is rendered.\n * @beta\n */\nexport type BaselineShift = \"subscript\" | \"superscript\" | \"none\";\n\n/** JSON representation of a [[TextRun]].\n * @beta\n */\nexport interface TextRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"text\";\n /** The characters displayed by the run.\n * Default: an empty string.\n */\n content?: string;\n /** Whether to display [[content]] as a subscript, superscript, or normally.\n * Default: \"none\"\n */\n baselineShift?: BaselineShift;\n}\n\n/** The most common type of [[Run]], containing a sequence of characters to be displayed using a single style.\n * @beta\n */\nexport class TextRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"text\";\n /** The sequence of characters to be displayed by the run. */\n public content: string;\n /** Whether to display [[content]] as a subscript, superscript, or normally. */\n public baselineShift: BaselineShift;\n\n private constructor(props: TextRunProps) {\n super(props);\n this.content = props?.content ?? \"\";\n this.baselineShift = props?.baselineShift ?? \"none\";\n }\n\n public override clone(): TextRun {\n return new TextRun(this.toJSON());\n }\n\n public override toJSON(): TextRunProps {\n return {\n ...super.toJSON(),\n type: \"text\",\n content: this.content,\n baselineShift: this.baselineShift,\n };\n }\n\n public static create(props?: Omit<TextRunProps, \"type\">): TextRun {\n return new TextRun({ ...props, type: \"text\" });\n }\n\n public override get isEmpty(): boolean {\n return this.stringify().length === 0;\n }\n\n /** Simply returns [[content]]. */\n public override stringify(): string {\n return this.content;\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof TextRun && this.content === other.content && this.baselineShift === other.baselineShift && super.equals(other);\n }\n}\n\n/** JSON representation of a [[FractionRun]].\n * @beta\n */\nexport interface FractionRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"fraction\";\n /** The text displayed before or above the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\n numerator?: string;\n /** The text displayed after or below the fraction separator, depending on [[TextStyleSettings.stackedFractionType]]. Default: an empty string. */\n denominator?: string;\n}\n\n/** A [[Run]] containing a numeric ratio to be displayed as a numerator and denominator separated by a horizontal or diagonal bar.\n * @note The [[numerator]] and [[denominator]] are stored as strings. They are not technically required to contain a numeric representation.\n * @beta\n */\nexport class FractionRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"fraction\";\n /** The fraction's numerator. */\n public numerator: string;\n /** The fraction's denominator. */\n public denominator: string;\n\n private constructor(props: FractionRunProps) {\n super(props);\n this.numerator = props?.numerator ?? \"\";\n this.denominator = props?.denominator ?? \"\";\n }\n\n public override toJSON(): FractionRunProps {\n return {\n ...super.toJSON(),\n type: \"fraction\",\n numerator: this.numerator,\n denominator: this.denominator,\n };\n }\n\n public override clone(): FractionRun {\n return new FractionRun(this.toJSON());\n }\n\n public static create(props?: Omit<FractionRunProps, \"type\">): FractionRun {\n return new FractionRun({ ...props, type: \"fraction\" });\n }\n\n public override get isEmpty(): boolean {\n return this.stringify().length === 0;\n }\n\n /** Formats the fraction as a string with the [[numerator]] and [[denominator]] separated by [[TextBlockStringifyOptions.fractionSeparator]]. */\n public override stringify(options?: TextBlockStringifyOptions): string {\n const sep = options?.fractionSeparator ?? \"/\";\n return `${this.numerator}${sep}${this.denominator}`;\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof FractionRun && this.numerator === other.numerator && this.denominator === other.denominator && super.equals(other);\n }\n}\n\n/** JSON representation of a [[LineBreakRun]].\n * @beta\n */\nexport interface LineBreakRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"linebreak\";\n}\n\n/** A [[Run]] that represents the end of a line of text within a [[Paragraph]]. It contains no content of its own - it simply causes subsequent content to display on a new line.\n * @beta\n */\nexport class LineBreakRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"linebreak\";\n\n private constructor(props: LineBreakRunProps) {\n super(props);\n }\n\n public override toJSON(): LineBreakRunProps {\n return {\n ...super.toJSON(),\n type: \"linebreak\",\n };\n }\n\n public static create(props?: Omit<LineBreakRunProps, \"type\">) {\n return new LineBreakRun({ ...props, type: \"linebreak\" });\n }\n\n public override clone(): LineBreakRun {\n return new LineBreakRun(this.toJSON());\n }\n\n public override get isEmpty(): boolean {\n return this.stringify().length === 0;\n }\n\n /** Simply returns [[TextBlockStringifyOptions.lineBreak]]. */\n public override stringify(options?: TextBlockStringifyOptions): string {\n return options?.lineBreak ?? \" \";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof LineBreakRun && super.equals(other);\n }\n}\n\n/** JSON representation of a [[TabRun]].\n * @beta\n */\nexport interface TabRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"tab\";\n}\n\n/** A [[TabRun]] is used to shift the next tab stop.\n * @note Only left-justified tabs are supported at this tab.\n * @beta\n */\nexport class TabRun extends TextBlockComponent {\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"tab\";\n\n public override toJSON(): TabRunProps {\n return {\n ...super.toJSON(),\n type: \"tab\",\n };\n }\n\n public override clone(): TabRun {\n return new TabRun(this.toJSON());\n }\n\n public static create(props?: Omit<TabRunProps, \"type\">): TabRun {\n return new TabRun(props);\n }\n\n public override get isEmpty(): boolean {\n return this.stringify().length === 0;\n }\n\n /**\n * Converts a [[TabRun]] to its string representation.\n * If the `tabsAsSpaces` option is provided, returns a string of spaces of the specified length.\n * Otherwise, returns a tab character (\"\\t\").\n */\n public override stringify(options?: TextBlockStringifyOptions): string {\n if (options?.tabsAsSpaces) {\n return \" \".repeat(options.tabsAsSpaces);\n }\n\n return \"\\t\";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return other instanceof TabRun && super.equals(other);\n }\n}\n\n/** JSON representation of a [[FieldRun]].\n * @beta\n */\nexport interface FieldRunProps extends TextBlockComponentProps {\n /** Discriminator field for the [[RunProps]] union. */\n readonly type: \"field\";\n /** The element and BIS class containing the property described by [[propertyPath]]. */\n propertyHost: FieldPropertyHost;\n /** Describes how to obtain the property value from [[propertyHost]]. */\n propertyPath: FieldPropertyPath;\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]].\n * The specific options used depend upon the field's [[propertyType]].\n */\n formatOptions?: FieldFormatOptions;\n /** The field's most recently evaluated display string.\n * @note It is unnecessary to specify this when creating a field as part of an element like a [[TextAnnotation2d]], because\n * all of the element's fields will be re-evaluated when inserting or updating the element in the iModel.\n */\n cachedContent?: string;\n}\n\n/** A [[Run]] that displays the formatted value of a property of some [Element]($backend).\n * When a [[TextBlock]] containing a [[FieldRun]] is written into the iModel as an [ITextAnnotation]($backend) element,\n * a dependency is established between the two elements via the [ElementDrivesTextAnnotation]($backend) relationship such that\n * whenever the source element specified by [[propertyHost]] is modified or the `ITextAnnotation` element is inserted or updated in the iModel,\n * the field(s) in the `ITextAnnotation` element are automatically\n * recalculated, causing their [[cachedContent]] to update. If the field's display string cannot be evaluated (for example, because the specified element or\n * property does not exist), then its cached content is set to [[FieldRun.invalidContentIndicator]].\n * A [[FieldRun]] displays its [[cachedContent]] in the same way that [[TextRun]]s display their `content`, including word wrapping where appropriate.\n * @beta\n */\nexport class FieldRun extends TextBlockComponent {\n /** Display string used to signal an error in computing the field's value. */\n public static invalidContentIndicator = \"####\";\n\n /** Discriminator field for the [[Run]] union. */\n public readonly type = \"field\";\n /** The element and BIS class containing the property described by [[propertyPath]]. */\n public readonly propertyHost: Readonly<FieldPropertyHost>;\n /** Describes how to obtain the property value from [[propertyHost]]. */\n public readonly propertyPath: Readonly<FieldPropertyPath>;\n /** Specifies how to format the property value obtained from [[propertyPath]] into a string to be stored in [[cachedContent]].\n * The specific options used depend upon the [[FieldPropertyType]].\n */\n public readonly formatOptions?: FieldFormatOptions;\n private _cachedContent: string;\n\n /** The field's most recently evaluated display string. */\n public get cachedContent(): string {\n return this._cachedContent;\n }\n\n /** @internal Used by core-backend when re-evaluating field content. */\n public setCachedContent(content: string | undefined): void {\n this._cachedContent = content ?? FieldRun.invalidContentIndicator;\n }\n\n private constructor(props: FieldRunProps) {\n super(props);\n\n this._cachedContent = props.cachedContent ?? FieldRun.invalidContentIndicator;\n this.propertyHost = props.propertyHost\n this.propertyPath = props.propertyPath;\n this.formatOptions = props.formatOptions;\n }\n\n /** Create a FieldRun from its JSON representation. */\n public static create(props: Omit<FieldRunProps, \"type\">): FieldRun {\n return new FieldRun({\n ...props,\n propertyHost: { ...props.propertyHost },\n propertyPath: structuredClone(props.propertyPath),\n formatOptions: structuredClone(props.formatOptions),\n type: \"field\",\n });\n }\n\n /** Convert the FieldRun to its JSON representation. */\n public override toJSON(): FieldRunProps {\n const json: FieldRunProps = {\n ...super.toJSON(),\n type: \"field\",\n propertyHost: { ...this.propertyHost },\n propertyPath: structuredClone(this.propertyPath),\n };\n\n if (this.cachedContent !== FieldRun.invalidContentIndicator) {\n json.cachedContent = this.cachedContent;\n }\n\n if (this.formatOptions) {\n json.formatOptions = structuredClone(this.formatOptions);\n }\n\n return json;\n }\n\n /** Create a deep copy of this FieldRun. */\n public override clone(): FieldRun {\n return new FieldRun(this.toJSON());\n }\n\n public override get isEmpty(): boolean {\n return this.stringify().length === 0;\n }\n\n /** Convert this FieldRun to a simple string representation. */\n public override stringify(): string {\n return this.cachedContent;\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public override equals(other: TextBlockComponent): boolean {\n if (!(other instanceof FieldRun) || !super.equals(other)) {\n return false;\n }\n\n if (\n this.propertyHost.elementId !== other.propertyHost.elementId ||\n this.propertyHost.className !== other.propertyHost.className ||\n this.propertyHost.schemaName !== other.propertyHost.schemaName\n ) {\n return false;\n }\n\n if (this.propertyPath.propertyName !== other.propertyPath.propertyName) {\n return false;\n }\n\n const thisAccessors = this.propertyPath.accessors ?? [];\n const otherAccessors = other.propertyPath.accessors ?? [];\n\n if (thisAccessors.length !== otherAccessors.length) {\n return false;\n }\n\n if (!thisAccessors.every((value, index) => value === otherAccessors[index])) {\n return false;\n }\n\n if (this.formatOptions && other.formatOptions) {\n // We anticipate new formatting options being added in the future.\n // So to account for properties we don't know about, just compare the string representations.\n if (JSON.stringify(this.formatOptions) !== JSON.stringify(other.formatOptions)) {\n return false;\n }\n } else if (this.formatOptions || other.formatOptions) {\n return false;\n }\n\n return true;\n }\n}\n\n/** JSON representation of a [[Paragraph]].\n * @beta\n */\nexport interface ParagraphProps extends TextBlockComponentProps {\n children?: Array<ListProps | RunProps>;\n}\n\n/** A collection of [[Run]]s and [[List]]s. Paragraphs can be appended to [[List]]s and [[TextBlock]]s.\n * Each paragraph is laid out on a separate line. If included in a [[List]], the paragraph will be treated as a list item.\n * @beta\n */\nexport class Paragraph extends TextBlockComponent {\n public readonly type = \"paragraph\";\n public readonly children: Array<List | Run>;\n\n private constructor(props?: ParagraphProps) {\n super(props);\n\n this.children = props?.children?.map((child) =>\n child.type === \"list\" ? List.create(child) : Run.fromJSON(child)\n ) ?? [];\n }\n\n /** Create a paragraph from its JSON representation. */\n public static create(props?: Omit<ParagraphProps, \"type\">): Paragraph {\n return new Paragraph(props);\n }\n\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\n clearStyleOverrides(this, options);\n }\n\n public override get isEmpty() {\n return this.children.length === 0;\n }\n\n public override clone(): Paragraph {\n return new Paragraph(this.toJSON());\n }\n\n public override toJSON(): ParagraphProps {\n return {\n ...super.toJSON(),\n children: this.children.map((child) => child.toJSON()),\n };\n }\n\n /** Compute a string representation of this paragraph by concatenating the string representations of all of its children. */\n public override stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string {\n return this.children.map((x, index) => (index > 0 && x.type === \"list\") ? `${options?.paragraphBreak ?? \" \"}${x.stringify(options, context)}` : x.stringify(options, context)).join(\"\") ?? \"\";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return (other instanceof Paragraph) && super.equals(other);\n }\n}\n\n/** JSON representation of a [[List]].\n * @beta\n */\nexport interface ListProps extends TextBlockComponentProps {\n readonly type: \"list\";\n children?: ParagraphProps[];\n}\n\n/** A collection of list items ([[Paragraph]]s). Lists can be appended to [[Paragraph]]s.\n * Lists will be laid out on a new line. Each item in a list is laid out on a separate line.\n * @beta\n */\nexport class List extends TextBlockComponent {\n public readonly type = \"list\";\n public readonly children: Paragraph[];\n\n protected constructor(props?: ListProps) {\n super(props);\n\n this.children = props?.children?.map((child) => Paragraph.create(child)) ?? [];\n }\n\n /** Create a list from its JSON representation. */\n public static create(props?: Omit<ListProps, \"type\">): List {\n return new List({ ...props, type: \"list\" });\n }\n\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\n clearStyleOverrides(this, options);\n }\n\n public override get isEmpty() {\n return this.children.length === 0;\n }\n\n public override clone(): List {\n return new List(this.toJSON());\n }\n\n public override toJSON(): ListProps {\n return {\n ...super.toJSON(),\n type: \"list\",\n children: this.children.map((run) => run.toJSON()),\n };\n }\n\n /** Compute a string representation of this list by concatenating the string representations of all of its [[children]]. */\n public override stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string {\n const children = this.children.map((x, index) => {\n const depth = context?.depth ?? 0;\n const marker = getMarkerText(this.styleOverrides.listMarker ?? TextStyleSettings.defaultProps.listMarker, index + 1);\n const tab = (options?.tabsAsSpaces ? \" \".repeat(options.tabsAsSpaces) : \"\\t\").repeat(depth);\n return `${tab}${marker}${options?.listMarkerBreak ?? \" \"}${x.stringify(options, { depth: depth + 1 })}`;\n });\n return children.join(options?.paragraphBreak ?? \" \") ?? \"\";\n }\n\n public override equals(other: TextBlockComponent): boolean {\n return (other instanceof List) && super.equals(other);\n }\n}\n\n\n/** Describes the relative alignment of the content of a [[TextBlock]].\n * @beta\n */\nexport type TextBlockJustification = \"left\" | \"center\" | \"right\";\n\n/** Describes the margins around the content inside a [[TextBlock]]. It's measured in meters.\n * @beta\n */\nexport interface TextBlockMargins {\n /** The left margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n left: number;\n /** The right margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n right: number;\n /** The top margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n top: number;\n /** The bottom margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n bottom: number;\n};\n\n/** JSON representation of a [[TextBlock]].\n * @beta\n */\nexport interface TextBlockProps extends TextBlockComponentProps {\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\n * A value less than or equal to zero indicates no wrapping is to be applied.\n * Default: 0\n */\n width?: number;\n /** The alignment of the document content. Default: \"left\". */\n justification?: TextBlockJustification;\n /** The margins to surround the document content. Default: 0 margins on all sides */\n margins?: Partial<TextBlockMargins>;\n children?: ParagraphProps[];\n}\n\n/** Represents a formatted text document consisting of a series of [[Paragraph]]s, each laid out on a separate line and containing their own content.\n * No word-wrapping is applied to the document unless a [[width]] greater than zero is specified.\n * @see [[TextAnnotation]] to position a text block as an annotation in 2d or 3d space.\n * @beta\n */\nexport class TextBlock extends TextBlockComponent {\n public readonly children: Paragraph[];\n\n /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.\n * A value less than or equal to zero indicates no wrapping is to be applied.\n * Default: 0\n */\n public width: number;\n /** The alignment of the document's content. */\n public justification: TextBlockJustification;\n /** The margins of the document. */\n public margins: TextBlockMargins;\n\n private constructor(props: TextBlockProps) {\n super(props);\n this.width = props.width ?? 0;\n this.justification = props.justification ?? \"left\";\n\n // Assign default margins if not provided\n this.margins = {\n left: props.margins?.left ?? 0,\n right: props.margins?.right ?? 0,\n top: props.margins?.top ?? 0,\n bottom: props.margins?.bottom ?? 0,\n };\n\n this.children = props?.children?.map((para) => Paragraph.create(para)) ?? [];\n }\n\n public override clearStyleOverrides(options?: ClearTextStyleOptions): void {\n clearStyleOverrides(this, options);\n }\n\n public override toJSON(): TextBlockProps {\n return {\n ...super.toJSON(),\n width: this.width,\n justification: this.justification,\n margins: this.margins,\n children: this.children.map((x) => x.toJSON()),\n };\n }\n\n /** Create a text block from its JSON representation. */\n public static create(props?: Omit<TextBlockProps, \"type\">): TextBlock {\n return new TextBlock(props ?? {});\n }\n\n /** Returns true if every paragraph in this text block is empty. */\n public override get isEmpty(): boolean {\n return !this.children || this.children.every((child) => child.isEmpty);\n }\n\n public override clone(): TextBlock {\n return new TextBlock(this.toJSON());\n }\n\n /** Compute a string representation of the document's contents by concatenating the string representations of each of its [[children]], separated by [[TextBlockStringifyOptions.paragraphBreak]]. */\n public stringify(options?: TextBlockStringifyOptions): string {\n return this.children.map((x) => x.stringify(options)).join(options?.paragraphBreak ?? \" \") || \"\";\n }\n\n /** Add and return a new paragraph.\n * By default, the paragraph will be created with no [[styleOverrides]], so that it inherits the style of this block.\n * @param seedFromLast If true and [[children]] is not empty, the new paragraph will inherit the style overrides of the last child in this block.\n * @note Be sure you pass in [[ParagraphProps]] and not [[Paragraph]] or style overrides will be ignored.\n */\n public appendParagraph(props?: ParagraphProps, seedFromLast = false): Paragraph {\n const seed = seedFromLast ? this.children[this.children.length - 1] : undefined;\n const styleOverrides = { ...seed?.styleOverrides, ...props?.styleOverrides };\n const paragraph = Paragraph.create({ ...props, styleOverrides });\n this.children.push(paragraph);\n return paragraph;\n }\n\n /** Append a run to the last [[Paragraph]] in this block.\n * If the block contains no [[children]], a new [[Paragraph]] will first be created using [[appendParagraph]].\n */\n public appendRun(run: Run): void {\n const paragraph = this.children[this.children.length - 1] ?? this.appendParagraph();\n paragraph.children.push(run);\n }\n\n public override equals(other: TextBlockComponent): boolean {\n if (!(other instanceof TextBlock)) {\n return false;\n }\n\n if (!super.equals(other)) {\n return false;\n }\n\n if (this.width !== other.width || this.justification !== other.justification) {\n return false;\n }\n\n const marginsAreEqual = Object.entries(this.margins).every(([key, value]) =>\n value === (other.margins as any)[key]\n );\n\n if (!marginsAreEqual) return false;\n\n if (this.children && other.children) {\n if (this.children.length !== other.children.length) {\n return false;\n }\n\n return this.children.every((child, index) => other.children && child.equals(other.children[index]));\n }\n\n return true;\n }\n}\n\n/**\n * A union of all the [[TextBlockComponent]]s that can contain other components.\n * @beta\n */\nexport type StructuralTextBlockComponent = List | Paragraph | TextBlock;\n\n/**\n * Recursively traverses a [[StructuralTextBlockComponent]] tree, yielding each child component along with its parent container.\n * This generator enables depth-first iteration over all components in a text block structure, including paragraphs, lists, and runs.\n *\n * @param parent The root container whose children should be traversed.\n * @returns An IterableIterator yielding objects with the child component and its parent container.\n * @beta\n */\nexport function* traverseTextBlockComponent(parent: StructuralTextBlockComponent): IterableIterator<{ parent: StructuralTextBlockComponent, child: List | Paragraph | Run }> {\n for (const child of parent.children) {\n yield { parent, child };\n if (child.type === \"list\" || child.type === \"paragraph\") {\n yield* traverseTextBlockComponent(child);\n }\n }\n}\n\n/**\n * Returns the formatted marker text for a list item based on the marker type and item number.\n * Supports ordered and unordered list markers, including alphabetic, Roman numeral, and numeric formats.\n * @param marker The type of list marker to use.\n * @param num The item number in the list.\n * @returns The formatted marker string for the list item.\n * @beta\n */\nexport function getMarkerText(marker: ListMarker, num: number): string {\n let markerString = \"\";\n\n switch (marker.enumerator) {\n case undefined:\n case ListMarkerEnumerator.Number:\n markerString = `${num}`;\n break;\n case ListMarkerEnumerator.Letter:\n markerString = integerToAlpha(num);\n break;\n case ListMarkerEnumerator.RomanNumeral:\n markerString = integerToRoman(num);\n break;\n default:\n markerString = marker.enumerator;\n break;\n }\n\n if (marker.case) {\n markerString = marker.case === \"upper\" ? markerString.toUpperCase() : markerString.toLowerCase();\n }\n\n const terminator = marker.terminator === \"period\" ? \".\" : marker.terminator === \"parenthesis\" ? \")\" : \"\";\n\n return `${markerString}${terminator}`;\n}\n\n/**\n * Converts an integer to its Roman numeral representation.\n * Supports numbers from 1 and above.\n * @param num The integer to convert.\n * @returns The Roman numeral string.\n */\nfunction integerToRoman(num: number): string {\n const values =\n [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];\n const symbols =\n ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'];\n let roman = '';\n for (let i = 0; i < values.length; i++) {\n while (num >= values[i]) {\n roman += symbols[i];\n num -= values[i];\n }\n }\n\n return roman;\n}\n\n/**\n * Converts an integer to its alphabetic representation (A-Z, AA-ZZ, etc.).\n * Used for ordered list markers with alphabetic styles.\n * @param num The integer to convert (1-based).\n * @returns The alphabetic string for the given number.\n */\nfunction integerToAlpha(num: number): string {\n const letterOffset = (num - 1) % 26;\n const letter = String.fromCharCode(65 + letterOffset);\n const depth = Math.ceil(num / 26);\n return letter.repeat(depth);\n}\n"]}
@@ -10,8 +10,6 @@ import { TextStyleSettingsProps } from "./TextStyle";
10
10
  * @beta
11
11
  */
12
12
  export interface RunLayoutResult {
13
- /** The index of the Run this RunLayoutResult was generated from in [[Paragraph.runs]]. */
14
- sourceRunIndex: number;
15
13
  /** The ID of the font for the run. */
16
14
  fontId: FontId;
17
15
  /**
@@ -39,11 +37,11 @@ export interface RunLayoutResult {
39
37
  * @beta
40
38
  */
41
39
  export interface LineLayoutResult {
42
- /** The index of the paragraph this LineLayoutResult was generated from in [[TextBlock.paragraphs]]. */
43
- sourceParagraphIndex: number;
44
40
  /** The runs contained in the line. */
45
41
  runs: RunLayoutResult[];
46
- /** The range containing the contents of the line. */
42
+ /** The marker run for the line, if any */
43
+ marker: RunLayoutResult | undefined;
44
+ /** The range of all the runs (including the marker) contained in the line. */
47
45
  range: Range2dProps;
48
46
  /** Bounding box used when justifying the line. This may be smaller than [[range]]. */
49
47
  justificationRange: Range2dProps;
@@ -1 +1 @@
1
- {"version":3,"file":"TextBlockLayoutResult.d.ts","sourceRoot":"","sources":["../../../src/annotation/TextBlockLayoutResult.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,0FAA0F;IAC1F,cAAc,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf;;;MAGE;IACF,eAAe,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,cAAc,EAAE,KAAK,CAAC;IACtB,6DAA6D;IAC7D,KAAK,EAAE,YAAY,CAAC;IACpB,qHAAqH;IACrH,SAAS,EAAE,sBAAsB,CAAC;IAClC,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,YAAY,CAAC;IAClC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,YAAY,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uGAAuG;IACvG,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sCAAsC;IACtC,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,qDAAqD;IACrD,KAAK,EAAE,YAAY,CAAC;IACpB,sFAAsF;IACtF,kBAAkB,EAAE,YAAY,CAAC;IACjC,yEAAyE;IACzE,kBAAkB,EAAE,KAAK,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,4DAA4D;IAC5D,KAAK,EAAE,YAAY,CAAC;CACrB"}
1
+ {"version":3,"file":"TextBlockLayoutResult.d.ts","sourceRoot":"","sources":["../../../src/annotation/TextBlockLayoutResult.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf;;;MAGE;IACF,eAAe,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,cAAc,EAAE,KAAK,CAAC;IACtB,6DAA6D;IAC7D,KAAK,EAAE,YAAY,CAAC;IACpB,qHAAqH;IACrH,SAAS,EAAE,sBAAsB,CAAC;IAClC,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,YAAY,CAAC;IAClC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,YAAY,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,sCAAsC;IACtC,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,0CAA0C;IAC1C,MAAM,EAAE,eAAe,GAAG,SAAS,CAAC;IACpC,8EAA8E;IAC9E,KAAK,EAAE,YAAY,CAAC;IACpB,sFAAsF;IACtF,kBAAkB,EAAE,YAAY,CAAC;IACjC,yEAAyE;IACzE,kBAAkB,EAAE,KAAK,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,4DAA4D;IAC5D,KAAK,EAAE,YAAY,CAAC;CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextBlockLayoutResult.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockLayoutResult.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { Range2dProps, XAndY } from \"@itwin/core-geometry\";\nimport { FontId } from \"../Fonts\";\nimport { TextStyleSettingsProps } from \"./TextStyle\";\n\n/**\n * Represents a single run in a [[LineLayoutResult]].\n * @note Get the text content of the RunLayoutResult using a combination of the `sourceRunIndex`, `characterOffset`, and `characterCount`.\n * @beta\n */\nexport interface RunLayoutResult {\n /** The index of the Run this RunLayoutResult was generated from in [[Paragraph.runs]]. */\n sourceRunIndex: number;\n /** The ID of the font for the run. */\n fontId: FontId;\n /**\n * The number of characters from the source [[Run]] that have already appeared in the layout.\n * @note A single source [[TextRun]] can be split into multiple lines to respect the [[TextBlock.width]].\n */\n characterOffset: number;\n /** The number of characters in the RunLayoutResult. */\n characterCount: number;\n /** The offset of the RunLayoutResult from the top and left of the [[LineLayoutResult]] */\n offsetFromLine: XAndY;\n /** Bounding box enclosing this RunLayoutResult's content. */\n range: Range2dProps;\n /** The resolved [[TextStyleSettings]] for the run. Takes into account overrides and styles on the parent classes. */\n textStyle: TextStyleSettingsProps;\n /** Bounding box used when justifying the run. This may be smaller than [[range]]. */\n justificationRange?: Range2dProps;\n /** The range containing the contents of the [[FractionRun]]'s numerator. */\n numeratorRange?: Range2dProps;\n /** The range containing the contents of the [[FractionRun]]'s denominator. */\n denominatorRange?: Range2dProps;\n}\n\n/**\n * Represents a single line in a [[TextBlockLayoutResult]].\n * @beta\n */\nexport interface LineLayoutResult {\n /** The index of the paragraph this LineLayoutResult was generated from in [[TextBlock.paragraphs]]. */\n sourceParagraphIndex: number;\n /** The runs contained in the line. */\n runs: RunLayoutResult[];\n /** The range containing the contents of the line. */\n range: Range2dProps;\n /** Bounding box used when justifying the line. This may be smaller than [[range]]. */\n justificationRange: Range2dProps;\n /** The offset of the line from the top and left of the [[TextBlock]]. */\n offsetFromDocument: XAndY;\n}\n\n/**\n * Represents the result of laying out a [[TextBlock]]'s contents into a series of lines containing runs.\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\n * @beta\n */\nexport interface TextBlockLayoutResult {\n /** The laid out lines of a [[TextBlock]]. */\n lines: LineLayoutResult[];\n /** The range containing the contents of a [[TextBlock]]. */\n range: Range2dProps;\n}\n"]}
1
+ {"version":3,"file":"TextBlockLayoutResult.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockLayoutResult.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { Range2dProps, XAndY } from \"@itwin/core-geometry\";\nimport { FontId } from \"../Fonts\";\nimport { TextStyleSettingsProps } from \"./TextStyle\";\n\n/**\n * Represents a single run in a [[LineLayoutResult]].\n * @note Get the text content of the RunLayoutResult using a combination of the `sourceRunIndex`, `characterOffset`, and `characterCount`.\n * @beta\n */\nexport interface RunLayoutResult {\n /** The ID of the font for the run. */\n fontId: FontId;\n /**\n * The number of characters from the source [[Run]] that have already appeared in the layout.\n * @note A single source [[TextRun]] can be split into multiple lines to respect the [[TextBlock.width]].\n */\n characterOffset: number;\n /** The number of characters in the RunLayoutResult. */\n characterCount: number;\n /** The offset of the RunLayoutResult from the top and left of the [[LineLayoutResult]] */\n offsetFromLine: XAndY;\n /** Bounding box enclosing this RunLayoutResult's content. */\n range: Range2dProps;\n /** The resolved [[TextStyleSettings]] for the run. Takes into account overrides and styles on the parent classes. */\n textStyle: TextStyleSettingsProps;\n /** Bounding box used when justifying the run. This may be smaller than [[range]]. */\n justificationRange?: Range2dProps;\n /** The range containing the contents of the [[FractionRun]]'s numerator. */\n numeratorRange?: Range2dProps;\n /** The range containing the contents of the [[FractionRun]]'s denominator. */\n denominatorRange?: Range2dProps;\n}\n\n/**\n * Represents a single line in a [[TextBlockLayoutResult]].\n * @beta\n */\nexport interface LineLayoutResult {\n /** The runs contained in the line. */\n runs: RunLayoutResult[];\n /** The marker run for the line, if any */\n marker: RunLayoutResult | undefined;\n /** The range of all the runs (including the marker) contained in the line. */\n range: Range2dProps;\n /** Bounding box used when justifying the line. This may be smaller than [[range]]. */\n justificationRange: Range2dProps;\n /** The offset of the line from the top and left of the [[TextBlock]]. */\n offsetFromDocument: XAndY;\n}\n\n/**\n * Represents the result of laying out a [[TextBlock]]'s contents into a series of lines containing runs.\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\n * @beta\n */\nexport interface TextBlockLayoutResult {\n /** The laid out lines of a [[TextBlock]]. */\n lines: LineLayoutResult[];\n /** The range containing the contents of a [[TextBlock]]. */\n range: Range2dProps;\n}\n"]}
@@ -0,0 +1,86 @@
1
+ /** @packageDocumentation
2
+ * @module Annotation
3
+ */
4
+ import { Id64String } from "@itwin/core-bentley";
5
+ /** Enumerates the different kinds of [Property]($ecschema-metadata) values that can be used as the basis for a [[FieldRun]]'s display string.
6
+ * A field's property type is derived from the property's [PrimitiveType]($ecschema-metadata) and other attributes like its [PrimitiveOrEnumPropertyBase.extendedTypeName]($ecschema-metadata).
7
+ * The conversion of the raw property value into a display string can be customized by different [[FieldFormatOptions]] based on its type.
8
+ * The following types are currently recognized:
9
+ * - "quantity": an often-unitized scalar value like a distance or area, formatted using a quantity [Format]($core-quantity).
10
+ * - "coordinate": a 2- or 3-dimensional point, with each component formatted as a "quantity".
11
+ * - "boolean": a true or false value.
12
+ * - "datetime": an ECMAScript [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date).
13
+ * - "int-enum": an integer [EnumerationProperty]($ecschema-metadata) formatted using the enum value's display label.
14
+ * - "string-enum": a string [EnumerationProperty]($ecschema-metadata) formatted using the enum value's display label.
15
+ * - "string": a value convertible to a string.
16
+ * @note Currently, only formatting of "string" and "datetime" types is implemented. Other types are converted to and formatted as "string".
17
+ * @beta
18
+ */
19
+ export type FieldPropertyType = "quantity" | "coordinate" | "string" | "boolean" | "datetime" | "int-enum" | "string-enum";
20
+ /** A chain of property accesses that resolves to a primitive value that forms the basis of the displayed content
21
+ * of a [[FieldRun]].
22
+ * The simplest property paths consist of a [[propertyName]] and nothing else, where `propertyName` identifies
23
+ * a primitive property.
24
+ * If `propertyName` identifies a struct or array property, then additional [[accessors]] are required to identify the specific value.
25
+ * Some examples:
26
+ * ```
27
+ * | Access String | propertyName | accessors |
28
+ * | ------------- | ------------ | --------- |
29
+ * | name | "name" | undefined |
30
+ * | spouse.name | "spouse" | [name] |
31
+ * | colors[2] | "colors" | [2] |
32
+ * | spouse.favoriteRestaurants[1].address | "spouse" | ["favoriteRestaurants", 1, "address"] |
33
+ * ```
34
+ * @beta
35
+ */
36
+ export interface FieldPropertyPath {
37
+ /** The name of the BIS property of the [[FieldPropertyHost]] that serves as the root of the path. */
38
+ propertyName: string;
39
+ /** Property names and/or array indices describing the path from [[propertyName]] to the ultimate BIS property. */
40
+ accessors?: Array<string | number>;
41
+ }
42
+ /** Describes the source of the property value against which a [[FieldPropertyPath]] is evaluated.
43
+ * A field property is always hosted by an [Element]($backend). It may be a property of the element's BIS class itself,
44
+ * or that of one of its [ElementAspect]($backend)s.
45
+ * The [[schemaName]] and [[className]] should always identify the exact class that contains [[FieldPropertyPath.propertyName]] - not a subclass thereof.
46
+ * @beta
47
+ */
48
+ export interface FieldPropertyHost {
49
+ /** The Id of the [Element]($backend) that hosts the property. */
50
+ elementId: Id64String;
51
+ /** The name of the schema containing the class identified by [[className]]. */
52
+ schemaName: string;
53
+ /** The name of the exact class (not a subclass) containing the property identified by [[FieldPropertyPath.propertyName]]. */
54
+ className: string;
55
+ }
56
+ /** As part of [[FieldFormatOptions]], specifies how to modify the case of the display string.
57
+ * "as-is" leaves it unmodified. "upper" and "lower" convert it to all upper-case or all lower-case, respectively.
58
+ * @beta
59
+ */
60
+ export type FieldCase = "as-is" | "upper" | "lower";
61
+ /** As part of a [[FieldFormatOptions]], specifies how to format properties of [[FieldPropertyType]] "datetime".
62
+ * @beta
63
+ */
64
+ export interface DateTimeFieldFormatOptions {
65
+ /** The locale with which to localize the display string.
66
+ * Default: "en-US".
67
+ */
68
+ locale?: Intl.UnicodeBCP47LocaleIdentifier;
69
+ /** Describes how to produce the display string. */
70
+ formatOptions?: Intl.DateTimeFormatOptions;
71
+ }
72
+ /** Customizes how to format the raw property value resolved by a [[FieldPropertyPath]] into a [[FieldRun]]'s display string.
73
+ * The exact options used depend upon the [[FieldPropertyType]].
74
+ * @beta
75
+ */
76
+ export interface FieldFormatOptions {
77
+ /** A string inserted before the formatted string. This string is not affected by [[case]]. */
78
+ prefix?: string;
79
+ /** A string inserted after the formatted string. This string is not affected by [[case]]. */
80
+ suffix?: string;
81
+ /** Modifies the case of the formatted string. */
82
+ case?: FieldCase;
83
+ /** Formatting options for [[FieldPropertyType]] "datetime". */
84
+ dateTime?: DateTimeFieldFormatOptions;
85
+ }
86
+ //# sourceMappingURL=TextField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/annotation/TextField.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,aAAa,CAAC;AAE3H;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,iBAAiB;IAChC,qGAAqG;IACrG,YAAY,EAAE,MAAM,CAAC;IACrB,kHAAkH;IAClH,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACpC;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,SAAS,EAAE,UAAU,CAAC;IACtB,+EAA+E;IAC/E,UAAU,EAAE,MAAM,CAAC;IACnB,6HAA6H;IAC7H,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC,4BAA4B,CAAC;IAC3C,mDAAmD;IACnD,aAAa,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;CAC5C;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,8FAA8F;IAC9F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,0BAA0B,CAAC;CACvC"}
@@ -0,0 +1,9 @@
1
+ /*----------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Annotation
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=TextField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../src/annotation/TextField.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*----------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\n\n/** Enumerates the different kinds of [Property]($ecschema-metadata) values that can be used as the basis for a [[FieldRun]]'s display string.\n * A field's property type is derived from the property's [PrimitiveType]($ecschema-metadata) and other attributes like its [PrimitiveOrEnumPropertyBase.extendedTypeName]($ecschema-metadata).\n * The conversion of the raw property value into a display string can be customized by different [[FieldFormatOptions]] based on its type.\n * The following types are currently recognized:\n * - \"quantity\": an often-unitized scalar value like a distance or area, formatted using a quantity [Format]($core-quantity).\n * - \"coordinate\": a 2- or 3-dimensional point, with each component formatted as a \"quantity\".\n * - \"boolean\": a true or false value.\n * - \"datetime\": an ECMAScript [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date).\n * - \"int-enum\": an integer [EnumerationProperty]($ecschema-metadata) formatted using the enum value's display label.\n * - \"string-enum\": a string [EnumerationProperty]($ecschema-metadata) formatted using the enum value's display label.\n * - \"string\": a value convertible to a string.\n * @note Currently, only formatting of \"string\" and \"datetime\" types is implemented. Other types are converted to and formatted as \"string\".\n * @beta\n */\nexport type FieldPropertyType = \"quantity\" | \"coordinate\" | \"string\" | \"boolean\" | \"datetime\" | \"int-enum\" | \"string-enum\";\n\n/** A chain of property accesses that resolves to a primitive value that forms the basis of the displayed content\n * of a [[FieldRun]].\n * The simplest property paths consist of a [[propertyName]] and nothing else, where `propertyName` identifies\n * a primitive property.\n * If `propertyName` identifies a struct or array property, then additional [[accessors]] are required to identify the specific value.\n * Some examples:\n * ```\n * | Access String | propertyName | accessors |\n * | ------------- | ------------ | --------- |\n * | name | \"name\" | undefined |\n * | spouse.name | \"spouse\" | [name] |\n * | colors[2] | \"colors\" | [2] |\n * | spouse.favoriteRestaurants[1].address | \"spouse\" | [\"favoriteRestaurants\", 1, \"address\"] |\n * ```\n * @beta\n */\nexport interface FieldPropertyPath {\n /** The name of the BIS property of the [[FieldPropertyHost]] that serves as the root of the path. */\n propertyName: string;\n /** Property names and/or array indices describing the path from [[propertyName]] to the ultimate BIS property. */\n accessors?: Array<string | number>;\n}\n\n/** Describes the source of the property value against which a [[FieldPropertyPath]] is evaluated.\n * A field property is always hosted by an [Element]($backend). It may be a property of the element's BIS class itself,\n * or that of one of its [ElementAspect]($backend)s.\n * The [[schemaName]] and [[className]] should always identify the exact class that contains [[FieldPropertyPath.propertyName]] - not a subclass thereof.\n * @beta\n */\nexport interface FieldPropertyHost {\n /** The Id of the [Element]($backend) that hosts the property. */\n elementId: Id64String;\n /** The name of the schema containing the class identified by [[className]]. */\n schemaName: string;\n /** The name of the exact class (not a subclass) containing the property identified by [[FieldPropertyPath.propertyName]]. */\n className: string;\n}\n\n/** As part of [[FieldFormatOptions]], specifies how to modify the case of the display string.\n * \"as-is\" leaves it unmodified. \"upper\" and \"lower\" convert it to all upper-case or all lower-case, respectively.\n * @beta\n */\nexport type FieldCase = \"as-is\" | \"upper\" | \"lower\";\n\n/** As part of a [[FieldFormatOptions]], specifies how to format properties of [[FieldPropertyType]] \"datetime\".\n * @beta\n */\nexport interface DateTimeFieldFormatOptions {\n /** The locale with which to localize the display string.\n * Default: \"en-US\".\n */\n locale?: Intl.UnicodeBCP47LocaleIdentifier;\n /** Describes how to produce the display string. */\n formatOptions?: Intl.DateTimeFormatOptions;\n}\n\n/** Customizes how to format the raw property value resolved by a [[FieldPropertyPath]] into a [[FieldRun]]'s display string.\n * The exact options used depend upon the [[FieldPropertyType]].\n * @beta\n */\nexport interface FieldFormatOptions {\n /** A string inserted before the formatted string. This string is not affected by [[case]]. */\n prefix?: string;\n /** A string inserted after the formatted string. This string is not affected by [[case]]. */\n suffix?: string;\n /** Modifies the case of the formatted string. */\n case?: FieldCase;\n /** Formatting options for [[FieldPropertyType]] \"datetime\". */\n dateTime?: DateTimeFieldFormatOptions;\n}\n"]}
@@ -3,6 +3,32 @@
3
3
  */
4
4
  import { DeepReadonlyObject, DeepRequiredObject } from "@itwin/core-bentley";
5
5
  import { ColorDefProps } from "../ColorDef";
6
+ /** Predefined markers for list items in text annotations.
7
+ * These values control the appearance of list item markers (e.g., bullet, circle, square, dash, number) that denote the start of a list item in a list.
8
+ * @beta
9
+ */
10
+ export declare enum ListMarkerEnumerator {
11
+ /** English Alphabet */
12
+ Letter = "A",
13
+ RomanNumeral = "I",
14
+ Number = "1",
15
+ Bullet = "\u2022",
16
+ Circle = "\u25CB",
17
+ Square = "\u25A0",
18
+ /** EM Dash */
19
+ Dash = "\u2013"
20
+ }
21
+ /** A settings to specify how to mark or denote the start of a list item in a [[List]].
22
+ * @beta
23
+ */
24
+ export interface ListMarker {
25
+ /** This can be either one of the predefined markers in [[ListMarkerEnumerator]], or any arbitrary string. */
26
+ enumerator: ListMarkerEnumerator | string;
27
+ /** The punctuation to follow the enumerator. */
28
+ terminator?: "parenthesis" | "period";
29
+ /** Whether to use upper or lower case for alphabetic or roman numeral enumerators. Ignored if [[enumerator]] is not alphabetic or roman numeral. */
30
+ case?: "upper" | "lower";
31
+ }
6
32
  /** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]
7
33
  * @beta
8
34
  */
@@ -97,6 +123,11 @@ export interface TextStyleSettingsProps {
97
123
  * Default: 0.5.
98
124
  */
99
125
  lineSpacingFactor?: number;
126
+ /** Multiplier used to compute the vertical distance between two paragraphs of text.
127
+ * The distance is computed in meters as paragraphSpacingFactor * [[lineHeight]].
128
+ * Default: 0.5.
129
+ */
130
+ paragraphSpacingFactor?: number;
100
131
  /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.
101
132
  * Default: false.
102
133
  */
@@ -149,6 +180,9 @@ export interface TextStyleSettingsProps {
149
180
  leader?: TextLeaderStyleProps;
150
181
  /** The size (in meters) used to calculate the tab stops in a run.
151
182
  * These are equally spaced from the left edge of the TextBlock.
183
+ * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].
184
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
185
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
152
186
  * Default: 4 meters.
153
187
  */
154
188
  tabInterval?: number;
@@ -158,6 +192,17 @@ export interface TextStyleSettingsProps {
158
192
  * Default: {shape: "none", fill: "none", border: black, borderWeight: 1} for no frame.
159
193
  */
160
194
  frame?: TextFrameStyleProps;
195
+ /** The offset (in meters) from the left edge of the text block to the start of the line of text.
196
+ * In lists, the indentation is added to offset of list items.
197
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
198
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
199
+ * Default: 0 meters.
200
+ */
201
+ indentation?: number;
202
+ /** The marker used to indicate the start of a list item.
203
+ * Default: "1.".
204
+ */
205
+ listMarker?: ListMarker;
161
206
  }
162
207
  /** A description of the formatting to be applied to a [[TextBlockComponent]].
163
208
  * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.
@@ -180,6 +225,10 @@ export declare class TextStyleSettings {
180
225
  * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].
181
226
  */
182
227
  readonly lineSpacingFactor: number;
228
+ /** Multiplier used to compute the vertical distance between two paragraphs of text.
229
+ * The distance is computed in meters as paragraphSpacingFactor * [[lineHeight]].
230
+ */
231
+ readonly paragraphSpacingFactor: number;
183
232
  /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */
184
233
  readonly isBold: boolean;
185
234
  /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */
@@ -215,9 +264,22 @@ export declare class TextStyleSettings {
215
264
  */
216
265
  readonly leader: Readonly<Required<TextLeaderStyleProps>>;
217
266
  /** The size (in meters) used to calculate the tab stops in a run.
218
- * These are equally spaced from the left edge of the TextBlock. Default is 4 meters.
267
+ * These are equally spaced from the left edge of the TextBlock.
268
+ * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].
269
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
270
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
219
271
  */
220
272
  readonly tabInterval: number;
273
+ /** The offset (in meters) from the left edge of the text block to the start of the line of text.
274
+ * In lists, the indentation is added to offset of list items.
275
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
276
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
277
+ */
278
+ readonly indentation: number;
279
+ /** The marker used to indicate the start of a list item.
280
+ * Default: [[ListMarkerEnumerator.Number]].
281
+ */
282
+ readonly listMarker: ListMarker;
221
283
  /** The frame settings of the [[TextAnnotation]]. */
222
284
  readonly frame: Readonly<Required<TextFrameStyleProps>>;
223
285
  /** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */
@@ -1 +1 @@
1
- {"version":3,"file":"TextStyle.d.ts","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAY,aAAa,EAAE,MAAM,aAAa,CAAC;AAEtD;;EAEE;AACF,eAAO,MAAM,yBAAyB,+JAAgK,CAAC;AAEvM;;EAEE;AACF,MAAM,MAAM,wBAAwB,GAAG,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAEhF;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,GAAG,YAAY,GAAG,MAAM,CAAC;AAE7E;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,aAAa,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,wBAAwB,CAAC;IACjC,0HAA0H;IAC1H,IAAI,CAAC,EAAE,uBAAuB,CAAC;IAC/B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,6GAA6G;IAC7G,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,MAA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