update Items
Producer-facing: replace the current items.
When to use this: only when you own this coordinator — the Compose-only flavor or a custom host that created the coordinator (rememberNutrientToolbarCoordinator(), or the Activity/Fragment nutrientToolbarCoordinator() extension) and renders its own com.pspdfkit.compose.toolbar.composables.NutrientMainToolbar. There you are the sole producer, so this is how you populate and update the toolbar.
Do NOT call this from PdfActivity / PdfFragment. There the SDK owns this coordinator and continuously rebuilds the item list from the menu configuration, so anything you set here is overwritten on the next refresh. To customize an SDK-hosted toolbar use com.pspdfkit.ui.PdfActivity.setToolbarItemsProvider instead — it runs inside the SDK's rebuild pipeline, so your customization is re-applied on every refresh.
Items are expected to be already pre-grouped into visible/overflow by the producer or by the pipeline. The composable layer trusts what's here — grouping is not a render-time concern .
Note: ToolbarItems.visible / ToolbarItems.overflow are immutable PersistentLists, so items.overflow.add(item) returns a new list rather than mutating in place. Apply the result with copy(...): updateItems { it.copy(overflow = it.overflow.add(item)) }.