@itwin/core-backend 5.1.0-dev.4 → 5.1.0-dev.41

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 (284) hide show
  1. package/CHANGELOG.md +109 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +1 -1
  3. package/lib/cjs/BackendHubAccess.js +1 -1
  4. package/lib/cjs/BackendHubAccess.js.map +1 -1
  5. package/lib/cjs/BisCoreSchema.js +1 -1
  6. package/lib/cjs/BisCoreSchema.js.map +1 -1
  7. package/lib/cjs/BriefcaseManager.d.ts +10 -2
  8. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  9. package/lib/cjs/BriefcaseManager.js +12 -0
  10. package/lib/cjs/BriefcaseManager.js.map +1 -1
  11. package/lib/cjs/Category.d.ts +4 -4
  12. package/lib/cjs/Category.js +4 -4
  13. package/lib/cjs/Category.js.map +1 -1
  14. package/lib/cjs/ChangesetECAdaptor.d.ts +67 -8
  15. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  16. package/lib/cjs/ChangesetECAdaptor.js +248 -33
  17. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  18. package/lib/cjs/ClassRegistry.d.ts +1 -1
  19. package/lib/cjs/ClassRegistry.js +1 -1
  20. package/lib/cjs/ClassRegistry.js.map +1 -1
  21. package/lib/cjs/CloudSqlite.js +1 -1
  22. package/lib/cjs/CloudSqlite.js.map +1 -1
  23. package/lib/cjs/CodeSpecs.d.ts +1 -1
  24. package/lib/cjs/CodeSpecs.js +1 -1
  25. package/lib/cjs/CodeSpecs.js.map +1 -1
  26. package/lib/cjs/DisplayStyle.d.ts +4 -4
  27. package/lib/cjs/DisplayStyle.js +3 -3
  28. package/lib/cjs/DisplayStyle.js.map +1 -1
  29. package/lib/cjs/ECDb.d.ts +4 -4
  30. package/lib/cjs/ECDb.d.ts.map +1 -1
  31. package/lib/cjs/ECDb.js +4 -4
  32. package/lib/cjs/ECDb.js.map +1 -1
  33. package/lib/cjs/ECSqlStatement.d.ts +15 -6
  34. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  35. package/lib/cjs/ECSqlStatement.js +18 -4
  36. package/lib/cjs/ECSqlStatement.js.map +1 -1
  37. package/lib/cjs/Element.d.ts +51 -51
  38. package/lib/cjs/Element.js +51 -51
  39. package/lib/cjs/Element.js.map +1 -1
  40. package/lib/cjs/ElementAspect.d.ts +8 -8
  41. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  42. package/lib/cjs/ElementAspect.js +8 -8
  43. package/lib/cjs/ElementAspect.js.map +1 -1
  44. package/lib/cjs/Entity.d.ts +3 -3
  45. package/lib/cjs/Entity.js +2 -2
  46. package/lib/cjs/Entity.js.map +1 -1
  47. package/lib/cjs/ExportGraphics.d.ts +54 -8
  48. package/lib/cjs/ExportGraphics.d.ts.map +1 -1
  49. package/lib/cjs/ExportGraphics.js +158 -59
  50. package/lib/cjs/ExportGraphics.js.map +1 -1
  51. package/lib/cjs/GeographicCRSServices.d.ts +6 -2
  52. package/lib/cjs/GeographicCRSServices.d.ts.map +1 -1
  53. package/lib/cjs/GeographicCRSServices.js +1 -1
  54. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  55. package/lib/cjs/IModelDb.d.ts +23 -21
  56. package/lib/cjs/IModelDb.d.ts.map +1 -1
  57. package/lib/cjs/IModelDb.js +57 -31
  58. package/lib/cjs/IModelDb.js.map +1 -1
  59. package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
  60. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  61. package/lib/cjs/IModelElementCloneContext.js +1 -1
  62. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  63. package/lib/cjs/IModelHost.d.ts +2 -2
  64. package/lib/cjs/IModelHost.js +2 -2
  65. package/lib/cjs/IModelHost.js.map +1 -1
  66. package/lib/cjs/Material.d.ts +1 -1
  67. package/lib/cjs/Material.js +1 -1
  68. package/lib/cjs/Material.js.map +1 -1
  69. package/lib/cjs/Model.d.ts +22 -22
  70. package/lib/cjs/Model.js +22 -22
  71. package/lib/cjs/Model.js.map +1 -1
  72. package/lib/cjs/SQLiteDb.d.ts +1 -1
  73. package/lib/cjs/SQLiteDb.js +1 -1
  74. package/lib/cjs/SQLiteDb.js.map +1 -1
  75. package/lib/cjs/SqliteStatement.d.ts +1 -1
  76. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  77. package/lib/cjs/SqliteStatement.js +1 -1
  78. package/lib/cjs/SqliteStatement.js.map +1 -1
  79. package/lib/cjs/Texture.d.ts +1 -1
  80. package/lib/cjs/Texture.js +1 -1
  81. package/lib/cjs/Texture.js.map +1 -1
  82. package/lib/cjs/TxnManager.d.ts +4 -4
  83. package/lib/cjs/TxnManager.js +1 -1
  84. package/lib/cjs/TxnManager.js.map +1 -1
  85. package/lib/cjs/ViewDefinition.d.ts +40 -14
  86. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  87. package/lib/cjs/ViewDefinition.js +42 -14
  88. package/lib/cjs/ViewDefinition.js.map +1 -1
  89. package/lib/cjs/annotations/FrameGeometry.d.ts +52 -0
  90. package/lib/cjs/annotations/FrameGeometry.d.ts.map +1 -0
  91. package/lib/cjs/annotations/FrameGeometry.js +250 -0
  92. package/lib/cjs/annotations/FrameGeometry.js.map +1 -0
  93. package/lib/cjs/{TextAnnotationElement.d.ts → annotations/TextAnnotationElement.d.ts} +6 -11
  94. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -0
  95. package/lib/cjs/{TextAnnotationElement.js → annotations/TextAnnotationElement.js} +20 -26
  96. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -0
  97. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +31 -0
  98. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  99. package/lib/cjs/annotations/TextAnnotationGeometry.js +83 -0
  100. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -0
  101. package/lib/cjs/annotations/TextBlockGeometry.d.ts +16 -0
  102. package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -0
  103. package/lib/cjs/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +11 -68
  104. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -0
  105. package/lib/cjs/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +19 -7
  106. package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -0
  107. package/lib/cjs/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +19 -7
  108. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -0
  109. package/lib/cjs/core-backend.d.ts +5 -3
  110. package/lib/cjs/core-backend.d.ts.map +1 -1
  111. package/lib/cjs/core-backend.js +25 -6
  112. package/lib/cjs/core-backend.js.map +1 -1
  113. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  114. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +1 -1
  115. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  116. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  117. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  118. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  119. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  120. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  121. package/lib/esm/BackendHubAccess.d.ts +1 -1
  122. package/lib/esm/BackendHubAccess.js +1 -1
  123. package/lib/esm/BackendHubAccess.js.map +1 -1
  124. package/lib/esm/BisCoreSchema.js +1 -1
  125. package/lib/esm/BisCoreSchema.js.map +1 -1
  126. package/lib/esm/BriefcaseManager.d.ts +10 -2
  127. package/lib/esm/BriefcaseManager.d.ts.map +1 -1
  128. package/lib/esm/BriefcaseManager.js +12 -0
  129. package/lib/esm/BriefcaseManager.js.map +1 -1
  130. package/lib/esm/Category.d.ts +4 -4
  131. package/lib/esm/Category.js +4 -4
  132. package/lib/esm/Category.js.map +1 -1
  133. package/lib/esm/ChangesetECAdaptor.d.ts +67 -8
  134. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  135. package/lib/esm/ChangesetECAdaptor.js +248 -33
  136. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  137. package/lib/esm/ClassRegistry.d.ts +1 -1
  138. package/lib/esm/ClassRegistry.js +1 -1
  139. package/lib/esm/ClassRegistry.js.map +1 -1
  140. package/lib/esm/CloudSqlite.js +1 -1
  141. package/lib/esm/CloudSqlite.js.map +1 -1
  142. package/lib/esm/CodeSpecs.d.ts +1 -1
  143. package/lib/esm/CodeSpecs.js +1 -1
  144. package/lib/esm/CodeSpecs.js.map +1 -1
  145. package/lib/esm/DisplayStyle.d.ts +4 -4
  146. package/lib/esm/DisplayStyle.js +3 -3
  147. package/lib/esm/DisplayStyle.js.map +1 -1
  148. package/lib/esm/ECDb.d.ts +4 -4
  149. package/lib/esm/ECDb.d.ts.map +1 -1
  150. package/lib/esm/ECDb.js +4 -4
  151. package/lib/esm/ECDb.js.map +1 -1
  152. package/lib/esm/ECSqlStatement.d.ts +15 -6
  153. package/lib/esm/ECSqlStatement.d.ts.map +1 -1
  154. package/lib/esm/ECSqlStatement.js +18 -4
  155. package/lib/esm/ECSqlStatement.js.map +1 -1
  156. package/lib/esm/Element.d.ts +51 -51
  157. package/lib/esm/Element.js +51 -51
  158. package/lib/esm/Element.js.map +1 -1
  159. package/lib/esm/ElementAspect.d.ts +8 -8
  160. package/lib/esm/ElementAspect.d.ts.map +1 -1
  161. package/lib/esm/ElementAspect.js +8 -8
  162. package/lib/esm/ElementAspect.js.map +1 -1
  163. package/lib/esm/Entity.d.ts +3 -3
  164. package/lib/esm/Entity.js +2 -2
  165. package/lib/esm/Entity.js.map +1 -1
  166. package/lib/esm/ExportGraphics.d.ts +54 -8
  167. package/lib/esm/ExportGraphics.d.ts.map +1 -1
  168. package/lib/esm/ExportGraphics.js +156 -58
  169. package/lib/esm/ExportGraphics.js.map +1 -1
  170. package/lib/esm/GeographicCRSServices.d.ts +6 -2
  171. package/lib/esm/GeographicCRSServices.d.ts.map +1 -1
  172. package/lib/esm/GeographicCRSServices.js +1 -1
  173. package/lib/esm/GeographicCRSServices.js.map +1 -1
  174. package/lib/esm/IModelDb.d.ts +23 -21
  175. package/lib/esm/IModelDb.d.ts.map +1 -1
  176. package/lib/esm/IModelDb.js +58 -32
  177. package/lib/esm/IModelDb.js.map +1 -1
  178. package/lib/esm/IModelElementCloneContext.d.ts +1 -1
  179. package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
  180. package/lib/esm/IModelElementCloneContext.js +1 -1
  181. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  182. package/lib/esm/IModelHost.d.ts +2 -2
  183. package/lib/esm/IModelHost.js +2 -2
  184. package/lib/esm/IModelHost.js.map +1 -1
  185. package/lib/esm/Material.d.ts +1 -1
  186. package/lib/esm/Material.js +1 -1
  187. package/lib/esm/Material.js.map +1 -1
  188. package/lib/esm/Model.d.ts +22 -22
  189. package/lib/esm/Model.js +22 -22
  190. package/lib/esm/Model.js.map +1 -1
  191. package/lib/esm/SQLiteDb.d.ts +1 -1
  192. package/lib/esm/SQLiteDb.js +1 -1
  193. package/lib/esm/SQLiteDb.js.map +1 -1
  194. package/lib/esm/SqliteStatement.d.ts +1 -1
  195. package/lib/esm/SqliteStatement.d.ts.map +1 -1
  196. package/lib/esm/SqliteStatement.js +1 -1
  197. package/lib/esm/SqliteStatement.js.map +1 -1
  198. package/lib/esm/Texture.d.ts +1 -1
  199. package/lib/esm/Texture.js +1 -1
  200. package/lib/esm/Texture.js.map +1 -1
  201. package/lib/esm/TxnManager.d.ts +4 -4
  202. package/lib/esm/TxnManager.js +1 -1
  203. package/lib/esm/TxnManager.js.map +1 -1
  204. package/lib/esm/ViewDefinition.d.ts +40 -14
  205. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  206. package/lib/esm/ViewDefinition.js +42 -14
  207. package/lib/esm/ViewDefinition.js.map +1 -1
  208. package/lib/esm/annotations/FrameGeometry.d.ts +52 -0
  209. package/lib/esm/annotations/FrameGeometry.d.ts.map +1 -0
  210. package/lib/esm/annotations/FrameGeometry.js +245 -0
  211. package/lib/esm/annotations/FrameGeometry.js.map +1 -0
  212. package/lib/esm/{TextAnnotationElement.d.ts → annotations/TextAnnotationElement.d.ts} +6 -11
  213. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -0
  214. package/lib/esm/{TextAnnotationElement.js → annotations/TextAnnotationElement.js} +22 -28
  215. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -0
  216. package/lib/esm/annotations/TextAnnotationGeometry.d.ts +31 -0
  217. package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  218. package/lib/esm/annotations/TextAnnotationGeometry.js +80 -0
  219. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -0
  220. package/lib/esm/annotations/TextBlockGeometry.d.ts +16 -0
  221. package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -0
  222. package/lib/esm/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +11 -68
  223. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -0
  224. package/lib/esm/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +19 -7
  225. package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -0
  226. package/lib/esm/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +19 -7
  227. package/lib/esm/annotations/TextBlockLayout.js.map +1 -0
  228. package/lib/esm/core-backend.d.ts +5 -3
  229. package/lib/esm/core-backend.d.ts.map +1 -1
  230. package/lib/esm/core-backend.js +25 -3
  231. package/lib/esm/core-backend.js.map +1 -1
  232. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  233. package/lib/esm/rpc-impl/IModelReadRpcImpl.js +1 -1
  234. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  235. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  236. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  237. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  238. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  239. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  240. package/lib/esm/test/TestUtils.d.ts +1 -1
  241. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  242. package/lib/esm/test/TestUtils.js +1 -1
  243. package/lib/esm/test/TestUtils.js.map +1 -1
  244. package/lib/esm/test/annotations/TextAnnotation.test.js +190 -1025
  245. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  246. package/lib/esm/test/annotations/TextBlock.test.d.ts +2 -0
  247. package/lib/esm/test/annotations/TextBlock.test.d.ts.map +1 -0
  248. package/lib/esm/test/annotations/TextBlock.test.js +969 -0
  249. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -0
  250. package/lib/esm/test/ecdb/ECDb.test.js +29 -8
  251. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  252. package/lib/esm/test/ecdb/ECSqlStatement.test.js +192 -0
  253. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  254. package/lib/esm/test/imodel/IModel.test.js +228 -5
  255. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  256. package/lib/esm/test/misc/GeoServices.test.js +23 -9
  257. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  258. package/lib/esm/test/standalone/ChangesetReader.test.js +451 -136
  259. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  260. package/lib/esm/test/standalone/ExportGraphics.test.js +53 -1
  261. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  262. package/lib/esm/test/standalone/GeometryStream.test.js +49 -1
  263. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  264. package/lib/esm/test/standalone/IModelLimits.test.d.ts +2 -0
  265. package/lib/esm/test/standalone/IModelLimits.test.d.ts.map +1 -0
  266. package/lib/esm/test/standalone/IModelLimits.test.js +103 -0
  267. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -0
  268. package/lib/esm/test/standalone/SnapshotDb.test.js +19 -1
  269. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  270. package/package.json +13 -13
  271. package/lib/cjs/TextAnnotationElement.d.ts.map +0 -1
  272. package/lib/cjs/TextAnnotationElement.js.map +0 -1
  273. package/lib/cjs/TextAnnotationGeometry.d.ts +0 -32
  274. package/lib/cjs/TextAnnotationGeometry.d.ts.map +0 -1
  275. package/lib/cjs/TextAnnotationGeometry.js.map +0 -1
  276. package/lib/cjs/TextAnnotationLayout.d.ts.map +0 -1
  277. package/lib/cjs/TextAnnotationLayout.js.map +0 -1
  278. package/lib/esm/TextAnnotationElement.d.ts.map +0 -1
  279. package/lib/esm/TextAnnotationElement.js.map +0 -1
  280. package/lib/esm/TextAnnotationGeometry.d.ts +0 -32
  281. package/lib/esm/TextAnnotationGeometry.d.ts.map +0 -1
  282. package/lib/esm/TextAnnotationGeometry.js.map +0 -1
  283. package/lib/esm/TextAnnotationLayout.d.ts.map +0 -1
  284. package/lib/esm/TextAnnotationLayout.js.map +0 -1
@@ -0,0 +1,16 @@
1
+ /** @packageDocumentation
2
+ * @module ElementGeometry
3
+ */
4
+ import { TextBlockGeometryProps } from "@itwin/core-common";
5
+ import { TextBlockLayout } from "./TextBlockLayout";
6
+ import { Transform } from "@itwin/core-geometry";
7
+ /**
8
+ * Produces the geometry for a text block in a way that can be interpreted by a [[GeometryStreamBuilder]] or [[ElementBuilder.Geometry]].
9
+ * To build the geometry for a whole [[TextAnnotation]], use [[appendTextAnnotationGeometry]] instead.
10
+ * @param layout of the text block as computed by [[layoutTextBlock]].
11
+ * @param documentTransform that positions the text block in world coordinates.
12
+ * @returns TextBlockGeometryProps.
13
+ * @beta
14
+ */
15
+ export declare function produceTextBlockGeometry(layout: TextBlockLayout, documentTransform: Transform): TextBlockGeometryProps;
16
+ //# sourceMappingURL=TextBlockGeometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextBlockGeometry.d.ts","sourceRoot":"","sources":["../../../src/annotations/TextBlockGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAA2D,MAAM,oBAAoB,CAAC;AACrH,OAAO,EAAa,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAmC,SAAS,EAAY,MAAM,sBAAsB,CAAC;AAoH5F;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,SAAS,GAAG,sBAAsB,CAqBtH"}
@@ -7,9 +7,8 @@
7
7
  * @module ElementGeometry
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.produceTextAnnotationGeometry = produceTextAnnotationGeometry;
10
+ exports.produceTextBlockGeometry = produceTextBlockGeometry;
11
11
  const core_common_1 = require("@itwin/core-common");
12
- const TextAnnotationLayout_1 = require("./TextAnnotationLayout");
13
12
  const core_geometry_1 = require("@itwin/core-geometry");
14
13
  const core_bentley_1 = require("@itwin/core-bentley");
15
14
  function setColor(color, context) {
@@ -96,7 +95,15 @@ function processFractionRun(run, transform, context) {
96
95
  context.entries.push({ text: createFractionTextString(source.denominator, run, denominatorOffset, transform) });
97
96
  }
98
97
  }
99
- function produceTextBlockGeometry(layout, documentTransform, debugAnchorPt) {
98
+ /**
99
+ * Produces the geometry for a text block in a way that can be interpreted by a [[GeometryStreamBuilder]] or [[ElementBuilder.Geometry]].
100
+ * To build the geometry for a whole [[TextAnnotation]], use [[appendTextAnnotationGeometry]] instead.
101
+ * @param layout of the text block as computed by [[layoutTextBlock]].
102
+ * @param documentTransform that positions the text block in world coordinates.
103
+ * @returns TextBlockGeometryProps.
104
+ * @beta
105
+ */
106
+ function produceTextBlockGeometry(layout, documentTransform) {
100
107
  const context = { entries: [] };
101
108
  for (const line of layout.lines) {
102
109
  const lineTrans = core_geometry_1.Transform.createTranslationXYZ(line.offsetFromDocument.x, line.offsetFromDocument.y, 0);
@@ -115,70 +122,6 @@ function produceTextBlockGeometry(layout, documentTransform, debugAnchorPt) {
115
122
  }
116
123
  }
117
124
  }
118
- if (debugAnchorPt) {
119
- context.entries.push({
120
- color: core_common_1.ColorDef.blue.toJSON()
121
- });
122
- // Draw a blue box to show the element's margin
123
- const marginCorners = layout.range.corners3d(true);
124
- documentTransform.multiplyPoint3dArrayInPlace(marginCorners);
125
- marginCorners.forEach((corner, index) => {
126
- const next = marginCorners[index + 1];
127
- if (!next)
128
- return;
129
- context.entries.push({
130
- separator: {
131
- startPoint: [corner.x, corner.y, 0],
132
- endPoint: [next.x, next.y, 0],
133
- },
134
- });
135
- });
136
- // Draw a blue x to show the anchor point - Rotation occurs around this point. The x will be 1 m by 1 m.
137
- context.entries.push({
138
- separator: {
139
- startPoint: [debugAnchorPt.x - 1, debugAnchorPt.y - 1, 0],
140
- endPoint: [debugAnchorPt.x + 1, debugAnchorPt.y + 1, 0],
141
- },
142
- });
143
- context.entries.push({
144
- separator: {
145
- startPoint: [debugAnchorPt.x + 1, debugAnchorPt.y - 1, 0],
146
- endPoint: [debugAnchorPt.x - 1, debugAnchorPt.y + 1, 0],
147
- },
148
- });
149
- // Draw a red box to show the text range
150
- context.entries.push({
151
- color: core_common_1.ColorDef.red.toJSON(),
152
- });
153
- const rangeCorners = layout.textRange.corners3d(true);
154
- documentTransform.multiplyPoint3dArrayInPlace(rangeCorners);
155
- rangeCorners.forEach((corner, index) => {
156
- const next = rangeCorners[index + 1];
157
- if (!next)
158
- return;
159
- context.entries.push({
160
- separator: {
161
- startPoint: [corner.x, corner.y, 0],
162
- endPoint: [next.x, next.y, 0],
163
- },
164
- });
165
- });
166
- }
167
125
  return { entries: context.entries };
168
126
  }
169
- /** Produce a geometric representation of a text annotation, with the annotation's anchor point at the origin.
170
- * The result can be supplied to [GeometryStreamBuilder.appendTextBlock]($common).
171
- * @see [[TextAnnotation2d.setAnnotation]] and [[TextAnnotation3d.setAnnotation]] to update the annotation, geometry, and placement of an annotation element.
172
- * @beta
173
- */
174
- function produceTextAnnotationGeometry(args) {
175
- const layout = (0, TextAnnotationLayout_1.layoutTextBlock)({
176
- ...args,
177
- textBlock: args.annotation.textBlock,
178
- });
179
- const dimensions = layout.range;
180
- const transform = args.annotation.computeTransform(dimensions);
181
- const anchorPoint = args.debugAnchorPointAndRange ? transform.multiplyPoint3d(args.annotation.computeAnchorPoint(dimensions)) : undefined;
182
- return produceTextBlockGeometry(layout, transform, anchorPoint);
183
- }
184
- //# sourceMappingURL=TextAnnotationGeometry.js.map
127
+ //# sourceMappingURL=TextBlockGeometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextBlockGeometry.js","sourceRoot":"","sources":["../../../src/annotations/TextBlockGeometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAgIH,4DAqBC;AAnJD,oDAAqH;AAErH,wDAA4F;AAC5F,sDAA6C;AAO7C,SAAS,QAAQ,CAAC,KAAqB,EAAE,OAAwB;IAC/D,IAAI,KAAK,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC/B,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC;QACzB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY,EAAE,GAAc,EAAE,MAAgB;IACtE,IAAA,qBAAM,EAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAExB,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC;IAE9E,OAAO,IAAI,wBAAU,CAAC;QACpB,IAAI;QACJ,IAAI,EAAE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,CAAC,IAAI,EAAE,CAAC;YAC5B,IAAI,WAAW,KAAK,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBACpC,SAAS;YACX,CAAC;YAED,MAAM,QAAQ,GAAG,yBAAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC/F,SAAS,CAAC,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YACzD,iBAAiB,CAAC,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YACjE,IAAI,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBAC/B,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;AACtC,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 ElementGeometry\n */\n\nimport { TextBlockGeometryProps, TextBlockGeometryPropsEntry, TextString, TextStyleColor } from \"@itwin/core-common\";\nimport { RunLayout, TextBlockLayout } from \"./TextBlockLayout\";\nimport { LineSegment3d, Point3d, Range2d, Transform, Vector2d } from \"@itwin/core-geometry\";\nimport { assert } from \"@itwin/core-bentley\";\n\ninterface GeometryContext {\n curColor?: TextStyleColor;\n entries: TextBlockGeometryPropsEntry[];\n}\n\nfunction setColor(color: TextStyleColor, context: GeometryContext): void {\n if (color !== context.curColor) {\n context.curColor = color;\n context.entries.push({ color });\n }\n}\n\nfunction createTextString(text: string, run: RunLayout, origin?: Point3d): TextString {\n assert(text.length > 0);\n\n const { lineHeight, widthFactor, isBold, isItalic, isUnderlined } = run.style;\n\n return new TextString({\n text,\n font: run.fontId,\n height: lineHeight,\n widthFactor,\n bold: isBold,\n italic: isItalic,\n underline: isUnderlined,\n origin,\n });\n}\n\nfunction processTextRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n assert(run.source.type === \"text\");\n const text = run.source.content.substring(run.charOffset, run.charOffset + run.numChars);\n if (text.length === 0) {\n return;\n }\n\n const ts = createTextString(text, run);\n if (\"none\" !== run.source.baselineShift) {\n const isSub = \"subscript\" === run.source.baselineShift;\n const offsetFactor = run.style[isSub ? \"subScriptOffsetFactor\" : \"superScriptOffsetFactor\"];\n const scale = run.style[isSub ? \"subScriptScale\" : \"superScriptScale\"];\n\n ts.origin.y += offsetFactor * ts.height;\n ts.height *= scale;\n }\n\n ts.transformInPlace(transform);\n\n setColor(run.style.color, context);\n context.entries.push({ text: ts });\n}\n\nfunction createFractionTextString(text: string, run: RunLayout, origin: Point3d, transform: Transform): TextString {\n const ts = createTextString(text, run, origin);\n assert(undefined !== ts.widthFactor);\n\n ts.height *= run.style.stackedFractionScale;\n\n ts.transformInPlace(transform);\n\n return ts;\n}\n\nfunction processFractionRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n const source = run.source;\n assert(source.type === \"fraction\");\n\n if (source.numerator.length === 0 && source.denominator.length === 0) {\n return;\n }\n\n assert(undefined !== run.numeratorRange && undefined !== run.denominatorRange);\n\n const fontSize = new Vector2d(run.style.lineHeight * run.style.widthFactor, run.style.lineHeight);\n fontSize.scale(run.style.stackedFractionScale, fontSize);\n\n const numeratorOffset = new Point3d(run.numeratorRange.low.x, run.numeratorRange.low.y, 0);\n const denominatorOffset = new Point3d(run.denominatorRange.low.x, run.denominatorRange.low.y, 0);\n\n setColor(run.style.color, context);\n\n if (source.numerator.length > 0) {\n context.entries.push({ text: createFractionTextString(source.numerator, run, numeratorOffset, transform) });\n }\n\n const numeratorRange = Range2d.fromJSON(run.numeratorRange);\n const denominatorRange = Range2d.fromJSON(run.denominatorRange);\n\n let separator: LineSegment3d;\n if (run.style.stackedFractionType === \"horizontal\") {\n const fractionWidth = Math.max(numeratorRange.xLength(), denominatorRange.xLength());\n const y = 1.25 * denominatorRange.yLength();\n separator = LineSegment3d.createXYXY(0, y, fractionWidth, y);\n } else {\n const p0 = new Point3d(denominatorRange.low.x - fontSize.x / 2, denominatorRange.low.y + fontSize.y * (1 / 3), 0);\n const p1 = new Point3d(p0.x + fontSize.x, p0.y + fontSize.y * 1.5, 0);\n separator = LineSegment3d.createCapture(p0, p1);\n }\n\n separator.tryTransformInPlace(transform);\n\n context.entries.push({\n separator: {\n startPoint: separator.point0Ref.toJSON(),\n endPoint: separator.point1Ref.toJSON(),\n },\n });\n\n if (source.denominator.length > 0) {\n context.entries.push({ text: createFractionTextString(source.denominator, run, denominatorOffset, transform) });\n }\n}\n\n/**\n * Produces the geometry for a text block in a way that can be interpreted by a [[GeometryStreamBuilder]] or [[ElementBuilder.Geometry]].\n * To build the geometry for a whole [[TextAnnotation]], use [[appendTextAnnotationGeometry]] instead.\n * @param layout of the text block as computed by [[layoutTextBlock]].\n * @param documentTransform that positions the text block in world coordinates.\n * @returns TextBlockGeometryProps.\n * @beta\n */\nexport function produceTextBlockGeometry(layout: TextBlockLayout, documentTransform: Transform): TextBlockGeometryProps {\n const context: GeometryContext = { entries: [] };\n for (const line of layout.lines) {\n const lineTrans = Transform.createTranslationXYZ(line.offsetFromDocument.x, line.offsetFromDocument.y, 0);\n for (const run of line.runs) {\n if (\"linebreak\" === run.source.type) {\n continue;\n }\n\n const runTrans = Transform.createTranslationXYZ(run.offsetFromLine.x, run.offsetFromLine.y, 0);\n lineTrans.multiplyTransformTransform(runTrans, runTrans);\n documentTransform.multiplyTransformTransform(runTrans, runTrans);\n if (\"text\" === run.source.type) {\n processTextRun(run, runTrans, context);\n } else {\n processFractionRun(run, runTrans, context);\n }\n }\n }\n\n return { entries: context.entries };\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { BaselineShift, FontId, FontType, FractionRun, LineLayoutResult, Paragraph, Run, RunLayoutResult, TextBlock, TextBlockLayoutResult, TextRun, TextStyleSettings } from "@itwin/core-common";
5
5
  import { Range2d } from "@itwin/core-geometry";
6
- import { IModelDb } from "./IModelDb";
6
+ import { IModelDb } from "../IModelDb";
7
7
  /** @internal */
8
8
  export interface TextLayoutRanges {
9
9
  layout: Range2d;
@@ -55,13 +55,13 @@ export interface LayoutTextBlockArgs {
55
55
  * If the document specifies a width > 0, individual lines are split to try to avoid exceeding that width.
56
56
  * Individual TextRuns can be split onto multiple lines at word boundaries if necessary. Individual FractionRuns are never split.
57
57
  * @see [[computeLayoutTextBlockResult]]
58
- * @internal
58
+ * @beta
59
59
  */
60
60
  export declare function layoutTextBlock(args: LayoutTextBlockArgs): TextBlockLayout;
61
61
  /**
62
62
  * Gets the result of laying out the the contents of a TextBlock into a series of lines containing runs.
63
63
  * The visual layout accounts for the [TextStyle]($common)s, fonts, and [TextBlock.width]($common). It applies word-wrapping if needed.
64
- * The layout returned matches the visual layout of the geometry produced by [[produceTextAnnotationGeometry]].
64
+ * The layout returned matches the visual layout of the geometry produced by [[appendTextAnnotationGeometry]].
65
65
  * @beta
66
66
  */
67
67
  export declare function computeLayoutTextBlockResult(args: LayoutTextBlockArgs): TextBlockLayoutResult;
@@ -104,7 +104,12 @@ declare class LayoutContext {
104
104
  denominator: Range2d;
105
105
  };
106
106
  }
107
- /** @internal */
107
+ /**
108
+ * Represents the layout of a single run (text, fraction, or line break) within a line of text.
109
+ * Stores information about the run's position, style, and font within the line.
110
+ * Provides utilities for splitting text runs for word wrapping and converting to result objects.
111
+ * @beta
112
+ */
108
113
  export declare class RunLayout {
109
114
  source: Run;
110
115
  charOffset: number;
@@ -130,7 +135,12 @@ export declare class RunLayout {
130
135
  split(context: LayoutContext): RunLayout[];
131
136
  toResult(paragraph: Paragraph): RunLayoutResult;
132
137
  }
133
- /** @internal */
138
+ /**
139
+ * Represents the layout of a single line within a paragraph of a text block.
140
+ * Contains a sequence of RunLayout objects, the computed range of the line, and its offset from the document origin.
141
+ * Provides utilities for appending runs, computing ranges, and converting to result objects.
142
+ * @beta
143
+ */
134
144
  export declare class LineLayout {
135
145
  source: Paragraph;
136
146
  range: Range2d;
@@ -153,7 +163,9 @@ export declare class LineLayout {
153
163
  }
154
164
  /**
155
165
  * Describes the layout of a text block as a collection of lines containing runs.
156
- * @internal
166
+ * Computes the visual layout of the text block, including word wrapping, justification, and margins.
167
+ * Provides access to the computed lines, ranges, and utilities for converting to result objects.
168
+ * @beta
157
169
  */
158
170
  export declare class TextBlockLayout {
159
171
  source: TextBlock;
@@ -174,4 +186,4 @@ export declare class TextBlockLayout {
174
186
  private applyMargins;
175
187
  }
176
188
  export {};
177
- //# sourceMappingURL=TextAnnotationLayout.d.ts.map
189
+ //# sourceMappingURL=TextBlockLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextBlockLayout.d.ts","sourceRoot":"","sources":["../../../src/annotations/TextBlockLayout.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAAG,EAAE,eAAe,EAAE,SAAS,EAAE,qBAAqB,EAAoB,OAAO,EAAE,iBAAiB,EAA0B,MAAM,oBAAoB,CAAC;AAC7O,OAAO,EAAY,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAKvC,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,C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OxC,yEAAyE;IAClE,SAAS,IAAI,MAAM;IAI1B,OAAO,KAAK,KAAK,GAGhB;IAED,OAAO,CAAC,aAAa;IAqDrB,OAAO,CAAC,YAAY;IA6BpB,OAAO,CAAC,SAAS;IAqCjB,OAAO,CAAC,YAAY;CAoBrB"}
@@ -22,7 +22,7 @@ const LineBreaker = require("linebreak");
22
22
  * If the document specifies a width > 0, individual lines are split to try to avoid exceeding that width.
23
23
  * Individual TextRuns can be split onto multiple lines at word boundaries if necessary. Individual FractionRuns are never split.
24
24
  * @see [[computeLayoutTextBlockResult]]
25
- * @internal
25
+ * @beta
26
26
  */
27
27
  function layoutTextBlock(args) {
28
28
  const findFontId = args.findFontId ?? ((name, type) => args.iModel.fonts.findId({ name, type }) ?? 0);
@@ -34,7 +34,7 @@ function layoutTextBlock(args) {
34
34
  /**
35
35
  * Gets the result of laying out the the contents of a TextBlock into a series of lines containing runs.
36
36
  * The visual layout accounts for the [TextStyle]($common)s, fonts, and [TextBlock.width]($common). It applies word-wrapping if needed.
37
- * The layout returned matches the visual layout of the geometry produced by [[produceTextAnnotationGeometry]].
37
+ * The layout returned matches the visual layout of the geometry produced by [[appendTextAnnotationGeometry]].
38
38
  * @beta
39
39
  */
40
40
  function computeLayoutTextBlockResult(args) {
@@ -195,7 +195,12 @@ function split(source) {
195
195
  }
196
196
  return segments;
197
197
  }
198
- /** @internal */
198
+ /**
199
+ * Represents the layout of a single run (text, fraction, or line break) within a line of text.
200
+ * Stores information about the run's position, style, and font within the line.
201
+ * Provides utilities for splitting text runs for word wrapping and converting to result objects.
202
+ * @beta
203
+ */
199
204
  class RunLayout {
200
205
  source;
201
206
  charOffset;
@@ -309,7 +314,12 @@ class RunLayout {
309
314
  }
310
315
  }
311
316
  exports.RunLayout = RunLayout;
312
- /** @internal */
317
+ /**
318
+ * Represents the layout of a single line within a paragraph of a text block.
319
+ * Contains a sequence of RunLayout objects, the computed range of the line, and its offset from the document origin.
320
+ * Provides utilities for appending runs, computing ranges, and converting to result objects.
321
+ * @beta
322
+ */
313
323
  class LineLayout {
314
324
  source;
315
325
  range = new core_geometry_1.Range2d(0, 0, 0, 0);
@@ -369,7 +379,9 @@ class LineLayout {
369
379
  exports.LineLayout = LineLayout;
370
380
  /**
371
381
  * Describes the layout of a text block as a collection of lines containing runs.
372
- * @internal
382
+ * Computes the visual layout of the text block, including word wrapping, justification, and margins.
383
+ * Provides access to the computed lines, ranges, and utilities for converting to result objects.
384
+ * @beta
373
385
  */
374
386
  class TextBlockLayout {
375
387
  source;
@@ -393,7 +405,7 @@ class TextBlockLayout {
393
405
  toResult() {
394
406
  return {
395
407
  lines: this.lines.map((x) => x.toResult(this.source)),
396
- range: this.textRange.toJSON(),
408
+ range: this.range.toJSON(),
397
409
  };
398
410
  }
399
411
  /** Compute a string representation, primarily for debugging purposes. */
@@ -519,4 +531,4 @@ class TextBlockLayout {
519
531
  }
520
532
  }
521
533
  exports.TextBlockLayout = TextBlockLayout;
522
- //# sourceMappingURL=TextAnnotationLayout.js.map
534
+ //# sourceMappingURL=TextBlockLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextBlockLayout.js","sourceRoot":"","sources":["../../../src/annotations/TextBlockLayout.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAoEH,0CAQC;AAQD,oEAGC;AAsBD,wDAqBC;AAhID,oDAA6O;AAC7O,wDAAyD;AAEzD,sDAAsE;AACtE,yCAAyC;AAqDzC;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAAC,IAAyB;IACvD,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACtG,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,IAAI,CAAC,CAAC,CAAC,EA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CAAC,CAAC,CAAC;QAC/C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAExD,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;QAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;QACzC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;QAE3C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AArLD,0CAqLC","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 ElementGeometry\n */\n\nimport { BaselineShift, FontId, FontType, FractionRun, LineLayoutResult, Paragraph, Run, RunLayoutResult, TextBlock, TextBlockLayoutResult, TextBlockMargins, TextRun, TextStyleSettings, TextStyleSettingsProps } from \"@itwin/core-common\";\nimport { Geometry, Range2d } from \"@itwin/core-geometry\";\nimport { IModelDb } from \"../IModelDb\";\nimport { assert, NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\nimport * as LineBreaker from \"linebreak\";\n\n\n/** @internal */\nexport interface TextLayoutRanges {\n layout: Range2d;\n justification: Range2d;\n}\n\n/** Arguments to [[ComputeRangesForTextLayout]].\n * @internal\n */\nexport interface ComputeRangesForTextLayoutArgs {\n chars: string;\n bold: boolean;\n italic: boolean;\n baselineShift: BaselineShift;\n fontId: FontId;\n widthFactor: number;\n lineHeight: number;\n}\n\n/** A function that uses a font to compute the layout and justification ranges of a string of text.\n * @internal\n */\nexport type ComputeRangesForTextLayout = (args: ComputeRangesForTextLayoutArgs) => TextLayoutRanges;\n\n/** A function that looks up the font Id corresponding to a [FontFamilyDescriptor]($common).\n * If no type is provided, the function can return a font of any type matching `name` (there may be more than one, of different types).\n * @internal\n */\nexport type FindFontId = (name: string, type?: FontType) => FontId;\n\n/** @internal */\nexport type FindTextStyle = (name: string) => TextStyleSettings;\n\n/**\n * Arguments supplied to [[computeLayoutTextBlockResult]].\n * @beta\n */\nexport interface LayoutTextBlockArgs {\n /** The text block whose extents are to be computed. */\n textBlock: TextBlock;\n /** The iModel from which to obtain fonts and [TextStyle]($common)s when laying out glyphs. */\n iModel: IModelDb;\n /** @internal chiefly for tests, by default uses IModelJsNative.DgnDb.computeRangesForText. */\n computeTextRange?: ComputeRangesForTextLayout;\n /** @internal chiefly for tests, by default looks up styles from a workspace. */\n findTextStyle?: FindTextStyle;\n /** @internal chiefly for tests, by default uses IModelDb.fontMap. */\n findFontId?: FindFontId;\n}\n\n/**\n * Lays out the contents of a TextBlock into a series of lines containing runs.\n * Each paragraph is decomposed into a series of lines.\n * Each series of consecutive non-linebreak runs within a paragraph is concatenated into one line.\n * If the document specifies a width > 0, individual lines are split to try to avoid exceeding that width.\n * Individual TextRuns can be split onto multiple lines at word boundaries if necessary. Individual FractionRuns are never split.\n * @see [[computeLayoutTextBlockResult]]\n * @beta\n */\nexport function layoutTextBlock(args: LayoutTextBlockArgs): TextBlockLayout {\n const findFontId = args.findFontId ?? ((name, type) => args.iModel.fonts.findId({ name, type }) ?? 0);\n const computeTextRange = args.computeTextRange ?? ((x) => args.iModel.computeRangesForText(x));\n\n // ###TODO finding text styles in workspaces.\n const findTextStyle = args.findTextStyle ?? (() => TextStyleSettings.fromJSON());\n\n return new TextBlockLayout(args.textBlock, new LayoutContext(args.textBlock, computeTextRange, findTextStyle, findFontId));\n}\n\n/**\n * Gets the result of laying out the the contents of a TextBlock into a series of lines containing runs.\n * The visual layout accounts for the [TextStyle]($common)s, fonts, and [TextBlock.width]($common). It applies word-wrapping if needed.\n * The layout returned matches the visual layout of the geometry produced by [[appendTextAnnotationGeometry]].\n * @beta\n */\nexport function computeLayoutTextBlockResult(args: LayoutTextBlockArgs): TextBlockLayoutResult {\n const layout = layoutTextBlock(args);\n return layout.toResult();\n}\n\n/**\n * Arguments supplied to [[computeGraphemeOffsets]].\n * @beta\n */\nexport interface ComputeGraphemeOffsetsArgs extends LayoutTextBlockArgs {\n /** The index of the [Paragraph]($common) in the text block that contains the run layout result text. */\n paragraphIndex: number;\n /** The run layout result for which grapheme ranges will be computed. */\n runLayoutResult: RunLayoutResult;\n /** An array of starting character indexes for each grapheme. Each entry represents the index of the first character in a grapheme. */\n graphemeCharIndexes: number[];\n};\n\n/**\n * Computes the range from the start of a [RunLayoutResult]($common) to the trailing edge of each grapheme.\n * It is the responsibility of the caller to determine the number and character indexes of the graphemes.\n * @returns If the [RunLayoutResult]($common)'s source is a [TextRun]($common), it returns an array containing the range of each grapheme.\n * Otherwise, it returns and empty array.\n * @beta\n */\nexport function computeGraphemeOffsets(args: ComputeGraphemeOffsetsArgs): Range2d[] {\n const { textBlock, paragraphIndex, runLayoutResult, graphemeCharIndexes, iModel } = args;\n const findFontId = args.findFontId ?? ((name, type) => iModel.fonts.findId({ name, type }) ?? 0);\n const computeTextRange = args.computeTextRange ?? ((x) => iModel.computeRangesForText(x));\n const findTextStyle = args.findTextStyle ?? (() => TextStyleSettings.fromJSON());\n const source = textBlock.paragraphs[paragraphIndex].runs[runLayoutResult.sourceRunIndex];\n\n if (source.type !== \"text\" || runLayoutResult.characterCount === 0) {\n return [];\n }\n\n const style = TextStyleSettings.fromJSON(runLayoutResult.textStyle);\n\n const layoutContext = new LayoutContext(textBlock, computeTextRange, findTextStyle, findFontId);\n const graphemeRanges: Range2d[] = [];\n\n graphemeCharIndexes.forEach((_, index) => {\n const nextGraphemeCharIndex = graphemeCharIndexes[index + 1] ?? runLayoutResult.characterCount;\n graphemeRanges.push(layoutContext.computeRangeForTextRun(style, source, runLayoutResult.characterOffset, nextGraphemeCharIndex).layout);\n });\n return graphemeRanges;\n}\n\nfunction scaleRange(range: Range2d, scale: number): void {\n range.low.scaleInPlace(scale);\n range.high.scaleInPlace(scale);\n}\n\nfunction applyBlockSettings(target: TextStyleSettings, source: TextStyleSettings | TextStyleSettingsProps): TextStyleSettings {\n if (source === target) {\n return target;\n }\n\n const lineSpacingFactor = source.lineSpacingFactor ?? target.lineSpacingFactor;\n const lineHeight = source.lineHeight ?? target.lineHeight;\n const widthFactor = source.widthFactor ?? target.widthFactor;\n\n if (lineSpacingFactor !== target.lineSpacingFactor || lineHeight !== target.lineHeight || widthFactor !== target.widthFactor) {\n target = target.clone({ lineSpacingFactor, lineHeight, widthFactor });\n }\n\n return target;\n}\n\nclass LayoutContext {\n private readonly _textStyles = new Map<string, TextStyleSettings>();\n private readonly _fontIds = new Map<string, FontId>();\n public readonly blockSettings: TextStyleSettings;\n\n public constructor(block: TextBlock, private readonly _computeTextRange: ComputeRangesForTextLayout, private readonly _findTextStyle: FindTextStyle, private readonly _findFontId: FindFontId) {\n const settings = this.findTextStyle(block.styleName);\n this.blockSettings = applyBlockSettings(settings, block.styleOverrides);\n }\n\n public findFontId(name: string): FontId {\n let fontId = this._fontIds.get(name);\n if (undefined === fontId) {\n this._fontIds.set(name, fontId = this._findFontId(name));\n }\n\n return fontId;\n }\n\n public findTextStyle(name: string): TextStyleSettings {\n let style = this._textStyles.get(name);\n if (undefined === style) {\n this._textStyles.set(name, style = this._findTextStyle(name));\n }\n\n return style;\n }\n\n public createRunSettings(run: Run): TextStyleSettings {\n let settings = this.findTextStyle(run.styleName);\n if (run.overridesStyle) {\n settings = settings.clone(run.styleOverrides);\n }\n\n return applyBlockSettings(settings, this.blockSettings);\n }\n\n public computeRangeForText(chars: string, style: TextStyleSettings, baselineShift: BaselineShift): TextLayoutRanges {\n if (chars.length === 0) {\n return {\n layout: new Range2d(0, 0, 0, style.lineHeight),\n justification: new Range2d(),\n };\n }\n\n const fontId = this.findFontId(style.fontName);\n const { layout, justification } = this._computeTextRange({\n chars,\n fontId,\n baselineShift,\n bold: style.isBold,\n italic: style.isItalic,\n lineHeight: this.blockSettings.lineHeight,\n widthFactor: this.blockSettings.widthFactor,\n });\n\n if (\"none\" !== baselineShift) {\n const isSub = \"subscript\" === baselineShift;\n const scale = isSub ? style.subScriptScale : style.superScriptScale;\n const offsetFactor = isSub ? style.subScriptOffsetFactor : style.superScriptOffsetFactor;\n const offset = { x: 0, y: style.lineHeight * offsetFactor };\n\n scaleRange(layout, scale);\n layout.cloneTranslated(offset, layout);\n\n scaleRange(justification, scale);\n justification.cloneTranslated(offset, justification);\n }\n\n return { layout, justification };\n }\n\n public computeRangeForTextRun(style: TextStyleSettings, run: TextRun, charOffset: number, numChars: number): TextLayoutRanges {\n return this.computeRangeForText(run.content.substring(charOffset, charOffset + numChars), style, run.baselineShift);\n }\n\n public computeRangeForFractionRun(style: TextStyleSettings, source: FractionRun): { layout: Range2d, numerator: Range2d, denominator: Range2d } {\n const numerator = this.computeRangeForText(source.numerator, style, \"none\").layout;\n scaleRange(numerator, style.stackedFractionScale);\n\n const denominator = this.computeRangeForText(source.denominator, style, \"none\").layout;\n scaleRange(denominator, style.stackedFractionScale);\n\n const numLen = numerator.xLength();\n const denomLen = denominator.xLength();\n switch (style.stackedFractionType) {\n case \"horizontal\": {\n if (numLen > denomLen) {\n denominator.cloneTranslated({ x: (numLen - denomLen) / 2, y: 0 }, denominator);\n } else {\n numerator.cloneTranslated({ x: (denomLen - numLen) / 2, y: 0 }, numerator);\n }\n\n numerator.cloneTranslated({ x: 0, y: 1.5 * denominator.yLength() }, numerator);\n break;\n }\n case \"diagonal\": {\n numerator.cloneTranslated({ x: 0, y: denominator.yLength() }, numerator);\n denominator.cloneTranslated({ x: numLen, y: 0 }, denominator);\n break;\n }\n }\n\n const layout = numerator.clone();\n layout.extendRange(denominator);\n return { layout, numerator, denominator };\n }\n}\n\ninterface Segment {\n segment: string;\n index: number;\n}\n\nfunction split(source: string): Segment[] {\n if (source.length === 0) {\n return [];\n }\n\n let index = 0;\n const segments: Segment[] = [];\n const breaker = new LineBreaker(source);\n for (let brk = breaker.nextBreak(); brk; brk = breaker.nextBreak()) {\n segments.push({\n segment: source.slice(index, brk.position),\n index,\n });\n\n index = brk.position;\n }\n\n return segments;\n}\n\n/**\n * Represents the layout of a single run (text, fraction, or line break) within a line of text.\n * Stores information about the run's position, style, and font within the line.\n * Provides utilities for splitting text runs for word wrapping and converting to result objects.\n * @beta\n */\nexport class RunLayout {\n public source: Run;\n public charOffset: number;\n public numChars: number;\n public range: Range2d;\n public justificationRange?: Range2d;\n public denominatorRange?: Range2d;\n public numeratorRange?: Range2d;\n public offsetFromLine: { x: number, y: number };\n public style: TextStyleSettings;\n public fontId: FontId;\n\n private constructor(props: NonFunctionPropertiesOf<RunLayout>) {\n this.source = props.source;\n this.charOffset = props.charOffset;\n this.numChars = props.numChars;\n this.range = props.range;\n this.justificationRange = props.justificationRange;\n this.denominatorRange = props.denominatorRange;\n this.numeratorRange = props.numeratorRange;\n this.offsetFromLine = props.offsetFromLine;\n this.style = props.style;\n this.fontId = props.fontId;\n }\n\n public static create(source: Run, context: LayoutContext): RunLayout {\n const style = context.createRunSettings(source);\n const fontId = context.findFontId(style.fontName);\n const charOffset = 0;\n const offsetFromLine = { x: 0, y: 0 };\n let numChars = 0;\n\n let range, justificationRange, numeratorRange, denominatorRange;\n\n switch (source.type) {\n case \"text\": {\n numChars = source.content.length;\n const ranges = context.computeRangeForTextRun(style, source, charOffset, numChars);\n range = ranges.layout;\n justificationRange = ranges.justification;\n break;\n }\n case \"fraction\": {\n numChars = 1;\n const ranges = context.computeRangeForFractionRun(style, source);\n range = ranges.layout;\n numeratorRange = ranges.numerator;\n denominatorRange = ranges.denominator;\n break;\n }\n default: {\n // We do this so that blank lines space correctly without special casing later.\n range = new Range2d(0, 0, 0, style.lineHeight);\n break;\n }\n }\n\n return new RunLayout({ source, charOffset, numChars, range, justificationRange, denominatorRange, numeratorRange, offsetFromLine, style, fontId });\n }\n\n /** Compute a string representation, primarily for debugging purposes. */\n public stringify(): string {\n return this.source.type === \"text\" ? this.source.content.substring(this.charOffset, this.charOffset + this.numChars) : this.source.stringify();\n }\n\n public canWrap(): this is { source: TextRun } {\n return this.source.type === \"text\";\n }\n\n private cloneForWrap(args: { ranges: TextLayoutRanges, charOffset: number, numChars: number }): RunLayout {\n assert(this.canWrap());\n\n return new RunLayout({\n ...this,\n charOffset: args.charOffset,\n numChars: args.numChars,\n range: args.ranges.layout,\n justificationRange: args.ranges.justification,\n offsetFromLine: { ...this.offsetFromLine },\n });\n }\n\n public split(context: LayoutContext): RunLayout[] {\n assert(this.charOffset === 0, \"cannot re-split a run\");\n if (!this.canWrap() || this.charOffset > 0) {\n return [this];\n }\n\n const myText = this.source.content.substring(this.charOffset, this.charOffset + this.numChars);\n const segments = split(myText);\n\n if (segments.length <= 1) {\n return [this];\n }\n\n return segments.map((segment: any) => {\n return this.cloneForWrap({\n ranges: context.computeRangeForText(segment.segment, this.style, this.source.baselineShift),\n charOffset: segment.index,\n numChars: segment.segment.length,\n });\n });\n }\n\n public toResult(paragraph: Paragraph): RunLayoutResult {\n const result: RunLayoutResult = {\n sourceRunIndex: paragraph.runs.indexOf(this.source),\n fontId: this.fontId,\n characterOffset: this.charOffset,\n characterCount: this.numChars,\n range: this.range.toJSON(),\n offsetFromLine: this.offsetFromLine,\n textStyle: this.style.toJSON(),\n };\n\n if (this.justificationRange) {\n result.justificationRange = this.justificationRange.toJSON();\n }\n\n if (this.numeratorRange) {\n result.numeratorRange = this.numeratorRange.toJSON();\n }\n\n if (this.denominatorRange) {\n result.denominatorRange = this.denominatorRange.toJSON();\n }\n\n return result;\n }\n}\n\n/**\n * Represents the layout of a single line within a paragraph of a text block.\n * Contains a sequence of RunLayout objects, the computed range of the line, and its offset from the document origin.\n * Provides utilities for appending runs, computing ranges, and converting to result objects.\n * @beta\n */\nexport class LineLayout {\n public source: Paragraph;\n public range = new Range2d(0, 0, 0, 0);\n public justificationRange = new Range2d(0, 0, 0, 0);\n public offsetFromDocument = { x: 0, y: 0 };\n private _runs: RunLayout[] = [];\n\n public constructor(source: Paragraph) {\n this.source = source;\n }\n\n /** Compute a string representation, primarily for debugging purposes. */\n public stringify(): string {\n const runs = this._runs.map((run) => run.stringify());\n return `${runs.join(\"\")}`;\n }\n\n public get runs(): ReadonlyArray<RunLayout> { return this._runs; }\n public get isEmpty() { return this._runs.length === 0; }\n public get back(): RunLayout {\n assert(!this.isEmpty);\n return this._runs[this._runs.length - 1];\n }\n\n public append(run: RunLayout): void {\n this._runs.push(run);\n this.computeRanges();\n }\n\n /** Invoked every time a run is appended,. */\n private computeRanges(): void {\n this.range.low.setZero();\n this.range.high.setZero();\n\n // Some runs (fractions) are taller than others.\n // We want to center each run vertically inside the line.\n let lineHeight = 0;\n for (const run of this._runs) {\n lineHeight = Math.max(lineHeight, run.range.yLength());\n }\n\n for (const run of this._runs) {\n const runHeight = run.range.yLength();\n const runOffset = { x: this.range.high.x, y: (lineHeight - runHeight) / 2 };\n run.offsetFromLine = runOffset;\n\n const runLayoutRange = run.range.cloneTranslated(runOffset);\n this.range.extendRange(runLayoutRange);\n\n if (\"linebreak\" !== run.source.type) {\n const runJustificationRange = run.justificationRange?.cloneTranslated(runOffset);\n this.justificationRange.extendRange(runJustificationRange ?? runLayoutRange);\n }\n }\n }\n\n public toResult(textBlock: TextBlock): LineLayoutResult {\n return {\n sourceParagraphIndex: textBlock.paragraphs.indexOf(this.source),\n runs: this.runs.map((x) => x.toResult(this.source)),\n range: this.range.toJSON(),\n justificationRange: this.justificationRange.toJSON(),\n offsetFromDocument: this.offsetFromDocument,\n };\n }\n}\n\n/**\n * Describes the layout of a text block as a collection of lines containing runs.\n * Computes the visual layout of the text block, including word wrapping, justification, and margins.\n * Provides access to the computed lines, ranges, and utilities for converting to result objects.\n * @beta\n */\nexport class TextBlockLayout {\n public source: TextBlock;\n\n /** @internal: This is primarily for debugging purposes. This is the range of text geometry */\n public textRange = new Range2d();\n\n /** The range including margins of the [[TextBlock]]. */\n public range = new Range2d();\n public lines: LineLayout[] = [];\n private _context: LayoutContext;\n\n public constructor(source: TextBlock, context: LayoutContext) {\n this._context = context;\n this.source = source;\n\n if (source.width > 0) {\n this.textRange.low.x = 0;\n this.textRange.high.x = source.width;\n }\n\n this.populateLines(context);\n this.justifyLines();\n this.applyMargins(source.margins);\n }\n\n public toResult(): TextBlockLayoutResult {\n return {\n lines: this.lines.map((x) => x.toResult(this.source)),\n range: this.range.toJSON(),\n };\n }\n\n /** Compute a string representation, primarily for debugging purposes. */\n public stringify(): string {\n return this.lines.map((line) => line.stringify()).join(\"\\n\");\n }\n\n private get _back(): LineLayout {\n assert(this.lines.length > 0);\n return this.lines[this.lines.length - 1];\n }\n\n private populateLines(context: LayoutContext): void {\n const doc = this.source;\n if (doc.paragraphs.length === 0) {\n return;\n }\n\n const doWrap = doc.width > 0;\n let curLine = new LineLayout(doc.paragraphs[0]);\n for (let i = 0; i < doc.paragraphs.length; i++) {\n const paragraph = doc.paragraphs[i];\n if (i > 0) {\n curLine = this.flushLine(context, curLine, paragraph);\n }\n\n let runs = paragraph.runs.map((run) => RunLayout.create(run, context));\n if (doWrap) {\n runs = runs.map((run) => run.split(context)).flat();\n }\n\n for (const run of runs) {\n if (\"linebreak\" === run.source.type) {\n curLine.append(run);\n curLine = this.flushLine(context, curLine);\n continue;\n }\n\n if (!doWrap) {\n curLine.append(run);\n continue;\n }\n\n const runWidth = run.range.xLength();\n const lineWidth = curLine.range.xLength();\n if (runWidth + lineWidth < doc.width || Geometry.isAlmostEqualNumber(runWidth + lineWidth, doc.width, Geometry.smallMetricDistance)) {\n curLine.append(run);\n continue;\n }\n\n if (curLine.runs.length === 0) {\n curLine.append(run);\n curLine = this.flushLine(context, curLine);\n } else {\n curLine = this.flushLine(context, curLine);\n curLine.append(run);\n }\n }\n }\n\n if (curLine.runs.length > 0) {\n this.flushLine(context, curLine);\n }\n }\n\n private justifyLines(): void {\n // We don't want to justify empty text, or a single line of text whose width is 0. By default text is already left justified.\n if (this.lines.length < 1 || (this.lines.length === 1 && this.source.width === 0) || \"left\" === this.source.justification) {\n return;\n }\n\n // This is the minimum width of the document's bounding box.\n const docWidth = this.source.width;\n\n let minOffset = Number.MAX_VALUE;\n for (const line of this.lines) {\n const lineWidth = line.justificationRange.xLength();\n\n let offset = docWidth - lineWidth;\n if (\"center\" === this.source.justification) {\n offset = offset / 2;\n }\n\n line.offsetFromDocument.x += offset;\n minOffset = Math.min(offset, minOffset);\n }\n\n if (minOffset < 0) {\n // Shift left to accommodate lines that exceeded the document's minimum width.\n this.textRange.low.x += minOffset;\n this.textRange.high.x += minOffset;\n }\n }\n\n private flushLine(context: LayoutContext, line: LineLayout, nextParagraph?: Paragraph): LineLayout {\n nextParagraph = nextParagraph ?? line.source;\n\n // We want to guarantee that each layout line has at least one run.\n if (line.runs.length === 0) {\n // If we're empty, there should always be a preceding run, and it should be a line break.\n if (this.lines.length === 0 || this._back.runs.length === 0) {\n return new LineLayout(nextParagraph);\n }\n\n const prevRun = this._back.back.source;\n assert(prevRun.type === \"linebreak\");\n if (prevRun.type !== \"linebreak\") {\n return new LineLayout(nextParagraph);\n }\n\n line.append(RunLayout.create(prevRun.clone(), context));\n }\n\n // Line origin is its baseline.\n const lineOffset = { x: 0, y: -line.range.yLength() };\n\n // Place it below any existing lines\n if (this.lines.length > 0) {\n lineOffset.y += this._back.offsetFromDocument.y;\n lineOffset.y -= context.blockSettings.lineSpacingFactor * context.blockSettings.lineHeight;\n }\n\n line.offsetFromDocument = lineOffset;\n\n // Update document range from computed line range and position\n this.textRange.extendRange(line.range.cloneTranslated(lineOffset));\n\n this.lines.push(line);\n return new LineLayout(nextParagraph);\n }\n\n private applyMargins(margins: TextBlockMargins) {\n this.range = this.textRange.clone();\n\n if (this.range.isNull)\n return;\n\n // Disregard negative margins.\n const right = margins.right >= 0 ? margins.right : 0;\n const left = margins.left >= 0 ? margins.left : 0;\n const top = margins.top >= 0 ? margins.top : 0;\n const bottom = margins.bottom >= 0 ? margins.bottom : 0;\n\n const xHigh = this.textRange.high.x + right;\n const yHigh = this.textRange.high.y + top;\n const xLow = this.textRange.low.x - left;\n const yLow = this.textRange.low.y - bottom;\n\n this.range.extendXY(xHigh, yHigh);\n this.range.extendXY(xLow, yLow);\n }\n}\n"]}
@@ -1,3 +1,8 @@
1
+ export * from "./annotations/FrameGeometry";
2
+ export * from "./annotations/TextAnnotationElement";
3
+ export * from "./annotations/TextAnnotationGeometry";
4
+ export * from "./annotations/TextBlockGeometry";
5
+ export * from "./annotations/TextBlockLayout";
1
6
  export * from "./BackendHubAccess";
2
7
  export * from "./BackendLoggerCategory";
3
8
  export * from "./BisCoreSchema";
@@ -58,9 +63,6 @@ export * from "./SchemaUtils";
58
63
  export * from "./SheetIndex";
59
64
  export * from "./SQLiteDb";
60
65
  export * from "./SqliteStatement";
61
- export * from "./TextAnnotationElement";
62
- export { computeGraphemeOffsets, computeLayoutTextBlockResult, ComputeGraphemeOffsetsArgs, LayoutTextBlockArgs, } from "./TextAnnotationLayout";
63
- export * from "./TextAnnotationGeometry";
64
66
  export * from "./Texture";
65
67
  export * from "./TileStorage";
66
68
  export * from "./TxnManager";
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"AAKA,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;A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C;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AAErC,cAAc,0BAA0B,CAAC;AA2BzC;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;IAGI;AAEJ;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG"}
@@ -18,7 +18,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
18
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.computeLayoutTextBlockResult = exports.computeGraphemeOffsets = void 0;
21
+ __exportStar(require("./annotations/FrameGeometry"), exports);
22
+ __exportStar(require("./annotations/TextAnnotationElement"), exports);
23
+ __exportStar(require("./annotations/TextAnnotationGeometry"), exports);
24
+ __exportStar(require("./annotations/TextBlockGeometry"), exports);
25
+ __exportStar(require("./annotations/TextBlockLayout"), exports);
22
26
  __exportStar(require("./BackendHubAccess"), exports);
23
27
  __exportStar(require("./BackendLoggerCategory"), exports);
24
28
  __exportStar(require("./BisCoreSchema"), exports);
@@ -79,11 +83,6 @@ __exportStar(require("./SchemaUtils"), exports);
79
83
  __exportStar(require("./SheetIndex"), exports);
80
84
  __exportStar(require("./SQLiteDb"), exports);
81
85
  __exportStar(require("./SqliteStatement"), exports);
82
- __exportStar(require("./TextAnnotationElement"), exports);
83
- var TextAnnotationLayout_1 = require("./TextAnnotationLayout");
84
- Object.defineProperty(exports, "computeGraphemeOffsets", { enumerable: true, get: function () { return TextAnnotationLayout_1.computeGraphemeOffsets; } });
85
- Object.defineProperty(exports, "computeLayoutTextBlockResult", { enumerable: true, get: function () { return TextAnnotationLayout_1.computeLayoutTextBlockResult; } });
86
- __exportStar(require("./TextAnnotationGeometry"), exports);
87
86
  __exportStar(require("./Texture"), exports);
88
87
  __exportStar(require("./TileStorage"), exports);
89
88
  __exportStar(require("./TxnManager"), exports);
@@ -96,6 +95,26 @@ __exportStar(require("./workspace/WorkspaceEditor"), exports);
96
95
  __exportStar(require("./SqliteChangesetReader"), exports);
97
96
  __exportStar(require("./ChangesetECAdaptor"), exports);
98
97
  __exportStar(require("./internal/cross-package"), exports);
98
+ const globalSymbolCoreBackend = Symbol.for("itwin.core.backend.globals");
99
+ if (globalThis[globalSymbolCoreBackend]) {
100
+ // Get the stack trace from when the module was first loaded
101
+ const firstLoadStack = globalThis[globalSymbolCoreBackend].stack;
102
+ const error = new Error("Multiple @itwin/core-backend imports detected! This may happen if:\n" +
103
+ "- You have multiple versions of the package installed\n" +
104
+ "- Your bundling configuration is incorrect\n" +
105
+ "- You're importing from both ESM and CommonJS versions");
106
+ /* eslint-disable no-console */
107
+ console.error("Duplicate @itwin/core-backend import:", error);
108
+ console.error("First import occurred at:", firstLoadStack);
109
+ console.error("Current import occurred at:", error.stack);
110
+ /* eslint-enable no-console */
111
+ throw error;
112
+ }
113
+ else {
114
+ globalThis[globalSymbolCoreBackend] = {
115
+ stack: new Error().stack,
116
+ };
117
+ }
99
118
  /** @docs-package-description
100
119
  * The core-backend package always runs on the computer with a local Briefcase.
101
120
  *
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F,qDAAmC;AACnC,0DAAwC;AACxC,kDAAgC;AAChC,yDAAuC;AACvC,qDAAmC;AACnC,8CAA4B;AAC5B,6CAA2B;AAC3B,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,gDAA8B;AAC9B,8CAA4B;AAC5B,6CAA2B;AAC3B,iDAA+B;AAC/B,+DAA6C;AAC7C,6DAA2C;AAC3C,4DAA0C;AAC1C,0DAAwC;AACxC,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC;AACpC,2CAAyB;AACzB,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,mDAAiC;AACjC,0DAAwC;AACxC,0DAAwC;AACxC,6CAA2B;AAC3B,kDAAgC;AAChC,8DAA4C;AAC5C,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B;AAC7B,4CAA0B;AAC1B,8CAA4B;AAC5B,qDAAmC;AACnC,6CAA2B;AAC3B,gDAA8B;AAC9B,6CAA2B;AAC3B,0CAAwB;AACxB,qDAAmC;AACnC,+CAA6B;AAC7B,2DAAyC;AACzC,kDAAgC;AAChC,iDAA+B;AAC/B,gDAA8B;AAC9B,2CAAyB;AACzB,gDAA8B;AAC9B,+CAA6B;AAC7B,6CAA2B;AAC3B,oDAAkC;AAClC,0DAAwC;AACxC,+DAKgC;AAJ9B,8HAAA,sBAAsB,OAAA;AACtB,oIAAA,4BAA4B,OAAA;AAI9B,2DAAyC;AACzC,4CAA0B;AAC1B,gDAA8B;AAC9B,+CAA6B;AAC7B,mDAAiC;AACjC,8CAA4B;AAC5B,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AACtC,8DAA4C;AAC5C,0DAAwC;AACxC,uDAAqC;AAErC,2DAAyC;AAEzC;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;IAGI;AAEJ;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;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*--------------------------------------------------------------------------------------------*/\n\nexport * from \"./BackendHubAccess\";\nexport * from \"./BackendLoggerCategory\";\nexport * from \"./BisCoreSchema\";\nexport * from \"./BlobContainerService\";\nexport * from \"./BriefcaseManager\";\nexport * from \"./CatalogDb\";\nexport * from \"./Category\";\nexport * from \"./ChangedElementsDb\";\nexport * from \"./ChangeSummaryManager\";\nexport * from \"./ChannelControl\";\nexport * from \"./CheckpointManager\";\nexport * from \"./ClassRegistry\";\nexport * from \"./CloudSqlite\";\nexport * from \"./CodeService\";\nexport * from \"./CodeSpecs\";\nexport * from \"./DevTools\";\nexport * from \"./DisplayStyle\";\nexport * from \"./domains/FunctionalElements\";\nexport * from \"./domains/FunctionalSchema\";\nexport * from \"./domains/GenericElements\";\nexport * from \"./domains/GenericSchema\";\nexport * from \"./ECDb\";\nexport * from \"./ECSchemaXmlContext\";\nexport * from \"./ECSqlStatement\";\nexport * from \"./Element\";\nexport * from \"./ElementAspect\";\nexport * from \"./ElementGraphics\";\nexport * from \"./ElementTreeWalker\";\nexport * from \"./Entity\";\nexport * from \"./EntityReferences\";\nexport * from \"./ExportGraphics\";\nexport * from \"./ExternalSource\";\nexport * from \"./FontFile\";\nexport * from \"./GeoCoordConfig\";\nexport * from \"./GeographicCRSServices\";\nexport * from \"./ImageSourceConversion\";\nexport * from \"./IModelDb\";\nexport * from \"./IModelDbFonts\";\nexport * from \"./IModelElementCloneContext\";\nexport * from \"./IModelHost\";\nexport * from \"./IModelJsFs\";\nexport * from \"./SchemaSync\";\nexport * from \"./IpcHost\";\nexport * from \"./LineStyle\";\nexport * from \"./LocalhostIpcHost\";\nexport * from \"./LocalHub\";\nexport * from \"./LockControl\";\nexport * from \"./Material\";\nexport * from \"./Model\";\nexport * from \"./NativeAppStorage\";\nexport * from \"./NativeHost\";\nexport * from \"./NavigationRelationship\";\nexport * from \"./PropertyStore\";\nexport * from \"./Relationship\";\nexport * from \"./rpc/tracing\";\nexport * from \"./Schema\";\nexport * from \"./SchemaUtils\";\nexport * from \"./SheetIndex\";\nexport * from \"./SQLiteDb\";\nexport * from \"./SqliteStatement\";\nexport * from \"./TextAnnotationElement\";\nexport {\n computeGraphemeOffsets,\n computeLayoutTextBlockResult,\n ComputeGraphemeOffsetsArgs,\n LayoutTextBlockArgs,\n} from \"./TextAnnotationLayout\";\nexport * from \"./TextAnnotationGeometry\";\nexport * from \"./Texture\";\nexport * from \"./TileStorage\";\nexport * from \"./TxnManager\";\nexport * from \"./ViewDefinition\";\nexport * from \"./ViewStore\";\nexport * from \"./workspace/Settings\";\nexport * from \"./workspace/SettingsSchemas\";\nexport * from \"./workspace/Workspace\";\nexport * from \"./workspace/WorkspaceEditor\";\nexport * from \"./SqliteChangesetReader\";\nexport * from \"./ChangesetECAdaptor\";\n\nexport * from \"./internal/cross-package\";\n\n/** @docs-package-description\n * The core-backend package always runs on the computer with a local Briefcase.\n *\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\n */\n\n/**\n * @docs-group-description BlobContainers\n * Classes for working with cloud-based blob containers.\n */\n\n/**\n * @docs-group-description Codes\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ECDb\n * Classes for working with ECDb.\n */\n\n/**\n * @docs-group-description ECSQL\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\n */\n\n/**\n * @docs-group-description ElementAspects\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ElementGeometry\n * Classes for defining the symbology and geometry of geometric elements\n */\n\n/**\n * @docs-group-description Elements\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ExportGraphics\n * APIs for producing low-level graphics primitives from element geometry.\n */\n\n/**\n * @docs-group-description HubAccess\n * APIs for working with IModelHub\n */\n\n/**\n * @docs-group-description Images\n * APIs for encoding and decoding images\n */\n\n/**\n * @docs-group-description IModelHost\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\n * See [the learning article]($docs/learning/backend/IModelHost.md).\n */\n\n/**\n * @docs-group-description iModels\n * Classes for working with [iModels]($docs/learning/iModels.md).\n * See [the learning article]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n\n/**\n * @docs-group-description Models\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description NativeApp\n * Classes for working with Mobile/Desktop Application.\n */\n\n/**\n * @docs-group-description Portability\n */\n\n/**\n * @docs-group-description Relationships\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\n */\n\n/**\n * @docs-group-description RpcInterface\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n\n/**\n * @docs-group-description Schema\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\n */\n\n/**\n * @docs-group-description SQLite\n * Classes for working directly with SQLite\n */\n\n/**\n * @docs-group-description SQLiteDb\n * Classes for working with SQLiteDb.\n */\n\n/**\n * @docs-group-description TileStorage\n * Class for working with cloud storage using iTwin/object-storage cloud providers\n */\n\n/**\n * @docs-group-description ViewDefinitions\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\n */\n\n/**\n * @docs-group-description Workspace\n * APIs for loading and using Settings and Workspace resources\n */\n"]}
1
+ {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;AAE/F,8DAA4C;AAC5C,sEAAoD;AACpD,uEAAqD;AACrD,kEAAgD;AAChD,gEAA8C;AAC9C,qDAAmC;AACnC,0DAAwC;AACxC,kDAAgC;AAChC,yDAAuC;AACvC,qDAAmC;AACnC,8CAA4B;AAC5B,6CAA2B;AAC3B,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,gDAA8B;AAC9B,8CAA4B;AAC5B,6CAA2B;AAC3B,iDAA+B;AAC/B,+DAA6C;AAC7C,6DAA2C;AAC3C,4DAA0C;AAC1C,0DAAwC;AACxC,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC;AACpC,2CAAyB;AACzB,qDAAmC;AACnC,mDAAiC;AACjC,mDAA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uB,CAAC,GAAG;QAC7C,KAAK,EAAE,IAAI,KAAK,EAAE,CAAC,KAAK;KACzB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;IAGI;AAEJ;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;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*--------------------------------------------------------------------------------------------*/\n\nexport * from \"./annotations/FrameGeometry\";\nexport * from \"./annotations/TextAnnotationElement\";\nexport * from \"./annotations/TextAnnotationGeometry\";\nexport * from \"./annotations/TextBlockGeometry\";\nexport * from \"./annotations/TextBlockLayout\";\nexport * from \"./BackendHubAccess\";\nexport * from \"./BackendLoggerCategory\";\nexport * from \"./BisCoreSchema\";\nexport * from \"./BlobContainerService\";\nexport * from \"./BriefcaseManager\";\nexport * from \"./CatalogDb\";\nexport * from \"./Category\";\nexport * from \"./ChangedElementsDb\";\nexport * from \"./ChangeSummaryManager\";\nexport * from \"./ChannelControl\";\nexport * from \"./CheckpointManager\";\nexport * from \"./ClassRegistry\";\nexport * from \"./CloudSqlite\";\nexport * from \"./CodeService\";\nexport * from \"./CodeSpecs\";\nexport * from \"./DevTools\";\nexport * from \"./DisplayStyle\";\nexport * from \"./domains/FunctionalElements\";\nexport * from \"./domains/FunctionalSchema\";\nexport * from \"./domains/GenericElements\";\nexport * from \"./domains/GenericSchema\";\nexport * from \"./ECDb\";\nexport * from \"./ECSchemaXmlContext\";\nexport * from \"./ECSqlStatement\";\nexport * from \"./Element\";\nexport * from \"./ElementAspect\";\nexport * from \"./ElementGraphics\";\nexport * from \"./ElementTreeWalker\";\nexport * from \"./Entity\";\nexport * from \"./EntityReferences\";\nexport * from \"./ExportGraphics\";\nexport * from \"./ExternalSource\";\nexport * from \"./FontFile\";\nexport * from \"./GeoCoordConfig\";\nexport * from \"./GeographicCRSServices\";\nexport * from \"./ImageSourceConversion\";\nexport * from \"./IModelDb\";\nexport * from \"./IModelDbFonts\";\nexport * from \"./IModelElementCloneContext\";\nexport * from \"./IModelHost\";\nexport * from \"./IModelJsFs\";\nexport * from \"./SchemaSync\";\nexport * from \"./IpcHost\";\nexport * from \"./LineStyle\";\nexport * from \"./LocalhostIpcHost\";\nexport * from \"./LocalHub\";\nexport * from \"./LockControl\";\nexport * from \"./Material\";\nexport * from \"./Model\";\nexport * from \"./NativeAppStorage\";\nexport * from \"./NativeHost\";\nexport * from \"./NavigationRelationship\";\nexport * from \"./PropertyStore\";\nexport * from \"./Relationship\";\nexport * from \"./rpc/tracing\";\nexport * from \"./Schema\";\nexport * from \"./SchemaUtils\";\nexport * from \"./SheetIndex\";\nexport * from \"./SQLiteDb\";\nexport * from \"./SqliteStatement\";\nexport * from \"./Texture\";\nexport * from \"./TileStorage\";\nexport * from \"./TxnManager\";\nexport * from \"./ViewDefinition\";\nexport * from \"./ViewStore\";\nexport * from \"./workspace/Settings\";\nexport * from \"./workspace/SettingsSchemas\";\nexport * from \"./workspace/Workspace\";\nexport * from \"./workspace/WorkspaceEditor\";\nexport * from \"./SqliteChangesetReader\";\nexport * from \"./ChangesetECAdaptor\";\n\nexport * from \"./internal/cross-package\";\n\nconst globalSymbolCoreBackend = Symbol.for(\"itwin.core.backend.globals\");\nif ((globalThis as any)[globalSymbolCoreBackend]) {\n // Get the stack trace from when the module was first loaded\n const firstLoadStack = (globalThis as any)[globalSymbolCoreBackend].stack;\n\n const error = new Error(\n \"Multiple @itwin/core-backend imports detected! This may happen if:\\n\" +\n \"- You have multiple versions of the package installed\\n\" +\n \"- Your bundling configuration is incorrect\\n\" +\n \"- You're importing from both ESM and CommonJS versions\"\n );\n\n /* eslint-disable no-console */\n console.error(\"Duplicate @itwin/core-backend import:\", error);\n console.error(\"First import occurred at:\", firstLoadStack);\n console.error(\"Current import occurred at:\", error.stack);\n /* eslint-enable no-console */\n\n throw error;\n} else {\n (globalThis as any)[globalSymbolCoreBackend] = {\n stack: new Error().stack,\n };\n}\n\n/** @docs-package-description\n * The core-backend package always runs on the computer with a local Briefcase.\n *\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\n */\n\n/**\n * @docs-group-description BlobContainers\n * Classes for working with cloud-based blob containers.\n */\n\n/**\n * @docs-group-description Codes\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ECDb\n * Classes for working with ECDb.\n */\n\n/**\n * @docs-group-description ECSQL\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\n */\n\n/**\n * @docs-group-description ElementAspects\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ElementGeometry\n * Classes for defining the symbology and geometry of geometric elements\n */\n\n/**\n * @docs-group-description Elements\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description ExportGraphics\n * APIs for producing low-level graphics primitives from element geometry.\n */\n\n/**\n * @docs-group-description HubAccess\n * APIs for working with IModelHub\n */\n\n/**\n * @docs-group-description Images\n * APIs for encoding and decoding images\n */\n\n/**\n * @docs-group-description IModelHost\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\n * See [the learning article]($docs/learning/backend/IModelHost.md).\n */\n\n/**\n * @docs-group-description iModels\n * Classes for working with [iModels]($docs/learning/iModels.md).\n * See [the learning article]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n\n/**\n * @docs-group-description Models\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\n * See [the learning articles]($docs/learning/backend/index.md).\n */\n\n/**\n * @docs-group-description NativeApp\n * Classes for working with Mobile/Desktop Application.\n */\n\n/**\n * @docs-group-description Portability\n */\n\n/**\n * @docs-group-description Relationships\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\n */\n\n/**\n * @docs-group-description RpcInterface\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n\n/**\n * @docs-group-description Schema\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\n */\n\n/**\n * @docs-group-description SQLite\n * Classes for working directly with SQLite\n */\n\n/**\n * @docs-group-description SQLiteDb\n * Classes for working with SQLiteDb.\n */\n\n/**\n * @docs-group-description TileStorage\n * Class for working with cloud storage using iTwin/object-storage cloud providers\n */\n\n/**\n * @docs-group-description ViewDefinitions\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\n */\n\n/**\n * @docs-group-description Workspace\n * APIs for loading and using Settings and Workspace resources\n */\n"]}
@@ -36,7 +36,7 @@ export declare class IModelReadRpcImpl extends RpcInterface implements IModelRea
36
36
  getMassPropertiesPerCandidate(tokenProps: IModelRpcProps, props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]>;
37
37
  getToolTipMessage(tokenProps: IModelRpcProps, id: string): Promise<string[]>;
38
38
  /** Send a view thumbnail to the frontend. This is a binary transfer with the metadata in a 16-byte prefix header.
39
- * @deprecated in 3.x - Use queryViewThumbnail instead
39
+ * @deprecated in 3.x - might be removed in next major version. Use queryViewThumbnail instead
40
40
  */
41
41
  getViewThumbnail(tokenProps: IModelRpcProps, viewId: string): Promise<Uint8Array>;
42
42
  getDefaultViewId(tokenProps: IModelRpcProps): Promise<Id64String>;
@@ -259,7 +259,7 @@ class IModelReadRpcImpl extends core_common_1.RpcInterface {
259
259
  return (el === undefined) ? [] : el.getToolTipMessage();
260
260
  }
261
261
  /** Send a view thumbnail to the frontend. This is a binary transfer with the metadata in a 16-byte prefix header.
262
- * @deprecated in 3.x - Use queryViewThumbnail instead
262
+ * @deprecated in 3.x - might be removed in next major version. Use queryViewThumbnail instead
263
263
  */
264
264
  async getViewThumbnail(tokenProps, viewId) {
265
265
  const iModelDb = await getIModelForRpc(tokenProps);