@wzyjs/utils 0.2.27 → 0.2.37

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 (81) hide show
  1. package/dist/ai/302/axios.d.ts +2 -0
  2. package/dist/ai/302/chat/index.d.ts +1 -0
  3. package/dist/ai/302/image/index.d.ts +1 -0
  4. package/dist/ai/302/image/midjourney.d.ts +2 -0
  5. package/dist/ai/302/index.d.ts +2 -0
  6. package/dist/ai/index.d.ts +3 -0
  7. package/dist/ai/keling/axios.d.ts +2 -0
  8. package/dist/ai/keling/index.d.ts +8 -0
  9. package/dist/ai/keling/utils.d.ts +4 -0
  10. package/dist/ai/midjourney/index.d.ts +1 -0
  11. package/dist/ai/midjourney/utils.d.ts +12 -0
  12. package/dist/browser/download.d.ts +1 -0
  13. package/dist/browser/element.d.ts +6 -0
  14. package/dist/browser/index.d.ts +8 -0
  15. package/dist/browser/other.d.ts +2 -0
  16. package/dist/browser/style.d.ts +10 -0
  17. package/dist/browser.cjs.js +21010 -0
  18. package/dist/browser.esm.js +21007 -0
  19. package/dist/common/antd.d.ts +11 -0
  20. package/dist/common/array.d.ts +3 -0
  21. package/dist/common/image.d.ts +1 -0
  22. package/dist/common/index.d.ts +13 -0
  23. package/dist/common/location.d.ts +8 -0
  24. package/dist/common/number.d.ts +5 -0
  25. package/dist/common/object.d.ts +10 -0
  26. package/dist/common/other.d.ts +4 -0
  27. package/dist/common/promise.d.ts +5 -0
  28. package/dist/common/string.d.ts +22 -0
  29. package/dist/node/file/index.d.ts +2 -0
  30. package/dist/node/index.d.ts +4 -0
  31. package/dist/node/mail/index.d.ts +1 -0
  32. package/dist/node/oss/index.d.ts +9 -0
  33. package/dist/node.cjs.js +97007 -0
  34. package/dist/{cjs/node.d.ts → node.d.ts} +1 -0
  35. package/dist/node.esm.js +96989 -0
  36. package/package.json +27 -25
  37. package/dist/cjs/browser/element.js +0 -59
  38. package/dist/cjs/browser/index.js +0 -66
  39. package/dist/cjs/browser/initHttpClient.js +0 -62
  40. package/dist/cjs/browser/other.js +0 -35
  41. package/dist/cjs/browser/style.js +0 -81
  42. package/dist/cjs/browser.js +0 -25
  43. package/dist/cjs/common/array.js +0 -68
  44. package/dist/cjs/common/classs.js +0 -36
  45. package/dist/cjs/common/dayjs.js +0 -70
  46. package/dist/cjs/common/index.d.ts +0 -13
  47. package/dist/cjs/common/index.js +0 -106
  48. package/dist/cjs/common/number.js +0 -69
  49. package/dist/cjs/common/object.js +0 -65
  50. package/dist/cjs/common/other.js +0 -129
  51. package/dist/cjs/common/string.js +0 -190
  52. package/dist/cjs/node/file/index.js +0 -58
  53. package/dist/cjs/node/index.js +0 -48
  54. package/dist/cjs/node/jsonFile/index.js +0 -75
  55. package/dist/cjs/node/mail/index.js +0 -67
  56. package/dist/cjs/node.js +0 -25
  57. package/dist/esm/browser/element.js +0 -43
  58. package/dist/esm/browser/index.js +0 -16
  59. package/dist/esm/browser/initHttpClient.js +0 -67
  60. package/dist/esm/browser/other.js +0 -28
  61. package/dist/esm/browser/style.js +0 -55
  62. package/dist/esm/browser.d.ts +0 -2
  63. package/dist/esm/browser.js +0 -2
  64. package/dist/esm/common/array.js +0 -65
  65. package/dist/esm/common/classs.js +0 -33
  66. package/dist/esm/common/dayjs.d.ts +0 -19
  67. package/dist/esm/common/dayjs.js +0 -29
  68. package/dist/esm/common/index.d.ts +0 -13
  69. package/dist/esm/common/index.js +0 -14
  70. package/dist/esm/common/number.js +0 -52
  71. package/dist/esm/common/object.js +0 -84
  72. package/dist/esm/common/other.js +0 -167
  73. package/dist/esm/common/string.js +0 -180
  74. package/dist/esm/node/file/index.js +0 -52
  75. package/dist/esm/node/index.js +0 -4
  76. package/dist/esm/node/jsonFile/index.js +0 -101
  77. package/dist/esm/node/mail/index.js +0 -48
  78. package/dist/esm/node.d.ts +0 -2
  79. package/dist/esm/node.js +0 -2
  80. /package/dist/{cjs/browser.d.ts → browser.d.ts} +0 -0
  81. /package/dist/{cjs/common → common}/dayjs.d.ts +0 -0
@@ -0,0 +1,2 @@
1
+ import axios_ from 'axios';
2
+ export declare const axios: axios_.AxiosInstance;
@@ -0,0 +1 @@
1
+ export declare const chat: (message: string, model?: string, isParse?: boolean) => Promise<any>;
@@ -0,0 +1 @@
1
+ export * as midjourney from './midjourney';
@@ -0,0 +1,2 @@
1
+ export declare const generateImage: (prompt: string, base64Array?: string[]) => Promise<any>;
2
+ export declare const getImageStatus: (taskId: string) => Promise<any>;
@@ -0,0 +1,2 @@
1
+ export * from './chat';
2
+ export * as image from './image';
@@ -0,0 +1,3 @@
1
+ export * as keling from './keling';
2
+ export * as ai302 from './302';
3
+ export * as midjourney from './midjourney';
@@ -0,0 +1,2 @@
1
+ import axios_ from 'axios';
2
+ export declare const axios: axios_.AxiosInstance;
@@ -0,0 +1,8 @@
1
+ export { setCookie } from './utils';
2
+ export declare const getVideoStatus: (taskId: string) => Promise<{
3
+ status: any;
4
+ url: any;
5
+ cover: any;
6
+ progress: number;
7
+ }>;
8
+ export declare const generateVideo: (imageUrl: string, prompt?: string) => Promise<any>;
@@ -0,0 +1,4 @@
1
+ export declare const uploadImage: (imageUrl: string) => Promise<any>;
2
+ export declare const sbumit: (imageUrl: string, prompt?: string) => Promise<any>;
3
+ export declare const calculateProgress: (taskData: any) => number;
4
+ export declare const setCookie: (newCookieValue: string) => void;
@@ -0,0 +1 @@
1
+ export declare const generateImage: (prompt?: string) => Promise<any>;
@@ -0,0 +1,12 @@
1
+ export declare const headers: {
2
+ 'User-Agent': string;
3
+ 'Content-Type': string;
4
+ 'x-csrf-protection': string;
5
+ Cookie: string;
6
+ };
7
+ export declare const sendRequest: ({ url, method, data }: {
8
+ url?: string;
9
+ method?: string;
10
+ data?: any;
11
+ }) => Promise<unknown>;
12
+ export declare const downloadImageWithCurl: (imageUrl: string) => Promise<unknown>;
@@ -0,0 +1 @@
1
+ export declare const downloadCsv: (dataSource: any, name?: string, columns?: any[]) => void;
@@ -0,0 +1,6 @@
1
+ export declare const scrollIntoView: (el: Element, option?: ScrollIntoViewOptions) => void;
2
+ export declare const getElement: (el: string | Element) => {
3
+ element: Element;
4
+ originalStyle: CSSStyleDeclaration;
5
+ };
6
+ export declare const isElementInViewport: (el: string | Element) => boolean;
@@ -0,0 +1,8 @@
1
+ export { default as md5 } from 'md5';
2
+ export { default as copy } from 'copy-to-clipboard';
3
+ export { default as anime } from 'animejs';
4
+ export { default as classnames } from 'classnames';
5
+ export { default as localforage } from 'localforage';
6
+ export * from './style';
7
+ export * from './element';
8
+ export * from './other';
@@ -0,0 +1,2 @@
1
+ export declare const readClipboard: () => Promise<string>;
2
+ export declare const printConsoleLog: (type: string, path: string, params: any, response: any) => void;
@@ -0,0 +1,10 @@
1
+ export declare const hexToRgba: (hexColor: string, a?: number) => {
2
+ nums: {
3
+ red: number;
4
+ green: number;
5
+ blue: number;
6
+ };
7
+ text: string;
8
+ };
9
+ export declare const flashBackground: (el: string | Element, color: string, a?: number) => void;
10
+ export declare const flashBorder: (el: string | Element, color: string, a?: number) => void;