exploria-ui 2026.2.31
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/LICENSE +194 -0
- package/README.md +26 -0
- package/dist/EDomUtil-Bm3Zqw96.js +65 -0
- package/dist/ESizeOb-VeHF4XTz.js +44 -0
- package/dist/components/advanced/EParallaxScrolling/EParallaxScrolling.vue.d.ts +7 -0
- package/dist/components/advanced/ERollingFollow/ERollingFollow.vue.d.ts +30 -0
- package/dist/components/advanced/EVirtualList/EVirtualList.vue.d.ts +24 -0
- package/dist/components/advanced/EWatermark/EWatermark.vue.d.ts +27 -0
- package/dist/components/basic/EButton/EButton.vue.d.ts +32 -0
- package/dist/components/basic/ESvgIcon/ESvgIcon.vue.d.ts +5 -0
- package/dist/components/basic/EUnderLine/EUnderLine.vue.d.ts +17 -0
- package/dist/components/data/EAvatar/EAvatar.vue.d.ts +5 -0
- package/dist/components/data/ECalendar.vue.d.ts +9 -0
- package/dist/components/data/ECarousel/ECarousel.vue.d.ts +36 -0
- package/dist/components/data/ECarousel/ECarouselItem.vue.d.ts +21 -0
- package/dist/components/data/ECodeCollapse/ECodeCollapse.vue.d.ts +25 -0
- package/dist/components/data/ECollapse/ECollapse.vue.d.ts +24 -0
- package/dist/components/data/EImage.vue.d.ts +9 -0
- package/dist/components/data/EList.vue.d.ts +31 -0
- package/dist/components/data/EMediaViewer/EMediaViewer.d.ts +4 -0
- package/dist/components/data/EMediaViewer/EMediaViewer.vue.d.ts +13 -0
- package/dist/components/data/EProgress.vue.d.ts +22 -0
- package/dist/components/data/ERollingPagination.vue.d.ts +33 -0
- package/dist/components/data/ESkeleton/ESkeleton.vue.d.ts +2 -0
- package/dist/components/data/ETable/ETable.vue.d.ts +26 -0
- package/dist/components/data/ETable/ETableColumn.vue.d.ts +3 -0
- package/dist/components/data/ETimeline/ETimeline.vue.d.ts +17 -0
- package/dist/components/data/ETimeline/ETimelineItem.vue.d.ts +25 -0
- package/dist/components/feedback/EDialog/EDialog.vue.d.ts +43 -0
- package/dist/components/feedback/EDrawer/EDrawer.vue.d.ts +44 -0
- package/dist/components/feedback/EMessage/EMessage.d.ts +10 -0
- package/dist/components/feedback/EMessage/EMessage.vue.d.ts +8 -0
- package/dist/components/feedback/EMessageBox/EMessageBox.d.ts +5 -0
- package/dist/components/feedback/EMessageBox/EMessageBox.vue.d.ts +17 -0
- package/dist/components/feedback/ENotification/ENotification.d.ts +32 -0
- package/dist/components/feedback/ENotification/ENotification.vue.d.ts +14 -0
- package/dist/components/feedback/EPopover.vue.d.ts +35 -0
- package/dist/components/feedback/ETooltip.vue.d.ts +29 -0
- package/dist/components/form/ECheckbox.vue.d.ts +26 -0
- package/dist/components/form/EColorPicker.vue.d.ts +14 -0
- package/dist/components/form/EConditionGroup/EConditionGroup.vue.d.ts +31 -0
- package/dist/components/form/EFileSelector.vue.d.ts +30 -0
- package/dist/components/form/EForm.vue.d.ts +24 -0
- package/dist/components/form/EFormItem.vue.d.ts +24 -0
- package/dist/components/form/EInput/EInput.vue.d.ts +45 -0
- package/dist/components/form/ERadio.vue.d.ts +26 -0
- package/dist/components/form/ESelect/ESelect.vue.d.ts +24 -0
- package/dist/components/form/ESlider.vue.d.ts +18 -0
- package/dist/components/form/ETimePicker.vue.d.ts +13 -0
- package/dist/components/geometry/ECube.vue.d.ts +2 -0
- package/dist/components/hooks/usePosition.d.ts +27 -0
- package/dist/components/index.d.ts +60 -0
- package/dist/components/index.js +19368 -0
- package/dist/components/layout/EContainerWithScrollbar.vue.d.ts +26 -0
- package/dist/components/layout/EDivider.vue.d.ts +20 -0
- package/dist/components/layout/EScrollX.vue.d.ts +21 -0
- package/dist/components/layout/EScrollbar.vue.d.ts +13 -0
- package/dist/components/navigation/EDropdown.vue.d.ts +35 -0
- package/dist/components/navigation/ETabs/ETabPane.vue.d.ts +21 -0
- package/dist/components/navigation/ETabs/ETabs.vue.d.ts +33 -0
- package/dist/directives/EDrag.d.ts +5 -0
- package/dist/directives/ESizeOb.d.ts +9 -0
- package/dist/directives/ESlideIn.d.ts +5 -0
- package/dist/directives/index.d.ts +4 -0
- package/dist/directives/index.js +23 -0
- package/dist/index.css +2 -0
- package/dist/plugins/EPreloadImageBuilder.d.ts +5 -0
- package/dist/plugins/ESvgPolyfill.d.ts +3 -0
- package/dist/plugins/ESvgSpriteBuilder.d.ts +6 -0
- package/dist/plugins/index.d.ts +4 -0
- package/dist/plugins/index.js +3127 -0
- package/dist/utils/index.js +2 -0
- package/package.json +65 -0
- package/src/plugins/EPreloadImageBuilder.ts +66 -0
- package/src/plugins/ESvgPolyfill.ts +29 -0
- package/src/plugins/ESvgSpriteBuilder.ts +49 -0
- package/src/plugins/index.ts +5 -0
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "exploria-ui",
|
|
3
|
+
"description": "《探索UI》组件库",
|
|
4
|
+
"version": "2026.2.31",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": "three.ts",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"three.ts",
|
|
11
|
+
"exploria-ui",
|
|
12
|
+
"vue3"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"src/plugins",
|
|
17
|
+
"package.json",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"main": "./dist/index.js",
|
|
23
|
+
"types": "./dist/types/index.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./directives": {
|
|
26
|
+
"main": "./dist/directives/index.js",
|
|
27
|
+
"types": "./dist/types/directives/index.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./plugins": {
|
|
30
|
+
"main": "./src/plugins/index.js",
|
|
31
|
+
"types": "./src/types/plugins/index.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./utils": {
|
|
34
|
+
"main": "./dist/utils/index.js",
|
|
35
|
+
"types": "./dist/types/utils/index.d.ts"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"vue": ">=3.5"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"animate.css": "^4.1.1",
|
|
43
|
+
"chroma-js": "^3.1.2",
|
|
44
|
+
"fast-glob": "^3.3.3"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/chroma-js": "^3.1.1",
|
|
48
|
+
"@types/node": "^24.6.0",
|
|
49
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
50
|
+
"@vue/tsconfig": "^0.8.1",
|
|
51
|
+
"oxfmt": "^0.17.0",
|
|
52
|
+
"oxlint": "^1.32.0",
|
|
53
|
+
"sass": "^1.87.0",
|
|
54
|
+
"typescript": "~5.9.3",
|
|
55
|
+
"vite": "8.0.0-beta.0",
|
|
56
|
+
"vite-plugin-dts": "^4.5.4",
|
|
57
|
+
"vue": "^3.5.22",
|
|
58
|
+
"vue-tsc": "^3.1.0"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build:watch": "vite build --watch",
|
|
62
|
+
"pub": "pnpm publish --no-git-checks",
|
|
63
|
+
"type-check": "vue-tsc --noEmit"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import fastGlob from 'fast-glob';
|
|
2
|
+
import type { Plugin } from 'vite';
|
|
3
|
+
|
|
4
|
+
const EPreloadImageBuilder = (options: {
|
|
5
|
+
pattern: string | string[];
|
|
6
|
+
}): Plugin => {
|
|
7
|
+
const { pattern } = options;
|
|
8
|
+
const _images: string[] = [];
|
|
9
|
+
return {
|
|
10
|
+
name: 'vite-plugin-preload-images',
|
|
11
|
+
apply: (_, { command }) => ['serve', 'build'].includes(command),
|
|
12
|
+
|
|
13
|
+
generateBundle(_, bundle) {
|
|
14
|
+
const assetsImages: string[] = [];
|
|
15
|
+
const publicImages: string[] = [];
|
|
16
|
+
fastGlob.sync(pattern).forEach((file) => {
|
|
17
|
+
if (file.includes('src/')) {
|
|
18
|
+
assetsImages.push(file.replace('./', ''));
|
|
19
|
+
} else if (file.includes('public/')) {
|
|
20
|
+
publicImages.push(file.replace('./', ''));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const values = Object.values(bundle);
|
|
24
|
+
values.forEach((item) => {
|
|
25
|
+
if (
|
|
26
|
+
item.type === 'asset' &&
|
|
27
|
+
assetsImages.includes(item.originalFileNames[0])
|
|
28
|
+
) {
|
|
29
|
+
_images.push(item.fileName);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
for (const item of publicImages) {
|
|
34
|
+
_images.push(item.replace('public/', ''));
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
transformIndexHtml(_, ctx) {
|
|
39
|
+
let images: string[];
|
|
40
|
+
if (ctx.server) {
|
|
41
|
+
// 开发环境
|
|
42
|
+
const files = fastGlob.sync(pattern);
|
|
43
|
+
images = files.map(
|
|
44
|
+
(file) => (ctx.server!.config.base || '') + file
|
|
45
|
+
);
|
|
46
|
+
} else {
|
|
47
|
+
// 生产环境
|
|
48
|
+
images = _images;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return images.map((file) => {
|
|
52
|
+
return {
|
|
53
|
+
tag: 'link',
|
|
54
|
+
attrs: {
|
|
55
|
+
rel: 'preload',
|
|
56
|
+
href: file,
|
|
57
|
+
as: 'image',
|
|
58
|
+
fetchpriority: 'low',
|
|
59
|
+
},
|
|
60
|
+
injectTo: 'head',
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export default EPreloadImageBuilder;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Plugin } from 'vite';
|
|
2
|
+
|
|
3
|
+
// 修复 老旧浏览器 中 <use> 引用 <symbol> 时,因封闭影子 DOM 导致的 fill=“url(#*)” 失效问题
|
|
4
|
+
const ESvgPolyfill = (): Plugin => {
|
|
5
|
+
return {
|
|
6
|
+
name: 'vite-plugin-svg-polyfill',
|
|
7
|
+
// 仅在 serve 和 build 命令时生效
|
|
8
|
+
apply: (_, { command }) => ['serve', 'build'].includes(command),
|
|
9
|
+
transformIndexHtml(html) {
|
|
10
|
+
const code = `<script>
|
|
11
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
12
|
+
const defs = document.querySelectorAll('svg defs');
|
|
13
|
+
let globalDefsContent = '';
|
|
14
|
+
defs.forEach(def => {
|
|
15
|
+
globalDefsContent += def.innerHTML;
|
|
16
|
+
});
|
|
17
|
+
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
18
|
+
svg.class = 'global-svg-defs';
|
|
19
|
+
svg.style.cssText = 'position: fixed; width: 0; height: 0; visibility: hidden;';
|
|
20
|
+
svg.innerHTML = '<defs>'+globalDefsContent+'</defs>';
|
|
21
|
+
document.body.insertBefore(svg, document.body.firstChild);
|
|
22
|
+
});
|
|
23
|
+
</script>`;
|
|
24
|
+
return html.replace('</body>', `${code}</body>`);
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default ESvgPolyfill;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// ESvgSpriteBuilder.ts
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
|
|
5
|
+
import fastGlob from 'fast-glob';
|
|
6
|
+
import type { Plugin } from 'vite';
|
|
7
|
+
|
|
8
|
+
// 获取svgInnerContent
|
|
9
|
+
const getSvgInnerContent = (str: string): string | null => {
|
|
10
|
+
const regex = /<svg[^>]*>(.*?)<\/svg>/s; // 匹配带有任意属性的<svg>标签
|
|
11
|
+
const match = str.match(regex); // 执行匹配
|
|
12
|
+
return match ? match[1] : null; // 如果匹配成功,返回匹配的内容,否则返回 null
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const getSvgSymbols = (
|
|
16
|
+
pattern: string,
|
|
17
|
+
symbolId: (filename: string) => string
|
|
18
|
+
): string[] => {
|
|
19
|
+
const files = fastGlob.sync(pattern, {
|
|
20
|
+
cwd: process.cwd(),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
return files.map((filePath) => {
|
|
24
|
+
const filename = path.basename(filePath, '.svg');
|
|
25
|
+
const svgContent = fs.readFileSync(filePath, 'utf-8');
|
|
26
|
+
const innerContent = getSvgInnerContent(svgContent);
|
|
27
|
+
const viewBoxMatch = svgContent.match(/viewBox="([^"]*)"/);
|
|
28
|
+
const viewBox = viewBoxMatch ? viewBoxMatch[1] : '0 0 16 16';
|
|
29
|
+
return `<symbol id="${symbolId(filename)}" viewBox="${viewBox}">${innerContent}</symbol>`;
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const ESvgSpriteBuilder = (options: {
|
|
33
|
+
pattern: string;
|
|
34
|
+
symbolId: (filename: string) => string;
|
|
35
|
+
}): Plugin => {
|
|
36
|
+
const { pattern, symbolId } = options;
|
|
37
|
+
return {
|
|
38
|
+
name: 'vite-plugin-e-svg-sprite-builder',
|
|
39
|
+
apply: (_, { command }) => ['serve', 'build'].includes(command),
|
|
40
|
+
|
|
41
|
+
transformIndexHtml(html) {
|
|
42
|
+
// 只在首次调用时生成 SVG 内容
|
|
43
|
+
const symbols = getSvgSymbols(pattern, symbolId);
|
|
44
|
+
const svgHtml = `<svg xmlns="http://www.w3.org/2000/svg" style="position: fixed;">${symbols.join('')}</svg>`;
|
|
45
|
+
return html.replace('</body>', `${svgHtml}</body>`);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export default ESvgSpriteBuilder;
|