oc-webkit-xiamen 0.10.0

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 (73) hide show
  1. package/README.md +37 -0
  2. package/dist/assets/svg/arrow.svg.js +1 -0
  3. package/dist/assets/svg/blueNewLogo.svg.js +1 -0
  4. package/dist/assets/svg/blueNewLogoEn.svg.js +1 -0
  5. package/dist/assets/svg/evaluation/comprehensive.svg.js +1 -0
  6. package/dist/assets/svg/evaluation/customize.svg.js +1 -0
  7. package/dist/assets/svg/evaluation/done.svg.js +1 -0
  8. package/dist/assets/svg/evaluation/part.svg.js +1 -0
  9. package/dist/assets/svg/evaluation/quick.svg.js +1 -0
  10. package/dist/assets/svg/footer/github.svg.js +1 -0
  11. package/dist/assets/svg/footer/twitter.svg.js +1 -0
  12. package/dist/assets/svg/footer/wechat.svg.js +1 -0
  13. package/dist/assets/svg/footer/zhihu.svg.js +1 -0
  14. package/dist/assets/svg/left-wing.svg.js +1 -0
  15. package/dist/assets/svg/llm-evaluation.svg.js +1 -0
  16. package/dist/assets/svg/mm-evaluation.svg.js +1 -0
  17. package/dist/assets/svg/newLogo.svg.js +1 -0
  18. package/dist/assets/svg/newLogoEn.svg.js +1 -0
  19. package/dist/assets/svg/right-wing.svg.js +1 -0
  20. package/dist/components/dropdown/dropdown.js +1 -0
  21. package/dist/components/dropdown/dropdown.module.less.js +175 -0
  22. package/dist/components/dropdown/index.js +1 -0
  23. package/dist/components/footer/footer.js +1 -0
  24. package/dist/components/footer/footer.module.less.js +68 -0
  25. package/dist/components/footer/index.js +1 -0
  26. package/dist/components/footer-expansion/footer-expansion.js +1 -0
  27. package/dist/components/footer-expansion/footer-expansion.module.less.js +120 -0
  28. package/dist/components/footer-expansion/index.js +1 -0
  29. package/dist/components/header/components/create-online-evaluation/component/create-evaluation/create-evaluation.js +1 -0
  30. package/dist/components/header/components/create-online-evaluation/component/create-evaluation/create-evaluation.module.less.js +249 -0
  31. package/dist/components/header/components/create-online-evaluation/component/evaluation-button/evaluation-button.js +1 -0
  32. package/dist/components/header/components/create-online-evaluation/component/evaluation-button/evaluation-button.module.less.js +19 -0
  33. package/dist/components/header/components/create-online-evaluation/component/pre-create-evaluation/index.js +1 -0
  34. package/dist/components/header/components/create-online-evaluation/component/pre-create-evaluation/index.module.less.js +68 -0
  35. package/dist/components/header/components/create-online-evaluation/component/sidebar/sidebar.module.less.js +18 -0
  36. package/dist/components/header/firstHeader.module.less.js +305 -0
  37. package/dist/components/header/header.js +1 -0
  38. package/dist/components/header/header.module.less.js +434 -0
  39. package/dist/components/header/hooks/useUrl.js +1 -0
  40. package/dist/components/header/index.js +1 -0
  41. package/dist/components/header/secondHeader.js +1 -0
  42. package/dist/components/md-render/index.js +6 -0
  43. package/dist/components/md-render/index.module.less.js +328 -0
  44. package/dist/components/online-evaluation/index.js +1 -0
  45. package/dist/components/online-evaluation/online-evaluation.js +1 -0
  46. package/dist/components/side-nav/index.js +1 -0
  47. package/dist/components/side-nav/side-nav.js +1 -0
  48. package/dist/components/side-nav/side-nav.module.less.js +80 -0
  49. package/dist/extraComponents/button/button.js +1 -0
  50. package/dist/extraComponents/button/button.module.less.js +52 -0
  51. package/dist/extraComponents/icon-font/index.js +1 -0
  52. package/dist/google-log/home.js +1 -0
  53. package/dist/helper/index.js +1 -0
  54. package/dist/index.js +1 -0
  55. package/dist/locale/en.js +3 -0
  56. package/dist/locale/index.js +1 -0
  57. package/dist/locale/zh.js +3 -0
  58. package/dist/node_modules/style-inject/dist/style-inject.es.js +1 -0
  59. package/dist/providers/OcConfigContext.js +1 -0
  60. package/dist/providers/OcContext.js +1 -0
  61. package/dist/types/components/dropdown/dropdown.d.ts +39 -0
  62. package/dist/types/components/dropdown/index.d.ts +2 -0
  63. package/dist/types/components/footer/index.d.ts +6 -0
  64. package/dist/types/components/footer-expansion/index.d.ts +6 -0
  65. package/dist/types/components/header/index.d.ts +6 -0
  66. package/dist/types/components/md-render/index.d.ts +9 -0
  67. package/dist/types/components/online-evaluation/index.d.ts +6 -0
  68. package/dist/types/components/side-nav/index.d.ts +6 -0
  69. package/dist/types/google-log/home.d.ts +9 -0
  70. package/dist/types/helper/index.d.ts +13 -0
  71. package/dist/types/index.d.ts +117 -0
  72. package/dist/utils/utils.js +1 -0
  73. package/package.json +140 -0
@@ -0,0 +1,6 @@
1
+ import { FooterProps } from '../../index.js';
2
+ import React from 'react';
3
+
4
+ declare const FooterExpansionComJson: React.FC<FooterProps>;
5
+
6
+ export { FooterExpansionComJson as default };
@@ -0,0 +1,6 @@
1
+ import { HeaderProps } from '../../index.js';
2
+ import React from 'react';
3
+
4
+ declare const HeaderComJson: React.FC<HeaderProps>;
5
+
6
+ export { HeaderComJson as default };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+
3
+ interface IProps {
4
+ message: string;
5
+ baseImgUrl?: string;
6
+ }
7
+ declare const _default: React.NamedExoticComponent<IProps>;
8
+
9
+ export { _default as default };
@@ -0,0 +1,6 @@
1
+ import { OnlineEvaluationProps } from '../../index.js';
2
+ import React from 'react';
3
+
4
+ declare const OcOnlineEvaluation: React.FC<OnlineEvaluationProps>;
5
+
6
+ export { OcOnlineEvaluation as default };
@@ -0,0 +1,6 @@
1
+ import { SideNavProps } from '../../index.js';
2
+ import React from 'react';
3
+
4
+ declare const SideNav: React.FC<SideNavProps>;
5
+
6
+ export { SideNav as default };
@@ -0,0 +1,9 @@
1
+ declare const goOCHome: (lang: any, source: any, url: any) => void;
2
+ declare const goRank: (lang: any, source: any, url: any) => void;
3
+ declare const goHub: (lang: any, source: any, url: any) => void;
4
+ declare const goKit: (lang: any, source: any, url: any) => void;
5
+ declare const goRules: (lang: any, source: any, url: any) => void;
6
+ declare const goData: (lang: any, source: any, url: any) => void;
7
+ declare const goInternDiscoveryEvalKit: (lang: any, source: any, url: any) => void;
8
+
9
+ export { goData, goHub, goInternDiscoveryEvalKit, goKit, goOCHome, goRank, goRules };
@@ -0,0 +1,13 @@
1
+ declare enum RankingType {
2
+ LLM = 0,
3
+ MM = 1
4
+ }
5
+ interface AvailableMonth {
6
+ fileName: string;
7
+ month: string;
8
+ updateTime: string;
9
+ columnFileName: string;
10
+ }
11
+ declare const getMenuData: (res: AvailableMonth[], lang: string, type: RankingType) => any;
12
+
13
+ export { AvailableMonth, RankingType, getMenuData };
@@ -0,0 +1,117 @@
1
+ export { default as OcHeader } from './components/header/index.js';
2
+ export { default as OcOnlineEvaluation } from './components/online-evaluation/index.js';
3
+ export { default as OcSideNav } from './components/side-nav/index.js';
4
+ export { default as OcFooter } from './components/footer/index.js';
5
+ export { default as OcDropdown } from './components/dropdown/dropdown.js';
6
+ export { goData, goHub, goInternDiscoveryEvalKit, goKit, goOCHome, goRank, goRules } from './google-log/home.js';
7
+ export { default as OcFooterExpansion } from './components/footer-expansion/index.js';
8
+ export { default as OcMdRender } from './components/md-render/index.js';
9
+ export { getMenuData } from './helper/index.js';
10
+
11
+ declare enum langTypeEnum {
12
+ en = "en-US",
13
+ zh = "zh-CN"
14
+ }
15
+ declare enum envTypeEnum {
16
+ development = "development",
17
+ staging = "staging",
18
+ production = "production"
19
+ }
20
+ declare enum webTypeEnum {
21
+ lightWeb = "lightWeb",
22
+ blueWeb = "blueWeb",
23
+ miniWeb = "miniWeb",
24
+ lightMiniWeb = "lightMiniWeb",
25
+ transparentWeb = "transparentWeb"
26
+ }
27
+ interface DefaultRespDTO<T> {
28
+ msgCode: number;
29
+ msg: string;
30
+ success: boolean;
31
+ data: T;
32
+ }
33
+ interface ApplyEvalRequest {
34
+ modelName: string;
35
+ orgName: string;
36
+ modelScenarios: string;
37
+ email: string;
38
+ phoneNumber: string;
39
+ }
40
+ declare enum evaluationTypeEnum {
41
+ llm = "llm",
42
+ mm = "mm"
43
+ }
44
+ interface IUserInfo {
45
+ active?: number;
46
+ avatar?: string;
47
+ contribution?: null;
48
+ email?: string;
49
+ githubAccount?: null;
50
+ lastLoginAt?: string;
51
+ phone?: string;
52
+ userId: string;
53
+ username?: string;
54
+ nickname?: string;
55
+ access?: string;
56
+ bio?: string;
57
+ birth?: string;
58
+ location?: string;
59
+ locationEn?: string;
60
+ organization?: string;
61
+ qq?: string;
62
+ twitter?: string;
63
+ website?: string;
64
+ wechat?: string;
65
+ zhihu?: string;
66
+ ssoUid?: string;
67
+ token?: string;
68
+ roleIds?: string[];
69
+ }
70
+ interface SubMenu {
71
+ title: {
72
+ zh: string;
73
+ en: string;
74
+ };
75
+ key: string;
76
+ isExternal?: boolean;
77
+ href?: {
78
+ zh: string;
79
+ en: string;
80
+ } | string;
81
+ onClick?: (lang: any, source: any, url: any) => void;
82
+ isActive: boolean;
83
+ customNode?: React.ReactNode;
84
+ }
85
+ interface HeaderProps {
86
+ envType: envTypeEnum;
87
+ handleUnauth: () => void;
88
+ locale: langTypeEnum;
89
+ setLocale: (locale: langTypeEnum) => void;
90
+ logout: () => Promise<unknown>;
91
+ userInfo: IUserInfo;
92
+ jumpLogin: () => void;
93
+ webType: webTypeEnum;
94
+ applyAbilityEval: (data: ApplyEvalRequest) => Promise<DefaultRespDTO<any>>;
95
+ navMenuList?: SubMenu[];
96
+ isLLM: boolean;
97
+ isDefaultShowSecondMenu?: boolean;
98
+ }
99
+ interface OnlineEvaluationProps {
100
+ envType: envTypeEnum;
101
+ webType: webTypeEnum;
102
+ locale: langTypeEnum;
103
+ children?: React.ReactElement;
104
+ }
105
+ interface SideNavProps {
106
+ locale: langTypeEnum;
107
+ envType: envTypeEnum;
108
+ children?: React.ReactElement;
109
+ }
110
+ interface FooterProps {
111
+ locale: langTypeEnum;
112
+ envType: envTypeEnum;
113
+ isSticky?: boolean;
114
+ customClassname?: string;
115
+ }
116
+
117
+ export { ApplyEvalRequest, DefaultRespDTO, FooterProps, HeaderProps, IUserInfo, OnlineEvaluationProps, SideNavProps, envTypeEnum, evaluationTypeEnum, langTypeEnum, webTypeEnum };
@@ -0,0 +1 @@
1
+ const e=()=>{var r=navigator.userAgent.toLowerCase(),a=0,s=r.match(/safari\/(\d+\.\d+)/);const t=r.match(/version\/(\d+\.\d+)/);return s&&(a=parseFloat(s[1])),t&&(a=parseFloat(t[1])),a<16.4};export{e as isOldSafari};
package/package.json ADDED
@@ -0,0 +1,140 @@
1
+ {
2
+ "name": "oc-webkit-xiamen",
3
+ "version": "0.10.0",
4
+ "description": "Provide some common components for oc",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/types/index.d.ts",
7
+ "files": [
8
+ "dist",
9
+ "docs"
10
+ ],
11
+ "scripts": {
12
+ "dev": "cross-env NODE_ENV=developemnt rollup -m -c rollup.config.js -w",
13
+ "build": "rimraf dist && rimraf es && cross-env NODE_ENV=production rollup -c rollup.config.js",
14
+ "test": "tsc --project ./tsconfig.test.json && jest",
15
+ "lint": "eslint 'src/**/*.{ts,tsx,js,jsx}' && npm run build:type",
16
+ "lint:fix": "eslint src/**/*.{ts,tsx,js,jsx} --fix"
17
+ },
18
+ "keywords": [
19
+
20
+ "react"
21
+ ],
22
+ "publishConfig": {
23
+ "registry": "https://registry.npmjs.org/"
24
+ },
25
+ "private": false,
26
+ "homepage": "",
27
+ "license": "Apache-2.0",
28
+ "dependencies": {
29
+ "@ant-design/cssinjs": "^1.18.0-alpha.5",
30
+ "@ant-design/icons": "^4.7.0",
31
+ "@loadable/component": "^5.16.4",
32
+ "@microsoft/fetch-event-source": "^2.0.1",
33
+ "@react-hook/hover": "^4.0.0",
34
+ "ahooks": "^3.8.1",
35
+ "antd": ">=4.15.0",
36
+ "antd-mobile": "^5.38.1",
37
+ "antd-mobile-icons": "^0.3.0",
38
+ "axios": "^1.6.2",
39
+ "classnames": "^2.3.2",
40
+ "core-js": "^3.9.1",
41
+ "country-flag-icons": "^1.5.16",
42
+ "cross-env": "^7.0.3",
43
+ "diff": "^5.1.0",
44
+ "diff2html": "^3.4.41",
45
+ "es6-promise": "^4.2.8",
46
+ "event-source-polyfill": "^1.0.31",
47
+ "events": "^3.3.0",
48
+ "html2canvas": "^1.4.1",
49
+ "js-cookie": "^3.0.5",
50
+ "jssha": "^3.3.1",
51
+ "localforage": "^1.10.0",
52
+ "lodash-es": "^4.17.21",
53
+ "lottie-react": "^2.4.0",
54
+ "moment": "^2.30.1",
55
+ "postcss": "^8.4.23",
56
+ "program-language-detector": "^0.0.12",
57
+ "react": "^18.2.0",
58
+ "react-contextmenu": "^2.14.0",
59
+ "react-copy-to-clipboard": "^5.1.0",
60
+ "react-device-detect": "^2.2.3",
61
+ "react-dom": "^18.2.0",
62
+ "react-images-viewer": "1.6.2",
63
+ "react-markdown": "^9.0.1",
64
+ "react-router-dom": "^6.10.0",
65
+ "react-syntax-highlighter": "^15.5.0",
66
+ "react-text-selection-popover": "^1.3.2",
67
+ "regenerator-runtime": "^0.13.7",
68
+ "rehype-katex": "^7.0.1",
69
+ "rehype-raw": "^7.0.0",
70
+ "remark-gfm": "^4.0.0",
71
+ "remark-math": "^6.0.0",
72
+ "rehype-sanitize": "^6.0.0",
73
+ "rehype-slug": "^6.0.0",
74
+ "remark-code-format": "^1.0.8",
75
+ "selection-popover": "^0.3.0",
76
+ "sse.js": "^2.2.0",
77
+ "remark-breaks": "^4.0.0"
78
+ },
79
+ "peerDependencies": {
80
+ "@ant-design/icons": "^4.7.0",
81
+ "antd": ">=4.15.0",
82
+ "antd-mobile": "^5.38.1",
83
+ "react": "^18.2.0"
84
+ },
85
+ "devDependencies": {
86
+ "@babel/core": "^7.13.10",
87
+ "@babel/preset-typescript": "^7.13.0",
88
+ "@rollup/plugin-alias": "^5.0.0",
89
+ "@rollup/plugin-babel": "^5.3.1",
90
+ "@rollup/plugin-commonjs": "^21.0.2",
91
+ "@rollup/plugin-image": "^3.0.2",
92
+ "@rollup/plugin-json": "^6.0.0",
93
+ "@rollup/plugin-node-resolve": "^15.0.2",
94
+ "@svgr/rollup": "^6.5.1",
95
+ "@types/classnames": "^2.3.1",
96
+ "@types/event-source-polyfill": "^1.0.1",
97
+ "@types/js-cookie": "^3.0.3",
98
+ "@types/lodash-es": "^4.17.7",
99
+ "@types/node": "^18.15.11",
100
+ "@types/office-js": "^1.0.256",
101
+ "@types/office-runtime": "^1.0.23",
102
+ "@types/react": "^18.0.28",
103
+ "@types/react-copy-to-clipboard": "^5.0.4",
104
+ "@types/react-dom": "^18.0.11",
105
+ "@typescript-eslint/eslint-plugin": "^6.4.0",
106
+ "@typescript-eslint/parser": "^6.4.0",
107
+ "acorn": "^8.5.0",
108
+ "babel-loader": "^8.2.2",
109
+ "esbuild": "^0.11.0",
110
+ "eslint": "^8.47.0",
111
+ "eslint-config-prettier": "^9.0.0",
112
+ "eslint-plugin-office-addins": "^2.1.5",
113
+ "eslint-plugin-prettier": "^5.0.0",
114
+ "eslint-plugin-react": "^7.33.2",
115
+ "eslint-plugin-react-hooks": "^4.6.0",
116
+ "jest": "^29.6.2",
117
+ "less": "^4.2.0",
118
+ "office-addin-cli": "^1.5.5",
119
+ "office-addin-debugging": "^5.0.12",
120
+ "office-addin-dev-certs": "^1.11.3",
121
+ "office-addin-lint": "^2.2.5",
122
+ "office-addin-manifest": "^1.12.3",
123
+ "office-addin-prettier-config": "^1.2.0",
124
+ "os-browserify": "^0.3.0",
125
+ "prettier": "3.0.2",
126
+ "prettier-eslint": "^15.0.1",
127
+ "process": "^0.11.10",
128
+ "rimraf": "^3.0.2",
129
+ "rollup": "^2.43.1",
130
+ "rollup-plugin-dts": "^4.2.2",
131
+ "rollup-plugin-esbuild": "^3.0.2",
132
+ "rollup-plugin-peer-deps-external": "^2.2.4",
133
+ "rollup-plugin-postcss": "^4.0.2",
134
+ "rollup-plugin-typescript2": "^0.31.2",
135
+ "rollup-plugin-url": "^3.0.1",
136
+ "shx": "^0.3.4",
137
+ "terser": "^5.16.9",
138
+ "typescript": "^4.2.3"
139
+ }
140
+ }