@aidget-community/daily-quote 0.0.0-stage → 0.1.1

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/agents.md ADDED
@@ -0,0 +1,13 @@
1
+ # 今日金句
2
+
3
+ ## 结构与样式
4
+
5
+ 这是日历式竖向金句卡片。保持浅色背景、深色文字、居中布局、大日期、分隔线与均衡的视觉留白(检查文字实际边界,不只比较 CSS 内边距),不添加底部品牌。日期、英文月份与中文星期由脚本按本地时区自动维护,不要手动修改。窗口位置和宽度由用户控制;更新内容时可按下方规则调整高度。
6
+
7
+ ## 更新金句
8
+
9
+ - `quote`、`book`、`author` 是独立的 `data-aidget-region`,分别填写金句、出处和作者;每次更换金句同时更新三个区域。`book` 是保留的区域名称,内容不限于书籍。书籍或作品名称使用《》标注;没有可核实的作品出处时留空。
10
+ - 金句可以来自书籍、演讲或其他可靠来源。核实原文、作者和可提供的出处;无法核实时更换内容,不要编造或误归属。保持金句简短,确保小尺寸下也可读;以纯文本填充,转义 HTML 特殊字符。
11
+ - 先读取组件和当前 revision,优先使用 Aidget MCP 的 `aidget_patch` 一次原子更新三个 regions;若只有单区域 CLI,则以当前 revision 通过 `widget update` 一次更新完整 HTML,保留结构、日期脚本、样式和其他内容。revision 冲突时重新读取后再更新。
12
+ - 更新后截图检查文字完整、无裁切,并保持金句与出处之间的间距紧凑、上下视觉留白均衡。内容变化需要时,可调整窗口高度以完整展示内容:先读取当前 board revision 和窗口 frame,使用 Aidget board move 保留 display、x、y 和宽度,仅修改高度;遇到 revision 冲突时重新读取,保留用户的新位置和宽度,再按需调整并截图检查。
13
+ - 仅需 `script` 权限,不使用网络、存储或外部资源。本文件不创建或启用定时任务。
Binary file
package/config.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "daily-quote",
3
+ "title": "今日金句",
4
+ "logo": null,
5
+ "screenshots": ["assets/screenshot.png"],
6
+ "platforms": ["macos", "windows", "linux"],
7
+ "size": {
8
+ "width": 300,
9
+ "height": 370
10
+ },
11
+ "dragMode": "all",
12
+ "permissions": ["script"],
13
+ "network": []
14
+ }
package/index.html ADDED
@@ -0,0 +1,49 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="aidget-surface" content="none" />
7
+ <link rel="stylesheet" href="style.css" />
8
+ <title>今日金句</title>
9
+ </head>
10
+ <body>
11
+ <main class="card" aria-label="今日金句">
12
+ <header class="calendar">
13
+ <div class="day" id="day"></div>
14
+ <div class="month" id="month"></div>
15
+ <div class="weekday" id="weekday"></div>
16
+ </header>
17
+ <div class="divider" aria-hidden="true"></div>
18
+ <section class="recommendation" aria-label="今日金句">
19
+ <div class="quote" data-aidget-region="quote">学而时习之,不亦说乎?</div>
20
+ <div class="attribution">
21
+ <div class="book" data-aidget-region="book">《论语》</div>
22
+ <div class="author" data-aidget-region="author">孔子及其弟子</div>
23
+ </div>
24
+ </section>
25
+ </main>
26
+ <script>
27
+ function updateDate() {
28
+ const now = new Date();
29
+ document.getElementById('day').textContent = now.getDate();
30
+ document.getElementById('month').textContent = new Intl.DateTimeFormat('en', {
31
+ month: 'long',
32
+ year: 'numeric',
33
+ })
34
+ .format(now)
35
+ .toUpperCase();
36
+ document.getElementById('weekday').textContent = new Intl.DateTimeFormat('zh-CN', {
37
+ weekday: 'long',
38
+ }).format(now);
39
+ }
40
+ updateDate();
41
+ setInterval(updateDate, 60000);
42
+ document.addEventListener('visibilitychange', () => {
43
+ if (!document.hidden) updateDate();
44
+ });
45
+ window.addEventListener('focus', updateDate);
46
+ window.aidget?.ready();
47
+ </script>
48
+ </body>
49
+ </html>
package/package.json CHANGED
@@ -1,6 +1,25 @@
1
1
  {
2
2
  "name": "@aidget-community/daily-quote",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "今日金句卡片",
5
+ "license": "MIT",
6
+ "author": {
7
+ "name": "micooz",
8
+ "url": "https://github.com/micooz"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/aidget-ai/widgets.git",
13
+ "directory": "packages/daily-quote"
14
+ },
15
+ "files": [
16
+ "config.json",
17
+ "index.html",
18
+ "style.css",
19
+ "agents.md",
20
+ "assets"
21
+ ],
22
+ "publishConfig": {
23
+ "access": "public"
24
+ }
25
+ }
package/style.css ADDED
@@ -0,0 +1,80 @@
1
+ * {
2
+ box-sizing: border-box;
3
+ }
4
+ html,
5
+ body {
6
+ margin: 0;
7
+ width: 100%;
8
+ height: 100%;
9
+ }
10
+ body {
11
+ font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
12
+ color: #2b201a;
13
+ }
14
+ .card {
15
+ width: 100%;
16
+ height: 100%;
17
+ background: #f8f8f7;
18
+ padding: 8%;
19
+ display: flex;
20
+ flex-direction: column;
21
+ align-items: center;
22
+ text-align: center;
23
+ overflow: auto;
24
+ }
25
+ .calendar {
26
+ flex: none;
27
+ }
28
+ .day {
29
+ font-family: 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
30
+ font-weight: 700;
31
+ font-size: clamp(64px, 30vw, 135px);
32
+ letter-spacing: 0;
33
+ line-height: 0.92;
34
+ }
35
+ .month {
36
+ margin-top: 6px;
37
+ font-family: 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
38
+ font-weight: 600;
39
+ font-size: clamp(18px, 6.6vw, 30px);
40
+ white-space: nowrap;
41
+ }
42
+ .weekday {
43
+ margin-top: 8px;
44
+ font-size: clamp(14px, 4vw, 20px);
45
+ font-weight: 400;
46
+ }
47
+ .divider {
48
+ flex: none;
49
+ width: 48px;
50
+ height: 1px;
51
+ background: #a5a09d;
52
+ margin: clamp(16px, 5vh, 24px) 0;
53
+ }
54
+ .recommendation {
55
+ width: 100%;
56
+ flex: 1 0 auto;
57
+ display: flex;
58
+ flex-direction: column;
59
+ align-items: center;
60
+ justify-content: space-between;
61
+ }
62
+ .quote {
63
+ max-width: 100%;
64
+ font-size: clamp(18px, 5.4vw, 25px);
65
+ font-weight: 500;
66
+ line-height: 1.85;
67
+ overflow-wrap: anywhere;
68
+ }
69
+ .attribution {
70
+ margin-top: 0;
71
+ padding-top: 12px;
72
+ font-size: clamp(16px, 4.5vw, 20px);
73
+ font-weight: 400;
74
+ line-height: 1.6;
75
+ overflow-wrap: anywhere;
76
+ }
77
+ .author {
78
+ color: #77716d;
79
+ margin-top: 5px;
80
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.