zyjj-web-sdk 1.0.21 → 1.0.23

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 (49) hide show
  1. package/package.json +1 -1
  2. package/lib/APlayer.min-9ukXWHtq.js +0 -1306
  3. package/lib/DPlayer.min-Cl9WiJp7.js +0 -7739
  4. package/lib/api/api.d.ts +0 -48
  5. package/lib/api/entity.d.ts +0 -66
  6. package/lib/api/request.d.ts +0 -1
  7. package/lib/components/ConcatButton.d.ts +0 -9
  8. package/lib/components/MaterialCard.d.ts +0 -6
  9. package/lib/components/PageTable.d.ts +0 -19
  10. package/lib/components/TokenInput.d.ts +0 -5
  11. package/lib/components/ToolCard.d.ts +0 -10
  12. package/lib/components/UserLogin.d.ts +0 -10
  13. package/lib/components/lab/ElementTypeAlert.d.ts +0 -3
  14. package/lib/components/lab/ElementTypeAudio.d.ts +0 -10
  15. package/lib/components/lab/ElementTypeImage.d.ts +0 -2
  16. package/lib/components/lab/ElementTypeImageList.d.ts +0 -2
  17. package/lib/components/lab/ElementTypeInput.d.ts +0 -3
  18. package/lib/components/lab/ElementTypeNumber.d.ts +0 -3
  19. package/lib/components/lab/ElementTypeSelect.d.ts +0 -3
  20. package/lib/components/lab/ElementTypeSlider.d.ts +0 -3
  21. package/lib/components/lab/ElementTypeText.d.ts +0 -2
  22. package/lib/components/lab/ElementTypeTextArea.d.ts +0 -3
  23. package/lib/components/lab/ElementTypeUpload.d.ts +0 -4
  24. package/lib/components/lab/ElementTypeVideo.d.ts +0 -10
  25. package/lib/components/lab/LabElement.d.ts +0 -7
  26. package/lib/components/lab/common.d.ts +0 -28
  27. package/lib/index-DYCuXcu7.js +0 -6554
  28. package/lib/index-DtMxRUqJ.js +0 -59003
  29. package/lib/index.d.ts +0 -121
  30. package/lib/index.js +0 -16
  31. package/lib/index.umd.cjs +0 -4885
  32. package/lib/pages/MaterialList.d.ts +0 -8
  33. package/lib/pages/SearchBar.d.ts +0 -29
  34. package/lib/pages/TaskList.d.ts +0 -12
  35. package/lib/pages/ToolList.d.ts +0 -10
  36. package/lib/pages/UserInfoPage.d.ts +0 -9
  37. package/lib/store/entity.d.ts +0 -15
  38. package/lib/store/mqtt.d.ts +0 -11
  39. package/lib/store/user.d.ts +0 -11
  40. package/lib/style.css +0 -1
  41. package/lib/tool/db.d.ts +0 -7
  42. package/lib/tool/render.d.ts +0 -3
  43. package/lib/tool/utils.d.ts +0 -21
  44. package/lib/types/cloud.d.ts +0 -78
  45. package/lib/types/config.d.ts +0 -36
  46. package/lib/types/local-task.d.ts +0 -162
  47. package/lib/types/map.d.ts +0 -2
  48. package/lib/types/mqtt.d.ts +0 -16
  49. package/lib/types/tool-task.d.ts +0 -135
@@ -1,8 +0,0 @@
1
- import { GetPageReq } from "../api/entity.ts";
2
- import { MaterialInfo } from "../types/cloud.ts";
3
- export interface MaterialListProps {
4
- pageInfo: GetPageReq;
5
- onPageChange?: (info: GetPageReq) => void;
6
- onDownload: (info: MaterialInfo) => void;
7
- }
8
- export default function MaterialList(props: MaterialListProps): import("react/jsx-runtime").JSX.Element;
@@ -1,29 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import './css/search.css';
3
- import { ToolInfo } from "../types/cloud.ts";
4
- import { ToolFindConfig } from "../types/config.ts";
5
- import { LocalActionReqDataOpenTool } from "../types/local-task.ts";
6
- export interface FindInfo {
7
- tool_info: {
8
- [id: string]: ToolInfo;
9
- };
10
- find_config: {
11
- [tool_id: string]: ToolFindConfig;
12
- };
13
- find_conditions: FindCondition[];
14
- }
15
- interface FindCondition {
16
- id: string;
17
- ping_yin: string;
18
- ping_yin_first: string;
19
- name: string;
20
- regex?: string[];
21
- ext?: string[];
22
- }
23
- export interface SearchBarProps {
24
- maxHeight: string | number;
25
- onToolClick: (data: LocalActionReqDataOpenTool) => void;
26
- onIconClick: () => void;
27
- }
28
- export default function SearchBar(props: SearchBarProps): ReactElement;
29
- export {};
@@ -1,12 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import './css/task.css';
3
- import { LocalTaskInfo } from "../types/local-task.ts";
4
- export interface TaskListProps {
5
- taskList: LocalTaskInfo[];
6
- isWeb: boolean;
7
- onOutput: (info: LocalTaskInfo) => void;
8
- onCancel: (info: LocalTaskInfo) => void;
9
- onDelete: (info: LocalTaskInfo) => void;
10
- onRestore: (info: LocalTaskInfo) => void;
11
- }
12
- export default function TaskList(props: TaskListProps): ReactElement;
@@ -1,10 +0,0 @@
1
- import { ToolInfo } from "../types/cloud.ts";
2
- export interface ToolListProps {
3
- starIdList: string[];
4
- onStarChange: (ids: string[]) => void;
5
- onTool: (info: ToolInfo) => void;
6
- onHelp: (info: ToolInfo) => void;
7
- onSearch: () => void;
8
- height?: string | number;
9
- }
10
- export default function ToolList(props: ToolListProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { UserInfo } from "../types/cloud.ts";
3
- export interface UserInfoPageProps {
4
- recordSize: number;
5
- userInfo: UserInfo;
6
- onUpdateUserInfo: () => void;
7
- onExit: () => void;
8
- }
9
- export default function UserInfoPage(props: UserInfoPageProps): ReactElement;
@@ -1,15 +0,0 @@
1
- import { UserInfo } from "../types/cloud.ts";
2
- import { MqttResponse } from "../types/mqtt.ts";
3
- import mqtt from "mqtt";
4
- export interface UserState {
5
- isLogin: boolean;
6
- showLogin: boolean;
7
- userInfo?: UserInfo;
8
- }
9
- export interface MqttState {
10
- taskEvent: {
11
- [key: string]: MqttResponse;
12
- };
13
- taskQueue: string[];
14
- client?: mqtt.MqttClient;
15
- }
@@ -1,11 +0,0 @@
1
- import { AsyncThunk, PayloadAction } from '@reduxjs/toolkit';
2
- import { MqttResponse } from "../types/mqtt";
3
- import { MqttClient } from 'mqtt';
4
- import { MqttState } from "./entity.ts";
5
- export declare const initMqtt: AsyncThunk<MqttClient, undefined, any>;
6
- export declare const mqttActions: import("@reduxjs/toolkit").CaseReducerActions<{
7
- addTaskEvent(state: import("immer").WritableDraft<MqttState>, info: PayloadAction<MqttResponse>): void;
8
- closeClient(state: import("immer").WritableDraft<MqttState>): void;
9
- }, "mqtt">;
10
- declare const _default: import("redux").Reducer<MqttState>;
11
- export default _default;
@@ -1,11 +0,0 @@
1
- import { AsyncThunk } from '@reduxjs/toolkit';
2
- import { UserState } from "./entity.ts";
3
- import { UserInfo } from "../types/cloud.ts";
4
- export declare const getUserInfo: AsyncThunk<UserInfo | undefined, undefined, any>;
5
- export declare const userAction: import("@reduxjs/toolkit").CaseReducerActions<{
6
- loginOut(state: import("immer").WritableDraft<UserState>): void;
7
- showLogin(state: import("immer").WritableDraft<UserState>): void;
8
- hideLogin(state: import("immer").WritableDraft<UserState>): void;
9
- }, "user">;
10
- declare const _default: import("redux").Reducer<UserState>;
11
- export default _default;
package/lib/style.css DELETED
@@ -1 +0,0 @@
1
- .button-trigger{display:flex;align-items:center;justify-content:center;position:absolute;width:40px;height:40px;border-radius:50%;font-size:14px;color:var(--color-white);cursor:pointer;transition:all .1s;background-color:#4578ea}.button-trigger.button-trigger-active{background-color:var(--color-primary-light-4)}.zyjj-small-icon:hover{background:#f7f8fa}.zyjj-small-icon{cursor:pointer;padding:4px;justify-content:center;align-items:center;display:flex;width:15px;height:15px;border-radius:5px}.aplayer{background:#fff;font-family:Arial,Helvetica,sans-serif;margin:5px;box-shadow:0 2px 2px #00000012,0 1px 5px #0000001a;border-radius:2px;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:normal;position:relative}.aplayer *{box-sizing:content-box}.aplayer svg{width:100%;height:100%}.aplayer svg circle,.aplayer svg path{fill:#fff}.aplayer.aplayer-withlist .aplayer-info{border-bottom:1px solid #e9e9e9}.aplayer.aplayer-withlist .aplayer-list{display:block}.aplayer.aplayer-withlist .aplayer-icon-order,.aplayer.aplayer-withlist .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu{display:inline}.aplayer.aplayer-withlrc .aplayer-pic{height:90px;width:90px}.aplayer.aplayer-withlrc .aplayer-info{margin-left:90px;height:90px;padding:10px 7px 0}.aplayer.aplayer-withlrc .aplayer-lrc{display:block}.aplayer.aplayer-narrow{width:66px}.aplayer.aplayer-narrow .aplayer-info,.aplayer.aplayer-narrow .aplayer-list{display:none}.aplayer.aplayer-narrow .aplayer-body,.aplayer.aplayer-narrow .aplayer-pic{height:66px;width:66px}.aplayer.aplayer-fixed{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;overflow:visible;max-width:400px;box-shadow:none}.aplayer.aplayer-fixed .aplayer-list{margin-bottom:65px;border:1px solid #eee;border-bottom:none}.aplayer.aplayer-fixed .aplayer-body{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;background:#fff;padding-right:18px;transition:all .3s ease;max-width:400px}.aplayer.aplayer-fixed .aplayer-lrc{display:block;position:fixed;bottom:10px;left:0;right:0;margin:0;z-index:98;pointer-events:none;text-shadow:-1px -1px 0 #fff}.aplayer.aplayer-fixed .aplayer-lrc:after,.aplayer.aplayer-fixed .aplayer-lrc:before{display:none}.aplayer.aplayer-fixed .aplayer-info{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;transition:all .3s ease;border-bottom:none;border-top:1px solid #e9e9e9}.aplayer.aplayer-fixed .aplayer-info .aplayer-music{width:calc(100% - 105px)}.aplayer.aplayer-fixed .aplayer-miniswitcher{display:block}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-info{display:block;-webkit-transform:scaleX(0);transform:scaleX(0)}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body{width:66px!important}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-miniswitcher .aplayer-icon{-webkit-transform:rotateY(0);transform:rotateY(0)}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-lrc,.aplayer.aplayer-fixed .aplayer-icon-play{display:inline-block}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-menu,.aplayer.aplayer-fixed .aplayer-icon-play{position:absolute;bottom:27px;width:20px;height:20px}.aplayer.aplayer-fixed .aplayer-icon-back{right:75px}.aplayer.aplayer-fixed .aplayer-icon-play{right:50px}.aplayer.aplayer-fixed .aplayer-icon-forward{right:25px}.aplayer.aplayer-fixed .aplayer-icon-menu{right:0}.aplayer.aplayer-arrow .aplayer-icon-loop,.aplayer.aplayer-arrow .aplayer-icon-order,.aplayer.aplayer-mobile .aplayer-icon-volume-down{display:none}.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-loading-icon{display:block}.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.aplayer .aplayer-body{position:relative}.aplayer .aplayer-icon{width:15px;height:15px;border:none;background-color:transparent;outline:none;cursor:pointer;opacity:.8;vertical-align:middle;padding:0;font-size:12px;margin:0;display:inline-block}.aplayer .aplayer-icon path{transition:all .2s ease-in-out}.aplayer .aplayer-icon-back,.aplayer .aplayer-icon-forward,.aplayer .aplayer-icon-lrc,.aplayer .aplayer-icon-order,.aplayer .aplayer-icon-play{display:none}.aplayer .aplayer-icon-lrc-inactivity svg{opacity:.4}.aplayer .aplayer-icon-forward{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.aplayer .aplayer-lrc-content{display:none}.aplayer .aplayer-pic{position:relative;float:left;height:66px;width:66px;background-size:cover;background-position:50%;transition:all .3s ease;cursor:pointer}.aplayer .aplayer-pic:hover .aplayer-button{opacity:1}.aplayer .aplayer-pic .aplayer-button{position:absolute;border-radius:50%;opacity:.8;text-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px #0003;background:#0003;transition:all .1s ease}.aplayer .aplayer-pic .aplayer-button path{fill:#fff}.aplayer .aplayer-pic .aplayer-hide{display:none}.aplayer .aplayer-pic .aplayer-play{width:26px;height:26px;border:2px solid #fff;bottom:50%;right:50%;margin:0 -15px -15px 0}.aplayer .aplayer-pic .aplayer-play svg{position:absolute;top:3px;left:4px;height:20px;width:20px}.aplayer .aplayer-pic .aplayer-pause{width:16px;height:16px;border:2px solid #fff;bottom:4px;right:4px}.aplayer .aplayer-pic .aplayer-pause svg{position:absolute;top:2px;left:2px;height:12px;width:12px}.aplayer .aplayer-info{margin-left:66px;padding:14px 7px 0 10px;height:66px;box-sizing:border-box}.aplayer .aplayer-info .aplayer-music{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 0 13px 5px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default;padding-bottom:2px;height:20px}.aplayer .aplayer-info .aplayer-music .aplayer-title{font-size:14px}.aplayer .aplayer-info .aplayer-music .aplayer-author{font-size:12px;color:#666}.aplayer .aplayer-info .aplayer-controller{position:relative;display:flex}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;flex:1}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap:hover .aplayer-bar .aplayer-played .aplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar{position:relative;height:2px;width:100%;background:#cdcdcd}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded{position:absolute;left:0;top:0;bottom:0;background:#aaa;height:2px;transition:all .5s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played{position:absolute;left:0;top:0;bottom:0;height:2px}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:10px;width:10px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;-webkit-transform:scale(0);transform:scale(0)}.aplayer .aplayer-info .aplayer-controller .aplayer-time{position:relative;right:0;bottom:4px;height:17px;color:#999;font-size:11px;padding-left:7px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-time-inner{vertical-align:middle}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon{cursor:pointer;transition:all .2s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path{fill:#666}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-loop{margin-right:2px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover path{fill:#000}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-mode{display:none}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap{position:relative;display:inline-block;margin-left:3px;cursor:pointer!important}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap{height:40px}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap{position:absolute;bottom:15px;right:-3px;width:25px;height:0;z-index:99;overflow:hidden;transition:all .2s ease-in-out}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap.aplayer-volume-bar-wrap-active{height:40px}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar{position:absolute;bottom:0;right:10px;width:5px;height:35px;background:#aaa;border-radius:2.5px;overflow:hidden}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume{position:absolute;bottom:0;right:0;width:5px;transition:all .1s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon{display:none}.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon svg{position:absolute;-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite}.aplayer .aplayer-lrc{display:none;position:relative;height:30px;text-align:center;overflow:hidden;margin:-10px 0 7px}.aplayer .aplayer-lrc:before{top:0;height:10%;background:linear-gradient(180deg,#fff 0,#fff0);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#00ffffff",GradientType=0)}.aplayer .aplayer-lrc:after,.aplayer .aplayer-lrc:before{position:absolute;z-index:1;display:block;overflow:hidden;width:100%;content:" "}.aplayer .aplayer-lrc:after{bottom:0;height:33%;background:linear-gradient(180deg,#fff0 0,#fffc);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffffff",endColorstr="#ccffffff",GradientType=0)}.aplayer .aplayer-lrc p{font-size:12px;color:#666;line-height:16px!important;height:16px!important;padding:0!important;margin:0!important;transition:all .5s ease-out;opacity:.4;overflow:hidden}.aplayer .aplayer-lrc p.aplayer-lrc-current{opacity:1;overflow:visible;height:auto!important;min-height:16px}.aplayer .aplayer-lrc.aplayer-lrc-hide{display:none}.aplayer .aplayer-lrc .aplayer-lrc-contents{width:100%;transition:all .5s ease-out;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default}.aplayer .aplayer-list{overflow:auto;transition:all .5s ease;will-change:height;display:none;overflow:hidden}.aplayer .aplayer-list.aplayer-list-hide{max-height:0!important}.aplayer .aplayer-list ol{list-style-type:none;margin:0;padding:0;overflow-y:auto}.aplayer .aplayer-list ol::-webkit-scrollbar{width:5px}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb{border-radius:3px;background-color:#eee}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb:hover{background-color:#ccc}.aplayer .aplayer-list ol li{position:relative;height:32px;line-height:32px;padding:0 15px;font-size:12px;border-top:1px solid #e9e9e9;cursor:pointer;transition:all .2s ease;overflow:hidden;margin:0}.aplayer .aplayer-list ol li:first-child{border-top:none}.aplayer .aplayer-list ol li:hover{background:#efefef}.aplayer .aplayer-list ol li.aplayer-list-light{background:#e9e9e9}.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-cur{display:inline-block}.aplayer .aplayer-list ol li .aplayer-list-cur{display:none;width:3px;height:22px;position:absolute;left:0;top:5px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-index{color:#666;margin-right:12px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-author{color:#666;float:right;cursor:pointer}.aplayer .aplayer-notice{opacity:0;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:12px;border-radius:4px;padding:5px 10px;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none;background-color:#f4f4f5;color:#909399}.aplayer .aplayer-miniswitcher{display:none;position:absolute;top:0;right:0;bottom:0;height:100%;background:#e6e6e6;width:18px;border-radius:0 2px 2px 0}.aplayer .aplayer-miniswitcher .aplayer-icon{height:100%;width:100%;-webkit-transform:rotateY(180deg);transform:rotateY(180deg);transition:all .3s ease}.aplayer .aplayer-miniswitcher .aplayer-icon path{fill:#666}.aplayer .aplayer-miniswitcher .aplayer-icon:hover path{fill:#000}@-webkit-keyframes aplayer-roll{0%{left:0}to{left:-100%}}@keyframes aplayer-roll{0%{left:0}to{left:-100%}}@-webkit-keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.tool-card:before{content:"";background-repeat:no-repeat,no-repeat;position:absolute;background-size:90px;width:100%;height:100%;background-position:-10% 160%,0 0;opacity:.7}.arco-image-img{width:100%}.arco-progress-line-outer,.arco-progress-line-inner{border-radius:2px!important}.arco-list-item-meta-content{width:100%}.zyjj-search .arco-input:focus,.arco-input.arco-input-focus{border-color:#fff0!important;background-color:#fff0!important}.zyjj-search-tool-item:hover{background:#f7f8fa!important}
package/lib/tool/db.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import { LocalTaskInfo } from '../types/local-task';
2
- export declare const storeNameTask = "task";
3
- export declare const AddTask: (data: LocalTaskInfo, table?: string) => Promise<IDBValidKey>;
4
- export declare const GetAllData: <T>(table?: string) => Promise<T[]>;
5
- export declare const GetData: <T>(id: string, table?: string) => Promise<T>;
6
- export declare const UpdateData: <T>(id: string, data: T, table?: string) => Promise<IDBValidKey>;
7
- export declare const DeleteData: (id: string, table?: string) => Promise<void>;
@@ -1,3 +0,0 @@
1
- export declare const renderTime: (time: number) => string;
2
- export declare const renderCopy: (value: string) => import("react/jsx-runtime").JSX.Element;
3
- export declare const renderEllipsis: (value: string) => import("react/jsx-runtime").JSX.Element;
@@ -1,21 +0,0 @@
1
- import { ToolParamFile } from "../types/local-task.ts";
2
- import COS from 'cos-js-sdk-v5';
3
- export declare const convertFileSize: (bytes: number) => string;
4
- export declare const File2ToolParamFile: (file: File) => ToolParamFile;
5
- export declare const Seconds2TimeStr: (seconds: number) => string;
6
- export declare const getTencentInfo: () => Promise<{
7
- cos: COS;
8
- path: string;
9
- bucket: string;
10
- region: string;
11
- }>;
12
- export declare const object2query: (data: {
13
- [key: string]: any;
14
- }) => string;
15
- export declare const paramReplace: (value: string, data: {
16
- [key: string]: any;
17
- }) => string;
18
- export declare const object2urlParam: (data: {
19
- [key: string]: any;
20
- }) => string;
21
- export declare const downloadFile: (url: string) => Promise<void>;
@@ -1,78 +0,0 @@
1
- export interface AppInfo {
2
- version: string;
3
- app_version: string;
4
- desc: string;
5
- tip: string;
6
- windows: string;
7
- mac: string;
8
- mac_arm: string;
9
- linux: string;
10
- android: string;
11
- qq: string;
12
- wechat: string;
13
- tao_bao: string;
14
- }
15
- export interface UserInfo {
16
- uid: string;
17
- email: string;
18
- points: number;
19
- role: number;
20
- tool_id_list?: string[];
21
- }
22
- export interface ToolInfo {
23
- id: string;
24
- name: string;
25
- desc: string;
26
- help: string;
27
- count: number;
28
- point: string;
29
- login: boolean;
30
- web_support: boolean;
31
- app_support: boolean;
32
- tool_type: ToolType;
33
- tags: string[];
34
- width: number;
35
- height: number;
36
- url: string;
37
- icon: string;
38
- }
39
- export declare enum ToolType {
40
- Task = 0,// 任务类型
41
- Lab = 1
42
- }
43
- export interface ToolDetailInfo {
44
- tool_id?: string;
45
- info?: string;
46
- }
47
- export interface TaskInfo {
48
- id: string;
49
- uid: string;
50
- cid: string;
51
- task_type: number;
52
- input: string;
53
- status: number;
54
- output: string;
55
- extra?: string;
56
- create_time: number;
57
- update_time: number;
58
- }
59
- export interface MaterialInfo {
60
- id?: string;
61
- uid?: string;
62
- name: string;
63
- path: string;
64
- preview?: string;
65
- preview_data?: string;
66
- tags: string[];
67
- size: number;
68
- point: number;
69
- extra?: string;
70
- create_time?: number;
71
- }
72
- export declare enum CloudTaskStatus {
73
- Create = 0,// 创建
74
- Progress = 1,// 进行
75
- Success = 2,// 成功
76
- Error = 3,// 错误
77
- Cancel = 4
78
- }
@@ -1,36 +0,0 @@
1
- export interface ToolFindConfig {
2
- id: string;
3
- tool_id: string;
4
- ext?: string[];
5
- fields: FieldInfo[];
6
- regex?: string[];
7
- }
8
- export interface FieldInfo {
9
- field: string;
10
- value: string;
11
- }
12
- export interface ExtensionConfigToolInfo {
13
- tool_id: string;
14
- tiger_type: number;
15
- fields: FieldInfo[];
16
- width: number;
17
- }
18
- export interface ExtensionConfigWebButton {
19
- id: string;
20
- name: string;
21
- icon: string;
22
- regex: string[];
23
- button_type: number;
24
- tool: ExtensionConfigToolInfo;
25
- }
26
- export interface ExtensionConfigContextMenu {
27
- id: string;
28
- name: string;
29
- urls: string[];
30
- context: string[];
31
- tool: ExtensionConfigToolInfo;
32
- }
33
- export interface ExtensionConfig {
34
- web_button: ExtensionConfigWebButton[];
35
- context_menu: ExtensionConfigContextMenu[];
36
- }
@@ -1,162 +0,0 @@
1
- import { MqttRequest, MqttResponse } from "./mqtt.ts";
2
- import { ToolTaskInfo } from "./tool-task.ts";
3
- import { ToolInfo } from "./cloud.ts";
4
- export type SendTaskActionRequest = (info: LocalActionRequest) => void;
5
- export type TaskActionClose = () => void;
6
- export type GetTaskActionRequest = (uid: string, info: LocalActionRequest) => void;
7
- export type GetTaskActionResponse = (info: LocalActionResponse) => void;
8
- export type SendTaskActionResponse = (uid: string, send: GetTaskActionResponse) => void;
9
- export type TaskProgressCallback = (i: number) => void;
10
- export type GlobalData = {
11
- [key: string]: GlobalDataType;
12
- };
13
- export type GlobalDataType = ToolParamFile | ToolParamFile[] | ToolParamFileDownload | string | object;
14
- export interface ToolParamFile {
15
- path: string;
16
- source?: FileSource;
17
- duration?: number;
18
- size?: number;
19
- ext?: string;
20
- name?: string;
21
- uid?: string;
22
- }
23
- export declare enum FileSource {
24
- Local = 0,// 本地
25
- Cos = 1
26
- }
27
- export interface ToolParamFileDownload {
28
- url: string;
29
- filename: string;
30
- headers?: object;
31
- }
32
- export interface LocalActionRequest {
33
- action_type: LocalActionReqType;
34
- id: string;
35
- data?: LocalActionReqDataCreatTask | LocalActionReqDataRestoreTask | MqttRequest | ToolParamFile | LocalActionReqDataOpenTool | string;
36
- }
37
- export declare enum LocalActionReqType {
38
- TaskCreate = 0,// 创建一个新任务
39
- TaskStop = 1,// 停止任务
40
- TaskRestore = 2,// 恢复任务
41
- MqttSend = 3,// 发送MQTT
42
- ActionClose = 4,// 关闭action链接
43
- MqttReconnect = 5,// MQTT重连
44
- TaskActionAdd = 6,// 添加一个action动作
45
- NavigateTo = 7,// 跳转到指定页面
46
- ExtensionBlobConvert = 8,// Blob url转换
47
- ExtensionGetId = 9,// 获取插件id
48
- OpenTool = 10
49
- }
50
- export interface LocalActionReqDataCreatTask {
51
- name: string;
52
- desc: string;
53
- replace_param?: string[];
54
- global_param: GlobalData;
55
- task_list: ToolTaskInfo[];
56
- }
57
- export interface LocalActionReqDataRestoreTask {
58
- task_data: LocalActionReqDataCreatTask;
59
- restore_info?: TaskRestoreInfo;
60
- }
61
- export interface LocalActionReqDataOpenTool {
62
- id: string;
63
- tool_info: ToolInfo;
64
- data?: {
65
- [key: string]: any;
66
- };
67
- }
68
- export interface TaskRestoreInfo {
69
- idx: number;
70
- info: {
71
- [key: number]: any;
72
- };
73
- }
74
- export interface LocalActionResponse {
75
- id: string;
76
- action_type: LocalActionResType;
77
- data: LocalActionResData;
78
- }
79
- export type LocalActionResData = LocalActionResDataUpdateTaskInfo | LocalActionReqDataCreatTask | MqttResponse | LocalActionReqDataOpenTool | string;
80
- export declare enum LocalActionResType {
81
- TaskInfoUpdate = 0,// 任务信息更新
82
- MqttBack = 1,// Mqtt数据回调
83
- TaskActionAdd = 2,// 新增一个action
84
- NavigateTo = 3,// 跳转到指定页面
85
- ExtensionBlobUrl = 4,// 返回blob url(extension)
86
- ExtensionId = 5,// 返回扩展id(extension)
87
- OpenTool = 6
88
- }
89
- export interface LocalActionResDataUpdateTaskInfo {
90
- progress?: number;
91
- status?: LocalTaskStatus;
92
- msg?: string;
93
- restore_info?: any;
94
- output?: string;
95
- outputs?: GlobalData;
96
- }
97
- export interface LocalTaskInfo {
98
- id: string;
99
- name: string;
100
- desc: string;
101
- status: LocalTaskStatus;
102
- progress: number;
103
- msg?: string;
104
- task_data: string;
105
- restore_info?: string;
106
- output: string;
107
- create_time: number;
108
- }
109
- export declare enum LocalTaskStatus {
110
- Waiting = "\u7B49\u5F85",
111
- Running = "\u8FDB\u884C",
112
- Fail = "\u5931\u8D25",
113
- Success = "\u6210\u529F",
114
- Canceled = "\u53D6\u6D88"
115
- }
116
- export interface TaskService {
117
- taskActionBackHandle: (callback: GetTaskActionResponse) => Promise<{
118
- send: SendTaskActionRequest;
119
- close: TaskActionClose;
120
- }>;
121
- taskActionHandle: (callback: GetTaskActionRequest, addSend: SendTaskActionResponse) => void;
122
- }
123
- export interface IframeDataRequest {
124
- id?: string;
125
- task_type: TaskType;
126
- data?: LocalActionRequest | SendDataRequest | SendDataCostPoint | SendDataChooseFile | ToolParamFile;
127
- }
128
- export interface SendDataRequest {
129
- url: string;
130
- data: any;
131
- method: 'get' | 'post' | 'put' | 'delete';
132
- }
133
- export interface SendDataCostPoint {
134
- name: string;
135
- point: number;
136
- desc: string;
137
- }
138
- export interface SendDataChooseFile {
139
- title: string;
140
- accept: string;
141
- }
142
- export interface IframeDataResponse {
143
- id?: string;
144
- task_type: TaskType;
145
- event_type: LocalTaskEventType;
146
- data: any;
147
- }
148
- export declare enum LocalTaskEventType {
149
- Start = 1,
150
- Progress = 2,
151
- Success = 3,
152
- Error = 4
153
- }
154
- export declare enum TaskType {
155
- ChoosePic = -3,
156
- CostPoint = -4,
157
- AddAction = -5,
158
- CloseWindow = -6,
159
- SendRequest = -7,
160
- UploadFileByPath = -8,
161
- GetInitData = -9
162
- }
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const IconMap: Map<string, JSX.Element>;
@@ -1,16 +0,0 @@
1
- export interface MqttRequest {
2
- task_id: string;
3
- task_type: number;
4
- data: any;
5
- }
6
- export interface MqttResponse {
7
- task_id: string;
8
- event_type: MQTTEventType;
9
- data: any;
10
- }
11
- export declare enum MQTTEventType {
12
- Start = 1,
13
- Progress = 2,
14
- Success = 3,
15
- Error = 4
16
- }
@@ -1,135 +0,0 @@
1
- import { TaskType } from "./local-task.ts";
2
- export interface ToolConfigInfo {
3
- unique: string;
4
- name: string;
5
- config_type: ToolConfigType;
6
- config_data: string;
7
- }
8
- export declare enum ToolConfigType {
9
- FileInput = 0,// 文件上传框
10
- FileInputList = 1,// 文件上传列表
11
- Select = 2,// 下拉框
12
- FileGenerate = 3,// 随机生成一个文件
13
- Input = 4
14
- }
15
- export interface ToolDetailTask {
16
- configs: ToolConfigInfo[];
17
- task_name_unique: string;
18
- task_batch_field: string;
19
- task_list: ToolTaskInfo[];
20
- }
21
- export interface ToolTaskInfo {
22
- task_type: ToolTaskType;
23
- inputs: string[];
24
- outputs: string[];
25
- task_data: TaskDataFfmpeg | TaskDataCloud | TaskDataDownload;
26
- }
27
- export declare enum ToolTaskType {
28
- Ffmpeg = 0,// 转码任务
29
- Cloud = 1,// 云端任务
30
- Download = 2
31
- }
32
- export interface TaskDataFfmpeg {
33
- input: string[];
34
- output: string[];
35
- task_out: string;
36
- actions: FfmpegTaskAction[];
37
- }
38
- export interface FfmpegTaskAction {
39
- action_type: FfmpegActionType;
40
- param: FfmpegTaskParam;
41
- }
42
- export declare enum FfmpegActionType {
43
- SubtitleEmbed = 0,// 嵌入字幕
44
- NoVideo = 1,// 移除视频信息
45
- NoAudio = 2,// 移除音频信息
46
- AudioEncode = 3,// 音频编码
47
- VideoEncode = 4,// 视频编码
48
- MergeFile = 5,// 文件合并
49
- Format = 6,// 视频格式化
50
- AddOption = 7,// 添加额外选项
51
- OutputOption = 8,// 输出选项
52
- InputOption = 9
53
- }
54
- export interface FfmpegTaskParam {
55
- unique?: string;
56
- data?: string;
57
- }
58
- export interface TaskDataCloud {
59
- task_type: number;
60
- output?: string;
61
- upload_list?: string[];
62
- upload_source?: number;
63
- download_list?: string[];
64
- }
65
- export interface TaskDataDownload {
66
- output?: string;
67
- relation: string;
68
- }
69
- export interface ToolDetailLab {
70
- inputs: LabCoreInputOption[];
71
- outputs: LabCoreOutputOption[];
72
- submit_init?: {
73
- [key: string]: any;
74
- };
75
- form_init?: {
76
- [key: string]: any;
77
- };
78
- task_type: TaskType;
79
- loading: string;
80
- submit_text: string;
81
- price: number;
82
- replace_param?: string[];
83
- }
84
- export interface LabCoreInputOption {
85
- name: string;
86
- field: string;
87
- element: LabElementType;
88
- element_data?: LabCoreInputElementData;
89
- require?: boolean;
90
- }
91
- export type LabCoreInputElementData = InputData | SelectData | TextAreaData | UploadData | SliderData | AlertData | string;
92
- export declare enum LabElementType {
93
- Input = 0,
94
- Select = 1,
95
- TextArea = 2,
96
- FileUpload = 3,
97
- Slider = 4,
98
- Audio = 5,
99
- Number = 6,
100
- ImageList = 7,
101
- Image = 8,
102
- Alert = 9,
103
- Video = 10,
104
- MarkDown = 11
105
- }
106
- export interface InputData {
107
- placeholder: string;
108
- }
109
- export interface TextAreaData {
110
- placeholder: string;
111
- max_len: number;
112
- }
113
- export interface SelectData {
114
- data: {
115
- label: string;
116
- value: any;
117
- }[];
118
- }
119
- export interface UploadData {
120
- accept: string;
121
- max_size?: number;
122
- }
123
- export interface SliderData {
124
- max: number;
125
- min: number;
126
- step?: number;
127
- }
128
- export interface AlertData {
129
- content: string;
130
- type?: 'info' | 'success' | 'warning' | 'error';
131
- }
132
- export interface LabCoreOutputOption {
133
- field: string;
134
- element: LabElementType;
135
- }