@famibee/skynovel 1.30.2 → 1.30.3
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/app.js +53 -54
- package/dist/app.js.map +1 -1
- package/dist/appMain.js +1 -1
- package/dist/appMain.js.map +1 -1
- package/dist/sn/TxtLayer.d.ts.map +1 -1
- package/dist/sn/TxtStage.d.ts.map +1 -1
- package/dist/web.js +53 -54
- package/dist/web.js.map +1 -1
- package/package.json +2 -2
package/dist/app.js
CHANGED
|
@@ -815,7 +815,7 @@ function argChk_Color(hash2, name2, def) {
|
|
|
815
815
|
return hash2[name2] = parseColor(String(v2));
|
|
816
816
|
}
|
|
817
817
|
const REG_ERRMES_JSON = /JSON at position (\d+)$/;
|
|
818
|
-
function mesErrJSON(hArg, nm
|
|
818
|
+
function mesErrJSON(hArg, nm, mes = "") {
|
|
819
819
|
var _a3;
|
|
820
820
|
const col = ((_a3 = mes.match(REG_ERRMES_JSON)) != null ? _a3 : ["", ""])[1];
|
|
821
821
|
return `[${hArg[":\u30BF\u30B0\u540D"]}] ${nm} \u5C5E\u6027\u306E\u89E3\u6790\u30A8\u30E9\u30FC : ${mes}
|
|
@@ -2024,6 +2024,7 @@ class Socket$1 extends Emitter {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
}
|
|
2026
2026
|
Socket$1.protocol = protocol$1;
|
|
2027
|
+
Socket$1.protocol;
|
|
2027
2028
|
function url$1(uri, path = "", loc) {
|
|
2028
2029
|
let obj = uri;
|
|
2029
2030
|
loc = loc || typeof location !== "undefined" && location;
|
|
@@ -18108,7 +18109,7 @@ var _ = function() {
|
|
|
18108
18109
|
this._sounds[t2].stop();
|
|
18109
18110
|
return this;
|
|
18110
18111
|
}, t.prototype.exists = function(t2, e) {
|
|
18111
|
-
return !!this._sounds[t2];
|
|
18112
|
+
return e === void 0 && (e = false), !!this._sounds[t2];
|
|
18112
18113
|
}, t.prototype.find = function(t2) {
|
|
18113
18114
|
return this.exists(t2, true), this._sounds[t2];
|
|
18114
18115
|
}, t.prototype.play = function(t2, e) {
|
|
@@ -46878,16 +46879,21 @@ const _TxtStage = class extends Container {
|
|
|
46878
46879
|
}
|
|
46879
46880
|
if (v2.lnk) {
|
|
46880
46881
|
const eCh = v2.elm.parentElement.closest("[data-arg]");
|
|
46881
|
-
const aLnk = JSON.parse((_c3 = eCh.
|
|
46882
|
+
const aLnk = JSON.parse((_c3 = eCh.dataset.arg) != null ? _c3 : "{}");
|
|
46882
46883
|
aLnk.key = `lnk=[${i2}] ` + this.name;
|
|
46883
46884
|
const sp = new Sprite();
|
|
46884
46885
|
__privateMethod(this, _spWork, spWork_fn).call(this, sp, aLnk, add3, rct, ease, cis != null ? cis : {});
|
|
46885
46886
|
const st_normal = (_d2 = aLnk.style) != null ? _d2 : "";
|
|
46886
46887
|
const st_hover = st_normal + ((_e = aLnk.style_hover) != null ? _e : "");
|
|
46887
46888
|
const st_clicked = st_normal + ((_f = aLnk.style_clicked) != null ? _f : "");
|
|
46889
|
+
const st_bk = eCh.style.cssText;
|
|
46890
|
+
const fncStyle = (st) => {
|
|
46891
|
+
if (!st)
|
|
46892
|
+
return;
|
|
46893
|
+
eCh.style.cssText = st_bk + st;
|
|
46894
|
+
};
|
|
46888
46895
|
const cl = eCh.querySelectorAll(".sn_ch");
|
|
46889
46896
|
cl.forEach((e) => e.dataset.st_bk = e.style.cssText);
|
|
46890
|
-
const fncStyle = (st) => cl.forEach((e) => e.style.cssText = e.dataset.st_bk + st);
|
|
46891
46897
|
__privateGet(_TxtStage, _evtMng3).button(aLnk, sp, () => fncStyle(st_normal), () => {
|
|
46892
46898
|
if (!this.canFocus())
|
|
46893
46899
|
return false;
|
|
@@ -47849,12 +47855,13 @@ const _TxtLayer = class extends Layer {
|
|
|
47849
47855
|
__privateSet(this, _r_align, "");
|
|
47850
47856
|
__privateSet(this, _needGoTxt, false);
|
|
47851
47857
|
__privateSet(this, _putCh2, (ch, ruby) => {
|
|
47852
|
-
var _a3, _b3, _c3, _d2, _e, _f, _g, _h, _i, _j, _k;
|
|
47858
|
+
var _a3, _b3, _c3, _d2, _e, _f, _g, _h, _i, _j, _k, _l2, _m;
|
|
47853
47859
|
if (__privateGet(_TxtLayer, _cfg3).oCfg.debug.putCh)
|
|
47854
47860
|
console.log(`\u{1F58A} \u6587\u5B57\u8868\u793A text:\`${ch}\` ruby:\`${ruby}\` name:\`${this.name_}\``);
|
|
47855
47861
|
const a_ruby = ruby.split("\uFF5C");
|
|
47856
47862
|
let add_htm = "";
|
|
47857
47863
|
const isSkip = __privateGet(_TxtLayer, _evtMng4).isSkippingByKeyDown();
|
|
47864
|
+
const [a0, a1] = a_ruby;
|
|
47858
47865
|
switch (a_ruby.length) {
|
|
47859
47866
|
case 1:
|
|
47860
47867
|
__privateSet(this, _needGoTxt, true);
|
|
@@ -47874,7 +47881,7 @@ const _TxtLayer = class extends Layer {
|
|
|
47874
47881
|
add_htm = __privateMethod(this, _tagCh_sub, tagCh_sub_fn).call(this, ch, ruby, isSkip, __privateGet(this, _r_align));
|
|
47875
47882
|
break;
|
|
47876
47883
|
case 2:
|
|
47877
|
-
switch (
|
|
47884
|
+
switch (a0) {
|
|
47878
47885
|
case "start":
|
|
47879
47886
|
case "left":
|
|
47880
47887
|
case "center":
|
|
@@ -47885,54 +47892,48 @@ const _TxtLayer = class extends Layer {
|
|
|
47885
47892
|
case "1ruby":
|
|
47886
47893
|
__privateSet(this, _firstCh, false);
|
|
47887
47894
|
__privateSet(this, _needGoTxt, true);
|
|
47888
|
-
add_htm = __privateMethod(this, _tagCh_sub, tagCh_sub_fn).call(this, ch,
|
|
47895
|
+
add_htm = __privateMethod(this, _tagCh_sub, tagCh_sub_fn).call(this, ch, a1, isSkip, a0);
|
|
47889
47896
|
break;
|
|
47890
|
-
case "gotxt":
|
|
47891
|
-
|
|
47892
|
-
|
|
47893
|
-
|
|
47894
|
-
|
|
47895
|
-
|
|
47896
|
-
|
|
47897
|
-
|
|
47898
|
-
|
|
47897
|
+
case "gotxt":
|
|
47898
|
+
{
|
|
47899
|
+
__privateMethod(this, _popSpan, popSpan_fn).call(this);
|
|
47900
|
+
if (this.isCur)
|
|
47901
|
+
__privateGet(_a3 = _TxtLayer, _recText).call(_a3, __privateGet(this, _aSpan).join("").replace(/^<ruby> <rt> <\/rt><\/ruby>(<br\/>)+/, "").replace(/style='(anim\S+ \S+?;\s*)+/g, `style='`).replace(/( style=''| data-(add|arg|cmd)='.+?'|\n+|\t+)/g, "").replace(/class='sn_ch .+?'/g, `class='sn_ch'`).replaceAll(`class='offrec'`, `style='display: none;'`).replaceAll("`", "\\`"));
|
|
47902
|
+
if (__privateGet(this, _needGoTxt)) {
|
|
47903
|
+
__privateGet(this, _txs).goTxt(__privateGet(this, _aSpan));
|
|
47904
|
+
__privateSet(this, _needGoTxt, false);
|
|
47905
|
+
__privateSet(this, _cumDelay, 0);
|
|
47906
|
+
}
|
|
47907
|
+
}
|
|
47899
47908
|
return;
|
|
47900
|
-
}
|
|
47901
47909
|
case "add":
|
|
47902
47910
|
{
|
|
47903
|
-
const o = JSON.parse(
|
|
47904
|
-
(_b3 = o.style) != null ?
|
|
47905
|
-
|
|
47906
|
-
if (stk)
|
|
47907
|
-
o.style = ((_c3 = stk.o.style) != null ? _c3 : "") + o.style;
|
|
47911
|
+
const o = JSON.parse(a1);
|
|
47912
|
+
__privateGet(this, _aSpan).push(`<span style='display: inline;${(_c3 = (_b3 = __privateGet(this, _stkASpan).at(-1)) == null ? void 0 : _b3.o.style) != null ? _c3 : ""}${(_d2 = o.style) != null ? _d2 : ""} ${__privateMethod(this, _style_delay, style_delay_fn).call(this, isSkip)}' class='sn_ch sn_ch_in_${__privateGet(this, _$ch_in_style)}' data-add='${JSON.stringify(o)}'>`);
|
|
47913
|
+
delete o.style;
|
|
47908
47914
|
__privateMethod(this, _pushSpan, pushSpan_fn).call(this, o);
|
|
47909
|
-
__privateGet(this, _aSpan).push(`<span style='${o.style}' data-add='${JSON.stringify(o)}'>`);
|
|
47910
47915
|
}
|
|
47911
47916
|
return;
|
|
47912
47917
|
case "add_close":
|
|
47918
|
+
__privateGet(this, _aSpan).push("</span>");
|
|
47913
47919
|
__privateMethod(this, _popSpan, popSpan_fn).call(this);
|
|
47914
|
-
if (__privateGet(this, _stkASpan).length > 0)
|
|
47915
|
-
__privateGet(this, _aSpan).splice(-2, 1);
|
|
47916
|
-
else
|
|
47917
|
-
__privateGet(this, _aSpan).push(`</span>`);
|
|
47918
47920
|
return;
|
|
47919
47921
|
case "grp":
|
|
47920
47922
|
__privateSet(this, _needGoTxt, true);
|
|
47921
47923
|
{
|
|
47922
|
-
const
|
|
47923
|
-
const o = JSON.parse(arg);
|
|
47924
|
+
const o = JSON.parse(a1);
|
|
47924
47925
|
o.delay = __privateGet(this, _cumDelay);
|
|
47925
|
-
(
|
|
47926
|
+
(_e = o.id) != null ? _e : o.id = __privateGet(this, _aSpan).length;
|
|
47926
47927
|
if (o.id === "break") {
|
|
47927
47928
|
__privateGet(this, _txs).dispBreak(o.pic);
|
|
47928
47929
|
return;
|
|
47929
47930
|
}
|
|
47930
|
-
(
|
|
47931
|
-
const wait = Number((
|
|
47931
|
+
(_f = o.style) != null ? _f : o.style = "";
|
|
47932
|
+
const wait = Number((_g = o.wait) != null ? _g : -1);
|
|
47932
47933
|
const sc = wait != 0 ? ` sn_ch_in_${__privateGet(this, _$ch_in_style)}` : "";
|
|
47933
47934
|
const ad = wait < 0 ? "" : ` animation-duration: ${wait}ms;`;
|
|
47934
|
-
const lnk = (
|
|
47935
|
-
add_htm = `<span data-cmd='grp' data-id='${o.id}' data-arg='${JSON.stringify(o)}' class='sn_ch${sc}' style='${__privateMethod(this, _style_delay, style_delay_fn).call(this, isSkip)}${ad} ${o.style}'${lnk != null ? lnk : ""} data-add='{"ch_in_style":"${__privateGet(this, _$ch_in_style)}", "ch_out_style":"${__privateGet(this, _$ch_out_style)}"}'>\u3000</span>`;
|
|
47935
|
+
const lnk = (_h = __privateGet(this, _stkASpan).at(0)) == null ? void 0 : _h.o[":link"];
|
|
47936
|
+
add_htm = `<span data-cmd='grp' data-id='${o.id}' data-arg='${JSON.stringify(o)}' class='sn_ch${sc}' style='${__privateMethod(this, _style_delay, style_delay_fn).call(this, isSkip)}${ad} ${(_i = o.style) != null ? _i : ""}'${lnk != null ? lnk : ""} data-add='{"ch_in_style":"${__privateGet(this, _$ch_in_style)}", "ch_out_style":"${__privateGet(this, _$ch_out_style)}"}'>\u3000</span>`;
|
|
47936
47937
|
if (__privateGet(this, _firstCh)) {
|
|
47937
47938
|
__privateSet(this, _firstCh, false);
|
|
47938
47939
|
add_htm = `<ruby>${add_htm}<rt>\u3000</rt></ruby>`;
|
|
@@ -47942,33 +47943,31 @@ const _TxtLayer = class extends Layer {
|
|
|
47942
47943
|
}
|
|
47943
47944
|
break;
|
|
47944
47945
|
case "del":
|
|
47945
|
-
const id_del = a_ruby[1];
|
|
47946
|
-
if (id_del !== "break")
|
|
47947
|
-
throw "\u6587\u5B57\u30EC\u30A4\u30E4del\u30B3\u30DE\u30F3\u30C9\u306F\u3001\u73FE\u5728id=break\u306E\u307F\u30B5\u30DD\u30FC\u30C8\u3057\u307E\u3059";
|
|
47948
47946
|
TxtStage.delBreak();
|
|
47949
47947
|
return;
|
|
47950
47948
|
case "span":
|
|
47951
|
-
__privateMethod(this, _popSpan, popSpan_fn).call(this);
|
|
47952
|
-
__privateSet(this, _needGoTxt, true);
|
|
47953
47949
|
{
|
|
47954
|
-
|
|
47955
|
-
|
|
47950
|
+
__privateMethod(this, _popSpan, popSpan_fn).call(this);
|
|
47951
|
+
__privateSet(this, _needGoTxt, true);
|
|
47952
|
+
const o = JSON.parse(a1);
|
|
47953
|
+
if (o.style)
|
|
47954
|
+
__privateMethod(this, _pushSpan, pushSpan_fn).call(this, o);
|
|
47956
47955
|
}
|
|
47957
47956
|
return;
|
|
47958
47957
|
case "link":
|
|
47959
|
-
__privateMethod(this, _popSpan, popSpan_fn).call(this);
|
|
47960
|
-
__privateSet(this, _needGoTxt, true);
|
|
47961
47958
|
{
|
|
47962
|
-
|
|
47963
|
-
(
|
|
47959
|
+
__privateMethod(this, _popSpan, popSpan_fn).call(this);
|
|
47960
|
+
__privateSet(this, _needGoTxt, true);
|
|
47961
|
+
const o = JSON.parse(a1);
|
|
47964
47962
|
o[":link"] = ` data-lnk='@'`;
|
|
47965
|
-
__privateGet(this, _aSpan).push(`<span data-arg='${
|
|
47963
|
+
__privateGet(this, _aSpan).push(`<span data-arg='${a1}' class='sn_ch sn_ch_in_${__privateGet(this, _$ch_in_style)}' style='display: inline;${(_j = o.style) != null ? _j : ""} ${__privateMethod(this, _style_delay, style_delay_fn).call(this, isSkip)}' data-add='{"ch_in_style":"${__privateGet(this, _$ch_in_style)}", "ch_out_style":"${__privateGet(this, _$ch_out_style)}"}'}>`);
|
|
47964
|
+
delete o.style;
|
|
47966
47965
|
__privateMethod(this, _pushSpan, pushSpan_fn).call(this, o);
|
|
47967
47966
|
}
|
|
47968
47967
|
return;
|
|
47969
47968
|
case "endlink":
|
|
47970
47969
|
__privateSet(this, _needGoTxt, true);
|
|
47971
|
-
__privateGet(this, _aSpan).push(
|
|
47970
|
+
__privateGet(this, _aSpan).push("</span>");
|
|
47972
47971
|
__privateMethod(this, _popSpan, popSpan_fn).call(this);
|
|
47973
47972
|
return;
|
|
47974
47973
|
default:
|
|
@@ -47977,24 +47976,24 @@ const _TxtLayer = class extends Layer {
|
|
|
47977
47976
|
}
|
|
47978
47977
|
break;
|
|
47979
47978
|
case 3:
|
|
47980
|
-
|
|
47981
|
-
__privateSet(this, _needGoTxt, true);
|
|
47982
|
-
const [cmd0, tx, rb0] = a_ruby;
|
|
47983
|
-
switch (cmd0) {
|
|
47979
|
+
switch (a0) {
|
|
47984
47980
|
case "tcy":
|
|
47981
|
+
__privateSet(this, _firstCh, false);
|
|
47982
|
+
__privateSet(this, _needGoTxt, true);
|
|
47985
47983
|
{
|
|
47984
|
+
const [, tx, rb0] = a_ruby;
|
|
47986
47985
|
if (__privateGet(_TxtLayer, _val).doRecLog())
|
|
47987
47986
|
__privateSet(this, _page_text, __privateGet(this, _page_text) + (ch + (ruby ? `\u300A${ruby}\u300B` : "")));
|
|
47988
47987
|
const rb = CmnLib.isSafari ? rb0.replace(/[A-Za-z0-9]/g, (s2) => String.fromCharCode(s2.charCodeAt(0) + 65248)) : rb0;
|
|
47989
47988
|
const rs = this.mkStyle_r_align(tx, rb, __privateGet(this, _r_align));
|
|
47990
|
-
const lnk = (
|
|
47989
|
+
const lnk = (_k = __privateGet(this, _stkASpan).at(0)) == null ? void 0 : _k.o[":link"];
|
|
47991
47990
|
add_htm = `<span class='sn_ch sn_ch_in_${__privateGet(this, _$ch_in_style)}' style='${__privateGet(this, _fncFFSStyle).call(this, tx)}${__privateMethod(this, _style_delay, style_delay_fn).call(this, isSkip)}'><ruby><span ${lnk != null ? lnk : ""} style='
|
|
47992
47991
|
text-combine-upright: all;
|
|
47993
47992
|
-webkit-text-combine: horizontal;
|
|
47994
47993
|
' data-add='{"ch_in_style":"${__privateGet(this, _$ch_in_style)}", "ch_out_style":"${__privateGet(this, _$ch_out_style)}"}'>${tx}</span>
|
|
47995
47994
|
<rt${rs}>${rb}</rt></ruby></span>`;
|
|
47996
47995
|
if (__privateGet(this, _ch_in_join))
|
|
47997
|
-
__privateSet(this, _cumDelay, __privateGet(this, _cumDelay) + (__privateGet(_TxtLayer, _doAutoWc) ? (
|
|
47996
|
+
__privateSet(this, _cumDelay, __privateGet(this, _cumDelay) + (__privateGet(_TxtLayer, _doAutoWc) ? (_l2 = __privateGet(_TxtLayer, _hAutoWc)[ch.charAt(0)]) != null ? _l2 : 0 : LayerMng.msecChWait));
|
|
47998
47997
|
}
|
|
47999
47998
|
break;
|
|
48000
47999
|
default:
|
|
@@ -48002,7 +48001,7 @@ text-combine-upright: all;
|
|
|
48002
48001
|
}
|
|
48003
48002
|
break;
|
|
48004
48003
|
}
|
|
48005
|
-
__privateGet(this, _aSpan).push(__privateGet(
|
|
48004
|
+
__privateGet(this, _aSpan).push(__privateGet(_m = _TxtLayer, _rec).call(_m, add_htm));
|
|
48006
48005
|
});
|
|
48007
48006
|
__privateSet(this, _cumDelay, 0);
|
|
48008
48007
|
__privateSet(this, _firstCh, true);
|