@openclaw/line 2026.6.11 → 2026.7.1-beta.2
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/{accounts-B-K3yrdP.js → accounts-DJVOv1JI.js} +4 -2
- package/dist/api.js +2 -2
- package/dist/{card-command-ML0lh9al.js → card-command-DZVv78B6.js} +10 -23
- package/dist/{channel-DnBQa9Fv.js → channel-DIpdZiwc.js} +14 -13
- package/dist/channel-plugin-api.js +1 -1
- package/dist/channel.runtime-KvcDpasA.js +4 -0
- package/dist/contract-api.js +1 -1
- package/dist/flex-templates-DPBtqQ8R.js +1127 -0
- package/dist/index.js +7 -7
- package/dist/{markdown-to-line-juqp-iiY.js → markdown-to-line-CFx7ME4o.js} +21 -84
- package/dist/{monitor-CULIHcvR.js → monitor-DzkYuWhv.js} +10 -8
- package/dist/monitor.runtime-njiPADBe.js +2 -0
- package/dist/{outbound.runtime-Cx3rgMAH.js → outbound.runtime-BPz8U_hw.js} +1 -1
- package/dist/probe.runtime-CRhVGqwl.js +2 -0
- package/dist/{reply-payload-transform-DZ8-37Ot.js → reply-payload-transform-BwF-zq0G.js} +2 -401
- package/dist/runtime-api.js +19 -9
- package/dist/setup-api.js +1 -1
- package/dist/{setup-surface-CvTRDCEq.js → setup-surface-Bc36YSS3.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
- package/dist/basic-cards-B1eTkw-f.js +0 -307
- package/dist/channel.runtime-C-kKPoMb.js +0 -4
- package/dist/monitor.runtime-CGCy-kYV.js +0 -2
- package/dist/probe.runtime-DH_jgr7u.js +0 -2
- package/dist/schedule-cards-Bq74H30B.js +0 -359
- package/dist/{probe-CqTNoMdZ.js → probe-BslD77tJ.js} +1 -1
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import { i as attachFooterText } from "./schedule-cards-Bq74H30B.js";
|
|
2
|
-
//#region extensions/line/src/flex-templates/basic-cards.ts
|
|
3
|
-
/**
|
|
4
|
-
* Create an info card with title, body, and optional footer
|
|
5
|
-
*
|
|
6
|
-
* Editorial design: Clean hierarchy with accent bar, generous spacing,
|
|
7
|
-
* and subtle background zones for visual separation.
|
|
8
|
-
*/
|
|
9
|
-
function createInfoCard(title, body, footer) {
|
|
10
|
-
const bubble = {
|
|
11
|
-
type: "bubble",
|
|
12
|
-
size: "mega",
|
|
13
|
-
body: {
|
|
14
|
-
type: "box",
|
|
15
|
-
layout: "vertical",
|
|
16
|
-
contents: [{
|
|
17
|
-
type: "box",
|
|
18
|
-
layout: "horizontal",
|
|
19
|
-
contents: [{
|
|
20
|
-
type: "box",
|
|
21
|
-
layout: "vertical",
|
|
22
|
-
contents: [],
|
|
23
|
-
width: "4px",
|
|
24
|
-
backgroundColor: "#06C755",
|
|
25
|
-
cornerRadius: "2px"
|
|
26
|
-
}, {
|
|
27
|
-
type: "text",
|
|
28
|
-
text: title,
|
|
29
|
-
weight: "bold",
|
|
30
|
-
size: "xl",
|
|
31
|
-
color: "#111111",
|
|
32
|
-
wrap: true,
|
|
33
|
-
flex: 1,
|
|
34
|
-
margin: "lg"
|
|
35
|
-
}]
|
|
36
|
-
}, {
|
|
37
|
-
type: "box",
|
|
38
|
-
layout: "vertical",
|
|
39
|
-
contents: [{
|
|
40
|
-
type: "text",
|
|
41
|
-
text: body,
|
|
42
|
-
size: "md",
|
|
43
|
-
color: "#444444",
|
|
44
|
-
wrap: true,
|
|
45
|
-
lineSpacing: "6px"
|
|
46
|
-
}],
|
|
47
|
-
margin: "xl",
|
|
48
|
-
paddingAll: "lg",
|
|
49
|
-
backgroundColor: "#F8F9FA",
|
|
50
|
-
cornerRadius: "lg"
|
|
51
|
-
}],
|
|
52
|
-
paddingAll: "xl",
|
|
53
|
-
backgroundColor: "#FFFFFF"
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
if (footer) attachFooterText(bubble, footer);
|
|
57
|
-
return bubble;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Create a list card with title and multiple items
|
|
61
|
-
*
|
|
62
|
-
* Editorial design: Numbered/bulleted list with clear visual hierarchy,
|
|
63
|
-
* accent dots for each item, and generous spacing.
|
|
64
|
-
*/
|
|
65
|
-
function createListCard(title, items) {
|
|
66
|
-
const itemContents = items.slice(0, 8).map((item, index) => {
|
|
67
|
-
const itemContentsLocal = [{
|
|
68
|
-
type: "text",
|
|
69
|
-
text: item.title,
|
|
70
|
-
size: "md",
|
|
71
|
-
weight: "bold",
|
|
72
|
-
color: "#1a1a1a",
|
|
73
|
-
wrap: true
|
|
74
|
-
}];
|
|
75
|
-
if (item.subtitle) itemContentsLocal.push({
|
|
76
|
-
type: "text",
|
|
77
|
-
text: item.subtitle,
|
|
78
|
-
size: "sm",
|
|
79
|
-
color: "#888888",
|
|
80
|
-
wrap: true,
|
|
81
|
-
margin: "xs"
|
|
82
|
-
});
|
|
83
|
-
const itemBox = {
|
|
84
|
-
type: "box",
|
|
85
|
-
layout: "horizontal",
|
|
86
|
-
contents: [{
|
|
87
|
-
type: "box",
|
|
88
|
-
layout: "vertical",
|
|
89
|
-
contents: [{
|
|
90
|
-
type: "box",
|
|
91
|
-
layout: "vertical",
|
|
92
|
-
contents: [],
|
|
93
|
-
width: "8px",
|
|
94
|
-
height: "8px",
|
|
95
|
-
backgroundColor: index === 0 ? "#06C755" : "#DDDDDD",
|
|
96
|
-
cornerRadius: "4px"
|
|
97
|
-
}],
|
|
98
|
-
width: "20px",
|
|
99
|
-
alignItems: "center",
|
|
100
|
-
paddingTop: "sm"
|
|
101
|
-
}, {
|
|
102
|
-
type: "box",
|
|
103
|
-
layout: "vertical",
|
|
104
|
-
contents: itemContentsLocal,
|
|
105
|
-
flex: 1
|
|
106
|
-
}],
|
|
107
|
-
margin: index > 0 ? "lg" : void 0
|
|
108
|
-
};
|
|
109
|
-
if (item.action) itemBox.action = item.action;
|
|
110
|
-
return itemBox;
|
|
111
|
-
});
|
|
112
|
-
return {
|
|
113
|
-
type: "bubble",
|
|
114
|
-
size: "mega",
|
|
115
|
-
body: {
|
|
116
|
-
type: "box",
|
|
117
|
-
layout: "vertical",
|
|
118
|
-
contents: [
|
|
119
|
-
{
|
|
120
|
-
type: "text",
|
|
121
|
-
text: title,
|
|
122
|
-
weight: "bold",
|
|
123
|
-
size: "xl",
|
|
124
|
-
color: "#111111",
|
|
125
|
-
wrap: true
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
type: "separator",
|
|
129
|
-
margin: "lg",
|
|
130
|
-
color: "#EEEEEE"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
type: "box",
|
|
134
|
-
layout: "vertical",
|
|
135
|
-
contents: itemContents,
|
|
136
|
-
margin: "lg"
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
paddingAll: "xl",
|
|
140
|
-
backgroundColor: "#FFFFFF"
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Create an image card with image, title, and optional body text
|
|
146
|
-
*/
|
|
147
|
-
function createImageCard(imageUrl, title, body, options) {
|
|
148
|
-
const bubble = {
|
|
149
|
-
type: "bubble",
|
|
150
|
-
hero: {
|
|
151
|
-
type: "image",
|
|
152
|
-
url: imageUrl,
|
|
153
|
-
size: "full",
|
|
154
|
-
aspectRatio: options?.aspectRatio ?? "20:13",
|
|
155
|
-
aspectMode: options?.aspectMode ?? "cover",
|
|
156
|
-
action: options?.action
|
|
157
|
-
},
|
|
158
|
-
body: {
|
|
159
|
-
type: "box",
|
|
160
|
-
layout: "vertical",
|
|
161
|
-
contents: [{
|
|
162
|
-
type: "text",
|
|
163
|
-
text: title,
|
|
164
|
-
weight: "bold",
|
|
165
|
-
size: "xl",
|
|
166
|
-
wrap: true
|
|
167
|
-
}],
|
|
168
|
-
paddingAll: "lg"
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
if (body && bubble.body) bubble.body.contents.push({
|
|
172
|
-
type: "text",
|
|
173
|
-
text: body,
|
|
174
|
-
size: "md",
|
|
175
|
-
wrap: true,
|
|
176
|
-
margin: "md",
|
|
177
|
-
color: "#666666"
|
|
178
|
-
});
|
|
179
|
-
return bubble;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Create an action card with title, body, and action buttons
|
|
183
|
-
*/
|
|
184
|
-
function createActionCard(title, body, actions, options) {
|
|
185
|
-
const bubble = {
|
|
186
|
-
type: "bubble",
|
|
187
|
-
body: {
|
|
188
|
-
type: "box",
|
|
189
|
-
layout: "vertical",
|
|
190
|
-
contents: [{
|
|
191
|
-
type: "text",
|
|
192
|
-
text: title,
|
|
193
|
-
weight: "bold",
|
|
194
|
-
size: "xl",
|
|
195
|
-
wrap: true
|
|
196
|
-
}, {
|
|
197
|
-
type: "text",
|
|
198
|
-
text: body,
|
|
199
|
-
size: "md",
|
|
200
|
-
wrap: true,
|
|
201
|
-
margin: "md",
|
|
202
|
-
color: "#666666"
|
|
203
|
-
}],
|
|
204
|
-
paddingAll: "lg"
|
|
205
|
-
},
|
|
206
|
-
footer: {
|
|
207
|
-
type: "box",
|
|
208
|
-
layout: "vertical",
|
|
209
|
-
contents: actions.slice(0, 4).map((action, index) => ({
|
|
210
|
-
type: "button",
|
|
211
|
-
action: action.action,
|
|
212
|
-
style: index === 0 ? "primary" : "secondary",
|
|
213
|
-
margin: index > 0 ? "sm" : void 0
|
|
214
|
-
})),
|
|
215
|
-
paddingAll: "md"
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
if (options?.imageUrl) bubble.hero = {
|
|
219
|
-
type: "image",
|
|
220
|
-
url: options.imageUrl,
|
|
221
|
-
size: "full",
|
|
222
|
-
aspectRatio: options.aspectRatio ?? "20:13",
|
|
223
|
-
aspectMode: "cover"
|
|
224
|
-
};
|
|
225
|
-
return bubble;
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Create a carousel container from multiple bubbles
|
|
229
|
-
* LINE allows max 12 bubbles in a carousel
|
|
230
|
-
*/
|
|
231
|
-
function createCarousel(bubbles) {
|
|
232
|
-
return {
|
|
233
|
-
type: "carousel",
|
|
234
|
-
contents: bubbles.slice(0, 12)
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Create a notification bubble (for alerts, status updates)
|
|
239
|
-
*
|
|
240
|
-
* Editorial design: Bold status indicator with accent color,
|
|
241
|
-
* clear typography, optional icon for context.
|
|
242
|
-
*/
|
|
243
|
-
function createNotificationBubble(text, options) {
|
|
244
|
-
const typeColors = {
|
|
245
|
-
info: {
|
|
246
|
-
accent: "#3B82F6",
|
|
247
|
-
bg: "#EFF6FF"
|
|
248
|
-
},
|
|
249
|
-
success: {
|
|
250
|
-
accent: "#06C755",
|
|
251
|
-
bg: "#F0FDF4"
|
|
252
|
-
},
|
|
253
|
-
warning: {
|
|
254
|
-
accent: "#F59E0B",
|
|
255
|
-
bg: "#FFFBEB"
|
|
256
|
-
},
|
|
257
|
-
error: {
|
|
258
|
-
accent: "#EF4444",
|
|
259
|
-
bg: "#FEF2F2"
|
|
260
|
-
}
|
|
261
|
-
}[options?.type ?? "info"];
|
|
262
|
-
const contents = [];
|
|
263
|
-
contents.push({
|
|
264
|
-
type: "box",
|
|
265
|
-
layout: "vertical",
|
|
266
|
-
contents: [],
|
|
267
|
-
width: "4px",
|
|
268
|
-
backgroundColor: typeColors.accent,
|
|
269
|
-
cornerRadius: "2px"
|
|
270
|
-
});
|
|
271
|
-
const textContents = [];
|
|
272
|
-
if (options?.title) textContents.push({
|
|
273
|
-
type: "text",
|
|
274
|
-
text: options.title,
|
|
275
|
-
size: "md",
|
|
276
|
-
weight: "bold",
|
|
277
|
-
color: "#111111",
|
|
278
|
-
wrap: true
|
|
279
|
-
});
|
|
280
|
-
textContents.push({
|
|
281
|
-
type: "text",
|
|
282
|
-
text,
|
|
283
|
-
size: options?.title ? "sm" : "md",
|
|
284
|
-
color: options?.title ? "#666666" : "#333333",
|
|
285
|
-
wrap: true,
|
|
286
|
-
margin: options?.title ? "sm" : void 0
|
|
287
|
-
});
|
|
288
|
-
contents.push({
|
|
289
|
-
type: "box",
|
|
290
|
-
layout: "vertical",
|
|
291
|
-
contents: textContents,
|
|
292
|
-
flex: 1,
|
|
293
|
-
paddingStart: "lg"
|
|
294
|
-
});
|
|
295
|
-
return {
|
|
296
|
-
type: "bubble",
|
|
297
|
-
body: {
|
|
298
|
-
type: "box",
|
|
299
|
-
layout: "horizontal",
|
|
300
|
-
contents,
|
|
301
|
-
paddingAll: "xl",
|
|
302
|
-
backgroundColor: typeColors.bg
|
|
303
|
-
}
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
//#endregion
|
|
307
|
-
export { createListCard as a, createInfoCard as i, createCarousel as n, createNotificationBubble as o, createImageCard as r, createActionCard as t };
|
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
//#region extensions/line/src/flex-templates/common.ts
|
|
2
|
-
function attachFooterText(bubble, footer) {
|
|
3
|
-
bubble.footer = {
|
|
4
|
-
type: "box",
|
|
5
|
-
layout: "vertical",
|
|
6
|
-
contents: [{
|
|
7
|
-
type: "text",
|
|
8
|
-
text: footer,
|
|
9
|
-
size: "xs",
|
|
10
|
-
color: "#AAAAAA",
|
|
11
|
-
wrap: true,
|
|
12
|
-
align: "center"
|
|
13
|
-
}],
|
|
14
|
-
paddingAll: "lg",
|
|
15
|
-
backgroundColor: "#FAFAFA"
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region extensions/line/src/flex-templates/schedule-cards.ts
|
|
20
|
-
function buildTitleSubtitleHeader(params) {
|
|
21
|
-
const { title, subtitle } = params;
|
|
22
|
-
const headerContents = [{
|
|
23
|
-
type: "text",
|
|
24
|
-
text: title,
|
|
25
|
-
weight: "bold",
|
|
26
|
-
size: "xl",
|
|
27
|
-
color: "#111111",
|
|
28
|
-
wrap: true
|
|
29
|
-
}];
|
|
30
|
-
if (subtitle) headerContents.push({
|
|
31
|
-
type: "text",
|
|
32
|
-
text: subtitle,
|
|
33
|
-
size: "sm",
|
|
34
|
-
color: "#888888",
|
|
35
|
-
margin: "sm",
|
|
36
|
-
wrap: true
|
|
37
|
-
});
|
|
38
|
-
return headerContents;
|
|
39
|
-
}
|
|
40
|
-
function buildCardHeaderSections(headerContents) {
|
|
41
|
-
return [{
|
|
42
|
-
type: "box",
|
|
43
|
-
layout: "vertical",
|
|
44
|
-
contents: headerContents,
|
|
45
|
-
paddingBottom: "lg"
|
|
46
|
-
}, {
|
|
47
|
-
type: "separator",
|
|
48
|
-
color: "#EEEEEE"
|
|
49
|
-
}];
|
|
50
|
-
}
|
|
51
|
-
function createMegaBubbleWithFooter(params) {
|
|
52
|
-
const bubble = {
|
|
53
|
-
type: "bubble",
|
|
54
|
-
size: "mega",
|
|
55
|
-
body: {
|
|
56
|
-
type: "box",
|
|
57
|
-
layout: "vertical",
|
|
58
|
-
contents: params.bodyContents,
|
|
59
|
-
paddingAll: "xl",
|
|
60
|
-
backgroundColor: "#FFFFFF"
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
if (params.footer) attachFooterText(bubble, params.footer);
|
|
64
|
-
return bubble;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Create a receipt/summary card (for orders, transactions, data tables)
|
|
68
|
-
*
|
|
69
|
-
* Editorial design: Clean table layout with alternating row backgrounds,
|
|
70
|
-
* prominent total section, and clear visual hierarchy.
|
|
71
|
-
*/
|
|
72
|
-
function createReceiptCard(params) {
|
|
73
|
-
const { title, subtitle, items, total, footer } = params;
|
|
74
|
-
const itemRows = items.slice(0, 12).map((item, index) => ({
|
|
75
|
-
type: "box",
|
|
76
|
-
layout: "horizontal",
|
|
77
|
-
contents: [{
|
|
78
|
-
type: "text",
|
|
79
|
-
text: item.name,
|
|
80
|
-
size: "sm",
|
|
81
|
-
color: item.highlight ? "#111111" : "#666666",
|
|
82
|
-
weight: item.highlight ? "bold" : "regular",
|
|
83
|
-
flex: 3,
|
|
84
|
-
wrap: true
|
|
85
|
-
}, {
|
|
86
|
-
type: "text",
|
|
87
|
-
text: item.value,
|
|
88
|
-
size: "sm",
|
|
89
|
-
color: item.highlight ? "#06C755" : "#333333",
|
|
90
|
-
weight: item.highlight ? "bold" : "regular",
|
|
91
|
-
flex: 2,
|
|
92
|
-
align: "end",
|
|
93
|
-
wrap: true
|
|
94
|
-
}],
|
|
95
|
-
paddingAll: "md",
|
|
96
|
-
backgroundColor: index % 2 === 0 ? "#FFFFFF" : "#FAFAFA"
|
|
97
|
-
}));
|
|
98
|
-
const bodyContents = [...buildCardHeaderSections(buildTitleSubtitleHeader({
|
|
99
|
-
title,
|
|
100
|
-
subtitle
|
|
101
|
-
})), {
|
|
102
|
-
type: "box",
|
|
103
|
-
layout: "vertical",
|
|
104
|
-
contents: itemRows,
|
|
105
|
-
margin: "md",
|
|
106
|
-
cornerRadius: "md",
|
|
107
|
-
borderWidth: "light",
|
|
108
|
-
borderColor: "#EEEEEE"
|
|
109
|
-
}];
|
|
110
|
-
if (total) bodyContents.push({
|
|
111
|
-
type: "box",
|
|
112
|
-
layout: "horizontal",
|
|
113
|
-
contents: [{
|
|
114
|
-
type: "text",
|
|
115
|
-
text: total.label,
|
|
116
|
-
size: "lg",
|
|
117
|
-
weight: "bold",
|
|
118
|
-
color: "#111111",
|
|
119
|
-
flex: 2
|
|
120
|
-
}, {
|
|
121
|
-
type: "text",
|
|
122
|
-
text: total.value,
|
|
123
|
-
size: "xl",
|
|
124
|
-
weight: "bold",
|
|
125
|
-
color: "#06C755",
|
|
126
|
-
flex: 2,
|
|
127
|
-
align: "end"
|
|
128
|
-
}],
|
|
129
|
-
margin: "xl",
|
|
130
|
-
paddingAll: "lg",
|
|
131
|
-
backgroundColor: "#F0FDF4",
|
|
132
|
-
cornerRadius: "lg"
|
|
133
|
-
});
|
|
134
|
-
return createMegaBubbleWithFooter({
|
|
135
|
-
bodyContents,
|
|
136
|
-
footer
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Create a calendar event card (for meetings, appointments, reminders)
|
|
141
|
-
*
|
|
142
|
-
* Editorial design: Date as hero, strong typographic hierarchy,
|
|
143
|
-
* color-blocked zones, full text wrapping for readability.
|
|
144
|
-
*/
|
|
145
|
-
function createEventCard(params) {
|
|
146
|
-
const { title, date, time, location, description, calendar, isAllDay, action } = params;
|
|
147
|
-
const dateBlock = {
|
|
148
|
-
type: "box",
|
|
149
|
-
layout: "vertical",
|
|
150
|
-
contents: [{
|
|
151
|
-
type: "text",
|
|
152
|
-
text: date.toUpperCase(),
|
|
153
|
-
size: "sm",
|
|
154
|
-
weight: "bold",
|
|
155
|
-
color: "#06C755",
|
|
156
|
-
wrap: true
|
|
157
|
-
}, {
|
|
158
|
-
type: "text",
|
|
159
|
-
text: isAllDay ? "ALL DAY" : time ?? "",
|
|
160
|
-
size: "xxl",
|
|
161
|
-
weight: "bold",
|
|
162
|
-
color: "#111111",
|
|
163
|
-
wrap: true,
|
|
164
|
-
margin: "xs"
|
|
165
|
-
}],
|
|
166
|
-
paddingBottom: "lg",
|
|
167
|
-
borderWidth: "none"
|
|
168
|
-
};
|
|
169
|
-
if (!time && !isAllDay) dateBlock.contents = [{
|
|
170
|
-
type: "text",
|
|
171
|
-
text: date,
|
|
172
|
-
size: "xl",
|
|
173
|
-
weight: "bold",
|
|
174
|
-
color: "#111111",
|
|
175
|
-
wrap: true
|
|
176
|
-
}];
|
|
177
|
-
const bodyContents = [dateBlock, {
|
|
178
|
-
type: "box",
|
|
179
|
-
layout: "horizontal",
|
|
180
|
-
contents: [{
|
|
181
|
-
type: "box",
|
|
182
|
-
layout: "vertical",
|
|
183
|
-
contents: [],
|
|
184
|
-
width: "4px",
|
|
185
|
-
backgroundColor: "#06C755",
|
|
186
|
-
cornerRadius: "2px"
|
|
187
|
-
}, {
|
|
188
|
-
type: "box",
|
|
189
|
-
layout: "vertical",
|
|
190
|
-
contents: [{
|
|
191
|
-
type: "text",
|
|
192
|
-
text: title,
|
|
193
|
-
size: "lg",
|
|
194
|
-
weight: "bold",
|
|
195
|
-
color: "#1a1a1a",
|
|
196
|
-
wrap: true
|
|
197
|
-
}, ...calendar ? [{
|
|
198
|
-
type: "text",
|
|
199
|
-
text: calendar,
|
|
200
|
-
size: "xs",
|
|
201
|
-
color: "#888888",
|
|
202
|
-
margin: "sm",
|
|
203
|
-
wrap: true
|
|
204
|
-
}] : []],
|
|
205
|
-
flex: 1,
|
|
206
|
-
paddingStart: "lg"
|
|
207
|
-
}],
|
|
208
|
-
paddingTop: "lg",
|
|
209
|
-
paddingBottom: "lg",
|
|
210
|
-
borderWidth: "light",
|
|
211
|
-
borderColor: "#EEEEEE"
|
|
212
|
-
}];
|
|
213
|
-
if (location || description) {
|
|
214
|
-
const detailItems = [];
|
|
215
|
-
if (location) detailItems.push({
|
|
216
|
-
type: "box",
|
|
217
|
-
layout: "horizontal",
|
|
218
|
-
contents: [{
|
|
219
|
-
type: "text",
|
|
220
|
-
text: "📍",
|
|
221
|
-
size: "sm",
|
|
222
|
-
flex: 0
|
|
223
|
-
}, {
|
|
224
|
-
type: "text",
|
|
225
|
-
text: location,
|
|
226
|
-
size: "sm",
|
|
227
|
-
color: "#444444",
|
|
228
|
-
margin: "md",
|
|
229
|
-
flex: 1,
|
|
230
|
-
wrap: true
|
|
231
|
-
}],
|
|
232
|
-
alignItems: "flex-start"
|
|
233
|
-
});
|
|
234
|
-
if (description) detailItems.push({
|
|
235
|
-
type: "text",
|
|
236
|
-
text: description,
|
|
237
|
-
size: "sm",
|
|
238
|
-
color: "#666666",
|
|
239
|
-
wrap: true,
|
|
240
|
-
margin: location ? "lg" : "none"
|
|
241
|
-
});
|
|
242
|
-
bodyContents.push({
|
|
243
|
-
type: "box",
|
|
244
|
-
layout: "vertical",
|
|
245
|
-
contents: detailItems,
|
|
246
|
-
margin: "lg",
|
|
247
|
-
paddingAll: "lg",
|
|
248
|
-
backgroundColor: "#F8F9FA",
|
|
249
|
-
cornerRadius: "lg"
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
return {
|
|
253
|
-
type: "bubble",
|
|
254
|
-
size: "mega",
|
|
255
|
-
body: {
|
|
256
|
-
type: "box",
|
|
257
|
-
layout: "vertical",
|
|
258
|
-
contents: bodyContents,
|
|
259
|
-
paddingAll: "xl",
|
|
260
|
-
backgroundColor: "#FFFFFF",
|
|
261
|
-
action
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Create a calendar agenda card showing multiple events
|
|
267
|
-
*
|
|
268
|
-
* Editorial timeline design: Time-focused left column with event details
|
|
269
|
-
* on the right. Visual accent bars indicate event priority/recency.
|
|
270
|
-
*/
|
|
271
|
-
function createAgendaCard(params) {
|
|
272
|
-
const { title, subtitle, events, footer } = params;
|
|
273
|
-
const headerContents = buildTitleSubtitleHeader({
|
|
274
|
-
title,
|
|
275
|
-
subtitle
|
|
276
|
-
});
|
|
277
|
-
const eventItems = events.slice(0, 6).map((event, index) => {
|
|
278
|
-
const isActive = event.isNow || index === 0;
|
|
279
|
-
const accentColor = isActive ? "#06C755" : "#E5E5E5";
|
|
280
|
-
const timeColumn = {
|
|
281
|
-
type: "box",
|
|
282
|
-
layout: "vertical",
|
|
283
|
-
contents: [{
|
|
284
|
-
type: "text",
|
|
285
|
-
text: event.time ?? "—",
|
|
286
|
-
size: "sm",
|
|
287
|
-
weight: isActive ? "bold" : "regular",
|
|
288
|
-
color: isActive ? "#06C755" : "#666666",
|
|
289
|
-
align: "end",
|
|
290
|
-
wrap: true
|
|
291
|
-
}],
|
|
292
|
-
width: "65px",
|
|
293
|
-
justifyContent: "flex-start"
|
|
294
|
-
};
|
|
295
|
-
const dotColumn = {
|
|
296
|
-
type: "box",
|
|
297
|
-
layout: "vertical",
|
|
298
|
-
contents: [{
|
|
299
|
-
type: "box",
|
|
300
|
-
layout: "vertical",
|
|
301
|
-
contents: [],
|
|
302
|
-
width: "10px",
|
|
303
|
-
height: "10px",
|
|
304
|
-
backgroundColor: accentColor,
|
|
305
|
-
cornerRadius: "5px"
|
|
306
|
-
}],
|
|
307
|
-
width: "24px",
|
|
308
|
-
alignItems: "center",
|
|
309
|
-
justifyContent: "flex-start",
|
|
310
|
-
paddingTop: "xs"
|
|
311
|
-
};
|
|
312
|
-
const detailContents = [{
|
|
313
|
-
type: "text",
|
|
314
|
-
text: event.title,
|
|
315
|
-
size: "md",
|
|
316
|
-
weight: "bold",
|
|
317
|
-
color: "#1a1a1a",
|
|
318
|
-
wrap: true
|
|
319
|
-
}];
|
|
320
|
-
const secondaryParts = [];
|
|
321
|
-
if (event.location) secondaryParts.push(event.location);
|
|
322
|
-
if (event.calendar) secondaryParts.push(event.calendar);
|
|
323
|
-
if (secondaryParts.length > 0) detailContents.push({
|
|
324
|
-
type: "text",
|
|
325
|
-
text: secondaryParts.join(" · "),
|
|
326
|
-
size: "xs",
|
|
327
|
-
color: "#888888",
|
|
328
|
-
wrap: true,
|
|
329
|
-
margin: "xs"
|
|
330
|
-
});
|
|
331
|
-
return {
|
|
332
|
-
type: "box",
|
|
333
|
-
layout: "horizontal",
|
|
334
|
-
contents: [
|
|
335
|
-
timeColumn,
|
|
336
|
-
dotColumn,
|
|
337
|
-
{
|
|
338
|
-
type: "box",
|
|
339
|
-
layout: "vertical",
|
|
340
|
-
contents: detailContents,
|
|
341
|
-
flex: 1
|
|
342
|
-
}
|
|
343
|
-
],
|
|
344
|
-
margin: index > 0 ? "xl" : void 0,
|
|
345
|
-
alignItems: "flex-start"
|
|
346
|
-
};
|
|
347
|
-
});
|
|
348
|
-
return createMegaBubbleWithFooter({
|
|
349
|
-
bodyContents: [...buildCardHeaderSections(headerContents), {
|
|
350
|
-
type: "box",
|
|
351
|
-
layout: "vertical",
|
|
352
|
-
contents: eventItems,
|
|
353
|
-
paddingTop: "xl"
|
|
354
|
-
}],
|
|
355
|
-
footer
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
//#endregion
|
|
359
|
-
export { attachFooterText as i, createEventCard as n, createReceiptCard as r, createAgendaCard as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
1
2
|
import { messagingApi } from "@line/bot-sdk";
|
|
2
3
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
3
|
-
import { withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
4
4
|
//#region extensions/line/src/probe.ts
|
|
5
5
|
async function probeLineBot(channelAccessToken, timeoutMs = 5e3) {
|
|
6
6
|
if (!channelAccessToken?.trim()) return {
|