Comparing version 1.1.0 to 1.1.1
@@ -0,9 +1,174 @@ | ||
type DefaultTheme = 'dark' | 'light' | 'blue'; | ||
type RadiusTheme = 'round' | 'straight'; | ||
type ButtonPositionType = 'left' | 'center' | 'right'; | ||
interface Theme { | ||
id: DefaultTheme | string; | ||
name: string; | ||
projectId?: string | null | undefined; | ||
config: ThemeConfig; | ||
} | ||
interface ThemeConfig { | ||
background: string; | ||
iconColor: string; | ||
customizeIcon: string; | ||
isShowConnectingLine: boolean; | ||
isShowDivider: boolean; | ||
overlayBackground: string; | ||
radius: RadiusTheme; | ||
width: number; | ||
mask: boolean; | ||
isShowStepNumber: boolean; | ||
stepNumberColor: string; | ||
buttonColor: string; | ||
buttonWidth: number; | ||
buttonRadius: number; | ||
lastStepButtonTextCenter: boolean; | ||
defaultTextColor: string; | ||
isShowUserEval: boolean; | ||
isExactMatch: boolean; | ||
buttonPosition: ButtonPositionType; | ||
isShowExitPopover: boolean; | ||
isShowRecordTypeIcon: boolean; | ||
} | ||
interface Value { | ||
scale: number; | ||
x: number; | ||
y: number; | ||
canvasWidth: number; | ||
canvasHeight: number; | ||
imgWidth: number; | ||
imgHeight: number; | ||
} | ||
enum AffixType { | ||
'video' = "video", | ||
'audio' = "audio", | ||
'image' = "image", | ||
'other' = "other" | ||
} | ||
interface Affix { | ||
type: AffixType; | ||
name: string; | ||
url: string; | ||
key: string; | ||
uploadTime: number; | ||
} | ||
type StepEventType = 'click' | 'type' | 'press' | 'copy' | 'tabChange' | 'dblclick' | 'contextmenu' | 'drag' | 'select' | 'hover' | 'other'; | ||
type StepPosition = 'top' | 'left' | 'right' | 'bottom' | 'middle' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'; | ||
type StepModel = 'guide' | 'notice' | 'tooltip'; | ||
type StepIframe = { | ||
selector?: string; | ||
devicePixelRatio?: number; | ||
rect?: DOMRect; | ||
iframe?: StepIframe; | ||
}; | ||
interface Step { | ||
id: string; | ||
host: string; | ||
favicon?: string; | ||
hostTitle: string; | ||
href: string; | ||
img?: string; | ||
description?: string; | ||
originImg?: string; | ||
editorNodes?: any[]; | ||
invalid?: 'error' | 'fixed' | 'warning'; | ||
selector?: string; | ||
dropSelector?: string; | ||
doNotMatchEl?: boolean; | ||
imgMarkValue?: Value; | ||
devicePixelRatio?: number; | ||
rect?: DOMRect; | ||
audios?: Affix[]; | ||
videos?: Affix[]; | ||
images?: Affix[]; | ||
title?: string; | ||
type: StepEventType; | ||
value: string; | ||
bubbles?: boolean; | ||
cancelable?: boolean; | ||
detail?: number; | ||
screenX?: number; | ||
screenY?: number; | ||
clientX?: number; | ||
clientY?: number; | ||
iframe?: StepIframe; | ||
model: StepModel; | ||
position: StepPosition; | ||
width: number; | ||
buttonColor: string; | ||
buttonWidth: number; | ||
buttonRadius: number; | ||
buttonText: string; | ||
isAloneSettings: boolean; | ||
isShowGuideModelMedia: boolean; | ||
trigger: boolean; | ||
orderList: string[]; | ||
buttonPosition: ButtonPositionType; | ||
mask: boolean; | ||
} | ||
interface ReplayRecording { | ||
id: string; | ||
host: string; | ||
title: string; | ||
description: string; | ||
steps: Step[]; | ||
themeId?: DefaultTheme | string | null | undefined; | ||
theme?: Theme | null | undefined; | ||
praiseCount: number; | ||
thumbsUpCount: number; | ||
thumbsDownCount: number; | ||
startTime: number; | ||
triggerMethod?: 'auto-start' | 'active-trigger'; | ||
eventSource?: 'auto-start' | 'sdk-api' | 'detail' | 'helpcenter-list' | 'helpcenter-detail'; | ||
replayId: string; | ||
pathPattern: string; | ||
creator: { | ||
id: string; | ||
}; | ||
folder: { | ||
id: string; | ||
root: { | ||
id: string; | ||
}; | ||
themes: Theme[]; | ||
}; | ||
taskId?: string; | ||
} | ||
type IdentityData = Record<string, string | number | boolean | Date>; | ||
interface InitSdkOptions { | ||
projectId: string; | ||
baseUrl?: string; | ||
onStepChange?: () => void; | ||
onFinish?: () => void; | ||
onExit?: () => void; | ||
identity: <T>() => Promise<T> | T; | ||
/** 帮助窗口状态切换事件 */ | ||
onToggleHelp?: (status: 'show' | 'hide') => void; | ||
/** 开始引导或者点击下一步时的回调事件 */ | ||
onStepChange?: (params: { | ||
/** 经验对象 */ | ||
recording: ReplayRecording; | ||
/** 当前步骤数组下标 */ | ||
currentIndex: number; | ||
}) => void; | ||
/** 用户正常回放完成时的回调事件 */ | ||
onFinish?: (params: { | ||
/** 经验对象 */ | ||
recording: ReplayRecording; | ||
}) => void; | ||
/** 用户主动结束引导时的回调事件 */ | ||
onExit?: (params: { | ||
/** 经验对象 */ | ||
recording: ReplayRecording; | ||
}) => void; | ||
/** 隐藏右下角帮助功能 */ | ||
hideHelp?: boolean; | ||
helpClassName?: string; | ||
/** 集成模式 chrome插件 或者 网页 */ | ||
mode?: 'chrome' | 'web'; | ||
/** 项目id */ | ||
projectId?: string; | ||
/** | ||
* 给sdk提供一个获取用户信息对象的方法。工作台可以使用此方法获取的用户信息 | ||
* 字段可以随意命名,服务器都会保留。 | ||
* 值只支持 String, Number, Boolean,Date | ||
*/ | ||
identity?: () => Promise<IdentityData> | IdentityData; | ||
/** 是否在iframe内,自动判断无需传递 */ | ||
isInIframe?: boolean; | ||
} | ||
@@ -10,0 +175,0 @@ export function init(options: InitSdkOptions): Promise<void>; |
{ | ||
"name": "imean-sdk", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "iMean SDK for npm", | ||
@@ -5,0 +5,0 @@ "repository": "https://git.starblazer.cn/imean/imean-sdk-loader.git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
26395
276
0