@coffic/cosy-ui 0.3.61 → 0.3.65

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/dist/index.ts CHANGED
@@ -70,12 +70,10 @@ export { default as Main } from './components/containers/Main.astro';
70
70
  export { default as Section } from './components/containers/Section.astro';
71
71
 
72
72
  // Utils
73
- export {
74
- getExampleImage,
75
- getProductImage,
76
- getAvatarImage,
77
- getLandscapeImage
78
- } from './utils/image';
73
+ export * from './utils/image';
74
+ export * from './utils/i18n';
75
+ export * from './utils/path';
76
+ export * from './utils/url';
79
77
 
80
78
  // Types
81
79
  export type { SidebarSection } from './types/layout';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 判断提供的URL是否是GitHub仓库
3
+ * @param url 需要判断的URL
4
+ * @returns 是否是GitHub仓库
5
+ */
6
+ export function isGitHubRepo(url: string): boolean {
7
+ return url.includes('github.com');
8
+ }
9
+
10
+ /**
11
+ * 判断提供的URL是否是GitLab仓库
12
+ * @param url 需要判断的URL
13
+ * @returns 是否是GitLab仓库
14
+ */
15
+ export function isGitLabRepo(url: string): boolean {
16
+ return url.includes('gitlab.com');
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coffic/cosy-ui",
3
- "version": "0.3.61",
3
+ "version": "0.3.65",
4
4
  "description": "An astro component library",
5
5
  "author": {
6
6
  "name": "nookery",