@collabdt/core 0.21.0 → 0.21.1
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.
|
@@ -114,8 +114,8 @@ const PluginStayActivePanel = ({ children, tool }) => {
|
|
|
114
114
|
{
|
|
115
115
|
id: panelId,
|
|
116
116
|
hidden: !isOpen,
|
|
117
|
-
className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 z-50 min-w-[8rem]
|
|
118
|
-
children
|
|
117
|
+
className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md pointer-events-auto",
|
|
118
|
+
children: /* @__PURE__ */ jsx("div", { className: "max-h-[60vh] overflow-y-auto overflow-x-hidden p-1", children })
|
|
119
119
|
}
|
|
120
120
|
)
|
|
121
121
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/core/plugins/host/usePluginToolbarTools.tsx"],"sourcesContent":["'use client'\n\n// SPDX-License-Identifier: AGPL-3.0-or-later\n// Copyright (C) 2025 Collab Digital Twins\n\nimport * as LR from 'lucide-react'\nimport * as React from 'react'\n\nimport { SubmenuContext, ToolbarSubmenu } from '../../components/ToolbarSubmenu'\nimport { Button } from '../../components/ui/Button'\n\nimport { resolvePluginIcon } from './pluginIcon'\nimport { usePluginConfigs, usePluginContributions, type PluginContribution } from './provider'\nimport { PluginScopeProvider } from './scope'\n\nimport type { CursorType } from '../../types/global'\nimport type { Tool } from '../../types/tools'\nimport type { ToolbarRegistration } from '../sdk/types'\n\nimport type { LucideProps } from 'lucide-react'\n\n/** The toolbar capabilities. All share `ToolbarRegistration`. */\nexport type ToolbarCapability = 'map.tools' | 'bim.tools'\n\n/** What `ToolbarButton` renders for a tool that supplies its own component. */\ntype ToolComponent = NonNullable<Tool['component']>\n\ntype ScopedPropsFactory = (pluginId: string) => Record<string, unknown>\n\n/**\n * Plugin contributions for one toolbar, as `Tool` objects the toolbars already\n * render: `[...coreTools, ...usePluginToolbarTools('bim.tools', viewerProps)]`.\n *\n * `extraProps` is spread onto the plugin's component by `ToolbarButton` — how a BIM\n * tool gets its viewer handles. Each viewer passes its own, keeping this module free\n * of viewer-engine imports that would pull three into the map bundle.\n */\nexport function usePluginToolbarTools(\n capability: ToolbarCapability,\n extraProps?: Record<string, unknown>,\n): Tool[] {\n const contributions = usePluginContributions(capability)\n const configs = usePluginConfigs()\n\n // Cached by tool id to keep component identity stable. `extraProps` changes on\n // most renders (it carries live viewer handles), and rebuilding on each would\n // remount the plugin's panel and lose its state on every camera move.\n const wrapped = React.useRef(new Map<string, ToolComponent>())\n\n return React.useMemo(() => {\n const live = new Set<string>()\n\n const tools = contributions.map(contribution => {\n const id = pluginToolId(contribution)\n live.add(id)\n\n let Component = wrapped.current.get(id)\n if (!Component) {\n Component = wrapPluginComponent(contribution, () => configs[contribution.pluginId])\n wrapped.current.set(id, Component)\n }\n\n return {\n id,\n title: contribution.label,\n icon: resolvePluginIcon(contribution.icon),\n // An invented cursor is a CSS no-op, not a crash, so it goes unvalidated.\n cursor: contribution.cursor as CursorType | undefined,\n stayActive: contribution.stayActive,\n component: Component,\n extraProps,\n } satisfies Tool\n })\n\n // Drop cache entries for plugins that have since been disabled.\n for (const id of wrapped.current.keys()) {\n if (!live.has(id)) wrapped.current.delete(id)\n }\n\n return tools\n }, [contributions, extraProps])\n}\n\nexport function pluginToolId(contribution: PluginContribution<ToolbarCapability>) {\n return `plugin:${contribution.pluginId}:${contribution.id}` as const\n}\n\n// A stay-active plugin must outlive the dropdown, which destroys its children on close.\nconst PluginStayActivePanel: React.FC<{\n children: React.ReactNode\n tool: Tool\n}> = ({ children, tool }) => {\n const { openSubmenu, setOpenSubmenu } = React.useContext(SubmenuContext)\n const isOpen = openSubmenu === tool.id\n const panelId = React.useId()\n const containerRef = React.useRef<HTMLDivElement>(null)\n\n React.useEffect(() => {\n if (!isOpen) return\n\n const handlePointerDown = (event: MouseEvent) => {\n if (!containerRef.current?.contains(event.target as Node)) setOpenSubmenu(null)\n }\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') setOpenSubmenu(null)\n }\n\n // Armed while closed, this would read the press that opens the panel as an outside press.\n document.addEventListener('pointerdown', handlePointerDown)\n document.addEventListener('keydown', handleKeyDown)\n return () => {\n document.removeEventListener('pointerdown', handlePointerDown)\n document.removeEventListener('keydown', handleKeyDown)\n }\n }, [isOpen, setOpenSubmenu])\n\n return (\n <div ref={containerRef} className=\"relative flex items-center\">\n <Button\n size=\"default\"\n variant=\"ghost\"\n className=\"flex flex-row justify-center items-center px-1 pointer-events-auto text-primary-dark\"\n title={tool.title}\n aria-expanded={isOpen}\n aria-controls={panelId}\n onClick={() => setOpenSubmenu(isOpen ? null : tool.id)}\n >\n <tool.icon />\n <LR.ChevronDown className={`-ml-2 transition-all duration-200 scale-75 ${isOpen ? 'rotate-180' : ''}`} />\n </Button>\n {/* Opens upward because the toolbar is pinned to the bottom of the viewport. */}\n <div\n id={panelId}\n hidden={!isOpen}\n className=\"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 z-50 min-w-[8rem] max-h-[60vh] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md pointer-events-auto\"\n >\n {children}\n </div>\n </div>\n )\n}\n\n/**\n * Wrap a plugin's component into a real toolbar entry.\n *\n * `ToolbarButton` renders `tool.component` *instead of* a button, so a plugin\n * returning a panel would render it inline and blow the strip out of the viewport.\n * `ToolbarSubmenu` gives it the same ghost button and dropdown every core tool has,\n * built from the `label` and `icon` it already declared. The wrapper also supplies\n * the plugin scope the scoped SDK hooks read.\n */\nfunction wrapPluginComponent(\n contribution: PluginContribution<ToolbarCapability>,\n // Lazily, because the component identity is cached: capturing the config by value\n // would freeze it at whatever it was on first render.\n readConfig: () => Record<string, unknown> | undefined,\n): ToolComponent {\n // Props are typed per capability at `ctx.register`. This wrapper forwards whatever\n // the hosting toolbar passed, so the shape is erased here on purpose.\n const Component = contribution.component as unknown as React.ComponentType<Record<string, unknown>>\n\n function PluginToolboxItem({ tool, forPlugin, ...rest }: React.ComponentProps<ToolComponent> & { forPlugin?: unknown }) {\n const scoped = React.useMemo(\n () => (typeof forPlugin === 'function' ? (forPlugin as ScopedPropsFactory)(contribution.pluginId) : undefined),\n [forPlugin],\n )\n const panel = (\n <PluginScopeProvider pluginId={contribution.pluginId} config={readConfig()}>\n <Component tool={tool} {...rest} {...scoped} />\n </PluginScopeProvider>\n )\n\n if (tool.stayActive) {\n return <PluginStayActivePanel tool={tool}>{panel}</PluginStayActivePanel>\n }\n\n return <ToolbarSubmenu tool={tool}>{panel}</ToolbarSubmenu>\n }\n\n PluginToolboxItem.displayName = `PluginTool(${contribution.pluginId}/${contribution.id})`\n return PluginToolboxItem\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsHM,SASE,KATF;AAjHN,YAAY,QAAQ;AACpB,YAAY,WAAW;AAEvB,SAAS,gBAAgB,sBAAsB;AAC/C,SAAS,cAAc;AAEvB,SAAS,yBAAyB;AAClC,SAAS,kBAAkB,8BAAuD;AAClF,SAAS,2BAA2B;AAwB7B,SAAS,sBACd,YACA,YACQ;AACR,QAAM,gBAAgB,uBAAuB,UAAU;AACvD,QAAM,UAAU,iBAAiB;AAKjC,QAAM,UAAU,MAAM,OAAO,oBAAI,IAA2B,CAAC;AAE7D,SAAO,MAAM,QAAQ,MAAM;AACzB,UAAM,OAAO,oBAAI,IAAY;AAE7B,UAAM,QAAQ,cAAc,IAAI,kBAAgB;AAC9C,YAAM,KAAK,aAAa,YAAY;AACpC,WAAK,IAAI,EAAE;AAEX,UAAI,YAAY,QAAQ,QAAQ,IAAI,EAAE;AACtC,UAAI,CAAC,WAAW;AACd,oBAAY,oBAAoB,cAAc,MAAM,QAAQ,aAAa,QAAQ,CAAC;AAClF,gBAAQ,QAAQ,IAAI,IAAI,SAAS;AAAA,MACnC;AAEA,aAAO;AAAA,QAC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;AAAA,QACR,WAAU;AAAA,QACV,OAAO,KAAK;AAAA,QACZ,iBAAe;AAAA,QACf,iBAAe;AAAA,QACf,SAAS,MAAM,eAAe,SAAS,OAAO,KAAK,EAAE;AAAA,QAErD;AAAA,8BAAC,KAAK,MAAL,EAAU;AAAA,UACX,oBAAC,GAAG,aAAH,EAAe,WAAW,8CAA8C,SAAS,eAAe,EAAE,IAAI;AAAA;AAAA;AAAA,IACzG;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,IAAI;AAAA,QACJ,QAAQ,CAAC;AAAA,QACT,WAAU;AAAA,QAET;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAWA,SAAS,oBACP,cAGA,YACe;AAGf,QAAM,YAAY,aAAa;AAE/B,WAAS,kBAAkB,IAA6F;AAA7F,iBAAE,QAAM,UAjKrC,IAiK6B,IAAsB,iBAAtB,IAAsB,CAApB,QAAM;AACjC,UAAM,SAAS,MAAM;AAAA,MACnB,MAAO,OAAO,cAAc,aAAc,UAAiC,aAAa,QAAQ,IAAI;AAAA,MACpG,CAAC,SAAS;AAAA,IACZ;AACA,UAAM,QACJ,oBAAC,uBAAoB,UAAU,aAAa,UAAU,QAAQ,WAAW,GACvE,8BAAC,2CAAU,QAAgB,OAAU,OAAQ,GAC/C;AAGF,QAAI,KAAK,YAAY;AACnB,aAAO,oBAAC,yBAAsB,MAAa,iBAAM;AAAA,IACnD;AAEA,WAAO,oBAAC,kBAAe,MAAa,iBAAM;AAAA,EAC5C;AAEA,oBAAkB,cAAc,cAAc,aAAa,QAAQ,IAAI,aAAa,EAAE;AACtF,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/core/plugins/host/usePluginToolbarTools.tsx"],"sourcesContent":["'use client'\n\n// SPDX-License-Identifier: AGPL-3.0-or-later\n// Copyright (C) 2025 Collab Digital Twins\n\nimport * as LR from 'lucide-react'\nimport * as React from 'react'\n\nimport { SubmenuContext, ToolbarSubmenu } from '../../components/ToolbarSubmenu'\nimport { Button } from '../../components/ui/Button'\n\nimport { resolvePluginIcon } from './pluginIcon'\nimport { usePluginConfigs, usePluginContributions, type PluginContribution } from './provider'\nimport { PluginScopeProvider } from './scope'\n\nimport type { CursorType } from '../../types/global'\nimport type { Tool } from '../../types/tools'\nimport type { ToolbarRegistration } from '../sdk/types'\n\nimport type { LucideProps } from 'lucide-react'\n\n/** The toolbar capabilities. All share `ToolbarRegistration`. */\nexport type ToolbarCapability = 'map.tools' | 'bim.tools'\n\n/** What `ToolbarButton` renders for a tool that supplies its own component. */\ntype ToolComponent = NonNullable<Tool['component']>\n\ntype ScopedPropsFactory = (pluginId: string) => Record<string, unknown>\n\n/**\n * Plugin contributions for one toolbar, as `Tool` objects the toolbars already\n * render: `[...coreTools, ...usePluginToolbarTools('bim.tools', viewerProps)]`.\n *\n * `extraProps` is spread onto the plugin's component by `ToolbarButton` — how a BIM\n * tool gets its viewer handles. Each viewer passes its own, keeping this module free\n * of viewer-engine imports that would pull three into the map bundle.\n */\nexport function usePluginToolbarTools(\n capability: ToolbarCapability,\n extraProps?: Record<string, unknown>,\n): Tool[] {\n const contributions = usePluginContributions(capability)\n const configs = usePluginConfigs()\n\n // Cached by tool id to keep component identity stable. `extraProps` changes on\n // most renders (it carries live viewer handles), and rebuilding on each would\n // remount the plugin's panel and lose its state on every camera move.\n const wrapped = React.useRef(new Map<string, ToolComponent>())\n\n return React.useMemo(() => {\n const live = new Set<string>()\n\n const tools = contributions.map(contribution => {\n const id = pluginToolId(contribution)\n live.add(id)\n\n let Component = wrapped.current.get(id)\n if (!Component) {\n Component = wrapPluginComponent(contribution, () => configs[contribution.pluginId])\n wrapped.current.set(id, Component)\n }\n\n return {\n id,\n title: contribution.label,\n icon: resolvePluginIcon(contribution.icon),\n // An invented cursor is a CSS no-op, not a crash, so it goes unvalidated.\n cursor: contribution.cursor as CursorType | undefined,\n stayActive: contribution.stayActive,\n component: Component,\n extraProps,\n } satisfies Tool\n })\n\n // Drop cache entries for plugins that have since been disabled.\n for (const id of wrapped.current.keys()) {\n if (!live.has(id)) wrapped.current.delete(id)\n }\n\n return tools\n }, [contributions, extraProps])\n}\n\nexport function pluginToolId(contribution: PluginContribution<ToolbarCapability>) {\n return `plugin:${contribution.pluginId}:${contribution.id}` as const\n}\n\n// A stay-active plugin must outlive the dropdown, which destroys its children on close.\nconst PluginStayActivePanel: React.FC<{\n children: React.ReactNode\n tool: Tool\n}> = ({ children, tool }) => {\n const { openSubmenu, setOpenSubmenu } = React.useContext(SubmenuContext)\n const isOpen = openSubmenu === tool.id\n const panelId = React.useId()\n const containerRef = React.useRef<HTMLDivElement>(null)\n\n React.useEffect(() => {\n if (!isOpen) return\n\n const handlePointerDown = (event: MouseEvent) => {\n if (!containerRef.current?.contains(event.target as Node)) setOpenSubmenu(null)\n }\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') setOpenSubmenu(null)\n }\n\n // Armed while closed, this would read the press that opens the panel as an outside press.\n document.addEventListener('pointerdown', handlePointerDown)\n document.addEventListener('keydown', handleKeyDown)\n return () => {\n document.removeEventListener('pointerdown', handlePointerDown)\n document.removeEventListener('keydown', handleKeyDown)\n }\n }, [isOpen, setOpenSubmenu])\n\n return (\n <div ref={containerRef} className=\"relative flex items-center\">\n <Button\n size=\"default\"\n variant=\"ghost\"\n className=\"flex flex-row justify-center items-center px-1 pointer-events-auto text-primary-dark\"\n title={tool.title}\n aria-expanded={isOpen}\n aria-controls={panelId}\n onClick={() => setOpenSubmenu(isOpen ? null : tool.id)}\n >\n <tool.icon />\n <LR.ChevronDown className={`-ml-2 transition-all duration-200 scale-75 ${isOpen ? 'rotate-180' : ''}`} />\n </Button>\n {/* Opens upward because the toolbar is pinned to the bottom of the viewport. */}\n <div\n id={panelId}\n hidden={!isOpen}\n className=\"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md pointer-events-auto\"\n >\n {/* A transparent scroller: Chrome culls the map canvas under an opaque one's overflow, leaving black boxes. */}\n <div className=\"max-h-[60vh] overflow-y-auto overflow-x-hidden p-1\">{children}</div>\n </div>\n </div>\n )\n}\n\n/**\n * Wrap a plugin's component into a real toolbar entry.\n *\n * `ToolbarButton` renders `tool.component` *instead of* a button, so a plugin\n * returning a panel would render it inline and blow the strip out of the viewport.\n * `ToolbarSubmenu` gives it the same ghost button and dropdown every core tool has,\n * built from the `label` and `icon` it already declared. The wrapper also supplies\n * the plugin scope the scoped SDK hooks read.\n */\nfunction wrapPluginComponent(\n contribution: PluginContribution<ToolbarCapability>,\n // Lazily, because the component identity is cached: capturing the config by value\n // would freeze it at whatever it was on first render.\n readConfig: () => Record<string, unknown> | undefined,\n): ToolComponent {\n // Props are typed per capability at `ctx.register`. This wrapper forwards whatever\n // the hosting toolbar passed, so the shape is erased here on purpose.\n const Component = contribution.component as unknown as React.ComponentType<Record<string, unknown>>\n\n function PluginToolboxItem({ tool, forPlugin, ...rest }: React.ComponentProps<ToolComponent> & { forPlugin?: unknown }) {\n const scoped = React.useMemo(\n () => (typeof forPlugin === 'function' ? (forPlugin as ScopedPropsFactory)(contribution.pluginId) : undefined),\n [forPlugin],\n )\n const panel = (\n <PluginScopeProvider pluginId={contribution.pluginId} config={readConfig()}>\n <Component tool={tool} {...rest} {...scoped} />\n </PluginScopeProvider>\n )\n\n if (tool.stayActive) {\n return <PluginStayActivePanel tool={tool}>{panel}</PluginStayActivePanel>\n }\n\n return <ToolbarSubmenu tool={tool}>{panel}</ToolbarSubmenu>\n }\n\n PluginToolboxItem.displayName = `PluginTool(${contribution.pluginId}/${contribution.id})`\n return PluginToolboxItem\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsHM,SASE,KATF;AAjHN,YAAY,QAAQ;AACpB,YAAY,WAAW;AAEvB,SAAS,gBAAgB,sBAAsB;AAC/C,SAAS,cAAc;AAEvB,SAAS,yBAAyB;AAClC,SAAS,kBAAkB,8BAAuD;AACl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