tona-utils 1.0.21 → 1.0.22

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/README.md ADDED
@@ -0,0 +1,216 @@
1
+ # tona-utils
2
+
3
+ <p align="center">
4
+ <img src="../../assets/tona.png" alt="Tona" width="100" />
5
+ </p>
6
+
7
+ <p align="center">
8
+ Utility functions for CNBlogs theme development.
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/tona-utils"><img src="https://img.shields.io/npm/v/tona-utils?style=flat-square" alt="npm version"></a>
13
+ <a href="LICENSE"><img src="https://img.shields.io/npm/l/tona-utils?style=flat-square" alt="license"></a>
14
+ </p>
15
+
16
+ **English** | [中文](./README.zh-CN.md)
17
+
18
+ ## Features
19
+
20
+ - **Blog Context** - Detect page types, user status, and blog info
21
+ - **User Actions** - Follow, unfollow, like posts
22
+ - **URL Helpers** - Generate CNBlogs URLs
23
+ - **DOM Utilities** - jQuery-based DOM helpers
24
+ - **TypeScript Support** - Full type definitions
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ npm install tona-utils
30
+ ```
31
+
32
+ ```bash
33
+ pnpm add tona-utils
34
+ ```
35
+
36
+ ```bash
37
+ yarn add tona-utils
38
+ ```
39
+
40
+ ## Usage
41
+
42
+ ```typescript
43
+ import {
44
+ isOwner,
45
+ getLoginState,
46
+ getCurrentPage,
47
+ getFollowers,
48
+ likePost,
49
+ } from 'tona-utils'
50
+ ```
51
+
52
+ ## User & Authentication
53
+
54
+ ### `isOwner()`
55
+
56
+ Check if current user is the blog owner.
57
+
58
+ ```typescript
59
+ import { isOwner } from 'tona-utils'
60
+
61
+ if (isOwner()) {
62
+ console.log('This is my blog')
63
+ }
64
+ ```
65
+
66
+ ### `getLoginState()`
67
+
68
+ Check if user is logged in.
69
+
70
+ ```typescript
71
+ import { getLoginState } from 'tona-utils'
72
+
73
+ const isLoggedIn = getLoginState()
74
+ ```
75
+
76
+ ### `getFollowState()`
77
+
78
+ Check if current user follows the blog author.
79
+
80
+ ```typescript
81
+ import { getFollowState } from 'tona-utils'
82
+
83
+ const isFollowing = getFollowState()
84
+ ```
85
+
86
+ ## Page Detection
87
+
88
+ ### `getCurrentPage()`
89
+
90
+ Detect current page type.
91
+
92
+ ```typescript
93
+ import { getCurrentPage } from 'tona-utils'
94
+
95
+ const page = getCurrentPage()
96
+ // Returns: 'home' | 'post' | 'tags' | 'post-archive' | 'category' | 'photos' | 'photo-view' | 'unknown'
97
+ ```
98
+
99
+ ### Page Type Checks
100
+
101
+ ```typescript
102
+ import {
103
+ isHomePage,
104
+ isPostDetailsPage,
105
+ isTagListPage,
106
+ isCategoryPage,
107
+ isAlbumPage,
108
+ } from 'tona-utils'
109
+
110
+ if (isHomePage()) {
111
+ // On blog home page
112
+ }
113
+
114
+ if (isPostDetailsPage()) {
115
+ // On a blog post page
116
+ }
117
+ ```
118
+
119
+ ## Blog Statistics
120
+
121
+ ```typescript
122
+ import {
123
+ getFollowers,
124
+ getFollowing,
125
+ getBlogAge,
126
+ getPostCount,
127
+ getArticleCount,
128
+ getCommentCount,
129
+ getViewCount,
130
+ } from 'tona-utils'
131
+
132
+ const followers = getFollowers() // "123"
133
+ const following = getFollowing() // "45"
134
+ const age = getBlogAge() // "3年"
135
+ const posts = getPostCount() // "100"
136
+ ```
137
+
138
+ ## User Actions
139
+
140
+ ### `follow()` / `unfollow()`
141
+
142
+ Follow or unfollow the blog author.
143
+
144
+ ```typescript
145
+ import { follow, unfollow } from 'tona-utils'
146
+
147
+ follow() // Follow this blog
148
+ unfollow() // Unfollow this blog
149
+ ```
150
+
151
+ ### `likePost()` / `unLikePost()`
152
+
153
+ Recommend or unrecommend a blog post.
154
+
155
+ ```typescript
156
+ import { likePost, unLikePost } from 'tona-utils'
157
+
158
+ likePost() // Recommend this post
159
+ unLikePost() // Unrecommend this post
160
+ ```
161
+
162
+ ## URL Helpers
163
+
164
+ ```typescript
165
+ import {
166
+ getIndexUrl,
167
+ getFollowersUrl,
168
+ getFolloweesUrl,
169
+ getRssUrl,
170
+ getNewPostUrl,
171
+ getAdminUrl,
172
+ } from 'tona-utils'
173
+
174
+ const blogHome = getIndexUrl() // "https://www.cnblogs.com/username"
175
+ const followers = getFollowersUrl() // "https://home.cnblogs.com/u/username/followers"
176
+ const rss = getRssUrl() // "https://www.cnblogs.com/username/rss"
177
+ ```
178
+
179
+ ## Blog Info
180
+
181
+ ```typescript
182
+ import {
183
+ getCurrentBlogId,
184
+ getCurrentBlogApp,
185
+ getNickname,
186
+ getBlogUserGuid,
187
+ getSkinName,
188
+ } from 'tona-utils'
189
+
190
+ const blogId = getCurrentBlogId() // "123456"
191
+ const blogApp = getCurrentBlogApp() // "username"
192
+ const nickname = getNickname() // "博主昵称"
193
+ const guid = getBlogUserGuid() // User GUID
194
+ ```
195
+
196
+ ## Code Highlighting
197
+
198
+ ```typescript
199
+ import {
200
+ setCodeTheme,
201
+ getCodeHighlightTheme,
202
+ getDarkModeCodeHighlightTheme,
203
+ checkEnableCodeLineNumber,
204
+ } from 'tona-utils'
205
+
206
+ // Set code theme
207
+ setCodeTheme('dark')
208
+
209
+ // Check settings
210
+ const hasLineNumbers = checkEnableCodeLineNumber()
211
+ ```
212
+
213
+ ## Related
214
+
215
+ - [tona](https://github.com/guangzan/tona/tree/main/packages/core) - Core framework
216
+ - [tona-hooks](https://github.com/guangzan/tona/tree/main/packages/hooks) - React hooks
@@ -0,0 +1,216 @@
1
+ # tona-utils
2
+
3
+ <p align="center">
4
+ <img src="../../assets/tona.png" alt="Tona" width="100" />
5
+ </p>
6
+
7
+ <p align="center">
8
+ 用于博客园主题开发的工具函数库。
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/tona-utils"><img src="https://img.shields.io/npm/v/tona-utils?style=flat-square" alt="npm version"></a>
13
+ <a href="LICENSE"><img src="https://img.shields.io/npm/l/tona-utils?style=flat-square" alt="license"></a>
14
+ </p>
15
+
16
+ [English](./README.md) | **中文**
17
+
18
+ ## 特性
19
+
20
+ - **博客上下文** - 检测页面类型、用户状态和博客信息
21
+ - **用户操作** - 关注、取消关注、推荐文章
22
+ - **URL 助手** - 生成博客园 URL
23
+ - **DOM 工具** - 基于 jQuery 的 DOM 辅助函数
24
+ - **TypeScript 支持** - 完整的类型定义
25
+
26
+ ## 安装
27
+
28
+ ```bash
29
+ npm install tona-utils
30
+ ```
31
+
32
+ ```bash
33
+ pnpm add tona-utils
34
+ ```
35
+
36
+ ```bash
37
+ yarn add tona-utils
38
+ ```
39
+
40
+ ## 使用
41
+
42
+ ```typescript
43
+ import {
44
+ isOwner,
45
+ getLoginState,
46
+ getCurrentPage,
47
+ getFollowers,
48
+ likePost,
49
+ } from 'tona-utils'
50
+ ```
51
+
52
+ ## 用户与认证
53
+
54
+ ### `isOwner()`
55
+
56
+ 检查当前用户是否为博客所有者。
57
+
58
+ ```typescript
59
+ import { isOwner } from 'tona-utils'
60
+
61
+ if (isOwner()) {
62
+ console.log('这是我的博客')
63
+ }
64
+ ```
65
+
66
+ ### `getLoginState()`
67
+
68
+ 检查用户是否已登录。
69
+
70
+ ```typescript
71
+ import { getLoginState } from 'tona-utils'
72
+
73
+ const isLoggedIn = getLoginState()
74
+ ```
75
+
76
+ ### `getFollowState()`
77
+
78
+ 检查当前用户是否关注了博客作者。
79
+
80
+ ```typescript
81
+ import { getFollowState } from 'tona-utils'
82
+
83
+ const isFollowing = getFollowState()
84
+ ```
85
+
86
+ ## 页面检测
87
+
88
+ ### `getCurrentPage()`
89
+
90
+ 检测当前页面类型。
91
+
92
+ ```typescript
93
+ import { getCurrentPage } from 'tona-utils'
94
+
95
+ const page = getCurrentPage()
96
+ // 返回: 'home' | 'post' | 'tags' | 'post-archive' | 'category' | 'photos' | 'photo-view' | 'unknown'
97
+ ```
98
+
99
+ ### 页面类型检查
100
+
101
+ ```typescript
102
+ import {
103
+ isHomePage,
104
+ isPostDetailsPage,
105
+ isTagListPage,
106
+ isCategoryPage,
107
+ isAlbumPage,
108
+ } from 'tona-utils'
109
+
110
+ if (isHomePage()) {
111
+ // 在博客首页
112
+ }
113
+
114
+ if (isPostDetailsPage()) {
115
+ // 在博客文章页面
116
+ }
117
+ ```
118
+
119
+ ## 博客统计
120
+
121
+ ```typescript
122
+ import {
123
+ getFollowers,
124
+ getFollowing,
125
+ getBlogAge,
126
+ getPostCount,
127
+ getArticleCount,
128
+ getCommentCount,
129
+ getViewCount,
130
+ } from 'tona-utils'
131
+
132
+ const followers = getFollowers() // "123"
133
+ const following = getFollowing() // "45"
134
+ const age = getBlogAge() // "3年"
135
+ const posts = getPostCount() // "100"
136
+ ```
137
+
138
+ ## 用户操作
139
+
140
+ ### `follow()` / `unfollow()`
141
+
142
+ 关注或取消关注博客作者。
143
+
144
+ ```typescript
145
+ import { follow, unfollow } from 'tona-utils'
146
+
147
+ follow() // 关注此博客
148
+ unfollow() // 取消关注此博客
149
+ ```
150
+
151
+ ### `likePost()` / `unLikePost()`
152
+
153
+ 推荐或取消推荐博客文章。
154
+
155
+ ```typescript
156
+ import { likePost, unLikePost } from 'tona-utils'
157
+
158
+ likePost() // 推荐此文章
159
+ unLikePost() // 取消推荐此文章
160
+ ```
161
+
162
+ ## URL 助手
163
+
164
+ ```typescript
165
+ import {
166
+ getIndexUrl,
167
+ getFollowersUrl,
168
+ getFolloweesUrl,
169
+ getRssUrl,
170
+ getNewPostUrl,
171
+ getAdminUrl,
172
+ } from 'tona-utils'
173
+
174
+ const blogHome = getIndexUrl() // "https://www.cnblogs.com/username"
175
+ const followers = getFollowersUrl() // "https://home.cnblogs.com/u/username/followers"
176
+ const rss = getRssUrl() // "https://www.cnblogs.com/username/rss"
177
+ ```
178
+
179
+ ## 博客信息
180
+
181
+ ```typescript
182
+ import {
183
+ getCurrentBlogId,
184
+ getCurrentBlogApp,
185
+ getNickname,
186
+ getBlogUserGuid,
187
+ getSkinName,
188
+ } from 'tona-utils'
189
+
190
+ const blogId = getCurrentBlogId() // "123456"
191
+ const blogApp = getCurrentBlogApp() // "username"
192
+ const nickname = getNickname() // "博主昵称"
193
+ const guid = getBlogUserGuid() // 用户 GUID
194
+ ```
195
+
196
+ ## 代码高亮
197
+
198
+ ```typescript
199
+ import {
200
+ setCodeTheme,
201
+ getCodeHighlightTheme,
202
+ getDarkModeCodeHighlightTheme,
203
+ checkEnableCodeLineNumber,
204
+ } from 'tona-utils'
205
+
206
+ // 设置代码主题
207
+ setCodeTheme('dark')
208
+
209
+ // 检查设置
210
+ const hasLineNumbers = checkEnableCodeLineNumber()
211
+ ```
212
+
213
+ ## 相关
214
+
215
+ - [tona](https://github.com/guangzan/tona/tree/main/packages/core) - 核心框架
216
+ - [tona-hooks](https://github.com/guangzan/tona/tree/main/packages/hooks) - React hooks
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;AAIA;AAQA;AAQA;AAQgB,iBAxBA,OAAA,CAAA,CAwBY,EAAA,OAAA;AAU5B;AAUA;AAQA;AAUA;AAUgB,iBAhEA,aAAA,CAAA,CAgEe,EAAA,OAAA;AAsB/B;AAWA;AAYA;AAQA;AAQgB,iBArHA,QAAA,CAAA,CAqHU,EAAA,OAAA;AAQ1B;AAQA;AAQA;AAQA;AAIgB,iBAjJA,YAAA,CAAA,CAiJc,EAAA,MAAA;AA+D9B;AAQA;AAQA;AAWA;AAOgB,iBAxOA,YAAA,CAAA,CAwOU,EAAA,MAAA;AAY1B;AAcA;AAQA;AAQA;AAQgB,iBAhRA,cAAA,CAAA,CAgRe,EAAA,OAAA;AAQ/B;AAIA;AASA;AAIA;AAIgB,iBArSA,UAAA,CAAA,CAqSY,EAAA,MAAA;AAI5B;AAIA;AAIA;AAIA;AAIgB,iBA/SA,iBAAA,CAAA,CA+SkB,EAAA,MAAA;AAIlC;AAIA;AAIA;AAIA;AAIgB,iBAzTA,eAAA,CAAA,CAyT6B,EAAA,MAAA;AAI7C;AAIA;AAIA;AAIgB,iBAnTA,MA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AAAA,iBAKA,cAAA,CAAA;AAAA,iBAIA,cAAA,CAAA"}
package/dist/index.mjs CHANGED
@@ -369,7 +369,7 @@ function getDraftBoxUrl() {
369
369
  function getEditPostUrl() {
370
370
  return `${iCnblog}/EditPosts.aspx?postid=${getCurrentPostId()}`;
371
371
  }
372
-
373
372
  //#endregion
374
373
  export { IsCommentTurnedOn, checkEnableCodeLineNumber, checkEnableCodeThemeTypeFollowSystem, checkEnableMacStyleCodeBlock, checkEnableMathjax, checkHasCustomScript, checkIsDarkCodeHighlightTheme, checkIsDarkModeCodeHighlightThemeDark, checkIsDisableCodeHighlighter, checkIsLogin, checkIsOwner, follow, getAdminUrl, getAntiforgeryToken, getAppGroupUrl, getAppIngUrl, getAppQUrl, getAppWzUrl, getArticleCount, getBlogAge, getBlogUserGuid, getCnblogHomeUrl, getCodeHighlightEngine, getCodeHighlightTheme, getCommentCount, getCommentedUrl, getContactUrl, getCurrentBlogApp, getCurrentBlogId, getCurrentPage, getCurrentPostDateAdded, getCurrentPostId, getCurrentPostUrl, getDarkModeCodeHighlightTheme, getDetailUrl, getDraftBoxUrl, getEditPostUrl, getFollowState, getFolloweesUrl, getFollowers, getFollowersUrl, getFollowing, getFollowingUrl, getIndexUrl, getLoginState, getMathEngine, getMessageCount, getMessageUrl, getMydiggedUrl, getNewPostUrl, getNickname, getPostCount, getRssUrl, getSendUrl, getSkinName, getUserInfo, getViewCount, getVisitorUserId, hasPostTitle, isAlbumPage, isCategoryPage, isEntrylistPage, isHomePage, isMd, isOwner, isPostDetailsPage, isTagListPage, isTinymce5, likePost, openNews, setCodeTheme, unLikePost, unfollow };
374
+
375
375
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,47 +1,47 @@
1
1
  {
2
2
  "name": "tona-utils",
3
- "version": "1.0.21",
4
- "type": "module",
3
+ "version": "1.0.22",
5
4
  "description": "",
5
+ "keywords": [
6
+ "博客园"
7
+ ],
8
+ "homepage": "https://github.com/guangzan/tona/tree/main/packages/utils#readme",
9
+ "bugs": {
10
+ "url": "https://github.com/guangzan/tona/issues"
11
+ },
12
+ "license": "MIT",
6
13
  "author": {
7
14
  "name": "guangzan",
8
- "url": "https://www.cnblogs.com/guangzan",
9
- "email": "guangzan1999@outlook.com"
15
+ "email": "guangzan1999@outlook.com",
16
+ "url": "https://www.cnblogs.com/guangzan"
10
17
  },
11
- "license": "MIT",
12
- "homepage": "https://github.com/guangzan/tona/tree/main/packages/utils#readme",
13
18
  "repository": {
14
19
  "type": "git",
15
20
  "url": "git+https://github.com/guangzan/tona.git",
16
21
  "directory": "packages/utils"
17
22
  },
18
- "bugs": {
19
- "url": "https://github.com/guangzan/tona/issues"
20
- },
21
- "keywords": [
22
- "博客园"
23
+ "files": [
24
+ "dist"
23
25
  ],
26
+ "type": "module",
27
+ "main": "./dist/index.mjs",
28
+ "module": "./dist/index.mjs",
29
+ "types": "./dist/index.d.mts",
24
30
  "exports": {
25
31
  ".": {
26
32
  "types": "./dist/index.d.mts",
27
33
  "import": "./dist/index.mjs"
28
34
  }
29
35
  },
30
- "main": "./dist/index.mjs",
31
- "module": "./dist/index.mjs",
32
- "types": "./dist/index.d.mts",
33
- "files": [
34
- "dist"
35
- ],
36
36
  "devDependencies": {
37
- "@types/jquery": "^3.5.33",
38
- "@vitest/ui": "^4.0.16",
39
- "happy-dom": "^20.1.0",
40
- "tsdown": "latest",
41
- "vitest": "^4.0.16"
37
+ "@types/jquery": "^4.0.0",
38
+ "@vitest/ui": "^4.1.0",
39
+ "happy-dom": "^20.8.4",
40
+ "vite-plus": "latest",
41
+ "vitest": "npm:@voidzero-dev/vite-plus-test@latest"
42
42
  },
43
43
  "scripts": {
44
- "dev": "tsdown --watch",
45
- "build": "tsdown"
44
+ "dev": "vp pack --watch",
45
+ "build": "vp pack"
46
46
  }
47
47
  }