/** * The market's block mark in the settings navigation. * * The settings shell picks nav glyphs from a closed list of section ids * (`models`, `agent-presets`, `plugins`) and falls back to its own gear for * every other id; `settings.section` projects only `id` / `order` / `label`, * so a registrant has no icon to pass — the slot contract in * `@deepseek-ai/dsh-client-ui-settings` and the runtime slot inventory both * list exactly those three options. Every third-party section therefore wears * the gear, the market included. * * So the market claims its own row once the dialog is mounted and swaps the * fallback gear for the block mark — the same mark `MarketLogo` draws inside * the section (see market-mark.ts), which is what makes the nav entry read as * the same thing as the page it opens. `dsh-better-sidebar` and * `dsh-skill-mcp-panel` solve it the same way. * * Scope, deliberately narrow: * * - only the row whose visible text equals this plugin's own localized * section label is marked; no shell structure is touched; * - the marker and the injected stylesheet belong to a `ctx.effect`, so they * are removed with the fiber; * - a locale switch re-claims the row through the MutationObserver, so the * label and the glyph never disagree. * * Delete this module (and its call in index.ts) the day `settings.section` * grows an `icon` field. */ import { MARK_BLOCK_RADIUS, MARK_BLOCK_SIZE, MARK_GRID_BLOCKS, MARK_PLUG_BLOCK, MARK_VIEW_BOX, } from './market-mark.ts' /** Marks the one nav row this plugin owns. */ export const NAV_ICON_MARKER = 'data-dsh-market-nav-icon' /** * The nav rows of the settings dialog. The shell renders each * `settings.section` entry as a `