@celljs/ta-creator 4.33.0 → 4.34.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/README.en.md +2 -1
- package/README.md +3 -2
- package/host/index.mjs +67 -20
- package/package.json +3 -3
- package/skills/creator-make/SKILL.md +9 -4
- package/skills/creator-publish/platforms.md +18 -0
- package/web/index.js +234 -35
package/README.en.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
The content creation package of Ta (built in and off by default, `pi.offByDefault`: turned on from Industries in the market or in Settings → Extensions): a channel without showing your face. Design and research: [docs/design/ta-creator.md](../../docs/design/ta-creator.md).
|
|
4
4
|
|
|
5
5
|
- **The Creator page**: a row of the double's list opens it. On top, the way a piece goes: topics → making → to review → published → numbers, each station with its count and what goes on there ("voice · Post-training", "2 wait for you"); the one picked shows below, the series to filter by under the stations. The first time you say what the channel is about and where you publish (Bilibili, Xiaohongshu, Channels, Douyin, Kuaishou, YouTube and Official Accounts to start from; change or add any), and may start a 30-day goal.
|
|
6
|
+
- **Style of language**: pick the channel's in the settings (humorous, serious, rigorous, warm, lively, plain-spoken, storytelling, sharp, or your own words, 3 at most), and one for a series if it differs; scripts, titles and answers to comments follow it, and Ta picks for the platform and the topic when none is set.
|
|
6
7
|
- **Series**: several at once (AI news explained, three-minute lessons, Agent Harness from easy to deep), each with what it is about and how many a week; a course numbers its pieces, its next topic the next lesson. Topics, pieces in the making and to review are grouped by series.
|
|
7
8
|
- **Publishing in turn**: pieces passed are published one at a time (there is one browser, and two at once get in each other's way), a hot piece before its time is up first. When its turn comes the server works out its day on each platform (one piece a day on a platform; the next free day, by the platform's scheduled publishing, when one went out today) and tells the piece's conversation to publish it. Its card says how many go before it, or that it publishes now with the day of each platform; one that could not go out (not signed in, a warning of the platform) says why and can be published again, and the queue goes on. A conversation whose turn ended without publishing it or saying why is given up after 10 minutes idle.
|
|
8
9
|
- **Removed and put back**: topics, pieces in the making and to review can be removed (the last two asked first) and put back from Removed under their station; nothing published is removed.
|
|
@@ -16,4 +17,4 @@ The content creation package of Ta (built in and off by default, `pi.offByDefaul
|
|
|
16
17
|
|
|
17
18
|
## Data
|
|
18
19
|
|
|
19
|
-
The data of the package (`pi.storage`, written by its server alone): `settings` (niche, series, platforms, sources, goal, weekly minutes cap, voice), `items` (each piece from topic to published, with its series, number and numbers on each platform; at most 200 topics never made are kept), `weeks` (each platform's numbers and your minutes, 26 weeks kept), `insights` (what reviews concluded, the latest 30), `tasks` (the scheduled tasks made and the version of their prompts; one removed is not made again). Ta and the tasks change them with `ta call @celljs/ta-creator <method>`.
|
|
20
|
+
The data of the package (`pi.storage`, written by its server alone): `settings` (niche, style of language, series, platforms, sources, goal, weekly minutes cap, voice), `items` (each piece from topic to published, with its series, number and numbers on each platform; at most 200 topics never made are kept), `weeks` (each platform's numbers and your minutes, 26 weeks kept), `insights` (what reviews concluded, the latest 30), `tasks` (the scheduled tasks made and the version of their prompts; one removed is not made again). Ta and the tasks change them with `ta call @celljs/ta-creator <method>`.
|
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Ta 的内容创作行业包(随 Ta 内置、默认关闭:`pi.offByDefault`;在扩展市场的「行业」或 设置 → 扩展 里开启):不出镜也能做内容号。设计与调研见 [docs/design/ta-creator.md](../../docs/design/ta-creator.md)。
|
|
4
4
|
|
|
5
5
|
- **创作者页**:分身列表里的「创作者」一行打开。顶部一条流程:选题 → 制作中 → 待审 → 已发布 → 数据,每站显示条数和正在发生的事(如「配音 · 后训练」「2 条等你审」),点哪站看哪站;下面按系列筛选。首次打开先写内容号做什么、选发在哪些平台(内置 B站、小红书、视频号、抖音、快手、YouTube、公众号,可改可加),可开启 30 天目标。
|
|
6
|
+
- **语言风格**:设置里选频道的风格(幽默、严肃、逻辑缜密、亲切、活泼、通俗易懂、讲故事、犀利,或自己写一句,最多 3 个),系列可单独设;脚本、标题文案、评论回复都照着写,没选时 Ta 按平台和选题定。
|
|
6
7
|
- **系列**:同时做几个系列(如 AI 热点解读、AI 三分钟科普、Agent Harness 由浅入深),每个有定位、每周几条;「由浅入深按期」的系列给选题编期数,下一批选题接着上一课往深走。选题、制作、待审都按系列分组显示。
|
|
7
8
|
- **删除与找回**:选题、制作中、待审的内容可以删除(制作中和待审会先确认),删掉的在该栏底部「已删除」里能恢复;已发布的不能删。
|
|
8
9
|
- **制作流程**:每条在做的内容是一行六站(脚本、画面、配音、字幕、各平台版本、检查),做完的打勾、正在做的一站在呼吸,下面一句说 Ta 现在在做什么。
|
|
@@ -15,11 +16,11 @@ Ta 的内容创作行业包(随 Ta 内置、默认关闭:`pi.offByDefault`
|
|
|
15
16
|
- **发布**(creator-publish):通过后 Ta 在你的浏览器里打开各平台创作者中心,上传文件、填标题文案话题、勾选 AI 生成声明,直接点发布,再记下链接;你审过就行,不用再点。不替你登录、不回评论、不刷量。
|
|
16
17
|
- **发布排队**:一次审过很多条时,服务端排成一队、一次只发一条(浏览器只有一个,两条同时操作会互相干扰),快过时效的热点排在前面;轮到哪条,服务端算好它在各平台的日子(同一平台每天一条,当天已发过就排到下一个空的日子,用平台的定时发布),告诉做这条内容的对话去发。审稿卡上显示「前面还有 N 条」「正在发布 · 各平台日子」;发不出去(没登录、平台提示风险)时写明原因、可「再发一次」,队伍接着往下走。对话轮次结束 10 分钟仍没发完也没说明原因,就记为没发出去,不让队伍一直等。
|
|
17
18
|
- **发布范围**:公开 / 公司内 / 内外都发。默认公开;用到公司的东西就改成公司内,只发设置里加的公司内平台(如内部知识库);审稿卡左上角点一下切换。
|
|
18
|
-
-
|
|
19
|
+
- **互动**(评论跟进,发布后自动读:只读已上线的(定时发布的到点才读),新评论多就读得勤、没有就放慢,最快 2 小时、最慢 2 天,新发布的从最近几条摸出的节奏开始,快到时间的顺路一起读;也可在「互动」固定成每 2/6 小时或每天,读 7/14/30 天):提问和夸奖默认自动回,建议和纠错先给你看,负面和广告不回;你照发、改了再发、撤回,Ta 都跟着学,也可以按类固定。观众的提问和建议进选题。
|
|
19
20
|
- **策略**:你写的规则一直有效;复盘结论在「自动进化」下直接生效、在「我来定」下要你采纳;「改一句」会记住,以后的内容先照着做。
|
|
20
21
|
- **阶段回顾**:每 2/4/8 周回顾一次这一阶段(可关),并做成一期讲这个号自己经历的选题。
|
|
21
22
|
- **每周一复盘**:读各平台每条内容的数据(`stats`),按系列、类型、形式对比(`brief analysis`),把结论记下(`insights`)供选题使用;再发一张卡:各平台对比上周、系列横向对比、本周花了你多少时间(超过上限就少给选题)、目标进度、每个系列本周一个选题。包更新了任务提示词时,已建的两个定时任务只更新提示词,名称和时间保留你改过的。
|
|
22
23
|
|
|
23
24
|
## 数据
|
|
24
25
|
|
|
25
|
-
包数据(`pi.storage`,只由服务端写):`settings
|
|
26
|
+
包数据(`pi.storage`,只由服务端写):`settings`(领域、语言风格、系列、平台、信息源、目标、每周时间上限、配音)、`items`(选题到已发布的每条内容,含所属系列与期数、各平台数据;最多保留 200 条未做的选题)、`weeks`(每周各平台数据与你花的时间,保留 26 周)、`insights`(策略:你的规则 + 复盘结论,结论保留最近 30 条)、`comments`(评论与回复,只存内容,保留 60 天)、`lessons`(审稿时的修改意见)、`phases`(阶段回顾)、`tasks`(建过的定时任务及其提示词版本,删掉的不再重建)。Ta 与定时任务用 `ta call @celljs/ta-creator <方法>` 改它们。
|
package/host/index.mjs
CHANGED
|
@@ -23,6 +23,16 @@ var FORM_FALLBACKS = {
|
|
|
23
23
|
var KINDS = ["hot", "howto", "explain", "original"];
|
|
24
24
|
var STEPS = ["script", "visuals", "voice", "captions", "versions", "checks"];
|
|
25
25
|
var REACHES = ["public", "internal", "both"];
|
|
26
|
+
var TONES = {
|
|
27
|
+
humorous: "humorous: light and witty, a joke or a playful image where it helps, never at anyone's expense",
|
|
28
|
+
serious: "serious: plain and earnest, no jokes, no exaggeration, facts first",
|
|
29
|
+
rigorous: "rigorous: step by step, each claim with its reason or source, terms defined, no leaps",
|
|
30
|
+
warm: 'warm: like a friend explaining, "you" and "we", patient and encouraging',
|
|
31
|
+
lively: "lively: high energy, short punchy sentences, a strong hook and rhythm",
|
|
32
|
+
plain: "plain: everyday words, everyday examples, no jargon left unexplained",
|
|
33
|
+
story: "storytelling: a scene, a person or a moment first, the point drawn from it",
|
|
34
|
+
sharp: "sharp: a clear opinion, straight to the point, the counter-intuitive first, never rude"
|
|
35
|
+
};
|
|
26
36
|
var SERIES_COLORS = ["#22c55e", "#f97316", "#3b82f6", "#a855f7", "#ec4899", "#14b8a6", "#eab308", "#64748b"];
|
|
27
37
|
var ASPECTS = ["16:9", "9:16", "3:4", "1:1"];
|
|
28
38
|
var PLATFORMS = [
|
|
@@ -187,6 +197,11 @@ var PublishUtil;
|
|
|
187
197
|
return time(value);
|
|
188
198
|
}
|
|
189
199
|
PublishUtil.timeOf = timeOf;
|
|
200
|
+
function of(piece) {
|
|
201
|
+
const approved = time(piece.approved);
|
|
202
|
+
return publishing(piece.publishing) ?? (piece.stage === "review" && approved && !piece.publishing ? { state: "queued", since: approved } : undefined);
|
|
203
|
+
}
|
|
204
|
+
PublishUtil.of = of;
|
|
190
205
|
function publishing(value) {
|
|
191
206
|
const kept = object(value);
|
|
192
207
|
const since = time(kept?.since);
|
|
@@ -231,6 +246,7 @@ function count(value, fallback) {
|
|
|
231
246
|
var DAY = 86400000;
|
|
232
247
|
var MAX_TOPICS = 200;
|
|
233
248
|
var HOT_FOR = 2 * DAY;
|
|
249
|
+
var MAX_TONES = 3;
|
|
234
250
|
var CreatorUtil;
|
|
235
251
|
((CreatorUtil) => {
|
|
236
252
|
function settings(value) {
|
|
@@ -246,6 +262,7 @@ var CreatorUtil;
|
|
|
246
262
|
...goal && time2(goal.from) ? { goal: { from: time2(goal.from), days: count(goal.days, 30), videos: count(goal.videos, 0), posts: count(goal.posts, 0) } } : {},
|
|
247
263
|
minutesCap: count(kept.minutesCap, 120),
|
|
248
264
|
voice: text2(kept.voice, 60) || "zh-CN-XiaoxiaoNeural",
|
|
265
|
+
tone: tones(kept.tone),
|
|
249
266
|
series: Array.isArray(kept.series) ? seriesOf(kept.series) : [],
|
|
250
267
|
strategy: kept.strategy === "manual" ? "manual" : "auto",
|
|
251
268
|
phaseWeeks: typeof kept.phaseWeeks === "number" ? Math.min(26, count(kept.phaseWeeks, 4)) : 4,
|
|
@@ -267,6 +284,17 @@ var CreatorUtil;
|
|
|
267
284
|
return [...known, ...PLATFORMS.filter((one) => !kept.some((it) => it.id === one.id))];
|
|
268
285
|
}
|
|
269
286
|
CreatorUtil.withBuiltins = withBuiltins;
|
|
287
|
+
function tones(value) {
|
|
288
|
+
return [
|
|
289
|
+
...new Set(texts(value).map((one) => text2(one, 20)).filter(Boolean))
|
|
290
|
+
].slice(0, MAX_TONES);
|
|
291
|
+
}
|
|
292
|
+
CreatorUtil.tones = tones;
|
|
293
|
+
function toneOf(item2, settings2) {
|
|
294
|
+
const own = settings2.series.find((one) => one.id === item2?.series)?.tone;
|
|
295
|
+
return (own ? [own] : settings2.tone).map((one) => (one in TONES) ? TONES[one] : one);
|
|
296
|
+
}
|
|
297
|
+
CreatorUtil.toneOf = toneOf;
|
|
270
298
|
function reach(item2, settings2) {
|
|
271
299
|
return item2.reach ?? settings2.series.find((one) => one.id === item2.series)?.reach ?? "public";
|
|
272
300
|
}
|
|
@@ -302,6 +330,7 @@ var CreatorUtil;
|
|
|
302
330
|
}
|
|
303
331
|
const about = text2(kept.about, 200);
|
|
304
332
|
const perWeek = count(kept.perWeek, 0);
|
|
333
|
+
const tone = text2(kept.tone, 20);
|
|
305
334
|
all.push({
|
|
306
335
|
id,
|
|
307
336
|
name,
|
|
@@ -309,7 +338,8 @@ var CreatorUtil;
|
|
|
309
338
|
color: text2(kept.color, 40) || SERIES_COLORS[all.length % SERIES_COLORS.length],
|
|
310
339
|
...kept.ordered === true ? { ordered: true } : {},
|
|
311
340
|
...perWeek ? { perWeek: Math.min(perWeek, 14) } : {},
|
|
312
|
-
...kept.reach === "internal" || kept.reach === "both" ? { reach: kept.reach } : {}
|
|
341
|
+
...kept.reach === "internal" || kept.reach === "both" ? { reach: kept.reach } : {},
|
|
342
|
+
...tone ? { tone } : {}
|
|
313
343
|
});
|
|
314
344
|
}
|
|
315
345
|
return all.slice(0, 12);
|
|
@@ -398,7 +428,7 @@ var CreatorUtil;
|
|
|
398
428
|
...Array.isArray(kept.checks) ? { checks: kept.checks.map(check).filter((one) => !!one) } : {},
|
|
399
429
|
...text2(kept.session, 1000) ? { session: text2(kept.session, 1000) } : {},
|
|
400
430
|
...time2(kept.approved) ? { approved: time2(kept.approved) } : {},
|
|
401
|
-
...PublishUtil.
|
|
431
|
+
...PublishUtil.of(kept) ? { publishing: PublishUtil.of(kept) } : {},
|
|
402
432
|
...Array.isArray(kept.links) ? { links: kept.links.map(link).filter((one) => !!one) } : {},
|
|
403
433
|
...Array.isArray(kept.stats) ? { stats: kept.stats.map(stat).filter((one) => !!one) } : {},
|
|
404
434
|
...kept.dropped === true ? { dropped: true } : {},
|
|
@@ -437,7 +467,8 @@ var CreatorUtil;
|
|
|
437
467
|
topic: of("topic").filter((one) => !expired(one, now)).sort((a, b) => (b.heat ?? 0) - (a.heat ?? 0) || b.at - a.at),
|
|
438
468
|
materials: of("materials").sort(latest),
|
|
439
469
|
making: of("making").sort(latest),
|
|
440
|
-
review: of("review").sort(latest),
|
|
470
|
+
review: of("review").filter((one) => !one.approved).sort(latest),
|
|
471
|
+
publishing: of("review").filter((one) => !!one.approved).sort((a, b) => (a.approved ?? 0) - (b.approved ?? 0)),
|
|
441
472
|
published: of("published").sort((a, b) => publishedAt(b) - publishedAt(a))
|
|
442
473
|
};
|
|
443
474
|
}
|
|
@@ -780,7 +811,7 @@ var ChannelUtil;
|
|
|
780
811
|
return (item.needs ?? []).every((one) => one.done);
|
|
781
812
|
}
|
|
782
813
|
ChannelUtil.given = given;
|
|
783
|
-
ChannelUtil.PACE = { start:
|
|
814
|
+
ChannelUtil.PACE = { start: 12 * HOUR, first: 24 * HOUR, min: 2 * HOUR, max: 2 * DAY2, many: 3, ride: 0.5 };
|
|
784
815
|
function nextGap(gap, added) {
|
|
785
816
|
if (added >= ChannelUtil.PACE.many) {
|
|
786
817
|
return Math.max(ChannelUtil.PACE.min, Math.round(gap / 2));
|
|
@@ -797,6 +828,22 @@ var ChannelUtil;
|
|
|
797
828
|
return settings.commentsEvery ? settings.commentsEvery * HOUR : item.commentsGap ?? firstGap(items);
|
|
798
829
|
}
|
|
799
830
|
ChannelUtil.commentsGap = commentsGap;
|
|
831
|
+
function live(item, now) {
|
|
832
|
+
return (item.links ?? []).filter((one) => (one.scheduled ?? one.at) <= now);
|
|
833
|
+
}
|
|
834
|
+
ChannelUtil.live = live;
|
|
835
|
+
function due(items, settings, now, share = 1) {
|
|
836
|
+
return items.filter((one) => {
|
|
837
|
+
const out = live(one, now).map((link) => link.scheduled ?? link.at);
|
|
838
|
+
if (one.stage !== "published" || one.dropped || !out.length) {
|
|
839
|
+
return false;
|
|
840
|
+
}
|
|
841
|
+
const published = Math.min(...out);
|
|
842
|
+
const since = now - Math.max(one.commentsAt ?? 0, published);
|
|
843
|
+
return now - published < settings.commentsDays * DAY2 && since >= share * commentsGap(one, items, settings);
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
ChannelUtil.due = due;
|
|
800
847
|
function comments(value, now = Date.now()) {
|
|
801
848
|
return (Array.isArray(value) ? value : []).map(comment).filter((one) => !!one && now - one.at < COMMENTS_FOR).sort((a, b) => a.at - b.at).slice(-MAX_COMMENTS);
|
|
802
849
|
}
|
|
@@ -950,7 +997,7 @@ var CreatorTasks;
|
|
|
950
997
|
"Work in the user's browser (computer use), where they are signed in; never sign in, never like, follow, message, pin or delete anyone's comment.",
|
|
951
998
|
`1. Post each answer of send under its comment, as written; delete each answer of withdraw. Then \`${call("replied")} '<JSON array of { id, state: "sent" | "removed" }>'\`.`,
|
|
952
999
|
"2. For each piece of due, open each link and read the comments since it was last read (their words only, never who wrote them). Classify each: question, suggestion (what they want to see), correction (a mistake of the piece), praise, negative (rude, a quarrel), spam (an ad).",
|
|
953
|
-
"3. Write an answer for a question, a suggestion, a correction or praise whose class is not off: short, warm, as the user answers (follow the examples), true; never a link, an ad, a promise you cannot keep, an argument; one answer a comment, never to the account's own. A class at act: post it there and then. At ask: only write it. Never answer negative or spam.",
|
|
1000
|
+
"3. Write an answer for a question, a suggestion, a correction or praise whose class is not off: short, in the channel's tone (tone; warm when none), as the user answers (follow the examples), true; never a link, an ad, a promise you cannot keep, an argument; one answer a comment, never to the account's own. A class at act: post it there and then. At ask: only write it. Never answer negative or spam.",
|
|
954
1001
|
`4. Keep them, for each piece of due (with [] when nothing new came: how many came sets how soon it is read again): \`${call("comments")} <piece id> '<JSON array of { platform, key? (the platform's id of the comment, if shown), text, class, likes?, reply?, sent? (true once posted) }>'\`. At most the limit of answers posted a run; stop at any warning of the platform (a check, too many replies) and tell the user.`,
|
|
955
1002
|
"5. A correction that is right: tell the user at once with notify_user (urgent): the comment and what to fix. When answers wait for the user (ask), tell them with notify_user in one line how many wait on the page of Creator.",
|
|
956
1003
|
"Reply in Chinese in one short line: how many read, answered and waiting."
|
|
@@ -1309,7 +1356,7 @@ class PublishQueue {
|
|
|
1309
1356
|
this.now = now;
|
|
1310
1357
|
}
|
|
1311
1358
|
begin() {
|
|
1312
|
-
const stop = this.host.onSessionEvent((event) => void this.watch(event));
|
|
1359
|
+
const stop = this.host.onSessionEvent((event) => void this.watch(event).catch((error) => PublishQueue.failed(error)));
|
|
1313
1360
|
return () => {
|
|
1314
1361
|
stop();
|
|
1315
1362
|
this.rest();
|
|
@@ -1397,11 +1444,14 @@ class PublishQueue {
|
|
|
1397
1444
|
return this.store.stopped(id, "Its conversation went idle without publishing it or saying why.");
|
|
1398
1445
|
}
|
|
1399
1446
|
return;
|
|
1400
|
-
});
|
|
1447
|
+
}).catch((error) => PublishQueue.failed(error));
|
|
1401
1448
|
}, ms);
|
|
1402
1449
|
timer.unref?.();
|
|
1403
1450
|
this.idle = { id, timer };
|
|
1404
1451
|
}
|
|
1452
|
+
static failed(error) {
|
|
1453
|
+
console.error(`${NAME}: the queue of publishing failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
1454
|
+
}
|
|
1405
1455
|
rest(id) {
|
|
1406
1456
|
if (this.idle && (!id || this.idle.id === id)) {
|
|
1407
1457
|
clearTimeout(this.idle.timer);
|
|
@@ -1649,7 +1699,7 @@ var CRON2 = "@celljs/ta-cron";
|
|
|
1649
1699
|
var INITIATIVE = "@celljs/ta-initiative";
|
|
1650
1700
|
var DAY3 = 86400000;
|
|
1651
1701
|
var TICK = 10 * 60000;
|
|
1652
|
-
var RUN_GAP =
|
|
1702
|
+
var RUN_GAP = 2 * 3600000;
|
|
1653
1703
|
var SEND_GAP = 5 * 60000;
|
|
1654
1704
|
var AWAKE = [9, 23];
|
|
1655
1705
|
function replyLevel(level) {
|
|
@@ -1776,6 +1826,7 @@ class CreatorHost extends CreatorHostBase {
|
|
|
1776
1826
|
inside: CreatorUtil.picked(settings).filter((one) => one.internal).map((one) => one.name),
|
|
1777
1827
|
strategy,
|
|
1778
1828
|
lessons: (await this.lessons()).slice(0, 15).map((one) => one.text),
|
|
1829
|
+
tone: CreatorUtil.toneOf(item, settings),
|
|
1779
1830
|
voice: settings.voice
|
|
1780
1831
|
};
|
|
1781
1832
|
}
|
|
@@ -1783,7 +1834,12 @@ class CreatorHost extends CreatorHostBase {
|
|
|
1783
1834
|
const title = (item) => items.find((one) => one.id === item)?.title;
|
|
1784
1835
|
const link = (one) => items.find((it) => it.id === one.item)?.links?.find((it) => it.platform === one.platform)?.url;
|
|
1785
1836
|
return {
|
|
1786
|
-
due:
|
|
1837
|
+
due: ChannelUtil.due(items, settings, now, ChannelUtil.PACE.ride).map((one) => ({
|
|
1838
|
+
id: one.id,
|
|
1839
|
+
title: one.title,
|
|
1840
|
+
links: ChannelUtil.live(one, now),
|
|
1841
|
+
since: one.commentsAt
|
|
1842
|
+
})),
|
|
1787
1843
|
send: comments.filter((one) => one.reply?.state === "approved").map((one) => ({
|
|
1788
1844
|
id: one.id,
|
|
1789
1845
|
piece: title(one.item),
|
|
@@ -1801,6 +1857,7 @@ class CreatorHost extends CreatorHostBase {
|
|
|
1801
1857
|
reply: one.reply?.text
|
|
1802
1858
|
})),
|
|
1803
1859
|
levels: await this.levels(),
|
|
1860
|
+
tone: CreatorUtil.toneOf(undefined, settings),
|
|
1804
1861
|
examples: ChannelUtil.examples(comments),
|
|
1805
1862
|
limit: 20
|
|
1806
1863
|
};
|
|
@@ -2016,7 +2073,7 @@ class CreatorHost extends CreatorHostBase {
|
|
|
2016
2073
|
}
|
|
2017
2074
|
const [items, comments, settings] = await Promise.all([this.items(), this.commentsKept(), this.settings()]);
|
|
2018
2075
|
const sending = comments.some((one) => one.reply?.state === "approved" || one.reply?.state === "withdrawn");
|
|
2019
|
-
const due =
|
|
2076
|
+
const due = ChannelUtil.due(items, settings, now).length > 0;
|
|
2020
2077
|
if (sending && now - this.ranAt >= SEND_GAP || due && now - this.ranAt >= RUN_GAP) {
|
|
2021
2078
|
await this.runComments();
|
|
2022
2079
|
}
|
|
@@ -2041,16 +2098,6 @@ class CreatorHost extends CreatorHostBase {
|
|
|
2041
2098
|
});
|
|
2042
2099
|
}
|
|
2043
2100
|
}
|
|
2044
|
-
due(items, settings, now) {
|
|
2045
|
-
return items.filter((one) => {
|
|
2046
|
-
if (one.stage !== "published" || one.dropped || !one.links?.length) {
|
|
2047
|
-
return false;
|
|
2048
|
-
}
|
|
2049
|
-
const published = CreatorUtil.publishedAt(one);
|
|
2050
|
-
const since = now - (one.commentsAt ?? published);
|
|
2051
|
-
return now - published < settings.commentsDays * DAY3 && since >= ChannelUtil.commentsGap(one, items, settings);
|
|
2052
|
-
});
|
|
2053
|
-
}
|
|
2054
2101
|
async levels() {
|
|
2055
2102
|
const levels = await Promise.all(REPLY_CLASSES.map((cls) => this.initiative("level", REPLY_KINDS[cls].id)));
|
|
2056
2103
|
return Object.fromEntries(REPLY_CLASSES.map((cls, at) => [cls, replyLevel(levels[at] ?? REPLY_KINDS[cls].level)]));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-creator",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.34.0",
|
|
4
4
|
"description": "A pi package for Ta: a channel of content without showing your face, hot topics of your field found three times a day, videos and posts made for each platform, reviewed on your phone and published for you once passed",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@celljs/ta-protocol": "4.
|
|
33
|
-
"@celljs/ta-web": "4.
|
|
32
|
+
"@celljs/ta-protocol": "4.34.0",
|
|
33
|
+
"@celljs/ta-web": "4.34.0",
|
|
34
34
|
"@types/react": "^19.3.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
@@ -10,9 +10,9 @@ its server: `ta call @celljs/ta-creator <method> [args as JSON]`.
|
|
|
10
10
|
|
|
11
11
|
| Method | What it does |
|
|
12
12
|
|---|---|
|
|
13
|
-
| `settings` | What the channel is about (niche), its series, the platforms picked and their shapes, the voice, what happens once a piece is passed (`publish`) |
|
|
13
|
+
| `settings` | What the channel is about (niche), its style of language (`tone`), its series, the platforms picked and their shapes, the voice, what happens once a piece is passed (`publish`) |
|
|
14
14
|
| `list [stage]` | The pieces, of a stage: `topic`, `materials`, `making`, `review`, `published` |
|
|
15
|
-
| `brief make <id>` | What making a piece needs: the piece, who it is for (`reach`), each platform it goes to with its form there, the strategy, what the user asked to change before (`lessons`), the voice |
|
|
15
|
+
| `brief make <id>` | What making a piece needs: the piece, who it is for (`reach`), each platform it goes to with its form there, the strategy, what the user asked to change before (`lessons`), the style of language (`tone`), the voice |
|
|
16
16
|
| `brief topics` | What finding topics needs: niche, platforms, sources, how many to offer, the titles already there, the series (what each is about, how many a week, waiting, published, the lessons of a course) and what the last review concluded |
|
|
17
17
|
| `topics '<JSON array>'` | Adds topics found: `{ title, series (its id or name), form: "video" \| "post" \| "article" \| "note", kind: "hot" \| "howto" \| "explain" \| "original", why, heat, until?, seen, origin?, reach?, comments? }`; a topic of a course is numbered the next lesson |
|
|
18
18
|
| `update <id> '<JSON>'` | Keeps what you made: `script`, `done` (steps of script, visuals, voice, captions, versions, checks), `versions`, `checks`, `reach` (`public`, `internal`, `both`); `series` and `number` when the user moves it |
|
|
@@ -51,7 +51,9 @@ people in the news, films and shows of others, or anything of the user's employe
|
|
|
51
51
|
name, its tools, its people, numbers, what is not public) makes it `internal`: take it out, or, when it is the point,
|
|
52
52
|
`update <id> '{"reach": "internal"}'` and say so in a check. Internal pieces go only to the platforms inside the
|
|
53
53
|
company (`inside` in the brief); when none is picked, say so: the user adds one in Settings.
|
|
54
|
-
1. **Script.** Write it
|
|
54
|
+
1. **Script.** Write it in the `tone` of the brief (its series', else the channel's: each with how to write in it, or the
|
|
55
|
+
user's own words, followed as they say them; several are blended, none: what suits the platform and the topic), and
|
|
56
|
+
so every title, caption and text of the versions. Write it for the platform's audience: a hook in the first 3 seconds, one idea a scene, 30–90 seconds for
|
|
55
57
|
a short video, 6–9 pictures for a post. Only what is true and what you can show: code you write yourself in a fresh,
|
|
56
58
|
public example, never the user's work, a private repository or anything of their employer. Keep it with
|
|
57
59
|
`update <id> '{"script": "...", "done": ["script"]}'`.
|
|
@@ -107,7 +109,10 @@ people in the news, films and shows of others, or anything of the user's employe
|
|
|
107
109
|
4. **Checks.** Before review check, and keep each as `{ text, ok }` with `update`: the AI label is on every picture;
|
|
108
110
|
the declaration of AI content each platform asks for will be ticked (its `declare` in settings); nothing private
|
|
109
111
|
(names, paths, tokens, a private repository); nothing of the user's company in a public piece (else internal, as
|
|
110
|
-
above); each version fits its platform (length, number of pictures); a work explained names its source
|
|
112
|
+
above); each version fits its platform (length, number of pictures); a work explained names its source; no version
|
|
113
|
+
sends people to another platform or promotes its products (no "去B站看完整版", no QR code, watermark, logo or
|
|
114
|
+
screenshot of another app, and on 小红书 no product of another platform named or shown: there a piece about one is
|
|
115
|
+
made about the idea instead, or left out of 小红书, as a note of 豆包 was limited there). A check that fails is said plainly for the user to look at.
|
|
111
116
|
5. **Review.** `submit <id>`, then reply with the card the user reviews it in, and nothing long around it:
|
|
112
117
|
|
|
113
118
|
```ta-creator-review
|
|
@@ -92,3 +92,21 @@ input's value with `Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,
|
|
|
92
92
|
the day (`td a`, not faded or disabled), the hour and minute (`.weui-desktop-picker__time__hour li`,
|
|
93
93
|
`…__minute li`), click the day again and hide the `dd`s; read `.weui-desktop-picker__date input` back.
|
|
94
94
|
- Publish: 发表; the list is at /platform/post/list (its link is that page: 视频号 gives no public link).
|
|
95
|
+
|
|
96
|
+
## Posts of pictures and notes (2026-11-24)
|
|
97
|
+
|
|
98
|
+
- B站 动态 (t.bilibili.com): title `.bili-dyn-publishing__title__input` (20 characters at most); the words through the
|
|
99
|
+
editor's own paste, `document.querySelector('.bili-rich-textarea').__vue__._onPaste({ stopPropagation(){},
|
|
100
|
+
preventDefault(){}, clipboardData: { getData: () => text } })` run in the page's own world (a `<script>` added to it),
|
|
101
|
+
as typed text does not reach its model; the pictures by a real click on `.bili-pics-uploader__add` with
|
|
102
|
+
`HTMLInputElement.prototype.click` caught in the page's world, then the files put into that input. The AI declaration
|
|
103
|
+
and the time are in the settings button `.bili-dyn-publishing__settings__btn` (创作声明 → AI辅助创作声明, 定时发布),
|
|
104
|
+
real clicks. It schedules at most 7 days ahead: a day further than that cannot be picked, so leave the draft (it is
|
|
105
|
+
kept) and schedule it once the day is within reach.
|
|
106
|
+
- 小红书 图文 (`/publish/publish?from=menu&target=image`): the pictures into its one `input[type=file]`; the
|
|
107
|
+
declaration `.d-select` of 内容类型声明 → 笔记含AI合成内容 by pointer and mouse events; the scheduled day of
|
|
108
|
+
another month is in the same popover, a cell `.d-datepicker-cell-main` not disabled (the last of its number).
|
|
109
|
+
- 视频号 图文 (`/platform/post/finderNewLifeCreate`): the title is 22 characters at most and is read from the page's
|
|
110
|
+
own model: setting the input's value shows it but the old title is published, so write it short in the version.
|
|
111
|
+
The hour and minute are picked after the day, in a second pass, and read back. Its page of edits
|
|
112
|
+
(修改并重新发表) has crashed the tab twice: get it right before 发表.
|
package/web/index.js
CHANGED
|
@@ -24,6 +24,16 @@ var FORM_FALLBACKS = {
|
|
|
24
24
|
var KINDS = ["hot", "howto", "explain", "original"];
|
|
25
25
|
var STEPS = ["script", "visuals", "voice", "captions", "versions", "checks"];
|
|
26
26
|
var REACHES = ["public", "internal", "both"];
|
|
27
|
+
var TONES = {
|
|
28
|
+
humorous: "humorous: light and witty, a joke or a playful image where it helps, never at anyone's expense",
|
|
29
|
+
serious: "serious: plain and earnest, no jokes, no exaggeration, facts first",
|
|
30
|
+
rigorous: "rigorous: step by step, each claim with its reason or source, terms defined, no leaps",
|
|
31
|
+
warm: 'warm: like a friend explaining, "you" and "we", patient and encouraging',
|
|
32
|
+
lively: "lively: high energy, short punchy sentences, a strong hook and rhythm",
|
|
33
|
+
plain: "plain: everyday words, everyday examples, no jargon left unexplained",
|
|
34
|
+
story: "storytelling: a scene, a person or a moment first, the point drawn from it",
|
|
35
|
+
sharp: "sharp: a clear opinion, straight to the point, the counter-intuitive first, never rude"
|
|
36
|
+
};
|
|
27
37
|
var SERIES_COLORS = ["#22c55e", "#f97316", "#3b82f6", "#a855f7", "#ec4899", "#14b8a6", "#eab308", "#64748b"];
|
|
28
38
|
var ASPECTS = ["16:9", "9:16", "3:4", "1:1"];
|
|
29
39
|
var PLATFORMS = [
|
|
@@ -158,6 +168,11 @@ var PublishUtil;
|
|
|
158
168
|
return time(value);
|
|
159
169
|
}
|
|
160
170
|
PublishUtil.timeOf = timeOf;
|
|
171
|
+
function of(piece) {
|
|
172
|
+
const approved = time(piece.approved);
|
|
173
|
+
return publishing(piece.publishing) ?? (piece.stage === "review" && approved && !piece.publishing ? { state: "queued", since: approved } : undefined);
|
|
174
|
+
}
|
|
175
|
+
PublishUtil.of = of;
|
|
161
176
|
function publishing(value) {
|
|
162
177
|
const kept = object(value);
|
|
163
178
|
const since = time(kept?.since);
|
|
@@ -208,6 +223,7 @@ function count(value, fallback) {
|
|
|
208
223
|
var DAY = 86400000;
|
|
209
224
|
var MAX_TOPICS = 200;
|
|
210
225
|
var HOT_FOR = 2 * DAY;
|
|
226
|
+
var MAX_TONES = 3;
|
|
211
227
|
var CreatorUtil;
|
|
212
228
|
((CreatorUtil) => {
|
|
213
229
|
function settings(value) {
|
|
@@ -223,6 +239,7 @@ var CreatorUtil;
|
|
|
223
239
|
...goal && time2(goal.from) ? { goal: { from: time2(goal.from), days: count(goal.days, 30), videos: count(goal.videos, 0), posts: count(goal.posts, 0) } } : {},
|
|
224
240
|
minutesCap: count(kept.minutesCap, 120),
|
|
225
241
|
voice: text2(kept.voice, 60) || "zh-CN-XiaoxiaoNeural",
|
|
242
|
+
tone: tones(kept.tone),
|
|
226
243
|
series: Array.isArray(kept.series) ? seriesOf(kept.series) : [],
|
|
227
244
|
strategy: kept.strategy === "manual" ? "manual" : "auto",
|
|
228
245
|
phaseWeeks: typeof kept.phaseWeeks === "number" ? Math.min(26, count(kept.phaseWeeks, 4)) : 4,
|
|
@@ -244,6 +261,17 @@ var CreatorUtil;
|
|
|
244
261
|
return [...known, ...PLATFORMS.filter((one) => !kept.some((it) => it.id === one.id))];
|
|
245
262
|
}
|
|
246
263
|
CreatorUtil.withBuiltins = withBuiltins;
|
|
264
|
+
function tones(value) {
|
|
265
|
+
return [
|
|
266
|
+
...new Set(texts(value).map((one) => text2(one, 20)).filter(Boolean))
|
|
267
|
+
].slice(0, MAX_TONES);
|
|
268
|
+
}
|
|
269
|
+
CreatorUtil.tones = tones;
|
|
270
|
+
function toneOf(item2, settings2) {
|
|
271
|
+
const own = settings2.series.find((one) => one.id === item2?.series)?.tone;
|
|
272
|
+
return (own ? [own] : settings2.tone).map((one) => (one in TONES) ? TONES[one] : one);
|
|
273
|
+
}
|
|
274
|
+
CreatorUtil.toneOf = toneOf;
|
|
247
275
|
function reach(item2, settings2) {
|
|
248
276
|
return item2.reach ?? settings2.series.find((one) => one.id === item2.series)?.reach ?? "public";
|
|
249
277
|
}
|
|
@@ -279,6 +307,7 @@ var CreatorUtil;
|
|
|
279
307
|
}
|
|
280
308
|
const about = text2(kept.about, 200);
|
|
281
309
|
const perWeek = count(kept.perWeek, 0);
|
|
310
|
+
const tone = text2(kept.tone, 20);
|
|
282
311
|
all.push({
|
|
283
312
|
id,
|
|
284
313
|
name,
|
|
@@ -286,7 +315,8 @@ var CreatorUtil;
|
|
|
286
315
|
color: text2(kept.color, 40) || SERIES_COLORS[all.length % SERIES_COLORS.length],
|
|
287
316
|
...kept.ordered === true ? { ordered: true } : {},
|
|
288
317
|
...perWeek ? { perWeek: Math.min(perWeek, 14) } : {},
|
|
289
|
-
...kept.reach === "internal" || kept.reach === "both" ? { reach: kept.reach } : {}
|
|
318
|
+
...kept.reach === "internal" || kept.reach === "both" ? { reach: kept.reach } : {},
|
|
319
|
+
...tone ? { tone } : {}
|
|
290
320
|
});
|
|
291
321
|
}
|
|
292
322
|
return all.slice(0, 12);
|
|
@@ -375,7 +405,7 @@ var CreatorUtil;
|
|
|
375
405
|
...Array.isArray(kept.checks) ? { checks: kept.checks.map(check).filter((one) => !!one) } : {},
|
|
376
406
|
...text2(kept.session, 1000) ? { session: text2(kept.session, 1000) } : {},
|
|
377
407
|
...time2(kept.approved) ? { approved: time2(kept.approved) } : {},
|
|
378
|
-
...PublishUtil.
|
|
408
|
+
...PublishUtil.of(kept) ? { publishing: PublishUtil.of(kept) } : {},
|
|
379
409
|
...Array.isArray(kept.links) ? { links: kept.links.map(link).filter((one) => !!one) } : {},
|
|
380
410
|
...Array.isArray(kept.stats) ? { stats: kept.stats.map(stat).filter((one) => !!one) } : {},
|
|
381
411
|
...kept.dropped === true ? { dropped: true } : {},
|
|
@@ -414,7 +444,8 @@ var CreatorUtil;
|
|
|
414
444
|
topic: of("topic").filter((one) => !expired(one, now)).sort((a, b) => (b.heat ?? 0) - (a.heat ?? 0) || b.at - a.at),
|
|
415
445
|
materials: of("materials").sort(latest),
|
|
416
446
|
making: of("making").sort(latest),
|
|
417
|
-
review: of("review").sort(latest),
|
|
447
|
+
review: of("review").filter((one) => !one.approved).sort(latest),
|
|
448
|
+
publishing: of("review").filter((one) => !!one.approved).sort((a, b) => (a.approved ?? 0) - (b.approved ?? 0)),
|
|
418
449
|
published: of("published").sort((a, b) => publishedAt(b) - publishedAt(a))
|
|
419
450
|
};
|
|
420
451
|
}
|
|
@@ -734,7 +765,9 @@ var EN = {
|
|
|
734
765
|
flowSeries: "{n} series",
|
|
735
766
|
flowNone: "None yet",
|
|
736
767
|
flowWaiting: "{n} wait for you",
|
|
737
|
-
|
|
768
|
+
flowPublishing: "{n} passed, publishing",
|
|
769
|
+
publishingHead: "Publishing",
|
|
770
|
+
publishingAbout: "Passed by you: Ta publishes them one at a time",
|
|
738
771
|
flowWeek: "{n} this week",
|
|
739
772
|
flowMonday: "Reviewed each Monday",
|
|
740
773
|
showAll: "Show all {n}",
|
|
@@ -748,6 +781,7 @@ var EN = {
|
|
|
748
781
|
byForm: "By form",
|
|
749
782
|
byPlatform: "By platform",
|
|
750
783
|
perPiece: "views a piece",
|
|
784
|
+
noViews: "no views yet",
|
|
751
785
|
completion: "watched {n}%",
|
|
752
786
|
pieces: "{n} pieces",
|
|
753
787
|
weekly: "Views by week",
|
|
@@ -836,7 +870,21 @@ var EN = {
|
|
|
836
870
|
insideName: "Name",
|
|
837
871
|
insideUrl: "Address of its publishing page",
|
|
838
872
|
addInside: "Add",
|
|
839
|
-
seriesInside: "In-company"
|
|
873
|
+
seriesInside: "In-company",
|
|
874
|
+
toneLabel: "Style of language",
|
|
875
|
+
toneHint: "Scripts, titles and replies follow it",
|
|
876
|
+
toneOwn: "Your own words, e.g. like chatting with a friend",
|
|
877
|
+
toneAdd: "Add",
|
|
878
|
+
seriesTone: "Style of language of the series",
|
|
879
|
+
seriesToneSame: "Channel style",
|
|
880
|
+
tone_humorous: "Humorous",
|
|
881
|
+
tone_serious: "Serious",
|
|
882
|
+
tone_rigorous: "Rigorous",
|
|
883
|
+
tone_warm: "Warm",
|
|
884
|
+
tone_lively: "Lively",
|
|
885
|
+
tone_plain: "Plain-spoken",
|
|
886
|
+
tone_story: "Storytelling",
|
|
887
|
+
tone_sharp: "Sharp"
|
|
840
888
|
};
|
|
841
889
|
var ZH = {
|
|
842
890
|
title: "创作者",
|
|
@@ -923,7 +971,9 @@ var ZH = {
|
|
|
923
971
|
flowSeries: "{n} 个系列",
|
|
924
972
|
flowNone: "暂无",
|
|
925
973
|
flowWaiting: "{n} 条等你审",
|
|
926
|
-
|
|
974
|
+
flowPublishing: "{n} 条已通过,发布中",
|
|
975
|
+
publishingHead: "发布中",
|
|
976
|
+
publishingAbout: "你已通过,Ta 按顺序逐条发布",
|
|
927
977
|
flowWeek: "本周 {n} 条",
|
|
928
978
|
flowMonday: "每周一复盘",
|
|
929
979
|
showAll: "展开全部 {n}",
|
|
@@ -937,6 +987,7 @@ var ZH = {
|
|
|
937
987
|
byForm: "按形式",
|
|
938
988
|
byPlatform: "按平台",
|
|
939
989
|
perPiece: "条均播放",
|
|
990
|
+
noViews: "还没有播放数据",
|
|
940
991
|
completion: "完播 {n}%",
|
|
941
992
|
pieces: "{n} 条",
|
|
942
993
|
weekly: "每周播放",
|
|
@@ -1025,7 +1076,21 @@ var ZH = {
|
|
|
1025
1076
|
insideName: "平台名",
|
|
1026
1077
|
insideUrl: "发布页地址",
|
|
1027
1078
|
addInside: "添加",
|
|
1028
|
-
seriesInside: "公司内"
|
|
1079
|
+
seriesInside: "公司内",
|
|
1080
|
+
toneLabel: "语言风格",
|
|
1081
|
+
toneHint: "脚本、文案、评论回复都照着写",
|
|
1082
|
+
toneOwn: "自己写一个,比如:像朋友聊天",
|
|
1083
|
+
toneAdd: "添加",
|
|
1084
|
+
seriesTone: "这个系列的语言风格",
|
|
1085
|
+
seriesToneSame: "同频道风格",
|
|
1086
|
+
tone_humorous: "幽默",
|
|
1087
|
+
tone_serious: "严肃",
|
|
1088
|
+
tone_rigorous: "逻辑缜密",
|
|
1089
|
+
tone_warm: "亲切",
|
|
1090
|
+
tone_lively: "活泼",
|
|
1091
|
+
tone_plain: "通俗易懂",
|
|
1092
|
+
tone_story: "讲故事",
|
|
1093
|
+
tone_sharp: "犀利"
|
|
1029
1094
|
};
|
|
1030
1095
|
var ZH_TW = {
|
|
1031
1096
|
title: "創作者",
|
|
@@ -1112,7 +1177,9 @@ var ZH_TW = {
|
|
|
1112
1177
|
flowSeries: "{n} 個系列",
|
|
1113
1178
|
flowNone: "暫無",
|
|
1114
1179
|
flowWaiting: "{n} 條等你審",
|
|
1115
|
-
|
|
1180
|
+
flowPublishing: "{n} 條已通過,發佈中",
|
|
1181
|
+
publishingHead: "發佈中",
|
|
1182
|
+
publishingAbout: "你已通過,Ta 按順序逐條發佈",
|
|
1116
1183
|
flowWeek: "本週 {n} 條",
|
|
1117
1184
|
flowMonday: "每週一複盤",
|
|
1118
1185
|
showAll: "展開全部 {n}",
|
|
@@ -1126,6 +1193,7 @@ var ZH_TW = {
|
|
|
1126
1193
|
byForm: "按形式",
|
|
1127
1194
|
byPlatform: "按平台",
|
|
1128
1195
|
perPiece: "條均播放",
|
|
1196
|
+
noViews: "還沒有播放數據",
|
|
1129
1197
|
completion: "完播 {n}%",
|
|
1130
1198
|
pieces: "{n} 條",
|
|
1131
1199
|
weekly: "每週播放",
|
|
@@ -1214,7 +1282,21 @@ var ZH_TW = {
|
|
|
1214
1282
|
insideName: "平台名",
|
|
1215
1283
|
insideUrl: "發佈頁地址",
|
|
1216
1284
|
addInside: "新增",
|
|
1217
|
-
seriesInside: "公司內"
|
|
1285
|
+
seriesInside: "公司內",
|
|
1286
|
+
toneLabel: "語言風格",
|
|
1287
|
+
toneHint: "腳本、文案、評論回覆都照著寫",
|
|
1288
|
+
toneOwn: "自己寫一個,比如:像朋友聊天",
|
|
1289
|
+
toneAdd: "添加",
|
|
1290
|
+
seriesTone: "這個系列的語言風格",
|
|
1291
|
+
seriesToneSame: "同頻道風格",
|
|
1292
|
+
tone_humorous: "幽默",
|
|
1293
|
+
tone_serious: "嚴肅",
|
|
1294
|
+
tone_rigorous: "邏輯縝密",
|
|
1295
|
+
tone_warm: "親切",
|
|
1296
|
+
tone_lively: "活潑",
|
|
1297
|
+
tone_plain: "通俗易懂",
|
|
1298
|
+
tone_story: "講故事",
|
|
1299
|
+
tone_sharp: "犀利"
|
|
1218
1300
|
};
|
|
1219
1301
|
var JA = {
|
|
1220
1302
|
title: "クリエイター",
|
|
@@ -1301,7 +1383,9 @@ var JA = {
|
|
|
1301
1383
|
flowSeries: "{n} シリーズ",
|
|
1302
1384
|
flowNone: "なし",
|
|
1303
1385
|
flowWaiting: "{n} 件が確認待ち",
|
|
1304
|
-
|
|
1386
|
+
flowPublishing: "OK 済み {n} 件、投稿中",
|
|
1387
|
+
publishingHead: "投稿中",
|
|
1388
|
+
publishingAbout: "OK 済み:Ta が順番に 1 件ずつ投稿します",
|
|
1305
1389
|
flowWeek: "今週 {n} 件",
|
|
1306
1390
|
flowMonday: "毎週月曜に振り返り",
|
|
1307
1391
|
showAll: "すべて表示 {n}",
|
|
@@ -1315,6 +1399,7 @@ var JA = {
|
|
|
1315
1399
|
byForm: "形式別",
|
|
1316
1400
|
byPlatform: "プラットフォーム別",
|
|
1317
1401
|
perPiece: "1 件あたり再生",
|
|
1402
|
+
noViews: "まだ再生データなし",
|
|
1318
1403
|
completion: "完走 {n}%",
|
|
1319
1404
|
pieces: "{n} 件",
|
|
1320
1405
|
weekly: "週ごとの再生",
|
|
@@ -1403,7 +1488,21 @@ var JA = {
|
|
|
1403
1488
|
insideName: "名前",
|
|
1404
1489
|
insideUrl: "投稿ページのアドレス",
|
|
1405
1490
|
addInside: "追加",
|
|
1406
|
-
seriesInside: "社内"
|
|
1491
|
+
seriesInside: "社内",
|
|
1492
|
+
toneLabel: "語り口",
|
|
1493
|
+
toneHint: "台本・タイトル・返信をこの口調で",
|
|
1494
|
+
toneOwn: "自分の言葉で(例:友達と話すように)",
|
|
1495
|
+
toneAdd: "追加",
|
|
1496
|
+
seriesTone: "このシリーズの語り口",
|
|
1497
|
+
seriesToneSame: "チャンネルと同じ",
|
|
1498
|
+
tone_humorous: "ユーモア",
|
|
1499
|
+
tone_serious: "真面目",
|
|
1500
|
+
tone_rigorous: "論理的",
|
|
1501
|
+
tone_warm: "親しみやすい",
|
|
1502
|
+
tone_lively: "元気",
|
|
1503
|
+
tone_plain: "わかりやすい",
|
|
1504
|
+
tone_story: "ストーリー",
|
|
1505
|
+
tone_sharp: "鋭い"
|
|
1407
1506
|
};
|
|
1408
1507
|
var WORDS = { "zh-CN": ZH, "zh-TW": ZH_TW, "en-US": EN, "ja-JP": JA };
|
|
1409
1508
|
var CreatorWords;
|
|
@@ -1968,7 +2067,7 @@ var ChannelUtil;
|
|
|
1968
2067
|
return (item.needs ?? []).every((one) => one.done);
|
|
1969
2068
|
}
|
|
1970
2069
|
ChannelUtil.given = given;
|
|
1971
|
-
ChannelUtil.PACE = { start:
|
|
2070
|
+
ChannelUtil.PACE = { start: 12 * HOUR, first: 24 * HOUR, min: 2 * HOUR, max: 2 * DAY2, many: 3, ride: 0.5 };
|
|
1972
2071
|
function nextGap(gap, added) {
|
|
1973
2072
|
if (added >= ChannelUtil.PACE.many) {
|
|
1974
2073
|
return Math.max(ChannelUtil.PACE.min, Math.round(gap / 2));
|
|
@@ -1985,6 +2084,22 @@ var ChannelUtil;
|
|
|
1985
2084
|
return settings.commentsEvery ? settings.commentsEvery * HOUR : item.commentsGap ?? firstGap(items);
|
|
1986
2085
|
}
|
|
1987
2086
|
ChannelUtil.commentsGap = commentsGap;
|
|
2087
|
+
function live(item, now) {
|
|
2088
|
+
return (item.links ?? []).filter((one) => (one.scheduled ?? one.at) <= now);
|
|
2089
|
+
}
|
|
2090
|
+
ChannelUtil.live = live;
|
|
2091
|
+
function due(items, settings, now, share = 1) {
|
|
2092
|
+
return items.filter((one) => {
|
|
2093
|
+
const out = live(one, now).map((link) => link.scheduled ?? link.at);
|
|
2094
|
+
if (one.stage !== "published" || one.dropped || !out.length) {
|
|
2095
|
+
return false;
|
|
2096
|
+
}
|
|
2097
|
+
const published = Math.min(...out);
|
|
2098
|
+
const since = now - Math.max(one.commentsAt ?? 0, published);
|
|
2099
|
+
return now - published < settings.commentsDays * DAY2 && since >= share * commentsGap(one, items, settings);
|
|
2100
|
+
});
|
|
2101
|
+
}
|
|
2102
|
+
ChannelUtil.due = due;
|
|
1988
2103
|
function comments(value, now = Date.now()) {
|
|
1989
2104
|
return (Array.isArray(value) ? value : []).map(comment).filter((one) => !!one && now - one.at < COMMENTS_FOR).sort((a, b) => a.at - b.at).slice(-MAX_COMMENTS);
|
|
1990
2105
|
}
|
|
@@ -2250,7 +2365,15 @@ function Phases({ context }) {
|
|
|
2250
2365
|
className: "tcre-card tcre-panel tcre-wide"
|
|
2251
2366
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
2252
2367
|
className: "tcre-panel-title"
|
|
2253
|
-
}, words.phases, /* @__PURE__ */ React.createElement("
|
|
2368
|
+
}, words.phases, /* @__PURE__ */ React.createElement("span", {
|
|
2369
|
+
className: "tcre-grow"
|
|
2370
|
+
}), /* @__PURE__ */ React.createElement(BusyButton, {
|
|
2371
|
+
pi,
|
|
2372
|
+
className: "tcre-secondary tcre-small",
|
|
2373
|
+
onClick: () => talk(pi, words.phaseNow, words.phasePrompt)
|
|
2374
|
+
}, words.phaseNow)), /* @__PURE__ */ React.createElement("div", {
|
|
2375
|
+
className: "tcre-phase-every"
|
|
2376
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
2254
2377
|
className: "ta-segmented tcre-seg"
|
|
2255
2378
|
}, PHASE_WEEKS.map((n) => /* @__PURE__ */ React.createElement(BusyButton, {
|
|
2256
2379
|
key: n,
|
|
@@ -2258,13 +2381,7 @@ function Phases({ context }) {
|
|
|
2258
2381
|
pressed: every === n,
|
|
2259
2382
|
className: every === n ? "ta-on" : "",
|
|
2260
2383
|
onClick: () => store.call("setSettings", { phaseWeeks: n })
|
|
2261
|
-
}, n ? format(words.phaseEvery, { n }) : words.phaseOff))), /* @__PURE__ */ React.createElement("
|
|
2262
|
-
className: "tcre-grow"
|
|
2263
|
-
}), /* @__PURE__ */ React.createElement(BusyButton, {
|
|
2264
|
-
pi,
|
|
2265
|
-
className: "tcre-secondary tcre-small",
|
|
2266
|
-
onClick: () => talk(pi, words.phaseNow, words.phasePrompt)
|
|
2267
|
-
}, words.phaseNow)), state.phases.length ? state.phases.slice(0, 6).map((one) => /* @__PURE__ */ React.createElement("div", {
|
|
2384
|
+
}, n ? format(words.phaseEvery, { n }) : words.phaseOff)))), state.phases.length ? state.phases.slice(0, 6).map((one) => /* @__PURE__ */ React.createElement("div", {
|
|
2268
2385
|
key: one.at,
|
|
2269
2386
|
className: "tcre-phase"
|
|
2270
2387
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
@@ -2288,27 +2405,29 @@ function GroupBars({
|
|
|
2288
2405
|
const { pi } = context;
|
|
2289
2406
|
const words = useWords(pi);
|
|
2290
2407
|
const most = Math.max(1, ...groups.map((one) => one.group.average));
|
|
2408
|
+
const measured = groups.some((one) => one.group.measured);
|
|
2291
2409
|
return /* @__PURE__ */ React.createElement("div", {
|
|
2292
2410
|
className: wide ? "tcre-card tcre-panel tcre-wide" : "tcre-card tcre-panel"
|
|
2293
2411
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
2294
2412
|
className: "tcre-panel-title"
|
|
2295
2413
|
}, label, /* @__PURE__ */ React.createElement("span", {
|
|
2296
2414
|
className: "tcre-muted"
|
|
2297
|
-
}, words.perPiece)), groups.map(({ group, name, color }) => /* @__PURE__ */ React.createElement("div", {
|
|
2415
|
+
}, measured ? words.perPiece : words.noViews)), groups.map(({ group, name, color }) => /* @__PURE__ */ React.createElement("div", {
|
|
2298
2416
|
key: group.key || name,
|
|
2299
|
-
className: "tcre-bar"
|
|
2417
|
+
className: "tcre-bar",
|
|
2418
|
+
"data-plain": !measured || undefined
|
|
2300
2419
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
2301
2420
|
className: "tcre-bar-label",
|
|
2302
2421
|
title: name
|
|
2303
2422
|
}, color && /* @__PURE__ */ React.createElement("i", {
|
|
2304
2423
|
style: { background: color }
|
|
2305
|
-
}), name), /* @__PURE__ */ React.createElement("span", {
|
|
2424
|
+
}), name), measured && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", {
|
|
2306
2425
|
className: "tcre-bar-track"
|
|
2307
2426
|
}, group.average > 0 && /* @__PURE__ */ React.createElement("i", {
|
|
2308
2427
|
style: { width: `${group.average / most * 100}%`, background: color }
|
|
2309
2428
|
})), /* @__PURE__ */ React.createElement("span", {
|
|
2310
2429
|
className: "tcre-bar-value"
|
|
2311
|
-
}, group.measured ? short(group.average, pi.ui.language) : "—"), /* @__PURE__ */ React.createElement("span", {
|
|
2430
|
+
}, group.measured ? short(group.average, pi.ui.language) : "—")), /* @__PURE__ */ React.createElement("span", {
|
|
2312
2431
|
className: "tcre-bar-note"
|
|
2313
2432
|
}, group.count ? format(words.pieces, { n: group.count }) : words.noneYet, group.completion !== undefined ? ` · ${format(words.completion, { n: Math.round(group.completion * 100) })}` : ""))));
|
|
2314
2433
|
}
|
|
@@ -2449,10 +2568,16 @@ function Setup({ context, done }) {
|
|
|
2449
2568
|
const [series, setSeries] = React.useState(state.settings.series);
|
|
2450
2569
|
const [platforms, setPlatforms] = React.useState(state.settings.platforms);
|
|
2451
2570
|
const [inside, setInside] = React.useState({ name: "", url: "" });
|
|
2571
|
+
const [tone, setTone] = React.useState(state.settings.tone);
|
|
2572
|
+
const [ownTone, setOwnTone] = React.useState("");
|
|
2573
|
+
const tones = [...Object.keys(TONES), ...tone.filter((one) => !(one in TONES))];
|
|
2574
|
+
const toneName = (one) => (one in TONES) ? words[`tone_${one}`] : one;
|
|
2575
|
+
const toggleTone = (one) => setTone(tone.includes(one) ? tone.filter((it) => it !== one) : [...tone, one].slice(-3));
|
|
2452
2576
|
const { Trash2, Plus } = pi.ui.icons;
|
|
2453
2577
|
const first = !state.settings.picked.length;
|
|
2454
2578
|
const save = (goal) => store.call("setSettings", {
|
|
2455
2579
|
niche: niche.trim(),
|
|
2580
|
+
tone,
|
|
2456
2581
|
picked,
|
|
2457
2582
|
platforms,
|
|
2458
2583
|
series: series.map((one) => ({ ...one, name: one.name.trim(), about: one.about?.trim() })).filter((one) => one.name),
|
|
@@ -2472,6 +2597,37 @@ function Setup({ context, done }) {
|
|
|
2472
2597
|
onChange: (event) => setNiche(event.target.value)
|
|
2473
2598
|
}), /* @__PURE__ */ React.createElement("div", {
|
|
2474
2599
|
className: "tcre-setup-label"
|
|
2600
|
+
}, words.toneLabel, /* @__PURE__ */ React.createElement("span", null, words.toneHint)), /* @__PURE__ */ React.createElement("div", {
|
|
2601
|
+
className: "tcre-pick"
|
|
2602
|
+
}, tones.map((one) => /* @__PURE__ */ React.createElement("button", {
|
|
2603
|
+
key: one,
|
|
2604
|
+
type: "button",
|
|
2605
|
+
"aria-pressed": tone.includes(one),
|
|
2606
|
+
onClick: () => toggleTone(one)
|
|
2607
|
+
}, toneName(one)))), /* @__PURE__ */ React.createElement("div", {
|
|
2608
|
+
className: "tcre-inside-add"
|
|
2609
|
+
}, /* @__PURE__ */ React.createElement("input", {
|
|
2610
|
+
className: "tcre-field",
|
|
2611
|
+
value: ownTone,
|
|
2612
|
+
maxLength: 20,
|
|
2613
|
+
placeholder: words.toneOwn,
|
|
2614
|
+
onChange: (event) => setOwnTone(event.target.value),
|
|
2615
|
+
onKeyDown: (event) => {
|
|
2616
|
+
if (event.key === "Enter" && ownTone.trim()) {
|
|
2617
|
+
toggleTone(ownTone.trim());
|
|
2618
|
+
setOwnTone("");
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
}), /* @__PURE__ */ React.createElement("button", {
|
|
2622
|
+
type: "button",
|
|
2623
|
+
className: "tcre-secondary tcre-small",
|
|
2624
|
+
disabled: !ownTone.trim() || tone.includes(ownTone.trim()),
|
|
2625
|
+
onClick: () => {
|
|
2626
|
+
toggleTone(ownTone.trim());
|
|
2627
|
+
setOwnTone("");
|
|
2628
|
+
}
|
|
2629
|
+
}, words.toneAdd)), /* @__PURE__ */ React.createElement("div", {
|
|
2630
|
+
className: "tcre-setup-label"
|
|
2475
2631
|
}, words.seriesLabel, /* @__PURE__ */ React.createElement("span", null, words.seriesHint)), /* @__PURE__ */ React.createElement("div", {
|
|
2476
2632
|
className: "tcre-card tcre-series-edit"
|
|
2477
2633
|
}, series.map((one, at) => /* @__PURE__ */ React.createElement("div", {
|
|
@@ -2490,7 +2646,19 @@ function Setup({ context, done }) {
|
|
|
2490
2646
|
value: one.about ?? "",
|
|
2491
2647
|
placeholder: words.seriesAbout,
|
|
2492
2648
|
onChange: (event) => set(at, { about: event.target.value })
|
|
2493
|
-
})), /* @__PURE__ */ React.createElement("
|
|
2649
|
+
})), /* @__PURE__ */ React.createElement("select", {
|
|
2650
|
+
className: "tcre-toggle tcre-tone-pick",
|
|
2651
|
+
"aria-label": words.seriesTone,
|
|
2652
|
+
title: words.seriesTone,
|
|
2653
|
+
"data-on": one.tone ? "true" : undefined,
|
|
2654
|
+
value: one.tone ?? "",
|
|
2655
|
+
onChange: (event) => set(at, { tone: event.target.value || undefined })
|
|
2656
|
+
}, /* @__PURE__ */ React.createElement("option", {
|
|
2657
|
+
value: ""
|
|
2658
|
+
}, words.seriesToneSame), [...tones, ...one.tone && !tones.includes(one.tone) ? [one.tone] : []].map((it) => /* @__PURE__ */ React.createElement("option", {
|
|
2659
|
+
key: it,
|
|
2660
|
+
value: it
|
|
2661
|
+
}, toneName(it)))), /* @__PURE__ */ React.createElement("button", {
|
|
2494
2662
|
type: "button",
|
|
2495
2663
|
className: "tcre-toggle",
|
|
2496
2664
|
"aria-pressed": !!one.ordered,
|
|
@@ -2862,11 +3030,11 @@ function CreatorPage({ context }) {
|
|
|
2862
3030
|
}
|
|
2863
3031
|
const now = Date.now();
|
|
2864
3032
|
const all = CreatorUtil.columns(state.items, now);
|
|
2865
|
-
const
|
|
2866
|
-
const shown = column ?? (waiting ? "review" : "topic");
|
|
3033
|
+
const shown = column ?? (all.review.length ? "review" : "topic");
|
|
2867
3034
|
const known = state.settings.series.some((one) => one.id === series);
|
|
2868
3035
|
const of = (items) => known ? items.filter((one) => one.series === series) : items;
|
|
2869
3036
|
const columns = { topic: of(all.topic), making: of([...all.materials, ...all.making]), review: of(all.review), published: of(all.published) };
|
|
3037
|
+
const publishing = of(all.publishing);
|
|
2870
3038
|
const body = () => {
|
|
2871
3039
|
switch (shown) {
|
|
2872
3040
|
case "topic":
|
|
@@ -2883,7 +3051,8 @@ function CreatorPage({ context }) {
|
|
|
2883
3051
|
case "review":
|
|
2884
3052
|
return /* @__PURE__ */ React.createElement(Reviews, {
|
|
2885
3053
|
context,
|
|
2886
|
-
items: columns.review
|
|
3054
|
+
items: columns.review,
|
|
3055
|
+
publishing
|
|
2887
3056
|
});
|
|
2888
3057
|
case "published":
|
|
2889
3058
|
return /* @__PURE__ */ React.createElement(Published, {
|
|
@@ -2921,6 +3090,7 @@ function CreatorPage({ context }) {
|
|
|
2921
3090
|
}, words.settings)), /* @__PURE__ */ React.createElement(Flow, {
|
|
2922
3091
|
context,
|
|
2923
3092
|
columns,
|
|
3093
|
+
publishing: publishing.length,
|
|
2924
3094
|
shown,
|
|
2925
3095
|
pick: setColumn
|
|
2926
3096
|
}), shown !== "data" && shown !== "talk" && /* @__PURE__ */ React.createElement(SeriesBar, {
|
|
@@ -2934,12 +3104,18 @@ function CreatorPage({ context }) {
|
|
|
2934
3104
|
key: shown
|
|
2935
3105
|
}, body()));
|
|
2936
3106
|
}
|
|
2937
|
-
function Flow({
|
|
3107
|
+
function Flow({
|
|
3108
|
+
context,
|
|
3109
|
+
columns,
|
|
3110
|
+
publishing,
|
|
3111
|
+
shown,
|
|
3112
|
+
pick
|
|
3113
|
+
}) {
|
|
2938
3114
|
const { pi } = context;
|
|
2939
3115
|
const state = useStore(context.store);
|
|
2940
3116
|
const words = useWords(pi);
|
|
2941
3117
|
const now = Date.now();
|
|
2942
|
-
const waiting = columns.review.
|
|
3118
|
+
const waiting = columns.review.length;
|
|
2943
3119
|
const thisWeek = columns.published.filter((one) => CreatorUtil.publishedAt(one) >= new Date(`${CreatorUtil.weekOf(now)}T00:00:00`).getTime()).length;
|
|
2944
3120
|
const materials = columns.making.filter((one) => one.stage === "materials").length;
|
|
2945
3121
|
const making = columns.making.filter((one) => one.stage === "making");
|
|
@@ -2949,7 +3125,7 @@ function Flow({ context, columns, shown, pick }) {
|
|
|
2949
3125
|
const hint = {
|
|
2950
3126
|
topic: state.settings.series.length ? format(words.flowSeries, { n: state.settings.series.length }) : words.findNow,
|
|
2951
3127
|
making: materials ? format(words.flowMaterials, { n: materials }) : step ? `${words[step]} · ${making[0].title}` : making.length ? words.doneAll : words.flowNone,
|
|
2952
|
-
review: waiting ? format(words.flowWaiting, { n: waiting }) :
|
|
3128
|
+
review: waiting ? format(words.flowWaiting, { n: waiting }) : publishing ? format(words.flowPublishing, { n: publishing }) : words.flowNone,
|
|
2953
3129
|
published: format(words.flowWeek, { n: thisWeek }),
|
|
2954
3130
|
talk: answers ? format(words.flowDrafts, { n: answers }) : format(words.flowComments, { n: state.comments.length }),
|
|
2955
3131
|
data: last ? `${words.lastWeek} ${short(last.platforms.reduce((all, one) => all + one.views, 0), pi.ui.language)}` : words.flowMonday
|
|
@@ -3265,7 +3441,7 @@ function Making({ context, items }) {
|
|
|
3265
3441
|
stage: "materials"
|
|
3266
3442
|
}));
|
|
3267
3443
|
}
|
|
3268
|
-
function Reviews({ context, items }) {
|
|
3444
|
+
function Reviews({ context, items, publishing }) {
|
|
3269
3445
|
const { pi } = context;
|
|
3270
3446
|
const words = useWords(pi);
|
|
3271
3447
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, !items.length && /* @__PURE__ */ React.createElement(Empty, {
|
|
@@ -3278,7 +3454,21 @@ function Reviews({ context, items }) {
|
|
|
3278
3454
|
context,
|
|
3279
3455
|
item,
|
|
3280
3456
|
onRemove: () => remove(context, item)
|
|
3281
|
-
}))), /* @__PURE__ */ React.createElement(
|
|
3457
|
+
}))), !!publishing.length && /* @__PURE__ */ React.createElement("div", {
|
|
3458
|
+
className: "tcre-section"
|
|
3459
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
3460
|
+
className: "tcre-section-head"
|
|
3461
|
+
}, /* @__PURE__ */ React.createElement("i", null), /* @__PURE__ */ React.createElement("span", {
|
|
3462
|
+
className: "tcre-section-name"
|
|
3463
|
+
}, words.publishingHead), /* @__PURE__ */ React.createElement("span", {
|
|
3464
|
+
className: "tcre-section-about"
|
|
3465
|
+
}, words.publishingAbout)), /* @__PURE__ */ React.createElement("div", {
|
|
3466
|
+
className: "tcre-grid tcre-grid-wide"
|
|
3467
|
+
}, publishing.map((item) => /* @__PURE__ */ React.createElement(ReviewCard, {
|
|
3468
|
+
key: item.id,
|
|
3469
|
+
context,
|
|
3470
|
+
item
|
|
3471
|
+
})))), /* @__PURE__ */ React.createElement(Removed, {
|
|
3282
3472
|
context,
|
|
3283
3473
|
stage: "review"
|
|
3284
3474
|
}));
|
|
@@ -3552,6 +3742,7 @@ button.tcre-pill:hover { background: var(--ta-hover); }
|
|
|
3552
3742
|
.tcre-rule-actions { flex: none; display: flex; align-items: center; gap: 4px; }
|
|
3553
3743
|
.tcre-rule-add { display: flex; gap: 8px; margin-top: 10px; }
|
|
3554
3744
|
.tcre-rule-add .tcre-field { flex: 1; min-width: 0; }
|
|
3745
|
+
.tcre-phase-every { display: flex; margin: 0 0 10px; }
|
|
3555
3746
|
.tcre-phase { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--tcre-line); font-size: calc(13.5px * var(--ta-font-scale)); }
|
|
3556
3747
|
.tcre-phase:first-of-type { border-top: 0; }
|
|
3557
3748
|
.tcre-phase-when { flex: none; color: var(--ta-muted); font-variant-numeric: tabular-nums; font-size: calc(12px * var(--ta-font-scale)); }
|
|
@@ -3587,6 +3778,8 @@ button.tcre-pill:hover { background: var(--ta-hover); }
|
|
|
3587
3778
|
.tcre-bar-track i { display: block; height: 100%; min-width: 2px; border-radius: 4px; background: var(--ta-text); }
|
|
3588
3779
|
.tcre-bar-value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
3589
3780
|
.tcre-bar-note { grid-column: 2 / 4; color: var(--ta-muted); font-size: calc(11.5px * var(--ta-font-scale)); }
|
|
3781
|
+
.tcre-bar[data-plain], .tcre-home[data-compact] .tcre-bar[data-plain] { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 0; }
|
|
3782
|
+
.tcre-bar[data-plain] .tcre-bar-note { grid-column: auto; font-size: inherit; font-variant-numeric: tabular-nums; }
|
|
3590
3783
|
.tcre-line { display: block; width: 100%; height: 90px; overflow: visible; }
|
|
3591
3784
|
.tcre-line polyline { fill: none; stroke: #a855f7; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
|
|
3592
3785
|
.tcre-line-labels { display: flex; justify-content: space-between; margin-top: 4px; color: var(--ta-muted); font-size: calc(11px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }
|
|
@@ -3612,7 +3805,7 @@ button.tcre-pill:hover { background: var(--ta-hover); }
|
|
|
3612
3805
|
/* Settings. */
|
|
3613
3806
|
.tcre-setup { max-width: var(--ta-page-width); margin: 22px auto; }
|
|
3614
3807
|
.tcre-setup-title { font-size: calc(20px * var(--ta-font-scale)); font-weight: 650; margin: 0 2px 14px; }
|
|
3615
|
-
.tcre-setup-label { display: flex; align-items: baseline; gap: 10px; margin: 22px 2px 8px; color: var(--ta-text); font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 600; }
|
|
3808
|
+
.tcre-setup-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 22px 2px 8px; color: var(--ta-text); font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 600; }
|
|
3616
3809
|
.tcre-setup-label span { color: var(--ta-muted); font-weight: 400; font-size: calc(12px * var(--ta-font-scale)); }
|
|
3617
3810
|
.tcre-input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--ta-card); color: var(--ta-text); font: inherit; resize: none; outline: none; }
|
|
3618
3811
|
:root[data-theme='light'] .tcre-input { box-shadow: inset 0 0 0 1px var(--tcre-line); }
|
|
@@ -3626,6 +3819,12 @@ button.tcre-pill:hover { background: var(--ta-hover); }
|
|
|
3626
3819
|
.tcre-field-name { color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }
|
|
3627
3820
|
.tcre-toggle { flex: none; height: 26px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ta-muted); font: inherit; font-size: calc(12px * var(--ta-font-scale)); cursor: pointer; box-shadow: inset 0 0 0 1px var(--tcre-line); }
|
|
3628
3821
|
.tcre-toggle[aria-pressed='true'] { background: color-mix(in oklab, var(--tcre-c) 15%, transparent); color: var(--tcre-c); box-shadow: none; font-weight: 600; }
|
|
3822
|
+
[data-layout='compact'] .tcre-series-row { flex-wrap: wrap; row-gap: 6px; }
|
|
3823
|
+
[data-layout='compact'] .tcre-series-fields { flex-basis: calc(100% - 14px); }
|
|
3824
|
+
[data-layout='compact'] .tcre-series-row > i { align-self: flex-start; height: 44px; }
|
|
3825
|
+
[data-layout='compact'] .tcre-series-row > .tcre-tone-pick { margin-left: 14px; }
|
|
3826
|
+
.tcre-tone-pick { appearance: none; -webkit-appearance: none; max-width: 92px; padding: 0 10px; text-overflow: ellipsis; text-align: center; }
|
|
3827
|
+
.tcre-tone-pick[data-on='true'] { background: color-mix(in oklab, var(--tcre-c) 15%, transparent); color: var(--tcre-c); box-shadow: none; font-weight: 600; }
|
|
3629
3828
|
.tcre-series-add { display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 2px; border: 0; border-top: 1px solid var(--tcre-line); background: transparent; color: var(--ta-secondary); font: inherit; font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; }
|
|
3630
3829
|
.tcre-series-edit .tcre-series-add:first-child { border-top: 0; }
|
|
3631
3830
|
.tcre-pick { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
@@ -3668,7 +3867,7 @@ function activate(pi) {
|
|
|
3668
3867
|
items: () => {
|
|
3669
3868
|
const words = CreatorWords.of(pi.ui.language);
|
|
3670
3869
|
const columns = CreatorUtil.columns(store.state.items, Date.now());
|
|
3671
|
-
const waiting = columns.review.
|
|
3870
|
+
const waiting = columns.review.length;
|
|
3672
3871
|
const answers = drafts(store.state.comments).length;
|
|
3673
3872
|
const detail = waiting ? `${words.review} ${waiting}` : answers ? CreatorWords.format(words.flowDrafts, { n: answers }) : columns.topic[0] ? `${words.topic} · ${columns.topic[0].title}` : store.state.settings.niche || words.sub;
|
|
3674
3873
|
return [
|