@celljs/ta-creator 4.32.0 → 4.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/web/index.js CHANGED
@@ -14,11 +14,13 @@ var Keys;
14
14
  Keys.ITEMS = "items";
15
15
  Keys.WEEKS = "weeks";
16
16
  Keys.TASKS = "tasks";
17
+ Keys.INSIGHTS = "insights";
17
18
  })(Keys ||= {});
18
19
  var STAGES = ["topic", "making", "review", "published"];
19
20
  var FORMS = ["video", "post"];
20
21
  var KINDS = ["hot", "howto", "explain"];
21
22
  var STEPS = ["script", "visuals", "voice", "captions", "versions", "checks"];
23
+ var SERIES_COLORS = ["#22c55e", "#f97316", "#3b82f6", "#a855f7", "#ec4899", "#14b8a6", "#eab308", "#64748b"];
22
24
  var ASPECTS = ["16:9", "9:16", "3:4", "1:1"];
23
25
  var PLATFORMS = [
24
26
  {
@@ -103,10 +105,37 @@ var CreatorUtil;
103
105
  sources: Array.isArray(kept.sources) ? kept.sources.map(source).filter((one) => !!one) : [...SOURCES],
104
106
  ...goal && time(goal.from) ? { goal: { from: time(goal.from), days: count(goal.days, 30), videos: count(goal.videos, 0), posts: count(goal.posts, 0) } } : {},
105
107
  minutesCap: count(kept.minutesCap, 120),
106
- voice: text(kept.voice, 60) || "zh-CN-XiaoxiaoNeural"
108
+ voice: text(kept.voice, 60) || "zh-CN-XiaoxiaoNeural",
109
+ series: Array.isArray(kept.series) ? seriesOf(kept.series) : []
107
110
  };
108
111
  }
109
112
  CreatorUtil.settings = settings;
113
+ function seriesOf(values) {
114
+ const all = [];
115
+ for (const value of values) {
116
+ const kept = object(value);
117
+ const name = text(kept?.name, 40);
118
+ if (!kept || !name) {
119
+ continue;
120
+ }
121
+ const id = text(kept.id, 60) || `s${hash(name)}`;
122
+ if (all.some((one) => one.id === id)) {
123
+ continue;
124
+ }
125
+ const about = text(kept.about, 200);
126
+ const perWeek = count(kept.perWeek, 0);
127
+ all.push({
128
+ id,
129
+ name,
130
+ ...about ? { about } : {},
131
+ color: text(kept.color, 40) || SERIES_COLORS[all.length % SERIES_COLORS.length],
132
+ ...kept.ordered === true ? { ordered: true } : {},
133
+ ...perWeek ? { perWeek: Math.min(perWeek, 14) } : {}
134
+ });
135
+ }
136
+ return all.slice(0, 12);
137
+ }
138
+ CreatorUtil.seriesOf = seriesOf;
110
139
  function platform(value) {
111
140
  const kept = object(value);
112
141
  const id = text(kept?.id, 60);
@@ -156,6 +185,8 @@ var CreatorUtil;
156
185
  form: oneOf(FORMS, kept.form, "video"),
157
186
  kind: oneOf(KINDS, kept.kind, "howto"),
158
187
  stage: oneOf(STAGES, kept.stage, "topic"),
188
+ ...text(kept.series, 60) ? { series: text(kept.series, 60) } : {},
189
+ ...count(kept.number, 0) ? { number: count(kept.number, 0) } : {},
159
190
  ...text(kept.why, 300) ? { why: text(kept.why, 300) } : {},
160
191
  ...typeof kept.heat === "number" ? { heat: Math.max(0, Math.min(100, Math.round(kept.heat))) } : {},
161
192
  ...time(kept.until) ? { until: time(kept.until) } : {},
@@ -175,6 +206,7 @@ var CreatorUtil;
175
206
  ...text(kept.session, 1000) ? { session: text(kept.session, 1000) } : {},
176
207
  ...time(kept.approved) ? { approved: time(kept.approved) } : {},
177
208
  ...Array.isArray(kept.links) ? { links: kept.links.map(link).filter((one) => !!one) } : {},
209
+ ...Array.isArray(kept.stats) ? { stats: kept.stats.map(stat).filter((one) => !!one) } : {},
178
210
  ...kept.dropped === true ? { dropped: true } : {},
179
211
  at,
180
212
  changedAt: time(kept.changedAt) ?? at
@@ -221,13 +253,15 @@ var CreatorUtil;
221
253
  return Math.min(...(item2.links ?? []).map((one) => one.at), item2.changedAt);
222
254
  }
223
255
  CreatorUtil.publishedAt = publishedAt;
224
- function addTopics(items2, topics, now, id) {
256
+ function addTopics(items2, topics, now, id, series = []) {
225
257
  const key = (title) => title.toLowerCase().replace(/[\s\p{P}]+/gu, "");
226
258
  const titles = new Set(items2.map((one) => key(one.title)));
227
259
  const origins = new Set(items2.map((one) => one.origin?.url).filter(Boolean));
228
260
  const added = [];
229
261
  for (const topic of topics) {
230
- const made = item({ ...topic, id: id(), stage: "topic", at: now, changedAt: now });
262
+ const of = seriesNamed(series, topic.series);
263
+ const number = of?.ordered ? count(topic.number, 0) || nextNumber([...items2, ...added], of.id) : undefined;
264
+ const made = item({ ...topic, series: of?.id, number, id: id(), stage: "topic", at: now, changedAt: now });
231
265
  if (!made || titles.has(key(made.title)) || made.origin && origins.has(made.origin.url)) {
232
266
  continue;
233
267
  }
@@ -256,6 +290,101 @@ var CreatorUtil;
256
290
  return items2.map((one, index) => index === at ? changed : one);
257
291
  }
258
292
  CreatorUtil.change = change;
293
+ function seriesNamed(series, value) {
294
+ const key = text(value, 60).toLowerCase();
295
+ return key ? series.find((one) => one.id.toLowerCase() === key || one.name.toLowerCase() === key) : undefined;
296
+ }
297
+ CreatorUtil.seriesNamed = seriesNamed;
298
+ function nextNumber(items2, series) {
299
+ return items2.filter((one) => one.series === series).reduce((most, one) => Math.max(most, one.number ?? 0), 0) + 1;
300
+ }
301
+ CreatorUtil.nextNumber = nextNumber;
302
+ function removed(items2, stage) {
303
+ return items2.filter((one) => one.dropped && one.stage === stage && stage !== "published").sort((a, b) => b.changedAt - a.changedAt);
304
+ }
305
+ CreatorUtil.removed = removed;
306
+ function bySeries(items2, series) {
307
+ const known = new Set(series.map((one) => one.id));
308
+ const groups = series.map((one) => {
309
+ const of = items2.filter((item2) => item2.series === one.id);
310
+ return { series: one, items: one.ordered ? [...of].sort((a, b) => (a.number ?? 1e9) - (b.number ?? 1e9)) : of };
311
+ });
312
+ const rest = items2.filter((item2) => !item2.series || !known.has(item2.series));
313
+ return [...groups, ...rest.length ? [{ items: rest }] : []];
314
+ }
315
+ CreatorUtil.bySeries = bySeries;
316
+ function views(item2) {
317
+ return item2.stats?.length ? item2.stats.reduce((all, one) => all + one.views, 0) : undefined;
318
+ }
319
+ CreatorUtil.views = views;
320
+ function analysis(items2, settings2) {
321
+ const published = items2.filter((one) => one.stage === "published" && !one.dropped);
322
+ const measured = published.filter((one) => one.stats?.length);
323
+ const group = (key, of) => {
324
+ const read = of.filter((one) => one.stats?.length);
325
+ const total = read.reduce((all, one) => all + (views(one) ?? 0), 0);
326
+ const watched = read.flatMap((one) => (one.stats ?? []).filter((stat2) => stat2.completion !== undefined));
327
+ const weight = watched.reduce((all, one) => all + Math.max(1, one.views), 0);
328
+ return {
329
+ key,
330
+ count: of.length,
331
+ measured: read.length,
332
+ views: total,
333
+ average: read.length ? Math.round(total / read.length) : 0,
334
+ ...watched.length ? { completion: watched.reduce((all, one) => all + (one.completion ?? 0) * Math.max(1, one.views), 0) / weight } : {}
335
+ };
336
+ };
337
+ const known = new Set(settings2.series.map((one) => one.id));
338
+ const none = published.filter((one) => !one.series || !known.has(one.series));
339
+ const platforms = [...new Set(measured.flatMap((one) => (one.stats ?? []).map((stat2) => stat2.platform)))].map((platform2) => {
340
+ const stats = measured.flatMap((one) => (one.stats ?? []).filter((stat2) => stat2.platform === platform2));
341
+ const total = stats.reduce((all, one) => all + one.views, 0);
342
+ return { key: platform2, count: stats.length, measured: stats.length, views: total, average: stats.length ? Math.round(total / stats.length) : 0 };
343
+ });
344
+ return {
345
+ published: published.length,
346
+ measured: measured.length,
347
+ views: measured.reduce((all, one) => all + (views(one) ?? 0), 0),
348
+ series: [
349
+ ...settings2.series.map((one) => group(one.id, published.filter((item2) => item2.series === one.id))),
350
+ ...none.length ? [group("", none)] : []
351
+ ],
352
+ kinds: KINDS.map((kind) => group(kind, published.filter((one) => one.kind === kind))).filter((one) => one.count),
353
+ forms: FORMS.map((form) => group(form, published.filter((one) => one.form === form))).filter((one) => one.count),
354
+ platforms: platforms.sort((a, b) => b.views - a.views),
355
+ top: measured.map((item2) => ({ item: item2, views: views(item2) ?? 0 })).sort((a, b) => b.views - a.views).slice(0, 5)
356
+ };
357
+ }
358
+ CreatorUtil.analysis = analysis;
359
+ function setStats(items2, id, stats, now) {
360
+ const read = stats.map((one) => stat({ at: now, ...object(one) ?? {} })).filter((one) => !!one);
361
+ const before = items2.find((one) => one.id === id);
362
+ if (!before) {
363
+ throw new Error(`No such piece: ${id}.`);
364
+ }
365
+ const kept = (before.stats ?? []).filter((one) => !read.some((it) => it.platform === one.platform));
366
+ return change(items2, id, { stats: [...kept, ...read] }, now);
367
+ }
368
+ CreatorUtil.setStats = setStats;
369
+ function insights(value) {
370
+ return (Array.isArray(value) ? value : []).map((one) => object(one)).filter((one) => !!one && !!text(one.text, 300) && !!time(one.at)).map((one) => ({
371
+ text: text(one.text, 300),
372
+ tone: oneOf(["good", "bad", "idea"], one.tone, "idea"),
373
+ ...text(one.series, 60) ? { series: text(one.series, 60) } : {},
374
+ at: time(one.at)
375
+ })).sort((a, b) => b.at - a.at).slice(0, 30);
376
+ }
377
+ CreatorUtil.insights = insights;
378
+ function addInsights(kept, added, series, now) {
379
+ const read = added.map((one) => typeof one === "string" ? { text: one } : object(one)).filter((one) => !!one).map((one) => ({ ...one, series: seriesNamed(series, one.series)?.id, at: now }));
380
+ return insights([...read, ...kept]);
381
+ }
382
+ CreatorUtil.addInsights = addInsights;
383
+ function latestInsights(insights2) {
384
+ const newest = insights2[0]?.at ?? 0;
385
+ return insights2.filter((one) => newest - one.at < DAY);
386
+ }
387
+ CreatorUtil.latestInsights = latestInsights;
259
388
  function progress(items2, goal, now) {
260
389
  if (!goal) {
261
390
  return;
@@ -329,6 +458,30 @@ var CreatorUtil;
329
458
  const href = url(kept?.url);
330
459
  return kept && href && text(kept.platform, 60) ? { platform: text(kept.platform, 60), url: href, at: time(kept.at) ?? Date.now() } : undefined;
331
460
  }
461
+ function stat(value) {
462
+ const kept = object(value);
463
+ const platform2 = text(kept?.platform, 60);
464
+ if (!kept || !platform2 || typeof kept.views !== "number") {
465
+ return;
466
+ }
467
+ const optional = (key) => typeof kept[key] === "number" ? { [key]: count(kept[key], 0) } : {};
468
+ return {
469
+ platform: platform2,
470
+ views: count(kept.views, 0),
471
+ ...optional("likes"),
472
+ ...optional("comments"),
473
+ ...optional("follows"),
474
+ ...typeof kept.completion === "number" && Number.isFinite(kept.completion) ? { completion: Math.max(0, Math.min(1, kept.completion)) } : {},
475
+ at: time(kept.at) ?? Date.now()
476
+ };
477
+ }
478
+ function hash(value) {
479
+ let h = 0;
480
+ for (const char of value) {
481
+ h = Math.imul(h, 31) + (char.codePointAt(0) ?? 0) | 0;
482
+ }
483
+ return (h >>> 0).toString(36);
484
+ }
332
485
  function source(value) {
333
486
  const kept = object(value);
334
487
  const href = url(kept?.url);
@@ -413,10 +566,8 @@ var EN = {
413
566
  reviewEmpty: "Nothing waits for you",
414
567
  publishedEmpty: "Nothing published yet",
415
568
  open: "Open",
416
- pass: "Pass, fill it in",
417
569
  change: "Change",
418
570
  changeAsk: "What should change?",
419
- approved: "Passed: Ta fills in the pages, you press Publish",
420
571
  views: "Views",
421
572
  follows: "New followers",
422
573
  minutes: "Your time this week",
@@ -435,8 +586,61 @@ var EN = {
435
586
  failed: "Did not work: {error}",
436
587
  makePrompt: "Make this piece: {title} ({id})",
437
588
  findPrompt: "Find hot topics for my channel now",
438
- passPrompt: "Passed: fill in the publishing pages of {id}, stopping before Publish",
439
- changePrompt: "Change {id}: {note}"
589
+ changePrompt: "Change {id}: {note}",
590
+ all: "All",
591
+ seriesNone: "No series",
592
+ seriesLabel: "Series",
593
+ seriesHint: "Run several at once: topics are found and reviewed series by series",
594
+ seriesName: "Name",
595
+ seriesAbout: "What it is about, for whom",
596
+ seriesOrdered: "A course, in order",
597
+ addSeries: "Add a series",
598
+ episode: "No. {n}",
599
+ seriesStat: "{published} published · {waiting} waiting",
600
+ remove: "Remove",
601
+ removeAsk: "Remove “{title}”?",
602
+ removeHint: "You can put it back from Removed below",
603
+ removedLabel: "Removed {n}",
604
+ restore: "Put back",
605
+ pass: "Pass, publish it",
606
+ approved: "Passed: Ta publishes it on each platform",
607
+ passPrompt: "Passed: publish {id} on each platform and keep the links",
608
+ doingScript: "Writing the script: a hook in the first 3 seconds",
609
+ doingVisuals: "Drawing the scenes: host, terminal, phone",
610
+ doingVoice: "Recording the voice, scene by scene",
611
+ doingCaptions: "Burning in the captions",
612
+ doingVersions: "Writing a title and words for each platform",
613
+ doingChecks: "Checking the AI label, privacy and length",
614
+ doneAll: "Made: waiting for your review",
615
+ flowSeries: "{n} series",
616
+ flowNone: "None yet",
617
+ flowWaiting: "{n} wait for you",
618
+ flowPassed: "Passed, publishing",
619
+ flowWeek: "{n} this week",
620
+ flowMonday: "Reviewed each Monday",
621
+ showAll: "Show all {n}",
622
+ showLess: "Show less",
623
+ openChat: "Open",
624
+ publishedCount: "Published",
625
+ totalViews: "Views, all",
626
+ lastWeek: "Views last week",
627
+ bySeries: "By series",
628
+ byKind: "By kind",
629
+ byForm: "By form",
630
+ byPlatform: "By platform",
631
+ perPiece: "views a piece",
632
+ completion: "watched {n}%",
633
+ pieces: "{n} pieces",
634
+ weekly: "Views by week",
635
+ top: "Did best",
636
+ insights: "What the review found",
637
+ insightsHint: "The next topics follow it",
638
+ noInsights: "After each Monday’s review, what it found shows here",
639
+ reviewNow: "Review now",
640
+ reviewPrompt: "Review my channel now: read the numbers of each piece on each platform, compare series, kinds and forms, and keep what you find for the topics to come",
641
+ viewsShort: "{n} views",
642
+ cancel: "Cancel",
643
+ noneYet: "Nothing published yet"
440
644
  };
441
645
  var ZH = {
442
646
  title: "创作者",
@@ -468,10 +672,8 @@ var ZH = {
468
672
  reviewEmpty: "没有等你审的",
469
673
  publishedEmpty: "还没有发布",
470
674
  open: "打开",
471
- pass: "通过,去发布",
472
675
  change: "改一句",
473
676
  changeAsk: "要改哪里?",
474
- approved: "已通过:Ta 填好发布页,你来点发布",
475
677
  views: "播放与浏览",
476
678
  follows: "新增关注",
477
679
  minutes: "本周花了你",
@@ -490,8 +692,61 @@ var ZH = {
490
692
  failed: "没做成:{error}",
491
693
  makePrompt: "做这条内容:{title}({id})",
492
694
  findPrompt: "现在给我的内容号找一批热点选题",
493
- passPrompt: "{id} 审过了:去各平台填好发布页,停在发布按钮前",
494
- changePrompt: "{id} 要改:{note}"
695
+ changePrompt: "{id} 要改:{note}",
696
+ all: "全部",
697
+ seriesNone: "未归入系列",
698
+ seriesLabel: "系列",
699
+ seriesHint: "同时做几个系列:选题按系列找,数据按系列复盘",
700
+ seriesName: "系列名",
701
+ seriesAbout: "讲什么、给谁看",
702
+ seriesOrdered: "由浅入深按期",
703
+ addSeries: "新系列",
704
+ episode: "第 {n} 期",
705
+ seriesStat: "已发 {published} · 待做 {waiting}",
706
+ remove: "删除",
707
+ removeAsk: "删除「{title}」?",
708
+ removeHint: "可以在下面的「已删除」里找回",
709
+ removedLabel: "已删除 {n}",
710
+ restore: "恢复",
711
+ pass: "通过,自动发布",
712
+ approved: "已通过:Ta 正在各平台发布",
713
+ passPrompt: "{id} 审过了:去各平台发布,发完记下链接",
714
+ doingScript: "写脚本:开头 3 秒抓住人",
715
+ doingVisuals: "画画面:主播、终端、手机",
716
+ doingVoice: "逐个场景配音",
717
+ doingCaptions: "把字幕烧进画面",
718
+ doingVersions: "按平台改写标题和文案",
719
+ doingChecks: "检查 AI 标识、隐私和时长",
720
+ doneAll: "做好了,等你审",
721
+ flowSeries: "{n} 个系列",
722
+ flowNone: "暂无",
723
+ flowWaiting: "{n} 条等你审",
724
+ flowPassed: "已通过,发布中",
725
+ flowWeek: "本周 {n} 条",
726
+ flowMonday: "每周一复盘",
727
+ showAll: "展开全部 {n}",
728
+ showLess: "收起",
729
+ openChat: "打开",
730
+ publishedCount: "已发布",
731
+ totalViews: "累计播放",
732
+ lastWeek: "上周播放",
733
+ bySeries: "按系列",
734
+ byKind: "按类型",
735
+ byForm: "按形式",
736
+ byPlatform: "按平台",
737
+ perPiece: "条均播放",
738
+ completion: "完播 {n}%",
739
+ pieces: "{n} 条",
740
+ weekly: "每周播放",
741
+ top: "表现最好",
742
+ insights: "复盘结论",
743
+ insightsHint: "下一批选题照着调",
744
+ noInsights: "每周一复盘后,结论会出现在这里",
745
+ reviewNow: "现在复盘",
746
+ reviewPrompt: "现在复盘我的内容号:读各平台每条内容的数据,按系列、类型、形式对比,把结论记下来用于后面的选题",
747
+ viewsShort: "{n} 播放",
748
+ cancel: "取消",
749
+ noneYet: "还没有发布"
495
750
  };
496
751
  var ZH_TW = {
497
752
  title: "創作者",
@@ -523,10 +778,8 @@ var ZH_TW = {
523
778
  reviewEmpty: "沒有等你審的",
524
779
  publishedEmpty: "還沒有發佈",
525
780
  open: "打開",
526
- pass: "通過,去發佈",
527
781
  change: "改一句",
528
782
  changeAsk: "要改哪裡?",
529
- approved: "已通過:Ta 填好發佈頁,你來點發佈",
530
783
  views: "播放與瀏覽",
531
784
  follows: "新增追蹤",
532
785
  minutes: "本週花了你",
@@ -545,8 +798,61 @@ var ZH_TW = {
545
798
  failed: "沒做成:{error}",
546
799
  makePrompt: "做這條內容:{title}({id})",
547
800
  findPrompt: "現在給我的內容號找一批熱點選題",
548
- passPrompt: "{id} 審過了:去各平台填好發佈頁,停在發佈按鈕前",
549
- changePrompt: "{id} 要改:{note}"
801
+ changePrompt: "{id} 要改:{note}",
802
+ all: "全部",
803
+ seriesNone: "未歸入系列",
804
+ seriesLabel: "系列",
805
+ seriesHint: "同時做幾個系列:選題按系列找,數據按系列複盤",
806
+ seriesName: "系列名",
807
+ seriesAbout: "講什麼、給誰看",
808
+ seriesOrdered: "由淺入深按期",
809
+ addSeries: "新系列",
810
+ episode: "第 {n} 期",
811
+ seriesStat: "已發 {published} · 待做 {waiting}",
812
+ remove: "刪除",
813
+ removeAsk: "刪除「{title}」?",
814
+ removeHint: "可以在下面的「已刪除」裡找回",
815
+ removedLabel: "已刪除 {n}",
816
+ restore: "恢復",
817
+ pass: "通過,自動發佈",
818
+ approved: "已通過:Ta 正在各平台發佈",
819
+ passPrompt: "{id} 審過了:去各平台發佈,發完記下連結",
820
+ doingScript: "寫腳本:開頭 3 秒抓住人",
821
+ doingVisuals: "畫畫面:主播、終端、手機",
822
+ doingVoice: "逐個場景配音",
823
+ doingCaptions: "把字幕燒進畫面",
824
+ doingVersions: "按平台改寫標題和文案",
825
+ doingChecks: "檢查 AI 標識、隱私和時長",
826
+ doneAll: "做好了,等你審",
827
+ flowSeries: "{n} 個系列",
828
+ flowNone: "暫無",
829
+ flowWaiting: "{n} 條等你審",
830
+ flowPassed: "已通過,發佈中",
831
+ flowWeek: "本週 {n} 條",
832
+ flowMonday: "每週一複盤",
833
+ showAll: "展開全部 {n}",
834
+ showLess: "收起",
835
+ openChat: "打開",
836
+ publishedCount: "已發佈",
837
+ totalViews: "累計播放",
838
+ lastWeek: "上週播放",
839
+ bySeries: "按系列",
840
+ byKind: "按類型",
841
+ byForm: "按形式",
842
+ byPlatform: "按平台",
843
+ perPiece: "條均播放",
844
+ completion: "完播 {n}%",
845
+ pieces: "{n} 條",
846
+ weekly: "每週播放",
847
+ top: "表現最好",
848
+ insights: "複盤結論",
849
+ insightsHint: "下一批選題照著調",
850
+ noInsights: "每週一複盤後,結論會出現在這裡",
851
+ reviewNow: "現在複盤",
852
+ reviewPrompt: "現在複盤我的內容號:讀各平台每條內容的數據,按系列、類型、形式對比,把結論記下來用於後面的選題",
853
+ viewsShort: "{n} 播放",
854
+ cancel: "取消",
855
+ noneYet: "還沒有發佈"
550
856
  };
551
857
  var JA = {
552
858
  title: "クリエイター",
@@ -578,10 +884,8 @@ var JA = {
578
884
  reviewEmpty: "確認待ちはありません",
579
885
  publishedEmpty: "まだ公開していません",
580
886
  open: "開く",
581
- pass: "OK、投稿へ",
582
887
  change: "直す",
583
888
  changeAsk: "どこを直しますか?",
584
- approved: "OK 済み:Ta が投稿ページに入力し、投稿はあなたが押します",
585
889
  views: "再生と閲覧",
586
890
  follows: "新規フォロワー",
587
891
  minutes: "今週かかった時間",
@@ -600,8 +904,61 @@ var JA = {
600
904
  failed: "できませんでした:{error}",
601
905
  makePrompt: "このコンテンツを作って:{title}({id})",
602
906
  findPrompt: "私のチャンネル向けに今の話題からネタを探して",
603
- passPrompt: "{id} は確認済み:各プラットフォームの投稿ページに入力し、投稿ボタンの手前で止めて",
604
- changePrompt: "{id} を直して:{note}"
907
+ changePrompt: "{id} を直して:{note}",
908
+ all: "すべて",
909
+ seriesNone: "シリーズなし",
910
+ seriesLabel: "シリーズ",
911
+ seriesHint: "複数のシリーズを同時に:ネタ探しも振り返りもシリーズごと",
912
+ seriesName: "シリーズ名",
913
+ seriesAbout: "何を、誰に向けて",
914
+ seriesOrdered: "順に深める連載",
915
+ addSeries: "新しいシリーズ",
916
+ episode: "第 {n} 回",
917
+ seriesStat: "公開 {published} · 待ち {waiting}",
918
+ remove: "削除",
919
+ removeAsk: "「{title}」を削除しますか?",
920
+ removeHint: "下の「削除済み」から戻せます",
921
+ removedLabel: "削除済み {n}",
922
+ restore: "戻す",
923
+ pass: "OK、自動で投稿",
924
+ approved: "OK 済み:Ta が各プラットフォームに投稿中",
925
+ passPrompt: "{id} は確認済み:各プラットフォームに投稿し、リンクを記録して",
926
+ doingScript: "台本:最初の 3 秒でつかむ",
927
+ doingVisuals: "映像:ホスト、ターミナル、スマホ",
928
+ doingVoice: "シーンごとにナレーション",
929
+ doingCaptions: "字幕を焼き込む",
930
+ doingVersions: "プラットフォームごとにタイトルと文面",
931
+ doingChecks: "AI 表示、個人情報、長さを確認",
932
+ doneAll: "完成、確認待ち",
933
+ flowSeries: "{n} シリーズ",
934
+ flowNone: "なし",
935
+ flowWaiting: "{n} 件が確認待ち",
936
+ flowPassed: "OK 済み、投稿中",
937
+ flowWeek: "今週 {n} 件",
938
+ flowMonday: "毎週月曜に振り返り",
939
+ showAll: "すべて表示 {n}",
940
+ showLess: "閉じる",
941
+ openChat: "開く",
942
+ publishedCount: "公開済み",
943
+ totalViews: "累計再生",
944
+ lastWeek: "先週の再生",
945
+ bySeries: "シリーズ別",
946
+ byKind: "種類別",
947
+ byForm: "形式別",
948
+ byPlatform: "プラットフォーム別",
949
+ perPiece: "1 件あたり再生",
950
+ completion: "完走 {n}%",
951
+ pieces: "{n} 件",
952
+ weekly: "週ごとの再生",
953
+ top: "好調だったもの",
954
+ insights: "振り返りの結論",
955
+ insightsHint: "次のネタはこれに沿って",
956
+ noInsights: "毎週月曜の振り返りのあと、結論がここに出ます",
957
+ reviewNow: "今すぐ振り返る",
958
+ reviewPrompt: "私のチャンネルを今すぐ振り返って:各プラットフォームの各コンテンツのデータを読み、シリーズ・種類・形式で比べ、結論を今後のネタ選びのために記録して",
959
+ viewsShort: "{n} 再生",
960
+ cancel: "キャンセル",
961
+ noneYet: "まだ公開なし"
605
962
  };
606
963
  var WORDS = { "zh-CN": ZH, "zh-TW": ZH_TW, "en-US": EN, "ja-JP": JA };
607
964
  var CreatorWords;
@@ -669,18 +1026,93 @@ function PlatformName({ platform, bare }) {
669
1026
  style: { background: platform.color }
670
1027
  }), !bare && platform.name);
671
1028
  }
672
- function Steps({ item, words }) {
1029
+ var STEP_ICONS = { script: "FileText", visuals: "Image", voice: "Mic", captions: "Text", versions: "Columns2", checks: "ShieldCheck" };
1030
+ var DOING = {
1031
+ script: "doingScript",
1032
+ visuals: "doingVisuals",
1033
+ voice: "doingVoice",
1034
+ captions: "doingCaptions",
1035
+ versions: "doingVersions",
1036
+ checks: "doingChecks"
1037
+ };
1038
+ function stepOf(item) {
673
1039
  const done = new Set(item.done ?? []);
674
- const next = STEPS.find((step) => !done.has(step));
675
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
676
- className: "tcre-steps",
677
- "aria-hidden": true
678
- }, STEPS.map((step) => /* @__PURE__ */ React.createElement("i", {
679
- key: step,
680
- "data-state": done.has(step) ? "done" : step === next ? "now" : undefined
681
- }))), /* @__PURE__ */ React.createElement("div", {
682
- className: "tcre-steps-label"
683
- }, /* @__PURE__ */ React.createElement("span", null, STEPS.map((step) => words[step]).join(" · ")), /* @__PURE__ */ React.createElement("span", null, next ? words[next] : words.review)));
1040
+ return STEPS.find((step) => !done.has(step));
1041
+ }
1042
+ function doing(words, step) {
1043
+ return step ? words[DOING[step]] : words.doneAll;
1044
+ }
1045
+ function Pipeline({ pi, item, words, color }) {
1046
+ const done = new Set(item.done ?? []);
1047
+ const now = stepOf(item);
1048
+ const { Check } = pi.ui.icons;
1049
+ return /* @__PURE__ */ React.createElement("div", {
1050
+ className: "tcre-pipe-wrap",
1051
+ style: color ? { "--tcre-c": color } : undefined
1052
+ }, /* @__PURE__ */ React.createElement("ol", {
1053
+ className: "tcre-pipe"
1054
+ }, STEPS.map((step) => {
1055
+ const Icon = pi.ui.icons[STEP_ICONS[step]];
1056
+ const state = done.has(step) ? "done" : step === now ? "now" : "todo";
1057
+ return /* @__PURE__ */ React.createElement("li", {
1058
+ key: step,
1059
+ "data-state": state
1060
+ }, /* @__PURE__ */ React.createElement("span", {
1061
+ className: "tcre-pipe-dot"
1062
+ }, state === "done" ? /* @__PURE__ */ React.createElement(Check, {
1063
+ size: 14,
1064
+ strokeWidth: 3
1065
+ }) : Icon && /* @__PURE__ */ React.createElement(Icon, {
1066
+ size: 15
1067
+ })), /* @__PURE__ */ React.createElement("span", {
1068
+ className: "tcre-pipe-label"
1069
+ }, words[step]));
1070
+ })), /* @__PURE__ */ React.createElement("div", {
1071
+ className: "tcre-pipe-now",
1072
+ "data-done": now ? undefined : true
1073
+ }, now && /* @__PURE__ */ React.createElement("i", {
1074
+ className: "tcre-pulse"
1075
+ }), doing(words, now)));
1076
+ }
1077
+ function SeriesTag({ series, number, words }) {
1078
+ if (!series && !number) {
1079
+ return null;
1080
+ }
1081
+ return /* @__PURE__ */ React.createElement("span", {
1082
+ className: "tcre-series-tag",
1083
+ style: series ? { "--tcre-c": series.color } : undefined
1084
+ }, series && /* @__PURE__ */ React.createElement("i", null), series?.name, number ? /* @__PURE__ */ React.createElement("b", null, format(words.episode, { n: number })) : null);
1085
+ }
1086
+ function seriesOf(context, id) {
1087
+ return id ? context.store.state.settings.series.find((one) => one.id === id) : undefined;
1088
+ }
1089
+ function IconButton({ pi, icon, label, onClick }) {
1090
+ const Icon = pi.ui.icons[icon];
1091
+ const [busy, run] = pi.ui.useBusy();
1092
+ return /* @__PURE__ */ React.createElement("button", {
1093
+ type: "button",
1094
+ className: "tcre-icon",
1095
+ "aria-label": label,
1096
+ title: label,
1097
+ disabled: busy,
1098
+ onClick: (event) => {
1099
+ event.stopPropagation();
1100
+ run(() => Promise.resolve().then(onClick).catch(failed(pi)));
1101
+ }
1102
+ }, Icon && /* @__PURE__ */ React.createElement(Icon, {
1103
+ size: 15
1104
+ }));
1105
+ }
1106
+ async function remove(context, item) {
1107
+ const { pi, store } = context;
1108
+ const words = useWordsOf(pi);
1109
+ if (item.stage !== "topic") {
1110
+ const sure = await pi.ui.confirm(format(words.removeAsk, { title: item.title }), words.removeHint, { confirmLabel: words.remove, danger: true });
1111
+ if (!sure) {
1112
+ return;
1113
+ }
1114
+ }
1115
+ await store.call("remove", item.id);
684
1116
  }
685
1117
  function short(n, language) {
686
1118
  return new Intl.NumberFormat(language, { notation: n >= 1e4 ? "compact" : "standard", maximumFractionDigits: 1 }).format(n);
@@ -749,9 +1181,15 @@ function Preview({ context, version }) {
749
1181
  className: "tcre-count"
750
1182
  }, "1/", version.files.length));
751
1183
  }
752
- function ReviewCard({ context, item, send }) {
1184
+ function ReviewCard({
1185
+ context,
1186
+ item,
1187
+ send,
1188
+ onRemove
1189
+ }) {
753
1190
  const { pi, store } = context;
754
1191
  const words = useWords(pi);
1192
+ const [more, setMore] = React.useState(false);
755
1193
  const versions = item.versions ?? [];
756
1194
  const [shown, setShown] = React.useState(0);
757
1195
  const opened = React.useRef(Date.now());
@@ -779,7 +1217,20 @@ function ReviewCard({ context, item, send }) {
779
1217
  };
780
1218
  return /* @__PURE__ */ React.createElement("div", {
781
1219
  className: "tcre-card tcre-review"
782
- }, /* @__PURE__ */ React.createElement(Preview, {
1220
+ }, (item.series || onRemove) && /* @__PURE__ */ React.createElement("div", {
1221
+ className: "tcre-review-head"
1222
+ }, /* @__PURE__ */ React.createElement(SeriesTag, {
1223
+ series: seriesOf(context, item.series),
1224
+ number: item.number,
1225
+ words
1226
+ }), /* @__PURE__ */ React.createElement("span", {
1227
+ className: "tcre-grow"
1228
+ }), onRemove && /* @__PURE__ */ React.createElement(IconButton, {
1229
+ pi,
1230
+ icon: "Trash2",
1231
+ label: words.remove,
1232
+ onClick: onRemove
1233
+ })), /* @__PURE__ */ React.createElement(Preview, {
783
1234
  context,
784
1235
  version
785
1236
  }), versions.length > 1 && /* @__PURE__ */ React.createElement("div", {
@@ -796,8 +1247,11 @@ function ReviewCard({ context, item, send }) {
796
1247
  platform: platformOf(context, one.platform) ?? { id: one.platform, name: one.platform, color: "var(--ta-muted)" }
797
1248
  })))), /* @__PURE__ */ React.createElement("div", {
798
1249
  className: "tcre-review-title"
799
- }, version?.title || item.title), version?.text && /* @__PURE__ */ React.createElement("p", {
800
- className: "tcre-review-text"
1250
+ }, version?.title || item.title), version?.text && /* @__PURE__ */ React.createElement("button", {
1251
+ type: "button",
1252
+ className: "tcre-review-text",
1253
+ "data-open": more || undefined,
1254
+ onClick: () => setMore(!more)
801
1255
  }, version.text), !!version?.tags.length && /* @__PURE__ */ React.createElement("div", {
802
1256
  className: "tcre-tags"
803
1257
  }, version.tags.map((tag) => `#${tag}`).join(" ")), item.origin && /* @__PURE__ */ React.createElement("div", {
@@ -822,13 +1276,21 @@ function ReviewCard({ context, item, send }) {
822
1276
  }, words.pass)));
823
1277
  }
824
1278
  function reviewBlock(context) {
825
- return function Review({ code, closed, send }) {
1279
+ return function Review({ code, closed, send, conversation }) {
826
1280
  const state = useStore(context.store);
1281
+ const id = closed ? ReviewCode.id(code) : undefined;
1282
+ const item = id ? state.items.find((one) => one.id === id) : undefined;
1283
+ const bind2 = item && conversation && !item.session && item.stage === "review" ? item.id : undefined;
1284
+ React.useEffect(() => {
1285
+ if (bind2 && conversation) {
1286
+ context.store.call("update", bind2, { session: conversation }).catch(() => {
1287
+ return;
1288
+ });
1289
+ }
1290
+ }, [bind2, conversation]);
827
1291
  if (!closed) {
828
1292
  return null;
829
1293
  }
830
- const id = ReviewCode.id(code);
831
- const item = id ? state.items.find((one) => one.id === id) : undefined;
832
1294
  if (!item) {
833
1295
  return state.loaded ? /* @__PURE__ */ React.createElement("pre", null, code) : null;
834
1296
  }
@@ -853,11 +1315,11 @@ var ReviewCode;
853
1315
  })(ReviewCode ||= {});
854
1316
 
855
1317
  // web-src/creator-store.ts
856
- var KEYS = [Keys.SETTINGS, Keys.ITEMS, Keys.WEEKS];
1318
+ var KEYS = [Keys.SETTINGS, Keys.ITEMS, Keys.WEEKS, Keys.INSIGHTS];
857
1319
 
858
1320
  class CreatorStore {
859
1321
  pi;
860
- current = { loaded: false, settings: CreatorUtil.settings(undefined), items: [], weeks: [] };
1322
+ current = { loaded: false, settings: CreatorUtil.settings(undefined), items: [], weeks: [], insights: [] };
861
1323
  listeners = new Set;
862
1324
  constructor(pi) {
863
1325
  this.pi = pi;
@@ -878,8 +1340,14 @@ class CreatorStore {
878
1340
  return this.pi.callHost(method, ...params);
879
1341
  }
880
1342
  read() {
881
- Promise.all(KEYS.map((key) => this.pi.storage.get(key))).then(([settings, items, weeks]) => {
882
- const next = { loaded: true, settings: CreatorUtil.settings(settings), items: CreatorUtil.items(items), weeks: CreatorUtil.weeks(weeks) };
1343
+ Promise.all(KEYS.map((key) => this.pi.storage.get(key))).then(([settings, items, weeks, insights]) => {
1344
+ const next = {
1345
+ loaded: true,
1346
+ settings: CreatorUtil.settings(settings),
1347
+ items: CreatorUtil.items(items),
1348
+ weeks: CreatorUtil.weeks(weeks),
1349
+ insights: CreatorUtil.insights(insights)
1350
+ };
883
1351
  if (!this.current.loaded || JSON.stringify(next) !== JSON.stringify(this.current)) {
884
1352
  this.set(next);
885
1353
  }
@@ -893,8 +1361,301 @@ class CreatorStore {
893
1361
  }
894
1362
  }
895
1363
 
1364
+ // web-src/numbers.tsx
1365
+ function GroupBars({
1366
+ context,
1367
+ groups,
1368
+ label,
1369
+ wide
1370
+ }) {
1371
+ const { pi } = context;
1372
+ const words = useWords(pi);
1373
+ const most = Math.max(1, ...groups.map((one) => one.group.average));
1374
+ return /* @__PURE__ */ React.createElement("div", {
1375
+ className: wide ? "tcre-card tcre-panel tcre-wide" : "tcre-card tcre-panel"
1376
+ }, /* @__PURE__ */ React.createElement("div", {
1377
+ className: "tcre-panel-title"
1378
+ }, label, /* @__PURE__ */ React.createElement("span", {
1379
+ className: "tcre-muted"
1380
+ }, words.perPiece)), groups.map(({ group, name, color }) => /* @__PURE__ */ React.createElement("div", {
1381
+ key: group.key || name,
1382
+ className: "tcre-bar"
1383
+ }, /* @__PURE__ */ React.createElement("span", {
1384
+ className: "tcre-bar-label",
1385
+ title: name
1386
+ }, color && /* @__PURE__ */ React.createElement("i", {
1387
+ style: { background: color }
1388
+ }), name), /* @__PURE__ */ React.createElement("span", {
1389
+ className: "tcre-bar-track"
1390
+ }, group.average > 0 && /* @__PURE__ */ React.createElement("i", {
1391
+ style: { width: `${group.average / most * 100}%`, background: color }
1392
+ })), /* @__PURE__ */ React.createElement("span", {
1393
+ className: "tcre-bar-value"
1394
+ }, group.measured ? short(group.average, pi.ui.language) : "—"), /* @__PURE__ */ React.createElement("span", {
1395
+ className: "tcre-bar-note"
1396
+ }, group.count ? format(words.pieces, { n: group.count }) : words.noneYet, group.completion !== undefined ? ` · ${format(words.completion, { n: Math.round(group.completion * 100) })}` : ""))));
1397
+ }
1398
+ function WeekLine({ context }) {
1399
+ const state = useStore(context.store);
1400
+ const words = useWords(context.pi);
1401
+ const weeks = state.weeks.filter((one) => one.platforms.length).slice(-12);
1402
+ if (weeks.length < 2) {
1403
+ return null;
1404
+ }
1405
+ const values = weeks.map((week) => week.platforms.reduce((all, one) => all + one.views, 0));
1406
+ const most = Math.max(1, ...values);
1407
+ const points = values.map((value, at) => `${at / (values.length - 1) * 100},${36 - value / most * 32}`).join(" ");
1408
+ return /* @__PURE__ */ React.createElement("div", {
1409
+ className: "tcre-card tcre-panel"
1410
+ }, /* @__PURE__ */ React.createElement("div", {
1411
+ className: "tcre-panel-title"
1412
+ }, words.weekly), /* @__PURE__ */ React.createElement("svg", {
1413
+ className: "tcre-line",
1414
+ viewBox: "0 0 100 40",
1415
+ preserveAspectRatio: "none",
1416
+ "aria-hidden": true
1417
+ }, /* @__PURE__ */ React.createElement("polyline", {
1418
+ points,
1419
+ vectorEffect: "non-scaling-stroke"
1420
+ })), /* @__PURE__ */ React.createElement("div", {
1421
+ className: "tcre-line-labels"
1422
+ }, /* @__PURE__ */ React.createElement("span", null, weeks[0].week.slice(5)), /* @__PURE__ */ React.createElement("span", null, weeks[weeks.length - 1].week.slice(5))));
1423
+ }
1424
+ function Numbers({ context }) {
1425
+ const { pi } = context;
1426
+ const state = useStore(context.store);
1427
+ const words = useWords(pi);
1428
+ const now = Date.now();
1429
+ const thisWeek = CreatorUtil.weekOf(now);
1430
+ const weeks = state.weeks.filter((one) => one.week < thisWeek && one.platforms.length);
1431
+ const last = weeks[weeks.length - 1];
1432
+ const before = weeks[weeks.length - 2];
1433
+ const sum = (week, key) => (week?.platforms ?? []).reduce((all, one) => all + (one[key] ?? 0), 0);
1434
+ const delta = (a, b) => b > 0 ? `${a >= b ? "+" : ""}${Math.round((a - b) / b * 100)}%` : "";
1435
+ const analysis = CreatorUtil.analysis(state.items, state.settings);
1436
+ const progress = CreatorUtil.progress(state.items, state.settings.goal, now);
1437
+ const goal = state.settings.goal;
1438
+ const insights = CreatorUtil.latestInsights(state.insights);
1439
+ const { TrendingUp, TrendingDown, Lightbulb } = pi.ui.icons;
1440
+ const tones = { good: TrendingUp, bad: TrendingDown, idea: Lightbulb };
1441
+ const stats = [
1442
+ [words.publishedCount, String(analysis.published)],
1443
+ [words.totalViews, analysis.measured ? short(analysis.views, pi.ui.language) : "—"],
1444
+ [words.lastWeek, last ? short(sum(last, "views"), pi.ui.language) : "—", last && before ? delta(sum(last, "views"), sum(before, "views")) : undefined],
1445
+ [words.follows, last ? short(sum(last, "follows"), pi.ui.language) : "—"],
1446
+ [words.minutes, format(words.minutesValue, { n: CreatorUtil.minutes(state.weeks, now) })]
1447
+ ];
1448
+ const seriesGroups = analysis.series.map((group) => {
1449
+ const series = state.settings.series.find((one) => one.id === group.key);
1450
+ return { group, name: series?.name ?? words.seriesNone, color: series?.color ?? "var(--ta-muted)" };
1451
+ });
1452
+ return /* @__PURE__ */ React.createElement("div", {
1453
+ className: "tcre-data"
1454
+ }, /* @__PURE__ */ React.createElement("div", {
1455
+ className: "tcre-card tcre-kpis"
1456
+ }, stats.map(([label, value, change]) => /* @__PURE__ */ React.createElement("div", {
1457
+ key: label,
1458
+ className: "tcre-kpi",
1459
+ "data-none": value === "—" || undefined
1460
+ }, /* @__PURE__ */ React.createElement("b", null, value, change && /* @__PURE__ */ React.createElement("em", {
1461
+ "data-down": change.startsWith("-") || undefined
1462
+ }, change)), /* @__PURE__ */ React.createElement("span", null, label)))), /* @__PURE__ */ React.createElement("div", {
1463
+ className: "tcre-card tcre-panel tcre-insights"
1464
+ }, /* @__PURE__ */ React.createElement("div", {
1465
+ className: "tcre-panel-title"
1466
+ }, words.insights, /* @__PURE__ */ React.createElement("span", {
1467
+ className: "tcre-muted"
1468
+ }, words.insightsHint), /* @__PURE__ */ React.createElement("span", {
1469
+ className: "tcre-grow"
1470
+ }), /* @__PURE__ */ React.createElement(BusyButton, {
1471
+ pi,
1472
+ className: "tcre-secondary tcre-small",
1473
+ onClick: () => talk(pi, words.reviewNow, words.reviewPrompt)
1474
+ }, words.reviewNow)), insights.length ? insights.map((one) => {
1475
+ const Icon = tones[one.tone];
1476
+ const series = seriesOf(context, one.series);
1477
+ return /* @__PURE__ */ React.createElement("div", {
1478
+ key: one.at + one.text,
1479
+ className: "tcre-insight",
1480
+ "data-tone": one.tone
1481
+ }, /* @__PURE__ */ React.createElement("span", {
1482
+ className: "tcre-insight-icon"
1483
+ }, Icon && /* @__PURE__ */ React.createElement(Icon, {
1484
+ size: 14
1485
+ })), /* @__PURE__ */ React.createElement("span", null, series && /* @__PURE__ */ React.createElement(SeriesTag, {
1486
+ series,
1487
+ words
1488
+ }), one.text));
1489
+ }) : /* @__PURE__ */ React.createElement("div", {
1490
+ className: "tcre-muted tcre-pad"
1491
+ }, words.noInsights)), seriesGroups.length > 0 && /* @__PURE__ */ React.createElement(GroupBars, {
1492
+ context,
1493
+ label: words.bySeries,
1494
+ groups: seriesGroups,
1495
+ wide: true
1496
+ }), analysis.kinds.length > 0 && /* @__PURE__ */ React.createElement(GroupBars, {
1497
+ context,
1498
+ label: words.byKind,
1499
+ groups: analysis.kinds.map((group) => ({ group, name: words[group.key] }))
1500
+ }), analysis.forms.length > 0 && /* @__PURE__ */ React.createElement(GroupBars, {
1501
+ context,
1502
+ label: words.byForm,
1503
+ groups: analysis.forms.map((group) => ({ group, name: words[group.key] }))
1504
+ }), analysis.platforms.length > 0 && /* @__PURE__ */ React.createElement(GroupBars, {
1505
+ context,
1506
+ label: words.byPlatform,
1507
+ groups: analysis.platforms.map((group) => {
1508
+ const platform = platformOf(context, group.key);
1509
+ return { group, name: platform?.name ?? group.key, color: platform?.color };
1510
+ })
1511
+ }), /* @__PURE__ */ React.createElement(WeekLine, {
1512
+ context
1513
+ }), analysis.top.length > 0 && /* @__PURE__ */ React.createElement("div", {
1514
+ className: "tcre-card tcre-panel"
1515
+ }, /* @__PURE__ */ React.createElement("div", {
1516
+ className: "tcre-panel-title"
1517
+ }, words.top), analysis.top.map(({ item, views }, at) => /* @__PURE__ */ React.createElement("div", {
1518
+ key: item.id,
1519
+ className: "tcre-top-row"
1520
+ }, /* @__PURE__ */ React.createElement("b", null, at + 1), /* @__PURE__ */ React.createElement("span", {
1521
+ className: "tcre-top-title"
1522
+ }, item.title), /* @__PURE__ */ React.createElement(SeriesTag, {
1523
+ series: seriesOf(context, item.series),
1524
+ words
1525
+ }), /* @__PURE__ */ React.createElement("span", {
1526
+ className: "tcre-bar-value"
1527
+ }, short(views, pi.ui.language))))), goal && progress && /* @__PURE__ */ React.createElement("div", {
1528
+ className: "tcre-card tcre-panel tcre-goal"
1529
+ }, /* @__PURE__ */ React.createElement("div", {
1530
+ className: "tcre-panel-title"
1531
+ }, format(words.goal, { days: goal.days }), /* @__PURE__ */ React.createElement("span", {
1532
+ className: "tcre-grow"
1533
+ }), /* @__PURE__ */ React.createElement("span", {
1534
+ className: "tcre-muted"
1535
+ }, format(words.goalDay, { day: progress.day }))), [
1536
+ [words.video, progress.videos, goal.videos],
1537
+ [words.post, progress.posts, goal.posts]
1538
+ ].map(([label, made, aim]) => /* @__PURE__ */ React.createElement("div", {
1539
+ key: label
1540
+ }, /* @__PURE__ */ React.createElement("div", {
1541
+ className: "tcre-goal-row"
1542
+ }, /* @__PURE__ */ React.createElement("span", null, label), /* @__PURE__ */ React.createElement("span", {
1543
+ className: "tcre-muted"
1544
+ }, made, " / ", aim)), /* @__PURE__ */ React.createElement("div", {
1545
+ className: "tcre-goal-track"
1546
+ }, /* @__PURE__ */ React.createElement("i", {
1547
+ style: { width: `${aim ? Math.min(100, made / aim * 100) : 0}%` }
1548
+ }))))), !analysis.measured && !last && /* @__PURE__ */ React.createElement("div", {
1549
+ className: "tcre-muted tcre-pad tcre-data-note"
1550
+ }, words.noData));
1551
+ }
1552
+
1553
+ // web-src/setup.tsx
1554
+ function Setup({ context, done }) {
1555
+ const { pi, store } = context;
1556
+ const state = useStore(store);
1557
+ const words = useWords(pi);
1558
+ const [niche, setNiche] = React.useState(state.settings.niche);
1559
+ const [picked, setPicked] = React.useState(state.settings.picked);
1560
+ const [series, setSeries] = React.useState(state.settings.series);
1561
+ const { Trash2, Plus } = pi.ui.icons;
1562
+ const first = !state.settings.picked.length;
1563
+ const save = (goal) => store.call("setSettings", {
1564
+ niche: niche.trim(),
1565
+ picked,
1566
+ series: series.map((one) => ({ ...one, name: one.name.trim(), about: one.about?.trim() })).filter((one) => one.name),
1567
+ ...goal ? { goal: { from: Date.now(), days: 30, videos: 8, posts: 12 } } : {}
1568
+ }).then(done);
1569
+ const set = (at, patch) => setSeries(series.map((one, index) => index === at ? { ...one, ...patch } : one));
1570
+ const add = () => setSeries([...series, { id: `s${Date.now().toString(36)}`, name: "", color: SERIES_COLORS[series.length % SERIES_COLORS.length] }]);
1571
+ return /* @__PURE__ */ React.createElement("div", {
1572
+ className: "tcre-setup"
1573
+ }, /* @__PURE__ */ React.createElement("div", {
1574
+ className: "tcre-setup-title"
1575
+ }, words.setupTitle), /* @__PURE__ */ React.createElement("textarea", {
1576
+ className: "tcre-input",
1577
+ rows: 2,
1578
+ value: niche,
1579
+ placeholder: words.nicheHint,
1580
+ onChange: (event) => setNiche(event.target.value)
1581
+ }), /* @__PURE__ */ React.createElement("div", {
1582
+ className: "tcre-setup-label"
1583
+ }, words.seriesLabel, /* @__PURE__ */ React.createElement("span", null, words.seriesHint)), /* @__PURE__ */ React.createElement("div", {
1584
+ className: "tcre-card tcre-series-edit"
1585
+ }, series.map((one, at) => /* @__PURE__ */ React.createElement("div", {
1586
+ key: one.id,
1587
+ className: "tcre-series-row",
1588
+ style: { "--tcre-c": one.color }
1589
+ }, /* @__PURE__ */ React.createElement("i", null), /* @__PURE__ */ React.createElement("div", {
1590
+ className: "tcre-series-fields"
1591
+ }, /* @__PURE__ */ React.createElement("input", {
1592
+ className: "tcre-field tcre-field-name",
1593
+ value: one.name,
1594
+ placeholder: words.seriesName,
1595
+ onChange: (event) => set(at, { name: event.target.value })
1596
+ }), /* @__PURE__ */ React.createElement("input", {
1597
+ className: "tcre-field",
1598
+ value: one.about ?? "",
1599
+ placeholder: words.seriesAbout,
1600
+ onChange: (event) => set(at, { about: event.target.value })
1601
+ })), /* @__PURE__ */ React.createElement("button", {
1602
+ type: "button",
1603
+ className: "tcre-toggle",
1604
+ "aria-pressed": !!one.ordered,
1605
+ onClick: () => set(at, { ordered: !one.ordered })
1606
+ }, words.seriesOrdered), /* @__PURE__ */ React.createElement("button", {
1607
+ type: "button",
1608
+ className: "tcre-icon",
1609
+ "aria-label": words.remove,
1610
+ title: words.remove,
1611
+ onClick: () => setSeries(series.filter((_, index) => index !== at))
1612
+ }, /* @__PURE__ */ React.createElement(Trash2, {
1613
+ size: 15
1614
+ })))), /* @__PURE__ */ React.createElement("button", {
1615
+ type: "button",
1616
+ className: "tcre-series-add",
1617
+ onClick: add
1618
+ }, /* @__PURE__ */ React.createElement(Plus, {
1619
+ size: 15
1620
+ }), words.addSeries)), /* @__PURE__ */ React.createElement("div", {
1621
+ className: "tcre-setup-label"
1622
+ }, words.platformsLabel), /* @__PURE__ */ React.createElement("div", {
1623
+ className: "tcre-pick"
1624
+ }, state.settings.platforms.map((platform) => {
1625
+ const on = picked.includes(platform.id);
1626
+ return /* @__PURE__ */ React.createElement("button", {
1627
+ key: platform.id,
1628
+ type: "button",
1629
+ "aria-pressed": on,
1630
+ onClick: () => setPicked(on ? picked.filter((id) => id !== platform.id) : [...picked, platform.id])
1631
+ }, /* @__PURE__ */ React.createElement(PlatformName, {
1632
+ platform
1633
+ }));
1634
+ })), /* @__PURE__ */ React.createElement("div", {
1635
+ className: "tcre-buttons"
1636
+ }, !first && /* @__PURE__ */ React.createElement("button", {
1637
+ type: "button",
1638
+ className: "tcre-text",
1639
+ onClick: done
1640
+ }, words.cancel), /* @__PURE__ */ React.createElement("span", {
1641
+ className: "tcre-grow"
1642
+ }), !state.settings.goal && /* @__PURE__ */ React.createElement(BusyButton, {
1643
+ pi,
1644
+ className: "tcre-secondary",
1645
+ disabled: !picked.length,
1646
+ onClick: () => save(true)
1647
+ }, words.startGoal), /* @__PURE__ */ React.createElement(BusyButton, {
1648
+ pi,
1649
+ className: "tcre-primary",
1650
+ disabled: !picked.length,
1651
+ onClick: () => save(false)
1652
+ }, first ? words.start : words.save)));
1653
+ }
1654
+
896
1655
  // web-src/page.tsx
897
1656
  var COLUMNS = ["topic", "making", "review", "published", "data"];
1657
+ var COLUMN_ICONS = { topic: "Lightbulb", making: "Film", review: "Eye", published: "Send", data: "ChartColumn" };
1658
+ var FIRST = 6;
898
1659
  function CreatorHead({ context }) {
899
1660
  const state = useStore(context.store);
900
1661
  const words = useWords(context.pi);
@@ -911,7 +1672,9 @@ function CreatorPage({ context }) {
911
1672
  const state = useStore(context.store);
912
1673
  const words = useWords(pi);
913
1674
  const device = pi.ui.useDevice();
914
- const [column, setColumn] = React.useState("topic");
1675
+ const compact = device.layout === "compact";
1676
+ const [column, setColumn] = React.useState();
1677
+ const [series, setSeries] = React.useState("");
915
1678
  const [editing, setEditing] = React.useState(false);
916
1679
  if (!state.loaded) {
917
1680
  return /* @__PURE__ */ React.createElement(pi.ui.Loading, null);
@@ -925,20 +1688,19 @@ function CreatorPage({ context }) {
925
1688
  }));
926
1689
  }
927
1690
  const now = Date.now();
928
- const columns = CreatorUtil.columns(state.items, now);
929
- const counts = {
930
- topic: columns.topic.length,
931
- making: columns.making.length,
932
- review: columns.review.length,
933
- published: columns.published.length,
934
- data: undefined
935
- };
936
- const body = (one) => {
937
- switch (one) {
1691
+ const all = CreatorUtil.columns(state.items, now);
1692
+ const waiting = all.review.filter((one) => !one.approved).length;
1693
+ const shown = column ?? (waiting ? "review" : "topic");
1694
+ const known = state.settings.series.some((one) => one.id === series);
1695
+ const of = (items) => known ? items.filter((one) => one.series === series) : items;
1696
+ const columns = { topic: of(all.topic), making: of(all.making), review: of(all.review), published: of(all.published) };
1697
+ const body = () => {
1698
+ switch (shown) {
938
1699
  case "topic":
939
1700
  return /* @__PURE__ */ React.createElement(Topics, {
940
1701
  context,
941
- items: columns.topic
1702
+ items: columns.topic,
1703
+ series: known ? series : ""
942
1704
  });
943
1705
  case "making":
944
1706
  return /* @__PURE__ */ React.createElement(Making, {
@@ -946,13 +1708,9 @@ function CreatorPage({ context }) {
946
1708
  items: columns.making
947
1709
  });
948
1710
  case "review":
949
- return columns.review.length ? columns.review.map((item) => /* @__PURE__ */ React.createElement(ReviewCard, {
950
- key: item.id,
1711
+ return /* @__PURE__ */ React.createElement(Reviews, {
951
1712
  context,
952
- item
953
- })) : /* @__PURE__ */ React.createElement(Empty, {
954
- pi,
955
- text: words.reviewEmpty
1713
+ items: columns.review
956
1714
  });
957
1715
  case "published":
958
1716
  return /* @__PURE__ */ React.createElement(Published, {
@@ -961,55 +1719,130 @@ function CreatorPage({ context }) {
961
1719
  });
962
1720
  case "data":
963
1721
  return /* @__PURE__ */ React.createElement(Numbers, {
964
- context,
965
- board: device.layout !== "compact"
1722
+ context
966
1723
  });
967
1724
  }
968
1725
  };
969
- const settings = /* @__PURE__ */ React.createElement("button", {
970
- type: "button",
971
- className: "tcre-link",
972
- onClick: () => setEditing(true)
973
- }, words.settings);
974
- if (device.layout === "compact") {
975
- return /* @__PURE__ */ React.createElement("div", {
976
- className: "tcre-page"
977
- }, /* @__PURE__ */ React.createElement("div", {
978
- className: "ta-segmented tcre-seg",
979
- role: "tablist"
980
- }, COLUMNS.map((one) => /* @__PURE__ */ React.createElement("button", {
981
- key: one,
982
- type: "button",
983
- role: "tab",
984
- "aria-selected": one === column,
985
- className: one === column ? "ta-on" : undefined,
986
- onClick: () => setColumn(one)
987
- }, words[one], counts[one] ? /* @__PURE__ */ React.createElement("em", null, counts[one]) : null))), /* @__PURE__ */ React.createElement("div", {
988
- className: "tcre-col",
989
- key: column
990
- }, body(column)), /* @__PURE__ */ React.createElement("div", {
991
- className: "tcre-foot"
992
- }, settings));
993
- }
994
1726
  return /* @__PURE__ */ React.createElement("div", {
995
- className: "tcre-board"
1727
+ className: "tcre-page tcre-home",
1728
+ "data-compact": compact || undefined
1729
+ }, /* @__PURE__ */ React.createElement("div", {
1730
+ className: "tcre-top"
996
1731
  }, /* @__PURE__ */ React.createElement("div", {
997
- className: "tcre-board-bar"
998
- }, CreatorUtil.picked(state.settings).map((platform) => /* @__PURE__ */ React.createElement(PlatformName, {
1732
+ className: "tcre-topbar"
1733
+ }, !compact && CreatorUtil.picked(state.settings).map((platform) => /* @__PURE__ */ React.createElement(PlatformName, {
999
1734
  key: platform.id,
1000
1735
  platform
1001
1736
  })), /* @__PURE__ */ React.createElement("span", {
1002
1737
  className: "tcre-grow"
1003
- }), /* @__PURE__ */ React.createElement("span", {
1738
+ }), !compact && /* @__PURE__ */ React.createElement("span", {
1004
1739
  className: "tcre-pill"
1005
- }, words.minutes, " ", /* @__PURE__ */ React.createElement("b", null, format(words.minutesValue, { n: CreatorUtil.minutes(state.weeks, now) }))), settings), /* @__PURE__ */ React.createElement("div", {
1006
- className: "tcre-board-cols"
1007
- }, COLUMNS.map((one) => /* @__PURE__ */ React.createElement("section", {
1008
- key: one,
1009
- className: "tcre-board-col"
1010
- }, /* @__PURE__ */ React.createElement("header", null, words[one], !!counts[one] && /* @__PURE__ */ React.createElement("em", null, counts[one])), /* @__PURE__ */ React.createElement("div", {
1011
- className: "tcre-board-list"
1012
- }, body(one))))));
1740
+ }, words.minutes, " ", /* @__PURE__ */ React.createElement("b", null, format(words.minutesValue, { n: CreatorUtil.minutes(state.weeks, now) }))), /* @__PURE__ */ React.createElement("button", {
1741
+ type: "button",
1742
+ className: "tcre-link",
1743
+ onClick: () => setEditing(true)
1744
+ }, words.settings)), /* @__PURE__ */ React.createElement(Flow, {
1745
+ context,
1746
+ columns,
1747
+ shown,
1748
+ pick: setColumn
1749
+ }), shown !== "data" && /* @__PURE__ */ React.createElement(SeriesBar, {
1750
+ context,
1751
+ counts: all[shown],
1752
+ picked: known ? series : "",
1753
+ pick: setSeries,
1754
+ add: () => setEditing(true)
1755
+ })), /* @__PURE__ */ React.createElement("div", {
1756
+ className: "tcre-body",
1757
+ key: shown
1758
+ }, body()));
1759
+ }
1760
+ function Flow({
1761
+ context,
1762
+ columns,
1763
+ shown,
1764
+ pick
1765
+ }) {
1766
+ const { pi } = context;
1767
+ const state = useStore(context.store);
1768
+ const words = useWords(pi);
1769
+ const now = Date.now();
1770
+ const waiting = columns.review.filter((one) => !one.approved).length;
1771
+ const thisWeek = columns.published.filter((one) => CreatorUtil.publishedAt(one) >= new Date(`${CreatorUtil.weekOf(now)}T00:00:00`).getTime()).length;
1772
+ const step = columns.making[0] && stepOf(columns.making[0]);
1773
+ const last = state.weeks.filter((one) => one.week < CreatorUtil.weekOf(now) && one.platforms.length).pop();
1774
+ const hint = {
1775
+ topic: state.settings.series.length ? format(words.flowSeries, { n: state.settings.series.length }) : words.findNow,
1776
+ making: step ? `${words[step]} · ${columns.making[0].title}` : columns.making.length ? words.doneAll : words.flowNone,
1777
+ review: waiting ? format(words.flowWaiting, { n: waiting }) : columns.review.length ? words.flowPassed : words.flowNone,
1778
+ published: format(words.flowWeek, { n: thisWeek }),
1779
+ data: last ? `${words.lastWeek} ${short(last.platforms.reduce((all, one) => all + one.views, 0), pi.ui.language)}` : words.flowMonday
1780
+ };
1781
+ const count = (one) => one === "data" ? undefined : columns[one].length;
1782
+ const { ChevronRight } = pi.ui.icons;
1783
+ return /* @__PURE__ */ React.createElement("div", {
1784
+ className: "tcre-flow",
1785
+ role: "tablist"
1786
+ }, COLUMNS.map((one, at) => {
1787
+ const Icon = pi.ui.icons[COLUMN_ICONS[one]];
1788
+ return /* @__PURE__ */ React.createElement(React.Fragment, {
1789
+ key: one
1790
+ }, at > 0 && /* @__PURE__ */ React.createElement("span", {
1791
+ className: "tcre-flow-arrow",
1792
+ "data-gap": one === "data" || undefined
1793
+ }, one !== "data" && /* @__PURE__ */ React.createElement(ChevronRight, {
1794
+ size: 14
1795
+ })), /* @__PURE__ */ React.createElement("button", {
1796
+ type: "button",
1797
+ role: "tab",
1798
+ "aria-selected": one === shown,
1799
+ className: "tcre-flow-node",
1800
+ "data-stage": one,
1801
+ "data-attn": one === "review" && waiting > 0 || undefined,
1802
+ onClick: () => pick(one)
1803
+ }, /* @__PURE__ */ React.createElement("span", {
1804
+ className: "tcre-flow-icon"
1805
+ }, Icon && /* @__PURE__ */ React.createElement(Icon, {
1806
+ size: 17
1807
+ })), /* @__PURE__ */ React.createElement("span", {
1808
+ className: "tcre-flow-text"
1809
+ }, /* @__PURE__ */ React.createElement("span", {
1810
+ className: "tcre-flow-name"
1811
+ }, words[one], count(one) !== undefined && /* @__PURE__ */ React.createElement("b", null, count(one))), /* @__PURE__ */ React.createElement("span", {
1812
+ className: "tcre-flow-hint"
1813
+ }, hint[one]))));
1814
+ }));
1815
+ }
1816
+ function SeriesBar({ context, counts, picked, pick, add }) {
1817
+ const state = useStore(context.store);
1818
+ const words = useWords(context.pi);
1819
+ const { Plus } = context.pi.ui.icons;
1820
+ if (!state.settings.series.length) {
1821
+ return null;
1822
+ }
1823
+ return /* @__PURE__ */ React.createElement("div", {
1824
+ className: "tcre-series-bar"
1825
+ }, /* @__PURE__ */ React.createElement("button", {
1826
+ type: "button",
1827
+ className: "tcre-chip-btn",
1828
+ "aria-pressed": !picked,
1829
+ onClick: () => pick("")
1830
+ }, words.all, /* @__PURE__ */ React.createElement("em", null, counts.length)), state.settings.series.map((one) => /* @__PURE__ */ React.createElement("button", {
1831
+ key: one.id,
1832
+ type: "button",
1833
+ className: "tcre-chip-btn",
1834
+ "aria-pressed": picked === one.id,
1835
+ style: { "--tcre-c": one.color },
1836
+ onClick: () => pick(picked === one.id ? "" : one.id)
1837
+ }, /* @__PURE__ */ React.createElement("i", null), one.name, /* @__PURE__ */ React.createElement("em", null, counts.filter((item) => item.series === one.id).length))), /* @__PURE__ */ React.createElement("button", {
1838
+ type: "button",
1839
+ className: "tcre-chip-btn tcre-chip-add",
1840
+ "aria-label": words.addSeries,
1841
+ title: words.addSeries,
1842
+ onClick: add
1843
+ }, /* @__PURE__ */ React.createElement(Plus, {
1844
+ size: 14
1845
+ })));
1013
1846
  }
1014
1847
  function Empty({ pi, text: text2, hint, children }) {
1015
1848
  return /* @__PURE__ */ React.createElement("div", {
@@ -1023,74 +1856,191 @@ function Empty({ pi, text: text2, hint, children }) {
1023
1856
  function kindLabel(item, words) {
1024
1857
  return [words[item.form], words[item.kind]].join(" · ");
1025
1858
  }
1026
- function Topics({ context, items }) {
1859
+ function Removed({ context, stage }) {
1027
1860
  const { pi, store } = context;
1861
+ const state = useStore(store);
1028
1862
  const words = useWords(pi);
1029
- const latest = items.reduce((at, one) => Math.max(at, one.at), 0);
1030
- const find = () => talk(pi, words.findNow, words.findPrompt);
1863
+ const [open, setOpen] = React.useState(false);
1864
+ const items = CreatorUtil.removed(state.items, stage);
1031
1865
  if (!items.length) {
1032
- return /* @__PURE__ */ React.createElement(Empty, {
1033
- pi,
1034
- text: words.noTopics,
1035
- hint: words.noTopicsHint
1036
- }, /* @__PURE__ */ React.createElement(BusyButton, {
1037
- pi,
1038
- className: "tcre-secondary tcre-small",
1039
- onClick: find
1040
- }, words.findNow));
1866
+ return null;
1041
1867
  }
1868
+ return /* @__PURE__ */ React.createElement("div", {
1869
+ className: "tcre-removed"
1870
+ }, /* @__PURE__ */ React.createElement("button", {
1871
+ type: "button",
1872
+ className: "tcre-link",
1873
+ onClick: () => setOpen(!open)
1874
+ }, format(words.removedLabel, { n: items.length })), open && /* @__PURE__ */ React.createElement("div", {
1875
+ className: "tcre-removed-list"
1876
+ }, items.slice(0, 30).map((item) => /* @__PURE__ */ React.createElement("div", {
1877
+ key: item.id,
1878
+ className: "tcre-removed-row"
1879
+ }, /* @__PURE__ */ React.createElement("span", null, item.title), /* @__PURE__ */ React.createElement(BusyButton, {
1880
+ pi,
1881
+ className: "tcre-text",
1882
+ onClick: () => store.call("restore", item.id)
1883
+ }, words.restore)))));
1884
+ }
1885
+ function SectionHead({ context, series, items }) {
1886
+ const state = useStore(context.store);
1887
+ const words = useWords(context.pi);
1888
+ const published = state.items.filter((one) => one.stage === "published" && !one.dropped && series && one.series === series.id).length;
1889
+ return /* @__PURE__ */ React.createElement("div", {
1890
+ className: "tcre-section-head",
1891
+ style: series ? { "--tcre-c": series.color } : undefined
1892
+ }, /* @__PURE__ */ React.createElement("i", null), /* @__PURE__ */ React.createElement("span", {
1893
+ className: "tcre-section-name"
1894
+ }, series?.name ?? words.seriesNone), series?.about && /* @__PURE__ */ React.createElement("span", {
1895
+ className: "tcre-section-about"
1896
+ }, series.about), /* @__PURE__ */ React.createElement("span", {
1897
+ className: "tcre-grow"
1898
+ }), series && /* @__PURE__ */ React.createElement("span", {
1899
+ className: "tcre-section-stat"
1900
+ }, format(words.seriesStat, { published, waiting: items.length })));
1901
+ }
1902
+ function Topics({ context, items, series }) {
1903
+ const { pi } = context;
1904
+ const state = useStore(context.store);
1905
+ const words = useWords(pi);
1906
+ const latest = items.reduce((at, one) => Math.max(at, one.at), 0);
1907
+ const find = () => talk(pi, words.findNow, words.findPrompt);
1908
+ const groups = CreatorUtil.bySeries(items, state.settings.series).filter((group) => group.items.length || group.series?.id === series);
1042
1909
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
1043
1910
  className: "tcre-h"
1044
1911
  }, /* @__PURE__ */ React.createElement("span", null, latest ? format(words.hotAt, {
1045
1912
  time: new Date(latest).toLocaleTimeString(pi.ui.language, { hour: "2-digit", minute: "2-digit", hour12: false })
1046
1913
  }) : ""), /* @__PURE__ */ React.createElement(BusyButton, {
1047
1914
  pi,
1048
- className: "tcre-link",
1915
+ className: "tcre-secondary tcre-small",
1049
1916
  onClick: find
1050
- }, words.findNow)), items.map((item) => /* @__PURE__ */ React.createElement("div", {
1917
+ }, words.findNow)), !items.length && /* @__PURE__ */ React.createElement(Empty, {
1918
+ pi,
1919
+ text: words.noTopics,
1920
+ hint: words.noTopicsHint
1921
+ }), groups.map((group) => /* @__PURE__ */ React.createElement(TopicGroup, {
1922
+ key: group.series?.id ?? "-",
1923
+ context,
1924
+ series: group.series,
1925
+ items: group.items,
1926
+ whole: !!series
1927
+ })), /* @__PURE__ */ React.createElement(Removed, {
1928
+ context,
1929
+ stage: "topic"
1930
+ }));
1931
+ }
1932
+ function TopicGroup({ context, series, items, whole }) {
1933
+ const words = useWords(context.pi);
1934
+ const [open, setOpen] = React.useState(whole);
1935
+ const shown = open ? items : items.slice(0, FIRST);
1936
+ return /* @__PURE__ */ React.createElement("section", {
1937
+ className: "tcre-section"
1938
+ }, /* @__PURE__ */ React.createElement(SectionHead, {
1939
+ context,
1940
+ series,
1941
+ items
1942
+ }), /* @__PURE__ */ React.createElement("div", {
1943
+ className: "tcre-grid"
1944
+ }, shown.map((item) => /* @__PURE__ */ React.createElement(Topic, {
1051
1945
  key: item.id,
1946
+ context,
1947
+ item
1948
+ }))), items.length > FIRST && /* @__PURE__ */ React.createElement("button", {
1949
+ type: "button",
1950
+ className: "tcre-more",
1951
+ onClick: () => setOpen(!open)
1952
+ }, open ? words.showLess : format(words.showAll, { n: items.length })));
1953
+ }
1954
+ function Topic({ context, item }) {
1955
+ const { pi } = context;
1956
+ const words = useWords(pi);
1957
+ return /* @__PURE__ */ React.createElement("div", {
1052
1958
  className: "tcre-card tcre-topic"
1053
1959
  }, /* @__PURE__ */ React.createElement("div", {
1960
+ className: "tcre-topic-meta"
1961
+ }, item.number ? /* @__PURE__ */ React.createElement("span", {
1962
+ className: "tcre-ep"
1963
+ }, format(words.episode, { n: item.number })) : null, /* @__PURE__ */ React.createElement("span", {
1964
+ className: "tcre-chip"
1965
+ }, kindLabel(item, words)), item.heat !== undefined && item.kind === "hot" && /* @__PURE__ */ React.createElement("span", {
1966
+ className: "tcre-heat"
1967
+ }, format(words.heat, { n: item.heat })), /* @__PURE__ */ React.createElement("span", {
1968
+ className: "tcre-grow"
1969
+ }), /* @__PURE__ */ React.createElement(IconButton, {
1970
+ pi,
1971
+ icon: "Trash2",
1972
+ label: words.remove,
1973
+ onClick: () => remove(context, item)
1974
+ })), /* @__PURE__ */ React.createElement("div", {
1054
1975
  className: "tcre-topic-title"
1055
1976
  }, item.title), item.why && /* @__PURE__ */ React.createElement("p", null, item.why), /* @__PURE__ */ React.createElement("div", {
1056
1977
  className: "tcre-topic-foot"
1057
- }, /* @__PURE__ */ React.createElement("span", {
1058
- className: "tcre-chips"
1059
- }, /* @__PURE__ */ React.createElement("span", {
1060
- className: "tcre-chip"
1061
- }, kindLabel(item, words)), item.heat !== undefined && /* @__PURE__ */ React.createElement("span", {
1062
- className: "tcre-heat"
1063
- }, format(words.heat, { n: item.heat }))), /* @__PURE__ */ React.createElement("span", {
1064
- className: "tcre-buttons-inline"
1065
1978
  }, /* @__PURE__ */ React.createElement(BusyButton, {
1066
1979
  pi,
1067
- className: "tcre-text",
1068
- onClick: () => store.call("drop", item.id)
1069
- }, words.drop), /* @__PURE__ */ React.createElement(BusyButton, {
1070
- pi,
1071
- className: "tcre-primary",
1980
+ className: "tcre-primary tcre-small",
1072
1981
  onClick: () => make(context, item)
1073
- }, words.make))))));
1982
+ }, words.make)));
1074
1983
  }
1075
1984
  function Making({ context, items }) {
1076
- const words = useWords(context.pi);
1077
- if (!items.length) {
1078
- return /* @__PURE__ */ React.createElement(Empty, {
1079
- pi: context.pi,
1080
- text: words.makingEmpty
1081
- });
1082
- }
1083
- return /* @__PURE__ */ React.createElement(React.Fragment, null, items.map((item) => /* @__PURE__ */ React.createElement(BusyButton, {
1985
+ const { pi } = context;
1986
+ const words = useWords(pi);
1987
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, !items.length && /* @__PURE__ */ React.createElement(Empty, {
1988
+ pi,
1989
+ text: words.makingEmpty
1990
+ }), /* @__PURE__ */ React.createElement("div", {
1991
+ className: "tcre-list"
1992
+ }, items.map((item) => {
1993
+ const series = seriesOf(context, item.series);
1994
+ return /* @__PURE__ */ React.createElement("div", {
1995
+ key: item.id,
1996
+ className: "tcre-card tcre-making"
1997
+ }, /* @__PURE__ */ React.createElement("div", {
1998
+ className: "tcre-making-head"
1999
+ }, /* @__PURE__ */ React.createElement("div", {
2000
+ className: "tcre-making-main"
2001
+ }, /* @__PURE__ */ React.createElement(SeriesTag, {
2002
+ series,
2003
+ number: item.number,
2004
+ words
2005
+ }), /* @__PURE__ */ React.createElement("span", {
2006
+ className: "tcre-making-title"
2007
+ }, item.title)), /* @__PURE__ */ React.createElement(BusyButton, {
2008
+ pi,
2009
+ className: "tcre-secondary tcre-small",
2010
+ onClick: () => openPiece(context, item)
2011
+ }, words.openChat), /* @__PURE__ */ React.createElement(IconButton, {
2012
+ pi,
2013
+ icon: "Trash2",
2014
+ label: words.remove,
2015
+ onClick: () => remove(context, item)
2016
+ })), /* @__PURE__ */ React.createElement(Pipeline, {
2017
+ pi,
2018
+ item,
2019
+ words,
2020
+ color: series?.color
2021
+ }));
2022
+ })), /* @__PURE__ */ React.createElement(Removed, {
2023
+ context,
2024
+ stage: "making"
2025
+ }));
2026
+ }
2027
+ function Reviews({ context, items }) {
2028
+ const { pi } = context;
2029
+ const words = useWords(pi);
2030
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, !items.length && /* @__PURE__ */ React.createElement(Empty, {
2031
+ pi,
2032
+ text: words.reviewEmpty
2033
+ }), /* @__PURE__ */ React.createElement("div", {
2034
+ className: "tcre-grid tcre-grid-wide"
2035
+ }, items.map((item) => /* @__PURE__ */ React.createElement(ReviewCard, {
1084
2036
  key: item.id,
1085
- pi: context.pi,
1086
- className: "tcre-card tcre-making",
1087
- onClick: () => openPiece(context, item)
1088
- }, /* @__PURE__ */ React.createElement("span", {
1089
- className: "tcre-making-title"
1090
- }, item.title), /* @__PURE__ */ React.createElement(Steps, {
2037
+ context,
1091
2038
  item,
1092
- words
1093
- }))));
2039
+ onRemove: () => remove(context, item)
2040
+ }))), /* @__PURE__ */ React.createElement(Removed, {
2041
+ context,
2042
+ stage: "review"
2043
+ }));
1094
2044
  }
1095
2045
  function Published({ context, items }) {
1096
2046
  const { pi } = context;
@@ -1101,181 +2051,175 @@ function Published({ context, items }) {
1101
2051
  text: words.publishedEmpty
1102
2052
  });
1103
2053
  }
1104
- return /* @__PURE__ */ React.createElement(React.Fragment, null, items.map((item) => /* @__PURE__ */ React.createElement("div", {
1105
- key: item.id,
1106
- className: "tcre-card tcre-pub"
1107
- }, /* @__PURE__ */ React.createElement("span", {
1108
- className: "tcre-pub-main"
1109
- }, /* @__PURE__ */ React.createElement("span", {
1110
- className: "tcre-pub-title"
1111
- }, item.title), /* @__PURE__ */ React.createElement("span", {
1112
- className: "tcre-pub-kind"
1113
- }, words[item.form]), /* @__PURE__ */ React.createElement("span", {
1114
- className: "tcre-pub-links"
1115
- }, (item.links ?? []).map((link) => /* @__PURE__ */ React.createElement(BusyButton, {
1116
- key: link.platform,
1117
- pi,
1118
- className: "tcre-text",
1119
- onClick: () => pi.openLink?.(link.url)
1120
- }, /* @__PURE__ */ React.createElement(PlatformName, {
1121
- platform: platformOf(context, link.platform)
1122
- }))))))));
1123
- }
1124
- function Numbers({ context, board }) {
1125
- const { pi } = context;
1126
- const state = useStore(context.store);
1127
- const words = useWords(pi);
1128
- const now = Date.now();
1129
- const thisWeek = CreatorUtil.weekOf(now);
1130
- const weeks = state.weeks.filter((one) => one.week < thisWeek && one.platforms.length);
1131
- const last = weeks[weeks.length - 1];
1132
- const before = weeks[weeks.length - 2];
1133
- const sum = (week, key) => (week?.platforms ?? []).reduce((all, one) => all + (one[key] ?? 0), 0);
1134
- const delta = (a, b) => b > 0 ? `${a >= b ? "+" : ""}${Math.round((a - b) / b * 100)}%` : "";
1135
- const progress = CreatorUtil.progress(state.items, state.settings.goal, now);
1136
- const goal = state.settings.goal;
1137
- const most = Math.max(1, ...(last?.platforms ?? []).map((one) => one.views));
1138
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
1139
- className: "tcre-card tcre-stats"
1140
- }, /* @__PURE__ */ React.createElement("div", {
1141
- className: "tcre-stats-row"
1142
- }, /* @__PURE__ */ React.createElement("div", {
1143
- className: "tcre-stat",
1144
- "data-none": last ? undefined : true
1145
- }, /* @__PURE__ */ React.createElement("b", null, last ? short(sum(last, "views"), pi.ui.language) : "—", last && before && /* @__PURE__ */ React.createElement("em", null, delta(sum(last, "views"), sum(before, "views")))), /* @__PURE__ */ React.createElement("span", null, words.views)), /* @__PURE__ */ React.createElement("div", {
1146
- className: "tcre-stat",
1147
- "data-none": last ? undefined : true
1148
- }, /* @__PURE__ */ React.createElement("b", null, last ? short(sum(last, "follows"), pi.ui.language) : "—"), /* @__PURE__ */ React.createElement("span", null, words.follows)), !board && /* @__PURE__ */ React.createElement("div", {
1149
- className: "tcre-stat"
1150
- }, /* @__PURE__ */ React.createElement("b", null, format(words.minutesValue, { n: CreatorUtil.minutes(state.weeks, now) })), /* @__PURE__ */ React.createElement("span", null, words.minutes))), !last && /* @__PURE__ */ React.createElement("div", {
1151
- className: "tcre-stats-note"
1152
- }, words.noData)), last && /* @__PURE__ */ React.createElement("div", {
1153
- className: "tcre-card tcre-bars"
1154
- }, last.platforms.map((one) => {
1155
- const platform = platformOf(context, one.platform);
2054
+ return /* @__PURE__ */ React.createElement("div", {
2055
+ className: "tcre-card tcre-rows"
2056
+ }, items.map((item) => {
2057
+ const views = CreatorUtil.views(item);
1156
2058
  return /* @__PURE__ */ React.createElement("div", {
1157
- key: one.platform,
1158
- className: "tcre-bar"
2059
+ key: item.id,
2060
+ className: "tcre-pub"
2061
+ }, /* @__PURE__ */ React.createElement("div", {
2062
+ className: "tcre-pub-main"
1159
2063
  }, /* @__PURE__ */ React.createElement("span", {
1160
- className: "tcre-bar-label"
1161
- }, platform?.name ?? one.platform), /* @__PURE__ */ React.createElement("span", {
1162
- className: "tcre-bar-track"
1163
- }, /* @__PURE__ */ React.createElement("i", {
1164
- style: { width: `${one.views / most * 100}%`, background: platform?.color }
1165
- })), /* @__PURE__ */ React.createElement("span", {
1166
- className: "tcre-bar-value"
1167
- }, short(one.views, pi.ui.language)));
1168
- })), goal && progress && /* @__PURE__ */ React.createElement("div", {
1169
- className: "tcre-card tcre-goal"
1170
- }, /* @__PURE__ */ React.createElement("div", {
1171
- className: "tcre-goal-title"
1172
- }, format(words.goal, { days: goal.days }), /* @__PURE__ */ React.createElement("span", {
1173
- className: "tcre-muted"
1174
- }, format(words.goalDay, { day: progress.day }))), [
1175
- [words.video, progress.videos, goal.videos],
1176
- [words.post, progress.posts, goal.posts]
1177
- ].map(([label, made, aim]) => /* @__PURE__ */ React.createElement("div", {
1178
- key: label
1179
- }, /* @__PURE__ */ React.createElement("div", {
1180
- className: "tcre-goal-row"
1181
- }, /* @__PURE__ */ React.createElement("span", null, label), /* @__PURE__ */ React.createElement("span", {
1182
- className: "tcre-muted"
1183
- }, made, " / ", aim)), /* @__PURE__ */ React.createElement("div", {
1184
- className: "tcre-goal-track"
1185
- }, /* @__PURE__ */ React.createElement("i", {
1186
- style: { width: `${aim ? Math.min(100, made / aim * 100) : 0}%` }
1187
- }))))));
1188
- }
1189
- function Setup({ context, done }) {
1190
- const { pi, store } = context;
1191
- const state = useStore(store);
1192
- const words = useWords(pi);
1193
- const [niche, setNiche] = React.useState(state.settings.niche);
1194
- const [picked, setPicked] = React.useState(state.settings.picked);
1195
- const save = (goal) => store.call("setSettings", {
1196
- niche: niche.trim(),
1197
- picked,
1198
- ...goal ? { goal: { from: Date.now(), days: 30, videos: 8, posts: 12 } } : {}
1199
- }).then(done);
1200
- return /* @__PURE__ */ React.createElement("div", {
1201
- className: "tcre-setup"
1202
- }, /* @__PURE__ */ React.createElement("div", {
1203
- className: "tcre-setup-title"
1204
- }, words.setupTitle), /* @__PURE__ */ React.createElement("textarea", {
1205
- className: "tcre-input",
1206
- rows: 2,
1207
- value: niche,
1208
- placeholder: words.nicheHint,
1209
- onChange: (event) => setNiche(event.target.value)
1210
- }), /* @__PURE__ */ React.createElement("div", {
1211
- className: "tcre-setup-label"
1212
- }, words.platformsLabel), /* @__PURE__ */ React.createElement("div", {
1213
- className: "tcre-pick"
1214
- }, state.settings.platforms.map((platform) => {
1215
- const on = picked.includes(platform.id);
1216
- return /* @__PURE__ */ React.createElement("button", {
1217
- key: platform.id,
1218
- type: "button",
1219
- "aria-pressed": on,
1220
- onClick: () => setPicked(on ? picked.filter((id) => id !== platform.id) : [...picked, platform.id])
2064
+ className: "tcre-pub-title"
2065
+ }, item.title), /* @__PURE__ */ React.createElement("span", {
2066
+ className: "tcre-pub-meta"
2067
+ }, /* @__PURE__ */ React.createElement(SeriesTag, {
2068
+ series: seriesOf(context, item.series),
2069
+ number: item.number,
2070
+ words
2071
+ }), /* @__PURE__ */ React.createElement("span", null, words[item.form]), /* @__PURE__ */ React.createElement("span", null, new Date(CreatorUtil.publishedAt(item)).toLocaleDateString(pi.ui.language, { month: "numeric", day: "numeric" })), (item.links ?? []).map((link) => /* @__PURE__ */ React.createElement(BusyButton, {
2072
+ key: link.platform,
2073
+ pi,
2074
+ className: "tcre-text tcre-pf-link",
2075
+ onClick: () => pi.openLink?.(link.url)
1221
2076
  }, /* @__PURE__ */ React.createElement(PlatformName, {
1222
- platform
1223
- }));
1224
- })), /* @__PURE__ */ React.createElement("div", {
1225
- className: "tcre-buttons"
1226
- }, !state.settings.goal && /* @__PURE__ */ React.createElement(BusyButton, {
1227
- pi,
1228
- className: "tcre-secondary",
1229
- disabled: !picked.length,
1230
- onClick: () => save(true)
1231
- }, words.startGoal), /* @__PURE__ */ React.createElement(BusyButton, {
1232
- pi,
1233
- className: "tcre-primary",
1234
- disabled: !picked.length,
1235
- onClick: () => save(false)
1236
- }, state.settings.picked.length ? words.save : words.start)));
2077
+ platform: platformOf(context, link.platform)
2078
+ }))))), /* @__PURE__ */ React.createElement("span", {
2079
+ className: "tcre-pub-views",
2080
+ "data-none": views === undefined || undefined
2081
+ }, views === undefined ? "—" : short(views, pi.ui.language), /* @__PURE__ */ React.createElement("small", null, words.views)));
2082
+ }));
1237
2083
  }
1238
2084
 
1239
2085
  // web-src/style.ts
1240
2086
  var STYLE = `
1241
2087
  .tcre-page { height: 100%; overflow-y: auto; box-sizing: border-box; padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); background: var(--ta-side); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); line-height: 1.5; }
1242
- :root:not([data-theme='light']) :is(.tcre-page, .tcre-board) { --ta-card: var(--ta-raised); }
2088
+ :root:not([data-theme='light']) .tcre-page { --ta-card: var(--ta-raised); }
2089
+ .tcre-page { --tcre-line: color-mix(in oklab, var(--ta-text) 9%, transparent); --tcre-ok: var(--ta-success, #16a34a); }
1243
2090
  .tcre-pagehead { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.25; }
1244
2091
  .tcre-pagehead-title { font-weight: 600; font-size: calc(15px * var(--ta-font-scale)); }
1245
2092
  .tcre-pagehead-sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(11.5px * var(--ta-font-scale)); }
1246
- .tcre-seg { margin: 6px 0 12px; }
1247
- .tcre-seg button { min-width: 0; height: calc(32px * var(--ta-font-scale)); padding: 0 2px; gap: 3px; font-size: calc(13.5px * var(--ta-font-scale)); white-space: nowrap; }
1248
- .tcre-seg .ta-on { font-weight: 600; }
1249
- .tcre-seg em, .tcre-board-col header em { font-style: normal; font-weight: 400; font-size: calc(11px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }
1250
- .tcre-col { animation: tcre-in 160ms var(--ta-ease); }
1251
- @keyframes tcre-in { from { opacity: 0; } }
1252
- .tcre-h { display: flex; justify-content: space-between; align-items: center; margin: 4px 4px 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }
1253
- .tcre-card { display: block; width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 13px 14px; border: 0; border-radius: 16px; background: var(--ta-card); color: inherit; font: inherit; text-align: left; }
1254
- :root[data-theme='light'] .tcre-card { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
1255
- button.tcre-card { cursor: pointer; -webkit-tap-highlight-color: transparent; }
1256
- .tcre-topic-title, .tcre-making-title, .tcre-review-title { display: block; font-size: calc(15.5px * var(--ta-font-scale)); font-weight: 600; line-height: 1.4; }
1257
- .tcre-topic p { margin: 5px 0 10px; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }
1258
- .tcre-topic-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
1259
- .tcre-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
1260
- .tcre-chip { padding: 2px 8px; border-radius: 999px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(11.5px * var(--ta-font-scale)); white-space: nowrap; }
2093
+ .tcre-grow { flex: 1; }
2094
+ .tcre-muted { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 400; }
2095
+ .tcre-pad { padding: 6px 2px; }
2096
+
2097
+ /* The page: the top (bar, stations, series), then the station picked with room to read. */
2098
+ .tcre-home { padding: 0 0 calc(32px + env(safe-area-inset-bottom)); }
2099
+ .tcre-top { padding: 10px 28px 0; }
2100
+ .tcre-body { max-width: var(--ta-page-wide); margin: 0 auto; padding: 18px 28px 0; animation: tcre-in 180ms var(--ta-ease); }
2101
+ .tcre-home[data-compact] .tcre-top { padding: 4px 14px 0; }
2102
+ .tcre-home[data-compact] .tcre-body { padding: 14px 14px 0; }
2103
+ @keyframes tcre-in { from { opacity: 0; transform: translateY(4px); } }
2104
+ .tcre-topbar { display: flex; align-items: center; gap: 14px; min-height: 34px; max-width: var(--ta-page-wide); margin: 0 auto; }
2105
+ .tcre-pill { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--ta-chip); color: var(--ta-muted); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; }
2106
+ button.tcre-pill { cursor: pointer; }
2107
+ button.tcre-pill:hover { background: var(--ta-hover); }
2108
+ .tcre-pill b { color: var(--ta-text); font-weight: 600; }
2109
+
2110
+ /* The stations a piece goes through. */
2111
+ .tcre-flow { display: flex; align-items: stretch; max-width: var(--ta-page-wide); margin: 14px auto 0; padding: 6px; border-radius: 18px; background: var(--ta-card); box-sizing: border-box; }
2112
+ :root[data-theme='light'] .tcre-flow { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), inset 0 0 0 1px var(--tcre-line); }
2113
+ .tcre-flow-node { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 0; border-radius: 13px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background 160ms var(--ta-ease); -webkit-tap-highlight-color: transparent; }
2114
+ .tcre-flow-node:hover { background: var(--ta-hover); }
2115
+ .tcre-flow-node[aria-selected='true'] { background: var(--ta-side); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
2116
+ :root:not([data-theme='light']) .tcre-flow-node[aria-selected='true'] { background: color-mix(in oklab, var(--ta-text) 9%, transparent); box-shadow: none; }
2117
+ .tcre-flow-icon { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--tcre-s); background: color-mix(in oklab, var(--tcre-s) 15%, transparent); }
2118
+ .tcre-flow-node[data-stage='topic'] { --tcre-s: #eab308; }
2119
+ .tcre-flow-node[data-stage='making'] { --tcre-s: #3b82f6; }
2120
+ .tcre-flow-node[data-stage='review'] { --tcre-s: #f97316; }
2121
+ .tcre-flow-node[data-stage='published'] { --tcre-s: #22c55e; }
2122
+ .tcre-flow-node[data-stage='data'] { --tcre-s: #a855f7; }
2123
+ .tcre-flow-node[data-attn] .tcre-flow-icon { position: relative; }
2124
+ .tcre-flow-node[data-attn] .tcre-flow-icon::after { content: ''; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: #f97316; box-shadow: 0 0 0 2px var(--ta-card); }
2125
+ .tcre-flow-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
2126
+ .tcre-flow-name { display: flex; align-items: baseline; gap: 6px; font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 600; white-space: nowrap; }
2127
+ .tcre-flow-name b { font-size: calc(17px * var(--ta-font-scale)); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.2px; }
2128
+ .tcre-flow-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(11.5px * var(--ta-font-scale)); }
2129
+ .tcre-flow-node[data-attn] .tcre-flow-hint { color: #f97316; }
2130
+ .tcre-flow-arrow { flex: none; width: 16px; display: grid; place-items: center; color: var(--ta-muted); opacity: 0.6; }
2131
+ .tcre-flow-arrow[data-gap] { width: 13px; position: relative; }
2132
+ .tcre-flow-arrow[data-gap]::before { content: ''; width: 1px; height: 60%; background: var(--tcre-line); }
2133
+ .tcre-home[data-compact] .tcre-flow { margin-top: 8px; padding: 4px; border-radius: 16px; }
2134
+ .tcre-home[data-compact] .tcre-flow-node { flex-direction: column; gap: 4px; padding: 8px 2px 7px; text-align: center; }
2135
+ .tcre-home[data-compact] .tcre-flow-icon { width: 30px; height: 30px; border-radius: 10px; }
2136
+ .tcre-home[data-compact] .tcre-flow-text { align-items: center; }
2137
+ .tcre-home[data-compact] .tcre-flow-name { gap: 3px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; }
2138
+ .tcre-home[data-compact] .tcre-flow-name b { font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-secondary); }
2139
+ .tcre-home[data-compact] .tcre-flow-node[aria-selected='true'] .tcre-flow-name { font-weight: 600; }
2140
+ .tcre-home[data-compact] .tcre-flow-hint { display: none; }
2141
+ .tcre-home[data-compact] .tcre-flow-arrow { width: 6px; }
2142
+ .tcre-home[data-compact] .tcre-flow-arrow svg { display: none; }
2143
+
2144
+ /* The series, as chips to look at one at a time. */
2145
+ .tcre-series-bar { display: flex; gap: 8px; max-width: var(--ta-page-wide); margin: 14px auto 0; overflow-x: auto; scrollbar-width: none; }
2146
+ .tcre-series-bar::-webkit-scrollbar { display: none; }
2147
+ .tcre-chip-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ta-secondary); font: inherit; font-size: calc(13px * var(--ta-font-scale)); white-space: nowrap; cursor: pointer; box-shadow: inset 0 0 0 1px var(--tcre-line); }
2148
+ .tcre-chip-btn:hover { background: var(--ta-hover); }
2149
+ .tcre-chip-btn i { width: 8px; height: 8px; border-radius: 3px; background: var(--tcre-c); }
2150
+ .tcre-chip-btn em { font-style: normal; color: var(--ta-muted); font-size: calc(11.5px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }
2151
+ .tcre-chip-btn[aria-pressed='true'] { background: var(--ta-text); color: var(--ta-side); box-shadow: none; font-weight: 600; }
2152
+ .tcre-chip-btn[aria-pressed='true'] em { color: color-mix(in oklab, var(--ta-side) 70%, transparent); }
2153
+ .tcre-chip-add { width: 30px; padding: 0; justify-content: center; color: var(--ta-muted); }
2154
+
2155
+ /* Cards. */
2156
+ .tcre-card { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 14px 16px; border: 0; border-radius: 16px; background: var(--ta-card); color: inherit; font: inherit; text-align: left; }
2157
+ :root[data-theme='light'] .tcre-card { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), inset 0 0 0 1px var(--tcre-line); }
2158
+ .tcre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
2159
+ .tcre-grid-wide { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; }
2160
+ .tcre-list { display: flex; flex-direction: column; gap: 12px; }
2161
+ .tcre-h { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 14px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }
2162
+ .tcre-chip { padding: 1px 8px; border-radius: 999px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(11.5px * var(--ta-font-scale)); white-space: nowrap; }
1261
2163
  .tcre-heat { color: var(--ta-warning, #d97706); font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; white-space: nowrap; }
1262
- .tcre-buttons-inline { display: flex; align-items: center; gap: 4px; flex: none; }
1263
- .tcre-primary, .tcre-secondary { height: calc(32px * var(--ta-font-scale)); padding: 0 14px; border: 0; border-radius: 999px; font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 600; white-space: nowrap; cursor: pointer; }
2164
+ .tcre-ep { padding: 1px 8px; border-radius: 999px; background: color-mix(in oklab, var(--tcre-c, var(--ta-text)) 14%, transparent); color: var(--tcre-c, var(--ta-text)); font-size: calc(11.5px * var(--ta-font-scale)); font-weight: 600; white-space: nowrap; }
2165
+ .tcre-primary, .tcre-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: calc(34px * var(--ta-font-scale)); padding: 0 16px; border: 0; border-radius: 999px; font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 600; white-space: nowrap; cursor: pointer; }
1264
2166
  .tcre-primary { background: var(--ta-text); color: var(--ta-side); }
1265
2167
  .tcre-secondary { background: var(--ta-chip); color: var(--ta-text); font-weight: 500; }
1266
2168
  .tcre-primary:disabled, .tcre-secondary:disabled { opacity: 0.5; cursor: default; }
2169
+ .tcre-small { height: calc(30px * var(--ta-font-scale)); padding: 0 14px; font-size: calc(12.5px * var(--ta-font-scale)); }
1267
2170
  .tcre-text, .tcre-link { border: 0; background: transparent; color: var(--ta-secondary); font: inherit; font-size: calc(13px * var(--ta-font-scale)); padding: 4px 6px; cursor: pointer; }
1268
- .tcre-link { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }
1269
- .tcre-steps { display: flex; gap: 4px; margin: 10px 0 6px; }
1270
- .tcre-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--ta-chip); }
1271
- .tcre-steps i[data-state='done'] { background: var(--ta-text); }
1272
- .tcre-steps i[data-state='now'] { background: color-mix(in oklab, var(--ta-text) 40%, var(--ta-chip)); }
1273
- .tcre-steps-label { display: flex; justify-content: space-between; gap: 8px; color: var(--ta-muted); font-size: calc(11.5px * var(--ta-font-scale)); }
1274
- .tcre-steps-label span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1275
- .tcre-steps-label span:last-child { flex: none; white-space: nowrap; }
2171
+ .tcre-link { padding: 5px 10px; border-radius: 999px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }
2172
+ .tcre-link:hover { background: var(--ta-hover); color: var(--ta-text); }
2173
+ .tcre-icon { flex: none; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ta-muted); cursor: pointer; }
2174
+ .tcre-icon:hover { background: var(--ta-hover); color: var(--ta-text); }
2175
+ .tcre-icon:disabled { opacity: 0.5; }
1276
2176
  .tcre-pf { display: inline-flex; align-items: center; gap: 5px; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; }
1277
2177
  .tcre-pf i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
2178
+ .tcre-series-tag { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: var(--ta-secondary); font-size: calc(12px * var(--ta-font-scale)); white-space: nowrap; }
2179
+ .tcre-series-tag i { flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--tcre-c); }
2180
+ .tcre-series-tag b { margin-left: 2px; color: var(--tcre-c, var(--ta-text)); font-weight: 600; }
2181
+
2182
+ /* Topics, by series. */
2183
+ .tcre-section + .tcre-section { margin-top: 28px; }
2184
+ .tcre-section-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; min-width: 0; }
2185
+ .tcre-section-head > i { flex: none; width: 4px; height: 18px; border-radius: 2px; background: var(--tcre-c, var(--ta-muted)); }
2186
+ .tcre-section-name { flex: none; font-size: calc(15px * var(--ta-font-scale)); font-weight: 650; }
2187
+ .tcre-section-about { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }
2188
+ .tcre-section-stat { flex: none; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }
2189
+ .tcre-topic { display: flex; flex-direction: column; padding: 12px 14px 14px; }
2190
+ .tcre-topic-meta { display: flex; align-items: center; gap: 6px; min-height: 28px; margin: -4px -6px 4px 0; }
2191
+ .tcre-topic-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; line-height: 1.45; }
2192
+ .tcre-topic p { flex: 1; margin: 6px 0 12px; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
2193
+ .tcre-topic-foot { display: flex; justify-content: flex-end; margin-top: auto; }
2194
+ .tcre-more { display: block; margin: 12px auto 0; padding: 6px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ta-muted); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }
2195
+ .tcre-more:hover { background: var(--ta-hover); color: var(--ta-text); }
2196
+
2197
+ /* Making: the stations of a piece. */
2198
+ .tcre-making { padding: 16px 18px 14px; }
2199
+ .tcre-making-head { display: flex; align-items: center; gap: 8px; }
2200
+ .tcre-making-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
2201
+ .tcre-making-title { font-size: calc(15.5px * var(--ta-font-scale)); font-weight: 600; line-height: 1.4; }
2202
+ .tcre-pipe-wrap { --tcre-c: var(--tcre-ok); margin-top: 16px; }
2203
+ .tcre-pipe { display: flex; margin: 0; padding: 0; list-style: none; }
2204
+ .tcre-pipe li { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
2205
+ .tcre-pipe li + li::before { content: ''; position: absolute; top: 16px; right: calc(50% + 20px); left: calc(-50% + 20px); height: 2px; border-radius: 1px; background: var(--tcre-line); }
2206
+ .tcre-pipe li[data-state='done'] + li::before { background: var(--tcre-c); }
2207
+ .tcre-pipe li[data-state='now']::before { background: linear-gradient(90deg, var(--tcre-c), var(--tcre-line)); }
2208
+ .tcre-pipe-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ta-muted); background: var(--ta-chip); transition: background 200ms var(--ta-ease); }
2209
+ .tcre-pipe li[data-state='done'] .tcre-pipe-dot { background: var(--tcre-c); color: #fff; }
2210
+ .tcre-pipe li[data-state='now'] .tcre-pipe-dot { background: color-mix(in oklab, var(--tcre-c) 16%, var(--ta-card)); color: var(--tcre-c); box-shadow: 0 0 0 2px var(--tcre-c); animation: tcre-breathe 1.8s ease-in-out infinite; }
2211
+ @keyframes tcre-breathe { 50% { box-shadow: 0 0 0 2px var(--tcre-c), 0 0 0 7px color-mix(in oklab, var(--tcre-c) 18%, transparent); } }
2212
+ .tcre-pipe-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
2213
+ .tcre-pipe li[data-state='done'] .tcre-pipe-label { color: var(--ta-secondary); }
2214
+ .tcre-pipe li[data-state='now'] .tcre-pipe-label { color: var(--ta-text); font-weight: 600; }
2215
+ .tcre-pipe-now { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 12px; border-radius: 10px; background: color-mix(in oklab, var(--tcre-c) 9%, transparent); color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); }
2216
+ .tcre-pipe-now[data-done] { color: var(--tcre-c); font-weight: 600; }
2217
+ .tcre-pulse { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--tcre-c); animation: tcre-blink 1.2s ease-in-out infinite; }
2218
+ @keyframes tcre-blink { 50% { opacity: 0.25; } }
2219
+
2220
+ /* Review. */
1278
2221
  .tcre-review { padding: 12px; }
2222
+ .tcre-review-head { display: flex; align-items: center; gap: 8px; min-height: 28px; margin: -2px -2px 8px 2px; }
1279
2223
  .tcre-preview { position: relative; overflow: hidden; border-radius: 12px; background: #111215; aspect-ratio: 16 / 10; display: grid; place-items: center; }
1280
2224
  .tcre-preview video, .tcre-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
1281
2225
  .tcre-preview-empty { color: #7c7c82; font-size: calc(12px * var(--ta-font-scale)); }
@@ -1284,72 +2228,113 @@ button.tcre-card { cursor: pointer; -webkit-tap-highlight-color: transparent; }
1284
2228
  .tcre-count { left: 8px; }
1285
2229
  .tcre-tabs { margin: 12px 0 10px; }
1286
2230
  .tcre-tabs .ta-on .tcre-pf { color: var(--ta-text); font-weight: 600; }
1287
- @media (prefers-reduced-motion: reduce) { .tcre-col { animation: none; } }
1288
- .tcre-review-title { margin: 10px 2px 4px; font-size: calc(15px * var(--ta-font-scale)); }
1289
- .tcre-review-text { margin: 0 2px; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); white-space: pre-wrap; }
1290
- .tcre-tags, .tcre-origin { margin: 4px 2px 0; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; }
1291
- .tcre-checks { display: flex; flex-direction: column; gap: 7px; margin: 12px 2px; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-text); }
2231
+ .tcre-review-title { display: block; margin: 10px 2px 4px; font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; line-height: 1.4; }
2232
+ .tcre-review-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; width: 100%; margin: 0; padding: 0 2px; border: 0; background: transparent; color: var(--ta-secondary); font: inherit; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; text-align: left; white-space: pre-wrap; cursor: pointer; }
2233
+ .tcre-review-text[data-open] { display: block; }
2234
+ .tcre-tags, .tcre-origin { margin: 6px 2px 0; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; }
2235
+ .tcre-checks { display: flex; flex-direction: column; gap: 7px; margin: 12px 2px; padding-top: 12px; border-top: 1px solid var(--tcre-line); font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-text); }
1292
2236
  .tcre-checks span { display: flex; gap: 8px; align-items: flex-start; }
1293
2237
  .tcre-checks i { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: calc(10px * var(--ta-font-scale)); font-weight: 700; color: var(--ta-warning, #d97706); background: color-mix(in oklab, var(--ta-warning, #d97706) 18%, transparent); }
1294
- .tcre-checks span[data-ok] i { color: var(--ta-success, #16a34a); background: color-mix(in oklab, var(--ta-success, #16a34a) 18%, transparent); }
1295
- .tcre-buttons { display: flex; gap: 8px; margin-top: 4px; }
1296
- .tcre-buttons .tcre-secondary { flex: 1; }
1297
- .tcre-buttons .tcre-primary { flex: 2; }
1298
- .tcre-approved { margin: 4px 2px 2px; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }
1299
- .tcre-pub { display: block; }
1300
- .tcre-pub-main { flex: 1; min-width: 0; }
1301
- .tcre-pub-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; line-height: 1.4; }
1302
- .tcre-pub-kind { display: block; margin-top: 2px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
1303
- .tcre-pub-links { display: flex; flex-wrap: wrap; gap: 2px; margin: 2px 0 -4px -6px; }
1304
- .tcre-stats { padding: 14px 0; }
1305
- .tcre-stats-row { display: flex; }
1306
- .tcre-stats-row > * { flex: 1; }
1307
- .tcre-stat { min-width: 0; padding: 0 14px; display: flex; flex-direction: column; gap: 2px; }
1308
- .tcre-stat + .tcre-stat { border-left: 1px solid color-mix(in oklab, var(--ta-text) 9%, transparent); }
1309
- .tcre-stat b { font-size: calc(20px * var(--ta-font-scale)); font-weight: 600; line-height: 1.2; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
1310
- .tcre-stat[data-none] b { color: var(--ta-muted); font-weight: 400; }
1311
- .tcre-stat b em { margin-left: 4px; font-style: normal; font-weight: 400; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-success, #16a34a); }
1312
- .tcre-stat span { color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1313
- .tcre-stats-note { margin: 12px 14px 0; padding-top: 10px; border-top: 1px solid color-mix(in oklab, var(--ta-text) 9%, transparent); color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
1314
- .tcre-bar { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: calc(12.5px * var(--ta-font-scale)); }
1315
- .tcre-bar-label { width: 58px; flex: none; color: var(--ta-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1316
- .tcre-bar-track { flex: 1; height: 8px; border-radius: 4px; background: var(--ta-chip); overflow: hidden; }
1317
- .tcre-bar-track i { display: block; height: 100%; border-radius: 4px; }
1318
- .tcre-bar-value { width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
1319
- .tcre-goal-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 600; }
1320
- .tcre-goal-title .tcre-muted { font-weight: 400; font-size: calc(12px * var(--ta-font-scale)); }
1321
- .tcre-goal-row { display: flex; justify-content: space-between; margin: 10px 0 6px; font-size: calc(13px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }
2238
+ .tcre-checks span[data-ok] i { color: var(--tcre-ok); background: color-mix(in oklab, var(--tcre-ok) 18%, transparent); }
2239
+ .tcre-buttons { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
2240
+ .tcre-review .tcre-buttons .tcre-secondary { flex: 1; }
2241
+ .tcre-review .tcre-buttons .tcre-primary { flex: 2; }
2242
+ .tcre-approved { margin: 4px 2px 2px; padding: 9px 12px; border-radius: 10px; background: color-mix(in oklab, var(--tcre-ok) 10%, transparent); color: var(--tcre-ok); font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; }
2243
+
2244
+ /* Published, a row each. */
2245
+ .tcre-rows { padding: 4px 16px; }
2246
+ .tcre-pub { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
2247
+ .tcre-pub + .tcre-pub { border-top: 1px solid var(--tcre-line); }
2248
+ .tcre-pub-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
2249
+ .tcre-pub-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(14.5px * var(--ta-font-scale)); font-weight: 600; }
2250
+ .tcre-pub-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
2251
+ .tcre-pf-link { padding: 0; }
2252
+ .tcre-pf-link:hover .tcre-pf { color: var(--ta-text); text-decoration: underline; }
2253
+ .tcre-pub-views { flex: none; min-width: 56px; text-align: right; font-size: calc(16px * var(--ta-font-scale)); font-weight: 600; font-variant-numeric: tabular-nums; }
2254
+ .tcre-pub-views[data-none] { color: var(--ta-muted); font-weight: 400; }
2255
+ .tcre-pub-views small { display: block; color: var(--ta-muted); font-size: calc(11px * var(--ta-font-scale)); font-weight: 400; }
2256
+
2257
+ /* Numbers. */
2258
+ .tcre-data { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; align-items: start; }
2259
+ .tcre-home[data-compact] .tcre-data { grid-template-columns: minmax(0, 1fr); }
2260
+ .tcre-home[data-compact] .tcre-bar { grid-template-columns: minmax(64px, 104px) minmax(0, 1fr) 52px; }
2261
+ .tcre-kpis { grid-column: 1 / -1; display: flex; padding: 16px 0; }
2262
+ .tcre-kpi { flex: 1; min-width: 0; padding: 0 18px; display: flex; flex-direction: column; gap: 3px; }
2263
+ .tcre-kpi + .tcre-kpi { border-left: 1px solid var(--tcre-line); }
2264
+ .tcre-kpi b { display: flex; align-items: baseline; gap: 6px; font-size: calc(22px * var(--ta-font-scale)); font-weight: 650; line-height: 1.2; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
2265
+ .tcre-kpi[data-none] b { color: var(--ta-muted); font-weight: 400; }
2266
+ .tcre-kpi em { font-style: normal; font-weight: 500; font-size: calc(12px * var(--ta-font-scale)); color: var(--tcre-ok); }
2267
+ .tcre-kpi em[data-down] { color: var(--ta-danger, #dc2626); }
2268
+ .tcre-kpi span { color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
2269
+ .tcre-home[data-compact] .tcre-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; padding: 14px 0; }
2270
+ .tcre-home[data-compact] .tcre-kpi { padding: 0 14px; }
2271
+ .tcre-home[data-compact] .tcre-kpi:nth-child(3n + 1) { border-left: 0; }
2272
+ .tcre-home[data-compact] .tcre-kpi b { font-size: calc(18px * var(--ta-font-scale)); }
2273
+ .tcre-panel { padding: 14px 16px 12px; }
2274
+ .tcre-panel-title { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 8px; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }
2275
+ .tcre-insights, .tcre-wide { grid-column: 1 / -1; }
2276
+ .tcre-insight { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: calc(13.5px * var(--ta-font-scale)); line-height: 1.55; }
2277
+ .tcre-insight + .tcre-insight { border-top: 1px solid var(--tcre-line); }
2278
+ .tcre-insight .tcre-series-tag { margin-right: 8px; }
2279
+ .tcre-insight-icon { flex: none; width: 24px; height: 24px; margin-top: -1px; border-radius: 8px; display: grid; place-items: center; }
2280
+ .tcre-insight[data-tone='good'] .tcre-insight-icon { color: var(--tcre-ok); background: color-mix(in oklab, var(--tcre-ok) 14%, transparent); }
2281
+ .tcre-insight[data-tone='bad'] .tcre-insight-icon { color: var(--ta-danger, #dc2626); background: color-mix(in oklab, var(--ta-danger, #dc2626) 12%, transparent); }
2282
+ .tcre-insight[data-tone='idea'] .tcre-insight-icon { color: #eab308; background: color-mix(in oklab, #eab308 15%, transparent); }
2283
+ .tcre-bar { display: grid; grid-template-columns: minmax(72px, 180px) 1fr 56px; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 6px 0; font-size: calc(12.5px * var(--ta-font-scale)); }
2284
+ .tcre-bar-label { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ta-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2285
+ .tcre-bar-label i { flex: none; width: 7px; height: 7px; border-radius: 2px; }
2286
+ .tcre-bar-track { height: 8px; border-radius: 4px; background: var(--ta-chip); overflow: hidden; }
2287
+ .tcre-bar-track i { display: block; height: 100%; min-width: 2px; border-radius: 4px; background: var(--ta-text); }
2288
+ .tcre-bar-value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
2289
+ .tcre-bar-note { grid-column: 2 / 4; color: var(--ta-muted); font-size: calc(11.5px * var(--ta-font-scale)); }
2290
+ .tcre-line { display: block; width: 100%; height: 90px; overflow: visible; }
2291
+ .tcre-line polyline { fill: none; stroke: #a855f7; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
2292
+ .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; }
2293
+ .tcre-top-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: calc(13px * var(--ta-font-scale)); }
2294
+ .tcre-top-row + .tcre-top-row { border-top: 1px solid var(--tcre-line); }
2295
+ .tcre-top-row > b { flex: none; width: 18px; color: var(--ta-muted); font-variant-numeric: tabular-nums; }
2296
+ .tcre-top-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2297
+ .tcre-goal-row { display: flex; justify-content: space-between; margin: 8px 0 6px; font-size: calc(13px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }
1322
2298
  .tcre-goal-track { height: 6px; border-radius: 3px; background: var(--ta-chip); overflow: hidden; }
1323
- .tcre-goal-track i { display: block; height: 100%; border-radius: 3px; background: var(--ta-text); }
1324
- .tcre-empty { margin: 0 0 10px; border: 1px dashed color-mix(in oklab, var(--ta-text) 16%, transparent); border-radius: 16px; }
1325
- .tcre-empty .ta-empty-compact { padding: 22px 14px; }
1326
- .tcre-empty .ta-empty-hint { max-width: 240px; }
1327
- .tcre-small { height: calc(28px * var(--ta-font-scale)); margin-top: 6px; padding: 0 12px; font-size: calc(12.5px * var(--ta-font-scale)); }
1328
- .tcre-muted { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }
1329
- .tcre-foot { display: flex; justify-content: center; padding: 6px 0; }
1330
- .tcre-board { height: 100%; display: flex; flex-direction: column; background: var(--ta-side); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); line-height: 1.5; }
1331
- .tcre-board-bar { display: flex; align-items: center; gap: 16px; padding: 10px 24px; border-bottom: 1px solid var(--ta-border-muted, var(--ta-border)); }
1332
- .tcre-board-bar .tcre-link { padding: 5px 12px; border-radius: 999px; color: var(--ta-secondary); }
1333
- .tcre-board-bar .tcre-link:hover { background: var(--ta-hover); color: var(--ta-text); }
1334
- .tcre-pill { padding: 5px 12px; border-radius: 999px; background: var(--ta-chip); color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; }
1335
- .tcre-pill b { margin-left: 2px; color: var(--ta-text); font-weight: 600; }
1336
- .tcre-grow { flex: 1; }
1337
- .tcre-board-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 16px; padding: 18px 24px 0; overflow-x: auto; }
1338
- .tcre-board-col { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
1339
- .tcre-board-col header { display: flex; align-items: center; gap: 6px; height: 22px; margin: 0 2px 12px; font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 600; }
1340
- .tcre-board-col header em { min-width: 18px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: var(--ta-chip); color: var(--ta-secondary); text-align: center; line-height: 18px; }
1341
- .tcre-board-list { flex: 1; overflow-y: auto; padding-bottom: 20px; }
1342
- .tcre-board .tcre-card { padding: 11px 12px; }
1343
- .tcre-board :is(.tcre-topic-title, .tcre-making-title) { font-size: calc(13.5px * var(--ta-font-scale)); }
1344
- .tcre-board .tcre-topic-foot { flex-wrap: wrap; }
1345
- .tcre-setup { max-width: 520px; margin: 18px auto; }
1346
- .tcre-setup-title { font-size: calc(20px * var(--ta-font-scale)); font-weight: 600; margin: 0 2px 12px; }
1347
- .tcre-setup-label { margin: 16px 2px 8px; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }
2299
+ .tcre-goal-track i { display: block; height: 100%; border-radius: 3px; background: var(--tcre-ok); }
2300
+ .tcre-data-note { grid-column: 1 / -1; text-align: center; }
2301
+
2302
+ /* What is empty, what was removed. */
2303
+ .tcre-empty { margin: 0 0 12px; border: 1px dashed color-mix(in oklab, var(--ta-text) 16%, transparent); border-radius: 16px; }
2304
+ .tcre-empty .ta-empty-compact { padding: 26px 14px; }
2305
+ .tcre-empty .ta-empty-hint { max-width: 260px; }
2306
+ .tcre-removed { margin-top: 24px; text-align: center; }
2307
+ .tcre-removed-list { max-width: var(--ta-page-width); margin: 8px auto 0; text-align: left; }
2308
+ .tcre-removed-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }
2309
+ .tcre-removed-row + .tcre-removed-row { border-top: 1px solid var(--tcre-line); }
2310
+ .tcre-removed-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2311
+
2312
+ /* Settings. */
2313
+ .tcre-setup { max-width: var(--ta-page-width); margin: 22px auto; }
2314
+ .tcre-setup-title { font-size: calc(20px * var(--ta-font-scale)); font-weight: 650; margin: 0 2px 14px; }
2315
+ .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; }
2316
+ .tcre-setup-label span { color: var(--ta-muted); font-weight: 400; font-size: calc(12px * var(--ta-font-scale)); }
1348
2317
  .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; }
1349
- .tcre-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
2318
+ :root[data-theme='light'] .tcre-input { box-shadow: inset 0 0 0 1px var(--tcre-line); }
2319
+ .tcre-series-edit { padding: 4px 8px 4px 14px; }
2320
+ .tcre-series-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
2321
+ .tcre-series-row + .tcre-series-row { border-top: 1px solid var(--tcre-line); }
2322
+ .tcre-series-row > i { flex: none; width: 4px; align-self: stretch; margin: 4px 0; border-radius: 2px; background: var(--tcre-c); }
2323
+ .tcre-series-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
2324
+ .tcre-field { width: 100%; box-sizing: border-box; padding: 3px 4px; border: 0; border-radius: 6px; background: transparent; color: var(--ta-secondary); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); outline: none; }
2325
+ .tcre-field:focus { background: var(--ta-hover); }
2326
+ .tcre-field-name { color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }
2327
+ .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); }
2328
+ .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; }
2329
+ .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; }
2330
+ .tcre-series-edit .tcre-series-add:first-child { border-top: 0; }
2331
+ .tcre-pick { display: flex; flex-wrap: wrap; gap: 8px; }
1350
2332
  .tcre-pick button { height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--ta-card); font: inherit; cursor: pointer; box-shadow: inset 0 0 0 1px var(--ta-border-muted, var(--ta-border)); }
1351
2333
  .tcre-pick button[aria-pressed='true'] { box-shadow: inset 0 0 0 1.5px var(--ta-text); }
1352
2334
  .tcre-pick button[aria-pressed='true'] .tcre-pf { color: var(--ta-text); font-weight: 600; }
2335
+ .tcre-setup .tcre-buttons { margin-top: 26px; }
2336
+
2337
+ @media (prefers-reduced-motion: reduce) { .tcre-body { animation: none; } .tcre-pipe li[data-state='now'] .tcre-pipe-dot, .tcre-pulse { animation: none; } }
1353
2338
  `;
1354
2339
  function injectStyle() {
1355
2340
  const element = document.createElement("style");