@servantcdh/ez-planet-labeling 0.5.15 → 0.5.17
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 +22 -0
- package/dist/index.js +20 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -311,6 +311,13 @@ export declare type ImageLabelHistorySnapshot = {
|
|
|
311
311
|
canvasJson: string;
|
|
312
312
|
};
|
|
313
313
|
|
|
314
|
+
declare interface ImageTypeLabelingToolSelectionState {
|
|
315
|
+
tool: LabelingTool | null;
|
|
316
|
+
setTool: (tool: LabelingTool | null) => void;
|
|
317
|
+
overedUniques: string[];
|
|
318
|
+
setOveredUniques: (overedUniques: string[]) => void;
|
|
319
|
+
}
|
|
320
|
+
|
|
314
321
|
declare interface InLabelingStatusResponse {
|
|
315
322
|
inLabeling: boolean;
|
|
316
323
|
}
|
|
@@ -687,6 +694,11 @@ export declare interface LabelingSchemaEntry {
|
|
|
687
694
|
|
|
688
695
|
export declare type LabelingTheme = "default" | "gunpla";
|
|
689
696
|
|
|
697
|
+
export declare type LabelingTool = {
|
|
698
|
+
id: string;
|
|
699
|
+
init: (...args: any[]) => Promise<(() => void) | undefined> | (() => void);
|
|
700
|
+
};
|
|
701
|
+
|
|
690
702
|
export declare function LabelingWorkspace({ extensions, theme, onClose, }: LabelingWorkspaceProps): JSX_2.Element;
|
|
691
703
|
|
|
692
704
|
export declare interface LabelingWorkspaceProps {
|
|
@@ -909,6 +921,8 @@ declare interface SearchOperatorFilter<TValue> {
|
|
|
909
921
|
value: TValue;
|
|
910
922
|
}
|
|
911
923
|
|
|
924
|
+
export declare const segmentAnythingTool: () => LabelingTool;
|
|
925
|
+
|
|
912
926
|
export declare interface SegmentationBase64Value {
|
|
913
927
|
className?: string;
|
|
914
928
|
classIndex?: number;
|
|
@@ -935,6 +949,8 @@ export declare interface SegmentationResponseValue {
|
|
|
935
949
|
zindex?: number;
|
|
936
950
|
}
|
|
937
951
|
|
|
952
|
+
export declare const selectionTool: () => LabelingTool;
|
|
953
|
+
|
|
938
954
|
/** Wrap an already-resolved value as AsyncData (no loading, no error). */
|
|
939
955
|
export declare function staticData<T>(data: T): AsyncData<T>;
|
|
940
956
|
|
|
@@ -944,6 +960,10 @@ declare interface TemporalHistoryState<T> {
|
|
|
944
960
|
reset: () => void;
|
|
945
961
|
}
|
|
946
962
|
|
|
963
|
+
export declare const TOOL_INFO_SEGMENT_ANYTHING = "Segment Anything";
|
|
964
|
+
|
|
965
|
+
export declare const TOOL_INFO_SEGMENT_ANYTHING_BOX = "Segment Anything Box";
|
|
966
|
+
|
|
947
967
|
declare interface UIType<TSize extends string = "xs" | "sm" | "md" | "lg" | "xl", TStyle extends string = string> {
|
|
948
968
|
size?: TSize;
|
|
949
969
|
style?: TStyle;
|
|
@@ -957,6 +977,8 @@ snapshot: ImageLabelHistorySnapshot | null;
|
|
|
957
977
|
}>>;
|
|
958
978
|
}>;
|
|
959
979
|
|
|
980
|
+
export declare const useImageTypeLabelingToolSelectionStore: UseBoundStore<StoreApi<ImageTypeLabelingToolSelectionState>>;
|
|
981
|
+
|
|
960
982
|
export declare const useLabelBatchStore: UseBoundStore<StoreApi<LabelBatchState>>;
|
|
961
983
|
|
|
962
984
|
export declare const useWorkspaceNavigationDetailSelectionStore: UseBoundStore<StoreApi<WorkspaceNavigationDetailSelectionState>>;
|
package/dist/index.js
CHANGED
|
@@ -3587,7 +3587,7 @@ const LIB_AUTHOR = "최동호";
|
|
|
3587
3587
|
const LIB_CONTACT = "servantcdh@naver.com";
|
|
3588
3588
|
const __EZ_PLANET_META__ = Object.freeze({
|
|
3589
3589
|
name: LIB_NAME,
|
|
3590
|
-
version: "0.5.
|
|
3590
|
+
version: "0.5.17",
|
|
3591
3591
|
author: LIB_AUTHOR,
|
|
3592
3592
|
contact: LIB_CONTACT,
|
|
3593
3593
|
license: "Proprietary — See LICENSE"
|
|
@@ -7391,6 +7391,15 @@ const blankRectTool = () => {
|
|
|
7391
7391
|
init
|
|
7392
7392
|
};
|
|
7393
7393
|
};
|
|
7394
|
+
const segmentAnythingTool = () => {
|
|
7395
|
+
const init = ({ callback }) => {
|
|
7396
|
+
return getRectInit({ colorCode: "#13C0A4", callback }, true, true);
|
|
7397
|
+
};
|
|
7398
|
+
return {
|
|
7399
|
+
id: "seg-anything",
|
|
7400
|
+
init
|
|
7401
|
+
};
|
|
7402
|
+
};
|
|
7394
7403
|
const getImageToolSelectionStore = () => useImageTypeLabelingToolSelectionStore.getState();
|
|
7395
7404
|
const selectionTool$2 = () => {
|
|
7396
7405
|
const init = () => {
|
|
@@ -9167,7 +9176,11 @@ const globalInit = ({
|
|
|
9167
9176
|
if (action !== "added") {
|
|
9168
9177
|
dispatchState(action, target);
|
|
9169
9178
|
}
|
|
9170
|
-
|
|
9179
|
+
const latestObjects = getLabeledObjects();
|
|
9180
|
+
compareByObjects([...latestObjects]);
|
|
9181
|
+
if (action === "added") {
|
|
9182
|
+
useLabelBatchStore.getState().syncFabricObjects(latestObjects);
|
|
9183
|
+
}
|
|
9171
9184
|
emitLabelEvent("changed", {
|
|
9172
9185
|
action,
|
|
9173
9186
|
objects: target._objects && target._objects.length > 1 ? [target] : objects
|
|
@@ -26117,15 +26130,20 @@ export {
|
|
|
26117
26130
|
IDLE_MUTATION,
|
|
26118
26131
|
LabelingProviders,
|
|
26119
26132
|
LabelingWorkspace,
|
|
26133
|
+
TOOL_INFO_SEGMENT_ANYTHING,
|
|
26134
|
+
TOOL_INFO_SEGMENT_ANYTHING_BOX,
|
|
26120
26135
|
VIRTUALIZED_RECORDS_ROW_META_SYMBOL,
|
|
26121
26136
|
addCanvasObjects,
|
|
26122
26137
|
errorData,
|
|
26123
26138
|
getCanvasInstance,
|
|
26124
26139
|
loadingData,
|
|
26125
26140
|
removeCanvasObjects,
|
|
26141
|
+
segmentAnythingTool,
|
|
26142
|
+
selectionTool$2 as selectionTool,
|
|
26126
26143
|
staticData,
|
|
26127
26144
|
useFilterStore,
|
|
26128
26145
|
useImageLabelHistoryStore,
|
|
26146
|
+
useImageTypeLabelingToolSelectionStore,
|
|
26129
26147
|
useLabelBatchStore,
|
|
26130
26148
|
useWorkspaceNavigationDetailSelectionStore
|
|
26131
26149
|
};
|