@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
@@ -7,8 +7,24 @@
7
7
  * @module Annotation
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.TextStyleSettings = exports.textAnnotationFrameShapes = void 0;
10
+ exports.TextStyleSettings = exports.textAnnotationFrameShapes = exports.ListMarkerEnumerator = void 0;
11
11
  const ColorDef_1 = require("../ColorDef");
12
+ /** Predefined markers for list items in text annotations.
13
+ * 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.
14
+ * @beta
15
+ */
16
+ var ListMarkerEnumerator;
17
+ (function (ListMarkerEnumerator) {
18
+ /** English Alphabet */
19
+ ListMarkerEnumerator["Letter"] = "A";
20
+ ListMarkerEnumerator["RomanNumeral"] = "I";
21
+ ListMarkerEnumerator["Number"] = "1";
22
+ ListMarkerEnumerator["Bullet"] = "\u2022";
23
+ ListMarkerEnumerator["Circle"] = "\u25CB";
24
+ ListMarkerEnumerator["Square"] = "\u25A0";
25
+ /** EM Dash */
26
+ ListMarkerEnumerator["Dash"] = "\u2013";
27
+ })(ListMarkerEnumerator || (exports.ListMarkerEnumerator = ListMarkerEnumerator = {}));
12
28
  /** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]
13
29
  * @beta
14
30
  */
@@ -46,6 +62,10 @@ class TextStyleSettings {
46
62
  * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].
47
63
  */
48
64
  lineSpacingFactor;
65
+ /** Multiplier used to compute the vertical distance between two paragraphs of text.
66
+ * The distance is computed in meters as paragraphSpacingFactor * [[lineHeight]].
67
+ */
68
+ paragraphSpacingFactor;
49
69
  /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */
50
70
  isBold;
51
71
  /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */
@@ -81,9 +101,22 @@ class TextStyleSettings {
81
101
  */
82
102
  leader;
83
103
  /** The size (in meters) used to calculate the tab stops in a run.
84
- * These are equally spaced from the left edge of the TextBlock. Default is 4 meters.
104
+ * These are equally spaced from the left edge of the TextBlock.
105
+ * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].
106
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
107
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
85
108
  */
86
109
  tabInterval;
110
+ /** The offset (in meters) from the left edge of the text block to the start of the line of text.
111
+ * In lists, the indentation is added to offset of list items.
112
+ * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).
113
+ * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.
114
+ */
115
+ indentation;
116
+ /** The marker used to indicate the start of a list item.
117
+ * Default: [[ListMarkerEnumerator.Number]].
118
+ */
119
+ listMarker;
87
120
  /** The frame settings of the [[TextAnnotation]]. */
88
121
  frame;
89
122
  /** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */
@@ -92,6 +125,7 @@ class TextStyleSettings {
92
125
  fontName: "",
93
126
  lineHeight: 1,
94
127
  lineSpacingFactor: 0.5,
128
+ paragraphSpacingFactor: 0.5,
95
129
  isBold: false,
96
130
  isItalic: false,
97
131
  isUnderlined: false,
@@ -110,6 +144,8 @@ class TextStyleSettings {
110
144
  terminatorWidthFactor: 1.0,
111
145
  },
112
146
  tabInterval: 4,
147
+ indentation: 0,
148
+ listMarker: { enumerator: "1", terminator: "period", case: "lower" },
113
149
  frame: {
114
150
  shape: "none",
115
151
  fill: "none",
@@ -127,6 +163,7 @@ class TextStyleSettings {
127
163
  this.fontName = props.fontName ?? defaults.fontName;
128
164
  this.lineHeight = props.lineHeight ?? defaults.lineHeight;
129
165
  this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;
166
+ this.paragraphSpacingFactor = props.paragraphSpacingFactor ?? defaults.paragraphSpacingFactor;
130
167
  this.isBold = props.isBold ?? defaults.isBold;
131
168
  this.isItalic = props.isItalic ?? defaults.isItalic;
132
169
  this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;
@@ -146,6 +183,8 @@ class TextStyleSettings {
146
183
  };
147
184
  this.leader = Object.freeze(leader);
148
185
  this.tabInterval = props.tabInterval ?? defaults.tabInterval;
186
+ this.indentation = props.indentation ?? defaults.indentation;
187
+ this.listMarker = props.listMarker ?? defaults.listMarker;
149
188
  const frame = {
150
189
  shape: props.frame?.shape ?? defaults.frame.shape,
151
190
  fill: props.frame?.fill ?? defaults.frame.fill,
@@ -194,12 +233,13 @@ class TextStyleSettings {
194
233
  }
195
234
  equals(other) {
196
235
  return this.color === other.color && this.fontName === other.fontName
197
- && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.widthFactor === other.widthFactor
236
+ && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.paragraphSpacingFactor === other.paragraphSpacingFactor && this.widthFactor === other.widthFactor
198
237
  && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined
199
238
  && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale
200
239
  && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale
201
240
  && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale
202
- && this.tabInterval === other.tabInterval
241
+ && this.tabInterval === other.tabInterval && this.indentation === other.indentation
242
+ && this.listMarker.case === other.listMarker.case && this.listMarker.enumerator === other.listMarker.enumerator && this.listMarker.terminator === other.listMarker.terminator
203
243
  && this.leaderEquals(other.leader)
204
244
  && this.frameEquals(other.frame);
205
245
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TextStyle.js","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,0CAAsD;AAEtD;;EAEE;AACW,QAAA,yBAAyB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,qBAAqB,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,CAAU,CAAC;AA2CtM,CAAC;AAuHF,SAAS,UAAU,CAAI,GAAM;IAC3B,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;QACjE,OAAO;IACT,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC/C,MAAM,KAAK,GAAI,GAAW,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACvC,UAAU,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC;IACH,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,M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C,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;eAC/B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACpC,CAAC;IAED;;;;;;;;;OASG;IACI,mBAAmB;QACxB,MAAM,aAAa,GAAa,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAChC,aAAa,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC;YACzB,aAAa,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,IAAI,CAAC,oBAAoB,IAAI,CAAC,EAAE,CAAC;YACnC,aAAa,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;QACpE,CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;;AAjNH,8CAkNC;AAED,UAAU,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAC3C,UAAU,CAAC,iBAAiB,CAAC,QAAQ,CAAC,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 { DeepReadonlyObject, DeepRequiredObject } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\n\n/** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]\n * @beta\n*/\nexport const textAnnotationFrameShapes = [\"none\", \"line\", \"rectangle\", \"circle\", \"equilateralTriangle\", \"diamond\", \"square\", \"pentagon\", \"hexagon\", \"octagon\", \"capsule\", \"roundedRectangle\"] as const;\n\n/** Describes a predefined shape that can be computed and drawn around the margins of a [[TextBlock]]\n * @beta\n*/\nexport type TextAnnotationFrameShape = typeof textAnnotationFrameShapes[number];\n\n/**\n * Describes what color to use when filling the frame around a [[TextBlock]].\n * If `background` is specified, [[GeometryParams.BackgroundFill]] will be set to `BackgroundFill.Outline`.\n * If `none` is specified, no fill will be applied.\n * @beta\n */\nexport type TextAnnotationFillColor = TextStyleColor | \"background\" | \"none\";\n\n/** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.\n * @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].\n * @beta\n */\nexport type StackedFractionType = \"horizontal\" | \"diagonal\";\n\n/** Describes the color in which to draw the text in a [[TextRun]].\n * \"subcategory\" indicates that the text should be drawn using the color of the [SubCategory]($backend) specified by the [GeometryStream]($docs/learning/common/GeometryStream.md) hosting the\n * text.\n * @beta\n */\nexport type TextStyleColor = ColorDefProps | \"subcategory\";\n\n/**\n * Describes how to draw the frame around a [[TextAnnotation]].\n * The frame can be a simple line, a filled shape, or both.\n * If only a subset of properties are specified, the others will be set to their default value.\n * @beta\n */\nexport interface TextFrameStyleProps {\n /** Shape of the frame. Default: \"none\" */\n shape?: TextAnnotationFrameShape;\n /** The color to fill the shape of the text frame. This fill is applied using [[FillDisplay.Blanking]]. Default: \"none\" */\n fill?: TextAnnotationFillColor;\n /** The color of the text frame's outline. Default: black */\n border?: TextStyleColor;\n /** This will be used to set the [[GeometryParams.weight]] property of the frame (in pixels). Default: 1px */\n borderWeight?: number;\n};\n\n/** Properties describing the appearance of [[TextAnnotationLeader]] in a [[TextAnnotation]].\n * Used when producing geometry for [[TextAnnotation]].\n * @beta\n */\nexport interface TextLeaderStyleProps {\n /** The color of the leader.\n * If `inherit` is specified, the [[TextAnnotationLeader]] will use the color specified in the parent [[TextStyleSettings]]`.\n * Default: \"inherit\".\n */\n color?: TextStyleColor | \"inherit\";\n /** Whether to use an elbow in the leader.\n * Default: false\n */\n wantElbow?: boolean;\n /** Multiplier used to compute length of the elbow in the leader.\n * The elbowLength is computed in meters as elbowLength * [[lineHeight]].\n * Default: 1.0\n */\n elbowLength?: number;\n /** Multiplier to compute height of the leader terminator.\n * The terminator height is computed in meters as terminatorHeight * [[lineHeight]].\n * Default: 1.0\n */\n terminatorHeightFactor?: number;\n /** Multiplier to compute width of the leader terminator.\n * The terminator width is computed in meters as terminatorWidth * [[lineHeight]].\n * Default: 1.0\n */\n terminatorWidthFactor?: number;\n}\n\n/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [AnnotationTextStyle]($backend)'s properties.\n * @beta\n */\nexport interface TextStyleSettingsProps {\n /** The color of the text.\n * Default: \"subcategory\".\n */\n color?: TextStyleColor;\n /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].\n * Default: \"\" (an invalid font name).\n */\n fontName?: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n * Default: 1.0. */\n lineHeight?: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n * Default: 0.5.\n */\n lineSpacingFactor?: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.\n * Default: false.\n */\n isBold?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*.\n * Default: false.\n */\n isItalic?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined.\n * Default: false.\n */\n isUnderlined?: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n * Default: 0.7.\n */\n stackedFractionScale?: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]].\n * Default: \"horizontal\".\n */\n stackedFractionType?: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n * Default: -0.15.\n */\n subScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n subScriptScale?: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n * Default: -0.5.\n */\n superScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n superScriptScale?: number;\n /** A scale applied to the width of each glyph.\n * Default: 1.0\n */\n widthFactor?: number;\n\n /** Properties describing appearance of leaders in a [[TextAnnotation]]\n * Used when producing geometry for [[TextAnnotation]]\n * Default: {color:\"subcategory\", wantElbow:\"false\",elbowLength:1, terminatorWidthFactor:1, terminatorHeightFactor:1}.\n */\n leader?: TextLeaderStyleProps;\n /** The size (in meters) used to calculate the tab stops in a run.\n * These are equally spaced from the left edge of the TextBlock.\n * Default: 4 meters.\n */\n tabInterval?: number;\n /**\n * A description of the frame around the text annotation.\n * Used when producing geometry for [[TextAnnotation]]s.\n * Default: {shape: \"none\", fill: \"none\", border: black, borderWeight: 1} for no frame.\n */\n frame?: TextFrameStyleProps;\n}\n\nfunction deepFreeze<T>(obj: T) {\n if (obj === null || typeof obj !== \"object\" || Object.isFrozen(obj))\n return;\n Object.getOwnPropertyNames(obj).forEach((prop) => {\n const value = (obj as any)[prop];\n if (value && typeof value === \"object\") {\n deepFreeze(value);\n }\n });\n Object.freeze(obj);\n}\n\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\n * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\n * @see [[TextStyleSettingsProps]] for documentation of each of the settings.\n * @beta\n */\nexport class TextStyleSettings {\n /** The color of the text. */\n public readonly color: TextStyleColor;\n /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].\n */\n public readonly fontName: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n */\n public readonly lineHeight: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n */\n public readonly lineSpacingFactor: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */\n public readonly isBold: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */\n public readonly isItalic: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined. */\n public readonly isUnderlined: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n */\n public readonly stackedFractionScale: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */\n public readonly stackedFractionType: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n */\n public readonly subScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n */\n public readonly subScriptScale: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n */\n public readonly superScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n */\n public readonly superScriptScale: number;\n /** Multiplier used to compute the width of each glyph, relative to [[lineHeight]]. */\n public readonly widthFactor: number;\n /** Properties describing appearance of leaders in a [[TextAnnotation]].\n * Used when producing geometry for [[TextAnnotation]].\n */\n public readonly leader: Readonly<Required<TextLeaderStyleProps>>;\n /** The size (in meters) used to calculate the tab stops in a run.\n * These are equally spaced from the left edge of the TextBlock. Default is 4 meters.\n */\n public readonly tabInterval: number;\n /** The frame settings of the [[TextAnnotation]]. */\n public readonly frame: Readonly<Required<TextFrameStyleProps>>;\n\n /** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */\n public static defaultProps: DeepReadonlyObject<DeepRequiredObject<TextStyleSettingsProps>> = {\n color: \"subcategory\",\n fontName: \"\",\n lineHeight: 1,\n lineSpacingFactor: 0.5,\n isBold: false,\n isItalic: false,\n isUnderlined: false,\n stackedFractionScale: 0.7,\n stackedFractionType: \"horizontal\",\n subScriptOffsetFactor: -0.15,\n subScriptScale: 2 / 3,\n superScriptOffsetFactor: 0.5,\n superScriptScale: 2 / 3,\n widthFactor: 1,\n leader: {\n color: \"inherit\",\n wantElbow: false,\n elbowLength: 1.0,\n terminatorHeightFactor: 1.0,\n terminatorWidthFactor: 1.0,\n },\n tabInterval: 4,\n frame: {\n shape: \"none\",\n fill: \"none\",\n border: ColorDef.black.toJSON(),\n borderWeight: 1,\n },\n };\n\n /** Settings initialized to all default values. */\n public static defaults: TextStyleSettings = new TextStyleSettings({});\n\n private constructor(props: TextStyleSettingsProps, defaults?: Required<TextStyleSettingsProps>) {\n if (!defaults) {\n defaults = TextStyleSettings.defaultProps;\n }\n\n this.color = props.color ?? defaults.color;\n this.fontName = props.fontName ?? defaults.fontName;\n this.lineHeight = props.lineHeight ?? defaults.lineHeight;\n this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;\n this.isBold = props.isBold ?? defaults.isBold;\n this.isItalic = props.isItalic ?? defaults.isItalic;\n this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;\n this.stackedFractionScale = props.stackedFractionScale ?? defaults.stackedFractionScale;\n this.stackedFractionType = props.stackedFractionType ?? defaults.stackedFractionType;\n this.subScriptOffsetFactor = props.subScriptOffsetFactor ?? defaults.subScriptOffsetFactor;\n this.subScriptScale = props.subScriptScale ?? defaults.subScriptScale;\n this.superScriptOffsetFactor = props.superScriptOffsetFactor ?? defaults.superScriptOffsetFactor;\n this.superScriptScale = props.superScriptScale ?? defaults.superScriptScale;\n this.widthFactor = props.widthFactor ?? defaults.widthFactor;\n const leader = {\n color: props.leader?.color ?? defaults.leader.color,\n wantElbow: props.leader?.wantElbow ?? defaults.leader.wantElbow,\n elbowLength: props.leader?.elbowLength ?? defaults.leader.elbowLength,\n terminatorHeightFactor: props.leader?.terminatorHeightFactor ?? defaults.leader.terminatorHeightFactor,\n terminatorWidthFactor: props.leader?.terminatorWidthFactor ?? defaults.leader.terminatorWidthFactor,\n }\n this.leader = Object.freeze(leader) as Readonly<Required<TextLeaderStyleProps>>;\n this.tabInterval = props.tabInterval ?? defaults.tabInterval;\n const frame = {\n shape: props.frame?.shape ?? defaults.frame.shape,\n fill: props.frame?.fill ?? defaults.frame.fill,\n border: props.frame?.border ?? defaults.frame.border,\n borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,\n };\n // Cast to indicate to TypeScript that the frame properties are all defined\n this.frame = Object.freeze(frame) as Readonly<Required<TextFrameStyleProps>>;\n }\n\n /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */\n public clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings {\n return alteredProps ? new TextStyleSettings(alteredProps, this) : this;\n }\n\n /** Creates a deep copy of the `TextStyleSettingsProps`. */\n public static cloneProps(props: TextStyleSettingsProps): TextStyleSettingsProps {\n const copy = { ...props };\n if (props.leader) {\n copy.leader = { ...props.leader };\n }\n if (props.frame) {\n copy.frame = { ...props.frame };\n }\n return copy;\n }\n\n /** Create settings from their JSON representation. */\n public static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings {\n return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;\n }\n\n public toJSON(): TextStyleSettingsProps {\n return { ...this };\n }\n\n /** Compare two [[TextLeaderStyleProps]] for equality.\n * @param other The other leader style properties to compare against.\n * @returns true if the two leader styles are equal, false otherwise.\n */\n public leaderEquals(other: TextLeaderStyleProps): boolean {\n return this.leader.color === other.color && this.leader.wantElbow === other.wantElbow\n && this.leader.elbowLength === other.elbowLength && this.leader.terminatorHeightFactor === other.terminatorHeightFactor\n && this.leader.terminatorWidthFactor === other.terminatorWidthFactor;\n }\n\n public frameEquals(other: TextFrameStyleProps): boolean {\n return this.frame?.shape === other.shape\n && this.frame?.fill === other.fill\n && this.frame?.border === other.border\n && this.frame?.borderWeight === other.borderWeight;\n }\n\n public equals(other: TextStyleSettings): boolean {\n return this.color === other.color && this.fontName === other.fontName\n && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.widthFactor === other.widthFactor\n && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined\n && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale\n && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale\n && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale\n && this.tabInterval === other.tabInterval\n && this.leaderEquals(other.leader)\n && this.frameEquals(other.frame)\n }\n\n /**\n * Returns a list of validation errors for this instance.\n *\n * A TextStyleSettings object may contain values that are invalid in all contexts.\n * If this method returns any error strings, using the settings will likely result in rendering failures or runtime exceptions.\n *\n * This method only checks for universally invalid values. Additional domain-specific validation may be required depending on the context in which these settings are used.\n *\n * @returns An array of error strings describing the invalid values, or an empty array if the settings are valid.\n */\n public getValidationErrors(): string[] {\n const errorMessages: string[] = [];\n if (this.fontName.trim() === \"\") {\n errorMessages.push(\"fontName must be provided\");\n }\n\n if (this.lineHeight <= 0) {\n errorMessages.push(\"lineHeight must be greater than 0\");\n }\n\n if (this.stackedFractionScale <= 0) {\n errorMessages.push(\"stackedFractionScale must be greater than 0\");\n }\n\n return errorMessages;\n }\n}\n\ndeepFreeze(TextStyleSettings.defaultProps);\ndeepFreeze(TextStyleSettings.defaults);"]}
1
+ {"version":3,"file":"TextStyle.js","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":";AAAA;;;+FAG+F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CAAC,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 { DeepReadonlyObject, DeepRequiredObject } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\n\n/** Predefined markers for list items in text annotations.\n * 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.\n * @beta\n */\nexport enum ListMarkerEnumerator {\n /** English Alphabet */\n Letter = \"A\",\n RomanNumeral = \"I\",\n Number = \"1\",\n Bullet = \"•\",\n Circle = \"○\",\n Square = \"■\",\n /** EM Dash */\n Dash = \"–\",\n}\n\n/** A settings to specify how to mark or denote the start of a list item in a [[List]].\n * @beta\n */\nexport interface ListMarker {\n /** This can be either one of the predefined markers in [[ListMarkerEnumerator]], or any arbitrary string. */\n enumerator: ListMarkerEnumerator | string,\n /** The punctuation to follow the enumerator. */\n terminator?: \"parenthesis\" | \"period\",\n /** Whether to use upper or lower case for alphabetic or roman numeral enumerators. Ignored if [[enumerator]] is not alphabetic or roman numeral. */\n case?: \"upper\" | \"lower\",\n}\n\n/** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]\n * @beta\n*/\nexport const textAnnotationFrameShapes = [\"none\", \"line\", \"rectangle\", \"circle\", \"equilateralTriangle\", \"diamond\", \"square\", \"pentagon\", \"hexagon\", \"octagon\", \"capsule\", \"roundedRectangle\"] as const;\n\n/** Describes a predefined shape that can be computed and drawn around the margins of a [[TextBlock]]\n * @beta\n*/\nexport type TextAnnotationFrameShape = typeof textAnnotationFrameShapes[number];\n\n/**\n * Describes what color to use when filling the frame around a [[TextBlock]].\n * If `background` is specified, [[GeometryParams.BackgroundFill]] will be set to `BackgroundFill.Outline`.\n * If `none` is specified, no fill will be applied.\n * @beta\n */\nexport type TextAnnotationFillColor = TextStyleColor | \"background\" | \"none\";\n\n/** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.\n * @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].\n * @beta\n */\nexport type StackedFractionType = \"horizontal\" | \"diagonal\";\n\n/** Describes the color in which to draw the text in a [[TextRun]].\n * \"subcategory\" indicates that the text should be drawn using the color of the [SubCategory]($backend) specified by the [GeometryStream]($docs/learning/common/GeometryStream.md) hosting the\n * text.\n * @beta\n */\nexport type TextStyleColor = ColorDefProps | \"subcategory\";\n\n/**\n * Describes how to draw the frame around a [[TextAnnotation]].\n * The frame can be a simple line, a filled shape, or both.\n * If only a subset of properties are specified, the others will be set to their default value.\n * @beta\n */\nexport interface TextFrameStyleProps {\n /** Shape of the frame. Default: \"none\" */\n shape?: TextAnnotationFrameShape;\n /** The color to fill the shape of the text frame. This fill is applied using [[FillDisplay.Blanking]]. Default: \"none\" */\n fill?: TextAnnotationFillColor;\n /** The color of the text frame's outline. Default: black */\n border?: TextStyleColor;\n /** This will be used to set the [[GeometryParams.weight]] property of the frame (in pixels). Default: 1px */\n borderWeight?: number;\n};\n\n/** Properties describing the appearance of [[TextAnnotationLeader]] in a [[TextAnnotation]].\n * Used when producing geometry for [[TextAnnotation]].\n * @beta\n */\nexport interface TextLeaderStyleProps {\n /** The color of the leader.\n * If `inherit` is specified, the [[TextAnnotationLeader]] will use the color specified in the parent [[TextStyleSettings]]`.\n * Default: \"inherit\".\n */\n color?: TextStyleColor | \"inherit\";\n /** Whether to use an elbow in the leader.\n * Default: false\n */\n wantElbow?: boolean;\n /** Multiplier used to compute length of the elbow in the leader.\n * The elbowLength is computed in meters as elbowLength * [[lineHeight]].\n * Default: 1.0\n */\n elbowLength?: number;\n /** Multiplier to compute height of the leader terminator.\n * The terminator height is computed in meters as terminatorHeight * [[lineHeight]].\n * Default: 1.0\n */\n terminatorHeightFactor?: number;\n /** Multiplier to compute width of the leader terminator.\n * The terminator width is computed in meters as terminatorWidth * [[lineHeight]].\n * Default: 1.0\n */\n terminatorWidthFactor?: number;\n}\n\n/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [AnnotationTextStyle]($backend)'s properties.\n * @beta\n */\nexport interface TextStyleSettingsProps {\n /** The color of the text.\n * Default: \"subcategory\".\n */\n color?: TextStyleColor;\n /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].\n * Default: \"\" (an invalid font name).\n */\n fontName?: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n * Default: 1.0. */\n lineHeight?: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n * Default: 0.5.\n */\n lineSpacingFactor?: number;\n /** Multiplier used to compute the vertical distance between two paragraphs of text.\n * The distance is computed in meters as paragraphSpacingFactor * [[lineHeight]].\n * Default: 0.5.\n */\n paragraphSpacingFactor?: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.\n * Default: false.\n */\n isBold?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*.\n * Default: false.\n */\n isItalic?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined.\n * Default: false.\n */\n isUnderlined?: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n * Default: 0.7.\n */\n stackedFractionScale?: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]].\n * Default: \"horizontal\".\n */\n stackedFractionType?: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n * Default: -0.15.\n */\n subScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n subScriptScale?: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n * Default: -0.5.\n */\n superScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n superScriptScale?: number;\n /** A scale applied to the width of each glyph.\n * Default: 1.0\n */\n widthFactor?: number;\n\n /** Properties describing appearance of leaders in a [[TextAnnotation]]\n * Used when producing geometry for [[TextAnnotation]]\n * Default: {color:\"subcategory\", wantElbow:\"false\",elbowLength:1, terminatorWidthFactor:1, terminatorHeightFactor:1}.\n */\n leader?: TextLeaderStyleProps;\n /** The size (in meters) used to calculate the tab stops in a run.\n * These are equally spaced from the left edge of the TextBlock.\n * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n * Default: 4 meters.\n */\n tabInterval?: number;\n /**\n * A description of the frame around the text annotation.\n * Used when producing geometry for [[TextAnnotation]]s.\n * Default: {shape: \"none\", fill: \"none\", border: black, borderWeight: 1} for no frame.\n */\n frame?: TextFrameStyleProps;\n /** The offset (in meters) from the left edge of the text block to the start of the line of text.\n * In lists, the indentation is added to offset of list items.\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n * Default: 0 meters.\n */\n indentation?: number;\n /** The marker used to indicate the start of a list item.\n * Default: \"1.\".\n */\n listMarker?: ListMarker;\n}\n\nfunction deepFreeze<T>(obj: T) {\n if (obj === null || typeof obj !== \"object\" || Object.isFrozen(obj))\n return;\n Object.getOwnPropertyNames(obj).forEach((prop) => {\n const value = (obj as any)[prop];\n if (value && typeof value === \"object\") {\n deepFreeze(value);\n }\n });\n Object.freeze(obj);\n}\n\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\n * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\n * @see [[TextStyleSettingsProps]] for documentation of each of the settings.\n * @beta\n */\nexport class TextStyleSettings {\n /** The color of the text. */\n public readonly color: TextStyleColor;\n /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].\n */\n public readonly fontName: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n */\n public readonly lineHeight: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n */\n public readonly lineSpacingFactor: number;\n /** Multiplier used to compute the vertical distance between two paragraphs of text.\n * The distance is computed in meters as paragraphSpacingFactor * [[lineHeight]].\n */\n public readonly paragraphSpacingFactor: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */\n public readonly isBold: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */\n public readonly isItalic: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined. */\n public readonly isUnderlined: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n */\n public readonly stackedFractionScale: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */\n public readonly stackedFractionType: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n */\n public readonly subScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n */\n public readonly subScriptScale: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n */\n public readonly superScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n */\n public readonly superScriptScale: number;\n /** Multiplier used to compute the width of each glyph, relative to [[lineHeight]]. */\n public readonly widthFactor: number;\n /** Properties describing appearance of leaders in a [[TextAnnotation]].\n * Used when producing geometry for [[TextAnnotation]].\n */\n public readonly leader: Readonly<Required<TextLeaderStyleProps>>;\n /** The size (in meters) used to calculate the tab stops in a run.\n * These are equally spaced from the left edge of the TextBlock.\n * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n */\n public readonly tabInterval: number;\n /** The offset (in meters) from the left edge of the text block to the start of the line of text.\n * In lists, the indentation is added to offset of list items.\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n */\n public readonly indentation: number;\n /** The marker used to indicate the start of a list item.\n * Default: [[ListMarkerEnumerator.Number]].\n */\n public readonly listMarker: ListMarker;\n /** The frame settings of the [[TextAnnotation]]. */\n public readonly frame: Readonly<Required<TextFrameStyleProps>>;\n\n /** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */\n public static defaultProps: DeepReadonlyObject<DeepRequiredObject<TextStyleSettingsProps>> = {\n color: \"subcategory\",\n fontName: \"\",\n lineHeight: 1,\n lineSpacingFactor: 0.5,\n paragraphSpacingFactor: 0.5,\n isBold: false,\n isItalic: false,\n isUnderlined: false,\n stackedFractionScale: 0.7,\n stackedFractionType: \"horizontal\",\n subScriptOffsetFactor: -0.15,\n subScriptScale: 2 / 3,\n superScriptOffsetFactor: 0.5,\n superScriptScale: 2 / 3,\n widthFactor: 1,\n leader: {\n color: \"inherit\",\n wantElbow: false,\n elbowLength: 1.0,\n terminatorHeightFactor: 1.0,\n terminatorWidthFactor: 1.0,\n },\n tabInterval: 4,\n indentation: 0,\n listMarker: { enumerator: \"1\", terminator: \"period\", case: \"lower\" },\n frame: {\n shape: \"none\",\n fill: \"none\",\n border: ColorDef.black.toJSON(),\n borderWeight: 1,\n },\n };\n\n /** Settings initialized to all default values. */\n public static defaults: TextStyleSettings = new TextStyleSettings({});\n\n private constructor(props: TextStyleSettingsProps, defaults?: Required<TextStyleSettingsProps>) {\n if (!defaults) {\n defaults = TextStyleSettings.defaultProps;\n }\n\n this.color = props.color ?? defaults.color;\n this.fontName = props.fontName ?? defaults.fontName;\n this.lineHeight = props.lineHeight ?? defaults.lineHeight;\n this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;\n this.paragraphSpacingFactor = props.paragraphSpacingFactor ?? defaults.paragraphSpacingFactor;\n this.isBold = props.isBold ?? defaults.isBold;\n this.isItalic = props.isItalic ?? defaults.isItalic;\n this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;\n this.stackedFractionScale = props.stackedFractionScale ?? defaults.stackedFractionScale;\n this.stackedFractionType = props.stackedFractionType ?? defaults.stackedFractionType;\n this.subScriptOffsetFactor = props.subScriptOffsetFactor ?? defaults.subScriptOffsetFactor;\n this.subScriptScale = props.subScriptScale ?? defaults.subScriptScale;\n this.superScriptOffsetFactor = props.superScriptOffsetFactor ?? defaults.superScriptOffsetFactor;\n this.superScriptScale = props.superScriptScale ?? defaults.superScriptScale;\n this.widthFactor = props.widthFactor ?? defaults.widthFactor;\n const leader = {\n color: props.leader?.color ?? defaults.leader.color,\n wantElbow: props.leader?.wantElbow ?? defaults.leader.wantElbow,\n elbowLength: props.leader?.elbowLength ?? defaults.leader.elbowLength,\n terminatorHeightFactor: props.leader?.terminatorHeightFactor ?? defaults.leader.terminatorHeightFactor,\n terminatorWidthFactor: props.leader?.terminatorWidthFactor ?? defaults.leader.terminatorWidthFactor,\n }\n this.leader = Object.freeze(leader) as Readonly<Required<TextLeaderStyleProps>>;\n this.tabInterval = props.tabInterval ?? defaults.tabInterval;\n this.indentation = props.indentation ?? defaults.indentation;\n this.listMarker = props.listMarker ?? defaults.listMarker;\n\n const frame = {\n shape: props.frame?.shape ?? defaults.frame.shape,\n fill: props.frame?.fill ?? defaults.frame.fill,\n border: props.frame?.border ?? defaults.frame.border,\n borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,\n };\n // Cast to indicate to TypeScript that the frame properties are all defined\n this.frame = Object.freeze(frame) as Readonly<Required<TextFrameStyleProps>>;\n }\n\n /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */\n public clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings {\n return alteredProps ? new TextStyleSettings(alteredProps, this) : this;\n }\n\n /** Creates a deep copy of the `TextStyleSettingsProps`. */\n public static cloneProps(props: TextStyleSettingsProps): TextStyleSettingsProps {\n const copy = { ...props };\n if (props.leader) {\n copy.leader = { ...props.leader };\n }\n if (props.frame) {\n copy.frame = { ...props.frame };\n }\n return copy;\n }\n\n /** Create settings from their JSON representation. */\n public static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings {\n return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;\n }\n\n public toJSON(): TextStyleSettingsProps {\n return { ...this };\n }\n\n /** Compare two [[TextLeaderStyleProps]] for equality.\n * @param other The other leader style properties to compare against.\n * @returns true if the two leader styles are equal, false otherwise.\n */\n public leaderEquals(other: TextLeaderStyleProps): boolean {\n return this.leader.color === other.color && this.leader.wantElbow === other.wantElbow\n && this.leader.elbowLength === other.elbowLength && this.leader.terminatorHeightFactor === other.terminatorHeightFactor\n && this.leader.terminatorWidthFactor === other.terminatorWidthFactor;\n }\n\n public frameEquals(other: TextFrameStyleProps): boolean {\n return this.frame?.shape === other.shape\n && this.frame?.fill === other.fill\n && this.frame?.border === other.border\n && this.frame?.borderWeight === other.borderWeight;\n }\n\n public equals(other: TextStyleSettings): boolean {\n return this.color === other.color && this.fontName === other.fontName\n && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.paragraphSpacingFactor === other.paragraphSpacingFactor && this.widthFactor === other.widthFactor\n && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined\n && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale\n && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale\n && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale\n && this.tabInterval === other.tabInterval && this.indentation === other.indentation\n && this.listMarker.case === other.listMarker.case && this.listMarker.enumerator === other.listMarker.enumerator && this.listMarker.terminator === other.listMarker.terminator\n && this.leaderEquals(other.leader)\n && this.frameEquals(other.frame)\n }\n\n /**\n * Returns a list of validation errors for this instance.\n *\n * A TextStyleSettings object may contain values that are invalid in all contexts.\n * If this method returns any error strings, using the settings will likely result in rendering failures or runtime exceptions.\n *\n * This method only checks for universally invalid values. Additional domain-specific validation may be required depending on the context in which these settings are used.\n *\n * @returns An array of error strings describing the invalid values, or an empty array if the settings are valid.\n */\n public getValidationErrors(): string[] {\n const errorMessages: string[] = [];\n if (this.fontName.trim() === \"\") {\n errorMessages.push(\"fontName must be provided\");\n }\n\n if (this.lineHeight <= 0) {\n errorMessages.push(\"lineHeight must be greater than 0\");\n }\n\n if (this.stackedFractionScale <= 0) {\n errorMessages.push(\"stackedFractionScale must be greater than 0\");\n }\n\n return errorMessages;\n }\n}\n\ndeepFreeze(TextStyleSettings.defaultProps);\ndeepFreeze(TextStyleSettings.defaults);"]}
@@ -4,6 +4,7 @@ export * from "./annotation/TextAnnotation";
4
4
  export * from "./annotation/TextBlock";
5
5
  export * from "./annotation/TextBlockGeometryProps";
6
6
  export * from "./annotation/TextBlockLayoutResult";
7
+ export * from "./annotation/TextField";
7
8
  export * from "./annotation/TextStyle";
8
9
  export * from "./Atmosphere";
9
10
  export * from "./AuthorizationClient";
@@ -1 +1 @@
1
- {"version":3,"file":"core-common.d.ts","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC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AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAE/C,cAAc,0BAA0B,CAAC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
1
+ {"version":3,"file":"core-common.d.ts","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cA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C;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAE/C,cAAc,0BAA0B,CAAC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
@@ -24,6 +24,7 @@ __exportStar(require("./annotation/TextAnnotation"), exports);
24
24
  __exportStar(require("./annotation/TextBlock"), exports);
25
25
  __exportStar(require("./annotation/TextBlockGeometryProps"), exports);
26
26
  __exportStar(require("./annotation/TextBlockLayoutResult"), exports);
27
+ __exportStar(require("./annotation/TextField"), exports);
27
28
  __exportStar(require("./annotation/TextStyle"), exports);
28
29
  __exportStar(require("./Atmosphere"), exports);
29
30
  __exportStar(require("./AuthorizationClient"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,kDAAgC;AAChC,8DAA4C;AAC5C,yDAAuC;AACvC,sEAAoD;AACpD,qEAAmD;AAC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H;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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*--------------------------------------------------------------------------------------------*/\nexport * from \"./AmbientOcclusion\";\nexport * from \"./AnalysisStyle\";\nexport * from \"./annotation/TextAnnotation\";\nexport * from \"./annotation/TextBlock\";\nexport * from \"./annotation/TextBlockGeometryProps\";\nexport * from \"./annotation/TextBlockLayoutResult\";\nexport * from \"./annotation/TextStyle\";\nexport * from \"./Atmosphere\";\nexport * from \"./AuthorizationClient\";\nexport * from \"./BackgroundMapProvider\";\nexport * from \"./BackgroundMapSettings\";\nexport * from \"./Base64EncodedString\";\nexport * from \"./BriefcaseTypes\";\nexport * from \"./Camera\";\nexport * from \"./CatalogIModel\";\nexport * from \"./ChangedElements\";\nexport * from \"./ChangedEntities\";\nexport * from \"./ChangesetProps\";\nexport * from \"./ClipStyle\";\nexport * from \"./Code\";\nexport * from \"./ColorByName\";\nexport * from \"./ColorDef\";\nexport * from \"./CommonLoggerCategory\";\nexport * from \"./ContextRealityModel\";\nexport * from \"./DisplayStyleSettings\";\nexport * from \"./domains/FunctionalElementProps\";\nexport * from \"./domains/GenericElementProps\";\nexport * from \"./ECSchemaProps\";\nexport * from \"./ECSqlTypes\";\nexport * from \"./ElementMesh\";\nexport * from \"./ElementProps\";\nexport * from \"./EmphasizeElementsProps\";\nexport * from \"./EntityProps\";\nexport * from \"./EntityReference\";\nexport * from \"./Environment\";\nexport * from \"./FeatureIndex\";\nexport * from \"./FeatureSymbology\";\nexport * from \"./FeatureTable\";\nexport * from \"./Fonts\";\nexport * from \"./Frustum\";\nexport * from \"./GenericInstanceFilter\";\nexport * from \"./GeoCoordinateServices\";\nexport * from \"./geometry/AdditionalTransform\";\nexport * from \"./geometry/AreaPattern\";\nexport * from \"./geometry/BoundingSphere\";\nexport * from \"./geometry/Cartographic\";\nexport * from \"./geometry/CoordinateReferenceSystem\";\nexport * from \"./geometry/ElementGeometry\";\nexport * from \"./geometry/FrustumPlanes\";\nexport * from \"./geometry/GeodeticDatum\";\nexport * from \"./geometry/GeodeticEllipsoid\";\nexport * from \"./geometry/GeometryStream\";\nexport * from \"./geometry/ImageGraphic\";\nexport * from \"./geometry/LineStyle\";\nexport * from \"./geometry/Placement\";\nexport * from \"./geometry/Projection\";\nexport * from \"./geometry/TextString\";\nexport * from \"./GeometryContainment\";\nexport * from \"./GeometryParams\";\nexport * from \"./GeometrySummary\";\nexport * from \"./Gradient\";\nexport * from \"./GraphicParams\";\nexport * from \"./GroundPlane\";\nexport * from \"./HiddenLine\";\nexport * from \"./Hilite\";\nexport * from \"./HSLColor\";\nexport * from \"./HSVColor\";\nexport * from \"./Image\";\nexport * from \"./IModel\";\nexport * from \"./IModelError\";\nexport * from \"./IModelVersion\";\nexport * from \"./ITwinCoreErrors\";\nexport * from \"./ipc/IpcSocket\";\nexport * from \"./ipc/IpcWebSocket\";\nexport * from \"./ipc/IpcWebSocketTransport\";\nexport * from \"./ipc/IpcSession\";\nexport * from \"./IpcAppProps\";\nexport * from \"./LightSettings\";\nexport * from \"./LinePixels\";\nexport * from \"./Localization\";\nexport * from \"./MapImagerySettings\";\nexport * from \"./MapLayerSettings\";\nexport * from \"./MassProperties\";\nexport * from \"./MaterialProps\";\nexport * from \"./ModelClipGroup\";\nexport * from \"./ModelProps\";\nexport * from \"./NativeAppProps\";\nexport * from \"./OctEncodedNormal\";\nexport * from \"./ConcurrentQuery\";\nexport * from \"./ECSqlReader\";\nexport * from \"./PlanarClipMask\";\nexport * from \"./ModelGeometryChanges\";\nexport * from \"./PlanProjectionSettings\";\nexport * from \"./QPoint\";\nexport * from \"./RealityDataAccessProps\";\nexport * from \"./RealityModelDisplaySettings\";\nexport * from \"./RenderPolyline\";\nexport * from \"./RenderMaterial\";\nexport * from \"./RenderSchedule\";\nexport * from \"./RenderTexture\";\nexport * from \"./RgbColor\";\nexport * from \"./RpcManager\";\nexport * from \"./SessionProps\";\nexport * from \"./SkyBox\";\nexport * from \"./SolarCalculate\";\nexport * from \"./SolarShadows\";\nexport * from \"./SpatialClassification\";\nexport * from \"./SubCategoryAppearance\";\nexport * from \"./SubCategoryOverride\";\nexport * from \"./CesiumIonAssets\";\nexport * from \"./TerrainSettings\";\nexport * from \"./TextureMapping\";\nexport * from \"./TextureProps\";\nexport * from \"./ThematicDisplay\";\nexport * from \"./ContourDisplay\";\nexport * from \"./Thumbnail\";\nexport * from \"./TileProps\";\nexport * from \"./Tween\";\nexport * from \"./TxnAction\";\nexport * from \"./ViewDetails\";\nexport * from \"./ViewFlags\";\nexport * from \"./ViewProps\";\nexport * from \"./rpc/core/RpcConstants\";\nexport * from \"./rpc/core/RpcControl\";\nexport * from \"./rpc/core/RpcInvocation\";\nexport * from \"./rpc/core/RpcSessionInvocation\";\nexport * from \"./rpc/core/RpcMarshaling\";\nexport * from \"./rpc/core/RpcOperation\";\nexport * from \"./rpc/core/RpcPendingQueue\";\nexport * from \"./rpc/core/RpcProtocol\";\nexport * from \"./rpc/core/RpcRegistry\";\nexport * from \"./rpc/core/RpcRequest\";\nexport * from \"./rpc/core/RpcRequestContext\";\nexport * from \"./rpc/core/RpcRoutingToken\";\nexport * from \"./rpc/core/RpcPush\";\nexport * from \"./rpc/core/RpcConfiguration\";\nexport * from \"./rpc/DevToolsRpcInterface\";\nexport * from \"./rpc/IModelReadRpcInterface\";\nexport * from \"./rpc/IModelTileRpcInterface\";\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\nexport * from \"./rpc/TestRpcManager\";\nexport * from \"./RpcInterface\";\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\nexport * from \"./rpc/web/OpenAPI\";\nexport * from \"./rpc/web/RpcMultipart\";\nexport * from \"./rpc/web/WebAppRpcProtocol\";\nexport * from \"./rpc/web/WebAppRpcRequest\";\nexport * from \"./rpc/web/WebAppRpcLogging\";\nexport * from \"./tile/B3dmTileIO\";\nexport * from \"./tile/CompositeTileIO\";\nexport * from \"./tile/ElementGraphics\";\nexport * from \"./tile/GltfTileIO\";\nexport * from \"./tile/I3dmTileIO\";\nexport * from \"./tile/IModelTileIO\";\nexport * from \"./tile/PntsTileIO\";\nexport * from \"./tile/TileIO\";\nexport * from \"./tile/TileMetadata\";\nexport * from \"./tile/Tileset3dSchema\";\nexport * from \"./WhiteOnWhiteReversalSettings\";\n\nexport * from \"./internal/cross-package\";\n\n/** @docs-package-description\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Entities\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\n */\n/**\n * @docs-group-description Codes\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\n */\n/**\n * @docs-group-description Geometry\n * Types for working with geometry.\n */\n/**\n * @docs-group-description Serialization\n * Types for serializing geometry\n */\n/**\n * @docs-group-description Views\n * Types for defining graphical views of the contents of an iModel.\n */\n/**\n * @docs-group-description DisplayStyles\n * Types for describing how the contents of Views should be rendered.\n */\n/**\n * @docs-group-description Rendering\n * Types describing geometry, views, and symbology for consumption by a display system.\n */\n/**\n * @docs-group-description Symbology\n * Types that define the appearance of geometry.\n */\n/**\n * @docs-group-description iModels\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\n */\n/**\n * @docs-group-description RpcInterface\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n/**\n * @docs-group-description IpcSocket\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\n */\n/**\n * @docs-group-description ECSQL\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description CloudStorage\n * Types for working with Cloud Storage.\n */\n/**\n * @docs-group-description Tween\n * Tweening library adapted from tween.js.\n */\n/**\n * @docs-group-description Tile\n * Types for working with 3d tile formats.\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description NativeApp\n * [Native applications]($docs/learning/NativeApps.md)\n */\n/**\n * @docs-group-description Localization\n * Classes for internationalization and localization of your app.\n */\n/**\n * @docs-group-description Authorization\n * Classes for managing AccessToken used for all requests in other classes.\n */\n/**\n * @docs-group-description RealityData\n * Types for working with the RealityData API.\n */\n/**\n * @docs-group-description MapLayers\n * Types for working with the MapLayers API.\n */\n/**\n * @docs-group-description Annotation\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\n */\n"]}
1
+ {"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,kDAAgC;AAChC,8DAA4C;AAC5C,yDAAuC;AACvC,sEAAoD;AACpD,qEAAmD;AACnD,yDAAuC;AACvC,yDAAuC;AACvC,+CAA6B;AAC7B,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,2CAAyB;AACzB,kDAAgC;AAChC,oDAAkC;AAClC,oDAAkC;AAClC,mDAAiC;AACjC,8CAA4B;AAC5B,yCAAuB;AACvB,gDAA8B;AAC9B,6CAA2B;AAC3B,yDAAuC;AACvC,wDAAsC;AACtC,yDAAuC;AACvC,mEAAiD;AACjD,gEAA8C;AAC9C,kDAAgC;AAChC,+CAA6B;AAC7B,gDAA8B;AAC9B,iDAA+B;AAC/B,2DAAyC;AACzC,gDAA8B;AAC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5B,8CAA4B;AAC5B,0CAAwB;AACxB,8CAA4B;AAC5B,gDAA8B;AAC9B,8CAA4B;AAC5B,8CAA4B;AAC5B,0DAAwC;AACxC,wDAAsC;AACtC,2DAAyC;AACzC,kEAAgD;AAChD,2DAAyC;AACzC,0DAAwC;AACxC,6DAA2C;AAC3C,yDAAuC;AACvC,yDAAuC;AACvC,wDAAsC;AACtC,+DAA6C;AAC7C,6DAA2C;AAC3C,qDAAmC;AACnC,8DAA4C;AAC5C,6DAA2C;AAC3C,+DAA6C;AAC7C,+DAA6C;AAC7C,mEAAiD;AACjD,uDAAqC;AACrC,iDAA+B;AAC/B,mEAAiD;AACjD,oEAAkD;AAClD,oDAAkC;AAClC,yDAAuC;AACvC,8DAA4C;AAC5C,6DAA2C;AAC3C,6DAA2C;AAC3C,oDAAkC;AAClC,yDAAuC;AACvC,yDAAuC;AACvC,oDAAkC;AAClC,oDAAkC;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,gDAA8B;AAC9B,sDAAoC;AACpC,yDAAuC;AACvC,iEAA+C;AAE/C,2DAAyC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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*--------------------------------------------------------------------------------------------*/\nexport * from \"./AmbientOcclusion\";\nexport * from \"./AnalysisStyle\";\nexport * from \"./annotation/TextAnnotation\";\nexport * from \"./annotation/TextBlock\";\nexport * from \"./annotation/TextBlockGeometryProps\";\nexport * from \"./annotation/TextBlockLayoutResult\";\nexport * from \"./annotation/TextField\";\nexport * from \"./annotation/TextStyle\";\nexport * from \"./Atmosphere\";\nexport * from \"./AuthorizationClient\";\nexport * from \"./BackgroundMapProvider\";\nexport * from \"./BackgroundMapSettings\";\nexport * from \"./Base64EncodedString\";\nexport * from \"./BriefcaseTypes\";\nexport * from \"./Camera\";\nexport * from \"./CatalogIModel\";\nexport * from \"./ChangedElements\";\nexport * from \"./ChangedEntities\";\nexport * from \"./ChangesetProps\";\nexport * from \"./ClipStyle\";\nexport * from \"./Code\";\nexport * from \"./ColorByName\";\nexport * from \"./ColorDef\";\nexport * from \"./CommonLoggerCategory\";\nexport * from \"./ContextRealityModel\";\nexport * from \"./DisplayStyleSettings\";\nexport * from \"./domains/FunctionalElementProps\";\nexport * from \"./domains/GenericElementProps\";\nexport * from \"./ECSchemaProps\";\nexport * from \"./ECSqlTypes\";\nexport * from \"./ElementMesh\";\nexport * from \"./ElementProps\";\nexport * from \"./EmphasizeElementsProps\";\nexport * from \"./EntityProps\";\nexport * from \"./EntityReference\";\nexport * from \"./Environment\";\nexport * from \"./FeatureIndex\";\nexport * from \"./FeatureSymbology\";\nexport * from \"./FeatureTable\";\nexport * from \"./Fonts\";\nexport * from \"./Frustum\";\nexport * from \"./GenericInstanceFilter\";\nexport * from \"./GeoCoordinateServices\";\nexport * from \"./geometry/AdditionalTransform\";\nexport * from \"./geometry/AreaPattern\";\nexport * from \"./geometry/BoundingSphere\";\nexport * from \"./geometry/Cartographic\";\nexport * from \"./geometry/CoordinateReferenceSystem\";\nexport * from \"./geometry/ElementGeometry\";\nexport * from \"./geometry/FrustumPlanes\";\nexport * from \"./geometry/GeodeticDatum\";\nexport * from \"./geometry/GeodeticEllipsoid\";\nexport * from \"./geometry/GeometryStream\";\nexport * from \"./geometry/ImageGraphic\";\nexport * from \"./geometry/LineStyle\";\nexport * from \"./geometry/Placement\";\nexport * from \"./geometry/Projection\";\nexport * from \"./geometry/TextString\";\nexport * from \"./GeometryContainment\";\nexport * from \"./GeometryParams\";\nexport * from \"./GeometrySummary\";\nexport * from \"./Gradient\";\nexport * from \"./GraphicParams\";\nexport * from \"./GroundPlane\";\nexport * from \"./HiddenLine\";\nexport * from \"./Hilite\";\nexport * from \"./HSLColor\";\nexport * from \"./HSVColor\";\nexport * from \"./Image\";\nexport * from \"./IModel\";\nexport * from \"./IModelError\";\nexport * from \"./IModelVersion\";\nexport * from \"./ITwinCoreErrors\";\nexport * from \"./ipc/IpcSocket\";\nexport * from \"./ipc/IpcWebSocket\";\nexport * from \"./ipc/IpcWebSocketTransport\";\nexport * from \"./ipc/IpcSession\";\nexport * from \"./IpcAppProps\";\nexport * from \"./LightSettings\";\nexport * from \"./LinePixels\";\nexport * from \"./Localization\";\nexport * from \"./MapImagerySettings\";\nexport * from \"./MapLayerSettings\";\nexport * from \"./MassProperties\";\nexport * from \"./MaterialProps\";\nexport * from \"./ModelClipGroup\";\nexport * from \"./ModelProps\";\nexport * from \"./NativeAppProps\";\nexport * from \"./OctEncodedNormal\";\nexport * from \"./ConcurrentQuery\";\nexport * from \"./ECSqlReader\";\nexport * from \"./PlanarClipMask\";\nexport * from \"./ModelGeometryChanges\";\nexport * from \"./PlanProjectionSettings\";\nexport * from \"./QPoint\";\nexport * from \"./RealityDataAccessProps\";\nexport * from \"./RealityModelDisplaySettings\";\nexport * from \"./RenderPolyline\";\nexport * from \"./RenderMaterial\";\nexport * from \"./RenderSchedule\";\nexport * from \"./RenderTexture\";\nexport * from \"./RgbColor\";\nexport * from \"./RpcManager\";\nexport * from \"./SessionProps\";\nexport * from \"./SkyBox\";\nexport * from \"./SolarCalculate\";\nexport * from \"./SolarShadows\";\nexport * from \"./SpatialClassification\";\nexport * from \"./SubCategoryAppearance\";\nexport * from \"./SubCategoryOverride\";\nexport * from \"./CesiumIonAssets\";\nexport * from \"./TerrainSettings\";\nexport * from \"./TextureMapping\";\nexport * from \"./TextureProps\";\nexport * from \"./ThematicDisplay\";\nexport * from \"./ContourDisplay\";\nexport * from \"./Thumbnail\";\nexport * from \"./TileProps\";\nexport * from \"./Tween\";\nexport * from \"./TxnAction\";\nexport * from \"./ViewDetails\";\nexport * from \"./ViewFlags\";\nexport * from \"./ViewProps\";\nexport * from \"./rpc/core/RpcConstants\";\nexport * from \"./rpc/core/RpcControl\";\nexport * from \"./rpc/core/RpcInvocation\";\nexport * from \"./rpc/core/RpcSessionInvocation\";\nexport * from \"./rpc/core/RpcMarshaling\";\nexport * from \"./rpc/core/RpcOperation\";\nexport * from \"./rpc/core/RpcPendingQueue\";\nexport * from \"./rpc/core/RpcProtocol\";\nexport * from \"./rpc/core/RpcRegistry\";\nexport * from \"./rpc/core/RpcRequest\";\nexport * from \"./rpc/core/RpcRequestContext\";\nexport * from \"./rpc/core/RpcRoutingToken\";\nexport * from \"./rpc/core/RpcPush\";\nexport * from \"./rpc/core/RpcConfiguration\";\nexport * from \"./rpc/DevToolsRpcInterface\";\nexport * from \"./rpc/IModelReadRpcInterface\";\nexport * from \"./rpc/IModelTileRpcInterface\";\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\nexport * from \"./rpc/TestRpcManager\";\nexport * from \"./RpcInterface\";\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\nexport * from \"./rpc/web/OpenAPI\";\nexport * from \"./rpc/web/RpcMultipart\";\nexport * from \"./rpc/web/WebAppRpcProtocol\";\nexport * from \"./rpc/web/WebAppRpcRequest\";\nexport * from \"./rpc/web/WebAppRpcLogging\";\nexport * from \"./tile/B3dmTileIO\";\nexport * from \"./tile/CompositeTileIO\";\nexport * from \"./tile/ElementGraphics\";\nexport * from \"./tile/GltfTileIO\";\nexport * from \"./tile/I3dmTileIO\";\nexport * from \"./tile/IModelTileIO\";\nexport * from \"./tile/PntsTileIO\";\nexport * from \"./tile/TileIO\";\nexport * from \"./tile/TileMetadata\";\nexport * from \"./tile/Tileset3dSchema\";\nexport * from \"./WhiteOnWhiteReversalSettings\";\n\nexport * from \"./internal/cross-package\";\n\n/** @docs-package-description\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Entities\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\n */\n/**\n * @docs-group-description Codes\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\n */\n/**\n * @docs-group-description Geometry\n * Types for working with geometry.\n */\n/**\n * @docs-group-description Serialization\n * Types for serializing geometry\n */\n/**\n * @docs-group-description Views\n * Types for defining graphical views of the contents of an iModel.\n */\n/**\n * @docs-group-description DisplayStyles\n * Types for describing how the contents of Views should be rendered.\n */\n/**\n * @docs-group-description Rendering\n * Types describing geometry, views, and symbology for consumption by a display system.\n */\n/**\n * @docs-group-description Symbology\n * Types that define the appearance of geometry.\n */\n/**\n * @docs-group-description iModels\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\n */\n/**\n * @docs-group-description RpcInterface\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n/**\n * @docs-group-description IpcSocket\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\n */\n/**\n * @docs-group-description ECSQL\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description CloudStorage\n * Types for working with Cloud Storage.\n */\n/**\n * @docs-group-description Tween\n * Tweening library adapted from tween.js.\n */\n/**\n * @docs-group-description Tile\n * Types for working with 3d tile formats.\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description NativeApp\n * [Native applications]($docs/learning/NativeApps.md)\n */\n/**\n * @docs-group-description Localization\n * Classes for internationalization and localization of your app.\n */\n/**\n * @docs-group-description Authorization\n * Classes for managing AccessToken used for all requests in other classes.\n */\n/**\n * @docs-group-description RealityData\n * Types for working with the RealityData API.\n */\n/**\n * @docs-group-description MapLayers\n * Types for working with the MapLayers API.\n */\n/**\n * @docs-group-description Annotation\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\n */\n"]}
@@ -0,0 +1,18 @@
1
+ import { XAndY, XYAndZ } from "@itwin/core-geometry";
2
+ import { FieldFormatOptions, FieldPropertyType } from "../../annotation/TextField";
3
+ /** A FieldPropertyPath must ultimately resolve to one of these primitive types.
4
+ * @internal
5
+ */
6
+ export type FieldPrimitiveValue = boolean | number | string | Date | XAndY | XYAndZ | Uint8Array;
7
+ /** Resolved value of a field.
8
+ * @internal
9
+ */
10
+ export interface FieldValue {
11
+ value: FieldPrimitiveValue;
12
+ type: FieldPropertyType;
13
+ }
14
+ /** @internal */
15
+ export declare function formatFieldValue(value: FieldValue, options: FieldFormatOptions | undefined): string | undefined;
16
+ /** @internal */
17
+ export declare function isKnownFieldPropertyType(type: string): type is FieldPropertyType;
18
+ //# sourceMappingURL=FieldFormatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldFormatter.d.ts","sourceRoot":"","sources":["../../../../src/internal/annotations/FieldFormatter.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAA8B,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/G;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CAAC;AAEjG;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,IAAI,EAAE,iBAAiB,CAAC;CACzB;AA8DD,gBAAgB;AAChB,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,kBAAkB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG/G;AAED,gBAAgB;AAChB,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,iBAAiB,CAEhF"}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.formatFieldValue = formatFieldValue;
8
+ exports.isKnownFieldPropertyType = isKnownFieldPropertyType;
9
+ const formatters = {
10
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
11
+ "string": (v, o) => formatString(v.toString(), o),
12
+ "datetime": (v, o) => formatString(formatDateTime(v, o?.dateTime), o),
13
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
14
+ "quantity": (v, o) => formatString(v.toString(), o),
15
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
16
+ "coordinate": (v, o) => formatString(v.toString(), o),
17
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
18
+ "boolean": (v, o) => formatString(v.toString(), o),
19
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
20
+ "int-enum": (v, o) => formatString(v.toString(), o),
21
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
22
+ "string-enum": (v, o) => formatString(v.toString(), o),
23
+ };
24
+ function formatString(s, o) {
25
+ if (undefined === s || !o) {
26
+ return s;
27
+ }
28
+ switch (o.case) {
29
+ case "upper":
30
+ s = s.toUpperCase();
31
+ break;
32
+ case "lower":
33
+ s = s.toLowerCase();
34
+ break;
35
+ }
36
+ if (o.prefix || o.suffix) {
37
+ s = `${o.prefix ?? ""}${s}${o.suffix ?? ""}`;
38
+ }
39
+ return s;
40
+ }
41
+ function formatDateTime(v, o) {
42
+ if (!(v instanceof Date))
43
+ return undefined;
44
+ if (!isNaN(v.getTime())) {
45
+ if (o?.formatOptions) {
46
+ const locale = o.locale ?? "en-US";
47
+ if (!Intl.DateTimeFormat.supportedLocalesOf([locale], { localeMatcher: "lookup" }).includes(locale)) {
48
+ return undefined;
49
+ }
50
+ const formatter = new Intl.DateTimeFormat(locale, o.formatOptions);
51
+ return formatter.format(v);
52
+ }
53
+ return v.toString();
54
+ }
55
+ return undefined;
56
+ }
57
+ /** @internal */
58
+ function formatFieldValue(value, options) {
59
+ const formatter = formatters[value.type];
60
+ return formatter ? formatter(value.value, options) : undefined;
61
+ }
62
+ /** @internal */
63
+ function isKnownFieldPropertyType(type) {
64
+ return type in formatters;
65
+ }
66
+ //# sourceMappingURL=FieldFormatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldFormatter.js","sourceRoot":"","sources":["../../../../src/internal/annotations/FieldFormatter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;AA+E/F,4CAGC;AAGD,4DAEC;AAnED,MAAM,UAAU,GAAmD;IACjE,gEAAgE;IAChE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAEjD,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;IAErE,gEAAgE;IAChE,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACnD,gEAAgE;IAChE,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACrD,gEAAgE;IACh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AI,OAAO,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBACpG,OAAO,SAAS,CAAC;YACnB,CAAC;YAED,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC;YACnE,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;IACtB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,gBAAgB;AAChB,SAAgB,gBAAgB,CAAC,KAAiB,EAAE,OAAuC;IACzF,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACjE,CAAC;AAED,gBAAgB;AAChB,SAAgB,wBAAwB,CAAC,IAAY;IACnD,OAAO,IAAI,IAAI,UAAU,CAAC;AAC5B,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\nimport { XAndY, XYAndZ } from \"@itwin/core-geometry\";\nimport { DateTimeFieldFormatOptions, FieldFormatOptions, FieldPropertyType } from \"../../annotation/TextField\";\n\n/** A FieldPropertyPath must ultimately resolve to one of these primitive types.\n * @internal\n */\nexport type FieldPrimitiveValue = boolean | number | string | Date | XAndY | XYAndZ | Uint8Array;\n\n/** Resolved value of a field.\n * @internal\n */\nexport interface FieldValue {\n value: FieldPrimitiveValue;\n type: FieldPropertyType;\n}\n\ntype FieldFormatter = (value: FieldPrimitiveValue, options: FieldFormatOptions | undefined) => string | undefined;\n\nconst formatters: { [type: string]: FieldFormatter | undefined } = {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n \"string\": (v, o) => formatString(v.toString(), o),\n\n \"datetime\": (v, o) => formatString(formatDateTime(v, o?.dateTime), o),\n\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n \"quantity\": (v, o) => formatString(v.toString(), o),\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n \"coordinate\": (v, o) => formatString(v.toString(), o),\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n \"boolean\": (v, o) => formatString(v.toString(), o),\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n \"int-enum\": (v, o) => formatString(v.toString(), o),\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n \"string-enum\": (v, o) => formatString(v.toString(), o),\n};\n\nfunction formatString(s: string | undefined, o?: FieldFormatOptions): string | undefined {\n if (undefined === s || !o) {\n return s;\n }\n\n switch (o.case) {\n case \"upper\":\n s = s.toUpperCase();\n break;\n case \"lower\":\n s = s.toLowerCase();\n break;\n }\n\n if (o.prefix || o.suffix) {\n s = `${o.prefix ?? \"\"}${s}${o.suffix ?? \"\"}`;\n }\n\n return s;\n}\n\nfunction formatDateTime(v: FieldPrimitiveValue, o?: DateTimeFieldFormatOptions): string | undefined {\n if (!(v instanceof Date))\n return undefined;\n\n if (!isNaN(v.getTime())) {\n if (o?.formatOptions) {\n const locale = o.locale ?? \"en-US\";\n if (!Intl.DateTimeFormat.supportedLocalesOf([locale], { localeMatcher: \"lookup\" }).includes(locale)) {\n return undefined;\n }\n\n const formatter = new Intl.DateTimeFormat(locale, o.formatOptions);\n return formatter.format(v);\n }\n return v.toString();\n }\n return undefined;\n}\n\n/** @internal */\nexport function formatFieldValue(value: FieldValue, options: FieldFormatOptions | undefined): string | undefined {\n const formatter = formatters[value.type];\n return formatter ? formatter(value.value, options) : undefined;\n}\n\n/** @internal */\nexport function isKnownFieldPropertyType(type: string): type is FieldPropertyType {\n return type in formatters;\n}\n\n"]}
@@ -4,4 +4,5 @@ export { MultiModelPackedFeatureTable, PackedFeatureModelTable, PackedFeatureTab
4
4
  export type { BackendReadable, BackendWritable, BackendBuffer } from "./BackendTypes";
5
5
  export { RenderMaterialParams } from "./RenderMaterialParams";
6
6
  export { RenderTextureParams } from "./RenderTextureParams";
7
+ export { type FieldPrimitiveValue, type FieldValue, formatFieldValue, isKnownFieldPropertyType } from "./annotations/FieldFormatter";
7
8
  //# sourceMappingURL=cross-package.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cross-package.d.ts","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EACL,KAAK,uBAAuB,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EACvI,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,4BAA4B,EAAE,uBAAuB,EAAE,kBAAkB,EAC1E,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"cross-package.d.ts","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EACL,KAAK,uBAAuB,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EACvI,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,4BAA4B,EAAE,uBAAuB,EAAE,kBAAkB,EAC1E,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,UAAU,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * See LICENSE.md in the project root for license terms and full copyright notice.
5
5
  *--------------------------------------------------------------------------------------------*/
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.RenderTextureParams = exports.RenderMaterialParams = exports.PackedFeatureTable = exports.PackedFeatureModelTable = exports.MultiModelPackedFeatureTable = exports.SilhouetteEdgeArgs = exports.PolylineEdgeArgs = exports.MeshPolyline = exports.MeshEdges = exports.MeshEdge = exports.EdgeArgs = void 0;
7
+ exports.isKnownFieldPropertyType = exports.formatFieldValue = exports.RenderTextureParams = exports.RenderMaterialParams = exports.PackedFeatureTable = exports.PackedFeatureModelTable = exports.MultiModelPackedFeatureTable = exports.SilhouetteEdgeArgs = exports.PolylineEdgeArgs = exports.MeshPolyline = exports.MeshEdges = exports.MeshEdge = exports.EdgeArgs = void 0;
8
8
  var RenderMesh_1 = require("./RenderMesh");
9
9
  Object.defineProperty(exports, "EdgeArgs", { enumerable: true, get: function () { return RenderMesh_1.EdgeArgs; } });
10
10
  Object.defineProperty(exports, "MeshEdge", { enumerable: true, get: function () { return RenderMesh_1.MeshEdge; } });
@@ -20,4 +20,7 @@ var RenderMaterialParams_1 = require("./RenderMaterialParams");
20
20
  Object.defineProperty(exports, "RenderMaterialParams", { enumerable: true, get: function () { return RenderMaterialParams_1.RenderMaterialParams; } });
21
21
  var RenderTextureParams_1 = require("./RenderTextureParams");
22
22
  Object.defineProperty(exports, "RenderTextureParams", { enumerable: true, get: function () { return RenderTextureParams_1.RenderTextureParams; } });
23
+ var FieldFormatter_1 = require("./annotations/FieldFormatter");
24
+ Object.defineProperty(exports, "formatFieldValue", { enumerable: true, get: function () { return FieldFormatter_1.formatFieldValue; } });
25
+ Object.defineProperty(exports, "isKnownFieldPropertyType", { enumerable: true, get: function () { return FieldFormatter_1.isKnownFieldPropertyType; } });
23
26
  //# sourceMappingURL=cross-package.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cross-package.js","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAG/F,2CAEsB;AADU,sGAAA,QAAQ,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAAE,uGAAA,SAAS,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAyB,8GAAA,gBAAgB,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAExI,2DAE8B;AAD5B,kIAAA,4BAA4B,OAAA;AAAE,6HAAA,uBAAuB,OAAA;AAAE,wHAAA,kBAAkB,OAAA;AAG3E,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA","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\nexport type { DecorationGeometryProps, SnapRequestProps, SnapResponseProps } from \"./Snapping\";\nexport {\n type EdgeAppearanceOverrides, EdgeArgs, MeshEdge, MeshEdges, MeshPolyline, type MeshPolylineList, PolylineEdgeArgs, SilhouetteEdgeArgs\n} from \"./RenderMesh\";\nexport {\n MultiModelPackedFeatureTable, PackedFeatureModelTable, PackedFeatureTable\n} from \"./PackedFeatureTable\";\nexport type { BackendReadable, BackendWritable, BackendBuffer } from \"./BackendTypes\";\nexport { RenderMaterialParams } from \"./RenderMaterialParams\";\nexport { RenderTextureParams } from \"./RenderTextureParams\";\n"]}
1
+ {"version":3,"file":"cross-package.js","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAG/F,2CAEsB;AADU,sGAAA,QAAQ,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAAE,uGAAA,SAAS,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAyB,8GAAA,gBAAgB,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAExI,2DAE8B;AAD5B,kIAAA,4BAA4B,OAAA;AAAE,6HAAA,uBAAuB,OAAA;AAAE,wHAAA,kBAAkB,OAAA;AAG3E,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,+DAAqI;AAAjF,kHAAA,gBAAgB,OAAA;AAAE,0HAAA,wBAAwB,OAAA","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\nexport type { DecorationGeometryProps, SnapRequestProps, SnapResponseProps } from \"./Snapping\";\nexport {\n type EdgeAppearanceOverrides, EdgeArgs, MeshEdge, MeshEdges, MeshPolyline, type MeshPolylineList, PolylineEdgeArgs, SilhouetteEdgeArgs\n} from \"./RenderMesh\";\nexport {\n MultiModelPackedFeatureTable, PackedFeatureModelTable, PackedFeatureTable\n} from \"./PackedFeatureTable\";\nexport type { BackendReadable, BackendWritable, BackendBuffer } from \"./BackendTypes\";\nexport { RenderMaterialParams } from \"./RenderMaterialParams\";\nexport { RenderTextureParams } from \"./RenderTextureParams\";\nexport { type FieldPrimitiveValue, type FieldValue, formatFieldValue, isKnownFieldPropertyType } from \"./annotations/FieldFormatter\";\n"]}
@@ -134,6 +134,8 @@ export interface RequestNewBriefcaseProps {
134
134
  briefcaseId?: BriefcaseId;
135
135
  /** Id of the change set of the new briefcase. If undefined, use latest. */
136
136
  asOf?: IModelVersionProps;
137
+ /** A string to represent the device that holds the briefcase. */
138
+ deviceName?: string;
137
139
  }
138
140
  /**
139
141
  * Arguments to open a Checkpoint directly from its cloud container
@@ -1 +1 @@
1
- {"version":3,"file":"BriefcaseTypes.d.ts","sourceRoot":"","sources":["../../src/BriefcaseTypes.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,+CAA+C;IAC/C,OAAO,aAAa;IAEpB,gDAAgD;IAChD,GAAG,WAAU;IAEb,gFAAgF;IAChF,UAAU,IAAI;IAEd,+EAA+E;IAC/E,SAAS,WAA4B;IAErC;;;;;;;;;;OAUG;IACH,UAAU,IAAI;CACf;AAED;;;GAGG;AACH,oBAAY,QAAQ;IAClB,mIAAmI;IACnI,YAAY,IAAI;IAChB,0FAA0F;IAC1F,WAAW,IAAI;IACf,qJAAqJ;IACrJ,QAAQ,IAAI;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,8BAA8B;IAC9B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,uBAAuB;IACvB,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAE9B,mCAAmC;IACnC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;CACnC;AAED;;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AAC,EAPW,QAAQ,KAAR,QAAQ,QAOnB;AAwID;;GAEG;AACH,MAAM,CAAN,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,qJAAqJ;IACrJ,mFAAyB,CAAA;IAEzB,iKAAiK;IACjK,yFAA4B,CAAA;IAE5B,sMAAsM;IACtM,uDAAW,CAAA;IAEX,qFAAqF;IACrF,2DAAa,CAAA;AACf,CAAC,EAZW,aAAa,KAAb,aAAa,QAYxB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,0GAA0G;IAC1G,mDAAQ,CAAA;IAER,qDAAqD;IACrD,yDAAW,CAAA;AACb,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAgBD;;;;GAIG;AACH,MAAM,CAAN,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,sIAAsI;IACtI,qDAAQ,CAAA;IAER;;;OAGG;IACH,mEAAe,CAAA;IAEf,4IAA4I;IAC5I,yEAAkB,CAAA;IAElB,oIAAoI;IACpI,iDAAM,CAAA;IAEN,4FAA4F;IAC5F,iDAAM,CAAA;AACR,CAAC,EAlBW,WAAW,KAAX,WAAW,QAkBtB","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 iModels\n */\n\nimport { GuidString } from \"@itwin/core-bentley\";\nimport { ChangesetIdWithIndex, ChangesetIndexOrId, LocalFileName } from \"./ChangesetProps\";\nimport { OpenDbKey } from \"./IModel\";\nimport { IModelVersionProps } from \"./IModelVersion\";\n\n/** The Id assigned to a briefcase by iModelHub, or [[BriefcaseIdValue.Unassigned]] .\n * @public\n * @extensions\n */\nexport type BriefcaseId = number;\n\n/** Values of [[BriefcaseId]] that have special meaning.\n * @public\n * @extensions\n */\nexport enum BriefcaseIdValue {\n /** Indicates an invalid/illegal BriefcaseId */\n Illegal = 0xffffffff,\n\n /** BriefcaseIds must be less than this value */\n Max = 1 << 24,\n\n /** All valid iModelHub issued BriefcaseIds will be equal or higher than this */\n FirstValid = 2,\n\n /** All valid iModelHub issued BriefcaseIds will be equal or lower than this */\n LastValid = BriefcaseIdValue.Max - 11,\n\n /**\n * The briefcase has not been assigned a unique Id by iModelHub. Only briefcases that have been assigned a unique BriefcaseId may create changesets,\n * because BriefcaseId is used to create unique ElementIds for new elements.\n *\n * The `Unassigned` briefcaseId is used for several purposes:\n * - **Snapshots**. Snapshot files are immutable copies of an iModel for archival or data exchange purposes. They can neither generate nor accept new changesets.\n * - **Checkpoints**. Checkpoints are Snapshots that represent a specific version on an iModel's timeline.\n * - **PullOnly**. A local briefcase file that may be used to \"slide\" along a timeline by applying incoming changesets.\n * They are always opened readonly except to apply changesets.\n * - **Standalone**. Standalone iModels are local files that are not connected to iModelHub, and therefore cannot accept or create changesets.\n */\n Unassigned = 0,\n}\n\n/** Whether a briefcase is editable or may only accept incoming changesets from iModelHub\n * @public\n * @extensions\n */\nexport enum SyncMode {\n /** Use a fixed version (i.e. a checkpoint). See [CheckpointManager]($backend) for preferred approach to using checkpoint files. */\n FixedVersion = 1,\n /** A briefcase that can be edited. A unique briefcaseId must be assigned by iModelHub. */\n PullAndPush = 2,\n /** use [BriefcaseIdValue.Unassigned](%backend). This makes a briefcase that can accept changesets from iModelHub but can never create changesets. */\n PullOnly = 3,\n}\n\n/**\n * Options to open a previously downloaded briefcase\n * @public\n */\nexport interface OpenBriefcaseOptions {\n /** open briefcase Readonly */\n readonly openAsReadOnly?: boolean;\n}\n\n/**\n * Properties that specify a briefcase within the local briefcase cache.\n * @see BriefcaseManager.getFileName\n * @public\n */\nexport interface BriefcaseProps {\n /** Id of the iModel */\n readonly iModelId: GuidString;\n\n /** BriefcaseId of the briefcase */\n readonly briefcaseId: BriefcaseId;\n}\n\n/** Properties for opening a local briefcase file via [BriefcaseDb.open]($backend)\n * @public\n */\nexport interface OpenBriefcaseProps extends OpenDbKey {\n /** the full path to the briefcase file */\n readonly fileName: LocalFileName;\n /**\n * If true, open the briefcase readonly.\n * @note Readonly connections always hold a read transaction against the briefcase. That can cause the WAL file size to grow\n * unbounded if changes happen while they're open (see [Checkpoint starvation](https://www.sqlite.org/wal.html#avoiding_excessively_large_wal_files))\n * It is a good idea to close the readonly connection *before* closing the writeable connection so the WAL file will be deleted.\n */\n readonly readonly?: boolean;\n /** If true, open the briefcase readonly and monitor it for changes originating from another connection.\n * When such changes are detected, the default txn will be restarted.\n * The restart occurs only after the next iteration of the backend event loop, and will generate events that reflect the changes from the other connection.\n * This can be useful in contexts where the read-only connection is displaying a view of the contents of the briefcase while another, non-interactive program\n * is adding txns to the briefcase. It may not be reliable if the writable connection is undoing or redoing txns.\n * @note This cannot be used with cloud-based briefcases.\n */\n readonly watchForChanges?: boolean;\n}\n\n/** Properties of a local briefcase file, returned by [BriefcaseManager.getCachedBriefcases]($backend) and [BriefcaseManager.downloadBriefcase]($backend)\n * @public\n * @extensions\n */\nexport interface LocalBriefcaseProps {\n /** Full path of local file. */\n readonly fileName: LocalFileName;\n\n /** The iTwin containing the iModel. */\n readonly iTwinId: GuidString;\n\n /** The iModelId. */\n readonly iModelId: GuidString;\n\n /** The briefcaseId. */\n readonly briefcaseId: BriefcaseId;\n\n /** The current changesetId.\n * @note ChangeSet Ids are string hash values based on the ChangeSet's content and parent.\n */\n readonly changeset: ChangesetIdWithIndex;\n\n /** Size of the briefcase file in bytes */\n readonly fileSize: number;\n}\n\n/** Properties for downloading a briefcase to a local file, from iModelHub.\n * @public\n * @extensions\n */\nexport interface RequestNewBriefcaseProps {\n /** iTwin that the iModel belongs to. */\n readonly iTwinId: GuidString;\n\n /** The iModelId for the new briefcase. */\n readonly iModelId: GuidString;\n\n /** Full path of local file to store the briefcase. If undefined, a file will be created in the briefcase cache, and this member will be filled with the full path to the file.\n * Callers can use this to open the briefcase after the download completes.\n * @note this member is both an input and an output.\n */\n readonly fileName?: LocalFileName;\n\n /**\n * The BriefcaseId for the new briefcase. If undefined, a new BriefcaseId will be acquired from iModelHub before the download, and is returned in this member.\n * @note To download a briefcase that can accept but not create new changesets (sometimes referred to as \"pull only\" briefcases), set this value to [[BriefcaseIdValue.Unassigned]].\n * After downloading, you can merely delete unassigned briefcase files when they are no longer needed. Assigned BriefcaseIds should be released (via [BriefcaseManager.releaseBriefcase]($backend) )\n * when you are done with them.\n * @note this member is both an input and an output.\n *\n */\n briefcaseId?: BriefcaseId;\n\n /** Id of the change set of the new briefcase. If undefined, use latest. */\n asOf?: IModelVersionProps;\n}\n\n/**\n * Arguments to open a Checkpoint directly from its cloud container\n * @beta\n */\nexport interface OpenCheckpointArgs {\n readonly iTwinId: GuidString;\n\n /** Id of the iModel */\n readonly iModelId: GuidString;\n\n /** changeset for the checkpoint. If undefined, attempt to open the checkpoint for the latest changeset. */\n readonly changeset?: ChangesetIndexOrId;\n}\n\n/**\n * Manages the download of a briefcase\n * @public\n */\nexport interface BriefcaseDownloader {\n /** Id of the briefcase being downloaded */\n readonly briefcaseId: BriefcaseId;\n\n /** the name of the local file for the briefcase */\n readonly fileName: LocalFileName;\n\n /** Promise that resolves when the download completes. await this to complete the download */\n readonly downloadPromise: Promise<void>;\n\n /** Request cancellation of the download */\n readonly requestCancel: () => Promise<boolean>;\n}\n\n/** Option to control the validation and upgrade of domain schemas in the Db\n * @beta\n */\nexport enum DomainOptions {\n /** Domain schemas will be validated for any required upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\n CheckRequiredUpgrades = 0,\n\n /** Domain schemas will be validated for any required or optional upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\n CheckRecommendedUpgrades = 1,\n\n /** Domain schemas will be upgraded if necessary. However, only compatible schema upgrades will be allowed - these are typically additions of classes, properties, and changes to custom attributes */\n Upgrade = 2,\n\n /** Domain schemas will neither be validated nor be upgraded. Used only internally */\n SkipCheck = 3,\n}\n\n/** Options that control whether a profile upgrade should be performed when opening a Db\n * @beta\n */\nexport enum ProfileOptions {\n /** No profile upgrade will be performed. If a profile upgrade was required, opening the file will fail */\n None = 0,\n\n /** Profile upgrade will be performed if necessary */\n Upgrade = 1,\n}\n\n/** Arguments to validate and update the profile and domain schemas when opening a Db\n * @beta\n */\nexport interface UpgradeOptions {\n /** Option to control the validation and upgrade of domain schemas in the Db */\n readonly domain?: DomainOptions;\n\n /** Options that control whether a profile upgrade should be performed when opening a file */\n readonly profile?: ProfileOptions;\n\n /** Options that will allow data transform during Profile/Domain schema upgrade */\n readonly schemaLockHeld?: boolean;\n}\n\n/**\n * The state of the schemas in the Db compared with what the current version of the software expects\n * Note: The state may vary depending on whether the Db is to be opened ReadOnly or ReadWrite.\n * @public\n */\nexport enum SchemaState {\n /** The schemas in the Db are up-to-date, and do not need to be upgraded before opening it with the current version of the software */\n UpToDate,\n\n /** It's required that the schemas in the Db be upgraded before it can be opened with the current version of the software.\n * This may happen in read-write scenarios where the application requires a newer version of the schemas to be in place before\n * it can write data based on that new schema.\n */\n UpgradeRequired,\n\n /** It's recommended, but not necessary that the schemas in the Db be upgraded before opening it with the current version of the software */\n UpgradeRecommended,\n\n /** The schemas in the Db are too old to be opened by the current version of the software. Upgrade using the API is not possible. */\n TooOld,\n\n /** The schemas in the Db are too new to be opened by the current version of the software */\n TooNew,\n}\n"]}
1
+ {"version":3,"file":"BriefcaseTypes.js","sourceRoot":"","sources":["../../src/BriefcaseTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAyBX;AAzBD,WAAY,gBAAgB;IAC1B,+CAA+C;IAC/C,sEAAoB,CAAA;IAEpB,gDAAgD;IAChD,4DAAa,CAAA;IAEb,gFAAgF;IAChF,mEAAc,CAAA;IAEd,+EAA+E;IAC/E,wEAAqC,CAAA;IAErC;;;;;;;;;;OAUG;IACH,mEAAc,CAAA;AAChB,CAAC,EAzBW,gBAAgB,KAAhB,gBAAgB,QAyB3B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,mIAAmI;IACnI,uDAAgB,CAAA;IAChB,0FAA0F;IAC1F,qDAAe,CAAA;IACf,qJAAqJ;IACrJ,+CAAY,CAAA;AACd,CAAC,EAPW,QAAQ,KAAR,QAAQ,QAOnB;AA2ID;;GAEG;AACH,MAAM,CAAN,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,qJAAqJ;IACrJ,mFAAyB,CAAA;IAEzB,iKAAiK;IACjK,yFAA4B,CAAA;IAE5B,sMAAsM;IACtM,uDAAW,CAAA;IAEX,qFAAqF;IACrF,2DAAa,CAAA;AACf,CAAC,EAZW,aAAa,KAAb,aAAa,QAYxB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,0GAA0G;IAC1G,mDAAQ,CAAA;IAER,qDAAqD;IACrD,yDAAW,CAAA;AACb,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAgBD;;;;GAIG;AACH,MAAM,CAAN,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,sIAAsI;IACtI,qDAAQ,CAAA;IAER;;;OAGG;IACH,mEAAe,CAAA;IAEf,4IAA4I;IAC5I,yEAAkB,CAAA;IAElB,oIAAoI;IACpI,iDAAM,CAAA;IAEN,4FAA4F;IAC5F,iDAAM,CAAA;AACR,CAAC,EAlBW,WAAW,KAAX,WAAW,QAkBtB","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 iModels\n */\n\nimport { GuidString } from \"@itwin/core-bentley\";\nimport { ChangesetIdWithIndex, ChangesetIndexOrId, LocalFileName } from \"./ChangesetProps\";\nimport { OpenDbKey } from \"./IModel\";\nimport { IModelVersionProps } from \"./IModelVersion\";\n\n/** The Id assigned to a briefcase by iModelHub, or [[BriefcaseIdValue.Unassigned]] .\n * @public\n * @extensions\n */\nexport type BriefcaseId = number;\n\n/** Values of [[BriefcaseId]] that have special meaning.\n * @public\n * @extensions\n */\nexport enum BriefcaseIdValue {\n /** Indicates an invalid/illegal BriefcaseId */\n Illegal = 0xffffffff,\n\n /** BriefcaseIds must be less than this value */\n Max = 1 << 24,\n\n /** All valid iModelHub issued BriefcaseIds will be equal or higher than this */\n FirstValid = 2,\n\n /** All valid iModelHub issued BriefcaseIds will be equal or lower than this */\n LastValid = BriefcaseIdValue.Max - 11,\n\n /**\n * The briefcase has not been assigned a unique Id by iModelHub. Only briefcases that have been assigned a unique BriefcaseId may create changesets,\n * because BriefcaseId is used to create unique ElementIds for new elements.\n *\n * The `Unassigned` briefcaseId is used for several purposes:\n * - **Snapshots**. Snapshot files are immutable copies of an iModel for archival or data exchange purposes. They can neither generate nor accept new changesets.\n * - **Checkpoints**. Checkpoints are Snapshots that represent a specific version on an iModel's timeline.\n * - **PullOnly**. A local briefcase file that may be used to \"slide\" along a timeline by applying incoming changesets.\n * They are always opened readonly except to apply changesets.\n * - **Standalone**. Standalone iModels are local files that are not connected to iModelHub, and therefore cannot accept or create changesets.\n */\n Unassigned = 0,\n}\n\n/** Whether a briefcase is editable or may only accept incoming changesets from iModelHub\n * @public\n * @extensions\n */\nexport enum SyncMode {\n /** Use a fixed version (i.e. a checkpoint). See [CheckpointManager]($backend) for preferred approach to using checkpoint files. */\n FixedVersion = 1,\n /** A briefcase that can be edited. A unique briefcaseId must be assigned by iModelHub. */\n PullAndPush = 2,\n /** use [BriefcaseIdValue.Unassigned](%backend). This makes a briefcase that can accept changesets from iModelHub but can never create changesets. */\n PullOnly = 3,\n}\n\n/**\n * Options to open a previously downloaded briefcase\n * @public\n */\nexport interface OpenBriefcaseOptions {\n /** open briefcase Readonly */\n readonly openAsReadOnly?: boolean;\n}\n\n/**\n * Properties that specify a briefcase within the local briefcase cache.\n * @see BriefcaseManager.getFileName\n * @public\n */\nexport interface BriefcaseProps {\n /** Id of the iModel */\n readonly iModelId: GuidString;\n\n /** BriefcaseId of the briefcase */\n readonly briefcaseId: BriefcaseId;\n}\n\n/** Properties for opening a local briefcase file via [BriefcaseDb.open]($backend)\n * @public\n */\nexport interface OpenBriefcaseProps extends OpenDbKey {\n /** the full path to the briefcase file */\n readonly fileName: LocalFileName;\n /**\n * If true, open the briefcase readonly.\n * @note Readonly connections always hold a read transaction against the briefcase. That can cause the WAL file size to grow\n * unbounded if changes happen while they're open (see [Checkpoint starvation](https://www.sqlite.org/wal.html#avoiding_excessively_large_wal_files))\n * It is a good idea to close the readonly connection *before* closing the writeable connection so the WAL file will be deleted.\n */\n readonly readonly?: boolean;\n /** If true, open the briefcase readonly and monitor it for changes originating from another connection.\n * When such changes are detected, the default txn will be restarted.\n * The restart occurs only after the next iteration of the backend event loop, and will generate events that reflect the changes from the other connection.\n * This can be useful in contexts where the read-only connection is displaying a view of the contents of the briefcase while another, non-interactive program\n * is adding txns to the briefcase. It may not be reliable if the writable connection is undoing or redoing txns.\n * @note This cannot be used with cloud-based briefcases.\n */\n readonly watchForChanges?: boolean;\n}\n\n/** Properties of a local briefcase file, returned by [BriefcaseManager.getCachedBriefcases]($backend) and [BriefcaseManager.downloadBriefcase]($backend)\n * @public\n * @extensions\n */\nexport interface LocalBriefcaseProps {\n /** Full path of local file. */\n readonly fileName: LocalFileName;\n\n /** The iTwin containing the iModel. */\n readonly iTwinId: GuidString;\n\n /** The iModelId. */\n readonly iModelId: GuidString;\n\n /** The briefcaseId. */\n readonly briefcaseId: BriefcaseId;\n\n /** The current changesetId.\n * @note ChangeSet Ids are string hash values based on the ChangeSet's content and parent.\n */\n readonly changeset: ChangesetIdWithIndex;\n\n /** Size of the briefcase file in bytes */\n readonly fileSize: number;\n}\n\n/** Properties for downloading a briefcase to a local file, from iModelHub.\n * @public\n * @extensions\n */\nexport interface RequestNewBriefcaseProps {\n /** iTwin that the iModel belongs to. */\n readonly iTwinId: GuidString;\n\n /** The iModelId for the new briefcase. */\n readonly iModelId: GuidString;\n\n /** Full path of local file to store the briefcase. If undefined, a file will be created in the briefcase cache, and this member will be filled with the full path to the file.\n * Callers can use this to open the briefcase after the download completes.\n * @note this member is both an input and an output.\n */\n readonly fileName?: LocalFileName;\n\n /**\n * The BriefcaseId for the new briefcase. If undefined, a new BriefcaseId will be acquired from iModelHub before the download, and is returned in this member.\n * @note To download a briefcase that can accept but not create new changesets (sometimes referred to as \"pull only\" briefcases), set this value to [[BriefcaseIdValue.Unassigned]].\n * After downloading, you can merely delete unassigned briefcase files when they are no longer needed. Assigned BriefcaseIds should be released (via [BriefcaseManager.releaseBriefcase]($backend) )\n * when you are done with them.\n * @note this member is both an input and an output.\n *\n */\n briefcaseId?: BriefcaseId;\n\n /** Id of the change set of the new briefcase. If undefined, use latest. */\n asOf?: IModelVersionProps;\n\n /** A string to represent the device that holds the briefcase. */\n deviceName?: string;\n}\n\n/**\n * Arguments to open a Checkpoint directly from its cloud container\n * @beta\n */\nexport interface OpenCheckpointArgs {\n readonly iTwinId: GuidString;\n\n /** Id of the iModel */\n readonly iModelId: GuidString;\n\n /** changeset for the checkpoint. If undefined, attempt to open the checkpoint for the latest changeset. */\n readonly changeset?: ChangesetIndexOrId;\n}\n\n/**\n * Manages the download of a briefcase\n * @public\n */\nexport interface BriefcaseDownloader {\n /** Id of the briefcase being downloaded */\n readonly briefcaseId: BriefcaseId;\n\n /** the name of the local file for the briefcase */\n readonly fileName: LocalFileName;\n\n /** Promise that resolves when the download completes. await this to complete the download */\n readonly downloadPromise: Promise<void>;\n\n /** Request cancellation of the download */\n readonly requestCancel: () => Promise<boolean>;\n}\n\n/** Option to control the validation and upgrade of domain schemas in the Db\n * @beta\n */\nexport enum DomainOptions {\n /** Domain schemas will be validated for any required upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\n CheckRequiredUpgrades = 0,\n\n /** Domain schemas will be validated for any required or optional upgrades. Any errors will be reported back, and cause the application to fail opening the Db */\n CheckRecommendedUpgrades = 1,\n\n /** Domain schemas will be upgraded if necessary. However, only compatible schema upgrades will be allowed - these are typically additions of classes, properties, and changes to custom attributes */\n Upgrade = 2,\n\n /** Domain schemas will neither be validated nor be upgraded. Used only internally */\n SkipCheck = 3,\n}\n\n/** Options that control whether a profile upgrade should be performed when opening a Db\n * @beta\n */\nexport enum ProfileOptions {\n /** No profile upgrade will be performed. If a profile upgrade was required, opening the file will fail */\n None = 0,\n\n /** Profile upgrade will be performed if necessary */\n Upgrade = 1,\n}\n\n/** Arguments to validate and update the profile and domain schemas when opening a Db\n * @beta\n */\nexport interface UpgradeOptions {\n /** Option to control the validation and upgrade of domain schemas in the Db */\n readonly domain?: DomainOptions;\n\n /** Options that control whether a profile upgrade should be performed when opening a file */\n readonly profile?: ProfileOptions;\n\n /** Options that will allow data transform during Profile/Domain schema upgrade */\n readonly schemaLockHeld?: boolean;\n}\n\n/**\n * The state of the schemas in the Db compared with what the current version of the software expects\n * Note: The state may vary depending on whether the Db is to be opened ReadOnly or ReadWrite.\n * @public\n */\nexport enum SchemaState {\n /** The schemas in the Db are up-to-date, and do not need to be upgraded before opening it with the current version of the software */\n UpToDate,\n\n /** It's required that the schemas in the Db be upgraded before it can be opened with the current version of the software.\n * This may happen in read-write scenarios where the application requires a newer version of the schemas to be in place before\n * it can write data based on that new schema.\n */\n UpgradeRequired,\n\n /** It's recommended, but not necessary that the schemas in the Db be upgraded before opening it with the current version of the software */\n UpgradeRecommended,\n\n /** The schemas in the Db are too old to be opened by the current version of the software. Upgrade using the API is not possible. */\n TooOld,\n\n /** The schemas in the Db are too new to be opened by the current version of the software */\n TooNew,\n}\n"]}