daily-soup-widget 0.1.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.
- package/LICENSE +21 -0
- package/README.md +166 -0
- package/dist/embed.cjs.js +381 -0
- package/dist/embed.cjs.js.map +7 -0
- package/dist/embed.esm.js +358 -0
- package/dist/embed.esm.js.map +7 -0
- package/dist/embed.js +110 -0
- package/dist/embed.js.map +7 -0
- package/dist/schedule-en.json +191 -0
- package/dist/schedule-zh.json +281 -0
- package/dist/types/component.d.ts +2 -0
- package/dist/types/date.d.ts +1 -0
- package/dist/types/embed.d.ts +10 -0
- package/dist/types/i18n.d.ts +14 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/share.d.ts +7 -0
- package/dist/types/styles.d.ts +1 -0
- package/dist/types/theme.d.ts +3 -0
- package/dist/types/types.d.ts +30 -0
- package/dist/types/widget.d.ts +6 -0
- package/package.json +67 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
{
|
|
2
|
+
"launchDate": "2026-05-15",
|
|
3
|
+
"generatedAt": "2026-05-15T16:05:02.865Z",
|
|
4
|
+
"lang": "en",
|
|
5
|
+
"entries": {
|
|
6
|
+
"2026-05-15": "0002",
|
|
7
|
+
"2026-05-16": "0010",
|
|
8
|
+
"2026-05-17": "0015",
|
|
9
|
+
"2026-05-18": "0018",
|
|
10
|
+
"2026-05-19": "0019",
|
|
11
|
+
"2026-05-20": "0020",
|
|
12
|
+
"2026-05-21": "0023",
|
|
13
|
+
"2026-05-22": "0024",
|
|
14
|
+
"2026-05-23": "0028",
|
|
15
|
+
"2026-05-24": "0029",
|
|
16
|
+
"2026-05-25": "0002",
|
|
17
|
+
"2026-05-26": "0010",
|
|
18
|
+
"2026-05-27": "0015",
|
|
19
|
+
"2026-05-28": "0018",
|
|
20
|
+
"2026-05-29": "0019",
|
|
21
|
+
"2026-05-30": "0020",
|
|
22
|
+
"2026-05-31": "0023",
|
|
23
|
+
"2026-06-01": "0024",
|
|
24
|
+
"2026-06-02": "0028",
|
|
25
|
+
"2026-06-03": "0029",
|
|
26
|
+
"2026-06-04": "0002",
|
|
27
|
+
"2026-06-05": "0010",
|
|
28
|
+
"2026-06-06": "0015",
|
|
29
|
+
"2026-06-07": "0018",
|
|
30
|
+
"2026-06-08": "0019",
|
|
31
|
+
"2026-06-09": "0020",
|
|
32
|
+
"2026-06-10": "0023",
|
|
33
|
+
"2026-06-11": "0024",
|
|
34
|
+
"2026-06-12": "0028",
|
|
35
|
+
"2026-06-13": "0029",
|
|
36
|
+
"2026-06-14": "0002",
|
|
37
|
+
"2026-06-15": "0010",
|
|
38
|
+
"2026-06-16": "0015",
|
|
39
|
+
"2026-06-17": "0018",
|
|
40
|
+
"2026-06-18": "0019",
|
|
41
|
+
"2026-06-19": "0020",
|
|
42
|
+
"2026-06-20": "0023",
|
|
43
|
+
"2026-06-21": "0024",
|
|
44
|
+
"2026-06-22": "0028",
|
|
45
|
+
"2026-06-23": "0029",
|
|
46
|
+
"2026-06-24": "0002",
|
|
47
|
+
"2026-06-25": "0010",
|
|
48
|
+
"2026-06-26": "0015",
|
|
49
|
+
"2026-06-27": "0018",
|
|
50
|
+
"2026-06-28": "0019",
|
|
51
|
+
"2026-06-29": "0020",
|
|
52
|
+
"2026-06-30": "0023",
|
|
53
|
+
"2026-07-01": "0024",
|
|
54
|
+
"2026-07-02": "0028",
|
|
55
|
+
"2026-07-03": "0029",
|
|
56
|
+
"2026-07-04": "0002",
|
|
57
|
+
"2026-07-05": "0010",
|
|
58
|
+
"2026-07-06": "0015",
|
|
59
|
+
"2026-07-07": "0018",
|
|
60
|
+
"2026-07-08": "0019",
|
|
61
|
+
"2026-07-09": "0020",
|
|
62
|
+
"2026-07-10": "0023",
|
|
63
|
+
"2026-07-11": "0024",
|
|
64
|
+
"2026-07-12": "0028",
|
|
65
|
+
"2026-07-13": "0029",
|
|
66
|
+
"2026-07-14": "0002",
|
|
67
|
+
"2026-07-15": "0010",
|
|
68
|
+
"2026-07-16": "0015",
|
|
69
|
+
"2026-07-17": "0018",
|
|
70
|
+
"2026-07-18": "0019",
|
|
71
|
+
"2026-07-19": "0020",
|
|
72
|
+
"2026-07-20": "0023",
|
|
73
|
+
"2026-07-21": "0024",
|
|
74
|
+
"2026-07-22": "0028",
|
|
75
|
+
"2026-07-23": "0029",
|
|
76
|
+
"2026-07-24": "0002",
|
|
77
|
+
"2026-07-25": "0010",
|
|
78
|
+
"2026-07-26": "0015",
|
|
79
|
+
"2026-07-27": "0018",
|
|
80
|
+
"2026-07-28": "0019",
|
|
81
|
+
"2026-07-29": "0020",
|
|
82
|
+
"2026-07-30": "0023",
|
|
83
|
+
"2026-07-31": "0024",
|
|
84
|
+
"2026-08-01": "0028",
|
|
85
|
+
"2026-08-02": "0029",
|
|
86
|
+
"2026-08-03": "0002",
|
|
87
|
+
"2026-08-04": "0010",
|
|
88
|
+
"2026-08-05": "0015",
|
|
89
|
+
"2026-08-06": "0018",
|
|
90
|
+
"2026-08-07": "0019",
|
|
91
|
+
"2026-08-08": "0020",
|
|
92
|
+
"2026-08-09": "0023",
|
|
93
|
+
"2026-08-10": "0024",
|
|
94
|
+
"2026-08-11": "0028",
|
|
95
|
+
"2026-08-12": "0029",
|
|
96
|
+
"2026-08-13": "0002",
|
|
97
|
+
"2026-08-14": "0010"
|
|
98
|
+
},
|
|
99
|
+
"quotes": {
|
|
100
|
+
"0002": {
|
|
101
|
+
"text": "The beginning is the most important part of the work.",
|
|
102
|
+
"author": "Plato",
|
|
103
|
+
"source": "Republic, Book II",
|
|
104
|
+
"sourceUrl": "https://en.wikisource.org/wiki/The_Republic_of_Plato",
|
|
105
|
+
"attribution": "verified",
|
|
106
|
+
"dimension": "action",
|
|
107
|
+
"style": "classical"
|
|
108
|
+
},
|
|
109
|
+
"0010": {
|
|
110
|
+
"text": "We are what we repeatedly do. Excellence, then, is not an act, but a habit.",
|
|
111
|
+
"author": "Aristotle (paraphrase by Will Durant)",
|
|
112
|
+
"source": "Nicomachean Ethics, Book II (paraphrase); originated in Durant's The Story of Philosophy",
|
|
113
|
+
"sourceUrl": "https://en.wikisource.org/wiki/Nicomachean_Ethics",
|
|
114
|
+
"attribution": "popular-attribution",
|
|
115
|
+
"dimension": "learning",
|
|
116
|
+
"style": "classical"
|
|
117
|
+
},
|
|
118
|
+
"0015": {
|
|
119
|
+
"text": "That which does not kill us makes us stronger.",
|
|
120
|
+
"author": "Friedrich Nietzsche",
|
|
121
|
+
"source": "Twilight of the Idols (1889)",
|
|
122
|
+
"sourceUrl": "https://en.wikisource.org/wiki/Twilight_of_the_Idols",
|
|
123
|
+
"attribution": "verified",
|
|
124
|
+
"dimension": "perseverance",
|
|
125
|
+
"style": "modern"
|
|
126
|
+
},
|
|
127
|
+
"0018": {
|
|
128
|
+
"text": "You have power over your mind — not outside events. Realize this, and you will find strength.",
|
|
129
|
+
"author": "Marcus Aurelius",
|
|
130
|
+
"source": "Meditations, Book VIII",
|
|
131
|
+
"sourceUrl": "https://en.wikisource.org/wiki/Meditations",
|
|
132
|
+
"attribution": "verified",
|
|
133
|
+
"dimension": "mindset",
|
|
134
|
+
"style": "classical"
|
|
135
|
+
},
|
|
136
|
+
"0019": {
|
|
137
|
+
"text": "The happiness of your life depends upon the quality of your thoughts.",
|
|
138
|
+
"author": "Marcus Aurelius",
|
|
139
|
+
"source": "Meditations",
|
|
140
|
+
"sourceUrl": "https://en.wikisource.org/wiki/Meditations",
|
|
141
|
+
"attribution": "verified",
|
|
142
|
+
"dimension": "mindset",
|
|
143
|
+
"style": "classical"
|
|
144
|
+
},
|
|
145
|
+
"0020": {
|
|
146
|
+
"text": "It is not what happens to you, but how you react to it that matters.",
|
|
147
|
+
"author": "Epictetus",
|
|
148
|
+
"source": "Enchiridion",
|
|
149
|
+
"sourceUrl": "https://en.wikisource.org/wiki/Enchiridion",
|
|
150
|
+
"attribution": "verified",
|
|
151
|
+
"dimension": "mindset",
|
|
152
|
+
"style": "classical"
|
|
153
|
+
},
|
|
154
|
+
"0023": {
|
|
155
|
+
"text": "When I let go of what I am, I become what I might be.",
|
|
156
|
+
"author": "Lao Tzu (popular English rendering)",
|
|
157
|
+
"source": "Tao Te Ching, popular English translation",
|
|
158
|
+
"sourceUrl": "",
|
|
159
|
+
"attribution": "popular-attribution",
|
|
160
|
+
"dimension": "transformation",
|
|
161
|
+
"style": "modern"
|
|
162
|
+
},
|
|
163
|
+
"0024": {
|
|
164
|
+
"text": "I am not what happened to me, I am what I choose to become.",
|
|
165
|
+
"author": "Carl Jung (popularly attributed)",
|
|
166
|
+
"source": "Popularly attributed to Jung",
|
|
167
|
+
"sourceUrl": "",
|
|
168
|
+
"attribution": "popular-attribution",
|
|
169
|
+
"dimension": "transformation",
|
|
170
|
+
"style": "modern"
|
|
171
|
+
},
|
|
172
|
+
"0028": {
|
|
173
|
+
"text": "He who has a why to live for can bear almost any how.",
|
|
174
|
+
"author": "Friedrich Nietzsche",
|
|
175
|
+
"source": "Twilight of the Idols (1889)",
|
|
176
|
+
"sourceUrl": "https://en.wikisource.org/wiki/Twilight_of_the_Idols",
|
|
177
|
+
"attribution": "verified",
|
|
178
|
+
"dimension": "purpose",
|
|
179
|
+
"style": "modern"
|
|
180
|
+
},
|
|
181
|
+
"0029": {
|
|
182
|
+
"text": "The two most important days in your life are the day you are born and the day you find out why.",
|
|
183
|
+
"author": "Mark Twain (popularly attributed)",
|
|
184
|
+
"source": "Popularly attributed; Twain d. 1910, PD globally",
|
|
185
|
+
"sourceUrl": "",
|
|
186
|
+
"attribution": "popular-attribution",
|
|
187
|
+
"dimension": "purpose",
|
|
188
|
+
"style": "modern"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
{
|
|
2
|
+
"launchDate": "2026-05-15",
|
|
3
|
+
"generatedAt": "2026-05-15T16:05:02.863Z",
|
|
4
|
+
"lang": "zh",
|
|
5
|
+
"entries": {
|
|
6
|
+
"2026-05-15": "0001",
|
|
7
|
+
"2026-05-16": "0003",
|
|
8
|
+
"2026-05-17": "0004",
|
|
9
|
+
"2026-05-18": "0005",
|
|
10
|
+
"2026-05-19": "0006",
|
|
11
|
+
"2026-05-20": "0007",
|
|
12
|
+
"2026-05-21": "0008",
|
|
13
|
+
"2026-05-22": "0009",
|
|
14
|
+
"2026-05-23": "0011",
|
|
15
|
+
"2026-05-24": "0012",
|
|
16
|
+
"2026-05-25": "0013",
|
|
17
|
+
"2026-05-26": "0014",
|
|
18
|
+
"2026-05-27": "0016",
|
|
19
|
+
"2026-05-28": "0017",
|
|
20
|
+
"2026-05-29": "0021",
|
|
21
|
+
"2026-05-30": "0022",
|
|
22
|
+
"2026-05-31": "0025",
|
|
23
|
+
"2026-06-01": "0026",
|
|
24
|
+
"2026-06-02": "0027",
|
|
25
|
+
"2026-06-03": "0030",
|
|
26
|
+
"2026-06-04": "0001",
|
|
27
|
+
"2026-06-05": "0003",
|
|
28
|
+
"2026-06-06": "0004",
|
|
29
|
+
"2026-06-07": "0005",
|
|
30
|
+
"2026-06-08": "0006",
|
|
31
|
+
"2026-06-09": "0007",
|
|
32
|
+
"2026-06-10": "0008",
|
|
33
|
+
"2026-06-11": "0009",
|
|
34
|
+
"2026-06-12": "0011",
|
|
35
|
+
"2026-06-13": "0012",
|
|
36
|
+
"2026-06-14": "0013",
|
|
37
|
+
"2026-06-15": "0014",
|
|
38
|
+
"2026-06-16": "0016",
|
|
39
|
+
"2026-06-17": "0017",
|
|
40
|
+
"2026-06-18": "0021",
|
|
41
|
+
"2026-06-19": "0022",
|
|
42
|
+
"2026-06-20": "0025",
|
|
43
|
+
"2026-06-21": "0026",
|
|
44
|
+
"2026-06-22": "0027",
|
|
45
|
+
"2026-06-23": "0030",
|
|
46
|
+
"2026-06-24": "0001",
|
|
47
|
+
"2026-06-25": "0003",
|
|
48
|
+
"2026-06-26": "0004",
|
|
49
|
+
"2026-06-27": "0005",
|
|
50
|
+
"2026-06-28": "0006",
|
|
51
|
+
"2026-06-29": "0007",
|
|
52
|
+
"2026-06-30": "0008",
|
|
53
|
+
"2026-07-01": "0009",
|
|
54
|
+
"2026-07-02": "0011",
|
|
55
|
+
"2026-07-03": "0012",
|
|
56
|
+
"2026-07-04": "0013",
|
|
57
|
+
"2026-07-05": "0014",
|
|
58
|
+
"2026-07-06": "0016",
|
|
59
|
+
"2026-07-07": "0017",
|
|
60
|
+
"2026-07-08": "0021",
|
|
61
|
+
"2026-07-09": "0022",
|
|
62
|
+
"2026-07-10": "0025",
|
|
63
|
+
"2026-07-11": "0026",
|
|
64
|
+
"2026-07-12": "0027",
|
|
65
|
+
"2026-07-13": "0030",
|
|
66
|
+
"2026-07-14": "0001",
|
|
67
|
+
"2026-07-15": "0003",
|
|
68
|
+
"2026-07-16": "0004",
|
|
69
|
+
"2026-07-17": "0005",
|
|
70
|
+
"2026-07-18": "0006",
|
|
71
|
+
"2026-07-19": "0007",
|
|
72
|
+
"2026-07-20": "0008",
|
|
73
|
+
"2026-07-21": "0009",
|
|
74
|
+
"2026-07-22": "0011",
|
|
75
|
+
"2026-07-23": "0012",
|
|
76
|
+
"2026-07-24": "0013",
|
|
77
|
+
"2026-07-25": "0014",
|
|
78
|
+
"2026-07-26": "0016",
|
|
79
|
+
"2026-07-27": "0017",
|
|
80
|
+
"2026-07-28": "0021",
|
|
81
|
+
"2026-07-29": "0022",
|
|
82
|
+
"2026-07-30": "0025",
|
|
83
|
+
"2026-07-31": "0026",
|
|
84
|
+
"2026-08-01": "0027",
|
|
85
|
+
"2026-08-02": "0030",
|
|
86
|
+
"2026-08-03": "0001",
|
|
87
|
+
"2026-08-04": "0003",
|
|
88
|
+
"2026-08-05": "0004",
|
|
89
|
+
"2026-08-06": "0005",
|
|
90
|
+
"2026-08-07": "0006",
|
|
91
|
+
"2026-08-08": "0007",
|
|
92
|
+
"2026-08-09": "0008",
|
|
93
|
+
"2026-08-10": "0009",
|
|
94
|
+
"2026-08-11": "0011",
|
|
95
|
+
"2026-08-12": "0012",
|
|
96
|
+
"2026-08-13": "0013",
|
|
97
|
+
"2026-08-14": "0014"
|
|
98
|
+
},
|
|
99
|
+
"quotes": {
|
|
100
|
+
"0001": {
|
|
101
|
+
"text": "千里之行,始於足下。",
|
|
102
|
+
"author": "老子",
|
|
103
|
+
"source": "《道德經·第六十四章》",
|
|
104
|
+
"sourceUrl": "https://ctext.org/dao-de-jing/zh",
|
|
105
|
+
"attribution": "verified",
|
|
106
|
+
"dimension": "action",
|
|
107
|
+
"style": "classical"
|
|
108
|
+
},
|
|
109
|
+
"0003": {
|
|
110
|
+
"text": "知是行之始,行是知之成。",
|
|
111
|
+
"author": "王陽明",
|
|
112
|
+
"source": "《傳習錄·上》",
|
|
113
|
+
"sourceUrl": "https://ctext.org/wiki.pl?if=gb&res=86081",
|
|
114
|
+
"attribution": "verified",
|
|
115
|
+
"dimension": "action",
|
|
116
|
+
"style": "classical"
|
|
117
|
+
},
|
|
118
|
+
"0004": {
|
|
119
|
+
"text": "人生須知負責任的苦處,才能知道盡責任的樂趣。",
|
|
120
|
+
"author": "梁啟超",
|
|
121
|
+
"source": "《最苦與最樂》(1922)",
|
|
122
|
+
"sourceUrl": "",
|
|
123
|
+
"attribution": "verified",
|
|
124
|
+
"dimension": "action",
|
|
125
|
+
"style": "vernacular"
|
|
126
|
+
},
|
|
127
|
+
"0005": {
|
|
128
|
+
"text": "人,只要勤勞動,腳是不會老的。",
|
|
129
|
+
"author": "老舍",
|
|
130
|
+
"source": "老舍語錄",
|
|
131
|
+
"sourceUrl": "",
|
|
132
|
+
"attribution": "verified",
|
|
133
|
+
"dimension": "action",
|
|
134
|
+
"style": "vernacular"
|
|
135
|
+
},
|
|
136
|
+
"0006": {
|
|
137
|
+
"text": "吾心信其可行,則移山填海之難,終有成功之日。",
|
|
138
|
+
"author": "孫中山",
|
|
139
|
+
"source": "《孫文學說》(1919)",
|
|
140
|
+
"sourceUrl": "",
|
|
141
|
+
"attribution": "verified",
|
|
142
|
+
"dimension": "action",
|
|
143
|
+
"style": "vernacular"
|
|
144
|
+
},
|
|
145
|
+
"0007": {
|
|
146
|
+
"text": "三人行,必有我師焉;擇其善者而從之,其不善者而改之。",
|
|
147
|
+
"author": "孔子",
|
|
148
|
+
"source": "《論語·述而》",
|
|
149
|
+
"sourceUrl": "https://ctext.org/analects/shu-er/zh",
|
|
150
|
+
"attribution": "verified",
|
|
151
|
+
"dimension": "learning",
|
|
152
|
+
"style": "classical"
|
|
153
|
+
},
|
|
154
|
+
"0008": {
|
|
155
|
+
"text": "學而時習之,不亦說乎?",
|
|
156
|
+
"author": "孔子",
|
|
157
|
+
"source": "《論語·學而》",
|
|
158
|
+
"sourceUrl": "https://ctext.org/analects/xue-er/zh",
|
|
159
|
+
"attribution": "verified",
|
|
160
|
+
"dimension": "learning",
|
|
161
|
+
"style": "classical"
|
|
162
|
+
},
|
|
163
|
+
"0009": {
|
|
164
|
+
"text": "滴水穿石,非一日之功。",
|
|
165
|
+
"author": "民間諺語",
|
|
166
|
+
"source": "古諺;意源自宋·羅大經《鶴林玉露》「繩鋸木斷,水滴石穿」",
|
|
167
|
+
"sourceUrl": "",
|
|
168
|
+
"attribution": "proverb",
|
|
169
|
+
"dimension": "learning",
|
|
170
|
+
"style": "vernacular"
|
|
171
|
+
},
|
|
172
|
+
"0011": {
|
|
173
|
+
"text": "問渠那得清如許?為有源頭活水來。",
|
|
174
|
+
"author": "朱熹",
|
|
175
|
+
"source": "宋·朱熹《觀書有感》",
|
|
176
|
+
"sourceUrl": "",
|
|
177
|
+
"attribution": "verified",
|
|
178
|
+
"dimension": "learning",
|
|
179
|
+
"style": "poetry"
|
|
180
|
+
},
|
|
181
|
+
"0012": {
|
|
182
|
+
"text": "古之立大事者,不惟有超世之才,亦必有堅忍不拔之志。",
|
|
183
|
+
"author": "蘇軾",
|
|
184
|
+
"source": "宋·蘇軾《晁錯論》",
|
|
185
|
+
"sourceUrl": "",
|
|
186
|
+
"attribution": "verified",
|
|
187
|
+
"dimension": "perseverance",
|
|
188
|
+
"style": "classical"
|
|
189
|
+
},
|
|
190
|
+
"0013": {
|
|
191
|
+
"text": "雖千萬人,吾往矣。",
|
|
192
|
+
"author": "孟子",
|
|
193
|
+
"source": "《孟子·公孫丑上》",
|
|
194
|
+
"sourceUrl": "https://ctext.org/mengzi/gong-sun-chou-i/zh",
|
|
195
|
+
"attribution": "verified",
|
|
196
|
+
"dimension": "perseverance",
|
|
197
|
+
"style": "classical"
|
|
198
|
+
},
|
|
199
|
+
"0014": {
|
|
200
|
+
"text": "莫等閒,白了少年頭,空悲切。",
|
|
201
|
+
"author": "岳飛",
|
|
202
|
+
"source": "宋·岳飛《滿江紅》",
|
|
203
|
+
"sourceUrl": "",
|
|
204
|
+
"attribution": "popular-attribution",
|
|
205
|
+
"dimension": "perseverance",
|
|
206
|
+
"style": "poetry"
|
|
207
|
+
},
|
|
208
|
+
"0016": {
|
|
209
|
+
"text": "怕什麼真理無窮,進一寸有一寸的歡喜。",
|
|
210
|
+
"author": "胡適",
|
|
211
|
+
"source": "胡適語錄",
|
|
212
|
+
"sourceUrl": "",
|
|
213
|
+
"attribution": "verified",
|
|
214
|
+
"dimension": "perseverance",
|
|
215
|
+
"style": "vernacular"
|
|
216
|
+
},
|
|
217
|
+
"0017": {
|
|
218
|
+
"text": "天下無難事,只怕有心人。",
|
|
219
|
+
"author": "民間諺語",
|
|
220
|
+
"source": "《西遊記》第二回;早為民間流傳俗語",
|
|
221
|
+
"sourceUrl": "",
|
|
222
|
+
"attribution": "proverb",
|
|
223
|
+
"dimension": "mindset",
|
|
224
|
+
"style": "vernacular"
|
|
225
|
+
},
|
|
226
|
+
"0021": {
|
|
227
|
+
"text": "非淡泊無以明志,非寧靜無以致遠。",
|
|
228
|
+
"author": "諸葛亮",
|
|
229
|
+
"source": "三國·諸葛亮《誡子書》",
|
|
230
|
+
"sourceUrl": "https://ctext.org/wiki.pl?if=en&res=78566",
|
|
231
|
+
"attribution": "verified",
|
|
232
|
+
"dimension": "mindset",
|
|
233
|
+
"style": "classical"
|
|
234
|
+
},
|
|
235
|
+
"0022": {
|
|
236
|
+
"text": "三十而立,四十而不惑,五十而知天命。",
|
|
237
|
+
"author": "孔子",
|
|
238
|
+
"source": "《論語·為政》",
|
|
239
|
+
"sourceUrl": "https://ctext.org/analects/wei-zheng/zh",
|
|
240
|
+
"attribution": "verified",
|
|
241
|
+
"dimension": "mindset",
|
|
242
|
+
"style": "classical"
|
|
243
|
+
},
|
|
244
|
+
"0025": {
|
|
245
|
+
"text": "鵬之徙於南冥也,水擊三千里,摶扶搖而上者九萬里。",
|
|
246
|
+
"author": "莊子",
|
|
247
|
+
"source": "《莊子·逍遙遊》",
|
|
248
|
+
"sourceUrl": "https://ctext.org/zhuangzi/enjoyment-in-untroubled-ease/zh",
|
|
249
|
+
"attribution": "verified",
|
|
250
|
+
"dimension": "transformation",
|
|
251
|
+
"style": "classical"
|
|
252
|
+
},
|
|
253
|
+
"0026": {
|
|
254
|
+
"text": "燕子去了,有再來的時候;楊柳枯了,有再青的時候;桃花謝了,有再開的時候。",
|
|
255
|
+
"author": "朱自清",
|
|
256
|
+
"source": "朱自清《匆匆》",
|
|
257
|
+
"sourceUrl": "",
|
|
258
|
+
"attribution": "verified",
|
|
259
|
+
"dimension": "transformation",
|
|
260
|
+
"style": "vernacular"
|
|
261
|
+
},
|
|
262
|
+
"0027": {
|
|
263
|
+
"text": "天將降大任於是人也,必先苦其心志,勞其筋骨,餓其體膚。",
|
|
264
|
+
"author": "孟子",
|
|
265
|
+
"source": "《孟子·告子下》",
|
|
266
|
+
"sourceUrl": "https://ctext.org/mengzi/gaozi-ii/zh",
|
|
267
|
+
"attribution": "verified",
|
|
268
|
+
"dimension": "purpose",
|
|
269
|
+
"style": "classical"
|
|
270
|
+
},
|
|
271
|
+
"0030": {
|
|
272
|
+
"text": "老驥伏櫪,志在千里;烈士暮年,壯心不已。",
|
|
273
|
+
"author": "曹操",
|
|
274
|
+
"source": "漢·曹操《步出夏門行·龜雖壽》",
|
|
275
|
+
"sourceUrl": "",
|
|
276
|
+
"attribution": "verified",
|
|
277
|
+
"dimension": "purpose",
|
|
278
|
+
"style": "poetry"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function todayUtc8(now?: Date): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Lang } from './types';
|
|
2
|
+
interface UiStrings {
|
|
3
|
+
copy: string;
|
|
4
|
+
copied: string;
|
|
5
|
+
share: string;
|
|
6
|
+
source: string;
|
|
7
|
+
poweredBy: string;
|
|
8
|
+
attributedPopular: string;
|
|
9
|
+
shareX: string;
|
|
10
|
+
shareLine: string;
|
|
11
|
+
loadFailed: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function t(lang: Lang): UiStrings;
|
|
14
|
+
export type { UiStrings };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface ShareContent {
|
|
2
|
+
text: string;
|
|
3
|
+
author: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function copyToClipboard(content: ShareContent): Promise<boolean>;
|
|
6
|
+
export declare function buildXShareUrl(content: ShareContent): string;
|
|
7
|
+
export declare function buildLineShareUrl(content: ShareContent): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WIDGET_STYLES = "\n :host { all: initial; display: block; font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Noto Sans TC\", sans-serif; }\n * { box-sizing: border-box; }\n .ds-card {\n container-type: inline-size;\n width: 100%;\n max-width: 32rem;\n margin: 0 auto;\n padding: 1.25rem 1.5rem;\n border-radius: 0.75rem;\n border: 1px solid var(--ds-border);\n background: var(--ds-bg);\n color: var(--ds-fg);\n font-size: clamp(0.875rem, 2.5cqi, 1.125rem);\n line-height: 1.7;\n transition: background 0.2s ease, color 0.2s ease;\n }\n .ds-card.ds-light {\n --ds-bg: #fdfcf7;\n --ds-fg: #1f2933;\n --ds-accent: #5b6b9e;\n --ds-muted: #6b7280;\n --ds-border: #e5e7eb;\n }\n .ds-card.ds-dark {\n --ds-bg: #1a1d24;\n --ds-fg: #e5e7eb;\n --ds-accent: #9aa9d4;\n --ds-muted: #9ca3af;\n --ds-border: #2d323d;\n }\n .ds-quote {\n margin: 0 0 0.875rem;\n font-size: 1.1em;\n font-weight: 500;\n letter-spacing: 0.01em;\n white-space: pre-wrap;\n }\n .ds-quote::before { content: '\\201C'; margin-right: 0.15em; color: var(--ds-accent); }\n .ds-quote::after { content: '\\201D'; margin-left: 0.15em; color: var(--ds-accent); }\n .ds-meta { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 0.875rem; font-size: 0.875em; color: var(--ds-muted); }\n .ds-author { font-weight: 500; color: var(--ds-fg); }\n .ds-source { font-size: 0.95em; }\n .ds-source a { color: var(--ds-accent); text-decoration: none; }\n .ds-source a:hover { text-decoration: underline; }\n .ds-flag { display: inline-block; margin-left: 0.25rem; padding: 0 0.4rem; font-size: 0.75em; border: 1px solid var(--ds-border); border-radius: 9999px; color: var(--ds-muted); }\n .ds-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.875rem; padding-top: 0.875rem; border-top: 1px solid var(--ds-border); }\n .ds-share { display: flex; gap: 0.35rem; }\n .ds-btn {\n appearance: none;\n background: transparent;\n color: var(--ds-fg);\n border: 1px solid var(--ds-border);\n border-radius: 0.5rem;\n padding: 0.3rem 0.7rem;\n font-size: 0.85em;\n font-family: inherit;\n cursor: pointer;\n transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;\n text-decoration: none;\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n }\n .ds-btn:hover { background: var(--ds-accent); color: var(--ds-bg); border-color: var(--ds-accent); }\n .ds-btn:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 2px; }\n .ds-btn.ds-toast { background: var(--ds-accent); color: var(--ds-bg); border-color: var(--ds-accent); }\n .ds-powered { font-size: 0.75em; color: var(--ds-muted); }\n .ds-powered a { color: var(--ds-muted); text-decoration: none; }\n .ds-powered a:hover { text-decoration: underline; }\n .ds-skeleton .ds-quote { background: var(--ds-border); border-radius: 0.25rem; color: transparent; }\n .ds-skeleton .ds-quote::before, .ds-skeleton .ds-quote::after { content: ''; }\n .ds-error { color: var(--ds-muted); font-size: 0.875em; }\n\n @container (max-width: 320px) {\n .ds-card { padding: 1rem 1.1rem; }\n .ds-share-label { display: none; }\n .ds-actions { flex-wrap: wrap; }\n }\n @container (min-width: 500px) {\n .ds-quote { font-size: 1.25em; }\n }\n @media (prefers-reduced-motion: reduce) {\n .ds-card, .ds-btn { transition: none; }\n }\n";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type Lang = 'zh' | 'en';
|
|
2
|
+
export type ThemeConfig = 'auto' | 'light' | 'dark';
|
|
3
|
+
export type ResolvedTheme = 'light' | 'dark';
|
|
4
|
+
export interface Quote {
|
|
5
|
+
text: string;
|
|
6
|
+
author: string;
|
|
7
|
+
source: string;
|
|
8
|
+
sourceUrl: string;
|
|
9
|
+
attribution: 'verified' | 'popular-attribution' | 'proverb';
|
|
10
|
+
dimension: string;
|
|
11
|
+
style: string;
|
|
12
|
+
}
|
|
13
|
+
export interface Schedule {
|
|
14
|
+
launchDate: string;
|
|
15
|
+
generatedAt: string;
|
|
16
|
+
lang: Lang;
|
|
17
|
+
entries: Record<string, string>;
|
|
18
|
+
quotes: Record<string, Quote>;
|
|
19
|
+
}
|
|
20
|
+
export interface MountOptions {
|
|
21
|
+
lang?: Lang;
|
|
22
|
+
theme?: ThemeConfig;
|
|
23
|
+
scheduleUrl?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface DailySoupProps {
|
|
26
|
+
lang?: Lang;
|
|
27
|
+
theme?: ThemeConfig;
|
|
28
|
+
scheduleUrl?: string;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "daily-soup-widget",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Embeddable daily quote widget — growth-themed, deterministic, copyright-safe. Drop a script tag or npm install.",
|
|
5
|
+
"keywords": ["widget", "embed", "daily-quote", "shadow-dom", "react", "umd"],
|
|
6
|
+
"homepage": "https://daily-soup-widget.vercel.app",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/mshmwr/daily-soup-widget.git"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "coco (mshmwr)",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "./dist/embed.cjs.js",
|
|
15
|
+
"module": "./dist/embed.esm.js",
|
|
16
|
+
"types": "./dist/types/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/types/index.d.ts",
|
|
20
|
+
"import": "./dist/embed.esm.js",
|
|
21
|
+
"require": "./dist/embed.cjs.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist/embed.*",
|
|
26
|
+
"dist/schedule-*.json",
|
|
27
|
+
"dist/types/**/*.d.ts",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build:schedule": "tsx scripts/build-schedule.ts",
|
|
33
|
+
"build:bundle": "tsx scripts/build-bundle.ts",
|
|
34
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
35
|
+
"build": "npm run build:schedule && npm run build:bundle && npm run build:types && next build",
|
|
36
|
+
"dev": "next dev",
|
|
37
|
+
"start": "next start",
|
|
38
|
+
"test": "vitest run",
|
|
39
|
+
"test:watch": "vitest",
|
|
40
|
+
"test:e2e": "playwright test",
|
|
41
|
+
"typecheck": "tsc --noEmit"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"react": ">=18",
|
|
45
|
+
"react-dom": ">=18"
|
|
46
|
+
},
|
|
47
|
+
"peerDependenciesMeta": {
|
|
48
|
+
"react": { "optional": true },
|
|
49
|
+
"react-dom": { "optional": true }
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@playwright/test": "^1.49.0",
|
|
53
|
+
"@testing-library/react": "^16.1.0",
|
|
54
|
+
"@types/node": "^22.10.0",
|
|
55
|
+
"@types/react": "^19.0.0",
|
|
56
|
+
"@types/react-dom": "^19.0.0",
|
|
57
|
+
"esbuild": "^0.24.0",
|
|
58
|
+
"gray-matter": "^4.0.3",
|
|
59
|
+
"happy-dom": "^15.11.0",
|
|
60
|
+
"next": "^15.1.0",
|
|
61
|
+
"react": "^19.0.0",
|
|
62
|
+
"react-dom": "^19.0.0",
|
|
63
|
+
"tsx": "^4.19.0",
|
|
64
|
+
"typescript": "^5.7.0",
|
|
65
|
+
"vitest": "^2.1.0"
|
|
66
|
+
}
|
|
67
|
+
}
|