@embedpdf/viewer-chrome 3.0.0-next.13 → 3.0.0-next.15

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 (157) hide show
  1. package/README.md +175 -132
  2. package/dist/annotation-fonts-BqoLZ4Mp.js +80 -0
  3. package/dist/annotation-fonts-BqoLZ4Mp.js.map +1 -0
  4. package/dist/annotation-fonts-Dt0IQXhz.cjs +91 -0
  5. package/dist/annotation-fonts-Dt0IQXhz.cjs.map +1 -0
  6. package/dist/annotation-style--rPIZsuP.js +879 -0
  7. package/dist/annotation-style--rPIZsuP.js.map +1 -0
  8. package/dist/annotation-style-Bzvvp8-N.cjs +879 -0
  9. package/dist/annotation-style-Bzvvp8-N.cjs.map +1 -0
  10. package/dist/ar-D9XKAmDx.js +567 -0
  11. package/dist/ar-D9XKAmDx.js.map +1 -0
  12. package/dist/ar-DnEj5vbP.cjs +567 -0
  13. package/dist/ar-DnEj5vbP.cjs.map +1 -0
  14. package/dist/chrome.cjs +378 -221
  15. package/dist/chrome.cjs.map +1 -1
  16. package/dist/chrome.d.cts +5 -34
  17. package/dist/chrome.d.ts +5 -34
  18. package/dist/chrome.js +377 -218
  19. package/dist/chrome.js.map +1 -1
  20. package/dist/commands-BmgxhJ8B.js +953 -0
  21. package/dist/commands-BmgxhJ8B.js.map +1 -0
  22. package/dist/commands-CYt4SFUX.cjs +1060 -0
  23. package/dist/commands-CYt4SFUX.cjs.map +1 -0
  24. package/dist/commands.cjs +12 -595
  25. package/dist/commands.d.cts +29 -4
  26. package/dist/commands.d.ts +29 -4
  27. package/dist/commands.js +2 -593
  28. package/dist/comments-panel-MUVgLCBI.js +514 -0
  29. package/dist/comments-panel-MUVgLCBI.js.map +1 -0
  30. package/dist/comments-panel-pEcQg4Vs.cjs +514 -0
  31. package/dist/comments-panel-pEcQg4Vs.cjs.map +1 -0
  32. package/dist/de-Bdr4aWzm.js +566 -0
  33. package/dist/de-Bdr4aWzm.js.map +1 -0
  34. package/dist/de-Dv6zvbnd.cjs +566 -0
  35. package/dist/de-Dv6zvbnd.cjs.map +1 -0
  36. package/dist/dialog-B5GBisKv.js +55 -0
  37. package/dist/dialog-B5GBisKv.js.map +1 -0
  38. package/dist/dialog-t8F13BL_.cjs +60 -0
  39. package/dist/dialog-t8F13BL_.cjs.map +1 -0
  40. package/dist/es-BP09DR9w.cjs +566 -0
  41. package/dist/es-BP09DR9w.cjs.map +1 -0
  42. package/dist/es-BSXz5tBv.js +566 -0
  43. package/dist/es-BSXz5tBv.js.map +1 -0
  44. package/dist/form-design-panel-B5MXTZ96.cjs +418 -0
  45. package/dist/form-design-panel-B5MXTZ96.cjs.map +1 -0
  46. package/dist/form-design-panel-vWWU9uB-.js +418 -0
  47. package/dist/form-design-panel-vWWU9uB-.js.map +1 -0
  48. package/dist/fr-BBQQn7tJ.cjs +566 -0
  49. package/dist/fr-BBQQn7tJ.cjs.map +1 -0
  50. package/dist/fr-Ckn3K9v1.js +566 -0
  51. package/dist/fr-Ckn3K9v1.js.map +1 -0
  52. package/dist/he-DRsG7bH7.cjs +567 -0
  53. package/dist/he-DRsG7bH7.cjs.map +1 -0
  54. package/dist/he-wdGU5PkU.js +567 -0
  55. package/dist/he-wdGU5PkU.js.map +1 -0
  56. package/dist/icons-BrK5iVL8.js +856 -0
  57. package/dist/icons-BrK5iVL8.js.map +1 -0
  58. package/dist/icons-x0Tc05bs.cjs +1010 -0
  59. package/dist/icons-x0Tc05bs.cjs.map +1 -0
  60. package/dist/index.cjs +3162 -5106
  61. package/dist/index.cjs.map +1 -1
  62. package/dist/index.d.cts +636 -143
  63. package/dist/index.d.ts +636 -143
  64. package/dist/index.js +3083 -4975
  65. package/dist/index.js.map +1 -1
  66. package/dist/it-BuP4o0xQ.cjs +566 -0
  67. package/dist/it-BuP4o0xQ.cjs.map +1 -0
  68. package/dist/it-Us-VmvIu.js +566 -0
  69. package/dist/it-Us-VmvIu.js.map +1 -0
  70. package/dist/ja-Cizj0-5O.js +566 -0
  71. package/dist/ja-Cizj0-5O.js.map +1 -0
  72. package/dist/ja-DovEd6ts.cjs +566 -0
  73. package/dist/ja-DovEd6ts.cjs.map +1 -0
  74. package/dist/ko-B-qJEol2.cjs +566 -0
  75. package/dist/ko-B-qJEol2.cjs.map +1 -0
  76. package/dist/ko-DlrXliE1.js +566 -0
  77. package/dist/ko-DlrXliE1.js.map +1 -0
  78. package/dist/labels-BiM9wp9K.cjs +21 -0
  79. package/dist/labels-BiM9wp9K.cjs.map +1 -0
  80. package/dist/labels-C6_i87Oj.js +16 -0
  81. package/dist/labels-C6_i87Oj.js.map +1 -0
  82. package/dist/link-editor-CSjqPnj1.cjs +125 -0
  83. package/dist/link-editor-CSjqPnj1.cjs.map +1 -0
  84. package/dist/link-editor-SxM1nnJU.js +125 -0
  85. package/dist/link-editor-SxM1nnJU.js.map +1 -0
  86. package/dist/measurement-Bs61XWbJ.js +325 -0
  87. package/dist/measurement-Bs61XWbJ.js.map +1 -0
  88. package/dist/measurement-CcCsHPOX.cjs +326 -0
  89. package/dist/measurement-CcCsHPOX.cjs.map +1 -0
  90. package/dist/nl-0aF7M_0h.js +566 -0
  91. package/dist/nl-0aF7M_0h.js.map +1 -0
  92. package/dist/nl-D3KZDDiJ.cjs +566 -0
  93. package/dist/nl-D3KZDDiJ.cjs.map +1 -0
  94. package/dist/pl-BW--AaCI.js +566 -0
  95. package/dist/pl-BW--AaCI.js.map +1 -0
  96. package/dist/pl-DSFhAUqx.cjs +566 -0
  97. package/dist/pl-DSFhAUqx.cjs.map +1 -0
  98. package/dist/pt-C5S-8MC5.cjs +566 -0
  99. package/dist/pt-C5S-8MC5.cjs.map +1 -0
  100. package/dist/pt-DIhpU5pT.js +566 -0
  101. package/dist/pt-DIhpU5pT.js.map +1 -0
  102. package/dist/redact-confirm-B6j36TPw.js +83 -0
  103. package/dist/redact-confirm-B6j36TPw.js.map +1 -0
  104. package/dist/redact-confirm-CX_SY2ZN.cjs +83 -0
  105. package/dist/redact-confirm-CX_SY2ZN.cjs.map +1 -0
  106. package/dist/redaction-panel-BmoIl-Ll.cjs +96 -0
  107. package/dist/redaction-panel-BmoIl-Ll.cjs.map +1 -0
  108. package/dist/redaction-panel-IJDshSJI.js +96 -0
  109. package/dist/redaction-panel-IJDshSJI.js.map +1 -0
  110. package/dist/search-panel-HfIhJm1M.js +249 -0
  111. package/dist/search-panel-HfIhJm1M.js.map +1 -0
  112. package/dist/search-panel-s9IoiOtv.cjs +249 -0
  113. package/dist/search-panel-s9IoiOtv.cjs.map +1 -0
  114. package/dist/sheet-BDsa_Sup.cjs +442 -0
  115. package/dist/sheet-BDsa_Sup.cjs.map +1 -0
  116. package/dist/sheet-R6XDgyEf.js +365 -0
  117. package/dist/sheet-R6XDgyEf.js.map +1 -0
  118. package/dist/sign-dialog-CgnR7akj.cjs +155 -0
  119. package/dist/sign-dialog-CgnR7akj.cjs.map +1 -0
  120. package/dist/sign-dialog-GDqCoQhA.js +155 -0
  121. package/dist/sign-dialog-GDqCoQhA.js.map +1 -0
  122. package/dist/signature-inspector-DyO313Qf.cjs +166 -0
  123. package/dist/signature-inspector-DyO313Qf.cjs.map +1 -0
  124. package/dist/signature-inspector-okFz8do6.js +166 -0
  125. package/dist/signature-inspector-okFz8do6.js.map +1 -0
  126. package/dist/signature-maker-BhCmYyHD.js +393 -0
  127. package/dist/signature-maker-BhCmYyHD.js.map +1 -0
  128. package/dist/signature-maker-BoYa8vgA.cjs +393 -0
  129. package/dist/signature-maker-BoYa8vgA.cjs.map +1 -0
  130. package/dist/signatures-panel-B56PC6d9.cjs +300 -0
  131. package/dist/signatures-panel-B56PC6d9.cjs.map +1 -0
  132. package/dist/signatures-panel-CgnFfhFm.js +300 -0
  133. package/dist/signatures-panel-CgnFfhFm.js.map +1 -0
  134. package/dist/stamp-store-BHvRs-Do.cjs +147 -0
  135. package/dist/stamp-store-BHvRs-Do.cjs.map +1 -0
  136. package/dist/stamp-store-WuF-L3Jj.js +112 -0
  137. package/dist/stamp-store-WuF-L3Jj.js.map +1 -0
  138. package/dist/stamps-panel-B9NYGayn.cjs +231 -0
  139. package/dist/stamps-panel-B9NYGayn.cjs.map +1 -0
  140. package/dist/stamps-panel-CDO0FPyK.js +231 -0
  141. package/dist/stamps-panel-CDO0FPyK.js.map +1 -0
  142. package/dist/toolbar-CJu2wKTU.cjs +1659 -0
  143. package/dist/toolbar-CJu2wKTU.cjs.map +1 -0
  144. package/dist/toolbar-z9od3tKl.js +1564 -0
  145. package/dist/toolbar-z9od3tKl.js.map +1 -0
  146. package/dist/zh-cn-3tmMeHqv.cjs +566 -0
  147. package/dist/zh-cn-3tmMeHqv.cjs.map +1 -0
  148. package/dist/zh-cn-CxkUUBct.js +566 -0
  149. package/dist/zh-cn-CxkUUBct.js.map +1 -0
  150. package/package.json +6 -4
  151. package/src/styles.css +153 -89
  152. package/dist/commands.cjs.map +0 -1
  153. package/dist/commands.js.map +0 -1
  154. package/dist/es-DYwzfxyt.cjs +0 -293
  155. package/dist/es-DYwzfxyt.cjs.map +0 -1
  156. package/dist/es-sN6uqBgD.js +0 -293
  157. package/dist/es-sN6uqBgD.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons-BrK5iVL8.js","names":[],"sources":["../src/config/viewer-commands.ts","../src/config-context.tsx","../src/ui/icons.tsx"],"sourcesContent":["/**\n * Your commands, as the `commands` config gives them, over the built-in ones.\n *\n * A command of yours is the headless command, with functions that get the viewer's words:\n * `get` takes a plugin's name (`get('selection')`) as well as its token, and `viewer` is the\n * viewer `onReady` gets. One with a built-in id merges over the built-in command, so what it\n * leaves out stays: `{ id: 'document:download', run }` keeps Download's label, icon, shortcut\n * and checks. A shortcut of yours takes its keys from every built-in command that has them, so\n * a key runs your command and the built-in one's tooltip no longer shows it.\n */\nimport { sameShortcut } from '@embedpdf/core-ui';\nimport type {\n CommandContext as PluginCommandContext,\n CommandDef as PluginCommandDef,\n IconAccent,\n} from '@embedpdf/react/commands';\nimport type { CapabilityToken } from '@embedpdf/react/runtime';\n\nimport type { PluginTokens, ScopedViewer, Viewer } from '../handle';\nimport type { IconName } from '../ui/icons';\n\n/** What a command's functions get: its document, any plugin by its name or token, and the viewer. */\nexport interface CommandContext extends ScopedViewer {\n /** The document it's for: the one named, else the active one; `null` with none open. */\n readonly documentId: string | null;\n /** What the caller passed: `execute(id, { args })`. */\n readonly args?: unknown;\n /** Fires when the caller cancels `execute()`: pass it on to the calls `run` makes. */\n readonly signal?: AbortSignal;\n /** The viewer, as `onReady` gets it. */\n readonly viewer: Viewer;\n}\n\n/**\n * A command, as the `commands` config takes it: the headless command, its functions getting\n * {@link CommandContext}. With a built-in command's id it changes that one, field by field.\n */\nexport interface CommandDef extends Omit<\n PluginCommandDef,\n 'icon' | 'iconAccent' | 'allowed' | 'enabled' | 'active' | 'visible' | 'run'\n> {\n /** An icon's name: one of the viewer's, or one of yours (`icons`). */\n readonly icon?: IconName | (string & {});\n /** Colors for the icon, read from live state like `active`. */\n readonly iconAccent?: (context: CommandContext) => IconAccent | null;\n /** Whether the session may run it, from the plugins' `can*` checks. Prefer `requires`. */\n readonly allowed?: (context: CommandContext) => boolean;\n /** When it can run. When it can't, its button is greyed out. Default: always. */\n readonly enabled?: (context: CommandContext) => boolean;\n /** When it shows as pressed, or checked in a menu. */\n readonly active?: (context: CommandContext) => boolean;\n /** When it shows at all. Default: always. */\n readonly visible?: (context: CommandContext) => boolean;\n /** What it does; `execute()` resolves once it has. Not needed for a `menu` or `panel`. */\n readonly run?: (context: CommandContext) => void | Promise<unknown>;\n}\n\n/** What a command of yours reaches: the viewer's plugins by name, and the viewer once it's live. */\nexport interface CommandScope {\n readonly plugins: PluginTokens;\n /** The viewer now, or `null` before it's live. */\n viewer(): Viewer | null;\n}\n\nconst FUNCTIONS = ['iconAccent', 'allowed', 'enabled', 'active', 'visible', 'run'] as const;\n\n/** Fields that go together: giving one of them replaces all of the built-in command's. */\nconst TOGETHER: readonly (readonly (keyof PluginCommandDef)[])[] = [\n ['label', 'labelKey'],\n ['run', 'menu', 'panel', 'modal'],\n];\n\n/** The viewer's words over a command's context: plugins by name, and the viewer. */\nfunction viewerContextOf(context: PluginCommandContext, scope: CommandScope): CommandContext {\n const tokenOf = (plugin: string | CapabilityToken<unknown>): CapabilityToken<unknown> | null =>\n typeof plugin !== 'string'\n ? plugin\n : Object.prototype.hasOwnProperty.call(scope.plugins, plugin)\n ? (scope.plugins[plugin] ?? null)\n : null;\n const get = ((plugin: string | CapabilityToken<unknown>): unknown => {\n const token = tokenOf(plugin);\n if (!token) {\n throw new Error(\n `[embedpdf] the viewer has no plugin named \"${String(plugin)}\". Its plugins: ` +\n `${Object.keys(scope.plugins).join(', ')}.`,\n );\n }\n return context.get(token);\n }) as ScopedViewer['get'];\n const tryGet = ((plugin: string | CapabilityToken<unknown>): unknown => {\n const token = tokenOf(plugin);\n return token ? context.tryGet(token) : null;\n }) as ScopedViewer['tryGet'];\n return {\n documentId: context.documentId,\n ...(context.args === undefined ? {} : { args: context.args }),\n ...(context.signal ? { signal: context.signal } : {}),\n get,\n tryGet,\n get viewer(): Viewer {\n const viewer = scope.viewer();\n if (!viewer) throw new Error('[embedpdf] the viewer is not live yet');\n return viewer;\n },\n };\n}\n\n/** A command of yours as the commands plugin takes it: each function gets the viewer's words. */\nexport function toPluginCommand(command: CommandDef, scope: CommandScope): PluginCommandDef {\n // One context per resolution: a command's functions are all asked with the same one.\n const contexts = new WeakMap<PluginCommandContext, CommandContext>();\n const contextOf = (context: PluginCommandContext): CommandContext => {\n let viewerContext = contexts.get(context);\n if (!viewerContext) {\n viewerContext = viewerContextOf(context, scope);\n contexts.set(context, viewerContext);\n }\n return viewerContext;\n };\n const converted: Record<string, unknown> = { ...command };\n for (const name of FUNCTIONS) {\n const given = command[name] as ((context: CommandContext) => unknown) | undefined;\n if (given) converted[name] = (context: PluginCommandContext) => given(contextOf(context));\n }\n return converted as unknown as PluginCommandDef;\n}\n\n/** A built-in command with yours over it: what yours gives replaces, the rest stays. */\nexport function mergeCommand(builtIn: PluginCommandDef, yours: PluginCommandDef): PluginCommandDef {\n const merged: Record<string, unknown> = { ...builtIn };\n for (const fields of TOGETHER) {\n if (!fields.some((field) => yours[field] !== undefined)) continue;\n for (const field of fields) delete merged[field];\n }\n for (const [field, value] of Object.entries(yours))\n if (value !== undefined) merged[field] = value;\n return merged as unknown as PluginCommandDef;\n}\n\nconst shortcutsOf = (command: Pick<PluginCommandDef, 'shortcut'>): readonly string[] =>\n command.shortcut === undefined ? [] : ([] as string[]).concat(command.shortcut);\n\n/** The commands the viewer registers, from the built-in ones and yours. */\nexport interface ViewerCommands {\n /** The built-in commands with yours merged over them, then the rest of yours, in order. */\n readonly commands: readonly PluginCommandDef[];\n /** Whether a command with this id is yours alone: no built-in command has the id. */\n isYours(id: string): boolean;\n /**\n * A built-in command as yours changes it: without the keys your shortcuts take, and with\n * yours of the same id merged over it. For the commands the layout brings, its panels' and\n * modes'.\n */\n over(builtIn: PluginCommandDef): PluginCommandDef;\n}\n\n/** No commands of yours: the built-in ones as they are. */\nexport const NO_VIEWER_COMMANDS: ViewerCommands = {\n commands: [],\n isYours: () => false,\n over: (builtIn) => builtIn,\n};\n\n/**\n * Your commands over the built-in ones. A later command of yours with an id that's taken\n * replaces the earlier one. `isMac` says which keys `Mod` is, to tell two shortcuts apart.\n */\nexport function resolveViewerCommands(\n builtIns: readonly PluginCommandDef[],\n given: readonly CommandDef[],\n scope: CommandScope,\n options: { readonly isMac: boolean },\n): ViewerCommands {\n const yours = new Map<string, PluginCommandDef>();\n for (const command of given) yours.set(command.id, toPluginCommand(command, scope));\n const taken = [...yours.values()].flatMap(shortcutsOf);\n const isTaken = (shortcut: string): boolean =>\n taken.some((key) => {\n try {\n return sameShortcut(key, shortcut, options);\n } catch {\n return false;\n }\n });\n const over = (builtIn: PluginCommandDef): PluginCommandDef => {\n const shortcuts = shortcutsOf(builtIn);\n const kept = shortcuts.filter((shortcut) => !isTaken(shortcut));\n const base = kept.length === shortcuts.length ? builtIn : { ...builtIn, shortcut: kept };\n const own = yours.get(builtIn.id);\n return own ? mergeCommand(base, own) : base;\n };\n const builtInIds = new Set(builtIns.map((command) => command.id));\n return {\n commands: [\n ...builtIns.map(over),\n ...[...yours.values()].filter((command) => !builtInIds.has(command.id)),\n ],\n isYours: (id) => yours.has(id) && !builtInIds.has(id),\n over,\n };\n}\n","/**\n * The resolved customization, as React context. The `layout` option and the\n * user's extra icons are resolved once in <FullViewer>; the layout at the\n * viewer's current size is resolved by <LayoutRoot> (layout-root.tsx), and read\n * here by the shell, menus and strips — no component imports the default\n * layout directly, so \"the host changed the layout\" is invisible below this\n * line.\n *\n * The default context values are the default config and the default layout:\n * components render correctly in tests and stories without a provider.\n */\nimport { createContext, useContext } from 'react';\nimport {\n EXPANDED_MIN_WIDTH_PX,\n barsAt,\n compileBar,\n menuOf,\n type LayoutData,\n type LayoutEnv,\n type LayoutOption,\n type MenuSection,\n type SelectionTarget,\n} from '@embedpdf/core-ui';\nimport type { BarGroup, BarSchema } from '@embedpdf/react/toolbar';\nimport { DEFAULT_LAYOUT } from './config/chrome';\nimport type { IconDef } from './ui/icons';\nimport { NO_VIEWER_COMMANDS, type ViewerCommands } from './config/viewer-commands';\nimport type { ViewerSignatureSettings, ViewerStampSettings } from './plugin-settings';\n\n/**\n * A font beyond the standard 14, for the engine: what `engine.fonts` lists. The style panel\n * offers it for text boxes, once it's registered on the engine and mounted for the live editor.\n */\nexport interface ViewerFont {\n /** The id a free-text `fontFamily` carries, and the engine's key for it. Not one of the 14 standard names. */\n readonly key: string;\n /** Where the TTF or OTF file comes from (same-origin or CORS-enabled). */\n readonly url?: string;\n /** The file's bytes, in place of `url`. */\n readonly data?: Uint8Array | ArrayBuffer;\n /** The family's name, which the style panel shows (else the key); inferred from the file when left out. */\n readonly familyName?: string;\n readonly weight?: number;\n readonly italic?: boolean;\n}\n\n/** What `onPanelResize` hears: the panel, and the width the user gave it. */\nexport interface PanelResizeEvent {\n /** The panel's id. */\n readonly id: string;\n /** Its width now, in px. */\n readonly width: number;\n}\n\nexport interface ResolvedViewerConfig {\n /** The `layout` option as given: the default without one. */\n readonly layout?: LayoutOption;\n /** User-registered icons — additive over the built-in set. */\n readonly icons: Readonly<Record<string, IconDef>>;\n /** Your commands over the built-in ones, for the commands the layout brings too. */\n readonly viewerCommands: ViewerCommands;\n /** What the viewer adds to `plugins.stamp`: the standard stamps, the quick stamps. */\n readonly stamp: ViewerStampSettings;\n /** What the viewer adds to `plugins.signature`: which marks people keep, their fonts. */\n readonly signature: ViewerSignatureSettings;\n /** The engine's fonts the style panel offers (see {@link ViewerFont}). */\n readonly fonts: readonly ViewerFont[];\n /** Hears each width the user gives a panel, by dragging its edge or with its keys. */\n readonly onPanelResize?: (event: PanelResizeEvent) => void;\n}\n\nconst DEFAULT_CONFIG: ResolvedViewerConfig = {\n icons: {},\n viewerCommands: NO_VIEWER_COMMANDS,\n stamp: {},\n signature: {},\n fonts: [],\n};\n\nconst ViewerConfigContext = createContext<ResolvedViewerConfig>(DEFAULT_CONFIG);\n\nexport const ViewerConfigProvider = ViewerConfigContext.Provider;\n\n/** The `layout` option, for <LayoutRoot> to resolve at the viewer's size. */\nexport function useLayoutOption(): LayoutOption | undefined {\n return useContext(ViewerConfigContext).layout;\n}\n\n/** Tells the app a panel's new width: what the panel frame calls once the user has resized it. */\nexport function usePanelResize(): (event: PanelResizeEvent) => void {\n const { onPanelResize } = useContext(ViewerConfigContext);\n return (event) => onPanelResize?.(event);\n}\n\n// ── the layout at the viewer's current size ──────────────────────────────────\n\n/** The layout as the viewer shows it now: at its env, with what shows nothing left out. */\nexport interface ResolvedLayout {\n /** The layout's data at this env. */\n readonly data: LayoutData;\n readonly env: LayoutEnv;\n /** A bar as its toolbar fits it, or `null` for a bar the layout doesn't have. */\n bar(id: string): BarSchema | null;\n /** The bars over a selection of this kind, as one bar, or `null` when there is none. */\n strip(target: SelectionTarget): BarSchema | null;\n /** A menu's sections, or `null` for a menu the layout doesn't have. */\n menu(id: string): readonly MenuSection[] | null;\n}\n\n/** The env before the viewer is measured, and without a <LayoutRoot>. */\nexport const DEFAULT_ENV: LayoutEnv = {\n size: 'expanded',\n width: EXPANDED_MIN_WIDTH_PX,\n touch: false,\n dir: 'ltr',\n};\n\n/**\n * The bars over a selection of this kind as one bar, read through `bar`: one bar as it is, or\n * several as one, their groups in bar order and named after their bar so the names stay unique.\n */\nexport function stripOf(\n data: LayoutData,\n target: SelectionTarget,\n bar: (id: string) => BarSchema | null,\n): BarSchema | null {\n const bars = barsAt(data, target)\n .map(bar)\n .filter((each): each is BarSchema => each !== null);\n if (bars.length <= 1) return bars[0] ?? null;\n const sections: { -readonly [Name in 'start' | 'center' | 'end']?: readonly BarGroup[] } = {};\n for (const name of ['start', 'center', 'end'] as const) {\n const groups = bars.flatMap((each) =>\n (each.sections[name] ?? []).map((group) => ({ ...group, id: `${each.id}.${group.id}` })),\n );\n if (groups.length > 0) sections[name] = groups;\n }\n return { id: target, sections };\n}\n\n/** The layout as plain reads of its data: no bar leaves anything out. */\nexport function staticResolvedLayout(data: LayoutData, env: LayoutEnv): ResolvedLayout {\n const bar = (id: string) => compileBar(data, id);\n return {\n data,\n env,\n bar,\n strip: (target) => stripOf(data, target, bar),\n menu: (id) => menuOf(data, id),\n };\n}\n\nconst ResolvedLayoutContext = createContext<ResolvedLayout>(\n staticResolvedLayout(DEFAULT_LAYOUT, DEFAULT_ENV),\n);\n\nexport const ResolvedLayoutProvider = ResolvedLayoutContext.Provider;\n\nexport function useResolvedLayout(): ResolvedLayout {\n return useContext(ResolvedLayoutContext);\n}\n\n/** The viewer's env: its size, width, whether it's touched, and its direction. */\nexport function useLayoutEnv(): LayoutEnv {\n return useContext(ResolvedLayoutContext).env;\n}\n\n/** A menu's sections from the layout, or `null` for a menu it doesn't have. */\nexport function useMenu(id: string): readonly MenuSection[] | null {\n return useContext(ResolvedLayoutContext).menu(id);\n}\n\n/** The bars over a selection of this kind, as one bar; `undefined` when the layout has none. */\nexport function useStripSchema(target: SelectionTarget): BarSchema | undefined {\n return useContext(ResolvedLayoutContext).strip(target) ?? undefined;\n}\n\n/** Your commands over the built-in ones: what the layout's panel and mode commands merge under. */\nexport function useViewerCommands(): ViewerCommands {\n return useContext(ViewerConfigContext).viewerCommands;\n}\n\nexport function useCustomIcons(): Readonly<Record<string, IconDef>> {\n return useContext(ViewerConfigContext).icons;\n}\n\nexport function useStampSettings(): ViewerStampSettings {\n return useContext(ViewerConfigContext).stamp;\n}\n\nexport function useSignatureSettings(): ViewerSignatureSettings {\n return useContext(ViewerConfigContext).signature;\n}\n\nexport function useConfiguredFonts(): readonly ViewerFont[] {\n return useContext(ViewerConfigContext).fonts;\n}\n","/**\n * Icon set — Tabler-style stroke icons as path data, rendered by one <Icon>\n * component. Stroke-based (currentColor); a few glyphs carry filled sub-paths,\n * marked `fill: true`. The names are API: a command's `icon` names one, and an\n * icon of yours with the same name replaces it everywhere it shows.\n *\n * Accent slots: a tool glyph tags the sub-paths that preview the tool's\n * drawing defaults — `stroke`/`fill: 'primary' | 'secondary'` paint from the\n * command's resolved `iconAccent`. With no accent, a slotted stroke inherits\n * currentColor and a slotted fill renders nothing — pixel-identical to the\n * untagged glyph, so non-tool surfaces never change.\n */\nimport * as React from 'react';\nimport { useCustomIcons } from '../config-context';\n\nexport type PathSpec =\n | string\n | {\n d: string;\n /** Fill paint: `true` = currentColor (a filled glyph part); a slot\n * name = that accent color (nothing when the accent is absent). */\n fill?: boolean | 'primary' | 'secondary';\n /** Stroke paint: a slot name = that accent color (currentColor when\n * the accent is absent). */\n stroke?: 'primary' | 'secondary';\n strokeWidth?: number;\n strokeDasharray?: string;\n strokeOpacity?: number;\n fillOpacity?: number;\n };\n\n/** An icon's path data: a string is one path, an array several. */\nexport type IconPaths = string | readonly PathSpec[];\n\n/**\n * An icon of yours: 24 × 24 path data drawn as a line (Tabler and Lucide icons paste in as\n * they are), or `{ paths, fill: true }` to fill the paths instead of drawing their outline.\n */\nexport type IconDef = IconPaths | { readonly paths: IconPaths; readonly fill?: boolean };\n\nconst isPathList = (paths: IconDef): paths is readonly PathSpec[] => Array.isArray(paths);\n\n/** An icon's paths as the renderer draws them: filled ones carry `fill: true`. */\nexport function pathsOfIcon(icon: IconDef): readonly PathSpec[] {\n if (typeof icon === 'string') return [icon];\n if (isPathList(icon)) return icon;\n const paths = typeof icon.paths === 'string' ? [icon.paths] : icon.paths;\n if (!icon.fill) return paths;\n return paths.map((path) => (typeof path === 'string' ? { d: path, fill: true } : path));\n}\n\n/** The two tintable slots — structurally identical to plugin-commands'\n * IconAccent, kept local so the icon set stays dependency-free. */\nexport interface IconAccent {\n primary?: string;\n secondary?: string;\n}\n\nconst measurementOutline: PathSpec[] = [\n { d: 'M5 4H19M20 5V19M19 20H5M4 19V5', stroke: 'primary' },\n {\n d: 'M3.1 3.1h1.8v1.8H3.1zM19.1 3.1h1.8v1.8h-1.8zM3.1 19.1h1.8v1.8H3.1zM19.1 19.1h1.8v1.8h-1.8z',\n stroke: 'primary',\n },\n];\n\nexport const ICON_PATHS = {\n ruler: ['M3 8h18v8H3z', 'M7 8v4M11 8v2M15 8v4M19 8v2'],\n distance: [\n { d: 'M5 12H19', stroke: 'primary', strokeDasharray: '2 2' },\n {\n d: 'M3.5 10.5a1.5 1.5 0 1 0 0 3a1.5 1.5 0 1 0 0-3M20.5 10.5a1.5 1.5 0 1 0 0 3a1.5 1.5 0 1 0 0-3',\n stroke: 'primary',\n fill: 'primary',\n fillOpacity: 0.25,\n },\n ],\n perimeter: measurementOutline,\n area: [\n { d: 'M5 4H19V5H20V19H19V20H5V19H4V5H5Z', fill: 'primary', fillOpacity: 0.08 },\n {\n d: 'M4.5 7.5L7.5 4.5M4.5 10.5L10.5 4.5M4.5 13.5L13.5 4.5M4.5 16.5L16.5 4.5M4.5 19.5L19.5 4.5M7.5 19.5L19.5 7.5M10.5 19.5L19.5 10.5M13.5 19.5L19.5 13.5M16.5 19.5L19.5 16.5',\n stroke: 'primary',\n strokeWidth: 0.6,\n strokeOpacity: 0.5,\n },\n ...measurementOutline,\n ],\n alertTriangle: [\n 'M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z',\n ],\n alignBottom: [\n 'M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z',\n 'M11 17h2',\n 'M9 14h6',\n 'M10 11h4',\n ],\n alignCenter: ['M4 6l16 0', 'M8 12l8 0', 'M6 18l12 0'],\n alignLeft: ['M4 6l16 0', 'M4 12l10 0', 'M4 18l14 0'],\n alignMiddle: [\n 'M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z',\n 'M11 15h2',\n 'M9 12h6',\n 'M10 9h4',\n ],\n alignRight: ['M4 6l16 0', 'M10 12l10 0', 'M6 18l14 0'],\n alignTop: [\n 'M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z',\n 'M11 13h2',\n 'M9 10h6',\n 'M10 7h4',\n ],\n arrowBackUp: ['M9 14l-4 -4l4 -4', 'M5 10h11a4 4 0 1 1 0 8h-1'],\n arrowForwardUp: ['M15 14l4 -4l-4 -4', 'M19 10h-11a4 4 0 1 0 0 8h1'],\n bold: ['M7 5h6a3.5 3.5 0 0 1 0 7h-6z', 'M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7'],\n book: [\n 'M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0',\n 'M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0',\n 'M3 6l0 13',\n 'M12 6l0 13',\n 'M21 6l0 13',\n ],\n book2: [\n 'M19 4v16h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12z',\n 'M19 16h-12a2 2 0 0 0 -2 2',\n 'M9 8h6',\n ],\n calibrate: [\n 'M12 12m-7.5 0a7.5 7.5 0 1 0 15 0a7.5 7.5 0 1 0 -15 0',\n 'M12 2.75V7M12 17V21.25M2.75 12H7M17 12H21.25',\n 'M12 12m-2.5 0a2.5 2.5 0 1 0 5 0a2.5 2.5 0 1 0 -5 0',\n ],\n callout: [\n {\n d: 'M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1',\n stroke: 'primary',\n fill: 'secondary',\n },\n { d: 'M17 11v6h-9', stroke: 'primary' },\n { d: 'M8 15l-2 2l2 2', stroke: 'primary' },\n ],\n check: ['M5 12l5 5l10 -10'],\n chevronDown: ['M6 9l6 6l6 -6'],\n chevronLeft: ['M15 6l-6 6l6 6'],\n chevronRight: ['M9 6l6 6l-6 6'],\n circle: [\n { d: 'M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0', stroke: 'primary', fill: 'secondary' },\n ],\n comment: [\n 'M12 11v.01',\n 'M8 11v.01',\n 'M16 11v.01',\n 'M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3z',\n ],\n copy: [\n 'M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z',\n 'M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1',\n ],\n deviceFloppy: [\n 'M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2',\n 'M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0',\n 'M14 4l0 4l-6 0l0 -4',\n ],\n dots: [\n 'M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0',\n 'M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0',\n 'M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0',\n ],\n doublePage: [\n 'M3 3m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1zm9 -1v18',\n ],\n download: ['M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2', 'M7 11l5 5l5 -5', 'M12 4l0 12'],\n externalLink: [\n 'M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6',\n 'M11 13l9 -9',\n 'M15 4h5v5',\n ],\n eye: ['M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z', 'M9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0'],\n file: ['M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'],\n fileImport: [\n 'M14 3v4a1 1 0 0 0 1 1h4',\n 'M5 13v-8a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-5.5m-9.5 -2h7m-3 -3l3 3l-3 3',\n ],\n fitToPage: [\n 'M12 20h-6a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h6',\n 'M18 14v7',\n 'M18 3v7',\n 'M15 18l3 3l3 -3',\n 'M15 6l3 -3l3 3',\n ],\n fitToWidth: [\n 'M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v6',\n 'M10 18h-7',\n 'M21 18h-7',\n 'M6 15l-3 3l3 3',\n 'M18 15l3 3l-3 3',\n ],\n formButton: [\n 'M3 8a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-8',\n 'M8 12h8',\n ],\n formCheckbox: [\n 'M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14',\n 'M9 12l2 2l4 -4',\n ],\n // The form designer: a form's list of fields.\n formDesign: [\n 'M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2',\n 'M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2',\n 'M9 12l.01 0',\n 'M13 12l2 0',\n 'M9 16l.01 0',\n 'M13 16l2 0',\n ],\n formListbox: [\n 'M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14',\n 'M11 8h6',\n 'M11 12h6',\n 'M11 16h6',\n 'M7 8l0 .01',\n 'M7 12l0 .01',\n 'M7 16l0 .01',\n ],\n formRadio: [\n { d: 'M9 12a2 2 0 1 0 6 0a2 2 0 1 0 -6 0', fill: true },\n 'M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0',\n ],\n formSelect: [\n 'M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14',\n 'M9 11l3 3l3 -3',\n ],\n formTextfield: [\n 'M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3',\n 'M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3',\n 'M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7',\n 'M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1',\n 'M17 12h.01',\n 'M13 12h.01',\n ],\n freeText: [\n { d: 'M4 7v-2h12v2', stroke: 'primary' },\n { d: 'M10 5v14', stroke: 'primary' },\n { d: 'M12 19h-4', stroke: 'primary' },\n { d: 'M15 13v-1h6v1', stroke: 'primary' },\n { d: 'M18 12v7', stroke: 'primary' },\n { d: 'M17 19h2', stroke: 'primary' },\n ],\n fullscreen: [\n 'M4 8v-2a2 2 0 0 1 2 -2h2',\n 'M4 16v2a2 2 0 0 0 2 2h2',\n 'M16 4h2a2 2 0 0 1 2 2v2',\n 'M16 20h2a2 2 0 0 0 2 -2v-2',\n ],\n fullscreenExit: [\n 'M4 8v-2c0 -.551 .223 -1.05 .584 -1.412',\n 'M4 16v2a2 2 0 0 0 2 2h2',\n 'M16 4h2a2 2 0 0 1 2 2v2',\n 'M16 20h2c.545 0 1.04 -.218 1.4 -.572',\n 'M3 3l18 18',\n ],\n group: [\n 'M3 5a2 2 0 1 0 4 0a2 2 0 1 0 -4 0',\n 'M17 5a2 2 0 1 0 4 0a2 2 0 1 0 -4 0',\n 'M3 19a2 2 0 1 0 4 0a2 2 0 1 0 -4 0',\n 'M17 19a2 2 0 1 0 4 0a2 2 0 1 0 -4 0',\n 'M5 7v10',\n 'M19 7v10',\n 'M7 5h10',\n 'M7 19h10',\n 'M8 8H12.8V11.2H16V16H11.2V12.8H8V8Z',\n ],\n hand: [\n 'M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5',\n 'M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5',\n 'M14 5.5a1.5 1.5 0 0 1 3 0v6.5',\n 'M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47',\n ],\n highlight: [\n // the marker block behind the \"A\" — visible only when accented\n {\n d: 'M4 6h16a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2H4a2 2 0 0 1 -2 -2V8a2 2 0 0 1 2 -2z',\n fill: 'primary',\n },\n 'M8 16v-8a4 4 0 1 1 8 0v8',\n 'M8 10h8',\n ],\n horizontal: ['M7 8l-4 4l4 4', 'M17 8l4 4l-4 4', 'M3 12l18 0'],\n inkHighlighter: [\n 'M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4',\n 'M12.5 5.5l4 4',\n 'M4.5 13.5l4 4',\n { d: 'M21 15v4h-8l4 -4l4 0', stroke: 'primary', fill: 'primary' },\n ],\n insertText: [\n { d: 'M3 7v-2h12v2', stroke: 'primary' },\n { d: 'M9 5v14', stroke: 'primary' },\n { d: 'M7 19h4', stroke: 'primary' },\n { d: 'M18 15l2 2h-5', stroke: 'primary' },\n { d: 'M18 19l2 -2', stroke: 'primary' },\n ],\n italic: ['M11 5l6 0', 'M7 19l6 0', 'M14 5l-4 14'],\n line: [{ d: 'M20 4l-16 16', stroke: 'primary' }],\n // Both strokes tag the `primary` accent slot so the arrow glyph previews the\n // tool's stroke colour (like the plain `line` icon); with no accent they render\n // as currentColor — identical to the untagged glyph.\n lineArrow: [\n { d: 'M20 4l-16 16', stroke: 'primary' },\n { d: 'M16 3h5v5', stroke: 'primary' },\n ],\n link: [\n 'M9 15l6 -6',\n 'M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464',\n 'M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463',\n ],\n linkOff: [\n 'M9 15l3 -3m2 -2l1 -1',\n 'M11 6l.463 -.536a5 5 0 0 1 7.072 7.071l-.534 .464',\n 'M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463',\n 'M3 3l18 18',\n ],\n listTree: ['M9 6h11', 'M12 12h8', 'M15 18h5', 'M5 6v.01', 'M8 12v.01', 'M11 18v.01'],\n lock: [\n 'M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2H5a2 2 0 0 1 -2 -2v-7a2 2 0 0 1 2 -2z',\n 'M7 11V7a5 5 0 0 1 10 0v4',\n ],\n marqueeSelect: [\n 'M17 20h6',\n 'M20 17v6',\n 'M4 13v-2',\n 'M4 6v-1a1 1 0 0 1 1 -1h1',\n 'M6 20h-1a1 1 0 0 1 -1 -1v-1',\n 'M11 4h2',\n 'M11 20h2',\n 'M18 4h1a1 1 0 0 1 1 1v1',\n 'M20 11v2',\n ],\n menu: ['M4 8l16 0', 'M4 16l16 0'],\n message: [\n 'M8 9h8',\n 'M8 13h6',\n 'M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12',\n ],\n palette: [\n 'M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25',\n 'M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0',\n 'M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0',\n 'M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0',\n ],\n paperclip: [\n 'M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5',\n ],\n pencilMarker: [\n 'm9.109 16.275 8.856-8.097c.812-.743.87-2.014.127-2.826s-2.014-.869-2.826-.127L6.41 13.322l-.127 2.826zM13.79 6.575l2.7 2.952',\n {\n d: 'M19.375 20.125c.569.063-4.05-.562-6.412-.437s-4.759 1.229-6.857 1.625c-1.764.687-3.404-.938-1.981-2.5',\n stroke: 'primary',\n },\n ],\n photo: [\n 'M15 8h.01',\n 'M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z',\n 'M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5',\n 'M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3',\n ],\n plus: ['M12 5l0 14', 'M5 12l14 0'],\n pointer: [\n 'M7.904 17.563a1.2 1.2 0 0 0 2.228 .308l2.09 -3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047 -1.047a1.067 1.067 0 0 0 0 -1.509l-4.907 -4.907l3.113 -2.09a1.2 1.2 0 0 0 -.309 -2.228l-13.582 -3.904l3.904 13.563z',\n ],\n polygon: [\n {\n d: 'M13.163 2.168l8.021 5.828c.694 .504 .984 1.397 .719 2.212l-3.064 9.43a1.978 1.978 0 0 1 -1.881 1.367h-9.916a1.978 1.978 0 0 1 -1.881 -1.367l-3.064 -9.43a1.978 1.978 0 0 1 .719 -2.212l8.021 -5.828a1.978 1.978 0 0 1 2.326 0z',\n stroke: 'primary',\n fill: 'secondary',\n },\n ],\n print: [\n 'M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2',\n 'M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4',\n 'M7 13m0 2a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z',\n ],\n redact: [\n 'M7 4h10',\n 'M12 4v8',\n 'M-7 24l12 -12',\n 'M-3 24l12 -12',\n 'M1 24l12 -12',\n 'M5 24l12 -12',\n 'M9 24l12 -12',\n 'M13 24l12 -12',\n 'M17 24l12 -12',\n 'M21 24l12 -12',\n 'M25 24l12 -12',\n ],\n // A dashed frame + a small rounded hatched box. This icon system is plain\n // paths (no <clipPath>), so the hatch segments are pre-clipped to the\n // 10..22 box analytically.\n redactArea: [\n 'M6 20h-1a2 2 0 0 1 -2 -2v-1',\n 'M3 13v-3',\n 'M3 6v-1a2 2 0 0 1 2 -2h1',\n 'M10 3h3',\n 'M17 3h1a2 2 0 0 1 2 2v1',\n 'M12 10h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-8a2 2 0 0 1 2 -2z',\n 'M10 12l2 -2',\n 'M10 16l6 -6',\n 'M10 20l10 -10',\n 'M12 22l10 -10',\n 'M16 22l6 -6',\n 'M20 22l2 -2',\n ],\n redactCombined: [\n 'M6 20h-1a2 2 0 0 1 -2 -2v-1',\n 'M3 13v-3',\n 'M20 13v-3',\n 'M3 6v-1a2 2 0 0 1 2 -2h1',\n 'M10 3h3',\n 'M17 3h1a2 2 0 0 1 2 2v1',\n 'M8 8h8',\n 'M12 8v7',\n 'M6 19l12 -12',\n 'M6 23l12 -12',\n 'M10 23l12 -12',\n 'M14 27l12 -12',\n 'M14 23l12 -12',\n ],\n redactionSidebar: [\n 'M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z',\n 'M15 4v16',\n 'M7 8h5',\n 'M7 11h5',\n 'M7 14h4',\n ],\n replaceText: [\n { d: 'M3 7v-2h12v2', stroke: 'primary' },\n { d: 'M9 5v14', stroke: 'primary' },\n { d: 'M7 19h4', stroke: 'primary' },\n { d: 'M20 14l2 2h-3', stroke: 'primary' },\n { d: 'M20 18l2 -2', stroke: 'primary' },\n { d: 'M19 16a3 3 0 1 0 2 5.236', stroke: 'primary' },\n ],\n rotateClockwise: ['M4.05 11a8 8 0 1 1 .5 4m-.5 5v-5h5'],\n rotateCounterClockwise: ['M19.95 11a8 8 0 1 0 -.5 4m.5 5v-5h-5'],\n rubberStamp: [\n 'M21 17.85h-18c0 -4.05 1.421 -4.05 3.79 -4.05c5.21 0 1.21 -4.59 1.21 -6.8a4 4 0 1 1 8 0c0 2.21 -4 6.8 1.21 6.8c2.369 0 3.79 0 3.79 4.05',\n 'M5 21h14',\n ],\n rubberStampPlus: [\n 'M21 17.85h-18c0 -4.05 1.421 -4.05 3.79 -4.05c5.21 0 1.21 -4.59 1.21 -6.8a4 4 0 0 1 4.9 -4.1',\n 'M16 10c0 1.2 -4 3.8 1.21 3.8c2.369 0 3.79 0 3.79 4.05',\n 'M5 21h14',\n 'M16 5h6',\n 'M19 2v6',\n ],\n save: [\n 'M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2',\n 'M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0',\n 'M14 4l0 4l-6 0l0 -4',\n ],\n screenshot: [\n 'M7 19a2 2 0 0 1 -2 -2',\n 'M5 13v-2',\n 'M5 7a2 2 0 0 1 2 -2',\n 'M11 5h2',\n 'M17 5a2 2 0 0 1 2 2',\n 'M19 11v2',\n 'M19 17v4',\n 'M21 19h-4',\n 'M13 19h-2',\n ],\n search: ['M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0', 'M21 21l-6 -6'],\n settings: [\n 'M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z',\n 'M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0',\n ],\n sidebar: [\n 'M4 18v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z',\n 'M10 18v-12a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z',\n ],\n signature: [\n 'M3 17c3.333 -3.333 5 -6 5 -8c0 -3 -1 -3 -2 -3s-2.032 1.085 -2 3c.034 2.048 1.658 4.877 2.5 6c1.5 2 2.5 2.5 3.5 1l2 -3c.333 2.667 1.333 4 3 4c.53 0 2.639 -2 3 -2c.517 0 1.517 .667 3 2',\n ],\n singlePage: ['M5 3m0 1a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1z'],\n square: [\n {\n d: 'M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z',\n stroke: 'primary',\n fill: 'secondary',\n },\n ],\n squares: [\n 'M8 10a2 2 0 0 1 2 -2h9a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-9a2 2 0 0 1 -2 -2z',\n 'M16 8v-3a2 2 0 0 0 -2 -2h-9a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h3',\n ],\n squiggly: [\n 'M8 16v-8a4 4 0 1 1 8 0v8',\n 'M8 10h8',\n { d: 'M4 20c1.5 -1.5 3.5 -1.5 5 0s3.5 1.5 5 0 3.5 -1.5 5 0', stroke: 'primary' },\n ],\n strikethrough: ['M8 16v-8a4 4 0 1 1 8 0v8', { d: 'M4 10h16', stroke: 'primary' }],\n text: [\n 'M6.5 15.5m-3.5 0a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0',\n 'M14 19v-10.5a3.5 3.5 0 0 1 7 0v10.5',\n 'M14 13h7',\n 'M10 12v7',\n ],\n trash: [\n 'M4 7l16 0',\n 'M10 11l0 6',\n 'M14 11l0 6',\n 'M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12',\n 'M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3',\n ],\n underline: [{ d: 'M4 20h16', stroke: 'primary' }, 'M8 16v-8a4 4 0 1 1 8 0v8', 'M8 10h8'],\n // the ungroup glyph: two separated rounded rects\n ungroup: [\n 'M4 5a1 1 0 0 1 1 -1h5a1 1 0 0 1 1 1v5a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1z',\n 'M13 14a1 1 0 0 1 1 -1h5a1 1 0 0 1 1 1v5a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1z',\n ],\n unlock: ['M7 11V7a5 5 0 0 1 9.9-1'],\n updateScale: [\n 'M3.5 13.5L18.5 7.5L21.25 14.5L6.25 20.5L3.5 13.5Z',\n 'M8 12.8L9 15.2M11.5 11.4L12.2 13.2M15 10L16 12.4',\n 'M4 9.39849C4.10585 8.34804 4.487 7.34411 5.10497 6.48809C5.72294 5.63207 6.55584 4.95427 7.51957 4.52312C8.4833 4.09198 9.54373 3.92277 10.5938 4.03257C11.6438 4.14237 12.6463 4.5273 13.5 5.14849M11.5 6.00003L13.5 5.14849L12.7807 2.96999',\n ],\n vertical: ['M8 7l4 -4l4 4', 'M8 17l4 4l4 -4', 'M12 3l0 18'],\n viewSettings: [\n 'M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0',\n 'M12 10.5v1.5',\n 'M12 16v1.5',\n 'M15.031 12.25l-1.299 .75',\n 'M10.268 15l-1.3 .75',\n 'M15 15.803l-1.285 -.773',\n 'M10.285 12.97l-1.285 -.773',\n 'M14 3v4a1 1 0 0 0 1 1h4',\n 'M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z',\n ],\n widgetEdit: [\n 'M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1',\n 'M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415',\n 'M16 5l3 3',\n ],\n x: ['M18 6l-12 12', 'M6 6l12 12'],\n zigzag: [{ d: 'M12 2.4L21.36 11.76L2.64 12.24L12 21.6', stroke: 'primary' }],\n zoomIn: ['M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0', 'M9 12h6', 'M12 9v6'],\n zoomInArea: [\n 'M15 13v4',\n 'M13 15h4',\n 'M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0',\n 'M22 22l-3 -3',\n 'M6 18h-1a2 2 0 0 1 -2 -2v-1',\n 'M3 11v-1',\n 'M3 6v-1a2 2 0 0 1 2 -2h1',\n 'M10 3h1',\n 'M15 3h1a2 2 0 0 1 2 2v1',\n ],\n zoomOut: ['M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0', 'M9 12l6 0'],\n} satisfies Record<string, readonly PathSpec[]>;\n\n/** The name of one of the viewer's own icons. */\nexport type IconName = keyof typeof ICON_PATHS;\n\nconst BUILT_IN_ICONS: Readonly<Record<string, readonly PathSpec[]>> = ICON_PATHS;\n\n/** Whether the viewer has an icon by this name of its own. */\nexport const hasIcon = (name: string): name is IconName =>\n Object.prototype.hasOwnProperty.call(BUILT_IN_ICONS, name);\n\n/** The paths an icon name draws: yours, else the viewer's own; `null` for neither. */\nexport function iconPathsOf(\n name: string,\n custom: Readonly<Record<string, IconDef>>,\n): readonly PathSpec[] | null {\n const own = Object.prototype.hasOwnProperty.call(custom, name) ? custom[name] : undefined;\n if (own !== undefined) return pathsOfIcon(own);\n return hasIcon(name) ? BUILT_IN_ICONS[name]! : null;\n}\n\nexport interface IconProps {\n name: string;\n size?: number;\n strokeWidth?: number;\n className?: string;\n title?: string;\n /** Paints the glyph's slot-tagged sub-paths (a tool previewing its\n * drawing defaults). Absent → the plain, untinted glyph. */\n accent?: IconAccent;\n}\n\n/** One SVG renderer for every icon. Unknown names render nothing (caller shows\n * a text fallback), so a missing glyph never throws. */\nexport function Icon({ name, size = 20, strokeWidth = 2, className, title, accent }: IconProps) {\n // Registry semantics: user icons are additive and a colliding name wins —\n // re-skinning a built-in glyph is a supported move, not an accident.\n const paths = iconPathsOf(name, useCustomIcons());\n if (!paths) return null;\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n role=\"img\"\n aria-hidden={title ? undefined : true}\n aria-label={title}\n >\n {paths.map((path, i) => {\n if (typeof path === 'string') return <path key={i} d={path} />;\n const fill =\n path.fill === true ? 'currentColor' : path.fill ? accent?.[path.fill] : undefined;\n // a stroke slot paints from the accent, inheriting currentColor\n // without one; a fill-only path never gets an outline\n const stroke = path.stroke ? accent?.[path.stroke] : path.fill ? 'none' : undefined;\n return (\n <path\n key={i}\n d={path.d}\n fill={fill ?? 'none'}\n stroke={stroke}\n strokeWidth={path.strokeWidth}\n strokeDasharray={path.strokeDasharray}\n strokeOpacity={path.strokeOpacity}\n fillOpacity={path.fillOpacity}\n />\n );\n })}\n </svg>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgEA,MAAM,YAAY;CAAC;CAAc;CAAW;CAAW;CAAU;CAAW;AAAK;;AAGjF,MAAM,WAA6D,CACjE,CAAC,SAAS,UAAU,GACpB;CAAC;CAAO;CAAQ;CAAS;AAAO,CAClC;;AAGA,SAAS,gBAAgB,SAA+B,OAAqC;CAC3F,MAAM,WAAW,WACf,OAAO,WAAW,WACd,SACA,OAAO,UAAU,eAAe,KAAK,MAAM,SAAS,MAAM,IACvD,MAAM,QAAQ,WAAW,OAC1B;CACR,MAAM,QAAQ,WAAuD;EACnE,MAAM,QAAQ,QAAQ,MAAM;EAC5B,IAAI,CAAC,OACH,MAAM,IAAI,MACR,8CAA8C,OAAO,MAAM,EAAE,kBACxD,OAAO,KAAK,MAAM,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,EAC7C;EAEF,OAAO,QAAQ,IAAI,KAAK;CAC1B;CACA,MAAM,WAAW,WAAuD;EACtE,MAAM,QAAQ,QAAQ,MAAM;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0FACF;CACA,aAAa;EACX;EACA;EACA;EACA;CACF;CACA,aAAa;EAAC;EAAa;EAAa;CAAY;CACpD,WAAW;EAAC;EAAa;EAAc;CAAY;CACnD,aAAa;EACX;EACA;EACA;EACA;CACF;CACA,YAAY;EAAC;EAAa;EAAe;CAAY;CACrD,UAAU;EACR;EACA;EACA;EACA;CACF;CACA,aAAa,CAAC,oBAAoB,2BAA2B;CAC7D,gBAAgB,CAAC,qBAAqB,4BAA4B;CAClE,MAAM,CAAC,gCAAgC,kCAAkC;CACzE,MAAM;EACJ;EACA;EACA;EACA;EACA;CACF;CACA,OAAO;EACL;EACA;EACA;CACF;CACA,WAAW;EACT;EACA;EACA;CACF;CACA,SAAS;EACP;GACE,GAAG;GACH,QAAQ;GACR,MAAM;EACR;EACA;GAAE,GAAG;GAAe,QAAQ;EAAU;EACtC;GAAE,GAAG;GAAkB,QAAQ;EAAU;CAC3C;CACA,OAAO,CAAC,kBAAkB;CAC1B,aAAa,CAAC,eAAe;CAC7B,aAAa,CAAC,gBAAgB;CAC9B,cAAc,CAAC,eAAe;CAC9B,QAAQ,CACN;EAAE,GAAG;EAA8C,QAAQ;EAAW,MAAM;CAAY,CAC1F;CACA,SAAS;EACP;EACA;EACA;EACA;CACF;CACA,MAAM,CACJ,gKACA,+FACF;CACA,cAAc;EACZ;EACA;EACA;CACF;CACA,MAAM;EACJ;EACA;EACA;CACF;CACA,YAAY,CACV,yFACF;CACA,UAAU;EAAC;EAA8C;EAAkB;CAAY;CACvF,cAAc;EACZ;EACA;EACA;CACF;CACA,KAAK,CAAC,gDAAgD,oCAAoC;CAC1F,MAAM,CAAC,4DAA4D;CACnE,YAAY,CACV,2BACA,+EACF;CACA,WAAW;EACT;EACA;EACA;EACA;EACA;CACF;CACA,YAAY;EACV;EACA;EACA;EACA;EACA;CACF;CACA,YAAY,CACV,gFACA,SACF;CACA,cAAc,CACZ,kFACA,gBACF;CAEA,YAAY;EACV;EACA;EACA;EACA;EACA;EACA;CACF;CACA,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AAU;EAAC;EAAW;EAAY;EAAY;EAAY;EAAa;CAAY;CACnF,MAAM,CACJ,gFACA,0BACF;CACA,eAAe;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM,CAAC,aAAa,YAAY;CAChC,SAAS;EACP;EACA;EACA;CACF;CACA,SAAS;EACP;EACA;EACA;EACA;CACF;CACA,WAAW,CACT,+FACF;CACA,cAAc,CACZ,gIACA;EACE,GAAG;EACH,QAAQ;CACV,CACF;CACA,OAAO;EACL;EACA;EACA;EACA;CACF;CACA,MAAM,CAAC,cAAc,YAAY;CACjC,SAAS,CACP,oNACF;CACA,SAAS,CACP;EACE,GAAG;EACH,QAAQ;EACR,MAAM;CACR,CACF;CACA,OAAO;EACL;EACA;EACA;CACF;CACA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAIA,YAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,gBAAgB;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,kBAAkB;EAChB;EACA;EACA;EACA;EACA;CACF;CACA,aAAa;EACX;GAAE,GAAG;GAAgB,QAAQ;EAAU;EACvC;GAAE,GAAG;GAAW,QAAQ;EAAU;EAClC;GAAE,GAAG;GAAW,QAAQ;EAAU;EAClC;GAAE,GAAG;GAAiB,QAAQ;EAAU;EACxC;GAAE,GAAG;GAAe,QAAQ;EAAU;EACtC;GAAE,GAAG;GAA4B,QAAQ;EAAU;CACrD;CACA,iBAAiB,CAAC,oCAAoC;CACtD,wBAAwB,CAAC,sCAAsC;CAC/D,aAAa,CACX,0IACA,UACF;CACA,iBAAiB;EACf;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ;EACA;EACA;CACF;CACA,YAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,QAAQ,CAAC,8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