@famibee/skynovel 2.0.2 → 2.0.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/Button.js +36 -34
- package/dist/Button.js.map +1 -1
- package/dist/CallStack.js +11 -6
- package/dist/CallStack.js.map +1 -1
- package/dist/CmnInterface.js +13 -11
- package/dist/CmnInterface.js.map +1 -1
- package/dist/CmnLib.js +58 -56
- package/dist/CmnLib.js.map +1 -1
- package/dist/Config.js +9 -7
- package/dist/Config.js.map +1 -1
- package/dist/ConfigBase.js +52 -49
- package/dist/ConfigBase.js.map +1 -1
- package/dist/DebugMng.js +9 -6
- package/dist/DebugMng.js.map +1 -1
- package/dist/EventListenerCtn.js +6 -4
- package/dist/EventListenerCtn.js.map +1 -1
- package/dist/EventMng.js +522 -417
- package/dist/EventMng.js.map +1 -1
- package/dist/Grammar.js +22 -20
- package/dist/Grammar.js.map +1 -1
- package/dist/GrpLayer.js +58 -57
- package/dist/GrpLayer.js.map +1 -1
- package/dist/Layer.js +66 -64
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMng.js +461 -441
- package/dist/LayerMng.js.map +1 -1
- package/dist/Main.js +69 -67
- package/dist/Main.js.map +1 -1
- package/dist/PropParser.js +23 -19
- package/dist/PropParser.js.map +1 -1
- package/dist/Reading.js +422 -418
- package/dist/Reading.js.map +1 -1
- package/dist/RubySpliter.js +4 -2
- package/dist/RubySpliter.js.map +1 -1
- package/dist/ScriptIterator.js +374 -370
- package/dist/ScriptIterator.js.map +1 -1
- package/dist/SndBuf.js +643 -622
- package/dist/SndBuf.js.map +1 -1
- package/dist/SoundMng.js +59 -60
- package/dist/SoundMng.js.map +1 -1
- package/dist/SpritesMng.js +135 -129
- package/dist/SpritesMng.js.map +1 -1
- package/dist/SysBase.js +985 -950
- package/dist/SysBase.js.map +1 -1
- package/dist/TxtLayer.js +558 -551
- package/dist/TxtLayer.js.map +1 -1
- package/dist/Variable.js +47 -45
- package/dist/Variable.js.map +1 -1
- package/dist/chunk.js +11 -9
- package/dist/gamepad.js +396 -660
- package/dist/gamepad.js.map +1 -1
- package/dist/pixi.js +2631 -2593
- package/dist/pixi.js.map +1 -1
- package/dist/platform.js +6 -4
- package/dist/platform.js.map +1 -1
- package/dist/rolldown-runtime.js +20 -0
- package/dist/web.js +418 -418
- package/dist/web.js.map +1 -1
- package/dist_app/Button.js +36 -34
- package/dist_app/Button.js.map +1 -1
- package/dist_app/CallStack.js +11 -6
- package/dist_app/CallStack.js.map +1 -1
- package/dist_app/CmnInterface.js +13 -11
- package/dist_app/CmnInterface.js.map +1 -1
- package/dist_app/CmnLib.js +58 -56
- package/dist_app/CmnLib.js.map +1 -1
- package/dist_app/Config.js +9 -7
- package/dist_app/Config.js.map +1 -1
- package/dist_app/ConfigBase.js +52 -49
- package/dist_app/ConfigBase.js.map +1 -1
- package/dist_app/DebugMng.js +9 -6
- package/dist_app/DebugMng.js.map +1 -1
- package/dist_app/EventListenerCtn.js +6 -4
- package/dist_app/EventListenerCtn.js.map +1 -1
- package/dist_app/EventMng.js +522 -417
- package/dist_app/EventMng.js.map +1 -1
- package/dist_app/Grammar.js +22 -20
- package/dist_app/Grammar.js.map +1 -1
- package/dist_app/GrpLayer.js +58 -57
- package/dist_app/GrpLayer.js.map +1 -1
- package/dist_app/Layer.js +66 -64
- package/dist_app/Layer.js.map +1 -1
- package/dist_app/LayerMng.js +461 -441
- package/dist_app/LayerMng.js.map +1 -1
- package/dist_app/Main.js +69 -67
- package/dist_app/Main.js.map +1 -1
- package/dist_app/PropParser.js +23 -19
- package/dist_app/PropParser.js.map +1 -1
- package/dist_app/Reading.js +422 -418
- package/dist_app/Reading.js.map +1 -1
- package/dist_app/RubySpliter.js +4 -2
- package/dist_app/RubySpliter.js.map +1 -1
- package/dist_app/ScriptIterator.js +374 -370
- package/dist_app/ScriptIterator.js.map +1 -1
- package/dist_app/SndBuf.js +643 -622
- package/dist_app/SndBuf.js.map +1 -1
- package/dist_app/SoundMng.js +59 -60
- package/dist_app/SoundMng.js.map +1 -1
- package/dist_app/SpritesMng.js +135 -129
- package/dist_app/SpritesMng.js.map +1 -1
- package/dist_app/SysBase.js +985 -950
- package/dist_app/SysBase.js.map +1 -1
- package/dist_app/TxtLayer.js +558 -551
- package/dist_app/TxtLayer.js.map +1 -1
- package/dist_app/Variable.js +47 -45
- package/dist_app/Variable.js.map +1 -1
- package/dist_app/app.js +62 -63
- package/dist_app/app.js.map +1 -1
- package/dist_app/appMain.js +11 -11
- package/dist_app/appMain.js.map +1 -1
- package/dist_app/chunk.js +11 -9
- package/dist_app/gamepad.js +396 -660
- package/dist_app/gamepad.js.map +1 -1
- package/dist_app/pixi.js +2028 -1990
- package/dist_app/pixi.js.map +1 -1
- package/dist_app/platform.js +6 -4
- package/dist_app/platform.js.map +1 -1
- package/dist_app/preload.js +1 -1
- package/dist_app/preload.js.map +1 -1
- package/dist_app/rolldown-runtime.js +20 -0
- package/package.json +20 -21
package/dist_app/CallStack.js
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/sn/CallStack.ts
|
|
2
|
+
function e() {
|
|
2
3
|
return {
|
|
3
4
|
"const.sn.macro": "{}",
|
|
4
5
|
"const.sn.me_call_scriptFn": ""
|
|
5
6
|
};
|
|
6
7
|
}
|
|
7
|
-
function
|
|
8
|
+
function t() {
|
|
8
9
|
return {
|
|
9
10
|
":hEvt1Time": {},
|
|
10
|
-
":hMp":
|
|
11
|
+
":hMp": e(),
|
|
11
12
|
":lenIfStk": 1
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
|
-
var
|
|
15
|
-
|
|
15
|
+
var n = class {
|
|
16
|
+
fn;
|
|
17
|
+
idx;
|
|
18
|
+
csArg;
|
|
19
|
+
constructor(e = "", n = 0, r = t()) {
|
|
16
20
|
this.fn = e, this.idx = n, this.csArg = r;
|
|
17
21
|
}
|
|
18
22
|
toString = () => `[fn:${this.fn}, idx:${String(this.idx)}, csArg:${JSON.stringify(this.csArg)}]`;
|
|
19
23
|
};
|
|
20
|
-
|
|
24
|
+
//#endregion
|
|
25
|
+
export { t as n, e as r, n as t };
|
|
21
26
|
|
|
22
27
|
//# sourceMappingURL=CallStack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallStack.js","names":[
|
|
1
|
+
{"version":3,"file":"CallStack.js","names":[],"sources":["../src/sn/CallStack.ts"],"sourcesContent":["/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2018-2025 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport type {T_HEvt2Fnc} from './CmnInterface';\nimport type {TArg} from './Grammar';\n\n\n// マクロ変数(mp:)\nexport type T_H_VAL_MP = {\n\t'const.sn.macro'\t\t\t: string;\t// (json)実行中マクロのスクリプター用情報\n\t'const.sn.me_call_scriptFn'\t: string;\t// マクロの呼び元スクリプト\n}\nexport function creMP(): T_H_VAL_MP {return {\n\t\t'const.sn.macro'\t\t\t: '{}',\n\t\t'const.sn.me_call_scriptFn'\t: '',\n}}\n\nexport type ICallStackArg = TArg & {\n\t':resvToken'?\t: string;\t\t// call元のtoken\n\t':hEvt1Time'?\t: T_HEvt2Fnc;\t// call元のローカル予約イベント\n\t':hMp'\t\t\t: T_H_VAL_MP;\t// call元のmp:\n\t':タグ名'?\t\t: string;\n\t':lenIfStk'\t\t: number;\n}\nexport function creCSArg(): ICallStackArg {return {\n\t':hEvt1Time': {},\n\t':hMp'\t\t: creMP(),\n\t':lenIfStk'\t: 1,\n}}\n\n\nexport class CallStack {\n\tconstructor(readonly fn = '', readonly idx = 0, readonly csArg: ICallStackArg = creCSArg()) {}\n\n\treadonly\ttoString = ()=> `[fn:${this.fn}, idx:${String(this.idx)}, csArg:${JSON.stringify(this.csArg)}]`;\n\n}\n"],"mappings":";AAgBA,SAAgB,IAAoB;CAAC,OAAO;EAC1C,kBAAqB;EACrB,6BAA8B;CAChC;AAAC;AASD,SAAgB,IAA0B;CAAC,OAAO;EACjD,cAAc,CAAC;EACf,QAAU,EAAM;EAChB,aAAc;CACf;AAAC;AAGD,IAAa,IAAb,MAAuB;CACD;CAAkB;CAAkB;CAAzD,YAAY,IAAc,IAAI,IAAe,GAAG,IAAgC,EAAS,GAAG;EAAnC,AAApC,KAAA,KAAA,GAAkB,KAAA,MAAA,GAAkB,KAAA,QAAA;CAAoC;CAE7F,iBAAyB,OAAO,KAAK,GAAG,QAAQ,OAAO,KAAK,GAAG,EAAE,UAAU,KAAK,UAAU,KAAK,KAAK,EAAE;AAEvG"}
|
package/dist_app/CmnInterface.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
1
|
+
import { t as e, u as t } from "./CmnLib.js";
|
|
2
|
+
//#region src/sn/CmnInterface.ts
|
|
3
|
+
function n() {
|
|
3
4
|
return {
|
|
4
5
|
"sn.userFnTail": "",
|
|
5
6
|
"const.sn.autowc.enabled": !1,
|
|
@@ -14,14 +15,14 @@ function creSAVEDATA() {
|
|
|
14
15
|
"const.sn.scriptIdx": 0
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
+
function r() {
|
|
18
19
|
return {
|
|
19
20
|
"const.sn.cfg.ns": "",
|
|
20
21
|
"const.sn.aPageLog": "[]",
|
|
21
22
|
"const.sn.nativeWindow.x": 0,
|
|
22
23
|
"const.sn.nativeWindow.y": 0,
|
|
23
|
-
"const.sn.nativeWindow.w":
|
|
24
|
-
"const.sn.nativeWindow.h":
|
|
24
|
+
"const.sn.nativeWindow.w": e.stageW,
|
|
25
|
+
"const.sn.nativeWindow.h": e.stageH,
|
|
25
26
|
"const.sn.save.place": 1,
|
|
26
27
|
"const.sn.sound.BGM.volume": 1,
|
|
27
28
|
"const.sn.sound.SE.volume": 1,
|
|
@@ -32,8 +33,8 @@ function creSYS_DATA() {
|
|
|
32
33
|
"sn.auto.msecPageWait_Kidoku": 3500,
|
|
33
34
|
"sn.skip.mode": "s",
|
|
34
35
|
"sn.sound.BGM.vol_mul_talking": 1,
|
|
35
|
-
"sn.sound.global_volume": (e,
|
|
36
|
-
"sn.sound.movie_volume": (e,
|
|
36
|
+
"sn.sound.global_volume": (e, t) => 1,
|
|
37
|
+
"sn.sound.movie_volume": (e, t) => 1,
|
|
37
38
|
"sn.tagCh.canskip": !0,
|
|
38
39
|
"sn.tagCh.doWait": !0,
|
|
39
40
|
"sn.tagCh.doWait_Kidoku": !0,
|
|
@@ -42,9 +43,9 @@ function creSYS_DATA() {
|
|
|
42
43
|
"TextLayer.Back.Alpha": .5
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function i() {
|
|
46
47
|
return {
|
|
47
|
-
"const.Date.getDateStr": () =>
|
|
48
|
+
"const.Date.getDateStr": () => t(),
|
|
48
49
|
"const.Date.getTime": () => (/* @__PURE__ */ new Date()).getTime(),
|
|
49
50
|
"const.sn.bookmark.json": "[]",
|
|
50
51
|
"const.sn.config.window.width": 0,
|
|
@@ -71,7 +72,7 @@ function creTMP_DATA() {
|
|
|
71
72
|
"const.sn.Math.PI": Math.PI,
|
|
72
73
|
"const.sn.navigator.language": "jp",
|
|
73
74
|
"const.sn.needClick2Play": !1,
|
|
74
|
-
"const.sn.platform":
|
|
75
|
+
"const.sn.platform": e.platform,
|
|
75
76
|
"const.sn.screenResolutionX": screen.availWidth,
|
|
76
77
|
"const.sn.screenResolutionY": screen.availHeight,
|
|
77
78
|
"const.sn.sound.codecs": "",
|
|
@@ -86,6 +87,7 @@ function creTMP_DATA() {
|
|
|
86
87
|
"sn.tagL.enabled": !0
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
+
//#endregion
|
|
91
|
+
export { r as n, i as r, n as t };
|
|
90
92
|
|
|
91
93
|
//# sourceMappingURL=CmnInterface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmnInterface.js","names":[],"sources":["../src/sn/CmnInterface.ts"],"sourcesContent":["/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2018-2025 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport type {T_HSysBaseArg, T_SEARCHPATH} from './ConfigBase';\nimport type {TArg, TTag} from './Grammar';\nimport type {Areas, T_H_Areas} from './Areas';\nimport type {T_H_VAL_MP} from './CallStack';\nimport type {Layer, T_RecordPlayBack_lay} from './Layer';\nimport {CmnLib, getDateStr} from './CmnLib';\n\nimport type {DisplayObject, RenderTexture} from 'pixi.js';\n\n\n// 特定のプロパティだけrequiredにする型を作ってみる #TypeScript - Qiita https://qiita.com/islandryu/items/490414a537c203b151f7\nexport type T_PRequired<T,K extends keyof T> = T & {\n\t[P in K]-?: T[P]\n}\n\n// =============== PropParser\nexport type T_PropParser = {\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tparse(s: string): any;\n\tgetValAmpersand(val: string): string;\n}\n\n\n// =============== Plugin\nexport type T_PLUGIN_DECAB_RET = {\n\text_num\t: number;\n\tab\t\t: ArrayBuffer;\n};\nexport type T_PLUGIN_INFO = {\n\twindow: {\n\t\twidth\t: number;\n\t\theight\t: number;\n\t},\n}\nexport type T_PluginInitArg = {\n\tgetInfo(): T_PLUGIN_INFO;\n\taddTag(tag_name: string, tag_fnc: TTag): void;\n\taddLayCls(cls: string, fnc: T_LayerFactory): void;\n\tsearchPath: T_SEARCHPATH;\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tgetVal(arg_name: string, def?: number | string): any;\n\tresume(fnc?: ()=> void): void;\n\trender(dsp: DisplayObject, renTx?: RenderTexture, clear?: boolean): void;\n\tsetDec(fnc: (ext: string, tx: string)=> Promise<string>): void;\n\tsetDecAB(fnc: (ab: ArrayBuffer)=> Promise<T_PLUGIN_DECAB_RET>): void;\n\tsetEnc(fnc: (tx: string)=> Promise<string>): void;\n\tgetStK(fnc: ()=> string): void;\n\tgetHash(fnc: (str: string)=> string): void;\n}\nexport type T_Plugin = {\n\tinit(pia: T_PluginInitArg): Promise<void>;\n}\nexport type T_HPlugin = {[name: string]: T_Plugin;}\n\nexport type T_LayerFactory = ()=> Layer\n\n\n// =============== SysBase\nexport type T_SysBaseParams = [\n\thPlg\t: T_HPlugin,\n\targ?\t: T_HSysBaseArg,\n];\nexport type T_SysBaseLoadedParams = [\n\thPlg\t: T_HPlugin,\n\targ\t\t: T_HSysBaseArg,\n];\n\n\nexport type SYS_DEC_RET = HTMLImageElement | HTMLVideoElement | ArrayBuffer;\nexport type T_SysBase = {\n\tinitVal(hTmp: T_H_TMP_DATA, comp: (data: T_Data4Vari)=> void): Promise<void>;\n\tflush(): void;\n\n\taddHook(fnc: T_FncHook): void;\n\tcallHook: T_FncHook;\n\tsend2Dbg: T_FncHook;\n\n\tcopyBMFolder(from: number, to: number): void;\n\teraseBMFolder(place: number): void;\n\n\tdestroy(): void;\n}\n\nexport type T_Fire = (KEY: string, e: Event)=> void;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type T_FncHook = (type: string, o: any)=> void;\n\n\n// =============== Main\nexport type T_Main = {\n\terrScript(mes: string, isThrow? :boolean): void;\n\tcvs\t\t\t: HTMLCanvasElement;\n\tresume(fnc?: ()=> void): void;\n\tresumeByJumpOrCall(hArg: TArg): void;\n\tstop(): void;\n\tsetLoop(v: boolean, mes?: string): void;\n\tdestroy(): void;\n}\n\n\n// =============== Variable\nexport type T_VAL_BSN = boolean | string | number;\nexport type T_VAL_BSNU = T_VAL_BSN | undefined;\n\n\n// 汎用的に変数\nexport type T_VAL_DATA = T_VAL_BSNU | null;\nexport type T_VAL_DATA_FNC = T_VAL_DATA | (()=> boolean) | (()=> string) | (()=> number)\nexport type T_H_VAL_DATA = {[val_name: string]: T_VAL_DATA_FNC}\n\n// セーブ変数(save:)\nexport type T_H_SAVE_DATA = {\n\t'sn.userFnTail'\t\t: string;\n\n\t'const.sn.autowc.enabled'\t: boolean;\n\t'const.sn.autowc.text'\t\t: string;\n\t'const.sn.autowc.time'\t\t: number;\n\t'const.sn.mesLayer'\t\t: string;\n\t// 'const.sn.sound.【buf】.fn'\t\t: string;\n\t// 'const.sn.sound.【buf】.volume'\t: number;\n\t'const.sn.styPaging'\t: string;\n\t'sn.doRecLog'\t\t\t: boolean;\n\t'const.sn.sLog'\t\t\t: string;\n\t'const.sn.loopPlaying'\t: string;\n\t'const.sn.scriptFn'\t\t: string;\n\t'const.sn.scriptIdx'\t: number;\n\t// 'const.sn.layer.(文字レイヤ名).enabled'\t: boolean;\n\n\t// [val_name: string]: T_VAL_DATA;\n}\nexport function creSAVEDATA(): T_H_SAVE_DATA {return {\n\t'sn.userFnTail'\t\t: '',\n\n\t'const.sn.autowc.enabled': false,// (文字ごとのウェイト)enabled属性で指定した値。\n\t'const.sn.autowc.text'\t: '',\t// (文字ごとのウェイト)同名属性で指定した値。\n\t'const.sn.autowc.time'\t: 0,\t// textとtimeは常に同数にすること\n\t'const.sn.mesLayer'\t: '',\t// デフォルト文字レイヤ\n\t// 'const.sn.sound.【buf】.fn'\t: '',\t// サウンドバッファの再生ファイル名\n\t// 'const.sn.sound.【buf】.volume'\t: 1,// サウンドバッファの目標音量\n\t'const.sn.styPaging'\t: 'color: yellow; text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;',\n\t\t// ページ遷移中 CSS スタイル\n\t'sn.doRecLog'\t\t: false,\t// テキストを履歴に記録するか\n\t'const.sn.sLog'\t: '[]',\t// 履歴テキスト(JSON文字列)\n\t'const.sn.loopPlaying'\t: '{}',\t// ループ中のサウンドバッファ\n\t'const.sn.scriptFn'\t: '',\t// 最後に[record_place]したスクリプト名\n\t'const.sn.scriptIdx'\t: 0,\t// 最後に[record_place]したスクリプトインデックス(行番号ではなく内部トークン単位)\n\t// 'const.sn.layer.(文字レイヤ名).enabled'\t: true,\t// 文字レイヤのenabled値\n}}\n\n\n// システム変数(sys:)\nexport type T_H_SYS_DATA = {\n\t'const.sn.cfg.ns'\t\t\t: string;\t// [import]時のチェック用\n\n\t'const.sn.aPageLog'\t\t\t: string;\t// ページ遷移用情報(JSON文字列)\n\t'const.sn.nativeWindow.x'\t: number;\t// 実数;横座標\n\t'const.sn.nativeWindow.y'\t: number;\t// 実数;縦座標\n\t'const.sn.nativeWindow.w'\t: number;\t// 実数;横幅\n\t'const.sn.nativeWindow.h'\t: number;\t// 実数;縦幅\n\t'const.sn.save.place'\t\t: number;\t// 次のセーブplaceを示す\n\t'const.sn.sound.BGM.volume'\t: number;\t// BGMの基準音量(buf=\"BGM\"の効果音)\n\t'const.sn.sound.SE.volume'\t: number;\t// 効果音の基準音量(buf=\"SE\"の効果音)\n\t'const.sn.sound.SYS.volume'\t: number;\t// システムの基準音量(buf=\"SYS\"の効果音)\n\t// 'const.sn.sound.【buf】.volume'\t: number;\t// システムの基準音量(buf=\"【buf】\"の効果音)\n\t'sn.auto.msecLineWait'\t\t: number;\t// 未読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecLineWait_Kidoku': number;\t// 既読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait'\t\t: number;\t// 未読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait_Kidoku': number;\t// 既読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.skip.mode'\t\t\t\t: string;\t// スキップモード。\n\t'sn.sound.BGM.vol_mul_talking': number;\t// ボイス(VOICEバッファの音声)再生中のBGM音量への乗数\n\t'sn.sound.global_volume'\t: T_fncSetVal;\t// 全体的な音量を設定する\n\t'sn.sound.movie_volume'\t\t: T_fncSetVal;\t// ムービー音量を設定する\n\t'sn.tagCh.canskip'\t\t\t: boolean;\t// テキストをクリックなどでスキップ可能か\n\t'sn.tagCh.doWait'\t\t\t: boolean;\t// 未読テキストにウェイトを掛けるか\n\t'sn.tagCh.doWait_Kidoku'\t: boolean;\t// 既読テキストにウェイトを掛けるか\n\t'sn.tagCh.msecWait'\t\t\t: number;\t// 未読テキスト待ち時間(ミリ秒)\n\t'sn.tagCh.msecWait_Kidoku'\t: number;\t// 既読テキスト待ち時間(ミリ秒)\n\t'TextLayer.Back.Alpha'\t\t: number;\t// バック不透明度。テキストウインドウの背景の濃\n\n\t// [val_name: string]\t\t: T_VAL_DATA;\n}\nexport function creSYS_DATA(): T_H_SYS_DATA {return {\n\t'const.sn.cfg.ns'\t\t\t: '',\t// [import]時のチェック用\n\n\t'const.sn.aPageLog'\t\t\t: '[]',\t// ページ遷移用情報(JSON文字列)\n\t'const.sn.nativeWindow.x'\t: 0,\t// 実数;横座標\n\t'const.sn.nativeWindow.y'\t: 0,\t// 実数;縦座標\n\t'const.sn.nativeWindow.w'\t: CmnLib.stageW,\t// 実数;横幅\n\t'const.sn.nativeWindow.h'\t: CmnLib.stageH,\t// 実数;縦幅\n\t'const.sn.save.place'\t\t: 1,\t// 次のセーブplaceを示す\n\t'const.sn.sound.BGM.volume'\t: 1,\t// BGMの基準音量(buf=\"BGM\"の効果音)\n\t'const.sn.sound.SE.volume'\t: 1,\t// 効果音の基準音量(buf=\"SE\"の効果音)\n\t'const.sn.sound.SYS.volume'\t: 1,\t// システムの基準音量(buf=\"SYS\"の効果音)\n\t// 'const.sn.sound.【buf】.volume': 1,\t// システムの基準音量(buf=\"【buf】\"の効果音)\n\t'sn.auto.msecLineWait'\t\t: 500,\t// 未読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecLineWait_Kidoku': 500,\t// 既読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait'\t\t: 3500,\t// 未読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait_Kidoku': 3500,// 既読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.skip.mode'\t\t\t\t: 's',\t// スキップモード。\n\t'sn.sound.BGM.vol_mul_talking': 1.0,// ボイス(VOICEバッファの音声)再生中のBGM音量への乗数\n\t'sn.sound.global_volume'\t: (_, _2)=> 1,\t// 全体的な音量を設定する\n\t'sn.sound.movie_volume'\t\t: (_, _2)=> 1,\t// ムービー音量を設定する\n\t'sn.tagCh.canskip'\t\t\t: true,\t// テキストをクリックなどでスキップ可能か\n\t'sn.tagCh.doWait'\t\t\t: true,\t// 未読テキストにウェイトを掛けるか\n\t'sn.tagCh.doWait_Kidoku'\t: true,\t// 既読テキストにウェイトを掛けるか\n\t'sn.tagCh.msecWait'\t\t\t: 10,\t// 未読テキスト待ち時間(ミリ秒)\n\t'sn.tagCh.msecWait_Kidoku'\t: 10,\t// 既読テキスト待ち時間(ミリ秒)\n\t'TextLayer.Back.Alpha'\t\t: 0.5,\t// バック不透明度。テキストウインドウの背景の濃度。0.0で透明、1.0で不透明\n}}\n\n\n// 雑用変数(tmp:)\nexport type T_H_TMP_DATA = {\n\t'const.Date.getDateStr'\t\t: ()=> string;\n\t'const.Date.getTime'\t\t: ()=> number;\n\t'const.sn.bookmark.json'\t: string;\n\n\t// 'const.sn.config.(略)'\t\t: string;\n\t'const.sn.config.window.width'\t: number;\n\t'const.sn.config.window.height'\t: number;\n\t'const.sn.config.book.title'\t: string;\n\t'const.sn.config.book.version'\t: string;\n\n\t'const.sn.displayState'\t: boolean;\n\t\t\t// const.flash.display.Stage.displayState\n\n\t// 'const.sn.frm.(フレーム名)'\t\t: boolean;\n\t// 'const.sn.frm.(フレーム名).alpha'\t: number;\n\t// 'const.sn.frm.(フレーム名).x'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).y'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).scale_x'\t: number;\n\t// 'const.sn.frm.(フレーム名).scale_y'\t: number;\n\t// 'const.sn.frm.(フレーム名).rotate'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).width'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).height'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).visible'\t: boolean;\n\n\t'const.sn.isApp'\t: boolean;\n\t'const.sn.isDbg'\t: boolean;\n\t'const.sn.isPackaged'\t: boolean;\n\t'const.sn.isPaging'\t\t: boolean;\n\t'const.sn.isDarkMode'\t: boolean;\n\t'const.sn.isDebugger'\t: boolean;\n\t'const.sn.isFirstBoot'\t: boolean;\n\t'const.sn.isKidoku'\t\t: boolean;\n\t'const.sn.key.alternate': boolean;\n\t'const.sn.key.back'\t\t: boolean;\n\t'const.sn.key.command'\t: boolean;\n\t'const.sn.key.control'\t: boolean;\n\t'const.sn.key.end'\t\t: boolean;\n\t'const.sn.key.escape'\t: boolean;\n\t'const.sn.last_page_plain_text'\t: string;\n\t'const.sn.last_page_text'\t\t: string;\n\t// 'const.sn.lay.(レイヤ名)'\t\t\t\t\t\t: boolean;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).alpha'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).width'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).height'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).visible'\t: boolean;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).x'\t\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).y'\t\t: number;\n\t'const.sn.Math.PI'\t\t: number;\n\t'const.sn.navigator.language'\t: string;\n\t'const.sn.needClick2Play'\t\t: boolean;\n\t'const.sn.platform'\t\t\t\t: string;\n\t'const.sn.screenResolutionX'\t: number;\n\t'const.sn.screenResolutionY'\t: number;\n\t'const.sn.sound.codecs'\t\t\t: string;\n\t// 'const.sn.sound.【buf】.playing': boolean;\n\t'const.sn.aIfStk.length'\t\t: number;\n\t'const.sn.vctCallStk.length'\t: number;\n\t'sn.auto.enabled'\t\t: boolean;\n\t'sn.button.fontFamily'\t: string;\n\t// 'sn.event.domdata.(任意)'\t: string;\n\t'sn.eventArg'\t\t: string;\n\t'sn.eventLabel'\t\t: string;\n\t'sn.skip.all'\t\t: boolean;\n\t'sn.skip.enabled'\t: boolean;\n\t'sn.tagL.enabled'\t: boolean;\n}\nexport function creTMP_DATA(): T_H_TMP_DATA {return {\n\t'const.Date.getDateStr'\t\t: ()=> getDateStr(),\t// 変数参照時の日時を返す\n\t'const.Date.getTime'\t\t: ()=> (new Date).getTime(),\n\t'const.sn.bookmark.json'\t: '[]',\t// SKYNovel内部によるsave:の管理用\n\n\t// 'const.sn.config.(略)'\t: ,\t// prj.jsonの内容を返す\n\t'const.sn.config.window.width'\t: 0,\n\t'const.sn.config.window.height'\t: 0,\n\t'const.sn.config.book.title'\t: '',\n\t'const.sn.config.book.version'\t: '',\n\n\t'const.sn.displayState'\t\t: false,\t// ウインドウ・フルスクリーン状態。trueならフルスクリーン\n\n\t// 'const.sn.frm.(フレーム名)'\t: true,\t// [add_frame]でロードされた id属性が存在するか\n\t// 'const.sn.frm.(フレーム名).alpha'\t: 1,\t// フレームの不透明度\n\t// 'const.sn.frm.(フレーム名).x'\t\t: 0,\t// フレームの座標。画面左上を(0, 0)とする座標。leftやtopでないことに注意\n\t// 'const.sn.frm.(フレーム名).y'\t\t: 0,\t// 実数;縦座標\n\t// 'const.sn.frm.(フレーム名).scale_x': 1,\t// cssでのtransform: scaleの値\n\t// 'const.sn.frm.(フレーム名).scale_y': 1,\t// cssでのtransform: scaleの値\n\t// 'const.sn.frm.(フレーム名).rotate'\t: 0,\t// cssでのrotate、回転角度(単位:deg 度)、正の値は時計回り\n\t// 'const.sn.frm.(フレーム名).width'\t: prjのアプリ横幅画面サイズ,\t// フレームの横幅\n\t// 'const.sn.frm.(フレーム名).height'\t: prjのアプリ縦幅画面サイズ,\t// フレームの縦幅\n\t// 'const.sn.frm.(フレーム名).visible': true,\t// フレームが表示されているか。visible属性の値を返す\n\n\t'const.sn.isApp'\t\t: false,\t// アプリ版か\n\t'const.sn.isDbg'\t\t: false,\t// デバッグモードか\n\t'const.sn.isPackaged'\t: false,\t// パッケージされたアプリか(Electron API - app.isPackaged)\n\t'const.sn.isPaging'\t\t: false,\t// ページ遷移状態か\n\t'const.sn.isDarkMode'\t: false,\t// ダークモードか\n\t'const.sn.isDebugger'\t: true,\t\t// ブラウザ実行、それもVSCode・npmによる「起動:ブラウザ版」上での実行か\n\t'const.sn.isFirstBoot'\t: true,\t\t// ゲームがインストールされてから、初めての起動か(起動されるまでデータが空だったか)\n\t'const.sn.isKidoku'\t\t: true,\t\t// この変数を参照した位置は既読か。参照「後」必ず既読になる点に注意\n\t'const.sn.key.alternate': false,\t// ALTキー(MacならOptionキー)が押されているか\n\t'const.sn.key.back'\t\t: false,\t// back 〃\n\t'const.sn.key.command'\t: false,\t// command 〃\n\t'const.sn.key.control'\t: false,\t// control 〃\n\t'const.sn.key.end'\t\t: false,\t// end 〃\n\t'const.sn.key.escape'\t: false,\t// escape 〃\n\t'const.sn.last_page_plain_text'\t: '',\t// そのページの履歴テキスト(《》文法とルビを含まない)\n\t'const.sn.last_page_text'\t\t: '',\t// そのページの履歴テキスト(《》文法もそのまま)\n\t// 'const.sn.lay.(レイヤ名)'\t\t: true,\t// レイヤが[add_lay]され存在するか\n\t// 'const.sn.lay.(レイヤ名).(foreかback).alpha'\t\t: 0.0〜1.0,\t// レイヤの不透明度\n\t// 'const.sn.lay.(レイヤ名).(foreかback).width'\t\t: 1,\t// レイヤの横幅。ただし文字レイヤの場合は1、画像レイヤの場合、画像読込後でないと0\n\t// 'const.sn.lay.(レイヤ名).(foreかback).height'\t\t: 1,\t// レイヤの縦幅。ただし文字レイヤの場合は1、画像レイヤの場合、画像読込後でないと0\n\t// 'const.sn.lay.(レイヤ名).(foreかback).visible'\t\t: true,\t// レイヤが表示されているか。visible属性の値を返す\n\t// 'const.sn.lay.(レイヤ名).(foreかback).x'\t\t: 0,\t// 実数;横座標</td><td rowspan=\"2\">レイヤの座標。画面左上を(0, 0)とする座標。leftやtopでないことに注意\n\t// 'const.sn.lay.(レイヤ名).(foreかback).y'\t\t: 0,\t// 実数;縦座標\n\t'const.sn.Math.PI'\t\t: Math.PI,\t// 円周率\n\t'const.sn.navigator.language': 'jp',\t// ユーザーが最優先に設定している言語設定\n\t'const.sn.needClick2Play'\t: false,\n\t\t// ブラウザ実行で、クリックされるまで音声再生が差し止められている状態か。なにかクリックされれば falseになる\n\t'const.sn.platform'\t\t\t: CmnLib.platform,\t// 環境による\n\n\t'const.sn.screenResolutionX': screen.availWidth,\t// 画面の最大水平解像度\n\t'const.sn.screenResolutionY': screen.availHeight,\t// 画面の最大垂直解像度\n\t\t// ここでは正確な値は分からない。保存していた前回終了時の位置にウインドウを動かしてから、そのディスプレイののサイズを取得するまでは。\n\n\t'const.sn.sound.codecs'\t\t: '',\t// ゲーム実行環境がどのコーデックをサポートしているか\n\t// 'const.sn.sound.【buf】.playing'\t\t: 再生状態による,\t// サウンドバッファが再生中か<br/>\n\t'const.sn.aIfStk.length'\t: 1,\t// IFスタックの深さ([if]するたびに増)\n\t'const.sn.vctCallStk.length': 0,\t// コールスタックの深さ([call]するたびに増)\n\t'sn.auto.enabled'\t\t: false,\t// 自動読みすすみモードかどうか\n\t'sn.button.fontFamily'\t: '\\'Hiragino Sans\\', \\'Hiragino Kaku Gothic ProN\\', \\'游ゴシック Medium\\', meiryo, sans-serif',\t// 文字ボタンフォントを指定\n\t// 'sn.event.domdata.(任意)'\t\t: ''[event]でフレーム内のHTML要素に登録したイベントで、そのイベント発生時、HTML要素のdata-(任意)属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.eventArg'\t\t: '',\t// [button]等のイベント発生時、そのボタンタグのarg属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.eventLabel'\t\t: '',\t// [button]等のイベント発生時、そのボタンタグのlabel属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.skip.all'\t\t: false,\t// false(初期値)なら既読のみをスキップ\n\t'sn.skip.enabled'\t: false,\t// 次の選択肢(/未読)まで進む が有効か\n\t'sn.tagL.enabled'\t: true,\t\t// 頁末まで一気に読み進むか(l無視)\n}}\n\n\nexport type Scope = 'tmp'|'save'|'sys'|'mp';\n\nexport type T_ProcVal = ()=> T_VAL_BSN;\n\nexport type T_fncSetVal = (arg_name: string, val: T_VAL_BSN, autocast?: boolean)=> void;\n\nexport type T_Variable = {\n\tinit(): Promise<void>;\n\tflush(): void;\n\tsetDoRecProc(doRecProc: (doRec: boolean)=> void): void;\n\n\tgetVal(arg_name: string, def?: number | string, touch?: boolean): T_VAL_DATA;\n\tsetVal_Nochk(scope: Scope, nm: string, val: T_VAL_BSNU, autocast?: boolean): void;\n\n\tdefTmp(name: string, fnc: T_ProcVal): void;\n\tcloneMp(): T_H_VAL_MP;\n\tsetMp(mp: T_H_VAL_MP): void;\n\tsetMark(place: number, mark: T_Mark): void;\n\tgetMark(place: number): T_Mark | undefined;\n\tcloneSave(): T_H_SAVE_DATA;\n\tmark2save(mark: T_Mark): void;\n\n\ttouchAreaKidoku(fn: string): Areas;\n\tgetAreaKidoku(fn: string): Areas | undefined;\n\tsaveKidoku(): void;\n\tupdateData(data: T_Data4Vari): void;\n\n\tdefValTrg(name: string, fnc: T_fncSetVal): void;\n\n\tdoRecLog(): boolean;\n\n\tget tagCh_doWait(): boolean;\n\tget tagCh_doWait_Kidoku(): boolean;\n\tget tagCh_msecWait(): number;\n\tget tagCh_msecWait_Kidoku(): number;\n}\n\nexport type T_H_VAL_MARK\t= {[place: number]: T_Mark};\nexport type T_H_VAL_KIDOKU\t= {[fn: string]: T_H_Areas};\n\n\nexport type T_Data4Vari = {\n\tsys\t\t: T_H_SYS_DATA;\n\tmark\t: T_H_VAL_MARK;\n\tkidoku\t: T_H_VAL_KIDOKU;\n}\n\nexport type T_Mark = {\n\thSave\t: T_H_SAVE_DATA;\n\thPages\t: T_HPage;\n\taIfStk\t: number[];\n\tjson?\t: TArg;\n}\n\n\n// =============== EventMng\nexport type T_Evt2Fnc\t= (e: Event)=> void;\nexport type T_HEvt2Fnc\t= {[name: string]: T_Evt2Fnc;};\n\n\n// =============== FrameMng, LayerMng\nexport type T_GetFrm = {\n\tgetFrmDisabled\t: (id: string)=> boolean;\n};\n\n\n// =============== Pages\nexport type T_HPage = {[name: string]: T_Page};\nexport type T_Page = {\n\tcls\t\t: string;\n\tfore\t: T_RecordPlayBack_lay;\n\tback\t: T_RecordPlayBack_lay;\n}\n\n\n// =============== RubySpliter\nexport type T_PutCh = (ch: string, ruby: string)=> void\n\n\n// =============== Volume change event notification (GrpLayer)\nexport type T_NoticeChgVolume = (vol: number)=> void\n"],"mappings":";AAyIA,SAAgB,cAA6B;AAAC,QAAO;EACpD,iBAAmB;EAEnB,2BAA2B;EAC3B,wBAAyB;EACzB,wBAAyB;EACzB,qBAAsB;EAGtB,sBAAuB;EAEvB,eAAiB;EACjB,iBAAkB;EAClB,wBAAyB;EACzB,qBAAsB;EACtB,sBAAuB;EAEvB;;AAkCD,SAAgB,cAA4B;AAAC,QAAO;EACnD,mBAAsB;EAEtB,qBAAwB;EACxB,2BAA4B;EAC5B,2BAA4B;EAC5B,2BAA4B,OAAO;EACnC,2BAA4B,OAAO;EACnC,uBAAyB;EACzB,6BAA8B;EAC9B,4BAA6B;EAC7B,6BAA8B;EAE9B,wBAA0B;EAC1B,+BAA+B;EAC/B,wBAA0B;EAC1B,+BAA+B;EAC/B,gBAAoB;EACpB,gCAAgC;EAChC,2BAA4B,GAAG,MAAM;EACrC,0BAA4B,GAAG,MAAM;EACrC,oBAAuB;EACvB,mBAAsB;EACtB,0BAA2B;EAC3B,qBAAwB;EACxB,4BAA6B;EAC7B,wBAA0B;EAC1B;;AAuED,SAAgB,cAA4B;AAAC,QAAO;EACnD,+BAAgC,YAAY;EAC5C,6CAA8B,IAAI,MAAI,EAAE,SAAS;EACjD,0BAA2B;EAG3B,gCAAiC;EACjC,iCAAkC;EAClC,8BAA+B;EAC/B,gCAAiC;EAEjC,yBAA2B;EAa3B,kBAAoB;EACpB,kBAAoB;EACpB,uBAAwB;EACxB,qBAAuB;EACvB,uBAAwB;EACxB,uBAAwB;EACxB,wBAAyB;EACzB,qBAAuB;EACvB,0BAA0B;EAC1B,qBAAuB;EACvB,wBAAyB;EACzB,wBAAyB;EACzB,oBAAsB;EACtB,uBAAwB;EACxB,iCAAkC;EAClC,2BAA6B;EAQ7B,oBAAsB,KAAK;EAC3B,+BAA+B;EAC/B,2BAA4B;EAE5B,qBAAwB,OAAO;EAE/B,8BAA8B,OAAO;EACrC,8BAA8B,OAAO;EAGrC,yBAA2B;EAE3B,0BAA2B;EAC3B,8BAA8B;EAC9B,mBAAqB;EACrB,wBAAyB;EAEzB,eAAiB;EACjB,iBAAmB;EACnB,eAAiB;EACjB,mBAAoB;EACpB,mBAAoB;EACpB"}
|
|
1
|
+
{"version":3,"file":"CmnInterface.js","names":[],"sources":["../src/sn/CmnInterface.ts"],"sourcesContent":["/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2018-2025 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport type {T_HSysBaseArg, T_SEARCHPATH} from './ConfigBase';\nimport type {TArg, TTag} from './Grammar';\nimport type {Areas, T_H_Areas} from './Areas';\nimport type {T_H_VAL_MP} from './CallStack';\nimport type {Layer, T_RecordPlayBack_lay} from './Layer';\nimport {CmnLib, getDateStr} from './CmnLib';\n\nimport type {DisplayObject, RenderTexture} from 'pixi.js';\n\n\n// 特定のプロパティだけrequiredにする型を作ってみる #TypeScript - Qiita https://qiita.com/islandryu/items/490414a537c203b151f7\nexport type T_PRequired<T,K extends keyof T> = T & {\n\t[P in K]-?: T[P]\n}\n\n// =============== PropParser\nexport type T_PropParser = {\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tparse(s: string): any;\n\tgetValAmpersand(val: string): string;\n}\n\n\n// =============== Plugin\nexport type T_PLUGIN_DECAB_RET = {\n\text_num\t: number;\n\tab\t\t: ArrayBuffer;\n};\nexport type T_PLUGIN_INFO = {\n\twindow: {\n\t\twidth\t: number;\n\t\theight\t: number;\n\t},\n}\nexport type T_PluginInitArg = {\n\tgetInfo(): T_PLUGIN_INFO;\n\taddTag(tag_name: string, tag_fnc: TTag): void;\n\taddLayCls(cls: string, fnc: T_LayerFactory): void;\n\tsearchPath: T_SEARCHPATH;\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tgetVal(arg_name: string, def?: number | string): any;\n\tresume(fnc?: ()=> void): void;\n\trender(dsp: DisplayObject, renTx?: RenderTexture, clear?: boolean): void;\n\tsetDec(fnc: (ext: string, tx: string)=> Promise<string>): void;\n\tsetDecAB(fnc: (ab: ArrayBuffer)=> Promise<T_PLUGIN_DECAB_RET>): void;\n\tsetEnc(fnc: (tx: string)=> Promise<string>): void;\n\tgetStK(fnc: ()=> string): void;\n\tgetHash(fnc: (str: string)=> string): void;\n}\nexport type T_Plugin = {\n\tinit(pia: T_PluginInitArg): Promise<void>;\n}\nexport type T_HPlugin = {[name: string]: T_Plugin;}\n\nexport type T_LayerFactory = ()=> Layer\n\n\n// =============== SysBase\nexport type T_SysBaseParams = [\n\thPlg\t: T_HPlugin,\n\targ?\t: T_HSysBaseArg,\n];\nexport type T_SysBaseLoadedParams = [\n\thPlg\t: T_HPlugin,\n\targ\t\t: T_HSysBaseArg,\n];\n\n\nexport type SYS_DEC_RET = HTMLImageElement | HTMLVideoElement | ArrayBuffer;\nexport type T_SysBase = {\n\tinitVal(hTmp: T_H_TMP_DATA, comp: (data: T_Data4Vari)=> void): Promise<void>;\n\tflush(): void;\n\n\taddHook(fnc: T_FncHook): void;\n\tcallHook: T_FncHook;\n\tsend2Dbg: T_FncHook;\n\n\tcopyBMFolder(from: number, to: number): void;\n\teraseBMFolder(place: number): void;\n\n\tdestroy(): void;\n}\n\nexport type T_Fire = (KEY: string, e: Event)=> void;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type T_FncHook = (type: string, o: any)=> void;\n\n\n// =============== Main\nexport type T_Main = {\n\terrScript(mes: string, isThrow? :boolean): void;\n\tcvs\t\t\t: HTMLCanvasElement;\n\tresume(fnc?: ()=> void): void;\n\tresumeByJumpOrCall(hArg: TArg): void;\n\tstop(): void;\n\tsetLoop(v: boolean, mes?: string): void;\n\tdestroy(): void;\n}\n\n\n// =============== Variable\nexport type T_VAL_BSN = boolean | string | number;\nexport type T_VAL_BSNU = T_VAL_BSN | undefined;\n\n\n// 汎用的に変数\nexport type T_VAL_DATA = T_VAL_BSNU | null;\nexport type T_VAL_DATA_FNC = T_VAL_DATA | (()=> boolean) | (()=> string) | (()=> number)\nexport type T_H_VAL_DATA = {[val_name: string]: T_VAL_DATA_FNC}\n\n// セーブ変数(save:)\nexport type T_H_SAVE_DATA = {\n\t'sn.userFnTail'\t\t: string;\n\n\t'const.sn.autowc.enabled'\t: boolean;\n\t'const.sn.autowc.text'\t\t: string;\n\t'const.sn.autowc.time'\t\t: number;\n\t'const.sn.mesLayer'\t\t: string;\n\t// 'const.sn.sound.【buf】.fn'\t\t: string;\n\t// 'const.sn.sound.【buf】.volume'\t: number;\n\t'const.sn.styPaging'\t: string;\n\t'sn.doRecLog'\t\t\t: boolean;\n\t'const.sn.sLog'\t\t\t: string;\n\t'const.sn.loopPlaying'\t: string;\n\t'const.sn.scriptFn'\t\t: string;\n\t'const.sn.scriptIdx'\t: number;\n\t// 'const.sn.layer.(文字レイヤ名).enabled'\t: boolean;\n\n\t// [val_name: string]: T_VAL_DATA;\n}\nexport function creSAVEDATA(): T_H_SAVE_DATA {return {\n\t'sn.userFnTail'\t\t: '',\n\n\t'const.sn.autowc.enabled': false,// (文字ごとのウェイト)enabled属性で指定した値。\n\t'const.sn.autowc.text'\t: '',\t// (文字ごとのウェイト)同名属性で指定した値。\n\t'const.sn.autowc.time'\t: 0,\t// textとtimeは常に同数にすること\n\t'const.sn.mesLayer'\t: '',\t// デフォルト文字レイヤ\n\t// 'const.sn.sound.【buf】.fn'\t: '',\t// サウンドバッファの再生ファイル名\n\t// 'const.sn.sound.【buf】.volume'\t: 1,// サウンドバッファの目標音量\n\t'const.sn.styPaging'\t: 'color: yellow; text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;',\n\t\t// ページ遷移中 CSS スタイル\n\t'sn.doRecLog'\t\t: false,\t// テキストを履歴に記録するか\n\t'const.sn.sLog'\t: '[]',\t// 履歴テキスト(JSON文字列)\n\t'const.sn.loopPlaying'\t: '{}',\t// ループ中のサウンドバッファ\n\t'const.sn.scriptFn'\t: '',\t// 最後に[record_place]したスクリプト名\n\t'const.sn.scriptIdx'\t: 0,\t// 最後に[record_place]したスクリプトインデックス(行番号ではなく内部トークン単位)\n\t// 'const.sn.layer.(文字レイヤ名).enabled'\t: true,\t// 文字レイヤのenabled値\n}}\n\n\n// システム変数(sys:)\nexport type T_H_SYS_DATA = {\n\t'const.sn.cfg.ns'\t\t\t: string;\t// [import]時のチェック用\n\n\t'const.sn.aPageLog'\t\t\t: string;\t// ページ遷移用情報(JSON文字列)\n\t'const.sn.nativeWindow.x'\t: number;\t// 実数;横座標\n\t'const.sn.nativeWindow.y'\t: number;\t// 実数;縦座標\n\t'const.sn.nativeWindow.w'\t: number;\t// 実数;横幅\n\t'const.sn.nativeWindow.h'\t: number;\t// 実数;縦幅\n\t'const.sn.save.place'\t\t: number;\t// 次のセーブplaceを示す\n\t'const.sn.sound.BGM.volume'\t: number;\t// BGMの基準音量(buf=\"BGM\"の効果音)\n\t'const.sn.sound.SE.volume'\t: number;\t// 効果音の基準音量(buf=\"SE\"の効果音)\n\t'const.sn.sound.SYS.volume'\t: number;\t// システムの基準音量(buf=\"SYS\"の効果音)\n\t// 'const.sn.sound.【buf】.volume'\t: number;\t// システムの基準音量(buf=\"【buf】\"の効果音)\n\t'sn.auto.msecLineWait'\t\t: number;\t// 未読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecLineWait_Kidoku': number;\t// 既読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait'\t\t: number;\t// 未読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait_Kidoku': number;\t// 既読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.skip.mode'\t\t\t\t: string;\t// スキップモード。\n\t'sn.sound.BGM.vol_mul_talking': number;\t// ボイス(VOICEバッファの音声)再生中のBGM音量への乗数\n\t'sn.sound.global_volume'\t: T_fncSetVal;\t// 全体的な音量を設定する\n\t'sn.sound.movie_volume'\t\t: T_fncSetVal;\t// ムービー音量を設定する\n\t'sn.tagCh.canskip'\t\t\t: boolean;\t// テキストをクリックなどでスキップ可能か\n\t'sn.tagCh.doWait'\t\t\t: boolean;\t// 未読テキストにウェイトを掛けるか\n\t'sn.tagCh.doWait_Kidoku'\t: boolean;\t// 既読テキストにウェイトを掛けるか\n\t'sn.tagCh.msecWait'\t\t\t: number;\t// 未読テキスト待ち時間(ミリ秒)\n\t'sn.tagCh.msecWait_Kidoku'\t: number;\t// 既読テキスト待ち時間(ミリ秒)\n\t'TextLayer.Back.Alpha'\t\t: number;\t// バック不透明度。テキストウインドウの背景の濃\n\n\t// [val_name: string]\t\t: T_VAL_DATA;\n}\nexport function creSYS_DATA(): T_H_SYS_DATA {return {\n\t'const.sn.cfg.ns'\t\t\t: '',\t// [import]時のチェック用\n\n\t'const.sn.aPageLog'\t\t\t: '[]',\t// ページ遷移用情報(JSON文字列)\n\t'const.sn.nativeWindow.x'\t: 0,\t// 実数;横座標\n\t'const.sn.nativeWindow.y'\t: 0,\t// 実数;縦座標\n\t'const.sn.nativeWindow.w'\t: CmnLib.stageW,\t// 実数;横幅\n\t'const.sn.nativeWindow.h'\t: CmnLib.stageH,\t// 実数;縦幅\n\t'const.sn.save.place'\t\t: 1,\t// 次のセーブplaceを示す\n\t'const.sn.sound.BGM.volume'\t: 1,\t// BGMの基準音量(buf=\"BGM\"の効果音)\n\t'const.sn.sound.SE.volume'\t: 1,\t// 効果音の基準音量(buf=\"SE\"の効果音)\n\t'const.sn.sound.SYS.volume'\t: 1,\t// システムの基準音量(buf=\"SYS\"の効果音)\n\t// 'const.sn.sound.【buf】.volume': 1,\t// システムの基準音量(buf=\"【buf】\"の効果音)\n\t'sn.auto.msecLineWait'\t\t: 500,\t// 未読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecLineWait_Kidoku': 500,\t// 既読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait'\t\t: 3500,\t// 未読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait_Kidoku': 3500,// 既読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.skip.mode'\t\t\t\t: 's',\t// スキップモード。\n\t'sn.sound.BGM.vol_mul_talking': 1.0,// ボイス(VOICEバッファの音声)再生中のBGM音量への乗数\n\t'sn.sound.global_volume'\t: (_, _2)=> 1,\t// 全体的な音量を設定する\n\t'sn.sound.movie_volume'\t\t: (_, _2)=> 1,\t// ムービー音量を設定する\n\t'sn.tagCh.canskip'\t\t\t: true,\t// テキストをクリックなどでスキップ可能か\n\t'sn.tagCh.doWait'\t\t\t: true,\t// 未読テキストにウェイトを掛けるか\n\t'sn.tagCh.doWait_Kidoku'\t: true,\t// 既読テキストにウェイトを掛けるか\n\t'sn.tagCh.msecWait'\t\t\t: 10,\t// 未読テキスト待ち時間(ミリ秒)\n\t'sn.tagCh.msecWait_Kidoku'\t: 10,\t// 既読テキスト待ち時間(ミリ秒)\n\t'TextLayer.Back.Alpha'\t\t: 0.5,\t// バック不透明度。テキストウインドウの背景の濃度。0.0で透明、1.0で不透明\n}}\n\n\n// 雑用変数(tmp:)\nexport type T_H_TMP_DATA = {\n\t'const.Date.getDateStr'\t\t: ()=> string;\n\t'const.Date.getTime'\t\t: ()=> number;\n\t'const.sn.bookmark.json'\t: string;\n\n\t// 'const.sn.config.(略)'\t\t: string;\n\t'const.sn.config.window.width'\t: number;\n\t'const.sn.config.window.height'\t: number;\n\t'const.sn.config.book.title'\t: string;\n\t'const.sn.config.book.version'\t: string;\n\n\t'const.sn.displayState'\t: boolean;\n\t\t\t// const.flash.display.Stage.displayState\n\n\t// 'const.sn.frm.(フレーム名)'\t\t: boolean;\n\t// 'const.sn.frm.(フレーム名).alpha'\t: number;\n\t// 'const.sn.frm.(フレーム名).x'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).y'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).scale_x'\t: number;\n\t// 'const.sn.frm.(フレーム名).scale_y'\t: number;\n\t// 'const.sn.frm.(フレーム名).rotate'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).width'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).height'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).visible'\t: boolean;\n\n\t'const.sn.isApp'\t: boolean;\n\t'const.sn.isDbg'\t: boolean;\n\t'const.sn.isPackaged'\t: boolean;\n\t'const.sn.isPaging'\t\t: boolean;\n\t'const.sn.isDarkMode'\t: boolean;\n\t'const.sn.isDebugger'\t: boolean;\n\t'const.sn.isFirstBoot'\t: boolean;\n\t'const.sn.isKidoku'\t\t: boolean;\n\t'const.sn.key.alternate': boolean;\n\t'const.sn.key.back'\t\t: boolean;\n\t'const.sn.key.command'\t: boolean;\n\t'const.sn.key.control'\t: boolean;\n\t'const.sn.key.end'\t\t: boolean;\n\t'const.sn.key.escape'\t: boolean;\n\t'const.sn.last_page_plain_text'\t: string;\n\t'const.sn.last_page_text'\t\t: string;\n\t// 'const.sn.lay.(レイヤ名)'\t\t\t\t\t\t: boolean;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).alpha'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).width'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).height'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).visible'\t: boolean;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).x'\t\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).y'\t\t: number;\n\t'const.sn.Math.PI'\t\t: number;\n\t'const.sn.navigator.language'\t: string;\n\t'const.sn.needClick2Play'\t\t: boolean;\n\t'const.sn.platform'\t\t\t\t: string;\n\t'const.sn.screenResolutionX'\t: number;\n\t'const.sn.screenResolutionY'\t: number;\n\t'const.sn.sound.codecs'\t\t\t: string;\n\t// 'const.sn.sound.【buf】.playing': boolean;\n\t'const.sn.aIfStk.length'\t\t: number;\n\t'const.sn.vctCallStk.length'\t: number;\n\t'sn.auto.enabled'\t\t: boolean;\n\t'sn.button.fontFamily'\t: string;\n\t// 'sn.event.domdata.(任意)'\t: string;\n\t'sn.eventArg'\t\t: string;\n\t'sn.eventLabel'\t\t: string;\n\t'sn.skip.all'\t\t: boolean;\n\t'sn.skip.enabled'\t: boolean;\n\t'sn.tagL.enabled'\t: boolean;\n}\nexport function creTMP_DATA(): T_H_TMP_DATA {return {\n\t'const.Date.getDateStr'\t\t: ()=> getDateStr(),\t// 変数参照時の日時を返す\n\t'const.Date.getTime'\t\t: ()=> (new Date).getTime(),\n\t'const.sn.bookmark.json'\t: '[]',\t// SKYNovel内部によるsave:の管理用\n\n\t// 'const.sn.config.(略)'\t: ,\t// prj.jsonの内容を返す\n\t'const.sn.config.window.width'\t: 0,\n\t'const.sn.config.window.height'\t: 0,\n\t'const.sn.config.book.title'\t: '',\n\t'const.sn.config.book.version'\t: '',\n\n\t'const.sn.displayState'\t\t: false,\t// ウインドウ・フルスクリーン状態。trueならフルスクリーン\n\n\t// 'const.sn.frm.(フレーム名)'\t: true,\t// [add_frame]でロードされた id属性が存在するか\n\t// 'const.sn.frm.(フレーム名).alpha'\t: 1,\t// フレームの不透明度\n\t// 'const.sn.frm.(フレーム名).x'\t\t: 0,\t// フレームの座標。画面左上を(0, 0)とする座標。leftやtopでないことに注意\n\t// 'const.sn.frm.(フレーム名).y'\t\t: 0,\t// 実数;縦座標\n\t// 'const.sn.frm.(フレーム名).scale_x': 1,\t// cssでのtransform: scaleの値\n\t// 'const.sn.frm.(フレーム名).scale_y': 1,\t// cssでのtransform: scaleの値\n\t// 'const.sn.frm.(フレーム名).rotate'\t: 0,\t// cssでのrotate、回転角度(単位:deg 度)、正の値は時計回り\n\t// 'const.sn.frm.(フレーム名).width'\t: prjのアプリ横幅画面サイズ,\t// フレームの横幅\n\t// 'const.sn.frm.(フレーム名).height'\t: prjのアプリ縦幅画面サイズ,\t// フレームの縦幅\n\t// 'const.sn.frm.(フレーム名).visible': true,\t// フレームが表示されているか。visible属性の値を返す\n\n\t'const.sn.isApp'\t\t: false,\t// アプリ版か\n\t'const.sn.isDbg'\t\t: false,\t// デバッグモードか\n\t'const.sn.isPackaged'\t: false,\t// パッケージされたアプリか(Electron API - app.isPackaged)\n\t'const.sn.isPaging'\t\t: false,\t// ページ遷移状態か\n\t'const.sn.isDarkMode'\t: false,\t// ダークモードか\n\t'const.sn.isDebugger'\t: true,\t\t// ブラウザ実行、それもVSCode・npmによる「起動:ブラウザ版」上での実行か\n\t'const.sn.isFirstBoot'\t: true,\t\t// ゲームがインストールされてから、初めての起動か(起動されるまでデータが空だったか)\n\t'const.sn.isKidoku'\t\t: true,\t\t// この変数を参照した位置は既読か。参照「後」必ず既読になる点に注意\n\t'const.sn.key.alternate': false,\t// ALTキー(MacならOptionキー)が押されているか\n\t'const.sn.key.back'\t\t: false,\t// back 〃\n\t'const.sn.key.command'\t: false,\t// command 〃\n\t'const.sn.key.control'\t: false,\t// control 〃\n\t'const.sn.key.end'\t\t: false,\t// end 〃\n\t'const.sn.key.escape'\t: false,\t// escape 〃\n\t'const.sn.last_page_plain_text'\t: '',\t// そのページの履歴テキスト(《》文法とルビを含まない)\n\t'const.sn.last_page_text'\t\t: '',\t// そのページの履歴テキスト(《》文法もそのまま)\n\t// 'const.sn.lay.(レイヤ名)'\t\t: true,\t// レイヤが[add_lay]され存在するか\n\t// 'const.sn.lay.(レイヤ名).(foreかback).alpha'\t\t: 0.0〜1.0,\t// レイヤの不透明度\n\t// 'const.sn.lay.(レイヤ名).(foreかback).width'\t\t: 1,\t// レイヤの横幅。ただし文字レイヤの場合は1、画像レイヤの場合、画像読込後でないと0\n\t// 'const.sn.lay.(レイヤ名).(foreかback).height'\t\t: 1,\t// レイヤの縦幅。ただし文字レイヤの場合は1、画像レイヤの場合、画像読込後でないと0\n\t// 'const.sn.lay.(レイヤ名).(foreかback).visible'\t\t: true,\t// レイヤが表示されているか。visible属性の値を返す\n\t// 'const.sn.lay.(レイヤ名).(foreかback).x'\t\t: 0,\t// 実数;横座標</td><td rowspan=\"2\">レイヤの座標。画面左上を(0, 0)とする座標。leftやtopでないことに注意\n\t// 'const.sn.lay.(レイヤ名).(foreかback).y'\t\t: 0,\t// 実数;縦座標\n\t'const.sn.Math.PI'\t\t: Math.PI,\t// 円周率\n\t'const.sn.navigator.language': 'jp',\t// ユーザーが最優先に設定している言語設定\n\t'const.sn.needClick2Play'\t: false,\n\t\t// ブラウザ実行で、クリックされるまで音声再生が差し止められている状態か。なにかクリックされれば falseになる\n\t'const.sn.platform'\t\t\t: CmnLib.platform,\t// 環境による\n\n\t'const.sn.screenResolutionX': screen.availWidth,\t// 画面の最大水平解像度\n\t'const.sn.screenResolutionY': screen.availHeight,\t// 画面の最大垂直解像度\n\t\t// ここでは正確な値は分からない。保存していた前回終了時の位置にウインドウを動かしてから、そのディスプレイののサイズを取得するまでは。\n\n\t'const.sn.sound.codecs'\t\t: '',\t// ゲーム実行環境がどのコーデックをサポートしているか\n\t// 'const.sn.sound.【buf】.playing'\t\t: 再生状態による,\t// サウンドバッファが再生中か<br/>\n\t'const.sn.aIfStk.length'\t: 1,\t// IFスタックの深さ([if]するたびに増)\n\t'const.sn.vctCallStk.length': 0,\t// コールスタックの深さ([call]するたびに増)\n\t'sn.auto.enabled'\t\t: false,\t// 自動読みすすみモードかどうか\n\t'sn.button.fontFamily'\t: '\\'Hiragino Sans\\', \\'Hiragino Kaku Gothic ProN\\', \\'游ゴシック Medium\\', meiryo, sans-serif',\t// 文字ボタンフォントを指定\n\t// 'sn.event.domdata.(任意)'\t\t: ''[event]でフレーム内のHTML要素に登録したイベントで、そのイベント発生時、HTML要素のdata-(任意)属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.eventArg'\t\t: '',\t// [button]等のイベント発生時、そのボタンタグのarg属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.eventLabel'\t\t: '',\t// [button]等のイベント発生時、そのボタンタグのlabel属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.skip.all'\t\t: false,\t// false(初期値)なら既読のみをスキップ\n\t'sn.skip.enabled'\t: false,\t// 次の選択肢(/未読)まで進む が有効か\n\t'sn.tagL.enabled'\t: true,\t\t// 頁末まで一気に読み進むか(l無視)\n}}\n\n\nexport type Scope = 'tmp'|'save'|'sys'|'mp';\n\nexport type T_ProcVal = ()=> T_VAL_BSN;\n\nexport type T_fncSetVal = (arg_name: string, val: T_VAL_BSN, autocast?: boolean)=> void;\n\nexport type T_Variable = {\n\tinit(): Promise<void>;\n\tflush(): void;\n\tsetDoRecProc(doRecProc: (doRec: boolean)=> void): void;\n\n\tgetVal(arg_name: string, def?: number | string, touch?: boolean): T_VAL_DATA;\n\tsetVal_Nochk(scope: Scope, nm: string, val: T_VAL_BSNU, autocast?: boolean): void;\n\n\tdefTmp(name: string, fnc: T_ProcVal): void;\n\tcloneMp(): T_H_VAL_MP;\n\tsetMp(mp: T_H_VAL_MP): void;\n\tsetMark(place: number, mark: T_Mark): void;\n\tgetMark(place: number): T_Mark | undefined;\n\tcloneSave(): T_H_SAVE_DATA;\n\tmark2save(mark: T_Mark): void;\n\n\ttouchAreaKidoku(fn: string): Areas;\n\tgetAreaKidoku(fn: string): Areas | undefined;\n\tsaveKidoku(): void;\n\tupdateData(data: T_Data4Vari): void;\n\n\tdefValTrg(name: string, fnc: T_fncSetVal): void;\n\n\tdoRecLog(): boolean;\n\n\tget tagCh_doWait(): boolean;\n\tget tagCh_doWait_Kidoku(): boolean;\n\tget tagCh_msecWait(): number;\n\tget tagCh_msecWait_Kidoku(): number;\n}\n\nexport type T_H_VAL_MARK\t= {[place: number]: T_Mark};\nexport type T_H_VAL_KIDOKU\t= {[fn: string]: T_H_Areas};\n\n\nexport type T_Data4Vari = {\n\tsys\t\t: T_H_SYS_DATA;\n\tmark\t: T_H_VAL_MARK;\n\tkidoku\t: T_H_VAL_KIDOKU;\n}\n\nexport type T_Mark = {\n\thSave\t: T_H_SAVE_DATA;\n\thPages\t: T_HPage;\n\taIfStk\t: number[];\n\tjson?\t: TArg;\n}\n\n\n// =============== EventMng\nexport type T_Evt2Fnc\t= (e: Event)=> void;\nexport type T_HEvt2Fnc\t= {[name: string]: T_Evt2Fnc;};\n\n\n// =============== FrameMng, LayerMng\nexport type T_GetFrm = {\n\tgetFrmDisabled\t: (id: string)=> boolean;\n};\n\n\n// =============== Pages\nexport type T_HPage = {[name: string]: T_Page};\nexport type T_Page = {\n\tcls\t\t: string;\n\tfore\t: T_RecordPlayBack_lay;\n\tback\t: T_RecordPlayBack_lay;\n}\n\n\n// =============== RubySpliter\nexport type T_PutCh = (ch: string, ruby: string)=> void\n\n\n// =============== Volume change event notification (GrpLayer)\nexport type T_NoticeChgVolume = (vol: number)=> void\n"],"mappings":";;AAyIA,SAAgB,IAA6B;CAAC,OAAO;EACpD,iBAAmB;EAEnB,2BAA2B;EAC3B,wBAAyB;EACzB,wBAAyB;EACzB,qBAAsB;EAGtB,sBAAuB;EAEvB,eAAiB;EACjB,iBAAkB;EAClB,wBAAyB;EACzB,qBAAsB;EACtB,sBAAuB;CAExB;AAAC;AAkCD,SAAgB,IAA4B;CAAC,OAAO;EACnD,mBAAsB;EAEtB,qBAAwB;EACxB,2BAA4B;EAC5B,2BAA4B;EAC5B,2BAA4B,EAAO;EACnC,2BAA4B,EAAO;EACnC,uBAAyB;EACzB,6BAA8B;EAC9B,4BAA6B;EAC7B,6BAA8B;EAE9B,wBAA0B;EAC1B,+BAA+B;EAC/B,wBAA0B;EAC1B,+BAA+B;EAC/B,gBAAoB;EACpB,gCAAgC;EAChC,2BAA4B,GAAG,MAAM;EACrC,0BAA4B,GAAG,MAAM;EACrC,oBAAuB;EACvB,mBAAsB;EACtB,0BAA2B;EAC3B,qBAAwB;EACxB,4BAA6B;EAC7B,wBAA0B;CAC3B;AAAC;AAuED,SAAgB,IAA4B;CAAC,OAAO;EACnD,+BAAgC,EAAW;EAC3C,6CAA8B,IAAI,KAAG,EAAA,CAAG,QAAQ;EAChD,0BAA2B;EAG3B,gCAAiC;EACjC,iCAAkC;EAClC,8BAA+B;EAC/B,gCAAiC;EAEjC,yBAA2B;EAa3B,kBAAoB;EACpB,kBAAoB;EACpB,uBAAwB;EACxB,qBAAuB;EACvB,uBAAwB;EACxB,uBAAwB;EACxB,wBAAyB;EACzB,qBAAuB;EACvB,0BAA0B;EAC1B,qBAAuB;EACvB,wBAAyB;EACzB,wBAAyB;EACzB,oBAAsB;EACtB,uBAAwB;EACxB,iCAAkC;EAClC,2BAA6B;EAQ7B,oBAAsB,KAAK;EAC3B,+BAA+B;EAC/B,2BAA4B;EAE5B,qBAAwB,EAAO;EAE/B,8BAA8B,OAAO;EACrC,8BAA8B,OAAO;EAGrC,yBAA2B;EAE3B,0BAA2B;EAC3B,8BAA8B;EAC9B,mBAAqB;EACrB,wBAAyB;EAEzB,eAAiB;EACjB,iBAAmB;EACnB,eAAiB;EACjB,mBAAoB;EACpB,mBAAoB;CACrB;AAAC"}
|
package/dist_app/CmnLib.js
CHANGED
|
@@ -1,74 +1,75 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
|
|
1
|
+
import { r as e } from "./rolldown-runtime.js";
|
|
2
|
+
//#region src/sn/CmnLib.ts
|
|
3
|
+
function t(e) {
|
|
3
4
|
return parseInt(String(e), 10);
|
|
4
5
|
}
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
return
|
|
6
|
+
function n(e) {
|
|
7
|
+
let t = parseInt(String(e), 10);
|
|
8
|
+
return t < 0 ? -t : t;
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
return String(
|
|
10
|
+
function r(e = "/", t = " ", n = ":", r = "") {
|
|
11
|
+
let i = /* @__PURE__ */ new Date();
|
|
12
|
+
return String(i.getFullYear()) + e + String(100 + i.getMonth() + 1).slice(1, 3) + e + String(100 + i.getDate()).slice(1, 3) + t + String(100 + i.getHours()).slice(1, 3) + n + String(100 + i.getMinutes()).slice(1, 3) + (r === "" ? "" : r + String(i.getMilliseconds()));
|
|
12
13
|
}
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
let e = document.getElementsByTagName("head")[0],
|
|
16
|
-
for (let
|
|
17
|
-
let
|
|
18
|
-
|
|
14
|
+
var i = "/* SKYNovel */";
|
|
15
|
+
function a() {
|
|
16
|
+
let e = document.getElementsByTagName("head")[0], t = e.children.length;
|
|
17
|
+
for (let n = t - 1; n >= 0; --n) {
|
|
18
|
+
let t = e.children[n];
|
|
19
|
+
t instanceof HTMLStyleElement && t.innerText.startsWith(i) && e.removeChild(t);
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
let
|
|
23
|
-
|
|
22
|
+
function o(e) {
|
|
23
|
+
let t = document.createElement("style");
|
|
24
|
+
t.innerHTML = i + e, document.getElementsByTagName("head")[0].appendChild(t);
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
let
|
|
28
|
-
if (!(
|
|
29
|
-
if (isNaN(
|
|
30
|
-
return e[
|
|
26
|
+
var s = "pointerdown", c = "pointerdown", l = "keydown", u = "compChIn";
|
|
27
|
+
function d(e, t, n) {
|
|
28
|
+
let r = e[t];
|
|
29
|
+
if (!(t in e)) {
|
|
30
|
+
if (isNaN(n)) throw `[${e[":タグ名"] ?? ""}]属性 ${t} は必須です`;
|
|
31
|
+
return e[t] = n, n;
|
|
31
32
|
}
|
|
32
|
-
let
|
|
33
|
-
if (isNaN(
|
|
34
|
-
return e[
|
|
33
|
+
let i = String(r).startsWith("0x") ? parseInt(r) : parseFloat(r);
|
|
34
|
+
if (isNaN(i)) throw `[${e[":タグ名"] ?? ""}]属性 ${t} の値【${String(r)}】が数値ではありません`;
|
|
35
|
+
return e[t] = i, i;
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
-
if (!(
|
|
38
|
-
let
|
|
39
|
-
if (
|
|
40
|
-
let
|
|
41
|
-
return e[
|
|
37
|
+
function f(e, t, n) {
|
|
38
|
+
if (!(t in e)) return e[t] = n, n;
|
|
39
|
+
let r = e[t];
|
|
40
|
+
if (r === null) return !1;
|
|
41
|
+
let i = String(r);
|
|
42
|
+
return e[t] = i !== "false" && !!i;
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function p(e) {
|
|
44
45
|
if (e.startsWith("#")) return parseInt(e.slice(1), 16);
|
|
45
|
-
let
|
|
46
|
-
if (!isNaN(
|
|
46
|
+
let t = Number(e);
|
|
47
|
+
if (!isNaN(t)) return t;
|
|
47
48
|
if (e === "black") return 0;
|
|
48
|
-
|
|
49
|
-
let
|
|
50
|
-
if (
|
|
51
|
-
return parseInt(
|
|
49
|
+
y.cc4ColorName.fillStyle = e;
|
|
50
|
+
let n = y.cc4ColorName.fillStyle;
|
|
51
|
+
if (n === "#000000") throw `色名前 ${e} が異常です`;
|
|
52
|
+
return parseInt(n.slice(1), 16);
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
-
let
|
|
55
|
-
return
|
|
54
|
+
function m(e, t, n) {
|
|
55
|
+
let r = e[t];
|
|
56
|
+
return r ? e[t] = p(String(r)) : (e[t] = n, n);
|
|
56
57
|
}
|
|
57
|
-
var
|
|
58
|
-
function
|
|
59
|
-
let
|
|
60
|
-
return `[${e[":タグ名"] ?? ""}] ${
|
|
61
|
-
${String(e[
|
|
62
|
-
${"^".padStart(Number(
|
|
58
|
+
var h = /JSON at position (\d+)$/;
|
|
59
|
+
function g(e, t = "", n = "") {
|
|
60
|
+
let r = (h.exec(n) ?? ["", ""])[1];
|
|
61
|
+
return `[${e[":タグ名"] ?? ""}] ${t} 属性の解析エラー : ${n}
|
|
62
|
+
${String(e[t])}${r ? `
|
|
63
|
+
${"^".padStart(Number(r))}` : ""}`;
|
|
63
64
|
}
|
|
64
|
-
var
|
|
65
|
-
function
|
|
66
|
-
return (
|
|
65
|
+
var _ = /^[^/.]+$|[^/]+(?=\.)/;
|
|
66
|
+
function v(e) {
|
|
67
|
+
return (_.exec(e) ?? [""])[0];
|
|
67
68
|
}
|
|
68
|
-
var
|
|
69
|
+
var y = class t {
|
|
69
70
|
static async init() {
|
|
70
|
-
let
|
|
71
|
-
this.platform = JSON.stringify(
|
|
71
|
+
let t = await import("./platform.js").then((t) => /* @__PURE__ */ e(t.default));
|
|
72
|
+
this.platform = JSON.stringify(t), this.plat_desc = t.description ?? "", this.isSafari = t.name === "Safari", this.isFirefox = t.name === "Firefox", this.isMac = (t.os?.family ?? "").includes("OS X"), this.isMobile = !/(Windows|OS X)/.test(t.os?.family ?? "");
|
|
72
73
|
}
|
|
73
74
|
static stageW = 0;
|
|
74
75
|
static stageH = 0;
|
|
@@ -83,12 +84,13 @@ var CmnLib = class g {
|
|
|
83
84
|
static isDbg = !1;
|
|
84
85
|
static isPackaged = !1;
|
|
85
86
|
static needClick2Play() {
|
|
86
|
-
return "AudioContext" in globalThis ? (
|
|
87
|
+
return "AudioContext" in globalThis ? (t.#e = new globalThis.AudioContext(), t.needClick2Play = () => t.#e.state === "suspended") : t.needClick2Play = () => !1, t.needClick2Play();
|
|
87
88
|
}
|
|
88
89
|
static #e;
|
|
89
90
|
static isDarkMode = !1;
|
|
90
91
|
static cc4ColorName;
|
|
91
92
|
};
|
|
92
|
-
|
|
93
|
+
//#endregion
|
|
94
|
+
export { u as a, m as c, v as d, a as f, n as g, p as h, l as i, d as l, g as m, s as n, o, t as p, c as r, f as s, y as t, r as u };
|
|
93
95
|
|
|
94
96
|
//# sourceMappingURL=CmnLib.js.map
|
package/dist_app/CmnLib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmnLib.js","names":["#ac"],"sources":["../src/sn/CmnLib.ts"],"sourcesContent":["/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2018-2025 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport type {TArg} from './Grammar';\n\n// =============== Global\nexport function int(o: unknown): number {return parseInt(String(o), 10)}\nexport function uint(o: unknown): number {\n\tconst v = parseInt(String(o), 10);\n\treturn v < 0 ? -v : v;\n}\n\nexport function getDateStr(spl_dd = '/', spl_dt = ' ', spl_tt = ':', spl_ms = ''): string {\n\tconst now = new Date;\n\treturn String(now.getFullYear())\n\t\t+ spl_dd+ String(100 +now.getMonth() +1).slice(1, 3)\n\t\t+ spl_dd+ String(100 +now.getDate()).slice(1, 3)\n\t\t+ spl_dt+ String(100 +now.getHours()).slice(1, 3)\n\t\t+ spl_tt+ String(100 +now.getMinutes()).slice(1, 3)\n\t\t+ (spl_ms === '' ?'' :spl_ms+ String(now.getMilliseconds()));\n}\n\n\nconst\tcss_key4del\t= '/* SKYNovel */';\nexport function initStyle() {\n\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\tconst he = document.getElementsByTagName('head')[0]!;\n\tconst len = he.children.length;\n\tfor (let i=len -1; i>=0; --i) {\n\t\tconst v = he.children[i];\n\t\tif (! (v instanceof HTMLStyleElement)) continue;\n\t\tif (! v.innerText.startsWith(css_key4del)) continue;\n\t\the.removeChild(v);\n\t}\n}\nexport function addStyle(style: string) {\n\tconst gs = document.createElement('style');\n\tgs.innerHTML = css_key4del + style;\n\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\tdocument.getElementsByTagName('head')[0]!.appendChild(gs);\n}\n\n\n\n// =============== EventMng\nexport const EVNM_BUTTON= 'pointerdown';\nexport const EVNM_CLICK\t= 'pointerdown';\nexport const EVNM_KEY\t= 'keydown';\n\nimport type {Container} from 'pixi.js';\nexport type IEvtMng = {\n\tbutton(hArg: TArg, ctnBtn: Container, normal: ()=> void, hover: ()=> boolean, clicked: ()=> void): void;\n\tunButton(em: Container): void;\n\tget\tisSkipping(): boolean;\n\thideHint(): void;\n\tcvsResize(): void;\n\n\tresvFlameEvent(body: HTMLBodyElement): void;\n}\n\n\n\n// =============== ScriptIterator\nexport\tconst\tRPN_COMP_CHIN = 'compChIn';\n\n\n\ntype T_HASH_Arg = {\n\t':タグ名'?\t: string;\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t[name: string]: any;\n};\n\nexport\tfunction argChk_Num(hash: T_HASH_Arg, name: string, def: number): number {\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\tconst v = hash[name];\n\tif (! (name in hash)) {\n\t\tif (isNaN(def)) throw `[${hash[':タグ名'] ?? ''}]属性 ${name} は必須です`;\n\n\t\thash[name] = def;\n\t\treturn def;\n\t}\n\n\tconst n = String(v).startsWith('0x')\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t? parseInt(v)\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t: parseFloat(v);\n\tif (isNaN(n)) throw `[${hash[':タグ名'] ?? ''}]属性 ${name} の値【${String(v)}】が数値ではありません`;\n\n\thash[name] = n;\n\treturn n;\n}\n\n/*\n\tそれぞれの型を Boolean 型に変換した場合の値は以下のようになります。\n\n\tUndefiend \tfalse\n\tNull \t\tfalse\n\tBoolean \t変換前のオブジェクトと同じ\n\tNumber \t\t0 または NaN は false それ以外の値は true\n\tString \t\t空文字列は false それ以外の値は true\n\tObject \t\ttrue\n*/\nexport\tfunction argChk_Boolean(hash: T_HASH_Arg, name: string, def: boolean): boolean {\n\t//\tt-r-a-c-e(Boolean(null),Boolean(\"\"),Boolean(undefined),Boolean(\"0\"),Boolean(\"1\"),Boolean(\"true\"),Boolean(\"false\"),Boolean(\"あい\"));\n\t//\t[exec] false false false true true true true true\n\t/*console.log('%o %o %o %o %o %o %o %o',\n\t\tBoolean(null), Boolean(\"\"), Boolean(undefined), Boolean(\"0\"), Boolean(\"1\"),\n\t\tBoolean(\"true\"), Boolean(\"false\"), Boolean(\"あい\"));\n\t*/\n\n\t//if (! hArg[name]) return hArg[name] = def;\n\tif (! (name in hash)) {hash[name] = def; return def;}\n\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\tconst v = hash[name];\n\tif (v === null) return false;\n\n\tconst v2 = String(v);\n\tconst ret = hash[name] = v2 === 'false'? false : Boolean(v2);\n\treturn ret;\n}\n\n\nexport function parseColor(v: string): number {\n\tif (v.startsWith('#')) return parseInt(v.slice(1), 16);\n\tconst n = Number(v);\n\tif (! isNaN(n)) return n;\t// 0, 0xffffff\n\n\tif (v === 'black') return 0;\n\tCmnLib.cc4ColorName.fillStyle = v;\n\tconst cc = CmnLib.cc4ColorName.fillStyle;\n\tif (cc === '#000000') throw `色名前 ${v} が異常です`;\n\n\treturn parseInt(cc.slice(1), 16);\n}\nexport\tfunction argChk_Color(hash: T_HASH_Arg, name: string, def: number): number {\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\tconst v = hash[name];\n\tif (! v) {hash[name] = def; return def;}\n\n\tconst ret = hash[name] = parseColor(String(v));\n\treturn ret;\n}\n\n\nconst REG_ERRMES_JSON = /JSON at position (\\d+)$/;\n\t// Unexpected number in JSON at position\nexport\tfunction mesErrJSON(hArg: TArg, nm = '', mes = ''): string {\n\tconst col = (REG_ERRMES_JSON.exec(mes) ?? ['',''])[1];\n\treturn `[${hArg[':タグ名'] ?? ''}] ${nm} 属性の解析エラー : ${mes}\n${\n\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\tString(hArg[<keyof TArg>nm])\n}${col ?`\n${'^'.padStart(Number(col))}` :''}`;\n}\n\n\nconst REG_FN\t= /^[^/.]+$|[^/]+(?=\\.)/;\n\t// https://regex101.com/r/8sltIm/1\nexport\tfunction getFn(p: string) {return (REG_FN.exec(p) ?? [''])[0]}\n\nexport type T_DIP = {[name: string]: string};\n\n//import {isMobile} from 'pixi.js';\t\t// 使い物にならないことを確認済み\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport class CmnLib {\n\tstatic\tasync\tinit() {\n\t\tconst p = await import('platform');\n\t\tthis.platform\t= JSON.stringify(p);\n\t\tthis.plat_desc\t= p.description ?? '';\n\t\tthis.isSafari\t= p.name === 'Safari';\n\t\tthis.isFirefox\t= p.name === 'Firefox';\n\t\tthis.isMac\t\t= (p.os?.family ?? '').includes('OS X');\n\t\tthis.isMobile\t= ! /(Windows|OS X)/.test(p.os?.family ?? '');\n\t}\n\n\tstatic\tstageW\t\t= 0;\n\tstatic\tstageH\t\t= 0;\n\tstatic\tdebugLog\t= false;\n\tstatic\tplatform\t: string;\n\tstatic\tplat_desc\t: string;\n\tstatic\tisSafari\t: boolean;\n\tstatic\tisFirefox\t: boolean;\n\tstatic\tisMac\t\t: boolean;\n\tstatic\tisMobile\t: boolean;\n\tstatic\thDip\t\t: T_DIP\t= {};\n\tstatic\tisDbg\t\t= false;\n\tstatic\tisPackaged\t= false;\n\n\tstatic\tneedClick2Play(): boolean {\n\t\tif ('AudioContext' in globalThis) {\n\t\t\tCmnLib.#ac = new globalThis.AudioContext;\n\t\t\tCmnLib.needClick2Play = ()=> CmnLib.#ac.state === 'suspended';\n\t\t}\n\t\telse CmnLib.needClick2Play = ()=> false;\n\n\t\treturn CmnLib.needClick2Play();\n\t}\n\tstatic\t#ac: AudioContext;\n\n\tstatic\tisDarkMode\t= false;\n\n\tstatic\tcc4ColorName: CanvasRenderingContext2D;\n\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CmnLib.js","names":["#ac"],"sources":["../src/sn/CmnLib.ts"],"sourcesContent":["/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2018-2025 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport type {TArg} from './Grammar';\n\n// =============== Global\nexport function int(o: unknown): number {return parseInt(String(o), 10)}\nexport function uint(o: unknown): number {\n\tconst v = parseInt(String(o), 10);\n\treturn v < 0 ? -v : v;\n}\n\nexport function getDateStr(spl_dd = '/', spl_dt = ' ', spl_tt = ':', spl_ms = ''): string {\n\tconst now = new Date;\n\treturn String(now.getFullYear())\n\t\t+ spl_dd+ String(100 +now.getMonth() +1).slice(1, 3)\n\t\t+ spl_dd+ String(100 +now.getDate()).slice(1, 3)\n\t\t+ spl_dt+ String(100 +now.getHours()).slice(1, 3)\n\t\t+ spl_tt+ String(100 +now.getMinutes()).slice(1, 3)\n\t\t+ (spl_ms === '' ?'' :spl_ms+ String(now.getMilliseconds()));\n}\n\n\nconst\tcss_key4del\t= '/* SKYNovel */';\nexport function initStyle() {\n\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\tconst he = document.getElementsByTagName('head')[0]!;\n\tconst len = he.children.length;\n\tfor (let i=len -1; i>=0; --i) {\n\t\tconst v = he.children[i];\n\t\tif (! (v instanceof HTMLStyleElement)) continue;\n\t\tif (! v.innerText.startsWith(css_key4del)) continue;\n\t\the.removeChild(v);\n\t}\n}\nexport function addStyle(style: string) {\n\tconst gs = document.createElement('style');\n\tgs.innerHTML = css_key4del + style;\n\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\tdocument.getElementsByTagName('head')[0]!.appendChild(gs);\n}\n\n\n\n// =============== EventMng\nexport const EVNM_BUTTON= 'pointerdown';\nexport const EVNM_CLICK\t= 'pointerdown';\nexport const EVNM_KEY\t= 'keydown';\n\nimport type {Container} from 'pixi.js';\nexport type IEvtMng = {\n\tbutton(hArg: TArg, ctnBtn: Container, normal: ()=> void, hover: ()=> boolean, clicked: ()=> void): void;\n\tunButton(em: Container): void;\n\tget\tisSkipping(): boolean;\n\thideHint(): void;\n\tcvsResize(): void;\n\n\tresvFlameEvent(body: HTMLBodyElement): void;\n}\n\n\n\n// =============== ScriptIterator\nexport\tconst\tRPN_COMP_CHIN = 'compChIn';\n\n\n\ntype T_HASH_Arg = {\n\t':タグ名'?\t: string;\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t[name: string]: any;\n};\n\nexport\tfunction argChk_Num(hash: T_HASH_Arg, name: string, def: number): number {\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\tconst v = hash[name];\n\tif (! (name in hash)) {\n\t\tif (isNaN(def)) throw `[${hash[':タグ名'] ?? ''}]属性 ${name} は必須です`;\n\n\t\thash[name] = def;\n\t\treturn def;\n\t}\n\n\tconst n = String(v).startsWith('0x')\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t? parseInt(v)\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t: parseFloat(v);\n\tif (isNaN(n)) throw `[${hash[':タグ名'] ?? ''}]属性 ${name} の値【${String(v)}】が数値ではありません`;\n\n\thash[name] = n;\n\treturn n;\n}\n\n/*\n\tそれぞれの型を Boolean 型に変換した場合の値は以下のようになります。\n\n\tUndefiend \tfalse\n\tNull \t\tfalse\n\tBoolean \t変換前のオブジェクトと同じ\n\tNumber \t\t0 または NaN は false それ以外の値は true\n\tString \t\t空文字列は false それ以外の値は true\n\tObject \t\ttrue\n*/\nexport\tfunction argChk_Boolean(hash: T_HASH_Arg, name: string, def: boolean): boolean {\n\t//\tt-r-a-c-e(Boolean(null),Boolean(\"\"),Boolean(undefined),Boolean(\"0\"),Boolean(\"1\"),Boolean(\"true\"),Boolean(\"false\"),Boolean(\"あい\"));\n\t//\t[exec] false false false true true true true true\n\t/*console.log('%o %o %o %o %o %o %o %o',\n\t\tBoolean(null), Boolean(\"\"), Boolean(undefined), Boolean(\"0\"), Boolean(\"1\"),\n\t\tBoolean(\"true\"), Boolean(\"false\"), Boolean(\"あい\"));\n\t*/\n\n\t//if (! hArg[name]) return hArg[name] = def;\n\tif (! (name in hash)) {hash[name] = def; return def;}\n\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\tconst v = hash[name];\n\tif (v === null) return false;\n\n\tconst v2 = String(v);\n\tconst ret = hash[name] = v2 === 'false'? false : Boolean(v2);\n\treturn ret;\n}\n\n\nexport function parseColor(v: string): number {\n\tif (v.startsWith('#')) return parseInt(v.slice(1), 16);\n\tconst n = Number(v);\n\tif (! isNaN(n)) return n;\t// 0, 0xffffff\n\n\tif (v === 'black') return 0;\n\tCmnLib.cc4ColorName.fillStyle = v;\n\tconst cc = CmnLib.cc4ColorName.fillStyle;\n\tif (cc === '#000000') throw `色名前 ${v} が異常です`;\n\n\treturn parseInt(cc.slice(1), 16);\n}\nexport\tfunction argChk_Color(hash: T_HASH_Arg, name: string, def: number): number {\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\tconst v = hash[name];\n\tif (! v) {hash[name] = def; return def;}\n\n\tconst ret = hash[name] = parseColor(String(v));\n\treturn ret;\n}\n\n\nconst REG_ERRMES_JSON = /JSON at position (\\d+)$/;\n\t// Unexpected number in JSON at position\nexport\tfunction mesErrJSON(hArg: TArg, nm = '', mes = ''): string {\n\tconst col = (REG_ERRMES_JSON.exec(mes) ?? ['',''])[1];\n\treturn `[${hArg[':タグ名'] ?? ''}] ${nm} 属性の解析エラー : ${mes}\n${\n\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\tString(hArg[<keyof TArg>nm])\n}${col ?`\n${'^'.padStart(Number(col))}` :''}`;\n}\n\n\nconst REG_FN\t= /^[^/.]+$|[^/]+(?=\\.)/;\n\t// https://regex101.com/r/8sltIm/1\nexport\tfunction getFn(p: string) {return (REG_FN.exec(p) ?? [''])[0]}\n\nexport type T_DIP = {[name: string]: string};\n\n//import {isMobile} from 'pixi.js';\t\t// 使い物にならないことを確認済み\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport class CmnLib {\n\tstatic\tasync\tinit() {\n\t\tconst p = await import('platform');\n\t\tthis.platform\t= JSON.stringify(p);\n\t\tthis.plat_desc\t= p.description ?? '';\n\t\tthis.isSafari\t= p.name === 'Safari';\n\t\tthis.isFirefox\t= p.name === 'Firefox';\n\t\tthis.isMac\t\t= (p.os?.family ?? '').includes('OS X');\n\t\tthis.isMobile\t= ! /(Windows|OS X)/.test(p.os?.family ?? '');\n\t}\n\n\tstatic\tstageW\t\t= 0;\n\tstatic\tstageH\t\t= 0;\n\tstatic\tdebugLog\t= false;\n\tstatic\tplatform\t: string;\n\tstatic\tplat_desc\t: string;\n\tstatic\tisSafari\t: boolean;\n\tstatic\tisFirefox\t: boolean;\n\tstatic\tisMac\t\t: boolean;\n\tstatic\tisMobile\t: boolean;\n\tstatic\thDip\t\t: T_DIP\t= {};\n\tstatic\tisDbg\t\t= false;\n\tstatic\tisPackaged\t= false;\n\n\tstatic\tneedClick2Play(): boolean {\n\t\tif ('AudioContext' in globalThis) {\n\t\t\tCmnLib.#ac = new globalThis.AudioContext;\n\t\t\tCmnLib.needClick2Play = ()=> CmnLib.#ac.state === 'suspended';\n\t\t}\n\t\telse CmnLib.needClick2Play = ()=> false;\n\n\t\treturn CmnLib.needClick2Play();\n\t}\n\tstatic\t#ac: AudioContext;\n\n\tstatic\tisDarkMode\t= false;\n\n\tstatic\tcc4ColorName: CanvasRenderingContext2D;\n\n}\n"],"mappings":"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"}
|
package/dist_app/Config.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { n as
|
|
3
|
-
|
|
4
|
-
var
|
|
1
|
+
import { t as e } from "./CmnLib.js";
|
|
2
|
+
import { n as t, t as n } from "./ConfigBase.js";
|
|
3
|
+
//#region src/sn/Config.ts
|
|
4
|
+
var r = "userdata:/", i = "downloads:/", a = class r extends n {
|
|
5
|
+
sys;
|
|
5
6
|
static async generate(e) {
|
|
6
7
|
let t = new r(e), n = e.arg.cur + "prj.json", i = await e.fetch(n);
|
|
7
8
|
if (!i.ok) throw Error(i.statusText);
|
|
@@ -15,12 +16,13 @@ var Config = class r extends ConfigBase {
|
|
|
15
16
|
return t.window ??= {
|
|
16
17
|
width: 300,
|
|
17
18
|
height: 300
|
|
18
|
-
},
|
|
19
|
+
}, e.stageW = t.window.width, e.stageH = t.window.height, e.debugLog = t.debug.debugLog, await e.init(), super.load(t);
|
|
19
20
|
}
|
|
20
|
-
searchPath(e, n =
|
|
21
|
+
searchPath(e, n = t.DEFAULT) {
|
|
21
22
|
return e.startsWith("downloads:/") ? this.sys.path_downloads + e.slice(11) : e.startsWith("userdata:/") ? this.sys.path_userdata + "storage/" + e.slice(10) : super.searchPath(e, n);
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
+
//#endregion
|
|
26
|
+
export { i as n, r, a as t };
|
|
25
27
|
|
|
26
28
|
//# sourceMappingURL=Config.js.map
|
package/dist_app/Config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.js","names":[
|
|
1
|
+
{"version":3,"file":"Config.js","names":[],"sources":["../src/sn/Config.ts"],"sourcesContent":["/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2018-2025 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport {CmnLib} from './CmnLib';\nimport type {SysBase} from './SysBase';\nimport {ConfigBase, SEARCH_PATH_ARG_EXT, type T_CFG_RAW} from './ConfigBase';\n\nexport const PROTOCOL_USERDATA\t= 'userdata:/';\nexport const PROTOCOL_DL\t\t= 'downloads:/';\n\n\nexport class Config extends ConfigBase {\n\tstatic\tasync\tgenerate(sys: SysBase) {\n\t\tconst c = new Config(sys);\n\t\tconst fn = sys.arg.cur +'prj.json';\n\t\tconst res = await sys.fetch(fn);\n\t\tif (! res.ok) throw Error(res.statusText);\n\n\t\tconst dec = await sys.dec(fn, await res.text());\n\t\tawait c.load(<T_CFG_RAW>JSON.parse(dec));\n\t\treturn c;\n\t}\n\n\tprotected\tconstructor(override readonly sys: SysBase) {super(sys)}\n\n\tprotected\toverride\tasync load(oCfg: T_CFG_RAW) {\n\t\toCfg.window ??= {width: 300, height: 300};\n\t\tCmnLib.stageW = oCfg.window.width;\n\t\tCmnLib.stageH = oCfg.window.height;\n\t\tCmnLib.debugLog = oCfg.debug.debugLog;\n\t\tawait CmnLib.init();\n\n\t\treturn super.load(oCfg);\n\t}\n\n\toverride\tsearchPath(fn: string, extptn: SEARCH_PATH_ARG_EXT = SEARCH_PATH_ARG_EXT.DEFAULT): string {\n\t\tif (fn.startsWith(PROTOCOL_DL)) {\n\t\t\treturn this.sys.path_downloads + fn.slice(11);\n\t\t}\n\t\tif (fn.startsWith(PROTOCOL_USERDATA)) {\n\t\t\treturn this.sys.path_userdata + 'storage/'+ fn.slice(10);\n\t\t}\n\n\t\treturn super.searchPath(fn, extptn);\n\t}\n\n}\n"],"mappings":";;;AAWA,IAAa,IAAoB,cACpB,IAAe,eAGf,IAAb,MAAa,UAAe,EAAW;CAYE;CAXxC,aAAa,SAAS,GAAc;EACnC,IAAM,IAAI,IAAI,EAAO,CAAG,GAClB,IAAK,EAAI,IAAI,MAAK,YAClB,IAAM,MAAM,EAAI,MAAM,CAAE;EAC9B,IAAI,CAAE,EAAI,IAAI,MAAM,MAAM,EAAI,UAAU;EAExC,IAAM,IAAM,MAAM,EAAI,IAAI,GAAI,MAAM,EAAI,KAAK,CAAC;EAE9C,OADA,MAAM,EAAE,KAAgB,KAAK,MAAM,CAAG,CAAC,GAChC;CACR;CAEA,YAAsB,GAAgC;EAAd,AAAe,MAAM,CAAG,GAAxB,KAAA,MAAA;CAAyB;CAEjE,MAAyB,KAAK,GAAiB;EAO9C,OANA,EAAK,WAAW;GAAC,OAAO;GAAK,QAAQ;EAAG,GACxC,EAAO,SAAS,EAAK,OAAO,OAC5B,EAAO,SAAS,EAAK,OAAO,QAC5B,EAAO,WAAW,EAAK,MAAM,UAC7B,MAAM,EAAO,KAAK,GAEX,MAAM,KAAK,CAAI;CACvB;CAEA,WAAoB,GAAY,IAA8B,EAAoB,SAAiB;EAQlG,OAPI,EAAG,WAAA,aAAsB,IACrB,KAAK,IAAI,iBAAiB,EAAG,MAAM,EAAE,IAEzC,EAAG,WAAA,YAA4B,IAC3B,KAAK,IAAI,gBAAgB,aAAY,EAAG,MAAM,EAAE,IAGjD,MAAM,WAAW,GAAI,CAAM;CACnC;AAED"}
|