@itwin/core-backend 5.2.0-dev.31 → 5.2.0-dev.33

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 (400) hide show
  1. package/lib/cjs/BackendHubAccess.js.map +1 -1
  2. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  3. package/lib/cjs/BisCoreSchema.js.map +1 -1
  4. package/lib/cjs/BlobContainerService.js.map +1 -1
  5. package/lib/cjs/BriefcaseManager.js.map +1 -1
  6. package/lib/cjs/CatalogDb.js.map +1 -1
  7. package/lib/cjs/Category.js.map +1 -1
  8. package/lib/cjs/ChangeSummaryManager.js +2 -2
  9. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  10. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  11. package/lib/cjs/ChangesetECAdaptor.js +248 -248
  12. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  13. package/lib/cjs/ChannelControl.js.map +1 -1
  14. package/lib/cjs/CheckpointManager.js.map +1 -1
  15. package/lib/cjs/ClassRegistry.js +5 -5
  16. package/lib/cjs/ClassRegistry.js.map +1 -1
  17. package/lib/cjs/CloudSqlite.js.map +1 -1
  18. package/lib/cjs/CodeService.js.map +1 -1
  19. package/lib/cjs/CodeSpecs.js.map +1 -1
  20. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  21. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  22. package/lib/cjs/DevTools.js.map +1 -1
  23. package/lib/cjs/DisplayStyle.js.map +1 -1
  24. package/lib/cjs/ECDb.js.map +1 -1
  25. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  26. package/lib/cjs/ECSqlStatement.js.map +1 -1
  27. package/lib/cjs/Element.js.map +1 -1
  28. package/lib/cjs/ElementAspect.js.map +1 -1
  29. package/lib/cjs/ElementGraphics.js.map +1 -1
  30. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  31. package/lib/cjs/Entity.js.map +1 -1
  32. package/lib/cjs/EntityReferences.js.map +1 -1
  33. package/lib/cjs/ExportGraphics.js.map +1 -1
  34. package/lib/cjs/ExternalSource.js.map +1 -1
  35. package/lib/cjs/FontFile.js.map +1 -1
  36. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  37. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  38. package/lib/cjs/GeometrySummary.js +47 -47
  39. package/lib/cjs/GeometrySummary.js.map +1 -1
  40. package/lib/cjs/IModelDb.js +8 -8
  41. package/lib/cjs/IModelDb.js.map +1 -1
  42. package/lib/cjs/IModelDbFonts.js.map +1 -1
  43. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  44. package/lib/cjs/IModelHost.js.map +1 -1
  45. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
  46. package/lib/cjs/IModelJsFs.js.map +1 -1
  47. package/lib/cjs/ImageSourceConversion.js.map +1 -1
  48. package/lib/cjs/IpcHost.js.map +1 -1
  49. package/lib/cjs/LineStyle.js.map +1 -1
  50. package/lib/cjs/LocalHub.js +1 -1
  51. package/lib/cjs/LocalHub.js.map +1 -1
  52. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  53. package/lib/cjs/LockControl.js.map +1 -1
  54. package/lib/cjs/Material.js.map +1 -1
  55. package/lib/cjs/Model.js.map +1 -1
  56. package/lib/cjs/NativeAppStorage.js.map +1 -1
  57. package/lib/cjs/NativeHost.js.map +1 -1
  58. package/lib/cjs/NavigationRelationship.js.map +1 -1
  59. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  60. package/lib/cjs/PropertyStore.js.map +1 -1
  61. package/lib/cjs/Relationship.js.map +1 -1
  62. package/lib/cjs/RpcBackend.js.map +1 -1
  63. package/lib/cjs/SQLiteDb.js.map +1 -1
  64. package/lib/cjs/Schema.js.map +1 -1
  65. package/lib/cjs/SchemaSync.js.map +1 -1
  66. package/lib/cjs/SchemaUtils.js.map +1 -1
  67. package/lib/cjs/SheetIndex.js.map +1 -1
  68. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  69. package/lib/cjs/SqliteStatement.js.map +1 -1
  70. package/lib/cjs/StashManager.js.map +1 -1
  71. package/lib/cjs/Texture.js.map +1 -1
  72. package/lib/cjs/TileStorage.js.map +1 -1
  73. package/lib/cjs/TxnManager.js.map +1 -1
  74. package/lib/cjs/ViewDefinition.js.map +1 -1
  75. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  76. package/lib/cjs/ViewStore.js.map +1 -1
  77. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  78. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +3 -5
  79. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  80. package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
  81. package/lib/cjs/annotations/LeaderGeometry.js +1 -1
  82. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
  83. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
  84. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -1
  85. package/lib/cjs/annotations/TextAnnotationGeometry.js +24 -17
  86. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
  87. package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -1
  88. package/lib/cjs/annotations/TextBlockGeometry.js +8 -0
  89. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
  90. package/lib/cjs/annotations/TextBlockLayout.d.ts +46 -27
  91. package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -1
  92. package/lib/cjs/annotations/TextBlockLayout.js +201 -113
  93. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
  94. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  95. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  96. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  97. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  98. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  99. package/lib/cjs/core-backend.js.map +1 -1
  100. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  101. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  102. package/lib/cjs/domains/GenericElements.js.map +1 -1
  103. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  104. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  105. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  106. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  107. package/lib/cjs/internal/FontFileImpl.js.map +1 -1
  108. package/lib/cjs/internal/HubMock.js.map +1 -1
  109. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
  110. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  111. package/lib/cjs/internal/NoLocks.js.map +1 -1
  112. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  113. package/lib/cjs/internal/Symbols.js.map +1 -1
  114. package/lib/cjs/internal/annotations/fields.d.ts.map +1 -1
  115. package/lib/cjs/internal/annotations/fields.js +3 -5
  116. package/lib/cjs/internal/annotations/fields.js.map +1 -1
  117. package/lib/cjs/internal/cross-package.js.map +1 -1
  118. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  119. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  120. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  121. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  122. package/lib/cjs/rpc/multipart.js.map +1 -1
  123. package/lib/cjs/rpc/tracing.js.map +1 -1
  124. package/lib/cjs/rpc/web/logging.js.map +1 -1
  125. package/lib/cjs/rpc/web/request.js.map +1 -1
  126. package/lib/cjs/rpc/web/response.js.map +1 -1
  127. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  128. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  129. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  130. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  131. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  132. package/lib/cjs/workspace/Settings.js.map +1 -1
  133. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  134. package/lib/cjs/workspace/Workspace.js.map +1 -1
  135. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  136. package/lib/esm/BackendHubAccess.js.map +1 -1
  137. package/lib/esm/BackendLoggerCategory.js.map +1 -1
  138. package/lib/esm/BisCoreSchema.js.map +1 -1
  139. package/lib/esm/BlobContainerService.js.map +1 -1
  140. package/lib/esm/BriefcaseManager.js.map +1 -1
  141. package/lib/esm/CatalogDb.js.map +1 -1
  142. package/lib/esm/Category.js.map +1 -1
  143. package/lib/esm/ChangeSummaryManager.js +2 -2
  144. package/lib/esm/ChangeSummaryManager.js.map +1 -1
  145. package/lib/esm/ChangedElementsDb.js.map +1 -1
  146. package/lib/esm/ChangesetECAdaptor.js +248 -248
  147. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  148. package/lib/esm/ChannelControl.js.map +1 -1
  149. package/lib/esm/CheckpointManager.js.map +1 -1
  150. package/lib/esm/ClassRegistry.js +5 -5
  151. package/lib/esm/ClassRegistry.js.map +1 -1
  152. package/lib/esm/CloudSqlite.js.map +1 -1
  153. package/lib/esm/CodeService.js.map +1 -1
  154. package/lib/esm/CodeSpecs.js.map +1 -1
  155. package/lib/esm/ConcurrentQuery.js.map +1 -1
  156. package/lib/esm/CustomViewState3dCreator.js.map +1 -1
  157. package/lib/esm/DevTools.js.map +1 -1
  158. package/lib/esm/DisplayStyle.js.map +1 -1
  159. package/lib/esm/ECDb.js.map +1 -1
  160. package/lib/esm/ECSchemaXmlContext.js.map +1 -1
  161. package/lib/esm/ECSqlStatement.js.map +1 -1
  162. package/lib/esm/Element.js.map +1 -1
  163. package/lib/esm/ElementAspect.js.map +1 -1
  164. package/lib/esm/ElementGraphics.js.map +1 -1
  165. package/lib/esm/ElementTreeWalker.js.map +1 -1
  166. package/lib/esm/Entity.js.map +1 -1
  167. package/lib/esm/EntityReferences.js.map +1 -1
  168. package/lib/esm/ExportGraphics.js.map +1 -1
  169. package/lib/esm/ExternalSource.js.map +1 -1
  170. package/lib/esm/FontFile.js.map +1 -1
  171. package/lib/esm/GeoCoordConfig.js.map +1 -1
  172. package/lib/esm/GeographicCRSServices.js.map +1 -1
  173. package/lib/esm/GeometrySummary.js +47 -47
  174. package/lib/esm/GeometrySummary.js.map +1 -1
  175. package/lib/esm/IModelDb.js +8 -8
  176. package/lib/esm/IModelDb.js.map +1 -1
  177. package/lib/esm/IModelDbFonts.js.map +1 -1
  178. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  179. package/lib/esm/IModelHost.js.map +1 -1
  180. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
  181. package/lib/esm/IModelJsFs.js.map +1 -1
  182. package/lib/esm/ImageSourceConversion.js.map +1 -1
  183. package/lib/esm/IpcHost.js.map +1 -1
  184. package/lib/esm/LineStyle.js.map +1 -1
  185. package/lib/esm/LocalHub.js +1 -1
  186. package/lib/esm/LocalHub.js.map +1 -1
  187. package/lib/esm/LocalhostIpcHost.js.map +1 -1
  188. package/lib/esm/LockControl.js.map +1 -1
  189. package/lib/esm/Material.js.map +1 -1
  190. package/lib/esm/Model.js.map +1 -1
  191. package/lib/esm/NativeAppStorage.js.map +1 -1
  192. package/lib/esm/NativeHost.js.map +1 -1
  193. package/lib/esm/NavigationRelationship.js.map +1 -1
  194. package/lib/esm/PromiseMemoizer.js.map +1 -1
  195. package/lib/esm/PropertyStore.js.map +1 -1
  196. package/lib/esm/Relationship.js.map +1 -1
  197. package/lib/esm/RpcBackend.js.map +1 -1
  198. package/lib/esm/SQLiteDb.js.map +1 -1
  199. package/lib/esm/Schema.js.map +1 -1
  200. package/lib/esm/SchemaSync.js.map +1 -1
  201. package/lib/esm/SchemaUtils.js.map +1 -1
  202. package/lib/esm/SheetIndex.js.map +1 -1
  203. package/lib/esm/SqliteChangesetReader.js.map +1 -1
  204. package/lib/esm/SqliteStatement.js.map +1 -1
  205. package/lib/esm/StashManager.js.map +1 -1
  206. package/lib/esm/Texture.js.map +1 -1
  207. package/lib/esm/TileStorage.js.map +1 -1
  208. package/lib/esm/TxnManager.js.map +1 -1
  209. package/lib/esm/ViewDefinition.js.map +1 -1
  210. package/lib/esm/ViewStateHydrator.js.map +1 -1
  211. package/lib/esm/ViewStore.js.map +1 -1
  212. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  213. package/lib/esm/annotations/ElementDrivesTextAnnotation.js +4 -6
  214. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  215. package/lib/esm/annotations/FrameGeometry.js.map +1 -1
  216. package/lib/esm/annotations/LeaderGeometry.js +1 -1
  217. package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
  218. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
  219. package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -1
  220. package/lib/esm/annotations/TextAnnotationGeometry.js +24 -17
  221. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
  222. package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -1
  223. package/lib/esm/annotations/TextBlockGeometry.js +8 -0
  224. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
  225. package/lib/esm/annotations/TextBlockLayout.d.ts +46 -27
  226. package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -1
  227. package/lib/esm/annotations/TextBlockLayout.js +202 -114
  228. package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
  229. package/lib/esm/core-backend.js.map +1 -1
  230. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  231. package/lib/esm/domains/FunctionalSchema.js.map +1 -1
  232. package/lib/esm/domains/GenericElements.js.map +1 -1
  233. package/lib/esm/domains/GenericSchema.js.map +1 -1
  234. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
  235. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  236. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  237. package/lib/esm/internal/FontFileImpl.js.map +1 -1
  238. package/lib/esm/internal/HubMock.js.map +1 -1
  239. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
  240. package/lib/esm/internal/NativePlatform.js.map +1 -1
  241. package/lib/esm/internal/NoLocks.js.map +1 -1
  242. package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
  243. package/lib/esm/internal/Symbols.js.map +1 -1
  244. package/lib/esm/internal/annotations/fields.d.ts.map +1 -1
  245. package/lib/esm/internal/annotations/fields.js +4 -6
  246. package/lib/esm/internal/annotations/fields.js.map +1 -1
  247. package/lib/esm/internal/cross-package.js.map +1 -1
  248. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
  249. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  250. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  251. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  252. package/lib/esm/rpc/multipart.js.map +1 -1
  253. package/lib/esm/rpc/tracing.js.map +1 -1
  254. package/lib/esm/rpc/web/logging.js.map +1 -1
  255. package/lib/esm/rpc/web/request.js.map +1 -1
  256. package/lib/esm/rpc/web/response.js.map +1 -1
  257. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  258. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  259. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  260. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  261. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  262. package/lib/esm/test/AdvancedEqual.js.map +1 -1
  263. package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
  264. package/lib/esm/test/AttachDb.test.js +11 -11
  265. package/lib/esm/test/AttachDb.test.js.map +1 -1
  266. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  267. package/lib/esm/test/GeometryTestUtil.js.map +1 -1
  268. package/lib/esm/test/IModelHost.test.js.map +1 -1
  269. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  270. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
  271. package/lib/esm/test/IpcHost.test.js.map +1 -1
  272. package/lib/esm/test/KnownTestLocations.js.map +1 -1
  273. package/lib/esm/test/PrintElementTree.js.map +1 -1
  274. package/lib/esm/test/PropertyDb.test.js.map +1 -1
  275. package/lib/esm/test/RevisionUtility.js.map +1 -1
  276. package/lib/esm/test/SchemaUtils.test.js +25 -25
  277. package/lib/esm/test/SchemaUtils.test.js.map +1 -1
  278. package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
  279. package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
  280. package/lib/esm/test/TestUtils.js.map +1 -1
  281. package/lib/esm/test/annotations/Fields.test.js +42 -40
  282. package/lib/esm/test/annotations/Fields.test.js.map +1 -1
  283. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
  284. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
  285. package/lib/esm/test/annotations/TextAnnotation.test.js +1 -1
  286. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  287. package/lib/esm/test/annotations/TextBlock.test.js +417 -54
  288. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
  289. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
  290. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
  291. package/lib/esm/test/categories/Category.test.js.map +1 -1
  292. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
  293. package/lib/esm/test/ecdb/CTE.test.js +88 -88
  294. package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
  295. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +15 -15
  296. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
  297. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
  298. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  299. package/lib/esm/test/ecdb/ECDb.test.js +72 -72
  300. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  301. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
  302. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
  303. package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
  304. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
  305. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  306. package/lib/esm/test/ecdb/ECSqlReader.test.js +16 -16
  307. package/lib/esm/test/ecdb/ECSqlReader.test.js.map +1 -1
  308. package/lib/esm/test/ecdb/ECSqlStatement.test.js +326 -326
  309. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  310. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
  311. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
  312. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
  313. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
  314. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
  315. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
  316. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
  317. package/lib/esm/test/element/ElementAspect.test.js +22 -22
  318. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  319. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
  320. package/lib/esm/test/element/ElementRoundTrip.test.js +139 -139
  321. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
  322. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
  323. package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
  324. package/lib/esm/test/element/NullStructArray.test.js +13 -13
  325. package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
  326. package/lib/esm/test/element/UrlLink.test.js.map +1 -1
  327. package/lib/esm/test/font/FontFile.test.js.map +1 -1
  328. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
  329. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +32 -32
  330. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
  331. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
  332. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
  333. package/lib/esm/test/hubaccess/Rebase.test.js +33 -33
  334. package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
  335. package/lib/esm/test/imageData.js.map +1 -1
  336. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
  337. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
  338. package/lib/esm/test/imodel/IModel.test.js +44 -44
  339. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  340. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
  341. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
  342. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
  343. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
  344. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -1
  345. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -1
  346. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -1
  347. package/lib/esm/test/index.js.map +1 -1
  348. package/lib/esm/test/misc/DevTools.test.js.map +1 -1
  349. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
  350. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  351. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
  352. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
  353. package/lib/esm/test/rpc/response.test.js.map +1 -1
  354. package/lib/esm/test/schema/ClassRegistry.test.js +99 -99
  355. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  356. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
  357. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
  358. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
  359. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
  360. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  361. package/lib/esm/test/standalone/ChangesetReader.test.js +117 -117
  362. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  363. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
  364. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
  365. package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
  366. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
  367. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
  368. package/lib/esm/test/standalone/ExportGraphics.test.js +14 -14
  369. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  370. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
  371. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  372. package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
  373. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
  374. package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
  375. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  376. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
  377. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
  378. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
  379. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  380. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
  381. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
  382. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
  383. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
  384. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
  385. package/lib/esm/test/standalone/Setting.test.js.map +1 -1
  386. package/lib/esm/test/standalone/Settings.test.js.map +1 -1
  387. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  388. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  389. package/lib/esm/test/standalone/Texture.test.js.map +1 -1
  390. package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
  391. package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
  392. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  393. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
  394. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
  395. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  396. package/lib/esm/workspace/Settings.js.map +1 -1
  397. package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
  398. package/lib/esm/workspace/Workspace.js.map +1 -1
  399. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
  400. package/package.json +12 -12
@@ -59,11 +59,10 @@ function computeLayoutTextBlockResult(args) {
59
59
  * @beta
60
60
  */
61
61
  function computeGraphemeOffsets(args) {
62
- const { textBlock, paragraphIndex, runLayoutResult, graphemeCharIndexes, iModel } = args;
62
+ const { source, runLayoutResult, graphemeCharIndexes, iModel } = args;
63
63
  const findFontId = args.findFontId ?? ((name, type) => iModel.fonts.findId({ name, type }) ?? 0);
64
64
  const computeTextRange = args.computeTextRange ?? ((x) => iModel.computeRangesForText(x));
65
- const source = textBlock.paragraphs[paragraphIndex].runs[runLayoutResult.sourceRunIndex];
66
- if (source.type !== "text" || runLayoutResult.characterCount === 0) {
65
+ if (!(source instanceof core_common_1.TextRun) || runLayoutResult.characterCount === 0) {
67
66
  return [];
68
67
  }
69
68
  const style = core_common_1.TextStyleSettings.fromJSON(runLayoutResult.textStyle);
@@ -127,29 +126,27 @@ class TextStyleResolver {
127
126
  if (args.textBlock.styleOverrides)
128
127
  this.blockSettings = this.blockSettings.clone(args.textBlock.styleOverrides);
129
128
  }
130
- resolveParagraphSettingsImpl(paragraph) {
129
+ /**
130
+ * Resolves the effective text style settings for a given TextBlockComponent, applying block-level overrides.
131
+ */
132
+ resolveSettings(overrides, isLeader = false) {
131
133
  let settings = this.blockSettings;
132
- if (paragraph.overridesStyle)
133
- settings = settings.clone(paragraph.styleOverrides);
134
- return settings;
135
- }
136
- /** Resolves the effective style for a [TextAnnotationLeader]($common). The TextAnnotationLeader should be a sibling of the provided TextBlock. */
137
- resolveTextAnnotationLeaderSettings(leader) {
138
- let settings = this.blockSettings;
139
- if (leader.styleOverrides)
140
- settings = settings.clone(leader.styleOverrides);
141
- return applyBlockSettings(settings, this.blockSettings, true);
142
- }
143
- /** Resolves the effective style for a [Paragraph]($common). Paragraph should be child of provided TextBlock. */
144
- resolveParagraphSettings(paragraph) {
145
- return applyBlockSettings(this.resolveParagraphSettingsImpl(paragraph), this.blockSettings);
146
- }
147
- /** Resolves the effective style for a [Run]($common). Run should be child of provided Paragraph and TextBlock. */
148
- resolveRunSettings(paragraph, run) {
149
- let settings = this.resolveParagraphSettingsImpl(paragraph);
150
- if (run.overridesStyle)
151
- settings = settings.clone(run.styleOverrides);
152
- return applyBlockSettings(settings, this.blockSettings);
134
+ if (overrides)
135
+ settings = settings.clone(overrides);
136
+ return applyBlockSettings(settings, this.blockSettings, isLeader);
137
+ }
138
+ resolveMarkerText(overrides, index) {
139
+ const markerSettings = overrides.listMarker ?? this.blockSettings.listMarker;
140
+ return (0, core_common_1.getMarkerText)(markerSettings, index);
141
+ }
142
+ /**
143
+ * Computes the indentation based on its style and nesting depth.
144
+ */
145
+ resolveIndentation(styleOverrides, depth) {
146
+ const overrides = this.resolveSettings(styleOverrides);
147
+ const indentation = overrides.indentation;
148
+ const tabInterval = overrides.tabInterval;
149
+ return indentation + tabInterval * depth;
153
150
  }
154
151
  }
155
152
  exports.TextStyleResolver = TextStyleResolver;
@@ -240,9 +237,9 @@ class LayoutContext {
240
237
  layout.extendRange(denominator);
241
238
  return { layout, numerator, denominator };
242
239
  }
243
- computeRangeForTabRun(style, source, length) {
240
+ computeRangeForTabRun(style, source, lengthFromLastTab) {
244
241
  const interval = source.styleOverrides.tabInterval ?? style.tabInterval;
245
- const tabEndX = interval - length % interval;
242
+ const tabEndX = interval - lengthFromLastTab % interval;
246
243
  const range = new core_geometry_1.Range2d(0, 0, 0, style.lineHeight);
247
244
  range.extendXY(tabEndX, range.low.y);
248
245
  return range;
@@ -298,8 +295,8 @@ class RunLayout {
298
295
  this.style = props.style;
299
296
  this.fontId = props.fontId;
300
297
  }
301
- static create(source, parentParagraph, context) {
302
- const style = context.textStyleResolver.resolveRunSettings(parentParagraph, source);
298
+ static create(source, context, cumulativeOverrides) {
299
+ const style = context.textStyleResolver.resolveSettings(cumulativeOverrides);
303
300
  const fontId = context.findFontId(style.fontName);
304
301
  const charOffset = 0;
305
302
  const offsetFromLine = { x: 0, y: 0 };
@@ -368,9 +365,8 @@ class RunLayout {
368
365
  });
369
366
  });
370
367
  }
371
- toResult(paragraph) {
368
+ toResult() {
372
369
  const result = {
373
- sourceRunIndex: paragraph.runs.indexOf(this.source),
374
370
  fontId: this.fontId,
375
371
  characterOffset: this.charOffset,
376
372
  characterCount: this.numChars,
@@ -400,32 +396,47 @@ exports.RunLayout = RunLayout;
400
396
  class LineLayout {
401
397
  source;
402
398
  range = new core_geometry_1.Range2d(0, 0, 0, 0);
399
+ runRange = new core_geometry_1.Range2d(0, 0, 0, 0); // Range of all runs excluding marker.
403
400
  justificationRange = new core_geometry_1.Range2d(0, 0, 0, 0);
404
- offsetFromDocument = { x: 0, y: 0 };
401
+ offsetFromDocument;
402
+ depth;
405
403
  lengthFromLastTab = 0; // Used to track the length from the last tab for tab runs.
406
404
  _runs = [];
407
- constructor(source) {
405
+ _marker;
406
+ constructor(source, style, context, depth = 0) {
408
407
  this.source = source;
408
+ this.depth = depth;
409
+ this.offsetFromDocument = { x: context?.textStyleResolver.resolveIndentation(style, depth) ?? 0, y: 0 };
409
410
  }
410
411
  /** Compute a string representation, primarily for debugging purposes. */
411
412
  stringify() {
412
413
  const runs = this._runs.map((run) => run.stringify());
413
414
  return `${runs.join("")}`;
414
415
  }
416
+ /** Gets the array of RunLayout objects contained in this line. */
415
417
  get runs() { return this._runs; }
418
+ /** Indicates whether this line contains any runs. */
416
419
  get isEmpty() { return this._runs.length === 0; }
420
+ /** Gets the last RunLayout in this line. */
417
421
  get back() {
418
422
  (0, core_bentley_1.assert)(!this.isEmpty);
419
423
  return this._runs[this._runs.length - 1];
420
424
  }
425
+ /**
426
+ * Gets or sets the marker RunLayout for this line, used for lists.
427
+ * A marker is the symbol or character that appears before each list item in a list, bullets, numbers, etc.
428
+ * */
429
+ get marker() { return this._marker; }
430
+ set marker(value) { this._marker = value; }
421
431
  append(run) {
422
432
  this._runs.push(run);
423
433
  this.computeRanges();
424
434
  }
425
435
  /** Invoked every time a run is appended,. */
426
436
  computeRanges() {
427
- this.range.low.setZero();
428
- this.range.high.setZero();
437
+ this.runRange.low.setZero();
438
+ this.runRange.high.setZero();
439
+ this.lengthFromLastTab = 0;
429
440
  // Some runs (fractions) are taller than others.
430
441
  // We want to center each run vertically inside the line.
431
442
  let lineHeight = 0;
@@ -434,26 +445,39 @@ class LineLayout {
434
445
  }
435
446
  for (const run of this._runs) {
436
447
  const runHeight = run.range.yLength();
437
- const runOffset = { x: this.range.high.x, y: (lineHeight - runHeight) / 2 };
448
+ const runOffset = { x: this.runRange.high.x, y: (lineHeight - runHeight) / 2 };
438
449
  run.offsetFromLine = runOffset;
439
450
  const runLayoutRange = run.range.cloneTranslated(runOffset);
440
- this.range.extendRange(runLayoutRange);
451
+ this.runRange.extendRange(runLayoutRange);
441
452
  if ("linebreak" !== run.source.type) {
442
453
  const runJustificationRange = run.justificationRange?.cloneTranslated(runOffset);
443
454
  this.justificationRange.extendRange(runJustificationRange ?? runLayoutRange);
444
455
  }
445
- if (run.source.type === "tab") {
456
+ if ("tab" === run.source.type) {
446
457
  this.lengthFromLastTab = 0;
447
458
  }
448
459
  else {
449
460
  this.lengthFromLastTab += run.range.xLength();
450
461
  }
451
462
  }
463
+ this.range.setFrom(this.runRange);
464
+ if (this._marker) {
465
+ const indentation = this.range.low.x;
466
+ const x = indentation - (this._marker.style.tabInterval / 2) - this._marker.range.xLength();
467
+ const runHeight = this._marker.range.yLength();
468
+ const runOffset = {
469
+ x,
470
+ y: (lineHeight - runHeight) / 2 // Center the marker vertically in the line.
471
+ };
472
+ this._marker.offsetFromLine = runOffset;
473
+ const markerRange = this._marker.range.cloneTranslated(this._marker.offsetFromLine);
474
+ this.range.extendRange(markerRange);
475
+ }
452
476
  }
453
- toResult(textBlock) {
477
+ toResult() {
454
478
  return {
455
- sourceParagraphIndex: textBlock.paragraphs.indexOf(this.source),
456
- runs: this.runs.map((x) => x.toResult(this.source)),
479
+ runs: this.runs.map((x) => x.toResult()),
480
+ marker: this.marker?.toResult(),
457
481
  range: this.range.toJSON(),
458
482
  justificationRange: this.justificationRange.toJSON(),
459
483
  offsetFromDocument: this.offsetFromDocument,
@@ -488,7 +512,7 @@ class TextBlockLayout {
488
512
  }
489
513
  toResult() {
490
514
  return {
491
- lines: this.lines.map((x) => x.toResult(this.source)),
515
+ lines: this.lines.map((x) => x.toResult()),
492
516
  range: this.range.toJSON(),
493
517
  };
494
518
  }
@@ -502,59 +526,151 @@ class TextBlockLayout {
502
526
  }
503
527
  populateLines(context) {
504
528
  const doc = this.source;
505
- if (doc.paragraphs.length === 0) {
529
+ if (!doc.children || doc.children.length === 0) {
506
530
  return;
507
531
  }
508
- const doWrap = doc.width > 0;
509
- let curLine = new LineLayout(doc.paragraphs[0]);
510
- for (let i = 0; i < doc.paragraphs.length; i++) {
511
- const paragraph = doc.paragraphs[i];
512
- if (i > 0) {
513
- curLine = this.flushLine(context, curLine, paragraph);
514
- }
515
- let runs = paragraph.runs.map((run) => RunLayout.create(run, paragraph, context));
516
- if (doWrap) {
517
- runs = runs.map((run) => run.split(context)).flat();
518
- }
519
- for (const run of runs) {
520
- if ("linebreak" === run.source.type) {
521
- curLine.append(run);
522
- curLine = this.flushLine(context, curLine);
523
- continue;
532
+ let curLine = new LineLayout(doc.children[0], doc.children[0].styleOverrides, context);
533
+ let childIndex = 0;
534
+ for (const child of doc.children) {
535
+ curLine = this.populateComponent(child, childIndex++, context, doc.width, curLine, doc, doc.styleOverrides);
536
+ }
537
+ if (curLine.runs.length > 0) {
538
+ this.flushLine(context, curLine, doc.styleOverrides);
539
+ }
540
+ }
541
+ populateComponent(component, componentIndex, context, docWidth, curLine, parent, cumulativeOverrides, depth = 0) {
542
+ cumulativeOverrides = { ...cumulativeOverrides, ...component.styleOverrides };
543
+ switch (component.type) {
544
+ case "list": {
545
+ // If we have any runs in the current line, flush it before starting the list.
546
+ if (curLine.runs.length > 0) {
547
+ curLine = this.flushLine(context, curLine, cumulativeOverrides, component.children[0], true, depth + 1);
524
548
  }
525
- // If this is a tab, we need to apply the tab shift first, and then we can treat it like a text run.
526
- applyTabShift(run, curLine, context);
527
- // If our width is not set (doWrap is false), then we don't have to compute word wrapping, so just append the run, and continue.
528
- if (!doWrap) {
529
- curLine.append(run);
530
- continue;
549
+ else {
550
+ // If not, we need to apply the indentation for the list to the first line.
551
+ curLine.offsetFromDocument.x = context.textStyleResolver.resolveIndentation(cumulativeOverrides, depth + 1);
552
+ curLine.depth = depth + 1;
531
553
  }
532
- // Next, determine if we can append this run to the current line without exceeding the document width
533
- const runWidth = run.range.xLength();
534
- const lineWidth = curLine.range.xLength();
535
- // If true, then no word wrapping is required, so we can append to the current line.
536
- if (runWidth + lineWidth < doc.width || core_geometry_1.Geometry.isAlmostEqualNumber(runWidth + lineWidth, doc.width, core_geometry_1.Geometry.smallMetricDistance)) {
537
- curLine.append(run);
538
- continue;
554
+ // Iterate through each list item, setting the marker and populating its contents.
555
+ component.children.forEach((child, index) => {
556
+ const markerContent = context.textStyleResolver.resolveMarkerText(cumulativeOverrides, index + 1);
557
+ const markerRun = core_common_1.TextRun.create({ content: markerContent });
558
+ curLine.marker = RunLayout.create(markerRun, context, cumulativeOverrides);
559
+ curLine = this.populateComponent(child, index, context, docWidth, curLine, component, cumulativeOverrides, depth + 1);
560
+ });
561
+ // Lastly flush the line.
562
+ const nextSibling = parent?.children[componentIndex + 1];
563
+ if (curLine && nextSibling) {
564
+ curLine = this.flushLine(context, curLine, cumulativeOverrides, nextSibling, true, depth);
539
565
  }
540
- // Do word wrapping
541
- if (curLine.runs.length === 0) {
542
- curLine.append(run);
543
- // Lastly, flush line
544
- curLine = this.flushLine(context, curLine);
566
+ break;
567
+ }
568
+ case "paragraph": {
569
+ // Iterate through each paragraph child (either a list or a run), populating its contents.
570
+ component.children.forEach((child, index) => {
571
+ curLine = this.populateComponent(child, index, context, docWidth, curLine, component, cumulativeOverrides, depth);
572
+ });
573
+ // Lastly flush the line.
574
+ const nextSibling = parent?.children[componentIndex + 1];
575
+ if (curLine && nextSibling) {
576
+ curLine = this.flushLine(context, curLine, cumulativeOverrides, nextSibling, true, depth);
577
+ }
578
+ break;
579
+ }
580
+ case "text": {
581
+ const layout = RunLayout.create(component, context, cumulativeOverrides);
582
+ // Text can be word-wrapped, so we need to split it into multiple runs if necessary.
583
+ if (docWidth > 0) {
584
+ layout.split(context).forEach(r => { curLine = this.populateRun(curLine, r, context, cumulativeOverrides, docWidth); });
545
585
  }
546
586
  else {
547
- // First, flush line
548
- curLine = this.flushLine(context, curLine);
549
- // Recompute tab shift if applicable
550
- applyTabShift(run, curLine, context);
551
- curLine.append(run);
587
+ curLine = this.populateRun(curLine, layout, context, cumulativeOverrides, docWidth);
552
588
  }
589
+ break;
553
590
  }
591
+ case "fraction":
592
+ case "tab": {
593
+ const layout = RunLayout.create(component, context, cumulativeOverrides);
594
+ curLine = this.populateRun(curLine, layout, context, cumulativeOverrides, docWidth);
595
+ break;
596
+ }
597
+ case "linebreak": {
598
+ const layout = RunLayout.create(component, context, cumulativeOverrides);
599
+ curLine.append(layout);
600
+ curLine = this.flushLine(context, curLine, cumulativeOverrides, undefined, undefined, depth);
601
+ break;
602
+ }
603
+ default: break;
554
604
  }
555
- if (curLine.runs.length > 0) {
556
- this.flushLine(context, curLine);
605
+ return curLine;
606
+ }
607
+ ;
608
+ populateRun(curLine, run, context, cumulativeOverrides, docWidth) {
609
+ // If this is a tab, we need to apply the tab shift first, and then we can treat it like a text run.
610
+ applyTabShift(run, curLine, context);
611
+ // If our width is not set, then we don't have to compute word wrapping, so just append the run, and continue.
612
+ if (docWidth <= 0) {
613
+ curLine.append(run);
614
+ return curLine;
615
+ }
616
+ // If not, we need to determine if we can append this run to the current line without exceeding the document width or if we need to word wrap.
617
+ const runWidth = run.justificationRange?.xLength() ?? run.range.xLength();
618
+ const lineWidth = curLine.runRange.xLength();
619
+ const newWidth = runWidth + lineWidth + curLine.offsetFromDocument.x;
620
+ // If true, then no word wrapping is required, so we can append to the current line.
621
+ if (newWidth < docWidth || core_geometry_1.Geometry.isAlmostEqualNumber(newWidth, docWidth, core_geometry_1.Geometry.smallMetricDistance)) {
622
+ curLine.append(run);
623
+ return curLine;
624
+ }
625
+ // If not, do word wrapping
626
+ if (curLine.runs.length === 0) {
627
+ curLine.append(run);
628
+ // Lastly, flush line
629
+ curLine = this.flushLine(context, curLine, cumulativeOverrides, undefined, undefined, curLine.depth);
557
630
  }
631
+ else {
632
+ // First, flush line
633
+ curLine = this.flushLine(context, curLine, cumulativeOverrides, undefined, undefined, curLine.depth);
634
+ // Recompute tab shift if applicable
635
+ applyTabShift(run, curLine, context);
636
+ curLine.append(run);
637
+ }
638
+ return curLine;
639
+ }
640
+ ;
641
+ flushLine(context, curLine, cumulativeOverrides, next, newParagraph = false, depth = 0) {
642
+ next = next ?? curLine.source;
643
+ // We want to guarantee that each layout line has at least one run.
644
+ if (curLine.runs.length === 0) {
645
+ if (this.lines.length === 0 || this._back.runs.length === 0) {
646
+ return new LineLayout(next, cumulativeOverrides, context, depth);
647
+ }
648
+ if (curLine.source.type !== "linebreak") {
649
+ const newLine = new LineLayout(next, cumulativeOverrides, context, depth);
650
+ newLine.offsetFromDocument.y -= context.textStyleResolver.blockSettings.paragraphSpacingFactor * context.textStyleResolver.blockSettings.lineHeight;
651
+ return newLine;
652
+ }
653
+ const run = curLine.source.clone();
654
+ curLine.append(RunLayout.create(run, context, cumulativeOverrides));
655
+ }
656
+ // Line origin is its baseline.
657
+ const lineOffset = { ...curLine.offsetFromDocument }; // Start with the line's original offset, which includes indentation.
658
+ lineOffset.y -= curLine.range.yLength(); // Shift down the baseline
659
+ // Place it below any existing lines
660
+ if (this.lines.length > 0) {
661
+ lineOffset.y += this._back.offsetFromDocument.y;
662
+ lineOffset.y -= context.textStyleResolver.blockSettings.lineSpacingFactor * context.textStyleResolver.blockSettings.lineHeight;
663
+ }
664
+ curLine.offsetFromDocument = lineOffset;
665
+ // Update document range from computed line range and position
666
+ this.textRange.extendRange(curLine.range.cloneTranslated(lineOffset));
667
+ this.lines.push(curLine);
668
+ if (newParagraph) {
669
+ const newLine = new LineLayout(next, cumulativeOverrides, context, depth);
670
+ newLine.offsetFromDocument.y -= context.textStyleResolver.blockSettings.paragraphSpacingFactor * context.textStyleResolver.blockSettings.lineHeight;
671
+ return newLine;
672
+ }
673
+ return new LineLayout(next, cumulativeOverrides, context, depth);
558
674
  }
559
675
  justifyLines() {
560
676
  // 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.
@@ -565,7 +681,7 @@ class TextBlockLayout {
565
681
  const docWidth = this.source.width;
566
682
  let minOffset = Number.MAX_VALUE;
567
683
  for (const line of this.lines) {
568
- const lineWidth = line.justificationRange.xLength();
684
+ const lineWidth = line.justificationRange.xLength() + line.offsetFromDocument.x;
569
685
  let offset = docWidth - lineWidth;
570
686
  if ("center" === this.source.justification) {
571
687
  offset = offset / 2;
@@ -579,34 +695,6 @@ class TextBlockLayout {
579
695
  this.textRange.high.x += minOffset;
580
696
  }
581
697
  }
582
- flushLine(context, line, nextParagraph) {
583
- nextParagraph = nextParagraph ?? line.source;
584
- // We want to guarantee that each layout line has at least one run.
585
- if (line.runs.length === 0) {
586
- // If we're empty, there should always be a preceding run, and it should be a line break.
587
- if (this.lines.length === 0 || this._back.runs.length === 0) {
588
- return new LineLayout(nextParagraph);
589
- }
590
- const prevRun = this._back.back.source;
591
- (0, core_bentley_1.assert)(prevRun.type === "linebreak");
592
- if (prevRun.type !== "linebreak") {
593
- return new LineLayout(nextParagraph);
594
- }
595
- line.append(RunLayout.create(prevRun.clone(), line.source, context));
596
- }
597
- // Line origin is its baseline.
598
- const lineOffset = { x: 0, y: -line.range.yLength() };
599
- // Place it below any existing lines
600
- if (this.lines.length > 0) {
601
- lineOffset.y += this._back.offsetFromDocument.y;
602
- lineOffset.y -= context.textStyleResolver.blockSettings.lineSpacingFactor * context.textStyleResolver.blockSettings.lineHeight;
603
- }
604
- line.offsetFromDocument = lineOffset;
605
- // Update document range from computed line range and position
606
- this.textRange.extendRange(line.range.cloneTranslated(lineOffset));
607
- this.lines.push(line);
608
- return new LineLayout(nextParagraph);
609
- }
610
698
  applyMargins(margins) {
611
699
  this.range = this.textRange.clone();
612
700
  if (this.range.isNull)