@servantcdh/ez-planet-labeling 1.0.7 → 1.0.9

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.
package/dist/index.d.ts CHANGED
@@ -157,6 +157,8 @@ declare interface CommonItemType {
157
157
  className?: string;
158
158
  disabled?: boolean;
159
159
  id?: string;
160
+ /** Custom icon renderer. When provided, takes precedence over iconType. */
161
+ renderIcon?: () => ReactNode;
160
162
  }
161
163
 
162
164
  declare interface ContentDTO {
@@ -313,6 +315,8 @@ export declare interface ExtensionSubMenuItem {
313
315
  shortcut?: LabelingShortcutSpec;
314
316
  disabled?: boolean;
315
317
  onClick: () => void;
318
+ /** Custom icon renderer. When provided, takes precedence over iconType. */
319
+ renderIcon?: () => ReactNode;
316
320
  }
317
321
 
318
322
  declare interface FabricLabelEntry {
package/dist/index.js CHANGED
@@ -3589,7 +3589,7 @@ const LIB_AUTHOR = "최동호";
3589
3589
  const LIB_CONTACT = "servantcdh@naver.com";
3590
3590
  const __EZ_PLANET_META__ = Object.freeze({
3591
3591
  name: LIB_NAME,
3592
- version: "1.0.7",
3592
+ version: "1.0.9",
3593
3593
  author: LIB_AUTHOR,
3594
3594
  contact: LIB_CONTACT,
3595
3595
  license: "Proprietary — See LICENSE"
@@ -16461,9 +16461,14 @@ function WorkspaceNavigationDetailTable({
16461
16461
  const theadRef = useRef(null);
16462
16462
  const theadHeightRef = useRef(24);
16463
16463
  const [scrollMargin, setScrollMargin] = useState(24);
16464
+ const setupRef = useRef(false);
16464
16465
  useEffect(() => {
16465
- const wrapper = wrapperRef.current;
16466
+ if (setupRef.current) return;
16467
+ const wrapper = wrapperRef.current ?? document.querySelector(
16468
+ ".workspace-navigation-table__detail-wrapper"
16469
+ );
16466
16470
  if (!wrapper) return;
16471
+ wrapperRef.current = wrapper;
16467
16472
  const applyMaxHeight = () => {
16468
16473
  const wrapperTop = wrapper.getBoundingClientRect().top;
16469
16474
  const available = Math.max(window.innerHeight - wrapperTop - 8, 200);
@@ -16475,6 +16480,7 @@ function WorkspaceNavigationDetailTable({
16475
16480
  theadHeightRef.current = theadRef.current.getBoundingClientRect().height;
16476
16481
  }
16477
16482
  setScrollMargin(theadHeightRef.current);
16483
+ setupRef.current = true;
16478
16484
  const ro = new ResizeObserver(applyMaxHeight);
16479
16485
  ro.observe(wrapper);
16480
16486
  let ancestor = wrapper.parentElement;
@@ -16482,8 +16488,11 @@ function WorkspaceNavigationDetailTable({
16482
16488
  ro.observe(ancestor);
16483
16489
  ancestor = ancestor.parentElement;
16484
16490
  }
16485
- return () => ro.disconnect();
16486
- }, []);
16491
+ return () => {
16492
+ ro.disconnect();
16493
+ setupRef.current = false;
16494
+ };
16495
+ });
16487
16496
  const rowVirtualizer = useVirtualizer({
16488
16497
  count: rows.length,
16489
16498
  getScrollElement: () => wrapperRef.current,
@@ -18692,6 +18701,7 @@ const useImageLabelingUIMeta = ({
18692
18701
  const extItems = extensionSubMenuItems.map((ext) => ({
18693
18702
  variant: "button",
18694
18703
  iconType: ext.iconType,
18704
+ renderIcon: ext.renderIcon,
18695
18705
  tooltip: formatShortcutTitle(ext.name, ext.shortcut),
18696
18706
  disabled: ext.disabled ?? false,
18697
18707
  className: activePanelId === ext.id ? "active" : void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servantcdh/ez-planet-labeling",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",