@takagaki/cortex-decisions-viewer 0.12.267 → 0.12.268
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/render.js +100 -26
- package/package.json +1 -1
package/dist/render.js
CHANGED
|
@@ -3063,7 +3063,7 @@ function memoryRefreshResultTextOf(result, message) {
|
|
|
3063
3063
|
if (result === "started")
|
|
3064
3064
|
return "更新を始めました";
|
|
3065
3065
|
if (result === "joined")
|
|
3066
|
-
return "
|
|
3066
|
+
return "すでに更新しています";
|
|
3067
3067
|
if (result === "daily_limit")
|
|
3068
3068
|
return "今日はこのプロジェクトでこれ以上押せません(1 日 20 回まで)";
|
|
3069
3069
|
if (result === "monthly_cap")
|
|
@@ -6762,7 +6762,7 @@ button.ops-card-btn:disabled { opacity: .6; cursor: default; }
|
|
|
6762
6762
|
.mclk-tag { width: 160px; font-size: 13px; }
|
|
6763
6763
|
}
|
|
6764
6764
|
/* 記憶の更新を押した瞬間の演出(Dreaming・便 DREAMING・見本 A)。外のフォントは読まない。音は鳴らさない。押しは通す */
|
|
6765
|
-
.dreaming-veil { --dv-night: #0f1630; --dv-night2: #1b2552; --dv-gold: #d6b25e; --dv-gold-hi: #f6e3a6; --dv-gold-lo: #9c7a2c; --dv-wd: .9s;
|
|
6765
|
+
.dreaming-veil { --dv-night: #0f1630; --dv-night2: #1b2552; --dv-gold: #d6b25e; --dv-gold-hi: #f6e3a6; --dv-gold-lo: #9c7a2c; --dv-wd: .9s;
|
|
6766
6766
|
position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; overflow: hidden; }
|
|
6767
6767
|
.dreaming-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, var(--dv-night2) 0%, var(--dv-night) 62%, #070b1c 100%); opacity: 0; }
|
|
6768
6768
|
.dreaming-stars { position: absolute; inset: 0; opacity: 0; }
|
|
@@ -6778,12 +6778,19 @@ button.ops-card-btn:disabled { opacity: .6; cursor: default; }
|
|
|
6778
6778
|
.dreaming-word { font-family: Georgia, "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif; font-style: italic; font-weight: 600; font-size: clamp(48px, 11vw, 104px); line-height: 1.15; letter-spacing: .02em; filter: drop-shadow(0 0 14px rgba(246, 227, 166, .35)); }
|
|
6779
6779
|
.dreaming-ch { display: inline-block; opacity: 0; transform: translateY(14px); padding-inline: .02em; color: var(--dv-gold-hi); background: linear-gradient(100deg, var(--dv-gold-lo) 0%, var(--dv-gold) 30%, #fff6d8 48%, var(--dv-gold) 66%, var(--dv-gold-lo) 100%); background-size: 260% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
|
|
6780
6780
|
.dreaming-sub { color: #c9d2ea; font-size: 15px; letter-spacing: .12em; opacity: 0; }
|
|
6781
|
-
.dreaming-veil.play .dreaming-bg { animation: dv-fade-in .5s ease-out forwards
|
|
6782
|
-
.dreaming-veil.play .dreaming-stars { animation: dv-fade-in 1s ease-out .2s forwards
|
|
6783
|
-
.dreaming-veil.play .dreaming-stage { animation: dv-stage-in .6s cubic-bezier(.2, .8, .2, 1) .15s forwards
|
|
6781
|
+
.dreaming-veil.play .dreaming-bg { animation: dv-fade-in .5s ease-out forwards; }
|
|
6782
|
+
.dreaming-veil.play .dreaming-stars { animation: dv-fade-in 1s ease-out .2s forwards; }
|
|
6783
|
+
.dreaming-veil.play .dreaming-stage { animation: dv-stage-in .6s cubic-bezier(.2, .8, .2, 1) .15s forwards; }
|
|
6784
|
+
/* 吸い込み(.fly)は、受け口が受け付けたと分かった後(かつ最後の吸い込みの手前まで流れた後)に足す。答えを待つあいだ(.wait)は時計を揺らしたまま */
|
|
6785
|
+
.dreaming-veil.fly .dreaming-bg { animation: dv-fade-in .5s ease-out forwards, dv-fade-out .7s ease-in .2s forwards; }
|
|
6786
|
+
.dreaming-veil.fly .dreaming-stars { animation: dv-fade-in 1s ease-out .2s forwards, dv-fade-out .7s ease-in .2s forwards; }
|
|
6787
|
+
.dreaming-veil.fly .dreaming-stage { animation: dv-stage-in .6s cubic-bezier(.2, .8, .2, 1) .15s forwards, dv-fly .8s cubic-bezier(.6, 0, .4, 1) forwards; }
|
|
6788
|
+
/* 断り・合流のとき: 幕を 0.3 秒で静かに消す */
|
|
6789
|
+
.dreaming-veil.closing { opacity: 0; transition: opacity .3s ease-out; }
|
|
6784
6790
|
.dreaming-veil.play .dreaming-ch { animation: dv-rise .7s cubic-bezier(.2, .8, .2, 1) forwards, dv-shimmer 1.8s ease-in-out both; }
|
|
6785
6791
|
.dreaming-veil.play .dreaming-sub { animation: dv-fade-in .6s ease-out calc(var(--dv-wd) + 1s) forwards; }
|
|
6786
6792
|
.dreaming-veil.play .dreaming-clock .mclk-svg { animation: dv-toll 2.8s .5s both; }
|
|
6793
|
+
.dreaming-veil.wait .dreaming-clock .mclk-svg { animation: dv-toll-wait 2.8s ease-in-out infinite; }
|
|
6787
6794
|
.dreaming-veil.play .dreaming-ring.r1 { animation: dv-ripple 1.8s ease-out 1.34s both; }
|
|
6788
6795
|
.dreaming-veil.play .dreaming-ring.r2 { animation: dv-ripple 1.8s ease-out 2.46s both; }
|
|
6789
6796
|
@keyframes dv-fade-in { to { opacity: 1; } }
|
|
@@ -6798,11 +6805,19 @@ button.ops-card-btn:disabled { opacity: .6; cursor: default; }
|
|
|
6798
6805
|
70% { transform: rotate(12deg); animation-timing-function: cubic-bezier(.45, 0, .6, 1); }
|
|
6799
6806
|
100% { transform: rotate(0); }
|
|
6800
6807
|
}
|
|
6808
|
+
@keyframes dv-toll-wait {
|
|
6809
|
+
0% { transform: rotate(0); animation-timing-function: cubic-bezier(.3, 0, .4, 1); }
|
|
6810
|
+
30% { transform: rotate(-12deg); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
|
|
6811
|
+
70% { transform: rotate(12deg); animation-timing-function: cubic-bezier(.45, 0, .6, 1); }
|
|
6812
|
+
100% { transform: rotate(0); }
|
|
6813
|
+
}
|
|
6801
6814
|
@keyframes dv-ripple { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.6); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); } }
|
|
6802
6815
|
/* 動きを抑える設定: 揺れ・波紋・吸い込みをやめ、絵と文字を静かに出して消すだけ */
|
|
6803
6816
|
@media (prefers-reduced-motion: reduce) {
|
|
6804
6817
|
.dreaming-veil.play * { animation-duration: .01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
|
|
6805
|
-
.dreaming-veil.play .dreaming-stage, .dreaming-veil.play .dreaming-bg, .dreaming-veil.play .dreaming-stars { animation: dv-fade-in .4s ease-out forwards
|
|
6818
|
+
.dreaming-veil.play .dreaming-stage, .dreaming-veil.play .dreaming-bg, .dreaming-veil.play .dreaming-stars { animation: dv-fade-in .4s ease-out forwards !important; }
|
|
6819
|
+
.dreaming-veil.fly .dreaming-stage, .dreaming-veil.fly .dreaming-bg, .dreaming-veil.fly .dreaming-stars { animation: dv-fade-in .4s ease-out forwards, dv-fade-out .6s ease-in forwards !important; }
|
|
6820
|
+
.dreaming-veil.wait .dreaming-clock .mclk-svg { animation: none !important; }
|
|
6806
6821
|
}
|
|
6807
6822
|
@media (prefers-reduced-motion: reduce) {
|
|
6808
6823
|
.mclk-sway, .mclk-stars, .mclk-tag { animation: none !important; }
|
|
@@ -16270,6 +16285,7 @@ ${intake_scope_1.tenantIntakeOpen.toString()}
|
|
|
16270
16285
|
var MEMORY_PREPARING_POLL_MS = 15000;
|
|
16271
16286
|
var MEMORY_VEIL_ON = false;
|
|
16272
16287
|
var MEMORY_VEIL_TIMERS = [];
|
|
16288
|
+
var MEMORY_DV = null; // 今出ている演出の状態 { veil, calm, gate(吸い込みの手前に着いたか), ok(started の答えが来たか) }
|
|
16273
16289
|
var MEMORY_BUSY = false;
|
|
16274
16290
|
var MEMORY_DAYS = 7;
|
|
16275
16291
|
var MEMORY_SIG = "";
|
|
@@ -16676,44 +16692,60 @@ ${intake_scope_1.tenantIntakeOpen.toString()}
|
|
|
16676
16692
|
function memoryRefresh() {
|
|
16677
16693
|
if (MEMORY_BUSY || !memoryCanRefreshNow()) return;
|
|
16678
16694
|
MEMORY_BUSY = true;
|
|
16695
|
+
// 🔴 押した瞬間に演出を始める(受け口の答えは待たない・便 DREAMING-3)。答えは dreamingAnswered が受ける
|
|
16696
|
+
try { dreamingPlay(); } catch (e) { dreamingStop(); } // 演出が出せなくても送る
|
|
16679
16697
|
renderMemoryClock();
|
|
16680
16698
|
memoryRefreshCall({}).then(function (r) {
|
|
16681
16699
|
MEMORY_BUSY = false;
|
|
16682
|
-
|
|
16683
|
-
if (play) memorySetPreparing();
|
|
16684
|
-
memoryRefreshToast(r, play);
|
|
16685
|
-
renderMemoryClock();
|
|
16686
|
-
if (play) dreamingPlay();
|
|
16700
|
+
dreamingAnswered("refresh", r);
|
|
16687
16701
|
});
|
|
16688
16702
|
}
|
|
16703
|
+
/**
|
|
16704
|
+
* 受け口の答えを、押した瞬間に始めた演出へ渡す(便 DREAMING-3)。started なら最後まで流して時計に吸い込む・断りと joined は演出を静かに閉じて
|
|
16705
|
+
* 今までどおりの知らせを出す。演出がすでに閉じていた(答えが遅くて 10 秒を超えた)ときは、演出なしでいつもどおりの知らせを出す
|
|
16706
|
+
*/
|
|
16707
|
+
function dreamingAnswered(source, r) {
|
|
16708
|
+
if (memoryDreamingPlayOf(source, r.result)) {
|
|
16709
|
+
memorySetPreparing();
|
|
16710
|
+
var live = dreamingResolve(true);
|
|
16711
|
+
memoryRefreshToast(r, live);
|
|
16712
|
+
} else {
|
|
16713
|
+
dreamingResolve(false);
|
|
16714
|
+
memoryRefreshToast(r, false);
|
|
16715
|
+
}
|
|
16716
|
+
renderMemoryClock();
|
|
16717
|
+
}
|
|
16689
16718
|
/**
|
|
16690
16719
|
* 開始(設計 2-1)。① 窓口に開始を書く → ② 書けたら(もう開始済みでも)続けて今すぐ更新の口を cause start で呼び、最初の回を起こす。
|
|
16691
16720
|
* ② が起こせなかったときも ① は残す(夜の起動役がその夜に同じ最初の回を起こす)ので「最初の記憶は今夜 HH:MM に作ります」
|
|
16692
16721
|
*/
|
|
16693
16722
|
async function memoryStart() {
|
|
16694
16723
|
// 設定を書いてから cause start の今すぐ更新を押し終えるまで MEMORY_BUSY を持ち続ける([今すぐ記憶を更新する]を重ねて押させない)
|
|
16695
|
-
|
|
16696
|
-
|
|
16724
|
+
if (MEMORY_BUSY) return;
|
|
16725
|
+
// 🔴 押した瞬間に演出を始める(設定の保存も受け口の答えも待たない・便 DREAMING-3)。出せなくても進む
|
|
16726
|
+
try { dreamingPlay(); } catch (e) { dreamingStop(); }
|
|
16727
|
+
var c;
|
|
16728
|
+
try { c = await memoryConfigAct("start", { days: MEMORY_DAYS }, true, true); } catch (e) { dreamingResolve(false); throw e; }
|
|
16729
|
+
if (!c) { dreamingResolve(false); return; }
|
|
16697
16730
|
// 開始が書けたかは config の答えそのもので見る(答えに view が無いと CONFIG の読み直しは非同期で、ここではまだ開始前のまま)
|
|
16698
16731
|
var m = memoryOfConfig();
|
|
16699
16732
|
var on = c.type === "ok" || c.type === "noChange" || (!!m && m.state === "on");
|
|
16700
16733
|
var r = null;
|
|
16701
16734
|
try {
|
|
16702
16735
|
if (on && memoryViaIntake()) r = await memoryRefreshCall({ cause: "start" });
|
|
16736
|
+
} catch (e) {
|
|
16737
|
+
dreamingResolve(false);
|
|
16738
|
+
throw e;
|
|
16703
16739
|
} finally {
|
|
16704
16740
|
MEMORY_BUSY = false;
|
|
16705
16741
|
}
|
|
16706
|
-
if (!on) showToast(c.message || "変更はありません", false);
|
|
16707
|
-
else if (r &&
|
|
16708
|
-
//
|
|
16709
|
-
|
|
16710
|
-
memoryRefreshToast(r, true);
|
|
16711
|
-
renderMemoryClock();
|
|
16712
|
-
dreamingPlay();
|
|
16742
|
+
if (!on) { dreamingResolve(false); showToast(c.message || "変更はありません", false); }
|
|
16743
|
+
else if (r && (r.result === "started" || r.result === "joined")) {
|
|
16744
|
+
// started: 演出が「開始しました」の知らせを兼ねる(トーストは重ねない)。joined: 演出を閉じて「すでに更新しています」
|
|
16745
|
+
dreamingAnswered("start", r);
|
|
16713
16746
|
return;
|
|
16714
16747
|
}
|
|
16715
|
-
else
|
|
16716
|
-
else showToast(memoryFirstTonightTextOf(Date.now(), memoryScheduleMinute()), false);
|
|
16748
|
+
else { dreamingResolve(false); showToast(memoryFirstTonightTextOf(Date.now(), memoryScheduleMinute()), false); }
|
|
16717
16749
|
renderMemoryClock();
|
|
16718
16750
|
}
|
|
16719
16751
|
/**
|
|
@@ -16990,7 +17022,7 @@ ${intake_scope_1.tenantIntakeOpen.toString()}
|
|
|
16990
17022
|
});
|
|
16991
17023
|
}
|
|
16992
17024
|
/**
|
|
16993
|
-
* 押した瞬間の演出 Dreaming(見本 A・便 DREAMING 指示 1
|
|
17025
|
+
* 押した瞬間の演出 Dreaming(見本 A・便 DREAMING 指示 1)。呼ぶのは、確認のモーダルを通って[このまま開始する]・[今すぐ更新する]を押した瞬間の 2 か所だけ(受け口の答えは待たない・便 DREAMING-3)。
|
|
16994
17026
|
* 音は鳴らさない。動きを抑える設定では、揺れ・吸い込みなしで静かに出して消す(約 3.3 秒)。演出の最中は吹き出しを出さず、終わる 0.6 秒前に出す
|
|
16995
17027
|
*/
|
|
16996
17028
|
function dreamingPlay() {
|
|
@@ -17025,7 +17057,7 @@ ${intake_scope_1.tenantIntakeOpen.toString()}
|
|
|
17025
17057
|
word.appendChild(ch);
|
|
17026
17058
|
});
|
|
17027
17059
|
stage.appendChild(word);
|
|
17028
|
-
stage.appendChild(el("div", { class: "dreaming-sub", text: "記憶の更新を始めました" }));
|
|
17060
|
+
stage.appendChild(el("div", { class: "dreaming-sub", "aria-hidden": "true", text: "記憶の更新を始めました" }));
|
|
17029
17061
|
veil.appendChild(stage);
|
|
17030
17062
|
document.body.appendChild(veil);
|
|
17031
17063
|
// 吸い込み先: 演出を始める時点の右下の時計(描き直しで押したボタンは捨てられているので、枠を測り直す)
|
|
@@ -17039,13 +17071,55 @@ ${intake_scope_1.tenantIntakeOpen.toString()}
|
|
|
17039
17071
|
stage.style.setProperty("--dv-fy", (cy - vh / 2) + "px");
|
|
17040
17072
|
veil.classList.add("play");
|
|
17041
17073
|
MEMORY_VEIL_ON = true;
|
|
17074
|
+
MEMORY_DV = { veil: veil, calm: calm, gate: false, ok: false };
|
|
17042
17075
|
renderMemoryClock();
|
|
17043
|
-
|
|
17044
|
-
MEMORY_VEIL_TIMERS.push(setTimeout(
|
|
17076
|
+
// 最後の吸い込みの手前(通常 3.6 秒・動きを抑える設定 2.6 秒)まで流す。答えが来ていれば吸い込む・まだなら時計を揺らして待つ(最長 10 秒)
|
|
17077
|
+
MEMORY_VEIL_TIMERS.push(setTimeout(dreamingGate, (calm ? 2.6 : 3.6) * 1000));
|
|
17078
|
+
}
|
|
17079
|
+
function dreamingGate() {
|
|
17080
|
+
var dv = MEMORY_DV;
|
|
17081
|
+
if (!dv) return;
|
|
17082
|
+
dv.gate = true;
|
|
17083
|
+
if (dv.ok) { dreamingFly(); return; }
|
|
17084
|
+
dv.veil.classList.add("wait");
|
|
17085
|
+
MEMORY_VEIL_TIMERS.push(setTimeout(function () { dreamingResolve(false); }, 10000));
|
|
17086
|
+
}
|
|
17087
|
+
/** 答えを演出へ渡す。ok が真なら流し切る・偽なら静かに閉じる。演出がもう無ければ偽を返す(呼び手はいつもどおり知らせを出す) */
|
|
17088
|
+
function dreamingResolve(ok) {
|
|
17089
|
+
var dv = MEMORY_DV;
|
|
17090
|
+
if (!dv) return false;
|
|
17091
|
+
if (!ok) { if (!dv.ok) dreamingClose(); return true; }
|
|
17092
|
+
dv.ok = true;
|
|
17093
|
+
if (dv.gate) dreamingFly();
|
|
17094
|
+
return true;
|
|
17095
|
+
}
|
|
17096
|
+
function dreamingFly() {
|
|
17097
|
+
var dv = MEMORY_DV;
|
|
17098
|
+
if (!dv || !dv.veil) return;
|
|
17099
|
+
MEMORY_VEIL_TIMERS.forEach(clearTimeout);
|
|
17100
|
+
MEMORY_VEIL_TIMERS = [];
|
|
17101
|
+
dv.veil.classList.remove("wait");
|
|
17102
|
+
dv.veil.classList.add("fly");
|
|
17103
|
+
var tail = dv.calm ? 700 : 1000;
|
|
17104
|
+
MEMORY_VEIL_TIMERS.push(setTimeout(function () { MEMORY_DV = null; MEMORY_VEIL_ON = false; MEMORY_OPEN = true; renderMemoryClock(); }, tail - 600));
|
|
17105
|
+
MEMORY_VEIL_TIMERS.push(setTimeout(dreamingStop, tail));
|
|
17106
|
+
}
|
|
17107
|
+
/** 断り・joined: 幕を 0.3 秒で静かに消す(吹き出しは開かない) */
|
|
17108
|
+
function dreamingClose() {
|
|
17109
|
+
var dv = MEMORY_DV;
|
|
17110
|
+
MEMORY_VEIL_TIMERS.forEach(clearTimeout);
|
|
17111
|
+
MEMORY_VEIL_TIMERS = [];
|
|
17112
|
+
MEMORY_DV = null;
|
|
17113
|
+
if (!dv || !dv.veil) return;
|
|
17114
|
+
dv.veil.classList.remove("wait");
|
|
17115
|
+
dv.veil.classList.add("closing");
|
|
17116
|
+
if (MEMORY_VEIL_ON) { MEMORY_VEIL_ON = false; renderMemoryClock(); }
|
|
17117
|
+
MEMORY_VEIL_TIMERS.push(setTimeout(dreamingStop, 300));
|
|
17045
17118
|
}
|
|
17046
17119
|
function dreamingStop() {
|
|
17047
17120
|
MEMORY_VEIL_TIMERS.forEach(clearTimeout);
|
|
17048
17121
|
MEMORY_VEIL_TIMERS = [];
|
|
17122
|
+
MEMORY_DV = null;
|
|
17049
17123
|
var old = document.getElementById("dreaming-veil");
|
|
17050
17124
|
if (old && old.parentNode) old.parentNode.removeChild(old);
|
|
17051
17125
|
if (MEMORY_VEIL_ON) { MEMORY_VEIL_ON = false; renderMemoryClock(); }
|
package/package.json
CHANGED