From 09225a33c7af4db256a1900460dff75592f70302 Mon Sep 17 00:00:00 2001 From: "DESKTOP-5RP3AKU\\Jisol" <2858626794@qq.com> Date: Thu, 26 Oct 2023 03:06:44 +0800 Subject: [PATCH] update --- JisolGameCocos/assets/Demo.scene | 561 - JisolGameCocos/assets/Demo.scene.meta | 11 - .../battle/PVP.meta => resources/config.meta} | 2 +- .../assets/resources/config/game.meta | 9 + .../assets/resources/config/game/GRole.json | 1 + .../resources/config/game/GRole.json.meta | 11 + .../assets/resources/config/ts.meta | 9 + .../assets/resources/config/ts/TableGRole.ts | 35 + .../config/ts/TableGRole.ts.meta} | 2 +- .../prefab/battle/mode/GLDLEMode.prefab | 99 + .../prefab/battle/mode/GLDLEMode.prefab.meta | 13 + .../prefab/battle/role/RolePVPEntity.prefab | 15 +- JisolGameCocos/assets/role.meta | 11 + .../assets/{res => role}/spine.meta | 0 .../spine/召唤与合成819个Spine.meta | 0 .../spine/召唤与合成819个Spine/guaiA1a.meta | 0 .../guaiA1a/guaiA1a.spine | Bin .../guaiA1a/guaiA1a.spine.meta | 0 .../guaiA1a/guaiA1aTexture.atlas | 0 .../guaiA1a/guaiA1aTexture.atlas.meta | 0 .../guaiA1a/guaiA1aTexture.png | Bin .../guaiA1a/guaiA1aTexture.png.meta | 0 .../召唤与合成819个Spine/guaiA1a/pic.meta | 0 .../guaiA1a/pic/guaiA1a.meta | 0 .../guaiA1a/pic/guaiA1a/beimian.png | Bin .../guaiA1a/pic/guaiA1a/beimian.png.meta | 0 .../guaiA1a/pic/guaiA1a/jiao1.png | Bin .../guaiA1a/pic/guaiA1a/jiao1.png.meta | 0 .../guaiA1a/pic/guaiA1a/jiao2.png | Bin .../guaiA1a/pic/guaiA1a/jiao2.png.meta | 0 .../guaiA1a/pic/guaiA1a/jiao3.png | Bin .../guaiA1a/pic/guaiA1a/jiao3.png.meta | 0 .../guaiA1a/pic/guaiA1a/jiao4.png | Bin .../guaiA1a/pic/guaiA1a/jiao4.png.meta | 0 .../guaiA1a/pic/guaiA1a/shenti.png | Bin .../guaiA1a/pic/guaiA1a/shenti.png.meta | 0 .../guaiA1a/pic/guaiA1a/yan.png | Bin .../guaiA1a/pic/guaiA1a/yan.png.meta | 0 .../guaiA1a/pic/guaiA1a/ye.png | Bin .../guaiA1a/pic/guaiA1a/ye.png.meta | 0 .../召唤与合成819个Spine/guaiA1a/spine.meta | 0 .../guaiA1a/spine/guaiA1a.atlas | 0 .../guaiA1a/spine/guaiA1a.atlas.meta | 0 .../guaiA1a/spine/guaiA1a.json | 0 .../guaiA1a/spine/guaiA1a.json.meta | 0 .../guaiA1a/spine/guaiA1a.png | Bin .../guaiA1a/spine/guaiA1a.png.meta | 0 .../spine/召唤与合成819个Spine/guaiA1a_1.meta | 9 + .../guaiA1a_1/guaiA1a.spine | Bin 0 -> 9213 bytes .../guaiA1a_1/guaiA1a.spine.meta | 12 + .../guaiA1a_1/guaiA1aTexture.atlas | 27 + .../guaiA1a_1/guaiA1aTexture.atlas.meta | 12 + .../guaiA1a_1/guaiA1aTexture.png | Bin 0 -> 20619 bytes .../guaiA1a_1/guaiA1aTexture.png.meta | 134 + .../召唤与合成819个Spine/guaiA1a_1/pic.meta | 9 + .../guaiA1a_1/pic/guaiA1a.meta | 9 + .../guaiA1a_1/pic/guaiA1a/guaiA1a_head.png | Bin 0 -> 39987 bytes .../guaiA1a_1/pic/guaiA1a/guaiA1a_head.png.meta | 134 + .../guaiA1a_1/pic/guaiA1a/guaiA1a_legL.png | Bin 0 -> 24571 bytes .../guaiA1a_1/pic/guaiA1a/guaiA1a_legL.png.meta | 134 + .../guaiA1a_1/pic/guaiA1a/guaiA1a_legR.png | Bin 0 -> 24670 bytes .../guaiA1a_1/pic/guaiA1a/guaiA1a_legR.png.meta | 134 + .../召唤与合成819个Spine/guaiA1a_1/spine.meta | 9 + .../guaiA1a_1/spine/guaiA1a.atlas | 27 + .../guaiA1a_1/spine/guaiA1a.atlas.meta | 12 + .../guaiA1a_1/spine/guaiA1a.json | 1 + .../guaiA1a_1/spine/guaiA1a.json.meta | 11 + .../guaiA1a_1/spine/guaiA1a.png | Bin 0 -> 20518 bytes .../guaiA1a_1/spine/guaiA1a.png.meta | 134 + JisolGameCocos/assets/script/App.ts | 51 + JisolGameCocos/assets/script/Main.ts | 3 + .../assets/script/battle/GBaseMode.ts | 12 +- .../assets/script/battle/base/GObject.ts | 18 +- .../script/battle/base/fsm/PVP/GFSMPVP.ts | 2 +- .../base/fsm/base/GFSMBattle/GFSMBattle.ts | 24 +- .../script/battle/base/role/GRoleBase.ts | 42 +- .../battle/base/role/PVP/GRolePVPEntity.ts | 10 +- .../assets/script/battle/entity/GRole.ts | 37 + .../assets/script/battle/entity/GRole.ts.meta | 9 + .../assets/script/battle/entity/GTactical.ts | 14 +- .../assets/script/battle/modes.meta | 9 + .../assets/script/battle/modes/GLDLEMode.ts | 10 + .../script/battle/modes/GLDLEMode.ts.meta | 9 + .../script/battle/{PVP => modes}/GPVPMode.ts | 31 +- .../battle/{PVP => modes}/GPVPMode.ts.meta | 0 .../assets/script/battle/util/GRoleUtil.ts | 19 - JisolGameCocos/config/GRole.xlsx | Bin 0 -> 11164 bytes JisolGameCocos/config/Id Info.txt | 1 + JisolGameCocos/config/Table Info.txt | 5 + JisolGameCocos/extensions/ngame | 2 +- .../oops-plugin-excel-to-json/.gitignore | 2 + .../@types/editor.d.ts | 1201 ++ .../@types/electron.d.ts | 16092 ++++++++++++++++ .../@types/extension.d.ts | 57 + .../@types/index.d.ts | 2 + .../@types/message.d.ts | 27 + .../alipay-mini-game/@types/index.d.ts | 19 + .../@types/packages/android/@types/index.d.ts | 73 + .../packages/asset-db/@types/message.d.ts | 179 + .../packages/asset-db/@types/public.d.ts | 115 + .../@types/packages/assets/@types/public.d.ts | 25 + .../baidu-mini-game/@types/index.d.ts | 18 + .../@types/packages/builder/@types/index.d.ts | 2 + .../builder/@types/public/build-plugin.d.ts | 88 + .../builder/@types/public/build-result.d.ts | 190 + .../builder/@types/public/global.d.ts | 7 + .../packages/builder/@types/public/index.d.ts | 100 + .../builder/@types/public/message.d.ts | 40 + .../builder/@types/public/options.d.ts | 134 + .../@types/public/texture-compress.d.ts | 70 + .../bytedance-mini-game/@types/index.d.ts | 25 + .../packages/cocos-play/@types/index.d.ts | 30 + .../packages/console/@types/pritate.d.ts | 25 + .../packages/engine-extends/@types/glTF.d.ts | 684 + .../engine-extends/@types/gltf-validator.d.ts | 109 + .../@types/i18n-well-defined.d.ts | 811 + .../engine-extends/@types/third-parts.d.ts | 156 + .../packages/engine/@types/message.d.ts | 16 + .../packages/huawei-agc/@types/index.d.ts | 49 + .../huawei-quick-game/@types/index.d.ts | 34 + .../packages/ios-app-clip/@types/index.d.ts | 24 + .../@types/packages/ios/@types/index.d.ts | 39 + .../packages/link-sure/@types/index.d.ts | 30 + .../@types/packages/linux/@types/index.d.ts | 3 + .../@types/packages/mac/@types/index.d.ts | 26 + .../@types/packages/ohos/@types/index.d.ts | 36 + .../packages/open-harmonyos/@types/index.d.ts | 38 + .../packages/oppo-mini-game/@types/index.d.ts | 33 + .../packages/package-asset/@types/public.d.ts | 60 + .../@types/packages/preview/@types/index.d.ts | 1 + .../packages/programming/@types/message.d.ts | 19 + .../@types/packages/qtt/@types/index.d.ts | 41 + .../packages/scene/@types/engine-view.d.ts | 73 + .../@types/packages/scene/@types/message.d.ts | 68 + .../@types/packages/scene/@types/public.d.ts | 408 + .../scene/@types/scene-facade-interface.d.ts | 827 + .../packages/server/@types/package.d.ts | 27 + .../packages/shortcuts/@types/shortcut.d.ts | 19 + .../packages/vivo-mini-game/@types/index.d.ts | 33 + .../packages/web-desktop/@types/index.d.ts | 76 + .../packages/web-mobile/@types/index.d.ts | 20 + .../packages/wechatgame/@types/index.d.ts | 81 + .../@types/packages/windows/@types/index.d.ts | 24 + .../xiaomi-quick-game/@types/index.d.ts | 38 + .../oops-plugin-excel-to-json/LICENSE | 21 + .../oops-plugin-excel-to-json/README.md | 22 + .../dist/ExcelToJson.js | 308 + .../dist/JsonToTs.js | 62 + .../oops-plugin-excel-to-json/dist/main.js | 38 + .../oops-plugin-excel-to-json/i18n/en.js | 7 + .../oops-plugin-excel-to-json/i18n/zh.js | 7 + .../package-lock.json | 1911 ++ .../oops-plugin-excel-to-json/package.json | 55 + .../src/ExcelToJson.ts | 304 + .../oops-plugin-excel-to-json/src/JsonToTs.ts | 61 + .../oops-plugin-excel-to-json/src/main.ts | 41 + .../oops-plugin-excel-to-json/tsconfig.json | 14 + .../packages/oops-plugin-excel-to-json.json | 6 + 158 files changed, 26537 insertions(+), 639 deletions(-) delete mode 100644 JisolGameCocos/assets/Demo.scene delete mode 100644 JisolGameCocos/assets/Demo.scene.meta rename JisolGameCocos/assets/{script/battle/PVP.meta => resources/config.meta} (70%) create mode 100644 JisolGameCocos/assets/resources/config/game.meta create mode 100644 JisolGameCocos/assets/resources/config/game/GRole.json create mode 100644 JisolGameCocos/assets/resources/config/game/GRole.json.meta create mode 100644 JisolGameCocos/assets/resources/config/ts.meta create mode 100644 JisolGameCocos/assets/resources/config/ts/TableGRole.ts rename JisolGameCocos/assets/{script/battle/util/GRoleUtil.ts.meta => resources/config/ts/TableGRole.ts.meta} (70%) create mode 100644 JisolGameCocos/assets/resources/prefab/battle/mode/GLDLEMode.prefab create mode 100644 JisolGameCocos/assets/resources/prefab/battle/mode/GLDLEMode.prefab.meta create mode 100644 JisolGameCocos/assets/role.meta rename JisolGameCocos/assets/{res => role}/spine.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/guaiA1a.spine (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/guaiA1a.spine.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.atlas (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.atlas.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.png (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.png.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/beimian.png (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/beimian.png.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao1.png (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao1.png.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao2.png (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao2.png.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao3.png (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao3.png.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao4.png (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao4.png.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/shenti.png (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/shenti.png.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/yan.png (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/yan.png.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/ye.png (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/ye.png.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/spine.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.atlas (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.atlas.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.json (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.json.meta (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.png (100%) rename JisolGameCocos/assets/{res => role}/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.png.meta (100%) create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/guaiA1a.spine create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/guaiA1a.spine.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/guaiA1aTexture.atlas create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/guaiA1aTexture.atlas.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/guaiA1aTexture.png create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/guaiA1aTexture.png.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_head.png create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_head.png.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_legL.png create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_legL.png.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_legR.png create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_legR.png.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/spine.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/spine/guaiA1a.atlas create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/spine/guaiA1a.atlas.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/spine/guaiA1a.json create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/spine/guaiA1a.json.meta create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/spine/guaiA1a.png create mode 100644 JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/spine/guaiA1a.png.meta create mode 100644 JisolGameCocos/assets/script/battle/entity/GRole.ts create mode 100644 JisolGameCocos/assets/script/battle/entity/GRole.ts.meta create mode 100644 JisolGameCocos/assets/script/battle/modes.meta create mode 100644 JisolGameCocos/assets/script/battle/modes/GLDLEMode.ts create mode 100644 JisolGameCocos/assets/script/battle/modes/GLDLEMode.ts.meta rename JisolGameCocos/assets/script/battle/{PVP => modes}/GPVPMode.ts (79%) rename JisolGameCocos/assets/script/battle/{PVP => modes}/GPVPMode.ts.meta (100%) delete mode 100644 JisolGameCocos/assets/script/battle/util/GRoleUtil.ts create mode 100644 JisolGameCocos/config/GRole.xlsx create mode 100644 JisolGameCocos/config/Id Info.txt create mode 100644 JisolGameCocos/config/Table Info.txt create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/.gitignore create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/editor.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/electron.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/extension.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/message.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/alipay-mini-game/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/android/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/asset-db/@types/message.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/asset-db/@types/public.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/assets/@types/public.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/baidu-mini-game/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/build-plugin.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/build-result.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/global.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/message.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/options.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/texture-compress.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/bytedance-mini-game/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/cocos-play/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/console/@types/pritate.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/glTF.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/gltf-validator.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/i18n-well-defined.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/third-parts.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine/@types/message.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/huawei-agc/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/huawei-quick-game/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ios-app-clip/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ios/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/link-sure/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/linux/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/mac/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ohos/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/open-harmonyos/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/oppo-mini-game/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/package-asset/@types/public.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/preview/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/programming/@types/message.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/qtt/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/engine-view.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/message.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/public.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/scene-facade-interface.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/server/@types/package.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/shortcuts/@types/shortcut.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/vivo-mini-game/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/web-desktop/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/web-mobile/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/wechatgame/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/windows/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/xiaomi-quick-game/@types/index.d.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/LICENSE create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/README.md create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/ExcelToJson.js create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/JsonToTs.js create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/main.js create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/i18n/en.js create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/i18n/zh.js create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/package-lock.json create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/package.json create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/src/ExcelToJson.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/src/JsonToTs.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/src/main.ts create mode 100644 JisolGameCocos/extensions/oops-plugin-excel-to-json/tsconfig.json create mode 100644 JisolGameCocos/settings/v2/packages/oops-plugin-excel-to-json.json diff --git a/JisolGameCocos/assets/Demo.scene b/JisolGameCocos/assets/Demo.scene deleted file mode 100644 index 7b89f16f..00000000 --- a/JisolGameCocos/assets/Demo.scene +++ /dev/null @@ -1,561 +0,0 @@ -[ - { - "__type__": "cc.SceneAsset", - "_name": "Demo", - "_objFlags": 0, - "__editorExtras__": {}, - "_native": "", - "scene": { - "__id__": 1 - } - }, - { - "__type__": "cc.Scene", - "_name": "Demo", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": null, - "_children": [ - { - "__id__": 2 - } - ], - "_active": true, - "_components": [], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "autoReleaseAssets": false, - "_globals": { - "__id__": 11 - }, - "_id": "75317205-dd44-4ef6-9354-e1a01d17af01" - }, - { - "__type__": "cc.Node", - "_name": "Canvas", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 1 - }, - "_children": [ - { - "__id__": 3 - }, - { - "__id__": 5 - } - ], - "_active": true, - "_components": [ - { - "__id__": 8 - }, - { - "__id__": 9 - }, - { - "__id__": 10 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 360, - "y": 640, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "beI88Z2HpFELqR4T5EMHpg" - }, - { - "__type__": "cc.Node", - "_name": "Camera", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 2 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 4 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 1000 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "ebFwiq8gBFaYpqYbdoDODe" - }, - { - "__type__": "cc.Camera", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 3 - }, - "_enabled": true, - "__prefab": null, - "_projection": 0, - "_priority": 0, - "_fov": 45, - "_fovAxis": 0, - "_orthoHeight": 640, - "_near": 0, - "_far": 1000, - "_color": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_depth": 1, - "_stencil": 0, - "_clearFlags": 7, - "_rect": { - "__type__": "cc.Rect", - "x": 0, - "y": 0, - "width": 1, - "height": 1 - }, - "_aperture": 19, - "_shutter": 7, - "_iso": 0, - "_screenScale": 1, - "_visibility": 1108344832, - "_targetTexture": null, - "_postProcess": null, - "_usePostProcess": false, - "_cameraType": -1, - "_trackingType": 0, - "_id": "63WIch3o5BEYRlXzTT0oWc" - }, - { - "__type__": "cc.Node", - "_name": "guaiA1a", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 2 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 6 - }, - { - "__id__": 7 - } - ], - "_prefab": null, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": 99.242, - "z": 0 - }, - "_lrot": { - "__type__": "cc.Quat", - "x": 0, - "y": 0, - "z": 0, - "w": 1 - }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "z": 1 - }, - "_mobility": 0, - "_layer": 33554432, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "1agRMAoSFGlauL6HKiItxq" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 5 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 100.08000183105469, - "height": 113.76000213623047 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_id": "9b2BOkvsxGIaYgkOv9Idqz" - }, - { - "__type__": "sp.Skeleton", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 5 - }, - "_enabled": true, - "__prefab": null, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_skeletonData": { - "__uuid__": "c1cb94d4-afaf-4205-97ba-8896abcb7ec1", - "__expectedType__": "sp.SkeletonData" - }, - "defaultSkin": "default", - "defaultAnimation": "walk", - "_premultipliedAlpha": true, - "_timeScale": 1, - "_preCacheMode": 0, - "_cacheMode": 0, - "_defaultCacheMode": 0, - "_sockets": [], - "_useTint": false, - "_debugMesh": false, - "_debugBones": false, - "_debugSlots": false, - "_enableBatch": false, - "loop": true, - "_id": "c20+2LG6xBYJST8H1jqcAP" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 2 - }, - "_enabled": true, - "__prefab": null, - "_contentSize": { - "__type__": "cc.Size", - "width": 720, - "height": 1280 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "d6rUX5yfhMlKoWX2bSbawx" - }, - { - "__type__": "cc.Canvas", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 2 - }, - "_enabled": true, - "__prefab": null, - "_cameraComponent": { - "__id__": 4 - }, - "_alignCanvasWithScreen": true, - "_id": "12O/ljcVlEqLmVm3U2gEOQ" - }, - { - "__type__": "cc.Widget", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 2 - }, - "_enabled": true, - "__prefab": null, - "_alignFlags": 45, - "_target": null, - "_left": 0, - "_right": 0, - "_top": 5.684341886080802e-14, - "_bottom": 5.684341886080802e-14, - "_horizontalCenter": 0, - "_verticalCenter": 0, - "_isAbsLeft": true, - "_isAbsRight": true, - "_isAbsTop": true, - "_isAbsBottom": true, - "_isAbsHorizontalCenter": true, - "_isAbsVerticalCenter": true, - "_originalWidth": 0, - "_originalHeight": 0, - "_alignMode": 2, - "_lockFlags": 0, - "_id": "c5V1EV8IpMtrIvY1OE9t2u" - }, - { - "__type__": "cc.SceneGlobals", - "ambient": { - "__id__": 12 - }, - "shadows": { - "__id__": 13 - }, - "_skybox": { - "__id__": 14 - }, - "fog": { - "__id__": 15 - }, - "octree": { - "__id__": 16 - }, - "skin": { - "__id__": 17 - }, - "lightProbeInfo": { - "__id__": 18 - }, - "postSettings": { - "__id__": 19 - }, - "bakedWithStationaryMainLight": false, - "bakedWithHighpLightmap": false - }, - { - "__type__": "cc.AmbientInfo", - "_skyColorHDR": { - "__type__": "cc.Vec4", - "x": 0, - "y": 0, - "z": 0, - "w": 0.520833125 - }, - "_skyColor": { - "__type__": "cc.Vec4", - "x": 0, - "y": 0, - "z": 0, - "w": 0.520833125 - }, - "_skyIllumHDR": 20000, - "_skyIllum": 20000, - "_groundAlbedoHDR": { - "__type__": "cc.Vec4", - "x": 0, - "y": 0, - "z": 0, - "w": 0 - }, - "_groundAlbedo": { - "__type__": "cc.Vec4", - "x": 0, - "y": 0, - "z": 0, - "w": 0 - }, - "_skyColorLDR": { - "__type__": "cc.Vec4", - "x": 0.2, - "y": 0.5, - "z": 0.8, - "w": 1 - }, - "_skyIllumLDR": 20000, - "_groundAlbedoLDR": { - "__type__": "cc.Vec4", - "x": 0.2, - "y": 0.2, - "z": 0.2, - "w": 1 - } - }, - { - "__type__": "cc.ShadowsInfo", - "_enabled": false, - "_type": 0, - "_normal": { - "__type__": "cc.Vec3", - "x": 0, - "y": 1, - "z": 0 - }, - "_distance": 0, - "_shadowColor": { - "__type__": "cc.Color", - "r": 76, - "g": 76, - "b": 76, - "a": 255 - }, - "_maxReceived": 4, - "_size": { - "__type__": "cc.Vec2", - "x": 512, - "y": 512 - } - }, - { - "__type__": "cc.SkyboxInfo", - "_envLightingType": 0, - "_envmapHDR": null, - "_envmap": null, - "_envmapLDR": null, - "_diffuseMapHDR": null, - "_diffuseMapLDR": null, - "_enabled": false, - "_useHDR": true, - "_editableMaterial": null, - "_reflectionHDR": null, - "_reflectionLDR": null, - "_rotationAngle": 0 - }, - { - "__type__": "cc.FogInfo", - "_type": 0, - "_fogColor": { - "__type__": "cc.Color", - "r": 200, - "g": 200, - "b": 200, - "a": 255 - }, - "_enabled": false, - "_fogDensity": 0.3, - "_fogStart": 0.5, - "_fogEnd": 300, - "_fogAtten": 5, - "_fogTop": 1.5, - "_fogRange": 1.2, - "_accurate": false - }, - { - "__type__": "cc.OctreeInfo", - "_enabled": false, - "_minPos": { - "__type__": "cc.Vec3", - "x": -1024, - "y": -1024, - "z": -1024 - }, - "_maxPos": { - "__type__": "cc.Vec3", - "x": 1024, - "y": 1024, - "z": 1024 - }, - "_depth": 8 - }, - { - "__type__": "cc.SkinInfo", - "_enabled": false, - "_blurRadius": 0.01, - "_sssIntensity": 3 - }, - { - "__type__": "cc.LightProbeInfo", - "_giScale": 1, - "_giSamples": 1024, - "_bounces": 2, - "_reduceRinging": 0, - "_showProbe": true, - "_showWireframe": true, - "_showConvex": false, - "_data": null, - "_lightProbeSphereVolume": 1 - }, - { - "__type__": "cc.PostSettingsInfo", - "_toneMappingType": 0 - } -] \ No newline at end of file diff --git a/JisolGameCocos/assets/Demo.scene.meta b/JisolGameCocos/assets/Demo.scene.meta deleted file mode 100644 index 66ef9434..00000000 --- a/JisolGameCocos/assets/Demo.scene.meta +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ver": "1.1.49", - "importer": "scene", - "imported": true, - "uuid": "75317205-dd44-4ef6-9354-e1a01d17af01", - "files": [ - ".json" - ], - "subMetas": {}, - "userData": {} -} diff --git a/JisolGameCocos/assets/script/battle/PVP.meta b/JisolGameCocos/assets/resources/config.meta similarity index 70% rename from JisolGameCocos/assets/script/battle/PVP.meta rename to JisolGameCocos/assets/resources/config.meta index 67083be8..9cd9ce65 100644 --- a/JisolGameCocos/assets/script/battle/PVP.meta +++ b/JisolGameCocos/assets/resources/config.meta @@ -2,7 +2,7 @@ "ver": "1.2.0", "importer": "directory", "imported": true, - "uuid": "ca2cc88c-3cee-4223-927a-3a5ca27ffee3", + "uuid": "e982a27d-ea73-4e76-ae90-a9d1de37b056", "files": [], "subMetas": {}, "userData": {} diff --git a/JisolGameCocos/assets/resources/config/game.meta b/JisolGameCocos/assets/resources/config/game.meta new file mode 100644 index 00000000..5f01561a --- /dev/null +++ b/JisolGameCocos/assets/resources/config/game.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "372dfc13-f415-4871-98be-49856636b095", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/resources/config/game/GRole.json b/JisolGameCocos/assets/resources/config/game/GRole.json new file mode 100644 index 00000000..cbe53e7d --- /dev/null +++ b/JisolGameCocos/assets/resources/config/game/GRole.json @@ -0,0 +1 @@ +{"10001":{"id":10001,"roleName":"小石头","spine":"spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a"},"10002":{"id":10002,"roleName":"坚强小石","spine":"spine/召唤与合成819个Spine/guaiA1a_1/spine/guaiA1a"}} \ No newline at end of file diff --git a/JisolGameCocos/assets/resources/config/game/GRole.json.meta b/JisolGameCocos/assets/resources/config/game/GRole.json.meta new file mode 100644 index 00000000..f8acfa47 --- /dev/null +++ b/JisolGameCocos/assets/resources/config/game/GRole.json.meta @@ -0,0 +1,11 @@ +{ + "ver": "2.0.1", + "importer": "json", + "imported": true, + "uuid": "90a5e164-9bf8-4bcb-b155-444e7ff5e0bc", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/resources/config/ts.meta b/JisolGameCocos/assets/resources/config/ts.meta new file mode 100644 index 00000000..0510242f --- /dev/null +++ b/JisolGameCocos/assets/resources/config/ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "7dcc424e-cdd8-4b28-ae0a-1a7994590b3a", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/resources/config/ts/TableGRole.ts b/JisolGameCocos/assets/resources/config/ts/TableGRole.ts new file mode 100644 index 00000000..973e0f7d --- /dev/null +++ b/JisolGameCocos/assets/resources/config/ts/TableGRole.ts @@ -0,0 +1,35 @@ +import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil"; + +export class TableGRole { + static TableName: string = "GRole"; + + static getAllConfig(): { [id: string]: TableGRole } { + return JsonUtil.get(TableGRole.TableName); + } + + static getConfig(id: number | string) { + return TableGRole.getAllConfig()[id] as TableGRole; + } + + private data: any; + + init(id: number) { + var table = JsonUtil.get(TableGRole.TableName); + this.data = table[id]; + this._id = id; + } + /** id */ private _id: number = 0; + + /** id */ + get id(): number { + return this.data.id; + } + /** 角色名称 */ + get roleName(): string { + return this.data.roleName; + } + /** Spine地址 */ + get spine(): string { + return this.data.spine; + } +} \ No newline at end of file diff --git a/JisolGameCocos/assets/script/battle/util/GRoleUtil.ts.meta b/JisolGameCocos/assets/resources/config/ts/TableGRole.ts.meta similarity index 70% rename from JisolGameCocos/assets/script/battle/util/GRoleUtil.ts.meta rename to JisolGameCocos/assets/resources/config/ts/TableGRole.ts.meta index e42172d1..e929ac5c 100644 --- a/JisolGameCocos/assets/script/battle/util/GRoleUtil.ts.meta +++ b/JisolGameCocos/assets/resources/config/ts/TableGRole.ts.meta @@ -2,7 +2,7 @@ "ver": "4.0.23", "importer": "typescript", "imported": true, - "uuid": "9215634b-6c3f-47a2-a303-04408eb3e053", + "uuid": "9038eb60-394b-4c67-a5cc-ebd05040f85c", "files": [], "subMetas": {}, "userData": {} diff --git a/JisolGameCocos/assets/resources/prefab/battle/mode/GLDLEMode.prefab b/JisolGameCocos/assets/resources/prefab/battle/mode/GLDLEMode.prefab new file mode 100644 index 00000000..1205bf93 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/battle/mode/GLDLEMode.prefab @@ -0,0 +1,99 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "GLDLEMode", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "GLDLEMode", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 4 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "36KI0wow1LqrcICgBTdo4H" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "073cpMY+ZFPqtOHf+oOHD6", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/JisolGameCocos/assets/resources/prefab/battle/mode/GLDLEMode.prefab.meta b/JisolGameCocos/assets/resources/prefab/battle/mode/GLDLEMode.prefab.meta new file mode 100644 index 00000000..00a37653 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/battle/mode/GLDLEMode.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.49", + "importer": "prefab", + "imported": true, + "uuid": "3520eceb-6d73-4cdc-b333-c80f737fee27", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "GLDLEMode" + } +} diff --git a/JisolGameCocos/assets/resources/prefab/battle/role/RolePVPEntity.prefab b/JisolGameCocos/assets/resources/prefab/battle/role/RolePVPEntity.prefab index cf124a69..40557fcd 100644 --- a/JisolGameCocos/assets/resources/prefab/battle/role/RolePVPEntity.prefab +++ b/JisolGameCocos/assets/resources/prefab/battle/role/RolePVPEntity.prefab @@ -384,12 +384,12 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 100.08000183105469, - "height": 113.76000213623047 + "width": 100, + "height": 100 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0.5040967210222901, + "x": 0.5, "y": 0.07770745417182541 }, "_id": "" @@ -420,12 +420,9 @@ "b": 255, "a": 255 }, - "_skeletonData": { - "__uuid__": "42029fae-0ee0-48c1-b7c5-850c03664ae4", - "__expectedType__": "sp.SkeletonData" - }, - "defaultSkin": "default", - "defaultAnimation": "walk", + "_skeletonData": null, + "defaultSkin": "", + "defaultAnimation": "", "_premultipliedAlpha": true, "_timeScale": 1, "_preCacheMode": 0, diff --git a/JisolGameCocos/assets/role.meta b/JisolGameCocos/assets/role.meta new file mode 100644 index 00000000..5fffdc5e --- /dev/null +++ b/JisolGameCocos/assets/role.meta @@ -0,0 +1,11 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "9db2a905-9153-4912-9a0d-92f388b9c476", + "files": [], + "subMetas": {}, + "userData": { + "isBundle": true + } +} diff --git a/JisolGameCocos/assets/res/spine.meta b/JisolGameCocos/assets/role/spine.meta similarity index 100% rename from JisolGameCocos/assets/res/spine.meta rename to JisolGameCocos/assets/role/spine.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1a.spine b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1a.spine similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1a.spine rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1a.spine diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1a.spine.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1a.spine.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1a.spine.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1a.spine.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.atlas b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.atlas similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.atlas rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.atlas diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.atlas.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.atlas.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.atlas.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.atlas.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.png similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.png rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.png diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.png.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.png.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/guaiA1aTexture.png.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/beimian.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/beimian.png similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/beimian.png rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/beimian.png diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/beimian.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/beimian.png.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/beimian.png.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/beimian.png.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao1.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao1.png similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao1.png rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao1.png diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao1.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao1.png.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao1.png.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao1.png.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao2.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao2.png similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao2.png rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao2.png diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao2.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao2.png.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao2.png.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao2.png.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao3.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao3.png similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao3.png rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao3.png diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao3.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao3.png.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao3.png.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao3.png.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao4.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao4.png similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao4.png rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao4.png diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao4.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao4.png.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao4.png.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/jiao4.png.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/shenti.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/shenti.png similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/shenti.png rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/shenti.png diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/shenti.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/shenti.png.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/shenti.png.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/shenti.png.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/yan.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/yan.png similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/yan.png rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/yan.png diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/yan.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/yan.png.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/yan.png.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/yan.png.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/ye.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/ye.png similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/ye.png rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/ye.png diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/ye.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/ye.png.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/ye.png.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/pic/guaiA1a/ye.png.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.atlas b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.atlas similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.atlas rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.atlas diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.atlas.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.atlas.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.atlas.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.atlas.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.json b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.json similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.json rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.json diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.json.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.json.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.json.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.json.meta diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.png similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.png rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.png diff --git a/JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.png.meta similarity index 100% rename from JisolGameCocos/assets/res/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.png.meta rename to JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a/spine/guaiA1a.png.meta diff --git a/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1.meta new file mode 100644 index 00000000..85247616 --- /dev/null +++ b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "040592a8-808c-4d16-a897-5508661ec48b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/guaiA1a.spine b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/guaiA1a.spine new file mode 100644 index 0000000000000000000000000000000000000000..c235cef981d1205fac903003a35cc5220bc15f1f GIT binary patch literal 9213 zcmVC!KpooaXps^sLVu?W% zqsD^e88t?+n`q?jwFYa9(Zm>^Mq{ufu}6*3->xMuE`qx6^V+$14h?M1KDHIm5Q7ERl&Ba$-~n z6^tJJ016lt1DBc-14;~WF~b;9VoZ}Jl$cUtMu|Bsu%N`+4So3Ghc8;vTn9=VDRH92 z86g*xK05D5SH=ywTOwvMs;_hGu(aGCp;Dv2RhpHRWkiX5rBGl&Nn@3ox|sc~z7aWD znKz(53l*o_KVHobDNmN|BrP?irT;}IO<&Q+cSeuC236Xqw95U{)Vj3tK@F=M8x$l} zNlQ(2L&^vJS5^MmMW(*G^wAklpt_c-P91Zq)ugWXHQ650Qd3&`n$=~c4Wk3-tRht~ zfaK^aw1$?N($d$gE;n;{+*YxBLISPt8>mnB*EA^-&@zXz}azuaDF}lG<4RXz3g3Umx1Pb`ARXALI8Q{rexs&%hEX{gAVnH9CWE zq^30Le7~7^fYzOj8sLOe78J0fesshc)6?0hqw?|StC{TF$(Qh$g@f6T@F`qivXK3v z*LwW+i<|7jF+bxeFJ55lEyHO8aEDXR@i?n|+_iExE?QxOle)DN^Rt!fMPB&rc$^#m z6nGKtqcz8cmCtbaxNUgiZ=JEmy)VeRhn3+sfDd4ITuleQmmM*w48P0%!YV(UgL6Om zJ*tn$zSD1Zt1=ociZLKsSNT1*2P6^dsu{RS%*$b ziy8KQFKwr}48!j2z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m!^W8OCVZ8=I`0zetuO z{pV=lWozx1DuX|P`!dGw`SC^=eqekl<*mk;KLi$~Qq1n%!`SSM^GR(g^=^e)hGM9c z3MYZAcHSt75USGO^q=EGk{?EH!Kje^m#7YwYews86JU`S)pWLXE6bIOb$OPMb`y%C z7~HrlN!VIjC#^)KZdB5M5Q%`VTWkNkVr!q`yKGJUVHkef_(~lzT7L#OBBZ1_IYDz` zj3A1gM=P~6aSat(vJ$ttE|waE?miNcN})^bLXq#7MdiDOdRdm}!iiE_8yh5@9(kHo zXhmYJrpR)-t^9DZNNW%{qU*2T2`EB4vmjfz! zUe&4ZqY5#kW)=NvSGfw(58YZ@r97f~3`n#o2b+&tt8273x7=j8kkx)PO_}GUy`F3N zT`3va9_!Eox(Ja}*}t&Xp22;K@n2Vz_$sfl3HwLM@Wb5xEbuRZM-XDdRa39Cs2C`e zop{Rgy+LgD!w`#;dbsM>zS?Vafy+XOm8z~X780zzXs!J#;A@q}rC)a?m1x)S19<#R z7=HLs1Fi#Z6hce^4GT5l{yx~zA#v{}Mu>5&od@QH5RtWZWU!yYSapSQ*MRQ`Ax;i` xpwwD>9{4u!B9L977s{(R{R1)ZYZ?Ck8vt_^G7zg%1`PlJ002ovPDHLkV1hy7_bLDY literal 0 HcmV?d00001 diff --git a/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_head.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_head.png.meta new file mode 100644 index 00000000..89b78f90 --- /dev/null +++ b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_head.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "e08aaf39-bbce-4699-b45c-6f72957869ca", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "e08aaf39-bbce-4699-b45c-6f72957869ca@6c48a", + "displayName": "guaiA1a_head", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "e08aaf39-bbce-4699-b45c-6f72957869ca", + "isUuid": true, + "visible": false, + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "e08aaf39-bbce-4699-b45c-6f72957869ca@f9941", + "displayName": "guaiA1a_head", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -1, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 92, + "height": 102, + "rawWidth": 94, + "rawHeight": 102, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -46, + -51, + 0, + 46, + -51, + 0, + -46, + 51, + 0, + 46, + 51, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 102, + 92, + 102, + 0, + 0, + 92, + 0 + ], + "nuv": [ + 0, + 0, + 0.9787234042553191, + 0, + 0, + 1, + 0.9787234042553191, + 1 + ], + "minPos": [ + -46, + -51, + 0 + ], + "maxPos": [ + 46, + 51, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "e08aaf39-bbce-4699-b45c-6f72957869ca@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "hasAlpha": true, + "fixAlphaTransparencyArtifacts": false, + "redirect": "e08aaf39-bbce-4699-b45c-6f72957869ca@f9941" + } +} diff --git a/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_legL.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_legL.png new file mode 100644 index 0000000000000000000000000000000000000000..965ae9208fe46e5d8cf63a0da1227cb8e6c3f241 GIT binary patch literal 24571 zcmeHPcT`l#v%ZKCbHpq`U0nrk4hZOtf(wEuikV>;5Q!2bh>F=26^y6^U9&F6Rl$Iu zixI`uRo69VRzWeNVt6%}XZ_9a!a47s;T&N4c6W96S5;qC_2uxhN8jG{&03ow2vXn0 zS@MM6ZQ#3O?V9j2_9brvzv_fL4~|5Tx=pp;Cdjh%mIz|z7AT4y9;3pd!Xih7gta;;fXRm_E=ggclX5L)UB`1KNHFHRk*D&^Bhs*1Bj*l;U@Sx(aihafD#czt@ zPBlzy+@$loyDLW{oaZzL`wJbC-JJ`LH9?bzhVjrUXbcyu0wSj9@=C9<{uZ+>RTLIeqp zOAxG(jrEbzXD&`PkP90YTsB88tZciXHZsQqS=yy{$7;RyB0gS|JiAxRKZvZz>SbkH zJ%6)F;^19)?`ny;HIT7$y;BxsfDZQ3iM3g^$jD#r{y@C zAo+!hPNx2JhG>?v=#SPhPaa*rX?gQt@HRnZ-nEf`o!eIFscF_tor_Ifi|Qdr>sO}_ zykmQ&6yLplkaM`m%E8hh@3bS&ue0=TQzS-5PBaQl=D!VxH&Ykn7;YUoiM&|`> z7>ZmRh>W`SYB+JJ&Wa&sf5g8^ieumOYM=Rw$5DrNZO!V|ebCAGmt6E#lGA(QM%eYF z2``}c-KF?P$e3llmTt;lHRbIXRp{8wo^y)}s|#3Yd9n4oBhx0no!j;FO>*0??#*XC z_Wn7?!^-VQ+-}c#lI5{QH=Ep>h(GSI_-&m9G4+wG>F)V`ch%Zi7@R-hp-Hu*2Ht1J zBE2R&wVB*3l6BCVM8<5s>_ zy#vj%@*AWdXtyulyqc<})T>^{e1}Ft&D)7>&3>YsZ7JSLR_BM7?JYA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HpOzy)T8(3WoT}#*xRUiqfQ0W~M7>P| zX_ry=U;os5tVzCi(#(`)i3O6ESF_wE{!cWU?%a;O@GAYp&oBGi@Lb>Tua~4N%0{e8Cyz&W7<5h zMNKAbHM@XZzZcf?r_AD)-9;~FqVwI{_VSh))Z(l`kB&ZUa4Pr7nKwi7GF`4diP*Vo z+jQ)=w?EbyJa5%;*R}X;%1?8k=xTfO><)L11!UgMxb|l86!$RGH?im4-ut=iZqjjQ z^`EhoEw?+Enz}T(2uQ3Wu}`*G=3NNpse(LMd!3jsY_<} zJ-WU0-S8Jnk6K;tJ90=;mQ~ literal 0 HcmV?d00001 diff --git a/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_legL.png.meta b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_legL.png.meta new file mode 100644 index 00000000..bd448f49 --- /dev/null +++ b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_legL.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "917d53cb-10f1-4065-b7c3-57a9500b96e1", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "917d53cb-10f1-4065-b7c3-57a9500b96e1@6c48a", + "displayName": "guaiA1a_legL", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "917d53cb-10f1-4065-b7c3-57a9500b96e1", + "isUuid": true, + "visible": false, + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "917d53cb-10f1-4065-b7c3-57a9500b96e1@f9941", + "displayName": "guaiA1a_legL", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -0.5, + "offsetY": 0.5, + "trimX": 2, + "trimY": 0, + "width": 22, + "height": 35, + "rawWidth": 27, + "rawHeight": 36, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -11, + -17.5, + 0, + 11, + -17.5, + 0, + -11, + 17.5, + 0, + 11, + 17.5, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 2, + 36, + 24, + 36, + 2, + 1, + 24, + 1 + ], + "nuv": [ + 0.07407407407407407, + 0.027777777777777776, + 0.8888888888888888, + 0.027777777777777776, + 0.07407407407407407, + 1, + 0.8888888888888888, + 1 + ], + "minPos": [ + -11, + -17.5, + 0 + ], + "maxPos": [ + 11, + 17.5, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "917d53cb-10f1-4065-b7c3-57a9500b96e1@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "hasAlpha": true, + "fixAlphaTransparencyArtifacts": false, + "redirect": "917d53cb-10f1-4065-b7c3-57a9500b96e1@f9941" + } +} diff --git a/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_legR.png b/JisolGameCocos/assets/role/spine/召唤与合成819个Spine/guaiA1a_1/pic/guaiA1a/guaiA1a_legR.png new file mode 100644 index 0000000000000000000000000000000000000000..9ce4135afd2c3871ac97d8d60a80952c3ea92237 GIT binary patch literal 24670 zcmeHPcT`kKv%i9_7%(d;t01nf3As5Spf`#x2qGdFR)%3fBnm?^qOLh%UIomn;$lvS zBDi7%am|VWGpneWSrqlvV4ihn_}=%}Ug@R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QwNO^SX=62e$tG=l9qp0FOhBlndS$TOfJTMl;fTfhzrz;be`Z4K-x*XSR`=6& zRfY9e?TM$JQvJfJJkL(X|8;}0Njrmf0@c?BV*p#DhWeJ#7|hbD*C<~$=eO{CiDSO4 zMypnhJNG!v&G$(+Xf3YX4G(6n;z139!tDl|3_L5RvT?#o`-1$kv1sVOdT`>7Qa?ce zxm~?RjSs{=)Q$Jw7Z~md2%Jx0w>~yd extends JNSyncFrameProtoComponent{ } +//读写config +export class JNGConfig extends SystemBase{ + + //配置JSON加载 + jsons:JsonLoad[] = [ + {name:TableGRole.TableName}, + ].map((table) => { + return { + name:table.name, + bundle:"resources", + path:"config/game/" + } + }); + + async onInit(): Promise { + for (const key in this.jsons) { + const load = this.jsons[key]; + await JsonUtil.load(load); + } + } + +} + +//角色初始器 +export class JLoaderRole extends JLoaderSystem{ + + skData:{[id:number]:sp.SkeletonData} = {}; + async onInit(): Promise { + await super.onInit(); + //将配置表的角色都读取出来 + for (const info of Object.values(TableGRole.getAllConfig())) { + this.skData[info.id] = await (new Promise(r => { + this.bundle.load(info.spine,sp.SkeletonData,(err,data) => { + r(data); + }) + })) + } + } + +} + export const app = { layer : new JNGLayer(), //UI socket : new JNGSocket(), //Socket @@ -99,4 +148,6 @@ export const app = { baseURL: "http://localhost:8080", }), //请求 battle : GBattleModeManager.getIns(), //战斗 + config : new JNGConfig(), + role : new JLoaderRole("role"), //role包 } \ No newline at end of file diff --git a/JisolGameCocos/assets/script/Main.ts b/JisolGameCocos/assets/script/Main.ts index afac02df..882fb3c1 100644 --- a/JisolGameCocos/assets/script/Main.ts +++ b/JisolGameCocos/assets/script/Main.ts @@ -2,6 +2,7 @@ import { _decorator, Component, director, instantiate, Node, Prefab } from 'cc'; import { app } from './App'; import { JNGame } from '../../extensions/ngame/assets/ngame/JNGame'; import { JNSyncAction } from '../../extensions/ngame/assets/ngame/sync/JNSyncAction'; +import { TableGRole } from '../resources/config/ts/TableGRole'; const { ccclass, property } = _decorator; @ccclass('Main') @@ -20,6 +21,8 @@ export class Main extends Component { {path:"proto/GDemo"} ]); + console.log("TableGRole",TableGRole.getAllConfig()) + //发生帧同步开始 app.socket.Send(JNSyncAction.NSyncFrameStart); diff --git a/JisolGameCocos/assets/script/battle/GBaseMode.ts b/JisolGameCocos/assets/script/battle/GBaseMode.ts index b5a7e764..118bf802 100644 --- a/JisolGameCocos/assets/script/battle/GBaseMode.ts +++ b/JisolGameCocos/assets/script/battle/GBaseMode.ts @@ -1,9 +1,10 @@ import { Vec2 } from "cc"; import GObject from "./base/GObject"; import { v3 } from "cc"; +import { JNFrameInfo } from "../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame"; -export default class GBaseMode extends GObject<{}> { +export default class GBaseMode extends GObject { //添加对象到场景中 addGObject(obj: GObject<{}>,pos?:Vec2){ @@ -14,5 +15,14 @@ export default class GBaseMode extends GObject<{}> { } } + onSyncUpdate(dt: number,frame:JNFrameInfo, input?: T) { + + //重置 场景中的层级 + [...this.node.children].sort((node1,node2) => node2.worldPosition.y - node1.worldPosition.y).forEach((node,index) => { + node.setSiblingIndex(index); + }) + + } + } diff --git a/JisolGameCocos/assets/script/battle/base/GObject.ts b/JisolGameCocos/assets/script/battle/base/GObject.ts index 44da0c15..73eedc91 100644 --- a/JisolGameCocos/assets/script/battle/base/GObject.ts +++ b/JisolGameCocos/assets/script/battle/base/GObject.ts @@ -3,11 +3,14 @@ import { JNGSyncProtoBase } from "../../App"; import GBaseMode from "../GBaseMode"; import { v2 } from "cc"; +export enum GTowards{ + RIGHT,LEFT +} export default class GObject extends JNGSyncProtoBase{ //当前模式 - _mode:GBaseMode; + _mode:GBaseMode<{}>; //是否镜像 _isMirror:boolean = false; @@ -23,10 +26,10 @@ export default class GObject extends JNGSyncProtoBase{ this._isMirror = value; } - get mode():GBaseMode{ + get mode():GBaseMode<{}>{ return this._mode; } - set mode(value:GBaseMode){ + set mode(value:GBaseMode<{}>){ this._mode = value; } @@ -52,5 +55,14 @@ export default class GObject extends JNGSyncProtoBase{ } } + //设置朝向 + setTowards(towards:GTowards){ + if(towards == GTowards.LEFT){ + this.isMirror = true; + }else{ + this.isMirror = false; + } + } + } diff --git a/JisolGameCocos/assets/script/battle/base/fsm/PVP/GFSMPVP.ts b/JisolGameCocos/assets/script/battle/base/fsm/PVP/GFSMPVP.ts index 49dfd7e1..9de9ae76 100644 --- a/JisolGameCocos/assets/script/battle/base/fsm/PVP/GFSMPVP.ts +++ b/JisolGameCocos/assets/script/battle/base/fsm/PVP/GFSMPVP.ts @@ -1,4 +1,4 @@ -import GRoleUtil from "../../../util/GRoleUtil"; +import { GRoleUtil } from "../../../entity/GRole"; import GRoleBase from "../../role/GRoleBase"; import GRolePVPEntity from "../../role/PVP/GRolePVPEntity"; import GFSMBattle from "../base/GFSMBattle/GFSMBattle"; diff --git a/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattle.ts b/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattle.ts index ecc15297..cce95254 100644 --- a/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattle.ts +++ b/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattle.ts @@ -1,7 +1,7 @@ import { Vec2 } from "cc"; import GRoleBase from "../../../role/GRoleBase"; import GFSMBase, { GFSMProcessEnum, GFSMProcessInfo, GFSMProcessMode } from "../../GFSMBase"; -import GRoleUtil from "../../../../util/GRoleUtil"; +import { GRoleUtil } from "../../../../entity/GRole"; //流程枚举 @@ -39,7 +39,7 @@ export default abstract class GFSMBattle extends GFSMBase{ title:"寻找敌人", execute: this.onSeekEnemyProcess.bind(this), // to:[ProcessEnum.MoveToAttackRange], //移动到可攻击范围 - to:[ProcessEnum.MoveToAttackRange], //移动到可攻击范围 + to:[ProcessEnum.MoveToAttackRange,ProcessEnum.MoveToTactical], //移动到可攻击范围 }, [ProcessEnum.MoveToAttackRange]:{ title:"移动到可攻击范围", @@ -51,12 +51,13 @@ export default abstract class GFSMBattle extends GFSMBase{ title:"攻击敌人", mode:GFSMProcessMode.WaitExecute, execute: this.onAttackProcess.bind(this), - to:[ProcessEnum.MoveToTactical],//移动回阵型 + to:[ProcessEnum.SeekEnemy],//移动回阵型 }, [ProcessEnum.MoveToTactical]:{ title:"移动回阵型", mode:GFSMProcessMode.WaitExecute, execute: this.onMoveToTacticalProcess.bind(this), + to:[ProcessEnum.SeekEnemy],//移动回阵型 } } @@ -82,10 +83,14 @@ export default abstract class GFSMBattle extends GFSMBase{ if((this._enemy = GRoleUtil.get(this.onSeekEnemy())) && this.enemy){ //如果有敌人 直接 攻击 return ProcessEnum.MoveToAttackRange; + }else{ + //如果没有敌人则回去 + if(!(this.player.tacticalPos.equals(this.player.v2World))){ + return ProcessEnum.MoveToTactical + }else{ + return GFSMProcessEnum.Reset; + } } - - //负责继续寻敌 - return GFSMProcessEnum.Reset; } @@ -120,8 +125,9 @@ export default abstract class GFSMBattle extends GFSMBase{ this.player.fsmAnim.isAttack = false; if(this.player.onMoveTarget(this.player.tacticalPos,dt)){ - //回到阵容 重置 - return GFSMProcessEnum.Reset; + this.player.onRecoverTacticalTowards(); + //回到阵容 搜索敌人 + return ProcessEnum.SeekEnemy; } return GFSMProcessEnum.Wait; @@ -137,7 +143,7 @@ export default abstract class GFSMBattle extends GFSMBase{ if(this.enemy){ return GFSMProcessEnum.Wait; }else{ - return ProcessEnum.MoveToTactical; + return ProcessEnum.SeekEnemy; } } diff --git a/JisolGameCocos/assets/script/battle/base/role/GRoleBase.ts b/JisolGameCocos/assets/script/battle/base/role/GRoleBase.ts index 7b6fec49..6b8f2614 100644 --- a/JisolGameCocos/assets/script/battle/base/role/GRoleBase.ts +++ b/JisolGameCocos/assets/script/battle/base/role/GRoleBase.ts @@ -1,5 +1,5 @@ import { _decorator, sp } from "cc"; -import GObject from "../GObject"; +import GObject, { GTowards } from "../GObject"; import { JNFrameInfo } from "../../../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame"; import GFSMBattle from "../fsm/base/GFSMBattle/GFSMBattle"; import { GFSMBattleAmin, GFSMBattleAminEnum } from "../fsm/base/GFSMBattle/GFSMBattleAmin"; @@ -8,6 +8,8 @@ import { v3 } from "cc"; import { GTactical } from "../../entity/GTactical"; import { JEasing, JTween } from "../../../../../extensions/ngame/assets/ngame/sync/frame/game/tween/JNFrameTween"; import { v2 } from "cc"; +import GRole from "../../entity/GRole"; +import { app } from "../../../App"; const { ccclass, property } = _decorator; export enum GRoleAnimEvent{ @@ -20,6 +22,9 @@ export default abstract class GRoleBase extends GObject{ @property(sp.Skeleton) spine:sp.Skeleton; + //角色 + role:GRole + //状态机 fsm:GFSMBattle; @@ -35,7 +40,12 @@ export default abstract class GRoleBase extends GObject{ //在阵容中的下标 tacticalIndex:number; //阵容 - tactical:GTactical; + _tactical:GTactical; + get tactical(){return this._tactical}; + set tactical(value:GTactical){ + this.setTowards(value.towards); + this._tactical = value; + } //阵容位置 _tacticalPos:Vec2; get tacticalPos(){ return this._tacticalPos} @@ -67,6 +77,8 @@ export default abstract class GRoleBase extends GObject{ this.node.removeFromParent(); return; } + + this.bind(this.role); //创建角色状态机 this.fsm = this.fsmCreate(); @@ -80,15 +92,24 @@ export default abstract class GRoleBase extends GObject{ } + //设置角色 + bind(role:GRole){ + if(this.spine) + this.spine.skeletonData = app.role.skData[role.id]; + this.role = role; + } + //创建一个状态机 protected abstract fsmCreate():GFSMBattle; //创建一个动画状态机 protected abstract fsmAnimCreate():GFSMBattleAmin; onSyncUpdate(dt: number,frame:JNFrameInfo, input?: T){ + //更新状态机 this.fsm && this.fsm.onUpdate(dt / 1000); this.fsmAnim && this.fsmAnim.onUpdate(dt / 1000); + } //向目标点移动 @@ -98,6 +119,16 @@ export default abstract class GRoleBase extends GObject{ let mins = this.v2World.subtract(target); let normal = this.v2World.subtract(target).normalize(); + //设置朝向 + if(normal.x != 0){ + if(normal.x < 0){ + this.setTowards(GTowards.RIGHT) + }else{ + this.setTowards(GTowards.LEFT) + } + } + + if(Vec2.len(normal) >= Vec2.len(mins)){ this.node.setWorldPosition(Object.assign(v3(),target.clone())); return true; @@ -112,7 +143,7 @@ export default abstract class GRoleBase extends GObject{ //攻击 onAttack(){ //敌人扣血 - this.fsm.enemy.onHit(); + this.fsm.enemy?.onHit(); } //受击 @@ -145,6 +176,11 @@ export default abstract class GRoleBase extends GObject{ } + //恢复阵容朝向 + onRecoverTacticalTowards(){ + this.setTowards(this.tactical.towards); + } + } diff --git a/JisolGameCocos/assets/script/battle/base/role/PVP/GRolePVPEntity.ts b/JisolGameCocos/assets/script/battle/base/role/PVP/GRolePVPEntity.ts index d2813eb2..c8c9d29a 100644 --- a/JisolGameCocos/assets/script/battle/base/role/PVP/GRolePVPEntity.ts +++ b/JisolGameCocos/assets/script/battle/base/role/PVP/GRolePVPEntity.ts @@ -2,13 +2,14 @@ import { _decorator } from "cc"; import GRoleBase from "../GRoleBase"; import GFSMBase from "../../fsm/GFSMBase"; import GFSMPVP from "../../fsm/PVP/GFSMPVP"; -import GPVPMode, { GPVPModePlayerEnum } from "../../../PVP/GPVPMode"; +import GPVPMode, { GPVPModePlayerEnum } from "../../../modes/GPVPMode"; import { GTactical } from "../../../entity/GTactical"; import { GFSMBattleAmin } from "../../fsm/base/GFSMBattle/GFSMBattleAmin"; import { JNFrameInfo } from "../../../../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame"; import { Vec2 } from "cc"; import { v2 } from "cc"; import { ProgressBar } from "cc"; +import { GTowards } from "../../GObject"; const { ccclass, property } = _decorator; export interface GDemoMessage{ @@ -26,12 +27,6 @@ export default class GRolePVPEntity extends GRoleBase{ return this._ones; } set ones(value:GPVPModePlayerEnum){ - //如果是敌方则设置镜像 - if(value == GPVPModePlayerEnum.ENEMY){ - this.isMirror = true; - }else{ - this.isMirror = false; - } this._ones = value; } @@ -66,6 +61,7 @@ export default class GRolePVPEntity extends GRoleBase{ this._mode = value; } + protected fsmCreate(): GFSMPVP { return new GFSMPVP(this); } diff --git a/JisolGameCocos/assets/script/battle/entity/GRole.ts b/JisolGameCocos/assets/script/battle/entity/GRole.ts new file mode 100644 index 00000000..112cf1c9 --- /dev/null +++ b/JisolGameCocos/assets/script/battle/entity/GRole.ts @@ -0,0 +1,37 @@ +import { TableGRole } from "../../../resources/config/ts/TableGRole"; +import GRoleBase from "../base/role/GRoleBase"; + +//角色实体类 +export default interface GRole { + id:number; //宠物Id +} + +//角色工具类 +export class GRoleUtil{ + + //获取存活的玩家 如果不存活则返回 null + static get(player:GRoleBase):() => GRoleBase{ + if(!player) return null; + return ():GRoleBase => { + if(player) + return player.get(); + return null; + } + } + + //通过Id 获取 GRole + static getGRole(id:number):GRole{ + let info:TableGRole; + if(!(info = TableGRole.getConfig(id))) return null; + return { + id:info.id + } + } + + static getGRoles(ids:number[]):GRole[]{ + return ids.map(id => GRoleUtil.getGRole(id)); + } + +} + + diff --git a/JisolGameCocos/assets/script/battle/entity/GRole.ts.meta b/JisolGameCocos/assets/script/battle/entity/GRole.ts.meta new file mode 100644 index 00000000..6980ecc8 --- /dev/null +++ b/JisolGameCocos/assets/script/battle/entity/GRole.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "ff6b5bb7-5bda-42bb-bf4c-0d91a7627524", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/battle/entity/GTactical.ts b/JisolGameCocos/assets/script/battle/entity/GTactical.ts index 0d0c5fa2..00e2d4d9 100644 --- a/JisolGameCocos/assets/script/battle/entity/GTactical.ts +++ b/JisolGameCocos/assets/script/battle/entity/GTactical.ts @@ -1,11 +1,15 @@ import { v2 } from "cc"; import { Vec2 } from "cc"; +import { GTowards } from "../base/GObject"; //阵法类 export class GTactical{ tactical:number[][]; + //阵容朝向 + towards:GTowards; + //阵法位置 static pos:Vec2[][] = [ [v2(-100,150),v2(0,150),v2(100,150)], @@ -13,19 +17,21 @@ export class GTactical{ [v2(-100,-150),v2(0,-150),v2(100,-150)], ]; - constructor(tactical:number[][]){ + constructor(tactical:number[][],towards:GTowards = GTowards.RIGHT){ this.tactical = tactical; + this.towards = towards; } //获取阵法 static getTactical(isReversed:boolean = false): GTactical{ let tactical = [ - [0,0,3], + [0,4,3], [0,0,1], - [0,0,2], + [0,5,2], ]; if(isReversed){ tactical = this.getTacticalFlipX(tactical); + return new GTactical(tactical,GTowards.LEFT); } return new GTactical(tactical); } @@ -38,6 +44,7 @@ export class GTactical{ ]; if(isReversed){ tactical = this.getTacticalFlipX(tactical); + return new GTactical(tactical,GTowards.LEFT); } return new GTactical(tactical); } @@ -51,6 +58,7 @@ export class GTactical{ ]; if(isReversed){ tactical = this.getTacticalFlipX(tactical); + return new GTactical(tactical,GTowards.LEFT); } return new GTactical(tactical); } diff --git a/JisolGameCocos/assets/script/battle/modes.meta b/JisolGameCocos/assets/script/battle/modes.meta new file mode 100644 index 00000000..02ae572e --- /dev/null +++ b/JisolGameCocos/assets/script/battle/modes.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "e8874608-a5f4-47c8-8b57-6ff186b7ec2b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/battle/modes/GLDLEMode.ts b/JisolGameCocos/assets/script/battle/modes/GLDLEMode.ts new file mode 100644 index 00000000..120622dd --- /dev/null +++ b/JisolGameCocos/assets/script/battle/modes/GLDLEMode.ts @@ -0,0 +1,10 @@ +import GBaseMode from "../GBaseMode"; + + +/** + * 挂机模式 + */ +export default class GLDLEMode extends GBaseMode<{}>{ + +} + diff --git a/JisolGameCocos/assets/script/battle/modes/GLDLEMode.ts.meta b/JisolGameCocos/assets/script/battle/modes/GLDLEMode.ts.meta new file mode 100644 index 00000000..8f9591f2 --- /dev/null +++ b/JisolGameCocos/assets/script/battle/modes/GLDLEMode.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "c579d727-c0c2-422f-8571-3375047fd1b8", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/battle/PVP/GPVPMode.ts b/JisolGameCocos/assets/script/battle/modes/GPVPMode.ts similarity index 79% rename from JisolGameCocos/assets/script/battle/PVP/GPVPMode.ts rename to JisolGameCocos/assets/script/battle/modes/GPVPMode.ts index 704638a8..4a580e78 100644 --- a/JisolGameCocos/assets/script/battle/PVP/GPVPMode.ts +++ b/JisolGameCocos/assets/script/battle/modes/GPVPMode.ts @@ -5,6 +5,7 @@ import { Prefab } from "cc"; import { instantiate } from "cc"; import { Vec2 } from "cc"; import GRolePVPEntity from "../base/role/PVP/GRolePVPEntity"; +import GRole, { GRoleUtil } from "../entity/GRole"; const { ccclass, property } = _decorator; @@ -20,22 +21,22 @@ export interface GPVPModePlayerInfo{ //阵法 tactical: GTactical; //宠物列表 - roles: any[]; + roles: GRole[]; } /** * PVP 模式 */ @ccclass('GPVPMode') -export default class GPVPMode extends GBaseMode{ +export default class GPVPMode extends GBaseMode<{}>{ @property(Prefab) rolePrefab: Prefab = null; //玩家信息 - playerInfo: GPVPModePlayerInfo = { tactical: GTactical.getTactical1(),roles: [{},{},{}] }; + playerInfo: GPVPModePlayerInfo; //敌方信息 - enemyInfo: GPVPModePlayerInfo = { tactical: GTactical.getTactical2(true),roles: [{},{},{}] }; + enemyInfo: GPVPModePlayerInfo; //玩家宠物 playerRoles: GRolePVPEntity[] = []; @@ -47,25 +48,33 @@ export default class GPVPMode extends GBaseMode{ //敌方位置 enemyPos: Vec2 = new Vec2(400,0); + onLoad(){ + super.onLoad(); + } + onSyncInitSuccess(): void { //初始化战斗 console.log("GPVPMode 模式初始化"); + + this.playerInfo = { tactical: GTactical.getTactical(),roles: GRoleUtil.getGRoles([10001,10001,10001,10001,10001]) }; + this.enemyInfo = { tactical: GTactical.getTactical(true),roles: GRoleUtil.getGRoles([10002,10002,10002,10001,10001]) }; //生成玩家 - this.playerInfo.roles.forEach((info,index) => this.onGenRole(GPVPModePlayerEnum.PLAYER,index+1)) - this.enemyInfo.roles.forEach((info,index) => this.onGenRole(GPVPModePlayerEnum.ENEMY,index+1)) + this.playerInfo.roles.forEach((info,index) => this.onGenRole(GPVPModePlayerEnum.PLAYER,index+1,info)) + this.enemyInfo.roles.forEach((info,index) => this.onGenRole(GPVPModePlayerEnum.ENEMY,index+1,info)) } //生成角色 - onGenRole(type: GPVPModePlayerEnum,index:number) { + onGenRole(type: GPVPModePlayerEnum,index:number,info:GRole) { let pos:Vec2 = this.getInfo(type).tactical.getPosition(index); if(!pos) return; let role = instantiate(this.rolePrefab); let entity = role.getComponent(GRolePVPEntity) + entity.bind(info); //赋值阵容 entity.ones = type; entity.tactical = this.getInfo(type).tactical; @@ -120,8 +129,12 @@ export default class GPVPMode extends GBaseMode{ //销毁角色数据 killRole(role:GRolePVPEntity){ - this.playerRoles.splice(this.playerRoles.indexOf(role),1); - this.enemyRoles.splice(this.enemyRoles.indexOf(role),1); + let index = this.playerRoles.indexOf(role); + if(index >= 0) + this.playerRoles.splice(index,1); + index = this.enemyRoles.indexOf(role); + if(index >= 0) + this.enemyRoles.splice(index,1); } } diff --git a/JisolGameCocos/assets/script/battle/PVP/GPVPMode.ts.meta b/JisolGameCocos/assets/script/battle/modes/GPVPMode.ts.meta similarity index 100% rename from JisolGameCocos/assets/script/battle/PVP/GPVPMode.ts.meta rename to JisolGameCocos/assets/script/battle/modes/GPVPMode.ts.meta diff --git a/JisolGameCocos/assets/script/battle/util/GRoleUtil.ts b/JisolGameCocos/assets/script/battle/util/GRoleUtil.ts deleted file mode 100644 index 86fbc932..00000000 --- a/JisolGameCocos/assets/script/battle/util/GRoleUtil.ts +++ /dev/null @@ -1,19 +0,0 @@ -import GRoleBase from "../base/role/GRoleBase"; - - -//角色工具类 -export default class GRoleUtil{ - - //获取存活的玩家 如果不存活则返回 null - static get(player:GRoleBase):() => GRoleBase{ - if(!player) return null; - return ():GRoleBase => { - if(player) - return player.get(); - return null; - } - } - -} - - diff --git a/JisolGameCocos/config/GRole.xlsx b/JisolGameCocos/config/GRole.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..2a6440029d43407772568e86d0038b605864f362 GIT binary patch literal 11164 zcmeHtWmp}{vNkRYw_w5DS-86fcXxMpcM0wUcY+2865K67AXtKHaCZq@NY2^W$=UZj z_y70xk6yiIN_yVvsjlfNc`0xR0LXI-lU);d{{44@eHs|s8Ob}^**h`FKart7U4Z#P zcJy^NkOve5#10Gu1o`h|2KM&!?l#t034*V{fmk6|fo?Eg8{bxjC#9nc_C>3|YmQC# zo9mQDJ$*#1G;>%NI)BE6B&m6t!vhT%KKL8k| za&~BBBE@hDD>ld{*TtP75atYhZ?neF3=@Eg>jS*z)I+&>i(INEPxDf2UaZ79PZd4Z zfJ$2f2cblEc~)OCO1yvs)Cx>X0C+qvl#Nq@@V)W9ee-6|d|$t~etMR>9(E;VRZ^-L zbXXOsYr~AZNxq#aX71dHlL^>xMV2zsBW?o#x~}PBtesrL=&vI z1wyz_JKfF&z`x&5E8=}enODi+Rgi@DBl->G???*=2#Lu)A+7m@G|JzRHnMXxd4}32 zK~T1b5n1#~Vu9$CuO{m=pn^0R#6^^hG?H?k)@x3TG{yw?v#vk4J#^CxZEy+;VdU^4 zv-X_js7&cb6BM4H8jm7H5t2YK`TT?rnkCz=KsY%CeLS@U%;Z4ygU);lSMMa4Q4y1s zIc1!vk6lpNg|ui~qPSZuJzpXbk`~1H^1Pi?(i6D-Sga~OxNlf>0*TPH1J@I{V{r9L zy@=;Xinil#htTN+0Pv7WxtV<|`PbZgok^FU;B3s|Xq_4-eT&-;w1-ow$P0#sTk8tUK@VnD9 z1CYqueIKxI`(;u2_4V?ie7XB^eu+U^YM7a6!bLe& zXS~%UO}fyU5loYD*}*1Xh+NC?YeL3`cpGNQAtm=UsH(cX@(scAc&m9Q@Rvew(D5tq z)L^h(SMq`FxKivpNiU*ZDwjy6U3k}v3=>yA6Gxta)eNbVwVuF1e`=kcc)<8d%{HI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kfy_OeTaSc z1mo0Gq6O#a_sR48BzsQG|NC9}fo@ykN6Q~IDIpI*X+CuG7Q(RcbyOkN^XK5fyuQd< zOmB92{Fb|3H-)a)O0xx~3tnYUh~D+c&6Y91Pq~{BMi|O(JL<7iF&#U2`nW@hTI(2S z9gTPTLxk-=*gl31y@`PzL)1H(u10n8jf*X`@bkm5Ng+9l3GPttBS`k0>o}Ej5(ns6w z=lY%GTcr3#450kmGHS5bd?|E_JJ3y+!6Lm#9`GR@N4)}M$dI4MWk?6Iy$-ecp$dws z5+L1aD~Hq>4r(Ey-j}gVM)^qVa$V7O5k{dVv&Pk65aJ?KS3@NxgG-mr>Gww>FMw}R z!i|F|?RAbz+qS(32=yJ#iem;sE*-fZHN7YIhs~0=dbhd)>j-VQ7qL`&E<+A?FvKn0~rA4pIh!M?&YP7*r$63Qx2fFC5+4_gl<;uTyLD^ z@~3nHyEgg0KRKsi^~HBC$+Jw?df>qCZso** z!1u}dgMy*|*gSt$v;AqMCqsdNf)GCSa%BH#v!4R~cW3l0;AdgnTjF1?>35}nI;Urj zpGrsn;`#A1{WoRLZ|l$YT!r`C{#LN}yS_h5_MVA<>ZABO+rJ9<{)FhyGPGaZ@lVV9 zFQxx3O8b-j&qAtS?1)d!&1p7s1h=_Tpk*#5)g{VC_qDD9V=e1acx{v&4lQ^KDIioYaqV*Hfw*YVT|2FC8g0G+L*}@S&E&N;g z*Y9il&jPS#-k(;h{}0|@*@)%zs=x>lpkdU|92_N@c$^~N5WZN W3i3IMdD + +/// +/// + +import * as NodeJSPath from 'path'; +import { EventEmitter } from 'events'; +import { FileFilter, BrowserWindow, OpenDialogReturnValue, SaveDialogReturnValue, MessageBoxReturnValue } from 'electron'; + +declare global { + export module Editor { + export module App { + export const userAgent: string; + /** + * 是否是开发模式 + * Development mode + */ + export const dev: boolean; + /** + * 编辑器版本号 + * Editor version + */ + export const version: string; + /** + * 主目录 + * Home directory + */ + export const home: string; + /** + * 编辑器程序文件夹 + * Program folder + */ + export const path: string; + /** + * 获取当前编辑器的临时缓存目录 + * Temporary cache directory + */ + export const temp: string; + /** + * 获取当前编辑器 icon 地址 + * Gets the icon address of the current editor + */ + export const icon: string; + /** + * 获取当前编辑器使用的 url 地址 + * Gets the URL used by the current editor + */ + export const urls: { + manual: string; + api: string; + forum: string; + }; + /** + * 退出程序 + * Exit the program + */ + export function quit(): void; + } + export module Clipboard { + export type ICopyType = 'image' | 'text' | 'files' | string; + /** + * 获取剪贴板内容 + * @param type + */ + export function read(type: ICopyType): any; + /** + * 写入剪贴板内容 + * @param type + * @param value + */ + export function write(type: 'image', value: string): boolean; + export function write(type: 'text', value: string): boolean; + export function write(type: 'files', value: FileList): boolean; + export function write(type: string, value: any): boolean; + + /** + * 判断当前剪贴板内是否是指定类型 + * @param type + */ + export function has(type: ICopyType): boolean; + /** + * 清空剪贴板 + */ + export function clear(): void; + } + export module Dialog { + export interface SelectDialogOptions { + title?: string; + path?: string; + type?: 'directory' | 'file'; + button?: string; + multi?: boolean; + filters?: FileFilter[]; + extensions?: string; + } + export interface MessageDialogOptions { + title?: string; + detail?: string; + default?: number; + cancel?: number; + checkboxLabel?: string; + checkboxChecked?: boolean; + buttons?: string[]; + } + + /** + * 选择文件弹窗 + * Select the file popover + * + * @param options 选择弹窗参数 Select popover parameters + * @param window 依附于哪个窗口(插件主进程才可使用) Which window it is attached to (only available to the plugin's main process) + */ + export function select(options?: SelectDialogOptions, window?: BrowserWindow): Promise; + /** + * 保存文件弹窗 + * Save the file popup + * + * @param options 保存文件窗口参数 Save the file window parameters + * @param window 依附于哪个窗口(插件主进程才可使用) Which window it is attached to (only available to the plugin's main process) + */ + export function save(options?: SelectDialogOptions, window?: BrowserWindow): Promise; + /** + * 信息弹窗 + * Information popup window + * + * @param message 显示的消息 Displayed message + * @param options 信息弹窗可选参数 Information popup optional parameter + * @param window 依附于哪个窗口(插件主进程才可使用) Which window it is attached to (only available to the plugin's main process) + */ + export function info(message: string, options?: MessageDialogOptions, window?: BrowserWindow): Promise; + /** + * 警告弹窗 + * Warning popup + * + * @param message 警告信息 Warning message + * @param options 警告弹窗可选参数 Warning popover optional parameter + * @param window 依附于哪个窗口(插件主进程才可使用) Which window it is attached to (only available to the plugin's main process) + */ + export function warn(message: string, options?: MessageDialogOptions, window?: BrowserWindow): Promise; + /** + * 错误弹窗 + * Error popup window + * + * @param message 错误信息 The error message + * @param options 错误弹窗可选参数 Error popover optional parameter + * @param window 依附于哪个窗口(插件主进程才可使用) Which window it is attached to (only available to the plugin's main process) + */ + export function error(message: string, options?: MessageDialogOptions, window?: BrowserWindow): Promise; + } + export module EditMode { + /** + * 标记编辑器进入了一种编辑模式 + * The tag editor goes into an edit mode + * + * @param mode 编辑模式的名字 The name of the edit mode + */ + export function enter(mode: string); + /** + * 当前所处的编辑模式 + * The current editing mode + * + */ + export function getMode(): string; + } + export module I18n { + export type I18nMap = { + [key: string]: I18nMap | string; + }; + /** + * 获取当前的语言 zh | en + * Get the current language + */ + export function getLanguage(): string; + /** + * 传入 key,翻译成当前语言 + * Passing in the key translates into the current language + * 允许翻译变量 {a},传入的第二个参数 obj 内定义 a + * The translation variable {a} is allowed, and a is defined in the second argument passed in obj + * + * @param key 用于翻译的 key 值 The key value for translation + * @param obj 翻译字段内如果有 {key} 等可以在这里传入替换字段 If you have {key} in the translation field, you can pass in the replacement field here + */ + export function t(key: string, obj?: { + [key: string]: string; + }): any; + + /** + * 选择一种翻译语言 + * Choose a translation language + * + * @param language 选择当前使用的语言 Select the language currently in use + */ + export function select(language: string): any; + } + export module Layout { + /** + * 应用布局信息 + * Application layout information + * + * @param json 布局文件内容 Layout file content + */ + export function apply(json: any) + /** + * 初始化布局系统 + * Initialize the layout system + */ + export function init() + } + export module Logger { + /** + * 清空所有的日志 + * Clear all logs + */ + export function clear(regexp?: string | RegExp): any; + /** + * 查询所有日志 + * Query all logs + */ + export function query(): any; + } + export module Menu { + export interface BaseMenuItem { + template?: string; + type?: string; + label?: string; + subLabel?: string; + checked?: boolean; + enabled?: boolean; + icon?: string; + accelerator?: string; + order?: number; + group?: string; + message?: string; + target?: string; + params?: any[]; + click?: Function | null; + role?: string; + submenu?: MenuTemplateItem[]; + } + export interface MainMenuItem extends BaseMenuItem { + path: string; + } + export interface ContextMenuItem extends BaseMenuItem { + accelerator?: string; + } + export interface MenuTemplateItem extends BaseMenuItem { + } + export interface PopupOptions { + x?: number; + y?: number; + menu: ContextMenuItem[]; + } + /** + * 右键弹窗 + * Right-click pop-up + * 只有面板进程可以使用 + * Only panel processes can be used + * + * @param json + */ + export function popup(json: PopupOptions): any; + } + export module Message { + export interface MessageInfo { + methods: string[]; + public?: boolean; + description?: string; + doc?: string; + sync?: boolean; + } + + export interface TableBase { + [x: string]: any; + params: any[]; + } + /** + * 发送一个消息,并等待返回 + * Send a message and wait for it to return + * + * @param name 目标插件的名字 The name of the target plug-in + * @param message 触发消息的名字 The name of the trigger message + * @param args 消息需要的参数 The parameters required for the message + */ + export function request(name: J, message: K, ...args: EditorMessageMaps[J][K]['params']): Promise; + /** + * 发送一个消息,没有返回 + * Send a message, no return + * + * @param name 目标插件的名字 The name of the target plug-in + * @param message 触发消息的名字 The name of the trigger message + * @param args 消息需要的参数 The parameters required for the message + */ + export function send(name: M, message: N, ...args: EditorMessageMaps[M][N]['params']): void; + /** + * 广播一个消息 + * Broadcast a message + * + * @param message 消息的名字 Name of message + * @param args 消息附加的参数 Parameter attached to the message + */ + export function broadcast(message: string, ...args: any[]): void; + /** + * 新增一个广播消息监听器 + * Add a new broadcast message listener + * 不监听的时候,需要主动取消监听 + * When not listening, you need to take the initiative to cancel listening + * + * @param message 消息名 Message name + * @param func 处理函数 The processing function + */ + export function addBroadcastListener(message: string, func: Function): any; + /** + * 新增一个广播消息监听器 + * Removes a broadcast message listener + * + * @param message 消息名 Message name + * @param func 处理函数 The processing function + */ + export function removeBroadcastListener(message: string, func: Function): any; + } + export module Network { + /** + * 查询当前电脑的 ip 列表 + * Query the IP list of the current computer + */ + export function queryIPList(): string[]; + /** + * 测试是否可以联通 passport.cocos.com 服务器 + * Test whether you can connect to the passport.cocos.com server + */ + export function testConnectServer(): Promise; + /** + * 检查一个端口是否被占用 + * Checks if a port is used + * + * @param port + */ + export function portIsOccupied(port: number): Promise; + /** + * 测试是否可以联通某一台主机 + * Test whether a host can be connected + * + * @param ip + */ + export function testHost(ip: string): Promise; + /** + * Get 方式请求某个服务器数据 + * GET requests data from a server + * + * @param url + * @param data + */ + export function get(url: string, data?: { + [index: string]: string | string[]; + }): Promise; + /** + * Post 方式请求某个服务器数据 + * POST requests data from a server + * + * @param url + * @param data + */ + export function post(url: string, data?: { + [index: string]: string | number | string[]; + }): Promise; + } + export module Package { + // export module VERSION: string; + export interface GetPackageOptions { + name?: string; + debug?: boolean; + path?: string; + enable?: boolean; + invalid?: boolean; + } + export interface PackageJson { + author?: string; + debug?: boolean; + description?: string; + main?: string; + menu?: any; + name: string; + version: string; + windows: string; + editor?: string; + panel?: any; + } + export type PathType = 'home' | 'data' | 'temp'; + /** + * 查询插件列表 + * Query Plug-in List + * + * @param options + */ + export function getPackages(options?: GetPackageOptions): Editor.Interface.PackageInfo[]; + /** + * 注册一个插件 + * Register a plug-in + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + * + * @param path + */ + export function register(path: string): any; + /** + * 反注册一个插件 + * Unregister a plug-in + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + * + * @param path + */ + export function unregister(path: string): any; + /** + * 启动一个插件 + * Enable a plug-in + * + * @param path + */ + export function enable(path: string): any; + /** + * 关闭一个插件 + * Disable a plug-in + * + * @param path + */ + export function disable(path: string, options: any): any; + /** + * 获取一个插件的几个预制目录地址 + * Gets several prefab directory addresses for a plug-in + * + * @param extensionName 扩展的名字 Name of the extension + * @param type 地址类型(temp 临时目录,data 需要同步的数据目录,不传则返回现在打开的插件路径) Address type (temp temporary directory, data need to synchronize data directory, do not pass to return the current open plug-in path) + */ + export function getPath(extensionName: string, type?: PathType): any; + } + export module Panel { + export const _kitControl: any; + /** + * 打开一个面板 + * Open up a panel + * + * @param name + * @param args + */ + export function open(name: string, ...args: any[]): any; + /** + * 关闭一个面板 + * Close a panel + * + * @param name + */ + export function close(name: string): any; + /** + * 将焦点传递给一个面板 + * Pass focus to a panel + * + * @param name + */ + export function focus(name: string): any; + /** + * 检查面板是否已经打开 + * Check that the panel is open + * + * @param name + */ + export function has(name: string): Promise; + /** + * 查询当前窗口里某个面板里的元素列表 + * @param name + * @param selector + */ + export function querySelector(name: string, selector: string): Promise; + + export type Selector<$> = { $: Record } + + export type Options void> = { + /** + * @en Listening to panel events + * @zh 监听面板事件 + */ + listeners?: { + /** + * @en Hooks triggered when the panel is displayed + * @zh 面板显示的时候触发的钩子 + */ + show?: () => any; + /** + * @en Hooks triggered when the panel is hidden + * @zh 面板隐藏的时候触发的钩子 + */ + hide?: () => any; + }; + + /** + * @en Template of the panel + * @zh 面板的内容 + */ + template: string; + /** + * @en Style of the panel + * @zh 面板上的样式 + * */ + style?: string; + /** + * @en Selector of the panel + * @zh 快捷选择器 + */ + $?: S; + /** + * @en Panel built-in function methods that can be called in Messages, Listeners, lifecycle functions + * @zh panel 内置的函数方法,可以在 messages、listeners、生命周期函数内调用 + */ + methods?: M; + /** + * @en Hooks triggered when the panel is update + * @zh 面板数据更新后触发的钩子函数 + */ + update?: (...args: Parameters) => void; + /** + * @en Hooks triggered when the panel is ready + * @zh 面板启动后触发的钩子函数 + */ + ready?: () => void; + /** + * @en The function that will be triggered when the panel is ready to close, and will terminate the closing of the panel if it + * returns false + * @zh 面板准备关闭的时候会触发的函数,return false 的话,会终止关闭面板 + * 生命周期函数,在 panel 准备关闭的时候触发 + * 如果 return false,则会中断关闭流程,请谨慎使用,错误的判断会导致编辑器无法关闭。 + */ + beforeClose?: () => Promise | boolean | void; + /** + * @en Hook functions after panel closure + * @zh 面板关闭后的钩子函数 + */ + close?: () => void; + + } & ThisType & M> // merge them together + + export function define void, Selector = Record, M = Record>(options: Options): any; + } + export module Profile { + export type preferencesProtocol = 'default' | 'global' | 'local'; + export type projectProtocol = 'default' | 'project'; + export type tempProtocol = 'temp'; + export interface ProfileGetOptions { + type: 'deep' | 'current' | 'inherit'; + } + export interface ProfileObj { + get: (key?: string, options?: ProfileGetOptions) => any; + set: (key?: string, value?: any) => any; + remove: (key: string) => void; + save: () => void; + clear: () => void; + reset: () => void; + } + /** + * 读取插件配置 + * Read the plug-in configuration + * + * @param name 插件名 The plugin name + * @param key 配置路径 Configure path + * @param type 配置的类型,选填 Type of configuration, optional(global,local,default) + */ + export function getConfig(name: string, key?: string, type?: preferencesProtocol): Promise; + /** + * 设置插件配置 + * Set the plug-in configuration + * + * @param name 插件名 The plugin name + * @param key 配置路径 Configure path + * @param value 配置的值 The value of the configuration + * @param type 配置的类型,选填 Type of configuration, optional(global,local,default) + */ + export function setConfig(name: string, key: string, value: any, type?: preferencesProtocol): Promise; + /** + * 删除某个插件配置 + * Delete a plug-in configuration + * + * @param name 插件名 The plugin name + * @param key 配置路径 Configure path + * @param type 配置的类型,选填 Type of configuration, optional(global,local,default) + */ + export function removeConfig(name: string, key: string, type?: preferencesProtocol): Promise; + /** + * 读取插件内的项目配置 + * Read the project configuration within the plug-in + * + * @param name 插件名 The plugin name + * @param key 配置路径 Configure path + * @param type 配置的类型,选填 Type of configuration, optional(project,default) + */ + export function getProject(name: string, key?: string, type?: projectProtocol): Promise; + /** + * 设置插件内的项目配置 + * Set the project configuration within the plug-in + * + * @param name 插件名 The plugin name + * @param key 配置路径 Configure path + * @param value 配置的值 The value of the configuration + * @param type 配置的类型,选填 Type of configuration, optional(project,default) + */ + export function setProject(name: string, key: string, value: any, type?: projectProtocol): Promise; + /** + * 删除插件内的项目配置 + * Delete the project configuration within the plug-in + * + * @param name 插件名 The plugin name + * @param key 配置路径 Configure path + * @param type 配置的类型,选填 Type of configuration, optional(project,default) + */ + export function removeProject(name: string, key: string, type?: projectProtocol): Promise; + /** + * 读取插件配置 + * Read the plug-in configuration + * + * @param name 插件名 The plugin name + * @param key 配置路径 Configure path + */ + export function getTemp(name: string, key?: string): Promise; + /** + * 设置插件配置 + * Set the plug-in configuration + * + * @param name 插件名 The plugin name + * @param key 配置路径 Configure path + * @param value 配置的值 The value of the configuration + */ + export function setTemp(name: string, key: string, value: any): Promise; + /** + * 删除某个插件配置 + * Delete a plug-in configuration + * + * @param name 插件名 The plugin name + * @param key 配置路径 Configure path + */ + export function removeTemp(name: string, key: string): Promise; + /** + * 迁移插件某个版本的本地配置数据到编辑器最新版本 + * Migrate the local configuration data of a certain version of the plugin to the latest version of the editor + * + * @param pkgName + * @param profileVersion + * @param profileData + */ + export function migrateLocal(pkgName: string, profileVersion: string, profileData: any): any; + /** + * 迁移插件某个版本的全局配置数据到编辑器最新版本 + * Migrate the global configuration data of a certain version of the plugin to the latest version of the editor + * + * @param pkgName + * @param profileVersion + * @param profileData + */ + export function migrateGlobal(pkgName: string, profileVersion: string, profileData: any): any; + /** + * 迁移插件某个版本的项目配置数据到编辑器最新版本 + * Migrate the project configuration data of a certain version of the plugin to the latest version of the editor + * + * @param pkgName + * @param profileVersion + * @param profileData + */ + export function migrateProject(pkgName: string, profileVersion: string, profileData: any): any; + } + export module Project { + /** + * 创建一个项目 + * Creating a project + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + */ + export function create(): any; + /** + * 打开一个项目 + * Open a project + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + * + * @param path + */ + export function open(path?: string): Promise; + /** + * 添加一个项目 + * Add a project + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + * + * @param path + */ + export function add(path: string): any; + /** + * 当前项目路径 + * Current project path + */ + export const path: string; + /** + * 当前项目 uuid + * The current project UUID + */ + export const uuid: string; + /** + * 当前项目名称(取自 package.json) + * The current project name + */ + export const name: string; + /** + * 当前项目临时文件夹 + * Temporary folder for current project + */ + export const tmpDir: string; + /** + * 当前项目类型 + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + */ + export const type: '2d' | '3d'; + } + export module Selection { + /** + * 选中一个或者一组元素 + * Select one or a group of elements + * + * @param type + * @param uuid + */ + export function select(type: string, uuid: string | string[]): any; + /** + * 取消一个或者一组元素的选中状态 + * To deselect one or a group of elements + * + * @param type + * @param uuid + */ + export function unselect(type: string, uuid: string | string[]): any; + /** + * 清空一个类型的所有选中元素 + * Clears all selected elements of a type + * + * @param type + */ + export function clear(type: string): any; + /** + * 更新当前选中的类型数据 + * Updates the currently selected type data + * + * @param type + * @param uuids + */ + export function update(type: string, uuids: string[]): any; + /** + * 悬停触碰了某个元素 + * Hover touches an element + * 会发出 selection:hover 的广播消息 + * A broadcast message for selection:hover is issued + * + * @param type + * @param uuid + */ + export function hover(type: string, uuid?: string): any; + /** + * 获取最后选中的元素的类型 + * Gets the type of the last selected element + */ + export function getLastSelectedType(): string; + /** + * 获取某个类型内,最后选中的元素 + * Gets the last selected element of a type + * + * @param type + */ + export function getLastSelected(type: string): string; + /** + * 获取一个类型选中的所有元素数组 + * Gets an array of all elements selected for a type + * + * @param type + */ + export function getSelected(type: string): string[]; + } + export module Task { + export interface NoticeOptions { + title: string; + message?: string; + type?: 'error' | 'warn' | 'log' | 'success'; + source?: string; + timeout?: number; + } + /** + * 添加一个同步任务 + * Add a synchronous task + * 会在主窗口显示一个遮罩层 + * A mask layer is displayed in the main window + * + * @param title 任务名字 The task name + * @param describe 任务描述 Task description + * @param message 任务内容 Content of the task + */ + export function addSyncTask(title: string, describe?: string, message?: string): any; + /** + * 更新某一个同步任务显示的数据 + * Update the data displayed by a synchronous task + * + * @param title 任务名字 The task name + * @param describe 任务描述 Task description + * @param message 任务内容 Content of the task + */ + export function updateSyncTask(title: string, describe?: string, message?: string): any; + /** + * 删除一个同步任务 + * Delete a synchronous task + * + * @param title 任务的名字 The name of the task + */ + export function removeSyncTask(title: string): any; + /** + * 添加一个通知 + * Add a notification + * + * @param options 消息配置 Message configuration + */ + export function addNotice(options: NoticeOptions): any; + /** + * 删除一个通知 + * Delete a notification + * + * @param id 通知 id Notification ID + */ + export function removeNotice(id: number): any; + /** + * 修改 notice 自动移除的时间 + * Modify notice automatic removal time + * + * @param id 通知 id Notification ID + * @param time 超时时间 timeout + */ + export function changeNoticeTimeout(id: number, time: number): any; + /** + * 查询所有通知 + * Query all notifications + */ + export function queryNotices(): any; + /** + * 页面进程立即同步一次主进程数据 + * The page process synchronizes the master process data immediately + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + */ + export function sync(): any; + } + export module Theme { + /** + * 获取所有主题的名字 + * Gets the names of all topics + */ + export function getList(): any; + /** + * 使用某个皮肤 + * Use a certain skin + * + * @param name + */ + export function use(name?: string): any; + } + export module UI { + /** + * 在当前页面上注册一个自定义节点 + * Registers a custom node on the current page + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + * + * @param tagName 元素名字 + * @param element 元素的定义函数 + */ + export function register(tagName: string, element: any): void; + export const Base: any; + export const Button: any; + export const Input: any; + export const NumInput: any; + export const Loading: any; + export const Checkbox: any; + export const Section: any; + export const Select: any; + export const Bit: any; + export const Slider: any; + export const ColorPicker: any; + export const Color: any; + export const DragItem: any; + export const DragArea: any; + export const DragObject: any; + export const Prop: any; + export const Tooltip: any; + export const TextArea: any; + export const Progress: any; + export const Label: any; + export const Code: any; + export const Tab: any; + export const Gradient: any; + export const GradientPicker: any; + export const Icon: any; + export const File: any; + export const Link: any; + export const Image: any; + export const QRCode: any; + export const Markdown: any; + export const Curve: any; + export const CurveEditor: any; + export const NodeGraph: any; + } + export module User { + export interface UserData { + session_id: string; + session_key: string; + cocos_uid: string; + email: string; + nickname: string; + } + /** + * 跳过 User + * Skip the User + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + */ + export function skip(): any; + /** + * 获取 user 数据 + * Get user data + */ + export function getData(): Promise; + /** + * 检查用户是否登陆 + * Check if the user is logged in + */ + export function isLoggedIn(): Promise; + /** + * 用户登陆 + * The user login + * 失败会抛出异常 + * Failure throws an exception + * + * @param username + * @param password + */ + export function login(username: string, password: string): Promise; + /** + * 退出登陆 + * Logged out + * 失败会抛出异常 + * Failure throws an exception + */ + export function logout(): void; + /** + * 获取用户 token + * Get user token + * 失败会抛出异常 + * Failure throws an exception + */ + export function getUserToken(): Promise; + /** + * 根据插件 id 返回 session code + * Returns the session code based on the plug-in ID + * + * @param extensionId + */ + export function getSessionCode(extensionId: number): Promise; + /** + * 显示用户登陆遮罩层 + * Shows user login mask layer + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + */ + export function showMask(): void; + /** + * 隐藏用户登陆遮罩层 + * Hide user login mask layer + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + */ + export function hideMask(): void; + /** + * 监听事件 + * Listen for an event + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + * @param action + * @param handle + */ + export function on(action: string, handle: Function): any; + /** + * 监听一次事件 + * Listening for one event + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + * @param action + * @param handle + */ + export function once(action: string, handle: Function): any; + /** + * 取消已经监听的事件 + * Cancels the event you are listening for + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + * @param action + * @param handle + */ + export function removeListener(action: string, handle: Function): any; + } + export module Utils { + export module File { + /** + * 初始化一个可用的文件名 + * Initializes a available filename + * 返回可用名称的文件路径 + * Returns the file path with the available name + * + * @param file 初始文件路径 Initial file path + */ + export function getName(file: string): string; + interface UnzipOptions { + peel?: boolean; + } + /** + * 解压文件夹 + * Unzip folder + * + * @param zip + * @param target + * @param options + */ + export function unzip(zip: string, target: string, options?: UnzipOptions): Promise; + /** + * 复制一个文件到另一个位置 + * Copy a file to another location + * + * @param source + * @param target + */ + export function copy(source: string, target: string): void; + } + export module Path { + + /** + * 返回一个不含扩展名的文件名 + * @param path + */ + export function basenameNoExt(path: string): string; + /** + * 将 \ 统一换成 / + * @param path + */ + export function slash(path: string): string; + /** + * 去除路径最后的斜杆,返回一个不带斜杆的路径 + * @param path + */ + export function stripSep(path: string): string; + /** + * 删除一个路径的扩展名 + * @param path + */ + export function stripExt(path: string): string; + /** + * 判断路径 pathA 是否包含 pathB + * pathA = foo/bar, pathB = foo/bar/foobar, return true + * pathA = foo/bar, pathB = foo/bar, return true + * pathA = foo/bar/foobar, pathB = foo/bar, return false + * pathA = foo/bar/foobar, pathB = foobar/bar/foo, return false + * @param pathA + * @param pathB + */ + export function contains(pathA: string, pathB: string): boolean; + /** + * 格式化路径 + * 如果是 Windows 平台,需要将盘符转成小写进行判断 + * @param path + */ + export function normalize(path: string): string; + export const join: typeof NodeJSPath.join; + export const resolve: typeof NodeJSPath.resolve; + export const isAbsolute: typeof NodeJSPath.isAbsolute; + export const relative: typeof NodeJSPath.relative; + export const dirname: typeof NodeJSPath.dirname; + export const basename: typeof NodeJSPath.basename; + export const extname: typeof NodeJSPath.extname; + export const sep: '\\' | '/'; + export const delimiter: ';' | ':'; + export const parse: typeof NodeJSPath.parse; + export const format: typeof NodeJSPath.format; + + + } + export module Math { + /** + * 取给定边界范围的值 + * Take the value of the given boundary range + * @param {number} val + * @param {number} min + * @param {number} max + */ + export function clamp(val: number, min: number, max: number): any; + /** + * @function clamp01 + * @param {number} val + * @returns {number} + * + * Clamps a value between 0 and 1. + */ + export function clamp01(val: number): number; + /** + * 加法函数 + * 入参:函数内部转化时会先转字符串再转数值,因而传入字符串或 number 均可 + * 返回值:arg1 加上 arg2 的精确结果 + * @param {number|string} arg1 + * @param {number|string} arg2 + */ + export function add(arg1: number | string, arg2: number | string): number; + /** + * 减法函数 + * 入参:函数内部转化时会先转字符串再转数值,因而传入字符串或number均可 + * 返回值:arg1 减 arg2的精确结果 + * @param {number|string} arg1 + * @param {number|string} arg2 + */ + export function sub(arg1: number | string, arg2: number | string): number; + /** + * 保留小数点 + * @param val + * @param num + */ + export function toFixed(val: number, num: number): number; + } + export module Parse { + interface WhenParam { + PanelName?: string; + EditMode?: string; + ProjectType?: string; + } + /** + * 解析 when 参数 + * when 的格式: + * PanelName === '' && EditMode === '' + * 整理后的数据格式: + * { + * PanelName: '', + * EditMode: '', + * } + */ + export function when(when: string): WhenParam; + /** + * 判断一个 when 数据是否符合当前条件 + * @param when + */ + export function checkWhen(when: string): boolean; + } + export module Url { + /** + * 快捷获取文档路径 + * @param relativeUrl + * @param type + */ + export function getDocUrl(relativeUrl: string, type?: 'manual' | 'api'): string; + } + + export module UUID { + /** + * 压缩 UUID + * compress UUID + * @param uuid + * @param min + */ + export function compressUUID(uuid: string, min: boolean): string; + /** + * 解压 UUID + * decompress the UUID + * @param str + */ + export function decompressUUID(str: string): string; + /** + * 检查输入字符串是否是 UUID + * Check whether the input string is a UUID + * @param str + */ + export function isUUID(str: string): string; + /** + * 生成一个新的 uuid + */ + export function generate(): string; + } + } + export module Module { + /** + * 导入一个项目模块。 + * @param url 项目模块的 Database URL。 + * @experimental 实验性质。 + */ + export function importProjectModule(url: string): Promise; + } + } +} + diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/electron.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/electron.d.ts new file mode 100644 index 00000000..e84cbb90 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/electron.d.ts @@ -0,0 +1,16092 @@ +// Type definitions for Electron 13.1.4 +// Project: http://electronjs.org/ +// Definitions by: The Electron Team +// Definitions: https://github.com/electron/electron-typescript-definitions + +/// + +type GlobalEvent = Event & { returnValue: any }; + +declare namespace Electron { + const NodeEventEmitter: typeof import('events').EventEmitter; + + class Accelerator extends String { + + } + interface App extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/app + + /** + * Emitted when Chrome's accessibility support changes. This event fires when + * assistive technologies, such as screen readers, are enabled or disabled. See + * https://www.chromium.org/developers/design-documents/accessibility for more + * details. + * + * @platform darwin,win32 + */ + on(event: 'accessibility-support-changed', listener: (event: Event, + /** + * `true` when Chrome's accessibility support is enabled, `false` otherwise. + */ + accessibilitySupportEnabled: boolean) => void): this; + once(event: 'accessibility-support-changed', listener: (event: Event, + /** + * `true` when Chrome's accessibility support is enabled, `false` otherwise. + */ + accessibilitySupportEnabled: boolean) => void): this; + addListener(event: 'accessibility-support-changed', listener: (event: Event, + /** + * `true` when Chrome's accessibility support is enabled, `false` otherwise. + */ + accessibilitySupportEnabled: boolean) => void): this; + removeListener(event: 'accessibility-support-changed', listener: (event: Event, + /** + * `true` when Chrome's accessibility support is enabled, `false` otherwise. + */ + accessibilitySupportEnabled: boolean) => void): this; + /** + * Emitted when the application is activated. Various actions can trigger this + * event, such as launching the application for the first time, attempting to + * re-launch the application when it's already running, or clicking on the + * application's dock or taskbar icon. + * + * @platform darwin + */ + on(event: 'activate', listener: (event: Event, + hasVisibleWindows: boolean) => void): this; + once(event: 'activate', listener: (event: Event, + hasVisibleWindows: boolean) => void): this; + addListener(event: 'activate', listener: (event: Event, + hasVisibleWindows: boolean) => void): this; + removeListener(event: 'activate', listener: (event: Event, + hasVisibleWindows: boolean) => void): this; + /** + * Emitted during Handoff after an activity from this device was successfully + * resumed on another one. + * + * @platform darwin + */ + on(event: 'activity-was-continued', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + once(event: 'activity-was-continued', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + addListener(event: 'activity-was-continued', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + removeListener(event: 'activity-was-continued', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + /** + * Emitted before the application starts closing its windows. Calling + * `event.preventDefault()` will prevent the default behavior, which is terminating + * the application. + * + * **Note:** If application quit was initiated by `autoUpdater.quitAndInstall()`, + * then `before-quit` is emitted *after* emitting `close` event on all windows and + * closing them. + * + * **Note:** On Windows, this event will not be emitted if the app is closed due to + * a shutdown/restart of the system or a user logout. + */ + on(event: 'before-quit', listener: (event: Event) => void): this; + once(event: 'before-quit', listener: (event: Event) => void): this; + addListener(event: 'before-quit', listener: (event: Event) => void): this; + removeListener(event: 'before-quit', listener: (event: Event) => void): this; + /** + * Emitted when a browserWindow gets blurred. + */ + on(event: 'browser-window-blur', listener: (event: Event, + window: BrowserWindow) => void): this; + once(event: 'browser-window-blur', listener: (event: Event, + window: BrowserWindow) => void): this; + addListener(event: 'browser-window-blur', listener: (event: Event, + window: BrowserWindow) => void): this; + removeListener(event: 'browser-window-blur', listener: (event: Event, + window: BrowserWindow) => void): this; + /** + * Emitted when a new browserWindow is created. + */ + on(event: 'browser-window-created', listener: (event: Event, + window: BrowserWindow) => void): this; + once(event: 'browser-window-created', listener: (event: Event, + window: BrowserWindow) => void): this; + addListener(event: 'browser-window-created', listener: (event: Event, + window: BrowserWindow) => void): this; + removeListener(event: 'browser-window-created', listener: (event: Event, + window: BrowserWindow) => void): this; + /** + * Emitted when a browserWindow gets focused. + */ + on(event: 'browser-window-focus', listener: (event: Event, + window: BrowserWindow) => void): this; + once(event: 'browser-window-focus', listener: (event: Event, + window: BrowserWindow) => void): this; + addListener(event: 'browser-window-focus', listener: (event: Event, + window: BrowserWindow) => void): this; + removeListener(event: 'browser-window-focus', listener: (event: Event, + window: BrowserWindow) => void): this; + /** + * Emitted when failed to verify the `certificate` for `url`, to trust the + * certificate you should prevent the default behavior with + * `event.preventDefault()` and call `callback(true)`. + */ + on(event: 'certificate-error', listener: (event: Event, + webContents: WebContents, + url: string, + /** + * The error code + */ + error: string, + certificate: Certificate, + callback: (isTrusted: boolean) => void) => void): this; + once(event: 'certificate-error', listener: (event: Event, + webContents: WebContents, + url: string, + /** + * The error code + */ + error: string, + certificate: Certificate, + callback: (isTrusted: boolean) => void) => void): this; + addListener(event: 'certificate-error', listener: (event: Event, + webContents: WebContents, + url: string, + /** + * The error code + */ + error: string, + certificate: Certificate, + callback: (isTrusted: boolean) => void) => void): this; + removeListener(event: 'certificate-error', listener: (event: Event, + webContents: WebContents, + url: string, + /** + * The error code + */ + error: string, + certificate: Certificate, + callback: (isTrusted: boolean) => void) => void): this; + /** + * Emitted when the child process unexpectedly disappears. This is normally because + * it was crashed or killed. It does not include renderer processes. + */ + on(event: 'child-process-gone', listener: (event: Event, + details: Details) => void): this; + once(event: 'child-process-gone', listener: (event: Event, + details: Details) => void): this; + addListener(event: 'child-process-gone', listener: (event: Event, + details: Details) => void): this; + removeListener(event: 'child-process-gone', listener: (event: Event, + details: Details) => void): this; + /** + * Emitted during Handoff when an activity from a different device wants to be + * resumed. You should call `event.preventDefault()` if you want to handle this + * event. + * + * A user activity can be continued only in an app that has the same developer Team + * ID as the activity's source app and that supports the activity's type. Supported + * activity types are specified in the app's `Info.plist` under the + * `NSUserActivityTypes` key. + * + * @platform darwin + */ + on(event: 'continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity on another device. + */ + userInfo: unknown) => void): this; + once(event: 'continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity on another device. + */ + userInfo: unknown) => void): this; + addListener(event: 'continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity on another device. + */ + userInfo: unknown) => void): this; + removeListener(event: 'continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity on another device. + */ + userInfo: unknown) => void): this; + /** + * Emitted during Handoff when an activity from a different device fails to be + * resumed. + * + * @platform darwin + */ + on(event: 'continue-activity-error', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * A string with the error's localized description. + */ + error: string) => void): this; + once(event: 'continue-activity-error', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * A string with the error's localized description. + */ + error: string) => void): this; + addListener(event: 'continue-activity-error', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * A string with the error's localized description. + */ + error: string) => void): this; + removeListener(event: 'continue-activity-error', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * A string with the error's localized description. + */ + error: string) => void): this; + /** + * Emitted when `desktopCapturer.getSources()` is called in the renderer process of + * `webContents`. Calling `event.preventDefault()` will make it return empty + * sources. + */ + on(event: 'desktop-capturer-get-sources', listener: (event: Event, + webContents: WebContents) => void): this; + once(event: 'desktop-capturer-get-sources', listener: (event: Event, + webContents: WebContents) => void): this; + addListener(event: 'desktop-capturer-get-sources', listener: (event: Event, + webContents: WebContents) => void): this; + removeListener(event: 'desktop-capturer-get-sources', listener: (event: Event, + webContents: WebContents) => void): this; + /** + * Emitted when mac application become active. Difference from `activate` event is + * that `did-become-active` is emitted every time the app becomes active, not only + * when Dock icon is clicked or application is re-launched. + * + * @platform darwin + */ + on(event: 'did-become-active', listener: (event: Event) => void): this; + once(event: 'did-become-active', listener: (event: Event) => void): this; + addListener(event: 'did-become-active', listener: (event: Event) => void): this; + removeListener(event: 'did-become-active', listener: (event: Event) => void): this; + /** + * Emitted whenever there is a GPU info update. + */ + on(event: 'gpu-info-update', listener: Function): this; + once(event: 'gpu-info-update', listener: Function): this; + addListener(event: 'gpu-info-update', listener: Function): this; + removeListener(event: 'gpu-info-update', listener: Function): this; + /** + * Emitted when the GPU process crashes or is killed. + * + * **Deprecated:** This event is superceded by the `child-process-gone` event which + * contains more information about why the child process disappeared. It isn't + * always because it crashed. The `killed` boolean can be replaced by checking + * `reason === 'killed'` when you switch to that event. + * + * @deprecated + */ + on(event: 'gpu-process-crashed', listener: (event: Event, + killed: boolean) => void): this; + once(event: 'gpu-process-crashed', listener: (event: Event, + killed: boolean) => void): this; + addListener(event: 'gpu-process-crashed', listener: (event: Event, + killed: boolean) => void): this; + removeListener(event: 'gpu-process-crashed', listener: (event: Event, + killed: boolean) => void): this; + /** + * Emitted when `webContents` wants to do basic auth. + * + * The default behavior is to cancel all authentications. To override this you + * should prevent the default behavior with `event.preventDefault()` and call + * `callback(username, password)` with the credentials. + * + * If `callback` is called without a username or password, the authentication + * request will be cancelled and the authentication error will be returned to the + * page. + */ + on(event: 'login', listener: (event: Event, + webContents: WebContents, + authenticationResponseDetails: AuthenticationResponseDetails, + authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + once(event: 'login', listener: (event: Event, + webContents: WebContents, + authenticationResponseDetails: AuthenticationResponseDetails, + authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + addListener(event: 'login', listener: (event: Event, + webContents: WebContents, + authenticationResponseDetails: AuthenticationResponseDetails, + authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + removeListener(event: 'login', listener: (event: Event, + webContents: WebContents, + authenticationResponseDetails: AuthenticationResponseDetails, + authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + /** + * Emitted when the user clicks the native macOS new tab button. The new tab button + * is only visible if the current `BrowserWindow` has a `tabbingIdentifier` + * + * @platform darwin + */ + on(event: 'new-window-for-tab', listener: (event: Event) => void): this; + once(event: 'new-window-for-tab', listener: (event: Event) => void): this; + addListener(event: 'new-window-for-tab', listener: (event: Event) => void): this; + removeListener(event: 'new-window-for-tab', listener: (event: Event) => void): this; + /** + * Emitted when the user wants to open a file with the application. The `open-file` + * event is usually emitted when the application is already open and the OS wants + * to reuse the application to open the file. `open-file` is also emitted when a + * file is dropped onto the dock and the application is not yet running. Make sure + * to listen for the `open-file` event very early in your application startup to + * handle this case (even before the `ready` event is emitted). + * + * You should call `event.preventDefault()` if you want to handle this event. + * + * On Windows, you have to parse `process.argv` (in the main process) to get the + * filepath. + * + * @platform darwin + */ + on(event: 'open-file', listener: (event: Event, + path: string) => void): this; + once(event: 'open-file', listener: (event: Event, + path: string) => void): this; + addListener(event: 'open-file', listener: (event: Event, + path: string) => void): this; + removeListener(event: 'open-file', listener: (event: Event, + path: string) => void): this; + /** + * Emitted when the user wants to open a URL with the application. Your + * application's `Info.plist` file must define the URL scheme within the + * `CFBundleURLTypes` key, and set `NSPrincipalClass` to `AtomApplication`. + * +You should call `event.preventDefault()` if you want to handle this event. + * + * @platform darwin + */ + on(event: 'open-url', listener: (event: Event, + url: string) => void): this; + once(event: 'open-url', listener: (event: Event, + url: string) => void): this; + addListener(event: 'open-url', listener: (event: Event, + url: string) => void): this; + removeListener(event: 'open-url', listener: (event: Event, + url: string) => void): this; + /** + * Emitted when the application is quitting. + * + * **Note:** On Windows, this event will not be emitted if the app is closed due to + * a shutdown/restart of the system or a user logout. + */ + on(event: 'quit', listener: (event: Event, + exitCode: number) => void): this; + once(event: 'quit', listener: (event: Event, + exitCode: number) => void): this; + addListener(event: 'quit', listener: (event: Event, + exitCode: number) => void): this; + removeListener(event: 'quit', listener: (event: Event, + exitCode: number) => void): this; + /** + * Emitted once, when Electron has finished initializing. On macOS, `launchInfo` + * holds the `userInfo` of the `NSUserNotification` or information from + * `UNNotificationResponse` that was used to open the application, if it was + * launched from Notification Center. You can also call `app.isReady()` to check if + * this event has already fired and `app.whenReady()` to get a Promise that is + * fulfilled when Electron is initialized. + */ + on(event: 'ready', listener: (event: Event, + launchInfo: (Record) | (NotificationResponse)) => void): this; + once(event: 'ready', listener: (event: Event, + launchInfo: (Record) | (NotificationResponse)) => void): this; + addListener(event: 'ready', listener: (event: Event, + launchInfo: (Record) | (NotificationResponse)) => void): this; + removeListener(event: 'ready', listener: (event: Event, + launchInfo: (Record) | (NotificationResponse)) => void): this; + /** + * Emitted when `remote.getBuiltin()` is called in the renderer process of + * `webContents`. Calling `event.preventDefault()` will prevent the module from + * being returned. Custom value can be returned by setting `event.returnValue`. + * + * @deprecated + */ + on(event: 'remote-get-builtin', listener: (event: Event, + webContents: WebContents, + moduleName: string) => void): this; + once(event: 'remote-get-builtin', listener: (event: Event, + webContents: WebContents, + moduleName: string) => void): this; + addListener(event: 'remote-get-builtin', listener: (event: Event, + webContents: WebContents, + moduleName: string) => void): this; + removeListener(event: 'remote-get-builtin', listener: (event: Event, + webContents: WebContents, + moduleName: string) => void): this; + /** + * Emitted when `remote.getCurrentWebContents()` is called in the renderer process + * of `webContents`. Calling `event.preventDefault()` will prevent the object from + * being returned. Custom value can be returned by setting `event.returnValue`. + * + * @deprecated + */ + on(event: 'remote-get-current-web-contents', listener: (event: Event, + webContents: WebContents) => void): this; + once(event: 'remote-get-current-web-contents', listener: (event: Event, + webContents: WebContents) => void): this; + addListener(event: 'remote-get-current-web-contents', listener: (event: Event, + webContents: WebContents) => void): this; + removeListener(event: 'remote-get-current-web-contents', listener: (event: Event, + webContents: WebContents) => void): this; + /** + * Emitted when `remote.getCurrentWindow()` is called in the renderer process of + * `webContents`. Calling `event.preventDefault()` will prevent the object from + * being returned. Custom value can be returned by setting `event.returnValue`. + * + * @deprecated + */ + on(event: 'remote-get-current-window', listener: (event: Event, + webContents: WebContents) => void): this; + once(event: 'remote-get-current-window', listener: (event: Event, + webContents: WebContents) => void): this; + addListener(event: 'remote-get-current-window', listener: (event: Event, + webContents: WebContents) => void): this; + removeListener(event: 'remote-get-current-window', listener: (event: Event, + webContents: WebContents) => void): this; + /** + * Emitted when `remote.getGlobal()` is called in the renderer process of + * `webContents`. Calling `event.preventDefault()` will prevent the global from + * being returned. Custom value can be returned by setting `event.returnValue`. + * + * @deprecated + */ + on(event: 'remote-get-global', listener: (event: Event, + webContents: WebContents, + globalName: string) => void): this; + once(event: 'remote-get-global', listener: (event: Event, + webContents: WebContents, + globalName: string) => void): this; + addListener(event: 'remote-get-global', listener: (event: Event, + webContents: WebContents, + globalName: string) => void): this; + removeListener(event: 'remote-get-global', listener: (event: Event, + webContents: WebContents, + globalName: string) => void): this; + /** + * Emitted when `remote.require()` is called in the renderer process of + * `webContents`. Calling `event.preventDefault()` will prevent the module from + * being returned. Custom value can be returned by setting `event.returnValue`. + * + * @deprecated + */ + on(event: 'remote-require', listener: (event: Event, + webContents: WebContents, + moduleName: string) => void): this; + once(event: 'remote-require', listener: (event: Event, + webContents: WebContents, + moduleName: string) => void): this; + addListener(event: 'remote-require', listener: (event: Event, + webContents: WebContents, + moduleName: string) => void): this; + removeListener(event: 'remote-require', listener: (event: Event, + webContents: WebContents, + moduleName: string) => void): this; + /** + * Emitted when the renderer process unexpectedly disappears. This is normally + * because it was crashed or killed. + */ + on(event: 'render-process-gone', listener: (event: Event, + webContents: WebContents, + details: RenderProcessGoneDetails) => void): this; + once(event: 'render-process-gone', listener: (event: Event, + webContents: WebContents, + details: RenderProcessGoneDetails) => void): this; + addListener(event: 'render-process-gone', listener: (event: Event, + webContents: WebContents, + details: RenderProcessGoneDetails) => void): this; + removeListener(event: 'render-process-gone', listener: (event: Event, + webContents: WebContents, + details: RenderProcessGoneDetails) => void): this; + /** + * Emitted when the renderer process of `webContents` crashes or is killed. + * + * **Deprecated:** This event is superceded by the `render-process-gone` event + * which contains more information about why the render process disappeared. It + * isn't always because it crashed. The `killed` boolean can be replaced by + * checking `reason === 'killed'` when you switch to that event. + * + * @deprecated + */ + on(event: 'renderer-process-crashed', listener: (event: Event, + webContents: WebContents, + killed: boolean) => void): this; + once(event: 'renderer-process-crashed', listener: (event: Event, + webContents: WebContents, + killed: boolean) => void): this; + addListener(event: 'renderer-process-crashed', listener: (event: Event, + webContents: WebContents, + killed: boolean) => void): this; + removeListener(event: 'renderer-process-crashed', listener: (event: Event, + webContents: WebContents, + killed: boolean) => void): this; + /** + * This event will be emitted inside the primary instance of your application when + * a second instance has been executed and calls `app.requestSingleInstanceLock()`. + * + * `argv` is an Array of the second instance's command line arguments, and + * `workingDirectory` is its current working directory. Usually applications + * respond to this by making their primary window focused and non-minimized. + * + * **Note:** If the second instance is started by a different user than the first, + * the `argv` array will not include the arguments. + * + * This event is guaranteed to be emitted after the `ready` event of `app` gets + * emitted. + * + * **Note:** Extra command line arguments might be added by Chromium, such as + * `--original-process-start-time`. + */ + on(event: 'second-instance', listener: (event: Event, + /** + * An array of the second instance's command line arguments + */ + argv: string[], + /** + * The second instance's working directory + */ + workingDirectory: string) => void): this; + once(event: 'second-instance', listener: (event: Event, + /** + * An array of the second instance's command line arguments + */ + argv: string[], + /** + * The second instance's working directory + */ + workingDirectory: string) => void): this; + addListener(event: 'second-instance', listener: (event: Event, + /** + * An array of the second instance's command line arguments + */ + argv: string[], + /** + * The second instance's working directory + */ + workingDirectory: string) => void): this; + removeListener(event: 'second-instance', listener: (event: Event, + /** + * An array of the second instance's command line arguments + */ + argv: string[], + /** + * The second instance's working directory + */ + workingDirectory: string) => void): this; + /** + * Emitted when a client certificate is requested. + * + * The `url` corresponds to the navigation entry requesting the client certificate + * and `callback` can be called with an entry filtered from the list. Using + * `event.preventDefault()` prevents the application from using the first + * certificate from the store. + */ + on(event: 'select-client-certificate', listener: (event: Event, + webContents: WebContents, + url: string, + certificateList: Certificate[], + callback: (certificate?: Certificate) => void) => void): this; + once(event: 'select-client-certificate', listener: (event: Event, + webContents: WebContents, + url: string, + certificateList: Certificate[], + callback: (certificate?: Certificate) => void) => void): this; + addListener(event: 'select-client-certificate', listener: (event: Event, + webContents: WebContents, + url: string, + certificateList: Certificate[], + callback: (certificate?: Certificate) => void) => void): this; + removeListener(event: 'select-client-certificate', listener: (event: Event, + webContents: WebContents, + url: string, + certificateList: Certificate[], + callback: (certificate?: Certificate) => void) => void): this; + /** + * Emitted when Electron has created a new `session`. + */ + on(event: 'session-created', listener: (session: Session) => void): this; + once(event: 'session-created', listener: (session: Session) => void): this; + addListener(event: 'session-created', listener: (session: Session) => void): this; + removeListener(event: 'session-created', listener: (session: Session) => void): this; + /** + * Emitted when Handoff is about to be resumed on another device. If you need to + * update the state to be transferred, you should call `event.preventDefault()` + * immediately, construct a new `userInfo` dictionary and call + * `app.updateCurrentActivity()` in a timely manner. Otherwise, the operation will + * fail and `continue-activity-error` will be called. + * + * @platform darwin + */ + on(event: 'update-activity-state', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + once(event: 'update-activity-state', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + addListener(event: 'update-activity-state', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + removeListener(event: 'update-activity-state', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string, + /** + * Contains app-specific state stored by the activity. + */ + userInfo: unknown) => void): this; + /** + * Emitted when a new webContents is created. + */ + on(event: 'web-contents-created', listener: (event: Event, + webContents: WebContents) => void): this; + once(event: 'web-contents-created', listener: (event: Event, + webContents: WebContents) => void): this; + addListener(event: 'web-contents-created', listener: (event: Event, + webContents: WebContents) => void): this; + removeListener(event: 'web-contents-created', listener: (event: Event, + webContents: WebContents) => void): this; + /** + * Emitted during Handoff before an activity from a different device wants to be + * resumed. You should call `event.preventDefault()` if you want to handle this + * event. + * + * @platform darwin + */ + on(event: 'will-continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string) => void): this; + once(event: 'will-continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string) => void): this; + addListener(event: 'will-continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string) => void): this; + removeListener(event: 'will-continue-activity', listener: (event: Event, + /** + * A string identifying the activity. Maps to `NSUserActivity.activityType`. + */ + type: string) => void): this; + /** + * Emitted when the application has finished basic startup. On Windows and Linux, + * the `will-finish-launching` event is the same as the `ready` event; on macOS, + * this event represents the `applicationWillFinishLaunching` notification of + * `NSApplication`. You would usually set up listeners for the `open-file` and + * `open-url` events here, and start the crash reporter and auto updater. + * +In most cases, you should do everything in the `ready` event handler. + */ + on(event: 'will-finish-launching', listener: Function): this; + once(event: 'will-finish-launching', listener: Function): this; + addListener(event: 'will-finish-launching', listener: Function): this; + removeListener(event: 'will-finish-launching', listener: Function): this; + /** + * Emitted when all windows have been closed and the application will quit. Calling + * `event.preventDefault()` will prevent the default behavior, which is terminating + * the application. + * + * See the description of the `window-all-closed` event for the differences between + * the `will-quit` and `window-all-closed` events. + * + * **Note:** On Windows, this event will not be emitted if the app is closed due to + * a shutdown/restart of the system or a user logout. + */ + on(event: 'will-quit', listener: (event: Event) => void): this; + once(event: 'will-quit', listener: (event: Event) => void): this; + addListener(event: 'will-quit', listener: (event: Event) => void): this; + removeListener(event: 'will-quit', listener: (event: Event) => void): this; + /** + * Emitted when all windows have been closed. + * + * If you do not subscribe to this event and all windows are closed, the default + * behavior is to quit the app; however, if you subscribe, you control whether the + * app quits or not. If the user pressed `Cmd + Q`, or the developer called + * `app.quit()`, Electron will first try to close all the windows and then emit the + * `will-quit` event, and in this case the `window-all-closed` event would not be + * emitted. + */ + on(event: 'window-all-closed', listener: Function): this; + once(event: 'window-all-closed', listener: Function): this; + addListener(event: 'window-all-closed', listener: Function): this; + removeListener(event: 'window-all-closed', listener: Function): this; + /** + * Adds `path` to the recent documents list. + * + * This list is managed by the OS. On Windows, you can visit the list from the task + * bar, and on macOS, you can visit it from dock menu. + * + * @platform darwin,win32 + */ + addRecentDocument(path: string): void; + /** + * Clears the recent documents list. + * + * @platform darwin,win32 + */ + clearRecentDocuments(): void; + /** + * By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per domain + * basis if the GPU processes crashes too frequently. This function disables that + * behavior. + +This method can only be called before app is ready. + */ + disableDomainBlockingFor3DAPIs(): void; + /** + * Disables hardware acceleration for current app. + * +This method can only be called before app is ready. + */ + disableHardwareAcceleration(): void; + /** + * Enables full sandbox mode on the app. This means that all renderers will be + * launched sandboxed, regardless of the value of the `sandbox` flag in + * WebPreferences. + +This method can only be called before app is ready. + */ + enableSandbox(): void; + /** + * Exits immediately with `exitCode`. `exitCode` defaults to 0. + * + * All windows will be closed immediately without asking the user, and the + * `before-quit` and `will-quit` events will not be emitted. + */ + exit(exitCode?: number): void; + /** + * On Linux, focuses on the first visible window. On macOS, makes the application + * the active app. On Windows, focuses on the application's first window. + * +You should seek to use the `steal` option as sparingly as possible. + */ + focus(options?: FocusOptions): void; + /** + * Resolve with an object containing the following: + * + * * `icon` NativeImage - the display icon of the app handling the protocol. + * * `path` String - installation path of the app handling the protocol. + * * `name` String - display name of the app handling the protocol. + * + * This method returns a promise that contains the application name, icon and path + * of the default handler for the protocol (aka URI scheme) of a URL. + * + * @platform darwin,win32 + */ + getApplicationInfoForProtocol(url: string): Promise; + /** + * Name of the application handling the protocol, or an empty string if there is no + * handler. For instance, if Electron is the default handler of the URL, this could + * be `Electron` on Windows and Mac. However, don't rely on the precise format + * which is not guaranteed to remain unchanged. Expect a different format on Linux, + * possibly with a `.desktop` suffix. + * + * This method returns the application name of the default handler for the protocol + * (aka URI scheme) of a URL. + */ + getApplicationNameForProtocol(url: string): string; + /** + * Array of `ProcessMetric` objects that correspond to memory and CPU usage + * statistics of all the processes associated with the app. + */ + getAppMetrics(): ProcessMetric[]; + /** + * The current application directory. + */ + getAppPath(): string; + /** + * The current value displayed in the counter badge. + * + * @platform linux,darwin + */ + getBadgeCount(): number; + /** + * The type of the currently running activity. + * + * @platform darwin + */ + getCurrentActivityType(): string; + /** + * fulfilled with the app's icon, which is a NativeImage. + * + * Fetches a path's associated icon. + * + * On _Windows_, there a 2 kinds of icons: + * + * * Icons associated with certain file extensions, like `.mp3`, `.png`, etc. + * * Icons inside the file itself, like `.exe`, `.dll`, `.ico`. + * + * On _Linux_ and _macOS_, icons depend on the application associated with file + * mime type. + */ + getFileIcon(path: string, options?: FileIconOptions): Promise; + /** + * The Graphics Feature Status from `chrome://gpu/`. + * + * **Note:** This information is only usable after the `gpu-info-update` event is + * emitted. + */ + getGPUFeatureStatus(): GPUFeatureStatus; + /** + * For `infoType` equal to `complete`: Promise is fulfilled with `Object` + * containing all the GPU Information as in chromium's GPUInfo object. This + * includes the version and driver information that's shown on `chrome://gpu` page. + * + * For `infoType` equal to `basic`: Promise is fulfilled with `Object` containing + * fewer attributes than when requested with `complete`. Here's an example of basic + * response: + * + * Using `basic` should be preferred if only basic information like `vendorId` or + * `driverId` is needed. + */ + getGPUInfo(infoType: 'basic' | 'complete'): Promise; + /** + * * `minItems` Integer - The minimum number of items that will be shown in the + * Jump List (for a more detailed description of this value see the MSDN docs). + * * `removedItems` JumpListItem[] - Array of `JumpListItem` objects that + * correspond to items that the user has explicitly removed from custom categories + * in the Jump List. These items must not be re-added to the Jump List in the + * **next** call to `app.setJumpList()`, Windows will not display any custom + * category that contains any of the removed items. + * + * @platform win32 + */ + getJumpListSettings(): JumpListSettings; + /** + * The current application locale, fetched using Chromium's `l10n_util` library. + * Possible return values are documented here. + * + * To set the locale, you'll want to use a command line switch at app startup, + * which may be found here. + * + * **Note:** When distributing your packaged app, you have to also ship the + * `locales` folder. + * + * **Note:** On Windows, you have to call it after the `ready` events gets emitted. + */ + getLocale(): string; + /** + * User operating system's locale two-letter ISO 3166 country code. The value is + * taken from native OS APIs. + * +**Note:** When unable to detect locale country code, it returns empty string. + */ + getLocaleCountryCode(): string; + /** + * If you provided `path` and `args` options to `app.setLoginItemSettings`, then + * you need to pass the same arguments here for `openAtLogin` to be set correctly. + * + * + * * `openAtLogin` Boolean - `true` if the app is set to open at login. + * * `openAsHidden` Boolean _macOS_ - `true` if the app is set to open as hidden at + * login. This setting is not available on MAS builds. + * * `wasOpenedAtLogin` Boolean _macOS_ - `true` if the app was opened at login + * automatically. This setting is not available on MAS builds. + * * `wasOpenedAsHidden` Boolean _macOS_ - `true` if the app was opened as a hidden + * login item. This indicates that the app should not open any windows at startup. + * This setting is not available on MAS builds. + * * `restoreState` Boolean _macOS_ - `true` if the app was opened as a login item + * that should restore the state from the previous session. This indicates that the + * app should restore the windows that were open the last time the app was closed. + * This setting is not available on MAS builds. + * * `executableWillLaunchAtLogin` Boolean _Windows_ - `true` if app is set to open + * at login and its run key is not deactivated. This differs from `openAtLogin` as + * it ignores the `args` option, this property will be true if the given executable + * would be launched at login with **any** arguments. + * * `launchItems` Object[] _Windows_ + * * `name` String _Windows_ - name value of a registry entry. + * * `path` String _Windows_ - The executable to an app that corresponds to a + * registry entry. + * * `args` String[] _Windows_ - the command-line arguments to pass to the + * executable. + * * `scope` String _Windows_ - one of `user` or `machine`. Indicates whether the + * registry entry is under `HKEY_CURRENT USER` or `HKEY_LOCAL_MACHINE`. + * * `enabled` Boolean _Windows_ - `true` if the app registry key is startup + * approved and therefore shows as `enabled` in Task Manager and Windows settings. + * + * @platform darwin,win32 + */ + getLoginItemSettings(options?: LoginItemSettingsOptions): LoginItemSettings; + /** + * The current application's name, which is the name in the application's + * `package.json` file. + * + * Usually the `name` field of `package.json` is a short lowercase name, according + * to the npm modules spec. You should usually also specify a `productName` field, + * which is your application's full capitalized name, and which will be preferred + * over `name` by Electron. + */ + getName(): string; + /** + * A path to a special directory or file associated with `name`. On failure, an + * `Error` is thrown. + * + * If `app.getPath('logs')` is called without called `app.setAppLogsPath()` being + * called first, a default log directory will be created equivalent to calling + * `app.setAppLogsPath()` without a `path` parameter. + */ + getPath(name: 'home' | 'appData' | 'userData' | 'cache' | 'temp' | 'exe' | 'module' | 'desktop' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos' | 'recent' | 'logs' | 'crashDumps'): string; + /** + * The version of the loaded application. If no version is found in the + * application's `package.json` file, the version of the current bundle or + * executable is returned. + */ + getVersion(): string; + /** + * This method returns whether or not this instance of your app is currently + * holding the single instance lock. You can request the lock with + * `app.requestSingleInstanceLock()` and release with + * `app.releaseSingleInstanceLock()` + */ + hasSingleInstanceLock(): boolean; + /** + * Hides all application windows without minimizing them. + * + * @platform darwin + */ + hide(): void; + /** + * Imports the certificate in pkcs12 format into the platform certificate store. + * `callback` is called with the `result` of import operation, a value of `0` + * indicates success while any other value indicates failure according to Chromium + * net_error_list. + * + * @platform linux + */ + importCertificate(options: ImportCertificateOptions, callback: (result: number) => void): void; + /** + * Invalidates the current Handoff user activity. + * + * @platform darwin + */ + invalidateCurrentActivity(): void; + /** + * `true` if Chrome's accessibility support is enabled, `false` otherwise. This API + * will return `true` if the use of assistive technologies, such as screen readers, + * has been detected. See + * https://www.chromium.org/developers/design-documents/accessibility for more + * details. + * + * @platform darwin,win32 + */ + isAccessibilitySupportEnabled(): boolean; + /** + * Whether the current executable is the default handler for a protocol (aka URI + * scheme). + * + * **Note:** On macOS, you can use this method to check if the app has been + * registered as the default protocol handler for a protocol. You can also verify + * this by checking `~/Library/Preferences/com.apple.LaunchServices.plist` on the + * macOS machine. Please refer to Apple's documentation for details. + * + * The API uses the Windows Registry and `LSCopyDefaultHandlerForURLScheme` + * internally. + */ + isDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; + /** + * whether or not the current OS version allows for native emoji pickers. + */ + isEmojiPanelSupported(): boolean; + /** + * Whether the application is currently running from the systems Application + * folder. Use in combination with `app.moveToApplicationsFolder()` + * + * @platform darwin + */ + isInApplicationsFolder(): boolean; + /** + * `true` if Electron has finished initializing, `false` otherwise. See also + * `app.whenReady()`. + */ + isReady(): boolean; + /** + * whether `Secure Keyboard Entry` is enabled. + * +By default this API will return `false`. + * + * @platform darwin + */ + isSecureKeyboardEntryEnabled(): boolean; + /** + * Whether the current desktop environment is Unity launcher. + * + * @platform linux + */ + isUnityRunning(): boolean; + /** + * Whether the move was successful. Please note that if the move is successful, + * your application will quit and relaunch. + * + * No confirmation dialog will be presented by default. If you wish to allow the + * user to confirm the operation, you may do so using the `dialog` API. + * + * **NOTE:** This method throws errors if anything other than the user causes the + * move to fail. For instance if the user cancels the authorization dialog, this + * method returns false. If we fail to perform the copy, then this method will + * throw an error. The message in the error should be informative and tell you + * exactly what went wrong. + * + * By default, if an app of the same name as the one being moved exists in the + * Applications directory and is _not_ running, the existing app will be trashed + * and the active app moved into its place. If it _is_ running, the pre-existing + * running app will assume focus and the previously active app will quit itself. + * This behavior can be changed by providing the optional conflict handler, where + * the boolean returned by the handler determines whether or not the move conflict + * is resolved with default behavior. i.e. returning `false` will ensure no + * further action is taken, returning `true` will result in the default behavior + * and the method continuing. + * + * For example: + * + * Would mean that if an app already exists in the user directory, if the user + * chooses to 'Continue Move' then the function would continue with its default + * behavior and the existing app will be trashed and the active app moved into its + * place. + * + * @platform darwin + */ + moveToApplicationsFolder(options?: MoveToApplicationsFolderOptions): boolean; + /** + * Try to close all windows. The `before-quit` event will be emitted first. If all + * windows are successfully closed, the `will-quit` event will be emitted and by + * default the application will terminate. + * + * This method guarantees that all `beforeunload` and `unload` event handlers are + * correctly executed. It is possible that a window cancels the quitting by + * returning `false` in the `beforeunload` event handler. + */ + quit(): void; + /** + * Relaunches the app when current instance exits. + * + * By default, the new instance will use the same working directory and command + * line arguments with current instance. When `args` is specified, the `args` will + * be passed as command line arguments instead. When `execPath` is specified, the + * `execPath` will be executed for relaunch instead of current app. + * + * Note that this method does not quit the app when executed, you have to call + * `app.quit` or `app.exit` after calling `app.relaunch` to make the app restart. + * + * When `app.relaunch` is called for multiple times, multiple instances will be + * started after current instance exited. + * + * An example of restarting current instance immediately and adding a new command + * line argument to the new instance: + */ + relaunch(options?: RelaunchOptions): void; + /** + * Releases all locks that were created by `requestSingleInstanceLock`. This will + * allow multiple instances of the application to once again run side by side. + */ + releaseSingleInstanceLock(): void; + /** + * Whether the call succeeded. + * + * This method checks if the current executable as the default handler for a + * protocol (aka URI scheme). If so, it will remove the app as the default handler. + * + * @platform darwin,win32 + */ + removeAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; + /** + * The return value of this method indicates whether or not this instance of your + * application successfully obtained the lock. If it failed to obtain the lock, + * you can assume that another instance of your application is already running with + * the lock and exit immediately. + * + * I.e. This method returns `true` if your process is the primary instance of your + * application and your app should continue loading. It returns `false` if your + * process should immediately quit as it has sent its parameters to another + * instance that has already acquired the lock. + * + * On macOS, the system enforces single instance automatically when users try to + * open a second instance of your app in Finder, and the `open-file` and `open-url` + * events will be emitted for that. However when users start your app in command + * line, the system's single instance mechanism will be bypassed, and you have to + * use this method to ensure single instance. + * + * An example of activating the window of primary instance when a second instance + * starts: + */ + requestSingleInstanceLock(): boolean; + /** + * Marks the current Handoff user activity as inactive without invalidating it. + * + * @platform darwin + */ + resignCurrentActivity(): void; + /** + * Set the about panel options. This will override the values defined in the app's + * `.plist` file on macOS. See the Apple docs for more details. On Linux, values + * must be set in order to be shown; there are no defaults. + * + * If you do not set `credits` but still wish to surface them in your app, AppKit + * will look for a file named "Credits.html", "Credits.rtf", and "Credits.rtfd", in + * that order, in the bundle returned by the NSBundle class method main. The first + * file found is used, and if none is found, the info area is left blank. See Apple + * documentation for more information. + */ + setAboutPanelOptions(options: AboutPanelOptionsOptions): void; + /** + * Manually enables Chrome's accessibility support, allowing to expose + * accessibility switch to users in application settings. See Chromium's + * accessibility docs for more details. Disabled by default. + * + * This API must be called after the `ready` event is emitted. + * + * **Note:** Rendering accessibility tree can significantly affect the performance + * of your app. It should not be enabled by default. + * + * @platform darwin,win32 + */ + setAccessibilitySupportEnabled(enabled: boolean): void; + /** + * Sets the activation policy for a given app. + * + * Activation policy types: + * + * * 'regular' - The application is an ordinary app that appears in the Dock and + * may have a user interface. + * * 'accessory' - The application doesn’t appear in the Dock and doesn’t have a + * menu bar, but it may be activated programmatically or by clicking on one of its + * windows. + * * 'prohibited' - The application doesn’t appear in the Dock and may not create + * windows or be activated. + * + * @platform darwin + */ + setActivationPolicy(policy: 'regular' | 'accessory' | 'prohibited'): void; + /** + * Sets or creates a directory your app's logs which can then be manipulated with + * `app.getPath()` or `app.setPath(pathName, newPath)`. + * + * Calling `app.setAppLogsPath()` without a `path` parameter will result in this + * directory being set to `~/Library/Logs/YourAppName` on _macOS_, and inside the + * `userData` directory on _Linux_ and _Windows_. + */ + setAppLogsPath(path?: string): void; + /** + * Changes the Application User Model ID to `id`. + * + * @platform win32 + */ + setAppUserModelId(id: string): void; + /** + * Whether the call succeeded. + * + * Sets the current executable as the default handler for a protocol (aka URI + * scheme). It allows you to integrate your app deeper into the operating system. + * Once registered, all links with `your-protocol://` will be opened with the + * current executable. The whole link, including protocol, will be passed to your + * application as a parameter. + * + * **Note:** On macOS, you can only register protocols that have been added to your + * app's `info.plist`, which cannot be modified at runtime. However, you can change + * the file during build time via Electron Forge, Electron Packager, or by editing + * `info.plist` with a text editor. Please refer to Apple's documentation for + * details. + * + * **Note:** In a Windows Store environment (when packaged as an `appx`) this API + * will return `true` for all calls but the registry key it sets won't be + * accessible by other applications. In order to register your Windows Store + * application as a default protocol handler you must declare the protocol in your + * manifest. + * + * The API uses the Windows Registry and `LSSetDefaultHandlerForURLScheme` + * internally. + */ + setAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; + /** + * Whether the call succeeded. + * + * Sets the counter badge for current app. Setting the count to `0` will hide the + * badge. + * + * On macOS, it shows on the dock icon. On Linux, it only works for Unity launcher. + * + * **Note:** Unity launcher requires the existence of a `.desktop` file to work, + * for more information please read Desktop Environment Integration. + * + * @platform linux,darwin + */ + setBadgeCount(count?: number): boolean; + /** + * Sets or removes a custom Jump List for the application, and returns one of the + * following strings: + * + * * `ok` - Nothing went wrong. + * * `error` - One or more errors occurred, enable runtime logging to figure out + * the likely cause. + * * `invalidSeparatorError` - An attempt was made to add a separator to a custom + * category in the Jump List. Separators are only allowed in the standard `Tasks` + * category. + * * `fileTypeRegistrationError` - An attempt was made to add a file link to the + * Jump List for a file type the app isn't registered to handle. + * * `customCategoryAccessDeniedError` - Custom categories can't be added to the + * Jump List due to user privacy or group policy settings. + * + * If `categories` is `null` the previously set custom Jump List (if any) will be + * replaced by the standard Jump List for the app (managed by Windows). + * + * **Note:** If a `JumpListCategory` object has neither the `type` nor the `name` + * property set then its `type` is assumed to be `tasks`. If the `name` property is + * set but the `type` property is omitted then the `type` is assumed to be + * `custom`. + * + * **Note:** Users can remove items from custom categories, and Windows will not + * allow a removed item to be added back into a custom category until **after** the + * next successful call to `app.setJumpList(categories)`. Any attempt to re-add a + * removed item to a custom category earlier than that will result in the entire + * custom category being omitted from the Jump List. The list of removed items can + * be obtained using `app.getJumpListSettings()`. + * + * **Note:** The maximum length of a Jump List item's `description` property is 260 + * characters. Beyond this limit, the item will not be added to the Jump List, nor + * will it be displayed. + * +Here's a very simple example of creating a custom Jump List: + * + * @platform win32 + */ + setJumpList(categories: (JumpListCategory[]) | (null)): void; + /** + * To work with Electron's `autoUpdater` on Windows, which uses Squirrel, you'll + * want to set the launch path to Update.exe, and pass arguments that specify your + * application name. For example: + * + * @platform darwin,win32 + */ + setLoginItemSettings(settings: Settings): void; + /** + * Overrides the current application's name. + * + * **Note:** This function overrides the name used internally by Electron; it does + * not affect the name that the OS uses. + */ + setName(name: string): void; + /** + * Overrides the `path` to a special directory or file associated with `name`. If + * the path specifies a directory that does not exist, an `Error` is thrown. In + * that case, the directory should be created with `fs.mkdirSync` or similar. + * + * You can only override paths of a `name` defined in `app.getPath`. + * + * By default, web pages' cookies and caches will be stored under the `userData` + * directory. If you want to change this location, you have to override the + * `userData` path before the `ready` event of the `app` module is emitted. + */ + setPath(name: string, path: string): void; + /** + * Set the `Secure Keyboard Entry` is enabled in your application. + * + * By using this API, important information such as password and other sensitive + * information can be prevented from being intercepted by other processes. + * + * See Apple's documentation for more details. + * + * **Note:** Enable `Secure Keyboard Entry` only when it is needed and disable it + * when it is no longer needed. + * + * @platform darwin + */ + setSecureKeyboardEntryEnabled(enabled: boolean): void; + /** + * Creates an `NSUserActivity` and sets it as the current activity. The activity is + * eligible for Handoff to another device afterward. + * + * @platform darwin + */ + setUserActivity(type: string, userInfo: any, webpageURL?: string): void; + /** + * Adds `tasks` to the Tasks category of the Jump List on Windows. + * + * `tasks` is an array of `Task` objects. + * + * Whether the call succeeded. + * + * **Note:** If you'd like to customize the Jump List even more use + * `app.setJumpList(categories)` instead. + * + * @platform win32 + */ + setUserTasks(tasks: Task[]): boolean; + /** + * Shows application windows after they were hidden. Does not automatically focus + * them. + * + * @platform darwin + */ + show(): void; + /** + * Show the app's about panel options. These options can be overridden with + * `app.setAboutPanelOptions(options)`. + */ + showAboutPanel(): void; + /** + * Show the platform's native emoji picker. + * + * @platform darwin,win32 + */ + showEmojiPanel(): void; + /** + * This function **must** be called once you have finished accessing the security + * scoped file. If you do not remember to stop accessing the bookmark, kernel + * resources will be leaked and your app will lose its ability to reach outside the + * sandbox completely, until your app is restarted. + * + * Start accessing a security scoped resource. With this method Electron + * applications that are packaged for the Mac App Store may reach outside their + * sandbox to access files chosen by the user. See Apple's documentation for a + * description of how this system works. + * + * @platform mas + */ + startAccessingSecurityScopedResource(bookmarkData: string): Function; + /** + * Updates the current activity if its type matches `type`, merging the entries + * from `userInfo` into its current `userInfo` dictionary. + * + * @platform darwin + */ + updateCurrentActivity(type: string, userInfo: any): void; + /** + * fulfilled when Electron is initialized. May be used as a convenient alternative + * to checking `app.isReady()` and subscribing to the `ready` event if the app is + * not ready yet. + */ + whenReady(): Promise; + /** + * A `Boolean` property that's `true` if Chrome's accessibility support is enabled, + * `false` otherwise. This property will be `true` if the use of assistive + * technologies, such as screen readers, has been detected. Setting this property + * to `true` manually enables Chrome's accessibility support, allowing developers + * to expose accessibility switch to users in application settings. + * + * See Chromium's accessibility docs for more details. Disabled by default. + * + * This API must be called after the `ready` event is emitted. + * + * **Note:** Rendering accessibility tree can significantly affect the performance + * of your app. It should not be enabled by default. + * + * @platform darwin,win32 + */ + accessibilitySupportEnabled: boolean; + /** + * A `Boolean` which when `true` disables the overrides that Electron has in place + * to ensure renderer processes are restarted on every navigation. The current + * default value for this property is `true`. + * + * The intention is for these overrides to become disabled by default and then at + * some point in the future this property will be removed. This property impacts + * which native modules you can use in the renderer process. For more information + * on the direction Electron is going with renderer process restarts and usage of + * native modules in the renderer process please check out this Tracking Issue. + */ + allowRendererProcessReuse: boolean; + /** + * A `Menu | null` property that returns `Menu` if one has been set and `null` + * otherwise. Users can pass a Menu to set this property. + */ + applicationMenu: (Menu) | (null); + /** + * An `Integer` property that returns the badge count for current app. Setting the + * count to `0` will hide the badge. + * + * On macOS, setting this with any nonzero integer shows on the dock icon. On + * Linux, this property only works for Unity launcher. + * + * **Note:** Unity launcher requires the existence of a `.desktop` file to work, + * for more information please read Desktop Environment Integration. + * + * **Note:** On macOS, you need to ensure that your application has the permission + * to display notifications for this property to take effect. + * + * @platform linux,darwin + */ + badgeCount: number; + /** + * A `CommandLine` object that allows you to read and manipulate the command line + * arguments that Chromium uses. + * + */ + readonly commandLine: CommandLine; + /** + * A `Dock` `| undefined` object that allows you to perform actions on your app + * icon in the user's dock on macOS. + * + * @platform darwin + */ + readonly dock: Dock; + /** + * A `Boolean` property that returns `true` if the app is packaged, `false` + * otherwise. For many apps, this property can be used to distinguish development + * and production environments. + * + */ + readonly isPackaged: boolean; + /** + * A `String` property that indicates the current application's name, which is the + * name in the application's `package.json` file. + * + * Usually the `name` field of `package.json` is a short lowercase name, according + * to the npm modules spec. You should usually also specify a `productName` field, + * which is your application's full capitalized name, and which will be preferred + * over `name` by Electron. + */ + name: string; + /** + * A `Boolean` which when `true` indicates that the app is currently running under + * the Rosetta Translator Environment. + * + * You can use this property to prompt users to download the arm64 version of your + * application when they are running the x64 version under Rosetta incorrectly. + * + * @platform darwin + */ + readonly runningUnderRosettaTranslation: boolean; + /** + * A `String` which is the user agent string Electron will use as a global + * fallback. + * + * This is the user agent that will be used when no user agent is set at the + * `webContents` or `session` level. It is useful for ensuring that your entire + * app has the same user agent. Set to a custom value as early as possible in your + * app's initialization to ensure that your overridden value is used. + */ + userAgentFallback: string; + } + + interface AutoUpdater extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/auto-updater + + /** + * This event is emitted after a user calls `quitAndInstall()`. + * + * When this API is called, the `before-quit` event is not emitted before all + * windows are closed. As a result you should listen to this event if you wish to + * perform actions before the windows are closed while a process is quitting, as + * well as listening to `before-quit`. + */ + on(event: 'before-quit-for-update', listener: Function): this; + once(event: 'before-quit-for-update', listener: Function): this; + addListener(event: 'before-quit-for-update', listener: Function): this; + removeListener(event: 'before-quit-for-update', listener: Function): this; + /** + * Emitted when checking if an update has started. + */ + on(event: 'checking-for-update', listener: Function): this; + once(event: 'checking-for-update', listener: Function): this; + addListener(event: 'checking-for-update', listener: Function): this; + removeListener(event: 'checking-for-update', listener: Function): this; + /** + * Emitted when there is an error while updating. + */ + on(event: 'error', listener: (error: Error) => void): this; + once(event: 'error', listener: (error: Error) => void): this; + addListener(event: 'error', listener: (error: Error) => void): this; + removeListener(event: 'error', listener: (error: Error) => void): this; + /** + * Emitted when there is an available update. The update is downloaded + * automatically. + */ + on(event: 'update-available', listener: Function): this; + once(event: 'update-available', listener: Function): this; + addListener(event: 'update-available', listener: Function): this; + removeListener(event: 'update-available', listener: Function): this; + /** + * Emitted when an update has been downloaded. + * + * On Windows only `releaseName` is available. + * + * **Note:** It is not strictly necessary to handle this event. A successfully + * downloaded update will still be applied the next time the application starts. + */ + on(event: 'update-downloaded', listener: (event: Event, + releaseNotes: string, + releaseName: string, + releaseDate: Date, + updateURL: string) => void): this; + once(event: 'update-downloaded', listener: (event: Event, + releaseNotes: string, + releaseName: string, + releaseDate: Date, + updateURL: string) => void): this; + addListener(event: 'update-downloaded', listener: (event: Event, + releaseNotes: string, + releaseName: string, + releaseDate: Date, + updateURL: string) => void): this; + removeListener(event: 'update-downloaded', listener: (event: Event, + releaseNotes: string, + releaseName: string, + releaseDate: Date, + updateURL: string) => void): this; + /** + * Emitted when there is no available update. + */ + on(event: 'update-not-available', listener: Function): this; + once(event: 'update-not-available', listener: Function): this; + addListener(event: 'update-not-available', listener: Function): this; + removeListener(event: 'update-not-available', listener: Function): this; + /** + * Asks the server whether there is an update. You must call `setFeedURL` before + * using this API. + */ + checkForUpdates(): void; + /** + * The current update feed URL. + */ + getFeedURL(): string; + /** + * Restarts the app and installs the update after it has been downloaded. It should + * only be called after `update-downloaded` has been emitted. + * + * Under the hood calling `autoUpdater.quitAndInstall()` will close all application + * windows first, and automatically call `app.quit()` after all windows have been + * closed. + * + * **Note:** It is not strictly necessary to call this function to apply an update, + * as a successfully downloaded update will always be applied the next time the + * application starts. + */ + quitAndInstall(): void; + /** + * Sets the `url` and initialize the auto updater. + */ + setFeedURL(options: FeedURLOptions): void; + } + + interface BluetoothDevice { + + // Docs: https://electronjs.org/docs/api/structures/bluetooth-device + + deviceId: string; + deviceName: string; + } + + class BrowserView { + + // Docs: https://electronjs.org/docs/api/browser-view + + /** + * BrowserView + */ + constructor(options?: BrowserViewConstructorOptions); + /** + * The `bounds` of this BrowserView instance as `Object`. + * + * @experimental + */ + getBounds(): Rectangle; + setAutoResize(options: AutoResizeOptions): void; + setBackgroundColor(color: string): void; + /** + * Resizes and moves the view to the supplied bounds relative to the window. + * + * @experimental + */ + setBounds(bounds: Rectangle): void; + webContents: WebContents; + } + + class BrowserWindow extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/browser-window + + /** + * Emitted when the window is set or unset to show always on top of other windows. + */ + on(event: 'always-on-top-changed', listener: (event: Event, + isAlwaysOnTop: boolean) => void): this; + once(event: 'always-on-top-changed', listener: (event: Event, + isAlwaysOnTop: boolean) => void): this; + addListener(event: 'always-on-top-changed', listener: (event: Event, + isAlwaysOnTop: boolean) => void): this; + removeListener(event: 'always-on-top-changed', listener: (event: Event, + isAlwaysOnTop: boolean) => void): this; + /** + * Emitted when an App Command is invoked. These are typically related to keyboard + * media keys or browser commands, as well as the "Back" button built into some + * mice on Windows. + * + * Commands are lowercased, underscores are replaced with hyphens, and the + * `APPCOMMAND_` prefix is stripped off. e.g. `APPCOMMAND_BROWSER_BACKWARD` is + * emitted as `browser-backward`. + * + * The following app commands are explicitly supported on Linux: + * +* `browser-backward` +* `browser-forward` + * + * @platform win32,linux + */ + on(event: 'app-command', listener: (event: Event, + command: string) => void): this; + once(event: 'app-command', listener: (event: Event, + command: string) => void): this; + addListener(event: 'app-command', listener: (event: Event, + command: string) => void): this; + removeListener(event: 'app-command', listener: (event: Event, + command: string) => void): this; + /** + * Emitted when the window loses focus. + */ + on(event: 'blur', listener: Function): this; + once(event: 'blur', listener: Function): this; + addListener(event: 'blur', listener: Function): this; + removeListener(event: 'blur', listener: Function): this; + /** + * Emitted when the window is going to be closed. It's emitted before the + * `beforeunload` and `unload` event of the DOM. Calling `event.preventDefault()` + * will cancel the close. + * + * Usually you would want to use the `beforeunload` handler to decide whether the + * window should be closed, which will also be called when the window is reloaded. + * In Electron, returning any value other than `undefined` would cancel the close. + * For example: + * + * _**Note**: There is a subtle difference between the behaviors of + * `window.onbeforeunload = handler` and `window.addEventListener('beforeunload', + * handler)`. It is recommended to always set the `event.returnValue` explicitly, + * instead of only returning a value, as the former works more consistently within + * Electron._ + */ + on(event: 'close', listener: (event: Event) => void): this; + once(event: 'close', listener: (event: Event) => void): this; + addListener(event: 'close', listener: (event: Event) => void): this; + removeListener(event: 'close', listener: (event: Event) => void): this; + /** + * Emitted when the window is closed. After you have received this event you should + * remove the reference to the window and avoid using it any more. + */ + on(event: 'closed', listener: Function): this; + once(event: 'closed', listener: Function): this; + addListener(event: 'closed', listener: Function): this; + removeListener(event: 'closed', listener: Function): this; + /** + * Emitted when the window enters a full-screen state. + */ + on(event: 'enter-full-screen', listener: Function): this; + once(event: 'enter-full-screen', listener: Function): this; + addListener(event: 'enter-full-screen', listener: Function): this; + removeListener(event: 'enter-full-screen', listener: Function): this; + /** + * Emitted when the window enters a full-screen state triggered by HTML API. + */ + on(event: 'enter-html-full-screen', listener: Function): this; + once(event: 'enter-html-full-screen', listener: Function): this; + addListener(event: 'enter-html-full-screen', listener: Function): this; + removeListener(event: 'enter-html-full-screen', listener: Function): this; + /** + * Emitted when the window gains focus. + */ + on(event: 'focus', listener: Function): this; + once(event: 'focus', listener: Function): this; + addListener(event: 'focus', listener: Function): this; + removeListener(event: 'focus', listener: Function): this; + /** + * Emitted when the window is hidden. + */ + on(event: 'hide', listener: Function): this; + once(event: 'hide', listener: Function): this; + addListener(event: 'hide', listener: Function): this; + removeListener(event: 'hide', listener: Function): this; + /** + * Emitted when the window leaves a full-screen state. + */ + on(event: 'leave-full-screen', listener: Function): this; + once(event: 'leave-full-screen', listener: Function): this; + addListener(event: 'leave-full-screen', listener: Function): this; + removeListener(event: 'leave-full-screen', listener: Function): this; + /** + * Emitted when the window leaves a full-screen state triggered by HTML API. + */ + on(event: 'leave-html-full-screen', listener: Function): this; + once(event: 'leave-html-full-screen', listener: Function): this; + addListener(event: 'leave-html-full-screen', listener: Function): this; + removeListener(event: 'leave-html-full-screen', listener: Function): this; + /** + * Emitted when window is maximized. + */ + on(event: 'maximize', listener: Function): this; + once(event: 'maximize', listener: Function): this; + addListener(event: 'maximize', listener: Function): this; + removeListener(event: 'maximize', listener: Function): this; + /** + * Emitted when the window is minimized. + */ + on(event: 'minimize', listener: Function): this; + once(event: 'minimize', listener: Function): this; + addListener(event: 'minimize', listener: Function): this; + removeListener(event: 'minimize', listener: Function): this; + /** + * Emitted when the window is being moved to a new position. + */ + on(event: 'move', listener: Function): this; + once(event: 'move', listener: Function): this; + addListener(event: 'move', listener: Function): this; + removeListener(event: 'move', listener: Function): this; + /** + * Emitted once when the window is moved to a new position. + * +__Note__: On macOS this event is an alias of `move`. + * + * @platform darwin,win32 + */ + on(event: 'moved', listener: Function): this; + once(event: 'moved', listener: Function): this; + addListener(event: 'moved', listener: Function): this; + removeListener(event: 'moved', listener: Function): this; + /** + * Emitted when the native new tab button is clicked. + * + * @platform darwin + */ + on(event: 'new-window-for-tab', listener: Function): this; + once(event: 'new-window-for-tab', listener: Function): this; + addListener(event: 'new-window-for-tab', listener: Function): this; + removeListener(event: 'new-window-for-tab', listener: Function): this; + /** + * Emitted when the document changed its title, calling `event.preventDefault()` + * will prevent the native window's title from changing. `explicitSet` is false + * when title is synthesized from file URL. + */ + on(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + once(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + addListener(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + removeListener(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + /** + * Emitted when the web page has been rendered (while not being shown) and window + * can be displayed without a visual flash. + * + * Please note that using this event implies that the renderer will be considered + * "visible" and paint even though `show` is false. This event will never fire if + * you use `paintWhenInitiallyHidden: false` + */ + on(event: 'ready-to-show', listener: Function): this; + once(event: 'ready-to-show', listener: Function): this; + addListener(event: 'ready-to-show', listener: Function): this; + removeListener(event: 'ready-to-show', listener: Function): this; + /** + * Emitted after the window has been resized. + */ + on(event: 'resize', listener: Function): this; + once(event: 'resize', listener: Function): this; + addListener(event: 'resize', listener: Function): this; + removeListener(event: 'resize', listener: Function): this; + /** + * Emitted once when the window has finished being resized. + * + * This is usually emitted when the window has been resized manually. On macOS, + * resizing the window with `setBounds`/`setSize` and setting the `animate` + * parameter to `true` will also emit this event once resizing has finished. + * + * @platform darwin,win32 + */ + on(event: 'resized', listener: Function): this; + once(event: 'resized', listener: Function): this; + addListener(event: 'resized', listener: Function): this; + removeListener(event: 'resized', listener: Function): this; + /** + * Emitted when the unresponsive web page becomes responsive again. + */ + on(event: 'responsive', listener: Function): this; + once(event: 'responsive', listener: Function): this; + addListener(event: 'responsive', listener: Function): this; + removeListener(event: 'responsive', listener: Function): this; + /** + * Emitted when the window is restored from a minimized state. + */ + on(event: 'restore', listener: Function): this; + once(event: 'restore', listener: Function): this; + addListener(event: 'restore', listener: Function): this; + removeListener(event: 'restore', listener: Function): this; + /** + * Emitted on trackpad rotation gesture. Continually emitted until rotation gesture + * is ended. The `rotation` value on each emission is the angle in degrees rotated + * since the last emission. The last emitted event upon a rotation gesture will + * always be of value `0`. Counter-clockwise rotation values are positive, while + * clockwise ones are negative. + * + * @platform darwin + */ + on(event: 'rotate-gesture', listener: (event: Event, + rotation: number) => void): this; + once(event: 'rotate-gesture', listener: (event: Event, + rotation: number) => void): this; + addListener(event: 'rotate-gesture', listener: (event: Event, + rotation: number) => void): this; + removeListener(event: 'rotate-gesture', listener: (event: Event, + rotation: number) => void): this; + /** + * Emitted when scroll wheel event phase has begun. + * + * @platform darwin + */ + on(event: 'scroll-touch-begin', listener: Function): this; + once(event: 'scroll-touch-begin', listener: Function): this; + addListener(event: 'scroll-touch-begin', listener: Function): this; + removeListener(event: 'scroll-touch-begin', listener: Function): this; + /** + * Emitted when scroll wheel event phase filed upon reaching the edge of element. + * + * @platform darwin + */ + on(event: 'scroll-touch-edge', listener: Function): this; + once(event: 'scroll-touch-edge', listener: Function): this; + addListener(event: 'scroll-touch-edge', listener: Function): this; + removeListener(event: 'scroll-touch-edge', listener: Function): this; + /** + * Emitted when scroll wheel event phase has ended. + * + * @platform darwin + */ + on(event: 'scroll-touch-end', listener: Function): this; + once(event: 'scroll-touch-end', listener: Function): this; + addListener(event: 'scroll-touch-end', listener: Function): this; + removeListener(event: 'scroll-touch-end', listener: Function): this; + /** + * Emitted when window session is going to end due to force shutdown or machine + * restart or session log off. + * + * @platform win32 + */ + on(event: 'session-end', listener: Function): this; + once(event: 'session-end', listener: Function): this; + addListener(event: 'session-end', listener: Function): this; + removeListener(event: 'session-end', listener: Function): this; + /** + * Emitted when the window opens a sheet. + * + * @platform darwin + */ + on(event: 'sheet-begin', listener: Function): this; + once(event: 'sheet-begin', listener: Function): this; + addListener(event: 'sheet-begin', listener: Function): this; + removeListener(event: 'sheet-begin', listener: Function): this; + /** + * Emitted when the window has closed a sheet. + * + * @platform darwin + */ + on(event: 'sheet-end', listener: Function): this; + once(event: 'sheet-end', listener: Function): this; + addListener(event: 'sheet-end', listener: Function): this; + removeListener(event: 'sheet-end', listener: Function): this; + /** + * Emitted when the window is shown. + */ + on(event: 'show', listener: Function): this; + once(event: 'show', listener: Function): this; + addListener(event: 'show', listener: Function): this; + removeListener(event: 'show', listener: Function): this; + /** + * Emitted on 3-finger swipe. Possible directions are `up`, `right`, `down`, + * `left`. + * + * The method underlying this event is built to handle older macOS-style trackpad + * swiping, where the content on the screen doesn't move with the swipe. Most macOS + * trackpads are not configured to allow this kind of swiping anymore, so in order + * for it to emit properly the 'Swipe between pages' preference in `System + * Preferences > Trackpad > More Gestures` must be set to 'Swipe with two or three + * fingers'. + * + * @platform darwin + */ + on(event: 'swipe', listener: (event: Event, + direction: string) => void): this; + once(event: 'swipe', listener: (event: Event, + direction: string) => void): this; + addListener(event: 'swipe', listener: (event: Event, + direction: string) => void): this; + removeListener(event: 'swipe', listener: (event: Event, + direction: string) => void): this; + /** + * Emitted when the system context menu is triggered on the window, this is + * normally only triggered when the user right clicks on the non-client area of + * your window. This is the window titlebar or any area you have declared as + * `-webkit-app-region: drag` in a frameless window. + * +Calling `event.preventDefault()` will prevent the menu from being displayed. + * + * @platform win32 + */ + on(event: 'system-context-menu', listener: (event: Event, + /** + * The screen coordinates the context menu was triggered at + */ + point: Point) => void): this; + once(event: 'system-context-menu', listener: (event: Event, + /** + * The screen coordinates the context menu was triggered at + */ + point: Point) => void): this; + addListener(event: 'system-context-menu', listener: (event: Event, + /** + * The screen coordinates the context menu was triggered at + */ + point: Point) => void): this; + removeListener(event: 'system-context-menu', listener: (event: Event, + /** + * The screen coordinates the context menu was triggered at + */ + point: Point) => void): this; + /** + * Emitted when the window exits from a maximized state. + */ + on(event: 'unmaximize', listener: Function): this; + once(event: 'unmaximize', listener: Function): this; + addListener(event: 'unmaximize', listener: Function): this; + removeListener(event: 'unmaximize', listener: Function): this; + /** + * Emitted when the web page becomes unresponsive. + */ + on(event: 'unresponsive', listener: Function): this; + once(event: 'unresponsive', listener: Function): this; + addListener(event: 'unresponsive', listener: Function): this; + removeListener(event: 'unresponsive', listener: Function): this; + /** + * Emitted before the window is moved. On Windows, calling `event.preventDefault()` + * will prevent the window from being moved. + * + * Note that this is only emitted when the window is being resized manually. + * Resizing the window with `setBounds`/`setSize` will not emit this event. + * + * @platform darwin,win32 + */ + on(event: 'will-move', listener: (event: Event, + /** + * Location the window is being moved to. + */ + newBounds: Rectangle) => void): this; + once(event: 'will-move', listener: (event: Event, + /** + * Location the window is being moved to. + */ + newBounds: Rectangle) => void): this; + addListener(event: 'will-move', listener: (event: Event, + /** + * Location the window is being moved to. + */ + newBounds: Rectangle) => void): this; + removeListener(event: 'will-move', listener: (event: Event, + /** + * Location the window is being moved to. + */ + newBounds: Rectangle) => void): this; + /** + * Emitted before the window is resized. Calling `event.preventDefault()` will + * prevent the window from being resized. + * + * Note that this is only emitted when the window is being resized manually. + * Resizing the window with `setBounds`/`setSize` will not emit this event. + * + * @platform darwin,win32 + */ + on(event: 'will-resize', listener: (event: Event, + /** + * Size the window is being resized to. + */ + newBounds: Rectangle) => void): this; + once(event: 'will-resize', listener: (event: Event, + /** + * Size the window is being resized to. + */ + newBounds: Rectangle) => void): this; + addListener(event: 'will-resize', listener: (event: Event, + /** + * Size the window is being resized to. + */ + newBounds: Rectangle) => void): this; + removeListener(event: 'will-resize', listener: (event: Event, + /** + * Size the window is being resized to. + */ + newBounds: Rectangle) => void): this; + /** + * BrowserWindow + */ + constructor(options?: BrowserWindowConstructorOptions); + /** + * The window that owns the given `browserView`. If the given view is not attached + * to any window, returns `null`. + */ + static fromBrowserView(browserView: BrowserView): (BrowserWindow) | (null); + /** + * The window with the given `id`. + */ + static fromId(id: number): (BrowserWindow) | (null); + /** + * The window that owns the given `webContents` or `null` if the contents are not + * owned by a window. + */ + static fromWebContents(webContents: WebContents): (BrowserWindow) | (null); + /** + * An array of all opened browser windows. + */ + static getAllWindows(): BrowserWindow[]; + /** + * The window that is focused in this application, otherwise returns `null`. + */ + static getFocusedWindow(): (BrowserWindow) | (null); + /** + * Replacement API for setBrowserView supporting work with multi browser views. + * + * @experimental + */ + addBrowserView(browserView: BrowserView): void; + /** + * Adds a window as a tab on this window, after the tab for the window instance. + * + * @platform darwin + */ + addTabbedWindow(browserWindow: BrowserWindow): void; + /** + * Removes focus from the window. + */ + blur(): void; + blurWebView(): void; + /** + * Resolves with a NativeImage + * + * Captures a snapshot of the page within `rect`. Omitting `rect` will capture the + * whole visible page. If the page is not visible, `rect` may be empty. + */ + capturePage(rect?: Rectangle): Promise; + /** + * Moves window to the center of the screen. + */ + center(): void; + /** + * Try to close the window. This has the same effect as a user manually clicking + * the close button of the window. The web page may cancel the close though. See + * the close event. + */ + close(): void; + /** + * Closes the currently open Quick Look panel. + * + * @platform darwin + */ + closeFilePreview(): void; + /** + * Force closing the window, the `unload` and `beforeunload` event won't be emitted + * for the web page, and `close` event will also not be emitted for this window, + * but it guarantees the `closed` event will be emitted. + */ + destroy(): void; + /** + * Starts or stops flashing the window to attract user's attention. + */ + flashFrame(flag: boolean): void; + /** + * Focuses on the window. + */ + focus(): void; + focusOnWebView(): void; + /** + * Gets the background color of the window. See Setting `backgroundColor`. + */ + getBackgroundColor(): string; + /** + * The `bounds` of the window as `Object`. + */ + getBounds(): Rectangle; + /** + * The `BrowserView` attached to `win`. Returns `null` if one is not attached. + * Throws an error if multiple `BrowserView`s are attached. + * + * @experimental + */ + getBrowserView(): (BrowserView) | (null); + /** + * an array of all BrowserViews that have been attached with `addBrowserView` or + * `setBrowserView`. + * + * **Note:** The BrowserView API is currently experimental and may change or be + * removed in future Electron releases. + * + * @experimental + */ + getBrowserViews(): BrowserView[]; + /** + * All child windows. + */ + getChildWindows(): BrowserWindow[]; + /** + * The `bounds` of the window's client area as `Object`. + */ + getContentBounds(): Rectangle; + /** + * Contains the window's client area's width and height. + */ + getContentSize(): number[]; + /** + * Contains the window's maximum width and height. + */ + getMaximumSize(): number[]; + /** + * Window id in the format of DesktopCapturerSource's id. For example + * "window:1324:0". + * + * More precisely the format is `window:id:other_id` where `id` is `HWND` on + * Windows, `CGWindowID` (`uint64_t`) on macOS and `Window` (`unsigned long`) on + * Linux. `other_id` is used to identify web contents (tabs) so within the same top + * level window. + */ + getMediaSourceId(): string; + /** + * Contains the window's minimum width and height. + */ + getMinimumSize(): number[]; + /** + * The platform-specific handle of the window. + * + * The native type of the handle is `HWND` on Windows, `NSView*` on macOS, and + * `Window` (`unsigned long`) on Linux. + */ + getNativeWindowHandle(): Buffer; + /** + * Contains the window bounds of the normal state + * + * **Note:** whatever the current state of the window : maximized, minimized or in + * fullscreen, this function always returns the position and size of the window in + * normal state. In normal state, getBounds and getNormalBounds returns the same + * `Rectangle`. + */ + getNormalBounds(): Rectangle; + /** + * between 0.0 (fully transparent) and 1.0 (fully opaque). On Linux, always returns + * 1. + */ + getOpacity(): number; + /** + * The parent window. + */ + getParentWindow(): BrowserWindow; + /** + * Contains the window's current position. + */ + getPosition(): number[]; + /** + * The pathname of the file the window represents. + * + * @platform darwin + */ + getRepresentedFilename(): string; + /** + * Contains the window's width and height. + */ + getSize(): number[]; + /** + * The title of the native window. + * + * **Note:** The title of the web page can be different from the title of the + * native window. + */ + getTitle(): string; + /** + * The custom position for the traffic light buttons in frameless window. + * + * @platform darwin + */ + getTrafficLightPosition(): Point; + /** + * Whether the window has a shadow. + */ + hasShadow(): boolean; + /** + * Hides the window. + */ + hide(): void; + /** + * Hooks a windows message. The `callback` is called when the message is received + * in the WndProc. + * + * @platform win32 + */ + hookWindowMessage(message: number, callback: (wParam: any, lParam: any) => void): void; + /** + * Whether the window is always on top of other windows. + */ + isAlwaysOnTop(): boolean; + /** + * Whether the window can be manually closed by user. + * +On Linux always returns `true`. + * + * @platform darwin,win32 + */ + isClosable(): boolean; + /** + * Whether the window is destroyed. + */ + isDestroyed(): boolean; + /** + * Whether the window's document has been edited. + * + * @platform darwin + */ + isDocumentEdited(): boolean; + /** + * whether the window is enabled. + */ + isEnabled(): boolean; + /** + * Whether the window is focused. + */ + isFocused(): boolean; + /** + * Whether the window is in fullscreen mode. + */ + isFullScreen(): boolean; + /** + * Whether the maximize/zoom window button toggles fullscreen mode or maximizes the + * window. + */ + isFullScreenable(): boolean; + /** + * Whether the window is in kiosk mode. + */ + isKiosk(): boolean; + /** + * Whether the window can be manually maximized by user. + * +On Linux always returns `true`. + * + * @platform darwin,win32 + */ + isMaximizable(): boolean; + /** + * Whether the window is maximized. + */ + isMaximized(): boolean; + /** + * Whether menu bar automatically hides itself. + */ + isMenuBarAutoHide(): boolean; + /** + * Whether the menu bar is visible. + */ + isMenuBarVisible(): boolean; + /** + * Whether the window can be manually minimized by the user. + * +On Linux always returns `true`. + * + * @platform darwin,win32 + */ + isMinimizable(): boolean; + /** + * Whether the window is minimized. + */ + isMinimized(): boolean; + /** + * Whether current window is a modal window. + */ + isModal(): boolean; + /** + * Whether the window can be moved by user. + +On Linux always returns `true`. + * + * @platform darwin,win32 + */ + isMovable(): boolean; + /** + * Whether the window is in normal state (not maximized, not minimized, not in + * fullscreen mode). + */ + isNormal(): boolean; + /** + * Whether the window can be manually resized by the user. + */ + isResizable(): boolean; + /** + * Whether the window is in simple (pre-Lion) fullscreen mode. + * + * @platform darwin + */ + isSimpleFullScreen(): boolean; + /** + * Whether the window is in Windows 10 tablet mode. + * + * Since Windows 10 users can use their PC as tablet, under this mode apps can + * choose to optimize their UI for tablets, such as enlarging the titlebar and + * hiding titlebar buttons. + * + * This API returns whether the window is in tablet mode, and the `resize` event + * can be be used to listen to changes to tablet mode. + * + * @platform win32 + */ + isTabletMode(): boolean; + /** + * Whether the window is visible to the user. + */ + isVisible(): boolean; + /** + * Whether the window is visible on all workspaces. + * +**Note:** This API always returns false on Windows. + */ + isVisibleOnAllWorkspaces(): boolean; + /** + * `true` or `false` depending on whether the message is hooked. + * + * @platform win32 + */ + isWindowMessageHooked(message: number): boolean; + /** + * the promise will resolve when the page has finished loading (see + * `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`). + * + * Same as `webContents.loadFile`, `filePath` should be a path to an HTML file + * relative to the root of your application. See the `webContents` docs for more + * information. + */ + loadFile(filePath: string, options?: LoadFileOptions): Promise; + /** + * the promise will resolve when the page has finished loading (see + * `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`). + * + * Same as `webContents.loadURL(url[, options])`. + * + * The `url` can be a remote address (e.g. `http://`) or a path to a local HTML + * file using the `file://` protocol. + * + * To ensure that file URLs are properly formatted, it is recommended to use Node's + * `url.format` method: + * + * You can load a URL using a `POST` request with URL-encoded data by doing the + * following: + */ + loadURL(url: string, options?: LoadURLOptions): Promise; + /** + * Maximizes the window. This will also show (but not focus) the window if it isn't + * being displayed already. + */ + maximize(): void; + /** + * Merges all windows into one window with multiple tabs when native tabs are + * enabled and there is more than one open window. + * + * @platform darwin + */ + mergeAllWindows(): void; + /** + * Minimizes the window. On some platforms the minimized window will be shown in + * the Dock. + */ + minimize(): void; + /** + * Moves window above the source window in the sense of z-order. If the + * `mediaSourceId` is not of type window or if the window does not exist then this + * method throws an error. + */ + moveAbove(mediaSourceId: string): void; + /** + * Moves the current tab into a new window if native tabs are enabled and there is + * more than one tab in the current window. + * + * @platform darwin + */ + moveTabToNewWindow(): void; + /** + * Moves window to top(z-order) regardless of focus + */ + moveTop(): void; + /** + * Uses Quick Look to preview a file at a given path. + * + * @platform darwin + */ + previewFile(path: string, displayName?: string): void; + /** + * Same as `webContents.reload`. + */ + reload(): void; + removeBrowserView(browserView: BrowserView): void; + /** + * Remove the window's menu bar. + * + * @platform linux,win32 + */ + removeMenu(): void; + /** + * Restores the window from minimized state to its previous state. + */ + restore(): void; + /** + * Selects the next tab when native tabs are enabled and there are other tabs in + * the window. + * + * @platform darwin + */ + selectNextTab(): void; + /** + * Selects the previous tab when native tabs are enabled and there are other tabs + * in the window. + * + * @platform darwin + */ + selectPreviousTab(): void; + /** + * Sets whether the window should show always on top of other windows. After + * setting this, the window is still a normal window, not a toolbox window which + * can not be focused on. + */ + setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void; + /** + * Sets the properties for the window's taskbar button. + * + * **Note:** `relaunchCommand` and `relaunchDisplayName` must always be set + * together. If one of those properties is not set, then neither will be used. + * + * @platform win32 + */ + setAppDetails(options: AppDetailsOptions): void; + /** + * This will make a window maintain an aspect ratio. The extra size allows a + * developer to have space, specified in pixels, not included within the aspect + * ratio calculations. This API already takes into account the difference between a + * window's size and its content size. + * + * Consider a normal window with an HD video player and associated controls. + * Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls + * on the right edge and 50 pixels of controls below the player. In order to + * maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within + * the player itself we would call this function with arguments of 16/9 and { + * width: 40, height: 50 }. The second argument doesn't care where the extra width + * and height are within the content view--only that they exist. Sum any extra + * width and height areas you have within the overall content view. + * + * The aspect ratio is not respected when window is resized programmingly with APIs + * like `win.setSize`. + */ + setAspectRatio(aspectRatio: number, extraSize?: Size): void; + /** + * Controls whether to hide cursor when typing. + * + * @platform darwin + */ + setAutoHideCursor(autoHide: boolean): void; + /** + * Sets whether the window menu bar should hide itself automatically. Once set the + * menu bar will only show when users press the single `Alt` key. + * + * If the menu bar is already visible, calling `setAutoHideMenuBar(true)` won't + * hide it immediately. + */ + setAutoHideMenuBar(hide: boolean): void; + /** + * Sets the background color of the window. See Setting `backgroundColor`. + */ + setBackgroundColor(backgroundColor: string): void; + /** + * Resizes and moves the window to the supplied bounds. Any properties that are not + * supplied will default to their current values. + */ + setBounds(bounds: Partial, animate?: boolean): void; + setBrowserView(browserView: (BrowserView) | (null)): void; + /** + * Sets whether the window can be manually closed by user. On Linux does nothing. + * + * @platform darwin,win32 + */ + setClosable(closable: boolean): void; + /** + * Resizes and moves the window's client area (e.g. the web page) to the supplied + * bounds. + */ + setContentBounds(bounds: Rectangle, animate?: boolean): void; + /** + * Prevents the window contents from being captured by other apps. + * + * On macOS it sets the NSWindow's sharingType to NSWindowSharingNone. On Windows + * it calls SetWindowDisplayAffinity with `WDA_EXCLUDEFROMCAPTURE`. For Windows 10 + * version 2004 and up the window will be removed from capture entirely, older + * Windows versions behave as if `WDA_MONITOR` is applied capturing a black window. + * + * @platform darwin,win32 + */ + setContentProtection(enable: boolean): void; + /** + * Resizes the window's client area (e.g. the web page) to `width` and `height`. + */ + setContentSize(width: number, height: number, animate?: boolean): void; + /** + * Specifies whether the window’s document has been edited, and the icon in title + * bar will become gray when set to `true`. + * + * @platform darwin + */ + setDocumentEdited(edited: boolean): void; + /** + * Disable or enable the window. + */ + setEnabled(enable: boolean): void; + /** + * Changes whether the window can be focused. + * +On macOS it does not remove the focus from the window. + * + * @platform darwin,win32 + */ + setFocusable(focusable: boolean): void; + /** + * Sets whether the window should be in fullscreen mode. + */ + setFullScreen(flag: boolean): void; + /** + * Sets whether the maximize/zoom window button toggles fullscreen mode or + * maximizes the window. + */ + setFullScreenable(fullscreenable: boolean): void; + /** + * Sets whether the window should have a shadow. + */ + setHasShadow(hasShadow: boolean): void; + /** + * Changes window icon. + * + * @platform win32,linux + */ + setIcon(icon: (NativeImage) | (string)): void; + /** + * Makes the window ignore all mouse events. + * + * All mouse events happened in this window will be passed to the window below this + * window, but if this window has focus, it will still receive keyboard events. + */ + setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void; + /** + * Enters or leaves kiosk mode. + */ + setKiosk(flag: boolean): void; + /** + * Sets whether the window can be manually maximized by user. On Linux does + * nothing. + * + * @platform darwin,win32 + */ + setMaximizable(maximizable: boolean): void; + /** + * Sets the maximum size of window to `width` and `height`. + */ + setMaximumSize(width: number, height: number): void; + /** + * Sets the `menu` as the window's menu bar. + * + * @platform linux,win32 + */ + setMenu(menu: (Menu) | (null)): void; + /** + * Sets whether the menu bar should be visible. If the menu bar is auto-hide, users + * can still bring up the menu bar by pressing the single `Alt` key. + * + * @platform win32,linux + */ + setMenuBarVisibility(visible: boolean): void; + /** + * Sets whether the window can be manually minimized by user. On Linux does + * nothing. + * + * @platform darwin,win32 + */ + setMinimizable(minimizable: boolean): void; + /** + * Sets the minimum size of window to `width` and `height`. + */ + setMinimumSize(width: number, height: number): void; + /** + * Sets whether the window can be moved by user. On Linux does nothing. + * + * @platform darwin,win32 + */ + setMovable(movable: boolean): void; + /** + * Sets the opacity of the window. On Linux, does nothing. Out of bound number + * values are clamped to the [0, 1] range. + * + * @platform win32,darwin + */ + setOpacity(opacity: number): void; + /** + * Sets a 16 x 16 pixel overlay onto the current taskbar icon, usually used to + * convey some sort of application status or to passively notify the user. + * + * @platform win32 + */ + setOverlayIcon(overlay: (NativeImage) | (null), description: string): void; + /** + * Sets `parent` as current window's parent window, passing `null` will turn + * current window into a top-level window. + */ + setParentWindow(parent: (BrowserWindow) | (null)): void; + /** + * Moves window to `x` and `y`. + */ + setPosition(x: number, y: number, animate?: boolean): void; + /** + * Sets progress value in progress bar. Valid range is [0, 1.0]. + * + * Remove progress bar when progress < 0; Change to indeterminate mode when + * progress > 1. + * + * On Linux platform, only supports Unity desktop environment, you need to specify + * the `*.desktop` file name to `desktopName` field in `package.json`. By default, + * it will assume `{app.name}.desktop`. + * + * On Windows, a mode can be passed. Accepted values are `none`, `normal`, + * `indeterminate`, `error`, and `paused`. If you call `setProgressBar` without a + * mode set (but with a value within the valid range), `normal` will be assumed. + */ + setProgressBar(progress: number, options?: ProgressBarOptions): void; + /** + * Sets the pathname of the file the window represents, and the icon of the file + * will show in window's title bar. + * + * @platform darwin + */ + setRepresentedFilename(filename: string): void; + /** + * Sets whether the window can be manually resized by the user. + */ + setResizable(resizable: boolean): void; + /** + * Setting a window shape determines the area within the window where the system + * permits drawing and user interaction. Outside of the given region, no pixels + * will be drawn and no mouse events will be registered. Mouse events outside of + * the region will not be received by that window, but will fall through to + * whatever is behind the window. + * + * @experimental + * @platform win32,linux + */ + setShape(rects: Rectangle[]): void; + /** + * Changes the attachment point for sheets on macOS. By default, sheets are + * attached just below the window frame, but you may want to display them beneath a + * HTML-rendered toolbar. For example: + * + * @platform darwin + */ + setSheetOffset(offsetY: number, offsetX?: number): void; + /** + * Enters or leaves simple fullscreen mode. + * + * Simple fullscreen mode emulates the native fullscreen behavior found in versions + * of macOS prior to Lion (10.7). + * + * @platform darwin + */ + setSimpleFullScreen(flag: boolean): void; + /** + * Resizes the window to `width` and `height`. If `width` or `height` are below any + * set minimum size constraints the window will snap to its minimum size. + */ + setSize(width: number, height: number, animate?: boolean): void; + /** + * Makes the window not show in the taskbar. + */ + setSkipTaskbar(skip: boolean): void; + /** + * Whether the buttons were added successfully + * + * Add a thumbnail toolbar with a specified set of buttons to the thumbnail image + * of a window in a taskbar button layout. Returns a `Boolean` object indicates + * whether the thumbnail has been added successfully. + * + * The number of buttons in thumbnail toolbar should be no greater than 7 due to + * the limited room. Once you setup the thumbnail toolbar, the toolbar cannot be + * removed due to the platform's limitation. But you can call the API with an empty + * array to clean the buttons. + * + * The `buttons` is an array of `Button` objects: + * + * * `Button` Object + * * `icon` NativeImage - The icon showing in thumbnail toolbar. + * * `click` Function + * * `tooltip` String (optional) - The text of the button's tooltip. + * * `flags` String[] (optional) - Control specific states and behaviors of the + * button. By default, it is `['enabled']`. + * + * The `flags` is an array that can include following `String`s: + * + * * `enabled` - The button is active and available to the user. + * * `disabled` - The button is disabled. It is present, but has a visual state + * indicating it will not respond to user action. + * * `dismissonclick` - When the button is clicked, the thumbnail window closes + * immediately. + * * `nobackground` - Do not draw a button border, use only the image. + * * `hidden` - The button is not shown to the user. + * * `noninteractive` - The button is enabled but not interactive; no pressed + * button state is drawn. This value is intended for instances where the button is + * used in a notification. + * + * @platform win32 + */ + setThumbarButtons(buttons: ThumbarButton[]): boolean; + /** + * Sets the region of the window to show as the thumbnail image displayed when + * hovering over the window in the taskbar. You can reset the thumbnail to be the + * entire window by specifying an empty region: `{ x: 0, y: 0, width: 0, height: 0 + * }`. + * + * @platform win32 + */ + setThumbnailClip(region: Rectangle): void; + /** + * Sets the toolTip that is displayed when hovering over the window thumbnail in + * the taskbar. + * + * @platform win32 + */ + setThumbnailToolTip(toolTip: string): void; + /** + * Changes the title of native window to `title`. + */ + setTitle(title: string): void; + /** + * Raises `browserView` above other `BrowserView`s attached to `win`. Throws an + * error if `browserView` is not attached to `win`. + * + * @experimental + */ + setTopBrowserView(browserView: BrowserView): void; + /** + * Sets the touchBar layout for the current window. Specifying `null` or + * `undefined` clears the touch bar. This method only has an effect if the machine + * has a touch bar and is running on macOS 10.12.1+. + * + * **Note:** The TouchBar API is currently experimental and may change or be + * removed in future Electron releases. + * + * @platform darwin + */ + setTouchBar(touchBar: (TouchBar) | (null)): void; + /** + * Set a custom position for the traffic light buttons in frameless window. + * + * @platform darwin + */ + setTrafficLightPosition(position: Point): void; + /** + * Adds a vibrancy effect to the browser window. Passing `null` or an empty string + * will remove the vibrancy effect on the window. + * + * Note that `appearance-based`, `light`, `dark`, `medium-light`, and `ultra-dark` + * have been deprecated and will be removed in an upcoming version of macOS. + * + * @platform darwin + */ + setVibrancy(type: (('appearance-based' | 'light' | 'dark' | 'titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'medium-light' | 'ultra-dark' | 'header' | 'sheet' | 'window' | 'hud' | 'fullscreen-ui' | 'tooltip' | 'content' | 'under-window' | 'under-page')) | (null)): void; + /** + * Sets whether the window should be visible on all workspaces. + * +**Note:** This API does nothing on Windows. + */ + setVisibleOnAllWorkspaces(visible: boolean, options?: VisibleOnAllWorkspacesOptions): void; + /** + * Sets whether the window traffic light buttons should be visible. + * + * @platform darwin + */ + setWindowButtonVisibility(visible: boolean): void; + /** + * Shows and gives focus to the window. + */ + show(): void; + /** + * Same as `webContents.showDefinitionForSelection()`. + * + * @platform darwin + */ + showDefinitionForSelection(): void; + /** + * Shows the window but doesn't focus on it. + */ + showInactive(): void; + /** + * Toggles the visibility of the tab bar if native tabs are enabled and there is + * only one tab in the current window. + * + * @platform darwin + */ + toggleTabBar(): void; + /** + * Unhooks all of the window messages. + * + * @platform win32 + */ + unhookAllWindowMessages(): void; + /** + * Unhook the window message. + * + * @platform win32 + */ + unhookWindowMessage(message: number): void; + /** + * Unmaximizes the window. + */ + unmaximize(): void; + accessibleTitle: string; + autoHideMenuBar: boolean; + closable: boolean; + documentEdited: boolean; + excludedFromShownWindowsMenu: boolean; + fullScreen: boolean; + fullScreenable: boolean; + readonly id: number; + kiosk: boolean; + maximizable: boolean; + menuBarVisible: boolean; + minimizable: boolean; + movable: boolean; + representedFilename: string; + resizable: boolean; + shadow: boolean; + simpleFullScreen: boolean; + title: string; + visibleOnAllWorkspaces: boolean; + readonly webContents: WebContents; + } + + class BrowserWindowProxy { + + // Docs: https://electronjs.org/docs/api/browser-window-proxy + + /** + * Removes focus from the child window. + */ + blur(): void; + /** + * Forcefully closes the child window without calling its unload event. + */ + close(): void; + /** + * Evaluates the code in the child window. + */ + eval(code: string): void; + /** + * Focuses the child window (brings the window to front). + */ + focus(): void; + /** + * Sends a message to the child window with the specified origin or `*` for no + * origin preference. + * + * In addition to these methods, the child window implements `window.opener` object + * with no properties and a single method. + */ + postMessage(message: any, targetOrigin: string): void; + /** + * Invokes the print dialog on the child window. + */ + print(): void; + closed: boolean; + } + + interface Certificate { + + // Docs: https://electronjs.org/docs/api/structures/certificate + + /** + * PEM encoded data + */ + data: string; + /** + * Fingerprint of the certificate + */ + fingerprint: string; + /** + * Issuer principal + */ + issuer: CertificatePrincipal; + /** + * Issuer certificate (if not self-signed) + */ + issuerCert: Certificate; + /** + * Issuer's Common Name + */ + issuerName: string; + /** + * Hex value represented string + */ + serialNumber: string; + /** + * Subject principal + */ + subject: CertificatePrincipal; + /** + * Subject's Common Name + */ + subjectName: string; + /** + * End date of the certificate being valid in seconds + */ + validExpiry: number; + /** + * Start date of the certificate being valid in seconds + */ + validStart: number; + } + + interface CertificatePrincipal { + + // Docs: https://electronjs.org/docs/api/structures/certificate-principal + + /** + * Common Name. + */ + commonName: string; + /** + * Country or region. + */ + country: string; + /** + * Locality. + */ + locality: string; + /** + * Organization names. + */ + organizations: string[]; + /** + * Organization Unit names. + */ + organizationUnits: string[]; + /** + * State or province. + */ + state: string; + } + + class ClientRequest extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/client-request + + /** + * Emitted when the `request` is aborted. The `abort` event will not be fired if + * the `request` is already closed. + */ + on(event: 'abort', listener: Function): this; + once(event: 'abort', listener: Function): this; + addListener(event: 'abort', listener: Function): this; + removeListener(event: 'abort', listener: Function): this; + /** + * Emitted as the last event in the HTTP request-response transaction. The `close` + * event indicates that no more events will be emitted on either the `request` or + * `response` objects. + */ + on(event: 'close', listener: Function): this; + once(event: 'close', listener: Function): this; + addListener(event: 'close', listener: Function): this; + removeListener(event: 'close', listener: Function): this; + /** + * Emitted when the `net` module fails to issue a network request. Typically when + * the `request` object emits an `error` event, a `close` event will subsequently + * follow and no response object will be provided. + */ + on(event: 'error', listener: ( + /** + * an error object providing some information about the failure. + */ + error: Error) => void): this; + once(event: 'error', listener: ( + /** + * an error object providing some information about the failure. + */ + error: Error) => void): this; + addListener(event: 'error', listener: ( + /** + * an error object providing some information about the failure. + */ + error: Error) => void): this; + removeListener(event: 'error', listener: ( + /** + * an error object providing some information about the failure. + */ + error: Error) => void): this; + /** + * Emitted just after the last chunk of the `request`'s data has been written into + * the `request` object. + */ + on(event: 'finish', listener: Function): this; + once(event: 'finish', listener: Function): this; + addListener(event: 'finish', listener: Function): this; + removeListener(event: 'finish', listener: Function): this; + /** + * Emitted when an authenticating proxy is asking for user credentials. + * + * The `callback` function is expected to be called back with user credentials: + * + * * `username` String + * * `password` String + * + * Providing empty credentials will cancel the request and report an authentication + * error on the response object: + */ + on(event: 'login', listener: (authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + once(event: 'login', listener: (authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + addListener(event: 'login', listener: (authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + removeListener(event: 'login', listener: (authInfo: AuthInfo, + callback: (username?: string, password?: string) => void) => void): this; + /** + * Emitted when the server returns a redirect response (e.g. 301 Moved + * Permanently). Calling `request.followRedirect` will continue with the + * redirection. If this event is handled, `request.followRedirect` must be called + * **synchronously**, otherwise the request will be cancelled. + */ + on(event: 'redirect', listener: (statusCode: number, + method: string, + redirectUrl: string, + responseHeaders: Record) => void): this; + once(event: 'redirect', listener: (statusCode: number, + method: string, + redirectUrl: string, + responseHeaders: Record) => void): this; + addListener(event: 'redirect', listener: (statusCode: number, + method: string, + redirectUrl: string, + responseHeaders: Record) => void): this; + removeListener(event: 'redirect', listener: (statusCode: number, + method: string, + redirectUrl: string, + responseHeaders: Record) => void): this; + on(event: 'response', listener: ( + /** + * An object representing the HTTP response message. + */ + response: IncomingMessage) => void): this; + once(event: 'response', listener: ( + /** + * An object representing the HTTP response message. + */ + response: IncomingMessage) => void): this; + addListener(event: 'response', listener: ( + /** + * An object representing the HTTP response message. + */ + response: IncomingMessage) => void): this; + removeListener(event: 'response', listener: ( + /** + * An object representing the HTTP response message. + */ + response: IncomingMessage) => void): this; + /** + * ClientRequest + */ + constructor(options: (ClientRequestConstructorOptions) | (string)); + /** + * Cancels an ongoing HTTP transaction. If the request has already emitted the + * `close` event, the abort operation will have no effect. Otherwise an ongoing + * event will emit `abort` and `close` events. Additionally, if there is an ongoing + * response object,it will emit the `aborted` event. + */ + abort(): void; + /** + * Sends the last chunk of the request data. Subsequent write or end operations + * will not be allowed. The `finish` event is emitted just after the end operation. + */ + end(chunk?: (string) | (Buffer), encoding?: string, callback?: () => void): void; + /** + * Continues any pending redirection. Can only be called during a `'redirect'` + * event. + */ + followRedirect(): void; + /** + * The value of a previously set extra header name. + */ + getHeader(name: string): string; + /** + * * `active` Boolean - Whether the request is currently active. If this is false + * no other properties will be set + * * `started` Boolean - Whether the upload has started. If this is false both + * `current` and `total` will be set to 0. + * * `current` Integer - The number of bytes that have been uploaded so far + * * `total` Integer - The number of bytes that will be uploaded this request + * + * You can use this method in conjunction with `POST` requests to get the progress + * of a file upload or other data transfer. + */ + getUploadProgress(): UploadProgress; + /** + * Removes a previously set extra header name. This method can be called only + * before first write. Trying to call it after the first write will throw an error. + */ + removeHeader(name: string): void; + /** + * Adds an extra HTTP header. The header name will be issued as-is without + * lowercasing. It can be called only before first write. Calling this method after + * the first write will throw an error. If the passed value is not a `String`, its + * `toString()` method will be called to obtain the final value. + * + * Certain headers are restricted from being set by apps. These headers are listed + * below. More information on restricted headers can be found in Chromium's header + * utils. + * + * * `Content-Length` + * * `Host` + * * `Trailer` or `Te` + * * `Upgrade` + * * `Cookie2` + * * `Keep-Alive` + * * `Transfer-Encoding` + * + * Additionally, setting the `Connection` header to the value `upgrade` is also + * disallowed. + */ + setHeader(name: string, value: string): void; + /** + * `callback` is essentially a dummy function introduced in the purpose of keeping + * similarity with the Node.js API. It is called asynchronously in the next tick + * after `chunk` content have been delivered to the Chromium networking layer. + * Contrary to the Node.js implementation, it is not guaranteed that `chunk` + * content have been flushed on the wire before `callback` is called. + * + * Adds a chunk of data to the request body. The first write operation may cause + * the request headers to be issued on the wire. After the first write operation, + * it is not allowed to add or remove a custom header. + */ + write(chunk: (string) | (Buffer), encoding?: string, callback?: () => void): void; + chunkedEncoding: boolean; + } + + interface Clipboard { + + // Docs: https://electronjs.org/docs/api/clipboard + + /** + * An array of supported formats for the clipboard `type`. + */ + availableFormats(type?: 'selection' | 'clipboard'): string[]; + /** + * Clears the clipboard content. + */ + clear(type?: 'selection' | 'clipboard'): void; + /** + * Whether the clipboard supports the specified `format`. + * + * @experimental + */ + has(format: string, type?: 'selection' | 'clipboard'): boolean; + /** + * Reads `format` type from the clipboard. + * + * @experimental + */ + read(format: string): string; + /** + * * `title` String + * * `url` String + * + * Returns an Object containing `title` and `url` keys representing the bookmark in + * the clipboard. The `title` and `url` values will be empty strings when the + * bookmark is unavailable. + * + * @platform darwin,win32 + */ + readBookmark(): ReadBookmark; + /** + * Reads `format` type from the clipboard. + * + * @experimental + */ + readBuffer(format: string): Buffer; + /** + * The text on the find pasteboard, which is the pasteboard that holds information + * about the current state of the active application’s find panel. + * + * This method uses synchronous IPC when called from the renderer process. The + * cached value is reread from the find pasteboard whenever the application is + * activated. + * + * @platform darwin + */ + readFindText(): string; + /** + * The content in the clipboard as markup. + */ + readHTML(type?: 'selection' | 'clipboard'): string; + /** + * The image content in the clipboard. + */ + readImage(type?: 'selection' | 'clipboard'): NativeImage; + /** + * The content in the clipboard as RTF. + */ + readRTF(type?: 'selection' | 'clipboard'): string; + /** + * The content in the clipboard as plain text. + */ + readText(type?: 'selection' | 'clipboard'): string; + /** + * Writes `data` to the clipboard. + */ + write(data: Data, type?: 'selection' | 'clipboard'): void; + /** + * Writes the `title` and `url` into the clipboard as a bookmark. + * + * **Note:** Most apps on Windows don't support pasting bookmarks into them so you + * can use `clipboard.write` to write both a bookmark and fallback text to the + * clipboard. + * + * @platform darwin,win32 + */ + writeBookmark(title: string, url: string, type?: 'selection' | 'clipboard'): void; + /** + * Writes the `buffer` into the clipboard as `format`. + * + * @experimental + */ + writeBuffer(format: string, buffer: Buffer, type?: 'selection' | 'clipboard'): void; + /** + * Writes the `text` into the find pasteboard (the pasteboard that holds + * information about the current state of the active application’s find panel) as + * plain text. This method uses synchronous IPC when called from the renderer + * process. + * + * @platform darwin + */ + writeFindText(text: string): void; + /** + * Writes `markup` to the clipboard. + */ + writeHTML(markup: string, type?: 'selection' | 'clipboard'): void; + /** + * Writes `image` to the clipboard. + */ + writeImage(image: NativeImage, type?: 'selection' | 'clipboard'): void; + /** + * Writes the `text` into the clipboard in RTF. + */ + writeRTF(text: string, type?: 'selection' | 'clipboard'): void; + /** + * Writes the `text` into the clipboard as plain text. + */ + writeText(text: string, type?: 'selection' | 'clipboard'): void; + } + + class CommandLine { + + // Docs: https://electronjs.org/docs/api/command-line + + /** + * Append an argument to Chromium's command line. The argument will be quoted + * correctly. Switches will precede arguments regardless of appending order. + * + * If you're appending an argument like `--switch=value`, consider using + * `appendSwitch('switch', 'value')` instead. + * + * **Note:** This will not affect `process.argv`. The intended usage of this + * function is to control Chromium's behavior. + */ + appendArgument(value: string): void; + /** + * Append a switch (with optional `value`) to Chromium's command line. + * + * **Note:** This will not affect `process.argv`. The intended usage of this + * function is to control Chromium's behavior. + */ + appendSwitch(the_switch: string, value?: string): void; + /** + * The command-line switch value. + * + * **Note:** When the switch is not present or has no value, it returns empty + * string. + */ + getSwitchValue(the_switch: string): string; + /** + * Whether the command-line switch is present. + */ + hasSwitch(the_switch: string): boolean; + } + + interface ContentTracing { + + // Docs: https://electronjs.org/docs/api/content-tracing + + /** + * resolves with an array of category groups once all child processes have + * acknowledged the `getCategories` request + * + * Get a set of category groups. The category groups can change as new code paths + * are reached. See also the list of built-in tracing categories. + * + * > **NOTE:** Electron adds a non-default tracing category called `"electron"`. + * This category can be used to capture Electron-specific tracing events. + */ + getCategories(): Promise; + /** + * Resolves with an object containing the `value` and `percentage` of trace buffer + * maximum usage + * + * * `value` Number + * * `percentage` Number + * + * Get the maximum usage across processes of trace buffer as a percentage of the + * full state. + */ + getTraceBufferUsage(): Promise; + /** + * resolved once all child processes have acknowledged the `startRecording` + * request. + * + * Start recording on all processes. + * + * Recording begins immediately locally and asynchronously on child processes as + * soon as they receive the EnableRecording request. + * + * If a recording is already running, the promise will be immediately resolved, as + * only one trace operation can be in progress at a time. + */ + startRecording(options: (TraceConfig) | (TraceCategoriesAndOptions)): Promise; + /** + * resolves with a path to a file that contains the traced data once all child + * processes have acknowledged the `stopRecording` request + * + * Stop recording on all processes. + * + * Child processes typically cache trace data and only rarely flush and send trace + * data back to the main process. This helps to minimize the runtime overhead of + * tracing since sending trace data over IPC can be an expensive operation. So, to + * end tracing, Chromium asynchronously asks all child processes to flush any + * pending trace data. + * + * Trace data will be written into `resultFilePath`. If `resultFilePath` is empty + * or not provided, trace data will be written to a temporary file, and the path + * will be returned in the promise. + */ + stopRecording(resultFilePath?: string): Promise; + } + + interface ContextBridge { + + // Docs: https://electronjs.org/docs/api/context-bridge + + exposeInMainWorld(apiKey: string, api: any): void; + } + + interface Cookie { + + // Docs: https://electronjs.org/docs/api/structures/cookie + + /** + * The domain of the cookie; this will be normalized with a preceding dot so that + * it's also valid for subdomains. + */ + domain?: string; + /** + * The expiration date of the cookie as the number of seconds since the UNIX epoch. + * Not provided for session cookies. + */ + expirationDate?: number; + /** + * Whether the cookie is a host-only cookie; this will only be `true` if no domain + * was passed. + */ + hostOnly?: boolean; + /** + * Whether the cookie is marked as HTTP only. + */ + httpOnly?: boolean; + /** + * The name of the cookie. + */ + name: string; + /** + * The path of the cookie. + */ + path?: string; + /** + * The Same Site policy applied to this cookie. Can be `unspecified`, + * `no_restriction`, `lax` or `strict`. + */ + sameSite: ('unspecified' | 'no_restriction' | 'lax' | 'strict'); + /** + * Whether the cookie is marked as secure. + */ + secure?: boolean; + /** + * Whether the cookie is a session cookie or a persistent cookie with an expiration + * date. + */ + session?: boolean; + /** + * The value of the cookie. + */ + value: string; + } + + class Cookies extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/cookies + + /** + * Emitted when a cookie is changed because it was added, edited, removed, or + * expired. + */ + on(event: 'changed', listener: (event: Event, + /** + * The cookie that was changed. + */ + cookie: Cookie, + /** + * The cause of the change with one of the following values: + */ + cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), + /** + * `true` if the cookie was removed, `false` otherwise. + */ + removed: boolean) => void): this; + once(event: 'changed', listener: (event: Event, + /** + * The cookie that was changed. + */ + cookie: Cookie, + /** + * The cause of the change with one of the following values: + */ + cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), + /** + * `true` if the cookie was removed, `false` otherwise. + */ + removed: boolean) => void): this; + addListener(event: 'changed', listener: (event: Event, + /** + * The cookie that was changed. + */ + cookie: Cookie, + /** + * The cause of the change with one of the following values: + */ + cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), + /** + * `true` if the cookie was removed, `false` otherwise. + */ + removed: boolean) => void): this; + removeListener(event: 'changed', listener: (event: Event, + /** + * The cookie that was changed. + */ + cookie: Cookie, + /** + * The cause of the change with one of the following values: + */ + cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), + /** + * `true` if the cookie was removed, `false` otherwise. + */ + removed: boolean) => void): this; + /** + * A promise which resolves when the cookie store has been flushed + * +Writes any unwritten cookies data to disk. + */ + flushStore(): Promise; + /** + * A promise which resolves an array of cookie objects. + * + * Sends a request to get all cookies matching `filter`, and resolves a promise + * with the response. + */ + get(filter: CookiesGetFilter): Promise; + /** + * A promise which resolves when the cookie has been removed + * +Removes the cookies matching `url` and `name` + */ + remove(url: string, name: string): Promise; + /** + * A promise which resolves when the cookie has been set + * +Sets a cookie with `details`. + */ + set(details: CookiesSetDetails): Promise; + } + + interface CPUUsage { + + // Docs: https://electronjs.org/docs/api/structures/cpu-usage + + /** + * The number of average idle CPU wakeups per second since the last call to + * getCPUUsage. First call returns 0. Will always return 0 on Windows. + */ + idleWakeupsPerSecond: number; + /** + * Percentage of CPU used since the last call to getCPUUsage. First call returns 0. + */ + percentCPUUsage: number; + } + + interface CrashReport { + + // Docs: https://electronjs.org/docs/api/structures/crash-report + + date: Date; + id: string; + } + + interface CrashReporter { + + // Docs: https://electronjs.org/docs/api/crash-reporter + + /** + * Set an extra parameter to be sent with the crash report. The values specified + * here will be sent in addition to any values set via the `extra` option when + * `start` was called. + * + * Parameters added in this fashion (or via the `extra` parameter to + * `crashReporter.start`) are specific to the calling process. Adding extra + * parameters in the main process will not cause those parameters to be sent along + * with crashes from renderer or other child processes. Similarly, adding extra + * parameters in a renderer process will not result in those parameters being sent + * with crashes that occur in other renderer processes or in the main process. + * + * **Note:** Parameters have limits on the length of the keys and values. Key names + * must be no longer than 39 bytes, and values must be no longer than 20320 bytes. + * Keys with names longer than the maximum will be silently ignored. Key values + * longer than the maximum length will be truncated. + * + * **Note:** On linux values that are longer than 127 bytes will be chunked into + * multiple keys, each 127 bytes in length. E.g. `addExtraParameter('foo', + * 'a'.repeat(130))` will result in two chunked keys `foo__1` and `foo__2`, the + * first will contain the first 127 bytes and the second will contain the remaining + * 3 bytes. On your crash reporting backend you should stitch together keys in + * this format. + */ + addExtraParameter(key: string, value: string): void; + /** + * The date and ID of the last crash report. Only crash reports that have been + * uploaded will be returned; even if a crash report is present on disk it will not + * be returned until it is uploaded. In the case that there are no uploaded + * reports, `null` is returned. + * +**Note:** This method is only available in the main process. + */ + getLastCrashReport(): CrashReport; + /** + * The current 'extra' parameters of the crash reporter. + */ + getParameters(): Record; + /** + * Returns all uploaded crash reports. Each report contains the date and uploaded + * ID. + +**Note:** This method is only available in the main process. + */ + getUploadedReports(): CrashReport[]; + /** + * Whether reports should be submitted to the server. Set through the `start` + * method or `setUploadToServer`. + * +**Note:** This method is only available in the main process. + */ + getUploadToServer(): boolean; + /** + * Remove an extra parameter from the current set of parameters. Future crashes + * will not include this parameter. + */ + removeExtraParameter(key: string): void; + /** + * This would normally be controlled by user preferences. This has no effect if + * called before `start` is called. + * +**Note:** This method is only available in the main process. + */ + setUploadToServer(uploadToServer: boolean): void; + /** + * This method must be called before using any other `crashReporter` APIs. Once + * initialized this way, the crashpad handler collects crashes from all + * subsequently created processes. The crash reporter cannot be disabled once + * started. + * + * This method should be called as early as possible in app startup, preferably + * before `app.on('ready')`. If the crash reporter is not initialized at the time a + * renderer process is created, then that renderer process will not be monitored by + * the crash reporter. + * + * **Note:** You can test out the crash reporter by generating a crash using + * `process.crash()`. + * + * **Note:** If you need to send additional/updated `extra` parameters after your + * first call `start` you can call `addExtraParameter`. + * + * **Note:** Parameters passed in `extra`, `globalExtra` or set with + * `addExtraParameter` have limits on the length of the keys and values. Key names + * must be at most 39 bytes long, and values must be no longer than 127 bytes. Keys + * with names longer than the maximum will be silently ignored. Key values longer + * than the maximum length will be truncated. + * +**Note:** This method is only available in the main process. + */ + start(options: CrashReporterStartOptions): void; + } + + interface CustomScheme { + + // Docs: https://electronjs.org/docs/api/structures/custom-scheme + + privileges?: Privileges; + /** + * Custom schemes to be registered with options. + */ + scheme: string; + } + + class Debugger extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/debugger + + /** + * Emitted when the debugging session is terminated. This happens either when + * `webContents` is closed or devtools is invoked for the attached `webContents`. + */ + on(event: 'detach', listener: (event: Event, + /** + * Reason for detaching debugger. + */ + reason: string) => void): this; + once(event: 'detach', listener: (event: Event, + /** + * Reason for detaching debugger. + */ + reason: string) => void): this; + addListener(event: 'detach', listener: (event: Event, + /** + * Reason for detaching debugger. + */ + reason: string) => void): this; + removeListener(event: 'detach', listener: (event: Event, + /** + * Reason for detaching debugger. + */ + reason: string) => void): this; + /** + * Emitted whenever the debugging target issues an instrumentation event. + */ + on(event: 'message', listener: (event: Event, + /** + * Method name. + */ + method: string, + /** + * Event parameters defined by the 'parameters' attribute in the remote debugging + * protocol. + */ + params: any, + /** + * Unique identifier of attached debugging session, will match the value sent from + * `debugger.sendCommand`. + */ + sessionId: string) => void): this; + once(event: 'message', listener: (event: Event, + /** + * Method name. + */ + method: string, + /** + * Event parameters defined by the 'parameters' attribute in the remote debugging + * protocol. + */ + params: any, + /** + * Unique identifier of attached debugging session, will match the value sent from + * `debugger.sendCommand`. + */ + sessionId: string) => void): this; + addListener(event: 'message', listener: (event: Event, + /** + * Method name. + */ + method: string, + /** + * Event parameters defined by the 'parameters' attribute in the remote debugging + * protocol. + */ + params: any, + /** + * Unique identifier of attached debugging session, will match the value sent from + * `debugger.sendCommand`. + */ + sessionId: string) => void): this; + removeListener(event: 'message', listener: (event: Event, + /** + * Method name. + */ + method: string, + /** + * Event parameters defined by the 'parameters' attribute in the remote debugging + * protocol. + */ + params: any, + /** + * Unique identifier of attached debugging session, will match the value sent from + * `debugger.sendCommand`. + */ + sessionId: string) => void): this; + /** + * Attaches the debugger to the `webContents`. + */ + attach(protocolVersion?: string): void; + /** + * Detaches the debugger from the `webContents`. + */ + detach(): void; + /** + * Whether a debugger is attached to the `webContents`. + */ + isAttached(): boolean; + /** + * A promise that resolves with the response defined by the 'returns' attribute of + * the command description in the remote debugging protocol or is rejected + * indicating the failure of the command. + * +Send given command to the debugging target. + */ + sendCommand(method: string, commandParams?: any, sessionId?: string): Promise; + } + + interface DesktopCapturer { + + // Docs: https://electronjs.org/docs/api/desktop-capturer + + /** + * Resolves with an array of `DesktopCapturerSource` objects, each + * `DesktopCapturerSource` represents a screen or an individual window that can be + * captured. + * + * **Note** Capturing the screen contents requires user consent on macOS 10.15 + * Catalina or higher, which can detected by + * `systemPreferences.getMediaAccessStatus`. + */ + getSources(options: SourcesOptions): Promise; + } + + interface DesktopCapturerSource { + + // Docs: https://electronjs.org/docs/api/structures/desktop-capturer-source + + /** + * An icon image of the application that owns the window or null if the source has + * a type screen. The size of the icon is not known in advance and depends on what + * the application provides. + */ + appIcon: NativeImage; + /** + * A unique identifier that will correspond to the `id` of the matching Display + * returned by the Screen API. On some platforms, this is equivalent to the `XX` + * portion of the `id` field above and on others it will differ. It will be an + * empty string if not available. + */ + display_id: string; + /** + * The identifier of a window or screen that can be used as a `chromeMediaSourceId` + * constraint when calling [`navigator.webkitGetUserMedia`]. The format of the + * identifier will be `window:XX:YY` or `screen:ZZ:0`. XX is the windowID/handle. + * YY is 1 for the current process, and 0 for all others. ZZ is a sequential number + * that represents the screen, and it does not equal to the index in the source's + * name. + */ + id: string; + /** + * A screen source will be named either `Entire Screen` or `Screen `, while + * the name of a window source will match the window title. + */ + name: string; + /** + * A thumbnail image. **Note:** There is no guarantee that the size of the + * thumbnail is the same as the `thumbnailSize` specified in the `options` passed + * to `desktopCapturer.getSources`. The actual size depends on the scale of the + * screen or window. + */ + thumbnail: NativeImage; + } + + interface Dialog { + + // Docs: https://electronjs.org/docs/api/dialog + + /** + * resolves when the certificate trust dialog is shown. + * + * On macOS, this displays a modal dialog that shows a message and certificate + * information, and gives the user the option of trusting/importing the + * certificate. If you provide a `browserWindow` argument the dialog will be + * attached to the parent window, making it modal. + * + * On Windows the options are more limited, due to the Win32 APIs used: + * + * * The `message` argument is not used, as the OS provides its own confirmation + * dialog. + * * The `browserWindow` argument is ignored since it is not possible to make this + * confirmation dialog modal. + * + * @platform darwin,win32 + */ + showCertificateTrustDialog(browserWindow: BrowserWindow, options: CertificateTrustDialogOptions): Promise; + /** + * resolves when the certificate trust dialog is shown. + * + * On macOS, this displays a modal dialog that shows a message and certificate + * information, and gives the user the option of trusting/importing the + * certificate. If you provide a `browserWindow` argument the dialog will be + * attached to the parent window, making it modal. + * + * On Windows the options are more limited, due to the Win32 APIs used: + * + * * The `message` argument is not used, as the OS provides its own confirmation + * dialog. + * * The `browserWindow` argument is ignored since it is not possible to make this + * confirmation dialog modal. + * + * @platform darwin,win32 + */ + showCertificateTrustDialog(options: CertificateTrustDialogOptions): Promise; + /** + * Displays a modal dialog that shows an error message. + * + * This API can be called safely before the `ready` event the `app` module emits, + * it is usually used to report errors in early stage of startup. If called before + * the app `ready`event on Linux, the message will be emitted to stderr, and no GUI + * dialog will appear. + */ + showErrorBox(title: string, content: string): void; + /** + * resolves with a promise containing the following properties: + * + * * `response` Number - The index of the clicked button. + * * `checkboxChecked` Boolean - The checked state of the checkbox if + * `checkboxLabel` was set. Otherwise `false`. + * + * Shows a message box. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + */ + showMessageBox(browserWindow: BrowserWindow, options: MessageBoxOptions): Promise; + /** + * resolves with a promise containing the following properties: + * + * * `response` Number - The index of the clicked button. + * * `checkboxChecked` Boolean - The checked state of the checkbox if + * `checkboxLabel` was set. Otherwise `false`. + * + * Shows a message box. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + */ + showMessageBox(options: MessageBoxOptions): Promise; + /** + * the index of the clicked button. + * + * Shows a message box, it will block the process until the message box is closed. + * It returns the index of the clicked button. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. If `browserWindow` is not shown dialog will not be + * attached to it. In such case it will be displayed as an independent window. + */ + showMessageBoxSync(browserWindow: BrowserWindow, options: MessageBoxSyncOptions): number; + /** + * the index of the clicked button. + * + * Shows a message box, it will block the process until the message box is closed. + * It returns the index of the clicked button. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. If `browserWindow` is not shown dialog will not be + * attached to it. In such case it will be displayed as an independent window. + */ + showMessageBoxSync(options: MessageBoxSyncOptions): number; + /** + * Resolve with an object containing the following: + * + * * `canceled` Boolean - whether or not the dialog was canceled. + * * `filePaths` String[] - An array of file paths chosen by the user. If the + * dialog is cancelled this will be an empty array. + * * `bookmarks` String[] (optional) _macOS_ _mas_ - An array matching the + * `filePaths` array of base64 encoded strings which contains security scoped + * bookmark data. `securityScopedBookmarks` must be enabled for this to be + * populated. (For return values, see table here.) + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed or selected + * when you want to limit the user to a specific type. For example: + * + * The `extensions` array should contain extensions without wildcards or dots (e.g. + * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the + * `'*'` wildcard (no other wildcard is supported). + * + * **Note:** On Windows and Linux an open dialog can not be both a file selector + * and a directory selector, so if you set `properties` to `['openFile', + * 'openDirectory']` on these platforms, a directory selector will be shown. + */ + showOpenDialog(browserWindow: BrowserWindow, options: OpenDialogOptions): Promise; + /** + * Resolve with an object containing the following: + * + * * `canceled` Boolean - whether or not the dialog was canceled. + * * `filePaths` String[] - An array of file paths chosen by the user. If the + * dialog is cancelled this will be an empty array. + * * `bookmarks` String[] (optional) _macOS_ _mas_ - An array matching the + * `filePaths` array of base64 encoded strings which contains security scoped + * bookmark data. `securityScopedBookmarks` must be enabled for this to be + * populated. (For return values, see table here.) + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed or selected + * when you want to limit the user to a specific type. For example: + * + * The `extensions` array should contain extensions without wildcards or dots (e.g. + * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the + * `'*'` wildcard (no other wildcard is supported). + * + * **Note:** On Windows and Linux an open dialog can not be both a file selector + * and a directory selector, so if you set `properties` to `['openFile', + * 'openDirectory']` on these platforms, a directory selector will be shown. + */ + showOpenDialog(options: OpenDialogOptions): Promise; + /** + * the file paths chosen by the user; if the dialog is cancelled it returns + * `undefined`. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed or selected + * when you want to limit the user to a specific type. For example: + * + * The `extensions` array should contain extensions without wildcards or dots (e.g. + * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the + * `'*'` wildcard (no other wildcard is supported). + * + * **Note:** On Windows and Linux an open dialog can not be both a file selector + * and a directory selector, so if you set `properties` to `['openFile', + * 'openDirectory']` on these platforms, a directory selector will be shown. + */ + showOpenDialogSync(browserWindow: BrowserWindow, options: OpenDialogSyncOptions): (string[]) | (undefined); + /** + * the file paths chosen by the user; if the dialog is cancelled it returns + * `undefined`. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed or selected + * when you want to limit the user to a specific type. For example: + * + * The `extensions` array should contain extensions without wildcards or dots (e.g. + * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the + * `'*'` wildcard (no other wildcard is supported). + * + * **Note:** On Windows and Linux an open dialog can not be both a file selector + * and a directory selector, so if you set `properties` to `['openFile', + * 'openDirectory']` on these platforms, a directory selector will be shown. + */ + showOpenDialogSync(options: OpenDialogSyncOptions): (string[]) | (undefined); + /** + * Resolve with an object containing the following: + * + * * `canceled` Boolean - whether or not the dialog was canceled. + * * `filePath` String (optional) - If the dialog is canceled, this will be + * `undefined`. + * * `bookmark` String (optional) _macOS_ _mas_ - Base64 encoded string which + * contains the security scoped bookmark data for the saved file. + * `securityScopedBookmarks` must be enabled for this to be present. (For return + * values, see table here.) + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed, see + * `dialog.showOpenDialog` for an example. + * + * **Note:** On macOS, using the asynchronous version is recommended to avoid + * issues when expanding and collapsing the dialog. + */ + showSaveDialog(browserWindow: BrowserWindow, options: SaveDialogOptions): Promise; + /** + * Resolve with an object containing the following: + * + * * `canceled` Boolean - whether or not the dialog was canceled. + * * `filePath` String (optional) - If the dialog is canceled, this will be + * `undefined`. + * * `bookmark` String (optional) _macOS_ _mas_ - Base64 encoded string which + * contains the security scoped bookmark data for the saved file. + * `securityScopedBookmarks` must be enabled for this to be present. (For return + * values, see table here.) + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed, see + * `dialog.showOpenDialog` for an example. + * + * **Note:** On macOS, using the asynchronous version is recommended to avoid + * issues when expanding and collapsing the dialog. + */ + showSaveDialog(options: SaveDialogOptions): Promise; + /** + * the path of the file chosen by the user; if the dialog is cancelled it returns + * `undefined`. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed, see + * `dialog.showOpenDialog` for an example. + */ + showSaveDialogSync(browserWindow: BrowserWindow, options: SaveDialogSyncOptions): (string) | (undefined); + /** + * the path of the file chosen by the user; if the dialog is cancelled it returns + * `undefined`. + * + * The `browserWindow` argument allows the dialog to attach itself to a parent + * window, making it modal. + * + * The `filters` specifies an array of file types that can be displayed, see + * `dialog.showOpenDialog` for an example. + */ + showSaveDialogSync(options: SaveDialogSyncOptions): (string) | (undefined); + } + + interface Display { + + // Docs: https://electronjs.org/docs/api/structures/display + + /** + * Can be `available`, `unavailable`, `unknown`. + */ + accelerometerSupport: ('available' | 'unavailable' | 'unknown'); + /** + * the bounds of the display in DIP points. + */ + bounds: Rectangle; + /** + * The number of bits per pixel. + */ + colorDepth: number; + /** + * represent a color space (three-dimensional object which contains all realizable + * color combinations) for the purpose of color conversions + */ + colorSpace: string; + /** + * The number of bits per color component. + */ + depthPerComponent: number; + /** + * The display refresh rate. + */ + displayFrequency: number; + /** + * Unique identifier associated with the display. + */ + id: number; + /** + * `true` for an internal display and `false` for an external display + */ + internal: boolean; + /** + * Whether or not the display is a monochrome display. + */ + monochrome: boolean; + /** + * Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees. + */ + rotation: number; + /** + * Output device's pixel scale factor. + */ + scaleFactor: number; + size: Size; + /** + * Can be `available`, `unavailable`, `unknown`. + */ + touchSupport: ('available' | 'unavailable' | 'unknown'); + /** + * the work area of the display in DIP points. + */ + workArea: Rectangle; + workAreaSize: Size; + } + + class Dock { + + // Docs: https://electronjs.org/docs/api/dock + + /** + * an ID representing the request. + * + * When `critical` is passed, the dock icon will bounce until either the + * application becomes active or the request is canceled. + * + * When `informational` is passed, the dock icon will bounce for one second. + * However, the request remains active until either the application becomes active + * or the request is canceled. + * + * **Nota Bene:** This method can only be used while the app is not focused; when + * the app is focused it will return -1. + * + * @platform darwin + */ + bounce(type?: 'critical' | 'informational'): number; + /** + * Cancel the bounce of `id`. + * + * @platform darwin + */ + cancelBounce(id: number): void; + /** + * Bounces the Downloads stack if the filePath is inside the Downloads folder. + * + * @platform darwin + */ + downloadFinished(filePath: string): void; + /** + * The badge string of the dock. + * + * @platform darwin + */ + getBadge(): string; + /** + * The application's [dock menu][dock-menu]. + * + * @platform darwin + */ + getMenu(): (Menu) | (null); + /** + * Hides the dock icon. + * + * @platform darwin + */ + hide(): void; + /** + * Whether the dock icon is visible. + * + * @platform darwin + */ + isVisible(): boolean; + /** + * Sets the string to be displayed in the dock’s badging area. + * + * @platform darwin + */ + setBadge(text: string): void; + /** + * Sets the `image` associated with this dock icon. + * + * @platform darwin + */ + setIcon(image: (NativeImage) | (string)): void; + /** + * Sets the application's [dock menu][dock-menu]. + * + * @platform darwin + */ + setMenu(menu: Menu): void; + /** + * Resolves when the dock icon is shown. + * + * @platform darwin + */ + show(): Promise; + } + + class DownloadItem extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/download-item + + /** + * Emitted when the download is in a terminal state. This includes a completed + * download, a cancelled download (via `downloadItem.cancel()`), and interrupted + * download that can't be resumed. + * + * The `state` can be one of following: + * + * * `completed` - The download completed successfully. + * * `cancelled` - The download has been cancelled. + * * `interrupted` - The download has interrupted and can not resume. + */ + on(event: 'done', listener: (event: Event, + /** + * Can be `completed`, `cancelled` or `interrupted`. + */ + state: ('completed' | 'cancelled' | 'interrupted')) => void): this; + once(event: 'done', listener: (event: Event, + /** + * Can be `completed`, `cancelled` or `interrupted`. + */ + state: ('completed' | 'cancelled' | 'interrupted')) => void): this; + addListener(event: 'done', listener: (event: Event, + /** + * Can be `completed`, `cancelled` or `interrupted`. + */ + state: ('completed' | 'cancelled' | 'interrupted')) => void): this; + removeListener(event: 'done', listener: (event: Event, + /** + * Can be `completed`, `cancelled` or `interrupted`. + */ + state: ('completed' | 'cancelled' | 'interrupted')) => void): this; + /** + * Emitted when the download has been updated and is not done. + * + * The `state` can be one of following: + * + * * `progressing` - The download is in-progress. + * * `interrupted` - The download has interrupted and can be resumed. + */ + on(event: 'updated', listener: (event: Event, + /** + * Can be `progressing` or `interrupted`. + */ + state: ('progressing' | 'interrupted')) => void): this; + once(event: 'updated', listener: (event: Event, + /** + * Can be `progressing` or `interrupted`. + */ + state: ('progressing' | 'interrupted')) => void): this; + addListener(event: 'updated', listener: (event: Event, + /** + * Can be `progressing` or `interrupted`. + */ + state: ('progressing' | 'interrupted')) => void): this; + removeListener(event: 'updated', listener: (event: Event, + /** + * Can be `progressing` or `interrupted`. + */ + state: ('progressing' | 'interrupted')) => void): this; + /** + * Cancels the download operation. + */ + cancel(): void; + /** + * Whether the download can resume. + */ + canResume(): boolean; + /** + * The Content-Disposition field from the response header. + */ + getContentDisposition(): string; + /** + * ETag header value. + */ + getETag(): string; + /** + * The file name of the download item. + * + * **Note:** The file name is not always the same as the actual one saved in local + * disk. If user changes the file name in a prompted download saving dialog, the + * actual name of saved file will be different. + */ + getFilename(): string; + /** + * Last-Modified header value. + */ + getLastModifiedTime(): string; + /** + * The files mime type. + */ + getMimeType(): string; + /** + * The received bytes of the download item. + */ + getReceivedBytes(): number; + /** + * Returns the object previously set by + * `downloadItem.setSaveDialogOptions(options)`. + */ + getSaveDialogOptions(): SaveDialogOptions; + /** + * The save path of the download item. This will be either the path set via + * `downloadItem.setSavePath(path)` or the path selected from the shown save + * dialog. + */ + getSavePath(): string; + /** + * Number of seconds since the UNIX epoch when the download was started. + */ + getStartTime(): number; + /** + * The current state. Can be `progressing`, `completed`, `cancelled` or + * `interrupted`. + * + * **Note:** The following methods are useful specifically to resume a `cancelled` + * item when session is restarted. + */ + getState(): ('progressing' | 'completed' | 'cancelled' | 'interrupted'); + /** + * The total size in bytes of the download item. + * +If the size is unknown, it returns 0. + */ + getTotalBytes(): number; + /** + * The origin URL where the item is downloaded from. + */ + getURL(): string; + /** + * The complete URL chain of the item including any redirects. + */ + getURLChain(): string[]; + /** + * Whether the download has user gesture. + */ + hasUserGesture(): boolean; + /** + * Whether the download is paused. + */ + isPaused(): boolean; + /** + * Pauses the download. + */ + pause(): void; + /** + * Resumes the download that has been paused. + * + * **Note:** To enable resumable downloads the server you are downloading from must + * support range requests and provide both `Last-Modified` and `ETag` header + * values. Otherwise `resume()` will dismiss previously received bytes and restart + * the download from the beginning. + */ + resume(): void; + /** + * This API allows the user to set custom options for the save dialog that opens + * for the download item by default. The API is only available in session's + * `will-download` callback function. + */ + setSaveDialogOptions(options: SaveDialogOptions): void; + /** + * The API is only available in session's `will-download` callback function. If + * `path` doesn't exist, Electron will try to make the directory recursively. If + * user doesn't set the save path via the API, Electron will use the original + * routine to determine the save path; this usually prompts a save dialog. + */ + setSavePath(path: string): void; + savePath: string; + } + + interface Event extends GlobalEvent { + + // Docs: https://electronjs.org/docs/api/structures/event + + preventDefault: (() => void); + } + + interface Extension { + + // Docs: https://electronjs.org/docs/api/structures/extension + + id: string; + /** + * Copy of the extension's manifest data. + */ + manifest: any; + name: string; + /** + * The extension's file path. + */ + path: string; + /** + * The extension's `chrome-extension://` URL. + */ + url: string; + version: string; + } + + interface ExtensionInfo { + + // Docs: https://electronjs.org/docs/api/structures/extension-info + + name: string; + version: string; + } + + interface FileFilter { + + // Docs: https://electronjs.org/docs/api/structures/file-filter + + extensions: string[]; + name: string; + } + + interface FilePathWithHeaders { + + // Docs: https://electronjs.org/docs/api/structures/file-path-with-headers + + /** + * Additional headers to be sent. + */ + headers?: Record; + /** + * The path to the file to send. + */ + path: string; + } + + interface GlobalShortcut { + + // Docs: https://electronjs.org/docs/api/global-shortcut + + /** + * Whether this application has registered `accelerator`. + * + * When the accelerator is already taken by other applications, this call will + * still return `false`. This behavior is intended by operating systems, since they + * don't want applications to fight for global shortcuts. + */ + isRegistered(accelerator: Accelerator): boolean; + /** + * Whether or not the shortcut was registered successfully. + * + * Registers a global shortcut of `accelerator`. The `callback` is called when the + * registered shortcut is pressed by the user. + * + * When the accelerator is already taken by other applications, this call will + * silently fail. This behavior is intended by operating systems, since they don't + * want applications to fight for global shortcuts. + * + * The following accelerators will not be registered successfully on macOS 10.14 + * Mojave unless the app has been authorized as a trusted accessibility client: + * + * * "Media Play/Pause" + * * "Media Next Track" +* "Media Previous Track" +* "Media Stop" + */ + register(accelerator: Accelerator, callback: () => void): boolean; + /** + * Registers a global shortcut of all `accelerator` items in `accelerators`. The + * `callback` is called when any of the registered shortcuts are pressed by the + * user. + * + * When a given accelerator is already taken by other applications, this call will + * silently fail. This behavior is intended by operating systems, since they don't + * want applications to fight for global shortcuts. + * + * The following accelerators will not be registered successfully on macOS 10.14 + * Mojave unless the app has been authorized as a trusted accessibility client: + * + * * "Media Play/Pause" + * * "Media Next Track" +* "Media Previous Track" +* "Media Stop" + */ + registerAll(accelerators: string[], callback: () => void): void; + /** + * Unregisters the global shortcut of `accelerator`. + */ + unregister(accelerator: Accelerator): void; + /** + * Unregisters all of the global shortcuts. + */ + unregisterAll(): void; + } + + interface GPUFeatureStatus { + + // Docs: https://electronjs.org/docs/api/structures/gpu-feature-status + + /** + * Canvas. + */ + '2d_canvas': string; + /** + * Flash. + */ + flash_3d: string; + /** + * Flash Stage3D. + */ + flash_stage3d: string; + /** + * Flash Stage3D Baseline profile. + */ + flash_stage3d_baseline: string; + /** + * Compositing. + */ + gpu_compositing: string; + /** + * Multiple Raster Threads. + */ + multiple_raster_threads: string; + /** + * Native GpuMemoryBuffers. + */ + native_gpu_memory_buffers: string; + /** + * Rasterization. + */ + rasterization: string; + /** + * Video Decode. + */ + video_decode: string; + /** + * Video Encode. + */ + video_encode: string; + /** + * VPx Video Decode. + */ + vpx_decode: string; + /** + * WebGL. + */ + webgl: string; + /** + * WebGL2. + */ + webgl2: string; + } + + interface InAppPurchase extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/in-app-purchase + + on(event: 'transactions-updated', listener: Function): this; + once(event: 'transactions-updated', listener: Function): this; + addListener(event: 'transactions-updated', listener: Function): this; + removeListener(event: 'transactions-updated', listener: Function): this; + /** + * whether a user can make a payment. + */ + canMakePayments(): boolean; + /** + * Completes all pending transactions. + */ + finishAllTransactions(): void; + /** + * Completes the pending transactions corresponding to the date. + */ + finishTransactionByDate(date: string): void; + /** + * Resolves with an array of `Product` objects. + * +Retrieves the product descriptions. + */ + getProducts(productIDs: string[]): Promise; + /** + * the path to the receipt. + */ + getReceiptURL(): string; + /** + * Returns `true` if the product is valid and added to the payment queue. + * + * You should listen for the `transactions-updated` event as soon as possible and + * certainly before you call `purchaseProduct`. + */ + purchaseProduct(productID: string, quantity?: number): Promise; + /** + * Restores finished transactions. This method can be called either to install + * purchases on additional devices, or to restore purchases for an application that + * the user deleted and reinstalled. + * + * The payment queue delivers a new transaction for each previously completed + * transaction that can be restored. Each transaction includes a copy of the + * original transaction. + */ + restoreCompletedTransactions(): void; + } + + class IncomingMessage extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/incoming-message + + /** + * Emitted when a request has been canceled during an ongoing HTTP transaction. + */ + on(event: 'aborted', listener: Function): this; + once(event: 'aborted', listener: Function): this; + addListener(event: 'aborted', listener: Function): this; + removeListener(event: 'aborted', listener: Function): this; + /** + * The `data` event is the usual method of transferring response data into + * applicative code. + */ + on(event: 'data', listener: ( + /** + * A chunk of response body's data. + */ + chunk: Buffer) => void): this; + once(event: 'data', listener: ( + /** + * A chunk of response body's data. + */ + chunk: Buffer) => void): this; + addListener(event: 'data', listener: ( + /** + * A chunk of response body's data. + */ + chunk: Buffer) => void): this; + removeListener(event: 'data', listener: ( + /** + * A chunk of response body's data. + */ + chunk: Buffer) => void): this; + /** + * Indicates that response body has ended. Must be placed before 'data' event. + */ + on(event: 'end', listener: Function): this; + once(event: 'end', listener: Function): this; + addListener(event: 'end', listener: Function): this; + removeListener(event: 'end', listener: Function): this; + /** + * Returns: + * + * `error` Error - Typically holds an error string identifying failure root cause. + * + * Emitted when an error was encountered while streaming response data events. For + * instance, if the server closes the underlying while the response is still + * streaming, an `error` event will be emitted on the response object and a `close` + * event will subsequently follow on the request object. + */ + on(event: 'error', listener: Function): this; + once(event: 'error', listener: Function): this; + addListener(event: 'error', listener: Function): this; + removeListener(event: 'error', listener: Function): this; + headers: Record; + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + statusCode: number; + statusMessage: string; + } + + interface InputEvent { + + // Docs: https://electronjs.org/docs/api/structures/input-event + + /** + * An array of modifiers of the event, can be `shift`, `control`, `ctrl`, `alt`, + * `meta`, `command`, `cmd`, `isKeypad`, `isAutoRepeat`, `leftButtonDown`, + * `middleButtonDown`, `rightButtonDown`, `capsLock`, `numLock`, `left`, `right`. + */ + modifiers?: Array<'shift' | 'control' | 'ctrl' | 'alt' | 'meta' | 'command' | 'cmd' | 'isKeypad' | 'isAutoRepeat' | 'leftButtonDown' | 'middleButtonDown' | 'rightButtonDown' | 'capsLock' | 'numLock' | 'left' | 'right'>; + } + + interface IOCounters { + + // Docs: https://electronjs.org/docs/api/structures/io-counters + + /** + * Then number of I/O other operations. + */ + otherOperationCount: number; + /** + * Then number of I/O other transfers. + */ + otherTransferCount: number; + /** + * The number of I/O read operations. + */ + readOperationCount: number; + /** + * The number of I/O read transfers. + */ + readTransferCount: number; + /** + * The number of I/O write operations. + */ + writeOperationCount: number; + /** + * The number of I/O write transfers. + */ + writeTransferCount: number; + } + + interface IpcMain extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/ipc-main + + /** + * Adds a handler for an `invoke`able IPC. This handler will be called whenever a + * renderer calls `ipcRenderer.invoke(channel, ...args)`. + * + * If `listener` returns a Promise, the eventual result of the promise will be + * returned as a reply to the remote caller. Otherwise, the return value of the + * listener will be used as the value of the reply. + * + * The `event` that is passed as the first argument to the handler is the same as + * that passed to a regular event listener. It includes information about which + * WebContents is the source of the invoke request. + * + * Errors thrown through `handle` in the main process are not transparent as they + * are serialized and only the `message` property from the original error is + * provided to the renderer process. Please refer to #24427 for details. + */ + handle(channel: string, listener: (event: IpcMainInvokeEvent, ...args: any[]) => (Promise) | (any)): void; + /** + * Handles a single `invoke`able IPC message, then removes the listener. See + * `ipcMain.handle(channel, listener)`. + */ + handleOnce(channel: string, listener: (event: IpcMainInvokeEvent, ...args: any[]) => (Promise) | (any)): void; + /** + * Listens to `channel`, when a new message arrives `listener` would be called with + * `listener(event, args...)`. + */ + on(channel: string, listener: (event: IpcMainEvent, ...args: any[]) => void): this; + /** + * Adds a one time `listener` function for the event. This `listener` is invoked + * only the next time a message is sent to `channel`, after which it is removed. + */ + once(channel: string, listener: (event: IpcMainEvent, ...args: any[]) => void): this; + /** + * Removes listeners of the specified `channel`. + */ + removeAllListeners(channel?: string): this; + /** + * Removes any handler for `channel`, if present. + */ + removeHandler(channel: string): void; + /** + * Removes the specified `listener` from the listener array for the specified + * `channel`. + */ + removeListener(channel: string, listener: (...args: any[]) => void): this; + } + + interface IpcMainEvent extends Event { + + // Docs: https://electronjs.org/docs/api/structures/ipc-main-event + + /** + * The ID of the renderer frame that sent this message + */ + frameId: number; + /** + * A list of MessagePorts that were transferred with this message + */ + ports: MessagePortMain[]; + /** + * The internal ID of the renderer process that sent this message + */ + processId: number; + /** + * A function that will send an IPC message to the renderer frame that sent the + * original message that you are currently handling. You should use this method to + * "reply" to the sent message in order to guarantee the reply will go to the + * correct process and frame. + */ + reply: Function; + /** + * Set this to the value to be returned in a synchronous message + */ + returnValue: any; + /** + * Returns the `webContents` that sent the message + */ + sender: WebContents; + /** + * The frame that sent this message + * + */ + readonly senderFrame: WebFrameMain; + } + + interface IpcMainInvokeEvent extends Event { + + // Docs: https://electronjs.org/docs/api/structures/ipc-main-invoke-event + + /** + * The ID of the renderer frame that sent this message + */ + frameId: number; + /** + * The internal ID of the renderer process that sent this message + */ + processId: number; + /** + * Returns the `webContents` that sent the message + */ + sender: WebContents; + /** + * The frame that sent this message + * + */ + readonly senderFrame: WebFrameMain; + } + + interface IpcRenderer extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/ipc-renderer + + /** + * Resolves with the response from the main process. + * + * Send a message to the main process via `channel` and expect a result + * asynchronously. Arguments will be serialized with the Structured Clone + * Algorithm, just like `window.postMessage`, so prototype chains will not be + * included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw + * an exception. + * + * > **NOTE:** Sending non-standard JavaScript types such as DOM objects or special + * Electron objects will throw an exception. + * + * Since the main process does not have support for DOM objects such as + * `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over + * Electron's IPC to the main process, as the main process would have no way to + * decode them. Attempting to send such objects over IPC will result in an error. + * + * The main process should listen for `channel` with `ipcMain.handle()`. + * + * For example: + * + * If you need to transfer a `MessagePort` to the main process, use + * `ipcRenderer.postMessage`. + * + * If you do not need a response to the message, consider using `ipcRenderer.send`. + */ + invoke(channel: string, ...args: any[]): Promise; + /** + * Listens to `channel`, when a new message arrives `listener` would be called with + * `listener(event, args...)`. + */ + on(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void): this; + /** + * Adds a one time `listener` function for the event. This `listener` is invoked + * only the next time a message is sent to `channel`, after which it is removed. + */ + once(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void): this; + /** + * Send a message to the main process, optionally transferring ownership of zero or + * more `MessagePort` objects. + * + * The transferred `MessagePort` objects will be available in the main process as + * `MessagePortMain` objects by accessing the `ports` property of the emitted + * event. + * + * For example: + * + * For more information on using `MessagePort` and `MessageChannel`, see the MDN + * documentation. + */ + postMessage(channel: string, message: any, transfer?: MessagePort[]): void; + /** + * Removes all listeners, or those of the specified `channel`. + */ + removeAllListeners(channel: string): this; + /** + * Removes the specified `listener` from the listener array for the specified + * `channel`. + */ + removeListener(channel: string, listener: (...args: any[]) => void): this; + /** + * Send an asynchronous message to the main process via `channel`, along with + * arguments. Arguments will be serialized with the Structured Clone Algorithm, + * just like `window.postMessage`, so prototype chains will not be included. + * Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw an + * exception. + * + * > **NOTE:** Sending non-standard JavaScript types such as DOM objects or special + * Electron objects will throw an exception. + * + * Since the main process does not have support for DOM objects such as + * `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over + * Electron's IPC to the main process, as the main process would have no way to + * decode them. Attempting to send such objects over IPC will result in an error. + * + * The main process handles it by listening for `channel` with the `ipcMain` + * module. + * + * If you need to transfer a `MessagePort` to the main process, use + * `ipcRenderer.postMessage`. + * + * If you want to receive a single response from the main process, like the result + * of a method call, consider using `ipcRenderer.invoke`. + */ + send(channel: string, ...args: any[]): void; + /** + * The value sent back by the `ipcMain` handler. + * + * Send a message to the main process via `channel` and expect a result + * synchronously. Arguments will be serialized with the Structured Clone Algorithm, + * just like `window.postMessage`, so prototype chains will not be included. + * Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw an + * exception. + * + * > **NOTE:** Sending non-standard JavaScript types such as DOM objects or special + * Electron objects will throw an exception. + * + * Since the main process does not have support for DOM objects such as + * `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over + * Electron's IPC to the main process, as the main process would have no way to + * decode them. Attempting to send such objects over IPC will result in an error. + * + * The main process handles it by listening for `channel` with `ipcMain` module, + * and replies by setting `event.returnValue`. + * + * > :warning: **WARNING**: Sending a synchronous message will block the whole + * renderer process until the reply is received, so use this method only as a last + * resort. It's much better to use the asynchronous version, `invoke()`. + */ + sendSync(channel: string, ...args: any[]): any; + /** + * Sends a message to a window with `webContentsId` via `channel`. + */ + sendTo(webContentsId: number, channel: string, ...args: any[]): void; + /** + * Like `ipcRenderer.send` but the event will be sent to the `` element in + * the host page instead of the main process. + */ + sendToHost(channel: string, ...args: any[]): void; + } + + interface IpcRendererEvent extends Event { + + // Docs: https://electronjs.org/docs/api/structures/ipc-renderer-event + + /** + * A list of MessagePorts that were transferred with this message + */ + ports: MessagePort[]; + /** + * The `IpcRenderer` instance that emitted the event originally + */ + sender: IpcRenderer; + /** + * The `webContents.id` that sent the message, you can call + * `event.sender.sendTo(event.senderId, ...)` to reply to the message, see + * ipcRenderer.sendTo for more information. This only applies to messages sent from + * a different renderer. Messages sent directly from the main process set + * `event.senderId` to `0`. + */ + senderId: number; + } + + interface JumpListCategory { + + // Docs: https://electronjs.org/docs/api/structures/jump-list-category + + /** + * Array of `JumpListItem` objects if `type` is `tasks` or `custom`, otherwise it + * should be omitted. + */ + items?: JumpListItem[]; + /** + * Must be set if `type` is `custom`, otherwise it should be omitted. + */ + name?: string; + /** + * One of the following: + */ + type?: ('tasks' | 'frequent' | 'recent' | 'custom'); + } + + interface JumpListItem { + + // Docs: https://electronjs.org/docs/api/structures/jump-list-item + + /** + * The command line arguments when `program` is executed. Should only be set if + * `type` is `task`. + */ + args?: string; + /** + * Description of the task (displayed in a tooltip). Should only be set if `type` + * is `task`. Maximum length 260 characters. + */ + description?: string; + /** + * The index of the icon in the resource file. If a resource file contains multiple + * icons this value can be used to specify the zero-based index of the icon that + * should be displayed for this task. If a resource file contains only one icon, + * this property should be set to zero. + */ + iconIndex?: number; + /** + * The absolute path to an icon to be displayed in a Jump List, which can be an + * arbitrary resource file that contains an icon (e.g. `.ico`, `.exe`, `.dll`). You + * can usually specify `process.execPath` to show the program icon. + */ + iconPath?: string; + /** + * Path of the file to open, should only be set if `type` is `file`. + */ + path?: string; + /** + * Path of the program to execute, usually you should specify `process.execPath` + * which opens the current program. Should only be set if `type` is `task`. + */ + program?: string; + /** + * The text to be displayed for the item in the Jump List. Should only be set if + * `type` is `task`. + */ + title?: string; + /** + * One of the following: + */ + type?: ('task' | 'separator' | 'file'); + /** + * The working directory. Default is empty. + */ + workingDirectory?: string; + } + + interface KeyboardEvent { + + // Docs: https://electronjs.org/docs/api/structures/keyboard-event + + /** + * whether an Alt key was used in an accelerator to trigger the Event + */ + altKey?: boolean; + /** + * whether the Control key was used in an accelerator to trigger the Event + */ + ctrlKey?: boolean; + /** + * whether a meta key was used in an accelerator to trigger the Event + */ + metaKey?: boolean; + /** + * whether a Shift key was used in an accelerator to trigger the Event + */ + shiftKey?: boolean; + /** + * whether an accelerator was used to trigger the event as opposed to another user + * gesture like mouse click + */ + triggeredByAccelerator?: boolean; + } + + interface KeyboardInputEvent extends InputEvent { + + // Docs: https://electronjs.org/docs/api/structures/keyboard-input-event + + /** + * The character that will be sent as the keyboard event. Should only use the valid + * key codes in Accelerator. + */ + keyCode: string; + /** + * The type of the event, can be `keyDown`, `keyUp` or `char`. + */ + type: ('keyDown' | 'keyUp' | 'char'); + } + + interface MemoryInfo { + + // Docs: https://electronjs.org/docs/api/structures/memory-info + + /** + * The maximum amount of memory that has ever been pinned to actual physical RAM. + */ + peakWorkingSetSize: number; + /** + * The amount of memory not shared by other processes, such as JS heap or HTML + * content. + * + * @platform win32 + */ + privateBytes?: number; + /** + * The amount of memory currently pinned to actual physical RAM. + */ + workingSetSize: number; + } + + interface MemoryUsageDetails { + + // Docs: https://electronjs.org/docs/api/structures/memory-usage-details + + count: number; + liveSize: number; + size: number; + } + + class Menu { + + // Docs: https://electronjs.org/docs/api/menu + + /** + * Emitted when a popup is closed either manually or with `menu.closePopup()`. + */ + on(event: 'menu-will-close', listener: (event: Event) => void): this; + once(event: 'menu-will-close', listener: (event: Event) => void): this; + addListener(event: 'menu-will-close', listener: (event: Event) => void): this; + removeListener(event: 'menu-will-close', listener: (event: Event) => void): this; + /** + * Emitted when `menu.popup()` is called. + */ + on(event: 'menu-will-show', listener: (event: Event) => void): this; + once(event: 'menu-will-show', listener: (event: Event) => void): this; + addListener(event: 'menu-will-show', listener: (event: Event) => void): this; + removeListener(event: 'menu-will-show', listener: (event: Event) => void): this; + /** + * Menu + */ + constructor(); + /** + * Generally, the `template` is an array of `options` for constructing a MenuItem. + * The usage can be referenced above. + * + * You can also attach other fields to the element of the `template` and they will + * become properties of the constructed menu items. + */ + static buildFromTemplate(template: Array<(MenuItemConstructorOptions) | (MenuItem)>): Menu; + /** + * The application menu, if set, or `null`, if not set. + * + * **Note:** The returned `Menu` instance doesn't support dynamic addition or + * removal of menu items. Instance properties can still be dynamically modified. + */ + static getApplicationMenu(): (Menu) | (null); + /** + * Sends the `action` to the first responder of application. This is used for + * emulating default macOS menu behaviors. Usually you would use the `role` + * property of a `MenuItem`. + * + * See the macOS Cocoa Event Handling Guide for more information on macOS' native + * actions. + * + * @platform darwin + */ + static sendActionToFirstResponder(action: string): void; + /** + * Sets `menu` as the application menu on macOS. On Windows and Linux, the `menu` + * will be set as each window's top menu. + * + * Also on Windows and Linux, you can use a `&` in the top-level item name to + * indicate which letter should get a generated accelerator. For example, using + * `&File` for the file menu would result in a generated `Alt-F` accelerator that + * opens the associated menu. The indicated character in the button label then gets + * an underline, and the `&` character is not displayed on the button label. + * + * In order to escape the `&` character in an item name, add a proceeding `&`. For + * example, `&&File` would result in `&File` displayed on the button label. + * + * Passing `null` will suppress the default menu. On Windows and Linux, this has + * the additional effect of removing the menu bar from the window. + * + * **Note:** The default menu will be created automatically if the app does not set + * one. It contains standard items such as `File`, `Edit`, `View`, `Window` and + * `Help`. + */ + static setApplicationMenu(menu: (Menu) | (null)): void; + /** + * Appends the `menuItem` to the menu. + */ + append(menuItem: MenuItem): void; + /** + * Closes the context menu in the `browserWindow`. + */ + closePopup(browserWindow?: BrowserWindow): void; + /** + * the item with the specified `id` + */ + getMenuItemById(id: string): (MenuItem) | (null); + /** + * Inserts the `menuItem` to the `pos` position of the menu. + */ + insert(pos: number, menuItem: MenuItem): void; + /** + * Pops up this menu as a context menu in the `BrowserWindow`. + */ + popup(options?: PopupOptions): void; + items: MenuItem[]; + } + + class MenuItem { + + // Docs: https://electronjs.org/docs/api/menu-item + + /** + * MenuItem + */ + constructor(options: MenuItemConstructorOptions); + accelerator?: Accelerator; + checked: boolean; + click: Function; + commandId: number; + enabled: boolean; + icon?: (NativeImage) | (string); + id: string; + label: string; + menu: Menu; + registerAccelerator: boolean; + role?: ('undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'pasteAndMatchStyle' | 'delete' | 'selectAll' | 'reload' | 'forceReload' | 'toggleDevTools' | 'resetZoom' | 'zoomIn' | 'zoomOut' | 'togglefullscreen' | 'window' | 'minimize' | 'close' | 'help' | 'about' | 'services' | 'hide' | 'hideOthers' | 'unhide' | 'quit' | 'startSpeaking' | 'stopSpeaking' | 'zoom' | 'front' | 'appMenu' | 'fileMenu' | 'editMenu' | 'viewMenu' | 'recentDocuments' | 'toggleTabBar' | 'selectNextTab' | 'selectPreviousTab' | 'mergeAllWindows' | 'clearRecentDocuments' | 'moveTabToNewWindow' | 'windowMenu'); + sharingItem: SharingItem; + sublabel: string; + submenu?: Menu; + toolTip: string; + type: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio'); + visible: boolean; + } + + class MessageChannelMain extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/message-channel-main + + port1: MessagePortMain; + port2: MessagePortMain; + } + + class MessagePortMain extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/message-port-main + + /** + * Emitted when the remote end of a MessagePortMain object becomes disconnected. + */ + on(event: 'close', listener: Function): this; + once(event: 'close', listener: Function): this; + addListener(event: 'close', listener: Function): this; + removeListener(event: 'close', listener: Function): this; + /** + * Emitted when a MessagePortMain object receives a message. + */ + on(event: 'message', listener: (messageEvent: MessageEvent) => void): this; + once(event: 'message', listener: (messageEvent: MessageEvent) => void): this; + addListener(event: 'message', listener: (messageEvent: MessageEvent) => void): this; + removeListener(event: 'message', listener: (messageEvent: MessageEvent) => void): this; + /** + * Disconnects the port, so it is no longer active. + */ + close(): void; + /** + * Sends a message from the port, and optionally, transfers ownership of objects to + * other browsing contexts. + */ + postMessage(message: any, transfer?: MessagePortMain[]): void; + /** + * Starts the sending of messages queued on the port. Messages will be queued until + * this method is called. + */ + start(): void; + } + + interface MimeTypedBuffer { + + // Docs: https://electronjs.org/docs/api/structures/mime-typed-buffer + + /** + * Charset of the buffer. + */ + charset?: string; + /** + * The actual Buffer content. + */ + data: Buffer; + /** + * MIME type of the buffer. + */ + mimeType?: string; + } + + interface MouseInputEvent extends InputEvent { + + // Docs: https://electronjs.org/docs/api/structures/mouse-input-event + + /** + * The button pressed, can be `left`, `middle`, `right`. + */ + button?: ('left' | 'middle' | 'right'); + clickCount?: number; + globalX?: number; + globalY?: number; + movementX?: number; + movementY?: number; + /** + * The type of the event, can be `mouseDown`, `mouseUp`, `mouseEnter`, + * `mouseLeave`, `contextMenu`, `mouseWheel` or `mouseMove`. + */ + type: ('mouseDown' | 'mouseUp' | 'mouseEnter' | 'mouseLeave' | 'contextMenu' | 'mouseWheel' | 'mouseMove'); + x: number; + y: number; + } + + interface MouseWheelInputEvent extends MouseInputEvent { + + // Docs: https://electronjs.org/docs/api/structures/mouse-wheel-input-event + + accelerationRatioX?: number; + accelerationRatioY?: number; + canScroll?: boolean; + deltaX?: number; + deltaY?: number; + hasPreciseScrollingDeltas?: boolean; + /** + * The type of the event, can be `mouseWheel`. + */ + type: ('mouseWheel'); + wheelTicksX?: number; + wheelTicksY?: number; + } + + class NativeImage { + + // Docs: https://electronjs.org/docs/api/native-image + + /** + * Creates an empty `NativeImage` instance. + */ + static createEmpty(): NativeImage; + /** + * Creates a new `NativeImage` instance from `buffer` that contains the raw bitmap + * pixel data returned by `toBitmap()`. The specific format is platform-dependent. + */ + static createFromBitmap(buffer: Buffer, options: CreateFromBitmapOptions): NativeImage; + /** + * Creates a new `NativeImage` instance from `buffer`. Tries to decode as PNG or + * JPEG first. + */ + static createFromBuffer(buffer: Buffer, options?: CreateFromBufferOptions): NativeImage; + /** + * Creates a new `NativeImage` instance from `dataURL`. + */ + static createFromDataURL(dataURL: string): NativeImage; + /** + * Creates a new `NativeImage` instance from the NSImage that maps to the given + * image name. See `System Icons` for a list of possible values. + * + * The `hslShift` is applied to the image with the following rules: + * + * * `hsl_shift[0]` (hue): The absolute hue value for the image - 0 and 1 map to 0 + * and 360 on the hue color wheel (red). + * * `hsl_shift[1]` (saturation): A saturation shift for the image, with the + * following key values: 0 = remove all color. 0.5 = leave unchanged. 1 = fully + * saturate the image. + * * `hsl_shift[2]` (lightness): A lightness shift for the image, with the + * following key values: 0 = remove all lightness (make all pixels black). 0.5 = + * leave unchanged. 1 = full lightness (make all pixels white). + * + * This means that `[-1, 0, 1]` will make the image completely white and `[-1, 1, + * 0]` will make the image completely black. + * + * In some cases, the `NSImageName` doesn't match its string representation; one + * example of this is `NSFolderImageName`, whose string representation would + * actually be `NSFolder`. Therefore, you'll need to determine the correct string + * representation for your image before passing it in. This can be done with the + * following: + * + * `echo -e '#import \nint main() { NSLog(@"%@", SYSTEM_IMAGE_NAME); + * }' | clang -otest -x objective-c -framework Cocoa - && ./test` + * +where `SYSTEM_IMAGE_NAME` should be replaced with any value from this list. + * + * @platform darwin + */ + static createFromNamedImage(imageName: string, hslShift?: number[]): NativeImage; + /** + * Creates a new `NativeImage` instance from a file located at `path`. This method + * returns an empty image if the `path` does not exist, cannot be read, or is not a + * valid image. + */ + static createFromPath(path: string): NativeImage; + /** + * fulfilled with the file's thumbnail preview image, which is a NativeImage. + * + * @platform darwin,win32 + */ + static createThumbnailFromPath(path: string, maxSize: Size): Promise; + /** + * Add an image representation for a specific scale factor. This can be used to + * explicitly add different scale factor representations to an image. This can be + * called on empty images. + */ + addRepresentation(options: AddRepresentationOptions): void; + /** + * The cropped image. + */ + crop(rect: Rectangle): NativeImage; + /** + * The image's aspect ratio. + * + * If `scaleFactor` is passed, this will return the aspect ratio corresponding to + * the image representation most closely matching the passed value. + */ + getAspectRatio(scaleFactor?: number): number; + /** + * A Buffer that contains the image's raw bitmap pixel data. + * + * The difference between `getBitmap()` and `toBitmap()` is that `getBitmap()` does + * not copy the bitmap data, so you have to use the returned Buffer immediately in + * current event loop tick; otherwise the data might be changed or destroyed. + */ + getBitmap(options?: BitmapOptions): Buffer; + /** + * A Buffer that stores C pointer to underlying native handle of the image. On + * macOS, a pointer to `NSImage` instance would be returned. + * + * Notice that the returned pointer is a weak pointer to the underlying native + * image instead of a copy, so you _must_ ensure that the associated `nativeImage` + * instance is kept around. + * + * @platform darwin + */ + getNativeHandle(): Buffer; + /** + * An array of all scale factors corresponding to representations for a given + * nativeImage. + */ + getScaleFactors(): number[]; + /** + * If `scaleFactor` is passed, this will return the size corresponding to the image + * representation most closely matching the passed value. + */ + getSize(scaleFactor?: number): Size; + /** + * Whether the image is empty. + */ + isEmpty(): boolean; + /** + * Whether the image is a template image. + */ + isTemplateImage(): boolean; + /** + * The resized image. + * + * If only the `height` or the `width` are specified then the current aspect ratio + * will be preserved in the resized image. + */ + resize(options: ResizeOptions): NativeImage; + /** + * Marks the image as a template image. + */ + setTemplateImage(option: boolean): void; + /** + * A Buffer that contains a copy of the image's raw bitmap pixel data. + */ + toBitmap(options?: ToBitmapOptions): Buffer; + /** + * The data URL of the image. + */ + toDataURL(options?: ToDataURLOptions): string; + /** + * A Buffer that contains the image's `JPEG` encoded data. + */ + toJPEG(quality: number): Buffer; + /** + * A Buffer that contains the image's `PNG` encoded data. + */ + toPNG(options?: ToPNGOptions): Buffer; + isMacTemplateImage: boolean; + } + + interface NativeTheme extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/native-theme + + /** + * Emitted when something in the underlying NativeTheme has changed. This normally + * means that either the value of `shouldUseDarkColors`, + * `shouldUseHighContrastColors` or `shouldUseInvertedColorScheme` has changed. You + * will have to check them to determine which one has changed. + */ + on(event: 'updated', listener: Function): this; + once(event: 'updated', listener: Function): this; + addListener(event: 'updated', listener: Function): this; + removeListener(event: 'updated', listener: Function): this; + /** + * A `Boolean` for if the OS / Chromium currently has a dark mode enabled or is + * being instructed to show a dark-style UI. If you want to modify this value you + * should use `themeSource` below. + * + */ + readonly shouldUseDarkColors: boolean; + /** + * A `Boolean` for if the OS / Chromium currently has high-contrast mode enabled or + * is being instructed to show a high-contrast UI. + * + * @platform darwin,win32 + */ + readonly shouldUseHighContrastColors: boolean; + /** + * A `Boolean` for if the OS / Chromium currently has an inverted color scheme or + * is being instructed to use an inverted color scheme. + * + * @platform darwin,win32 + */ + readonly shouldUseInvertedColorScheme: boolean; + /** + * A `String` property that can be `system`, `light` or `dark`. It is used to + * override and supersede the value that Chromium has chosen to use internally. + * + * Setting this property to `system` will remove the override and everything will + * be reset to the OS default. By default `themeSource` is `system`. + * + * Settings this property to `dark` will have the following effects: + * + * * `nativeTheme.shouldUseDarkColors` will be `true` when accessed + * * Any UI Electron renders on Linux and Windows including context menus, + * devtools, etc. will use the dark UI. + * * Any UI the OS renders on macOS including menus, window frames, etc. will use + * the dark UI. + * * The `prefers-color-scheme` CSS query will match `dark` mode. + * * The `updated` event will be emitted + * + * Settings this property to `light` will have the following effects: + * + * * `nativeTheme.shouldUseDarkColors` will be `false` when accessed + * * Any UI Electron renders on Linux and Windows including context menus, + * devtools, etc. will use the light UI. + * * Any UI the OS renders on macOS including menus, window frames, etc. will use + * the light UI. + * * The `prefers-color-scheme` CSS query will match `light` mode. + * * The `updated` event will be emitted + * + * The usage of this property should align with a classic "dark mode" state machine + * in your application where the user has three options. + * + * * `Follow OS` --> `themeSource = 'system'` + * * `Dark Mode` --> `themeSource = 'dark'` + * * `Light Mode` --> `themeSource = 'light'` + * + * Your application should then always use `shouldUseDarkColors` to determine what + * CSS to apply. + */ + themeSource: ('system' | 'light' | 'dark'); + } + + interface Net { + + // Docs: https://electronjs.org/docs/api/net + + /** + * Whether there is currently internet connection. + * + * A return value of `false` is a pretty strong indicator that the user won't be + * able to connect to remote sites. However, a return value of `true` is + * inconclusive; even if some link is up, it is uncertain whether a particular + * connection attempt to a particular remote site will be successful. + */ + isOnline(): boolean; + /** + * Creates a `ClientRequest` instance using the provided `options` which are + * directly forwarded to the `ClientRequest` constructor. The `net.request` method + * would be used to issue both secure and insecure HTTP requests according to the + * specified protocol scheme in the `options` object. + */ + request(options: (ClientRequestConstructorOptions) | (string)): ClientRequest; + /** + * A `Boolean` property. Whether there is currently internet connection. + * + * A return value of `false` is a pretty strong indicator that the user won't be + * able to connect to remote sites. However, a return value of `true` is + * inconclusive; even if some link is up, it is uncertain whether a particular + * connection attempt to a particular remote site will be successful. + * + */ + readonly online: boolean; + } + + interface NetLog { + + // Docs: https://electronjs.org/docs/api/net-log + + /** + * resolves when the net log has begun recording. + * +Starts recording network events to `path`. + */ + startLogging(path: string, options?: StartLoggingOptions): Promise; + /** + * resolves when the net log has been flushed to disk. + * + * Stops recording network events. If not called, net logging will automatically + * end when app quits. + */ + stopLogging(): Promise; + /** + * A `Boolean` property that indicates whether network logs are currently being + * recorded. + * + */ + readonly currentlyLogging: boolean; + } + + interface NewWindowWebContentsEvent extends Event { + + // Docs: https://electronjs.org/docs/api/structures/new-window-web-contents-event + + newGuest?: BrowserWindow; + } + + class Notification extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/notification + + on(event: 'action', listener: (event: Event, + /** + * The index of the action that was activated. + */ + index: number) => void): this; + once(event: 'action', listener: (event: Event, + /** + * The index of the action that was activated. + */ + index: number) => void): this; + addListener(event: 'action', listener: (event: Event, + /** + * The index of the action that was activated. + */ + index: number) => void): this; + removeListener(event: 'action', listener: (event: Event, + /** + * The index of the action that was activated. + */ + index: number) => void): this; + /** + * Emitted when the notification is clicked by the user. + */ + on(event: 'click', listener: (event: Event) => void): this; + once(event: 'click', listener: (event: Event) => void): this; + addListener(event: 'click', listener: (event: Event) => void): this; + removeListener(event: 'click', listener: (event: Event) => void): this; + /** + * Emitted when the notification is closed by manual intervention from the user. + * + * This event is not guaranteed to be emitted in all cases where the notification + * is closed. + */ + on(event: 'close', listener: (event: Event) => void): this; + once(event: 'close', listener: (event: Event) => void): this; + addListener(event: 'close', listener: (event: Event) => void): this; + removeListener(event: 'close', listener: (event: Event) => void): this; + /** + * Emitted when an error is encountered while creating and showing the native + * notification. + * + * @platform win32 + */ + on(event: 'failed', listener: (event: Event, + /** + * The error encountered during execution of the `show()` method. + */ + error: string) => void): this; + once(event: 'failed', listener: (event: Event, + /** + * The error encountered during execution of the `show()` method. + */ + error: string) => void): this; + addListener(event: 'failed', listener: (event: Event, + /** + * The error encountered during execution of the `show()` method. + */ + error: string) => void): this; + removeListener(event: 'failed', listener: (event: Event, + /** + * The error encountered during execution of the `show()` method. + */ + error: string) => void): this; + /** + * Emitted when the user clicks the "Reply" button on a notification with + * `hasReply: true`. + * + * @platform darwin + */ + on(event: 'reply', listener: (event: Event, + /** + * The string the user entered into the inline reply field. + */ + reply: string) => void): this; + once(event: 'reply', listener: (event: Event, + /** + * The string the user entered into the inline reply field. + */ + reply: string) => void): this; + addListener(event: 'reply', listener: (event: Event, + /** + * The string the user entered into the inline reply field. + */ + reply: string) => void): this; + removeListener(event: 'reply', listener: (event: Event, + /** + * The string the user entered into the inline reply field. + */ + reply: string) => void): this; + /** + * Emitted when the notification is shown to the user, note this could be fired + * multiple times as a notification can be shown multiple times through the + * `show()` method. + */ + on(event: 'show', listener: (event: Event) => void): this; + once(event: 'show', listener: (event: Event) => void): this; + addListener(event: 'show', listener: (event: Event) => void): this; + removeListener(event: 'show', listener: (event: Event) => void): this; + /** + * Notification + */ + constructor(options?: NotificationConstructorOptions); + /** + * Whether or not desktop notifications are supported on the current system + */ + static isSupported(): boolean; + /** + * Dismisses the notification. + */ + close(): void; + /** + * Immediately shows the notification to the user, please note this means unlike + * the HTML5 Notification implementation, instantiating a `new Notification` does + * not immediately show it to the user, you need to call this method before the OS + * will display it. + * + * If the notification has been shown before, this method will dismiss the + * previously shown notification and create a new one with identical properties. + */ + show(): void; + actions: NotificationAction[]; + body: string; + closeButtonText: string; + hasReply: boolean; + replyPlaceholder: string; + silent: boolean; + sound: string; + subtitle: string; + timeoutType: ('default' | 'never'); + title: string; + toastXml: string; + urgency: ('normal' | 'critical' | 'low'); + } + + interface NotificationAction { + + // Docs: https://electronjs.org/docs/api/structures/notification-action + + /** + * The label for the given action. + */ + text?: string; + /** + * The type of action, can be `button`. + */ + type: ('button'); + } + + interface NotificationResponse { + + // Docs: https://electronjs.org/docs/api/structures/notification-response + + /** + * The identifier string of the action that the user selected. + */ + actionIdentifier: string; + /** + * The delivery date of the notification. + */ + date: number; + /** + * The unique identifier for this notification request. + */ + identifier: string; + /** + * A dictionary of custom information associated with the notification. + */ + userInfo: Record; + /** + * The text entered or chosen by the user. + */ + userText?: string; + } + + interface Point { + + // Docs: https://electronjs.org/docs/api/structures/point + + x: number; + y: number; + } + + interface PostBody { + + // Docs: https://electronjs.org/docs/api/structures/post-body + + /** + * The boundary used to separate multiple parts of the message. Only valid when + * `contentType` is `multipart/form-data`. + */ + boundary?: string; + /** + * The `content-type` header used for the data. One of + * `application/x-www-form-urlencoded` or `multipart/form-data`. Corresponds to the + * `enctype` attribute of the submitted HTML form. + */ + contentType: string; + /** + * The post data to be sent to the new window. + */ + data: Array<(UploadRawData) | (UploadFile)>; + } + + interface PowerMonitor extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/power-monitor + + /** + * Emitted when the system is about to lock the screen. + * + * @platform darwin,win32 + */ + on(event: 'lock-screen', listener: Function): this; + once(event: 'lock-screen', listener: Function): this; + addListener(event: 'lock-screen', listener: Function): this; + removeListener(event: 'lock-screen', listener: Function): this; + /** + * Emitted when the system changes to AC power. + * + * @platform darwin,win32 + */ + on(event: 'on-ac', listener: Function): this; + once(event: 'on-ac', listener: Function): this; + addListener(event: 'on-ac', listener: Function): this; + removeListener(event: 'on-ac', listener: Function): this; + /** + * Emitted when system changes to battery power. + * + * @platform darwin + */ + on(event: 'on-battery', listener: Function): this; + once(event: 'on-battery', listener: Function): this; + addListener(event: 'on-battery', listener: Function): this; + removeListener(event: 'on-battery', listener: Function): this; + /** + * Emitted when system is resuming. + * + * @platform darwin,win32 + */ + on(event: 'resume', listener: Function): this; + once(event: 'resume', listener: Function): this; + addListener(event: 'resume', listener: Function): this; + removeListener(event: 'resume', listener: Function): this; + /** + * Emitted when the system is about to reboot or shut down. If the event handler + * invokes `e.preventDefault()`, Electron will attempt to delay system shutdown in + * order for the app to exit cleanly. If `e.preventDefault()` is called, the app + * should exit as soon as possible by calling something like `app.quit()`. + * + * @platform linux,darwin + */ + on(event: 'shutdown', listener: Function): this; + once(event: 'shutdown', listener: Function): this; + addListener(event: 'shutdown', listener: Function): this; + removeListener(event: 'shutdown', listener: Function): this; + /** + * Emitted when the system is suspending. + * + * @platform darwin,win32 + */ + on(event: 'suspend', listener: Function): this; + once(event: 'suspend', listener: Function): this; + addListener(event: 'suspend', listener: Function): this; + removeListener(event: 'suspend', listener: Function): this; + /** + * Emitted as soon as the systems screen is unlocked. + * + * @platform darwin,win32 + */ + on(event: 'unlock-screen', listener: Function): this; + once(event: 'unlock-screen', listener: Function): this; + addListener(event: 'unlock-screen', listener: Function): this; + removeListener(event: 'unlock-screen', listener: Function): this; + /** + * Emitted when a login session is activated. See documentation for more + * information. + * + * @platform darwin + */ + on(event: 'user-did-become-active', listener: Function): this; + once(event: 'user-did-become-active', listener: Function): this; + addListener(event: 'user-did-become-active', listener: Function): this; + removeListener(event: 'user-did-become-active', listener: Function): this; + /** + * Emitted when a login session is deactivated. See documentation for more + * information. + * + * @platform darwin + */ + on(event: 'user-did-resign-active', listener: Function): this; + once(event: 'user-did-resign-active', listener: Function): this; + addListener(event: 'user-did-resign-active', listener: Function): this; + removeListener(event: 'user-did-resign-active', listener: Function): this; + /** + * The system's current state. Can be `active`, `idle`, `locked` or `unknown`. + * + * Calculate the system idle state. `idleThreshold` is the amount of time (in + * seconds) before considered idle. `locked` is available on supported systems + * only. + */ + getSystemIdleState(idleThreshold: number): ('active' | 'idle' | 'locked' | 'unknown'); + /** + * Idle time in seconds + +Calculate system idle time in seconds. + */ + getSystemIdleTime(): number; + /** + * Whether the system is on battery power. + * + * To monitor for changes in this property, use the `on-battery` and `on-ac` + * events. + */ + isOnBatteryPower(): boolean; + /** + * A `Boolean` property. True if the system is on battery power. + * +See `powerMonitor.isOnBatteryPower()`. + */ + onBatteryPower: boolean; + } + + interface PowerSaveBlocker { + + // Docs: https://electronjs.org/docs/api/power-save-blocker + + /** + * Whether the corresponding `powerSaveBlocker` has started. + */ + isStarted(id: number): boolean; + /** + * The blocker ID that is assigned to this power blocker. + * + * Starts preventing the system from entering lower-power mode. Returns an integer + * identifying the power save blocker. + * + * **Note:** `prevent-display-sleep` has higher precedence over + * `prevent-app-suspension`. Only the highest precedence type takes effect. In + * other words, `prevent-display-sleep` always takes precedence over + * `prevent-app-suspension`. + * + * For example, an API calling A requests for `prevent-app-suspension`, and another + * calling B requests for `prevent-display-sleep`. `prevent-display-sleep` will be + * used until B stops its request. After that, `prevent-app-suspension` is used. + */ + start(type: 'prevent-app-suspension' | 'prevent-display-sleep'): number; + /** + * Stops the specified power save blocker. + */ + stop(id: number): void; + } + + interface PrinterInfo { + + // Docs: https://electronjs.org/docs/api/structures/printer-info + + /** + * a longer description of the printer's type. + */ + description: string; + /** + * the name of the printer as shown in Print Preview. + */ + displayName: string; + /** + * whether or not a given printer is set as the default printer on the OS. + */ + isDefault: boolean; + /** + * the name of the printer as understood by the OS. + */ + name: string; + /** + * an object containing a variable number of platform-specific printer information. + */ + options: Options; + /** + * the current status of the printer. + */ + status: number; + } + + interface ProcessMemoryInfo { + + // Docs: https://electronjs.org/docs/api/structures/process-memory-info + + /** + * The amount of memory not shared by other processes, such as JS heap or HTML + * content in Kilobytes. + */ + private: number; + /** + * The amount of memory currently pinned to actual physical RAM in Kilobytes. + * + * @platform linux,win32 + */ + residentSet: number; + /** + * The amount of memory shared between processes, typically memory consumed by the + * Electron code itself in Kilobytes. + */ + shared: number; + } + + interface ProcessMetric { + + // Docs: https://electronjs.org/docs/api/structures/process-metric + + /** + * CPU usage of the process. + */ + cpu: CPUUsage; + /** + * Creation time for this process. The time is represented as number of + * milliseconds since epoch. Since the `pid` can be reused after a process dies, it + * is useful to use both the `pid` and the `creationTime` to uniquely identify a + * process. + */ + creationTime: number; + /** + * One of the following values: + * + * @platform win32 + */ + integrityLevel?: ('untrusted' | 'low' | 'medium' | 'high' | 'unknown'); + /** + * Memory information for the process. + */ + memory: MemoryInfo; + /** + * The name of the process. Examples for utility: `Audio Service`, `Content + * Decryption Module Service`, `Network Service`, `Video Capture`, etc. + */ + name?: string; + /** + * Process id of the process. + */ + pid: number; + /** + * Whether the process is sandboxed on OS level. + * + * @platform darwin,win32 + */ + sandboxed?: boolean; + /** + * The non-localized name of the process. + */ + serviceName?: string; + /** + * Process type. One of the following values: + */ + type: ('Browser' | 'Tab' | 'Utility' | 'Zygote' | 'Sandbox helper' | 'GPU' | 'Pepper Plugin' | 'Pepper Plugin Broker' | 'Unknown'); + } + + interface Product { + + // Docs: https://electronjs.org/docs/api/structures/product + + /** + * The total size of the content, in bytes. + */ + contentLengths: number[]; + /** + * A string that identifies the version of the content. + */ + contentVersion: string; + /** + * 3 character code presenting a product's currency based on the ISO 4217 standard. + */ + currencyCode: string; + /** + * The locale formatted price of the product. + */ + formattedPrice: string; + /** + * A Boolean value that indicates whether the App Store has downloadable content + * for this product. `true` if at least one file has been associated with the + * product. + */ + isDownloadable: boolean; + /** + * A description of the product. + */ + localizedDescription: string; + /** + * The name of the product. + */ + localizedTitle: string; + /** + * The cost of the product in the local currency. + */ + price: number; + /** + * The string that identifies the product to the Apple App Store. + */ + productIdentifier: string; + } + + interface Protocol { + + // Docs: https://electronjs.org/docs/api/protocol + + /** + * Whether the protocol was successfully intercepted + * + * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler + * which sends a `Buffer` as a response. + */ + interceptBufferProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (Buffer) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether the protocol was successfully intercepted + * + * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler + * which sends a file as a response. + */ + interceptFileProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether the protocol was successfully intercepted + * + * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler + * which sends a new HTTP request as a response. + */ + interceptHttpProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: ProtocolResponse) => void) => void): boolean; + /** + * Whether the protocol was successfully intercepted + * + * Same as `protocol.registerStreamProtocol`, except that it replaces an existing + * protocol handler. + */ + interceptStreamProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (NodeJS.ReadableStream) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether the protocol was successfully intercepted + * + * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler + * which sends a `String` as a response. + */ + interceptStringProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether `scheme` is already intercepted. + */ + isProtocolIntercepted(scheme: string): boolean; + /** + * Whether `scheme` is already registered. + */ + isProtocolRegistered(scheme: string): boolean; + /** + * Whether the protocol was successfully registered + * + * Registers a protocol of `scheme` that will send a `Buffer` as a response. + * + * The usage is the same with `registerFileProtocol`, except that the `callback` + * should be called with either a `Buffer` object or an object that has the `data` + * property. + +Example: + */ + registerBufferProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (Buffer) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether the protocol was successfully registered + * + * Registers a protocol of `scheme` that will send a file as the response. The + * `handler` will be called with `request` and `callback` where `request` is an + * incoming request for the `scheme`. + * + * To handle the `request`, the `callback` should be called with either the file's + * path or an object that has a `path` property, e.g. `callback(filePath)` or + * `callback({ path: filePath })`. The `filePath` must be an absolute path. + * + * By default the `scheme` is treated like `http:`, which is parsed differently + * from protocols that follow the "generic URI syntax" like `file:`. + */ + registerFileProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean; + /** + * Whether the protocol was successfully registered + * + * Registers a protocol of `scheme` that will send an HTTP request as a response. + * + * The usage is the same with `registerFileProtocol`, except that the `callback` + * should be called with an object that has the `url` property. + */ + registerHttpProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: ProtocolResponse) => void) => void): boolean; + /** + * **Note:** This method can only be used before the `ready` event of the `app` + * module gets emitted and can be called only once. + * + * Registers the `scheme` as standard, secure, bypasses content security policy for + * resources, allows registering ServiceWorker, supports fetch API, and streaming + * video/audio. Specify a privilege with the value of `true` to enable the + * capability. + * + * An example of registering a privileged scheme, that bypasses Content Security + * Policy: + * + * A standard scheme adheres to what RFC 3986 calls generic URI syntax. For example + * `http` and `https` are standard schemes, while `file` is not. + * + * Registering a scheme as standard allows relative and absolute resources to be + * resolved correctly when served. Otherwise the scheme will behave like the `file` + * protocol, but without the ability to resolve relative URLs. + * + * For example when you load following page with custom protocol without + * registering it as standard scheme, the image will not be loaded because + * non-standard schemes can not recognize relative URLs: + * + * Registering a scheme as standard will allow access to files through the + * FileSystem API. Otherwise the renderer will throw a security error for the + * scheme. + * + * By default web storage apis (localStorage, sessionStorage, webSQL, indexedDB, + * cookies) are disabled for non standard schemes. So in general if you want to + * register a custom protocol to replace the `http` protocol, you have to register + * it as a standard scheme. + * + * Protocols that use streams (http and stream protocols) should set `stream: + * true`. The ``. + * + * By default a new `BrowserWindow` will be created for the `url`. + * + * Calling `event.preventDefault()` will prevent Electron from automatically + * creating a new `BrowserWindow`. If you call `event.preventDefault()` and + * manually create a new `BrowserWindow` then you must set `event.newGuest` to + * reference the new `BrowserWindow` instance, failing to do so may result in + * unexpected behavior. For example: + * + * @deprecated + */ + on(event: 'new-window', listener: (event: NewWindowWebContentsEvent, + url: string, + frameName: string, + /** + * Can be `default`, `foreground-tab`, `background-tab`, `new-window`, + * `save-to-disk` and `other`. + */ + disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'), + /** + * The options which will be used for creating the new `BrowserWindow`. + */ + options: BrowserWindowConstructorOptions, + /** + * The non-standard features (features not handled by Chromium or Electron) given + * to `window.open()`. + */ + additionalFeatures: string[], + /** + * The referrer that will be passed to the new window. May or may not result in the + * `Referer` header being sent, depending on the referrer policy. + */ + referrer: Referrer, + /** + * The post data that will be sent to the new window, along with the appropriate + * headers that will be set. If no post data is to be sent, the value will be + * `null`. Only defined when the window is being created by a form that set + * `target=_blank`. + */ + postBody: PostBody) => void): this; + once(event: 'new-window', listener: (event: NewWindowWebContentsEvent, + url: string, + frameName: string, + /** + * Can be `default`, `foreground-tab`, `background-tab`, `new-window`, + * `save-to-disk` and `other`. + */ + disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'), + /** + * The options which will be used for creating the new `BrowserWindow`. + */ + options: BrowserWindowConstructorOptions, + /** + * The non-standard features (features not handled by Chromium or Electron) given + * to `window.open()`. + */ + additionalFeatures: string[], + /** + * The referrer that will be passed to the new window. May or may not result in the + * `Referer` header being sent, depending on the referrer policy. + */ + referrer: Referrer, + /** + * The post data that will be sent to the new window, along with the appropriate + * headers that will be set. If no post data is to be sent, the value will be + * `null`. Only defined when the window is being created by a form that set + * `target=_blank`. + */ + postBody: PostBody) => void): this; + addListener(event: 'new-window', listener: (event: NewWindowWebContentsEvent, + url: string, + frameName: string, + /** + * Can be `default`, `foreground-tab`, `background-tab`, `new-window`, + * `save-to-disk` and `other`. + */ + disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'), + /** + * The options which will be used for creating the new `BrowserWindow`. + */ + options: BrowserWindowConstructorOptions, + /** + * The non-standard features (features not handled by Chromium or Electron) given + * to `window.open()`. + */ + additionalFeatures: string[], + /** + * The referrer that will be passed to the new window. May or may not result in the + * `Referer` header being sent, depending on the referrer policy. + */ + referrer: Referrer, + /** + * The post data that will be sent to the new window, along with the appropriate + * headers that will be set. If no post data is to be sent, the value will be + * `null`. Only defined when the window is being created by a form that set + * `target=_blank`. + */ + postBody: PostBody) => void): this; + removeListener(event: 'new-window', listener: (event: NewWindowWebContentsEvent, + url: string, + frameName: string, + /** + * Can be `default`, `foreground-tab`, `background-tab`, `new-window`, + * `save-to-disk` and `other`. + */ + disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'), + /** + * The options which will be used for creating the new `BrowserWindow`. + */ + options: BrowserWindowConstructorOptions, + /** + * The non-standard features (features not handled by Chromium or Electron) given + * to `window.open()`. + */ + additionalFeatures: string[], + /** + * The referrer that will be passed to the new window. May or may not result in the + * `Referer` header being sent, depending on the referrer policy. + */ + referrer: Referrer, + /** + * The post data that will be sent to the new window, along with the appropriate + * headers that will be set. If no post data is to be sent, the value will be + * `null`. Only defined when the window is being created by a form that set + * `target=_blank`. + */ + postBody: PostBody) => void): this; + /** + * Emitted when page receives favicon urls. + */ + on(event: 'page-favicon-updated', listener: (event: Event, + /** + * Array of URLs. + */ + favicons: string[]) => void): this; + once(event: 'page-favicon-updated', listener: (event: Event, + /** + * Array of URLs. + */ + favicons: string[]) => void): this; + addListener(event: 'page-favicon-updated', listener: (event: Event, + /** + * Array of URLs. + */ + favicons: string[]) => void): this; + removeListener(event: 'page-favicon-updated', listener: (event: Event, + /** + * Array of URLs. + */ + favicons: string[]) => void): this; + /** + * Fired when page title is set during navigation. `explicitSet` is false when + * title is synthesized from file url. + */ + on(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + once(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + addListener(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + removeListener(event: 'page-title-updated', listener: (event: Event, + title: string, + explicitSet: boolean) => void): this; + /** + * Emitted when a new frame is generated. Only the dirty area is passed in the + * buffer. + */ + on(event: 'paint', listener: (event: Event, + dirtyRect: Rectangle, + /** + * The image data of the whole frame. + */ + image: NativeImage) => void): this; + once(event: 'paint', listener: (event: Event, + dirtyRect: Rectangle, + /** + * The image data of the whole frame. + */ + image: NativeImage) => void): this; + addListener(event: 'paint', listener: (event: Event, + dirtyRect: Rectangle, + /** + * The image data of the whole frame. + */ + image: NativeImage) => void): this; + removeListener(event: 'paint', listener: (event: Event, + dirtyRect: Rectangle, + /** + * The image data of the whole frame. + */ + image: NativeImage) => void): this; + /** + * Emitted when a plugin process has crashed. + */ + on(event: 'plugin-crashed', listener: (event: Event, + name: string, + version: string) => void): this; + once(event: 'plugin-crashed', listener: (event: Event, + name: string, + version: string) => void): this; + addListener(event: 'plugin-crashed', listener: (event: Event, + name: string, + version: string) => void): this; + removeListener(event: 'plugin-crashed', listener: (event: Event, + name: string, + version: string) => void): this; + /** + * Emitted when the `WebContents` preferred size has changed. + * + * This event will only be emitted when `enablePreferredSizeMode` is set to `true` + * in `webPreferences`. + */ + on(event: 'preferred-size-changed', listener: (event: Event, + /** + * The minimum size needed to contain the layout of the document—without requiring + * scrolling. + */ + preferredSize: Size) => void): this; + once(event: 'preferred-size-changed', listener: (event: Event, + /** + * The minimum size needed to contain the layout of the document—without requiring + * scrolling. + */ + preferredSize: Size) => void): this; + addListener(event: 'preferred-size-changed', listener: (event: Event, + /** + * The minimum size needed to contain the layout of the document—without requiring + * scrolling. + */ + preferredSize: Size) => void): this; + removeListener(event: 'preferred-size-changed', listener: (event: Event, + /** + * The minimum size needed to contain the layout of the document—without requiring + * scrolling. + */ + preferredSize: Size) => void): this; + /** + * Emitted when the preload script `preloadPath` throws an unhandled exception + * `error`. + */ + on(event: 'preload-error', listener: (event: Event, + preloadPath: string, + error: Error) => void): this; + once(event: 'preload-error', listener: (event: Event, + preloadPath: string, + error: Error) => void): this; + addListener(event: 'preload-error', listener: (event: Event, + preloadPath: string, + error: Error) => void): this; + removeListener(event: 'preload-error', listener: (event: Event, + preloadPath: string, + error: Error) => void): this; + /** + * Emitted when `remote.getBuiltin()` is called in the renderer process. Calling + * `event.preventDefault()` will prevent the module from being returned. Custom + * value can be returned by setting `event.returnValue`. + * + * @deprecated + */ + on(event: 'remote-get-builtin', listener: (event: IpcMainEvent, + moduleName: string) => void): this; + once(event: 'remote-get-builtin', listener: (event: IpcMainEvent, + moduleName: string) => void): this; + addListener(event: 'remote-get-builtin', listener: (event: IpcMainEvent, + moduleName: string) => void): this; + removeListener(event: 'remote-get-builtin', listener: (event: IpcMainEvent, + moduleName: string) => void): this; + /** + * Emitted when `remote.getCurrentWebContents()` is called in the renderer process. + * Calling `event.preventDefault()` will prevent the object from being returned. + * Custom value can be returned by setting `event.returnValue`. + * + * @deprecated + */ + on(event: 'remote-get-current-web-contents', listener: (event: IpcMainEvent) => void): this; + once(event: 'remote-get-current-web-contents', listener: (event: IpcMainEvent) => void): this; + addListener(event: 'remote-get-current-web-contents', listener: (event: IpcMainEvent) => void): this; + removeListener(event: 'remote-get-current-web-contents', listener: (event: IpcMainEvent) => void): this; + /** + * Emitted when `remote.getCurrentWindow()` is called in the renderer process. + * Calling `event.preventDefault()` will prevent the object from being returned. + * Custom value can be returned by setting `event.returnValue`. + * + * @deprecated + */ + on(event: 'remote-get-current-window', listener: (event: IpcMainEvent) => void): this; + once(event: 'remote-get-current-window', listener: (event: IpcMainEvent) => void): this; + addListener(event: 'remote-get-current-window', listener: (event: IpcMainEvent) => void): this; + removeListener(event: 'remote-get-current-window', listener: (event: IpcMainEvent) => void): this; + /** + * Emitted when `remote.getGlobal()` is called in the renderer process. Calling + * `event.preventDefault()` will prevent the global from being returned. Custom + * value can be returned by setting `event.returnValue`. + * + * @deprecated + */ + on(event: 'remote-get-global', listener: (event: IpcMainEvent, + globalName: string) => void): this; + once(event: 'remote-get-global', listener: (event: IpcMainEvent, + globalName: string) => void): this; + addListener(event: 'remote-get-global', listener: (event: IpcMainEvent, + globalName: string) => void): this; + removeListener(event: 'remote-get-global', listener: (event: IpcMainEvent, + globalName: string) => void): this; + /** + * Emitted when `remote.require()` is called in the renderer process. Calling + * `event.preventDefault()` will prevent the module from being returned. Custom + * value can be returned by setting `event.returnValue`. + * + * @deprecated + */ + on(event: 'remote-require', listener: (event: IpcMainEvent, + moduleName: string) => void): this; + once(event: 'remote-require', listener: (event: IpcMainEvent, + moduleName: string) => void): this; + addListener(event: 'remote-require', listener: (event: IpcMainEvent, + moduleName: string) => void): this; + removeListener(event: 'remote-require', listener: (event: IpcMainEvent, + moduleName: string) => void): this; + /** + * Emitted when the renderer process unexpectedly disappears. This is normally + * because it was crashed or killed. + */ + on(event: 'render-process-gone', listener: (event: Event, + details: RenderProcessGoneDetails) => void): this; + once(event: 'render-process-gone', listener: (event: Event, + details: RenderProcessGoneDetails) => void): this; + addListener(event: 'render-process-gone', listener: (event: Event, + details: RenderProcessGoneDetails) => void): this; + removeListener(event: 'render-process-gone', listener: (event: Event, + details: RenderProcessGoneDetails) => void): this; + /** + * Emitted when the unresponsive web page becomes responsive again. + */ + on(event: 'responsive', listener: Function): this; + once(event: 'responsive', listener: Function): this; + addListener(event: 'responsive', listener: Function): this; + removeListener(event: 'responsive', listener: Function): this; + /** + * Emitted when bluetooth device needs to be selected on call to + * `navigator.bluetooth.requestDevice`. To use `navigator.bluetooth` api + * `webBluetooth` should be enabled. If `event.preventDefault` is not called, first + * available device will be selected. `callback` should be called with `deviceId` + * to be selected, passing empty string to `callback` will cancel the request. + */ + on(event: 'select-bluetooth-device', listener: (event: Event, + devices: BluetoothDevice[], + callback: (deviceId: string) => void) => void): this; + once(event: 'select-bluetooth-device', listener: (event: Event, + devices: BluetoothDevice[], + callback: (deviceId: string) => void) => void): this; + addListener(event: 'select-bluetooth-device', listener: (event: Event, + devices: BluetoothDevice[], + callback: (deviceId: string) => void) => void): this; + removeListener(event: 'select-bluetooth-device', listener: (event: Event, + devices: BluetoothDevice[], + callback: (deviceId: string) => void) => void): this; + /** + * Emitted when a client certificate is requested. + * +The usage is the same with the `select-client-certificate` event of `app`. + */ + on(event: 'select-client-certificate', listener: (event: Event, + url: string, + certificateList: Certificate[], + callback: (certificate: Certificate) => void) => void): this; + once(event: 'select-client-certificate', listener: (event: Event, + url: string, + certificateList: Certificate[], + callback: (certificate: Certificate) => void) => void): this; + addListener(event: 'select-client-certificate', listener: (event: Event, + url: string, + certificateList: Certificate[], + callback: (certificate: Certificate) => void) => void): this; + removeListener(event: 'select-client-certificate', listener: (event: Event, + url: string, + certificateList: Certificate[], + callback: (certificate: Certificate) => void) => void): this; + /** + * Emitted when the web page becomes unresponsive. + */ + on(event: 'unresponsive', listener: Function): this; + once(event: 'unresponsive', listener: Function): this; + addListener(event: 'unresponsive', listener: Function): this; + removeListener(event: 'unresponsive', listener: Function): this; + /** + * Emitted when mouse moves over a link or the keyboard moves the focus to a link. + */ + on(event: 'update-target-url', listener: (event: Event, + url: string) => void): this; + once(event: 'update-target-url', listener: (event: Event, + url: string) => void): this; + addListener(event: 'update-target-url', listener: (event: Event, + url: string) => void): this; + removeListener(event: 'update-target-url', listener: (event: Event, + url: string) => void): this; + /** + * Emitted when a ``'s web contents is being attached to this web + * contents. Calling `event.preventDefault()` will destroy the guest page. + * + * This event can be used to configure `webPreferences` for the `webContents` of a + * `` before it's loaded, and provides the ability to set settings that + * can't be set via `` attributes. + * + * **Note:** The specified `preload` script option will appear as `preloadURL` (not + * `preload`) in the `webPreferences` object emitted with this event. + */ + on(event: 'will-attach-webview', listener: (event: Event, + /** + * The web preferences that will be used by the guest page. This object can be + * modified to adjust the preferences for the guest page. + */ + webPreferences: WebPreferences, + /** + * The other `` parameters such as the `src` URL. This object can be + * modified to adjust the parameters of the guest page. + */ + params: Record) => void): this; + once(event: 'will-attach-webview', listener: (event: Event, + /** + * The web preferences that will be used by the guest page. This object can be + * modified to adjust the preferences for the guest page. + */ + webPreferences: WebPreferences, + /** + * The other `` parameters such as the `src` URL. This object can be + * modified to adjust the parameters of the guest page. + */ + params: Record) => void): this; + addListener(event: 'will-attach-webview', listener: (event: Event, + /** + * The web preferences that will be used by the guest page. This object can be + * modified to adjust the preferences for the guest page. + */ + webPreferences: WebPreferences, + /** + * The other `` parameters such as the `src` URL. This object can be + * modified to adjust the parameters of the guest page. + */ + params: Record) => void): this; + removeListener(event: 'will-attach-webview', listener: (event: Event, + /** + * The web preferences that will be used by the guest page. This object can be + * modified to adjust the preferences for the guest page. + */ + webPreferences: WebPreferences, + /** + * The other `` parameters such as the `src` URL. This object can be + * modified to adjust the parameters of the guest page. + */ + params: Record) => void): this; + /** + * Emitted when a user or the page wants to start navigation. It can happen when + * the `window.location` object is changed or a user clicks a link in the page. + * + * This event will not emit when the navigation is started programmatically with + * APIs like `webContents.loadURL` and `webContents.back`. + * + * It is also not emitted for in-page navigations, such as clicking anchor links or + * updating the `window.location.hash`. Use `did-navigate-in-page` event for this + * purpose. + +Calling `event.preventDefault()` will prevent the navigation. + */ + on(event: 'will-navigate', listener: (event: Event, + url: string) => void): this; + once(event: 'will-navigate', listener: (event: Event, + url: string) => void): this; + addListener(event: 'will-navigate', listener: (event: Event, + url: string) => void): this; + removeListener(event: 'will-navigate', listener: (event: Event, + url: string) => void): this; + /** + * Emitted when a `beforeunload` event handler is attempting to cancel a page + * unload. + * + * Calling `event.preventDefault()` will ignore the `beforeunload` event handler + * and allow the page to be unloaded. + */ + on(event: 'will-prevent-unload', listener: (event: Event) => void): this; + once(event: 'will-prevent-unload', listener: (event: Event) => void): this; + addListener(event: 'will-prevent-unload', listener: (event: Event) => void): this; + removeListener(event: 'will-prevent-unload', listener: (event: Event) => void): this; + /** + * Emitted as a server side redirect occurs during navigation. For example a 302 + * redirect. + * + * This event will be emitted after `did-start-navigation` and always before the + * `did-redirect-navigation` event for the same navigation. + * + * Calling `event.preventDefault()` will prevent the navigation (not just the + * redirect). + */ + on(event: 'will-redirect', listener: (event: Event, + url: string, + isInPlace: boolean, + isMainFrame: boolean, + frameProcessId: number, + frameRoutingId: number) => void): this; + once(event: 'will-redirect', listener: (event: Event, + url: string, + isInPlace: boolean, + isMainFrame: boolean, + frameProcessId: number, + frameRoutingId: number) => void): this; + addListener(event: 'will-redirect', listener: (event: Event, + url: string, + isInPlace: boolean, + isMainFrame: boolean, + frameProcessId: number, + frameRoutingId: number) => void): this; + removeListener(event: 'will-redirect', listener: (event: Event, + url: string, + isInPlace: boolean, + isMainFrame: boolean, + frameProcessId: number, + frameRoutingId: number) => void): this; + /** + * Emitted when the user is requesting to change the zoom level using the mouse + * wheel. + */ + on(event: 'zoom-changed', listener: (event: Event, + /** + * Can be `in` or `out`. + */ + zoomDirection: ('in' | 'out')) => void): this; + once(event: 'zoom-changed', listener: (event: Event, + /** + * Can be `in` or `out`. + */ + zoomDirection: ('in' | 'out')) => void): this; + addListener(event: 'zoom-changed', listener: (event: Event, + /** + * Can be `in` or `out`. + */ + zoomDirection: ('in' | 'out')) => void): this; + removeListener(event: 'zoom-changed', listener: (event: Event, + /** + * Can be `in` or `out`. + */ + zoomDirection: ('in' | 'out')) => void): this; + /** + * Adds the specified path to DevTools workspace. Must be used after DevTools + * creation: + */ + addWorkSpace(path: string): void; + /** + * Begin subscribing for presentation events and captured frames, the `callback` + * will be called with `callback(image, dirtyRect)` when there is a presentation + * event. + * + * The `image` is an instance of NativeImage that stores the captured frame. + * + * The `dirtyRect` is an object with `x, y, width, height` properties that + * describes which part of the page was repainted. If `onlyDirty` is set to `true`, + * `image` will only contain the repainted area. `onlyDirty` defaults to `false`. + */ + beginFrameSubscription(onlyDirty: boolean, callback: (image: NativeImage, dirtyRect: Rectangle) => void): void; + /** + * Begin subscribing for presentation events and captured frames, the `callback` + * will be called with `callback(image, dirtyRect)` when there is a presentation + * event. + * + * The `image` is an instance of NativeImage that stores the captured frame. + * + * The `dirtyRect` is an object with `x, y, width, height` properties that + * describes which part of the page was repainted. If `onlyDirty` is set to `true`, + * `image` will only contain the repainted area. `onlyDirty` defaults to `false`. + */ + beginFrameSubscription(callback: (image: NativeImage, dirtyRect: Rectangle) => void): void; + /** + * Whether the browser can go back to previous web page. + */ + canGoBack(): boolean; + /** + * Whether the browser can go forward to next web page. + */ + canGoForward(): boolean; + /** + * Whether the web page can go to `offset`. + */ + canGoToOffset(offset: number): boolean; + /** + * Resolves with a NativeImage + * + * Captures a snapshot of the page within `rect`. Omitting `rect` will capture the + * whole visible page. + */ + capturePage(rect?: Rectangle): Promise; + /** + * Clears the navigation history. + */ + clearHistory(): void; + /** + * Closes the devtools. + */ + closeDevTools(): void; + /** + * Executes the editing command `copy` in web page. + */ + copy(): void; + /** + * Copy the image at the given position to the clipboard. + */ + copyImageAt(x: number, y: number): void; + /** + * Executes the editing command `cut` in web page. + */ + cut(): void; + /** + * Decrease the capturer count by one. The page will be set to hidden or occluded + * state when its browser window is hidden or occluded and the capturer count + * reaches zero. If you want to decrease the hidden capturer count instead you + * should set `stayHidden` to true. + */ + decrementCapturerCount(stayHidden?: boolean, stayAwake?: boolean): void; + /** + * Executes the editing command `delete` in web page. + */ + delete(): void; + /** + * Disable device emulation enabled by `webContents.enableDeviceEmulation`. + */ + disableDeviceEmulation(): void; + /** + * Initiates a download of the resource at `url` without navigating. The + * `will-download` event of `session` will be triggered. + */ + downloadURL(url: string): void; + /** + * Enable device emulation with the given parameters. + */ + enableDeviceEmulation(parameters: Parameters): void; + /** + * End subscribing for frame presentation events. + */ + endFrameSubscription(): void; + /** + * A promise that resolves with the result of the executed code or is rejected if + * the result of the code is a rejected promise. + * + * Evaluates `code` in page. + * + * In the browser window some HTML APIs like `requestFullScreen` can only be + * invoked by a gesture from the user. Setting `userGesture` to `true` will remove + * this limitation. + +Code execution will be suspended until web page stop loading. + */ + executeJavaScript(code: string, userGesture?: boolean): Promise; + /** + * A promise that resolves with the result of the executed code or is rejected if + * the result of the code is a rejected promise. + * +Works like `executeJavaScript` but evaluates `scripts` in an isolated context. + */ + executeJavaScriptInIsolatedWorld(worldId: number, scripts: WebSource[], userGesture?: boolean): Promise; + /** + * The request id used for the request. + * + * Starts a request to find all matches for the `text` in the web page. The result + * of the request can be obtained by subscribing to `found-in-page` event. + */ + findInPage(text: string, options?: FindInPageOptions): number; + /** + * Focuses the web page. + */ + focus(): void; + /** + * Forcefully terminates the renderer process that is currently hosting this + * `webContents`. This will cause the `render-process-gone` event to be emitted + * with the `reason=killed || reason=crashed`. Please note that some webContents + * share renderer processes and therefore calling this method may also crash the + * host process for other webContents as well. + * + * Calling `reload()` immediately after calling this method will force the reload + * to occur in a new process. This should be used when this process is unstable or + * unusable, for instance in order to recover from the `unresponsive` event. + */ + forcefullyCrashRenderer(): void; + /** + * Information about all Shared Workers. + */ + getAllSharedWorkers(): SharedWorkerInfo[]; + /** + * whether or not this WebContents will throttle animations and timers when the + * page becomes backgrounded. This also affects the Page Visibility API. + */ + getBackgroundThrottling(): boolean; + /** + * If *offscreen rendering* is enabled returns the current frame rate. + */ + getFrameRate(): number; + /** + * The operating system `pid` of the associated renderer process. + */ + getOSProcessId(): number; + /** + * Get the system printer list. + */ + getPrinters(): PrinterInfo[]; + /** + * The Chromium internal `pid` of the associated renderer. Can be compared to the + * `frameProcessId` passed by frame specific navigation events (e.g. + * `did-frame-navigate`) + */ + getProcessId(): number; + /** + * The title of the current web page. + */ + getTitle(): string; + /** + * the type of the webContent. Can be `backgroundPage`, `window`, `browserView`, + * `remote`, `webview` or `offscreen`. + */ + getType(): ('backgroundPage' | 'window' | 'browserView' | 'remote' | 'webview' | 'offscreen'); + /** + * The URL of the current web page. + */ + getURL(): string; + /** + * The user agent for this web page. + */ + getUserAgent(): string; + /** + * Returns the WebRTC IP Handling Policy. + */ + getWebRTCIPHandlingPolicy(): string; + /** + * the current zoom factor. + */ + getZoomFactor(): number; + /** + * the current zoom level. + */ + getZoomLevel(): number; + /** + * Makes the browser go back a web page. + */ + goBack(): void; + /** + * Makes the browser go forward a web page. + */ + goForward(): void; + /** + * Navigates browser to the specified absolute web page index. + */ + goToIndex(index: number): void; + /** + * Navigates to the specified offset from the "current entry". + */ + goToOffset(offset: number): void; + /** + * Increase the capturer count by one. The page is considered visible when its + * browser window is hidden and the capturer count is non-zero. If you would like + * the page to stay hidden, you should ensure that `stayHidden` is set to true. + * +This also affects the Page Visibility API. + */ + incrementCapturerCount(size?: Size, stayHidden?: boolean, stayAwake?: boolean): void; + /** + * A promise that resolves with a key for the inserted CSS that can later be used + * to remove the CSS via `contents.removeInsertedCSS(key)`. + * + * Injects CSS into the current web page and returns a unique key for the inserted + * stylesheet. + */ + insertCSS(css: string, options?: InsertCSSOptions): Promise; + /** + * Inserts `text` to the focused element. + */ + insertText(text: string): Promise; + /** + * Starts inspecting element at position (`x`, `y`). + */ + inspectElement(x: number, y: number): void; + /** + * Opens the developer tools for the service worker context. + */ + inspectServiceWorker(): void; + /** + * Opens the developer tools for the shared worker context. + */ + inspectSharedWorker(): void; + /** + * Inspects the shared worker based on its ID. + */ + inspectSharedWorkerById(workerId: string): void; + /** + * Schedules a full repaint of the window this web contents is in. + * + * If *offscreen rendering* is enabled invalidates the frame and generates a new + * one through the `'paint'` event. + */ + invalidate(): void; + /** + * Whether this page has been muted. + */ + isAudioMuted(): boolean; + /** + * Whether this page is being captured. It returns true when the capturer count is + * large then 0. + */ + isBeingCaptured(): boolean; + /** + * Whether the renderer process has crashed. + */ + isCrashed(): boolean; + /** + * Whether audio is currently playing. + */ + isCurrentlyAudible(): boolean; + /** + * Whether the web page is destroyed. + */ + isDestroyed(): boolean; + /** + * Whether the devtools view is focused . + */ + isDevToolsFocused(): boolean; + /** + * Whether the devtools is opened. + */ + isDevToolsOpened(): boolean; + /** + * Whether the web page is focused. + */ + isFocused(): boolean; + /** + * Whether web page is still loading resources. + */ + isLoading(): boolean; + /** + * Whether the main frame (and not just iframes or frames within it) is still + * loading. + */ + isLoadingMainFrame(): boolean; + /** + * Indicates whether *offscreen rendering* is enabled. + */ + isOffscreen(): boolean; + /** + * If *offscreen rendering* is enabled returns whether it is currently painting. + */ + isPainting(): boolean; + /** + * Whether the web page is waiting for a first-response from the main resource of + * the page. + */ + isWaitingForResponse(): boolean; + /** + * the promise will resolve when the page has finished loading (see + * `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`). + * + * Loads the given file in the window, `filePath` should be a path to an HTML file + * relative to the root of your application. For instance an app structure like + * this: + +Would require code like this + */ + loadFile(filePath: string, options?: LoadFileOptions): Promise; + /** + * the promise will resolve when the page has finished loading (see + * `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`). + * A noop rejection handler is already attached, which avoids unhandled rejection + * errors. + * + * Loads the `url` in the window. The `url` must contain the protocol prefix, e.g. + * the `http://` or `file://`. If the load should bypass http cache then use the + * `pragma` header to achieve it. + */ + loadURL(url: string, options?: LoadURLOptions): Promise; + /** + * Opens the devtools. + * + * When `contents` is a `` tag, the `mode` would be `detach` by default, + * explicitly passing an empty `mode` can force using last used dock state. + */ + openDevTools(options?: OpenDevToolsOptions): void; + /** + * Executes the editing command `paste` in web page. + */ + paste(): void; + /** + * Executes the editing command `pasteAndMatchStyle` in web page. + */ + pasteAndMatchStyle(): void; + /** + * Send a message to the renderer process, optionally transferring ownership of + * zero or more [`MessagePortMain`][] objects. + * + * The transferred `MessagePortMain` objects will be available in the renderer + * process by accessing the `ports` property of the emitted event. When they arrive + * in the renderer, they will be native DOM `MessagePort` objects. + +For example: + */ + postMessage(channel: string, message: any, transfer?: MessagePortMain[]): void; + /** + * When a custom `pageSize` is passed, Chromium attempts to validate platform + * specific minimum values for `width_microns` and `height_microns`. Width and + * height must both be minimum 353 microns but may be higher on some operating + * systems. + * + * Prints window's web page. When `silent` is set to `true`, Electron will pick the + * system's default printer if `deviceName` is empty and the default settings for + * printing. + * + * Use `page-break-before: always;` CSS style to force to print to a new page. + * +Example usage: + */ + print(options?: WebContentsPrintOptions, callback?: (success: boolean, failureReason: string) => void): void; + /** + * Resolves with the generated PDF data. + * + * Prints window's web page as PDF with Chromium's preview printing custom + * settings. + * + * The `landscape` will be ignored if `@page` CSS at-rule is used in the web page. + * + * By default, an empty `options` will be regarded as: + * + * Use `page-break-before: always;` CSS style to force to print to a new page. + * +An example of `webContents.printToPDF`: + */ + printToPDF(options: PrintToPDFOptions): Promise; + /** + * Executes the editing command `redo` in web page. + */ + redo(): void; + /** + * Reloads the current web page. + */ + reload(): void; + /** + * Reloads current page and ignores cache. + */ + reloadIgnoringCache(): void; + /** + * Resolves if the removal was successful. + * + * Removes the inserted CSS from the current web page. The stylesheet is identified + * by its key, which is returned from `contents.insertCSS(css)`. + */ + removeInsertedCSS(key: string): Promise; + /** + * Removes the specified path from DevTools workspace. + */ + removeWorkSpace(path: string): void; + /** + * Executes the editing command `replace` in web page. + */ + replace(text: string): void; + /** + * Executes the editing command `replaceMisspelling` in web page. + */ + replaceMisspelling(text: string): void; + /** + * resolves if the page is saved. + */ + savePage(fullPath: string, saveType: 'HTMLOnly' | 'HTMLComplete' | 'MHTML'): Promise; + /** + * Executes the editing command `selectAll` in web page. + */ + selectAll(): void; + /** + * Send an asynchronous message to the renderer process via `channel`, along with + * arguments. Arguments will be serialized with the Structured Clone Algorithm, + * just like `postMessage`, so prototype chains will not be included. Sending + * Functions, Promises, Symbols, WeakMaps, or WeakSets will throw an exception. + * + * > **NOTE**: Sending non-standard JavaScript types such as DOM objects or special + * Electron objects will throw an exception. + * + * The renderer process can handle the message by listening to `channel` with the + * `ipcRenderer` module. + * +An example of sending messages from the main process to the renderer process: + */ + send(channel: string, ...args: any[]): void; + /** + * Sends an input `event` to the page. **Note:** The `BrowserWindow` containing the + * contents needs to be focused for `sendInputEvent()` to work. + */ + sendInputEvent(inputEvent: (MouseInputEvent) | (MouseWheelInputEvent) | (KeyboardInputEvent)): void; + /** + * Send an asynchronous message to a specific frame in a renderer process via + * `channel`, along with arguments. Arguments will be serialized with the + * Structured Clone Algorithm, just like `postMessage`, so prototype chains will + * not be included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets + * will throw an exception. + * + * > **NOTE:** Sending non-standard JavaScript types such as DOM objects or special + * Electron objects will throw an exception. + * + * The renderer process can handle the message by listening to `channel` with the + * `ipcRenderer` module. + * + * If you want to get the `frameId` of a given renderer context you should use the + * `webFrame.routingId` value. E.g. + * +You can also read `frameId` from all incoming IPC messages in the main process. + */ + sendToFrame(frameId: (number) | ([number, number]), channel: string, ...args: any[]): void; + /** + * Mute the audio on the current web page. + */ + setAudioMuted(muted: boolean): void; + /** + * Controls whether or not this WebContents will throttle animations and timers + * when the page becomes backgrounded. This also affects the Page Visibility API. + */ + setBackgroundThrottling(allowed: boolean): void; + /** + * Uses the `devToolsWebContents` as the target `WebContents` to show devtools. + * + * The `devToolsWebContents` must not have done any navigation, and it should not + * be used for other purposes after the call. + * + * By default Electron manages the devtools by creating an internal `WebContents` + * with native view, which developers have very limited control of. With the + * `setDevToolsWebContents` method, developers can use any `WebContents` to show + * the devtools in it, including `BrowserWindow`, `BrowserView` and `` + * tag. + * + * Note that closing the devtools does not destroy the `devToolsWebContents`, it is + * caller's responsibility to destroy `devToolsWebContents`. + * + * An example of showing devtools in a `` tag: + * +An example of showing devtools in a `BrowserWindow`: + */ + setDevToolsWebContents(devToolsWebContents: WebContents): void; + /** + * If *offscreen rendering* is enabled sets the frame rate to the specified number. + * Only values between 1 and 240 are accepted. + */ + setFrameRate(fps: number): void; + /** + * Ignore application menu shortcuts while this web contents is focused. + */ + setIgnoreMenuShortcuts(ignore: boolean): void; + /** + * Overrides the user agent for this web page. + */ + setUserAgent(userAgent: string): void; + /** + * Sets the maximum and minimum pinch-to-zoom level. + * + * > **NOTE**: Visual zoom is disabled by default in Electron. To re-enable it, + * call: + */ + setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): Promise; + /** + * Setting the WebRTC IP handling policy allows you to control which IPs are + * exposed via WebRTC. See BrowserLeaks for more details. + */ + setWebRTCIPHandlingPolicy(policy: 'default' | 'default_public_interface_only' | 'default_public_and_private_interfaces' | 'disable_non_proxied_udp'): void; + /** + * Called before creating a window when `window.open()` is called from the + * renderer. See `window.open()` for more details and how to use this in + * conjunction with `did-create-window`. + */ + setWindowOpenHandler(handler: (details: HandlerDetails) => ({action: 'deny'}) | ({action: 'allow', overrideBrowserWindowOptions?: BrowserWindowConstructorOptions})): void; + /** + * Changes the zoom factor to the specified factor. Zoom factor is zoom percent + * divided by 100, so 300% = 3.0. + +The factor must be greater than 0.0. + */ + setZoomFactor(factor: number): void; + /** + * Changes the zoom level to the specified level. The original size is 0 and each + * increment above or below represents zooming 20% larger or smaller to default + * limits of 300% and 50% of original size, respectively. The formula for this is + * `scale := 1.2 ^ level`. + * + * > **NOTE**: The zoom policy at the Chromium level is same-origin, meaning that + * the zoom level for a specific domain propagates across all instances of windows + * with the same domain. Differentiating the window URLs will make zoom work + * per-window. + */ + setZoomLevel(level: number): void; + /** + * Shows pop-up dictionary that searches the selected word on the page. + * + * @platform darwin + */ + showDefinitionForSelection(): void; + /** + * Sets the `item` as dragging item for current drag-drop operation, `file` is the + * absolute path of the file to be dragged, and `icon` is the image showing under + * the cursor when dragging. + */ + startDrag(item: Item): void; + /** + * If *offscreen rendering* is enabled and not painting, start painting. + */ + startPainting(): void; + /** + * Stops any pending navigation. + */ + stop(): void; + /** + * Stops any `findInPage` request for the `webContents` with the provided `action`. + */ + stopFindInPage(action: 'clearSelection' | 'keepSelection' | 'activateSelection'): void; + /** + * If *offscreen rendering* is enabled and painting, stop painting. + */ + stopPainting(): void; + /** + * Indicates whether the snapshot has been created successfully. + * +Takes a V8 heap snapshot and saves it to `filePath`. + */ + takeHeapSnapshot(filePath: string): Promise; + /** + * Toggles the developer tools. + */ + toggleDevTools(): void; + /** + * Executes the editing command `undo` in web page. + */ + undo(): void; + /** + * Executes the editing command `unselect` in web page. + */ + unselect(): void; + audioMuted: boolean; + backgroundThrottling: boolean; + readonly debugger: Debugger; + readonly devToolsWebContents: (WebContents) | (null); + frameRate: number; + readonly hostWebContents: WebContents; + readonly id: number; + readonly mainFrame: WebFrameMain; + readonly session: Session; + userAgent: string; + zoomFactor: number; + zoomLevel: number; + } + + interface WebFrame extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/web-frame + + /** + * Attempts to free memory that is no longer being used (like images from a + * previous navigation). + * + * Note that blindly calling this method probably makes Electron slower since it + * will have to refill these emptied caches, you should only call it if an event in + * your app has occurred that makes you think your page is actually using less + * memory (i.e. you have navigated from a super heavy page to a mostly empty one, + * and intend to stay there). + */ + clearCache(): void; + /** + * A promise that resolves with the result of the executed code or is rejected if + * execution throws or results in a rejected promise. + * + * Evaluates `code` in page. + * + * In the browser window some HTML APIs like `requestFullScreen` can only be + * invoked by a gesture from the user. Setting `userGesture` to `true` will remove + * this limitation. + */ + executeJavaScript(code: string, userGesture?: boolean, callback?: (result: any, error: Error) => void): Promise; + /** + * A promise that resolves with the result of the executed code or is rejected if + * execution could not start. + * + * Works like `executeJavaScript` but evaluates `scripts` in an isolated context. + * + * Note that when the execution of script fails, the returned promise will not + * reject and the `result` would be `undefined`. This is because Chromium does not + * dispatch errors of isolated worlds to foreign worlds. + */ + executeJavaScriptInIsolatedWorld(worldId: number, scripts: WebSource[], userGesture?: boolean, callback?: (result: any, error: Error) => void): Promise; + /** + * A child of `webFrame` with the supplied `name`, `null` would be returned if + * there's no such frame or if the frame is not in the current renderer process. + */ + findFrameByName(name: string): WebFrame; + /** + * that has the supplied `routingId`, `null` if not found. + */ + findFrameByRoutingId(routingId: number): WebFrame; + /** + * The frame element in `webFrame's` document selected by `selector`, `null` would + * be returned if `selector` does not select a frame or if the frame is not in the + * current renderer process. + */ + getFrameForSelector(selector: string): WebFrame; + /** + * * `images` MemoryUsageDetails + * * `scripts` MemoryUsageDetails + * * `cssStyleSheets` MemoryUsageDetails + * * `xslStyleSheets` MemoryUsageDetails + * * `fonts` MemoryUsageDetails + * * `other` MemoryUsageDetails + * + * Returns an object describing usage information of Blink's internal memory + * caches. + +This will generate: + */ + getResourceUsage(): ResourceUsage; + /** + * A list of suggested words for a given word. If the word is spelled correctly, + * the result will be empty. + */ + getWordSuggestions(word: string): string[]; + /** + * The current zoom factor. + */ + getZoomFactor(): number; + /** + * The current zoom level. + */ + getZoomLevel(): number; + /** + * A key for the inserted CSS that can later be used to remove the CSS via + * `webFrame.removeInsertedCSS(key)`. + * + * Injects CSS into the current web page and returns a unique key for the inserted + * stylesheet. + */ + insertCSS(css: string): string; + /** + * Inserts `text` to the focused element. + */ + insertText(text: string): void; + /** + * True if the word is misspelled according to the built in spellchecker, false + * otherwise. If no dictionary is loaded, always return false. + */ + isWordMisspelled(word: string): boolean; + /** + * Removes the inserted CSS from the current web page. The stylesheet is identified + * by its key, which is returned from `webFrame.insertCSS(css)`. + */ + removeInsertedCSS(key: string): void; + /** + * Set the security origin, content security policy and name of the isolated world. + * Note: If the `csp` is specified, then the `securityOrigin` also has to be + * specified. + */ + setIsolatedWorldInfo(worldId: number, info: Info): void; + /** + * Sets a provider for spell checking in input fields and text areas. + * + * If you want to use this method you must disable the builtin spellchecker when + * you construct the window. + * + * The `provider` must be an object that has a `spellCheck` method that accepts an + * array of individual words for spellchecking. The `spellCheck` function runs + * asynchronously and calls the `callback` function with an array of misspelt words + * when complete. + +An example of using node-spellchecker as provider: + */ + setSpellCheckProvider(language: string, provider: Provider): void; + /** + * Sets the maximum and minimum pinch-to-zoom level. + * + * > **NOTE**: Visual zoom is disabled by default in Electron. To re-enable it, + * call: + * + * > **NOTE**: Visual zoom only applies to pinch-to-zoom behavior. Cmd+/-/0 zoom + * shortcuts are controlled by the 'zoomIn', 'zoomOut', and 'resetZoom' MenuItem + * roles in the application Menu. To disable shortcuts, manually define the Menu + * and omit zoom roles from the definition. + */ + setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; + /** + * Changes the zoom factor to the specified factor. Zoom factor is zoom percent + * divided by 100, so 300% = 3.0. + +The factor must be greater than 0.0. + */ + setZoomFactor(factor: number): void; + /** + * Changes the zoom level to the specified level. The original size is 0 and each + * increment above or below represents zooming 20% larger or smaller to default + * limits of 300% and 50% of original size, respectively. + * + * > **NOTE**: The zoom policy at the Chromium level is same-origin, meaning that + * the zoom level for a specific domain propagates across all instances of windows + * with the same domain. Differentiating the window URLs will make zoom work + * per-window. + */ + setZoomLevel(level: number): void; + /** + * A `WebFrame | null` representing the first child frame of `webFrame`, the + * property would be `null` if `webFrame` has no children or if first child is not + * in the current renderer process. + * + */ + readonly firstChild: (WebFrame) | (null); + /** + * A `WebFrame | null` representing next sibling frame, the property would be + * `null` if `webFrame` is the last frame in its parent or if the next sibling is + * not in the current renderer process. + * + */ + readonly nextSibling: (WebFrame) | (null); + /** + * A `WebFrame | null` representing the frame which opened `webFrame`, the property + * would be `null` if there's no opener or opener is not in the current renderer + * process. + * + */ + readonly opener: (WebFrame) | (null); + /** + * A `WebFrame | null` representing parent frame of `webFrame`, the property would + * be `null` if `webFrame` is top or parent is not in the current renderer process. + * + */ + readonly parent: (WebFrame) | (null); + /** + * An `Integer` representing the unique frame id in the current renderer process. + * Distinct WebFrame instances that refer to the same underlying frame will have + * the same `routingId`. + * + */ + readonly routingId: number; + /** + * A `WebFrame | null` representing top frame in frame hierarchy to which + * `webFrame` belongs, the property would be `null` if top frame is not in the + * current renderer process. + * + */ + readonly top: (WebFrame) | (null); + } + + class WebFrameMain extends NodeEventEmitter { + + // Docs: https://electronjs.org/docs/api/web-frame-main + + /** + * A frame with the given process and routing IDs, or `undefined` if there is no + * WebFrameMain associated with the given IDs. + */ + static fromId(processId: number, routingId: number): (WebFrameMain) | (undefined); + /** + * A promise that resolves with the result of the executed code or is rejected if + * execution throws or results in a rejected promise. + * + * Evaluates `code` in page. + * + * In the browser window some HTML APIs like `requestFullScreen` can only be + * invoked by a gesture from the user. Setting `userGesture` to `true` will remove + * this limitation. + */ + executeJavaScript(code: string, userGesture?: boolean): Promise; + /** + * Send a message to the renderer process, optionally transferring ownership of + * zero or more [`MessagePortMain`][] objects. + * + * The transferred `MessagePortMain` objects will be available in the renderer + * process by accessing the `ports` property of the emitted event. When they arrive + * in the renderer, they will be native DOM `MessagePort` objects. + +For example: + */ + postMessage(channel: string, message: any, transfer?: MessagePortMain[]): void; + /** + * Whether the reload was initiated successfully. Only results in `false` when the + * frame has no history. + */ + reload(): boolean; + /** + * Send an asynchronous message to the renderer process via `channel`, along with + * arguments. Arguments will be serialized with the [Structured Clone + * Algorithm][SCA], just like [`postMessage`][], so prototype chains will not be + * included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw + * an exception. + * + * The renderer process can handle the message by listening to `channel` with the + * `ipcRenderer` module. + */ + send(channel: string, ...args: any[]): void; + readonly frames: WebFrameMain[]; + readonly framesInSubtree: WebFrameMain[]; + readonly frameTreeNodeId: number; + readonly name: string; + readonly osProcessId: number; + readonly parent: (WebFrameMain) | (null); + readonly processId: number; + readonly routingId: number; + readonly top: (WebFrameMain) | (null); + readonly url: string; + } + + class WebRequest { + + // Docs: https://electronjs.org/docs/api/web-request + + /** + * The `listener` will be called with `listener(details)` when a server initiated + * redirect is about to occur. + */ + onBeforeRedirect(filter: Filter, listener: ((details: OnBeforeRedirectListenerDetails) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details)` when a server initiated + * redirect is about to occur. + */ + onBeforeRedirect(listener: ((details: OnBeforeRedirectListenerDetails) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details, callback)` when a request + * is about to occur. + * + * The `uploadData` is an array of `UploadData` objects. + * + * The `callback` has to be called with an `response` object. + * +Some examples of valid `urls`: + */ + onBeforeRequest(filter: Filter, listener: ((details: OnBeforeRequestListenerDetails, callback: (response: Response) => void) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details, callback)` when a request + * is about to occur. + * + * The `uploadData` is an array of `UploadData` objects. + * + * The `callback` has to be called with an `response` object. + * +Some examples of valid `urls`: + */ + onBeforeRequest(listener: ((details: OnBeforeRequestListenerDetails, callback: (response: Response) => void) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details, callback)` before sending + * an HTTP request, once the request headers are available. This may occur after a + * TCP connection is made to the server, but before any http data is sent. + * +The `callback` has to be called with a `response` object. + */ + onBeforeSendHeaders(filter: Filter, listener: ((details: OnBeforeSendHeadersListenerDetails, callback: (beforeSendResponse: BeforeSendResponse) => void) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details, callback)` before sending + * an HTTP request, once the request headers are available. This may occur after a + * TCP connection is made to the server, but before any http data is sent. + * +The `callback` has to be called with a `response` object. + */ + onBeforeSendHeaders(listener: ((details: OnBeforeSendHeadersListenerDetails, callback: (beforeSendResponse: BeforeSendResponse) => void) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details)` when a request is + * completed. + */ + onCompleted(filter: Filter, listener: ((details: OnCompletedListenerDetails) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details)` when a request is + * completed. + */ + onCompleted(listener: ((details: OnCompletedListenerDetails) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details)` when an error occurs. + */ + onErrorOccurred(filter: Filter, listener: ((details: OnErrorOccurredListenerDetails) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details)` when an error occurs. + */ + onErrorOccurred(listener: ((details: OnErrorOccurredListenerDetails) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details, callback)` when HTTP + * response headers of a request have been received. + * +The `callback` has to be called with a `response` object. + */ + onHeadersReceived(filter: Filter, listener: ((details: OnHeadersReceivedListenerDetails, callback: (headersReceivedResponse: HeadersReceivedResponse) => void) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details, callback)` when HTTP + * response headers of a request have been received. + * +The `callback` has to be called with a `response` object. + */ + onHeadersReceived(listener: ((details: OnHeadersReceivedListenerDetails, callback: (headersReceivedResponse: HeadersReceivedResponse) => void) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details)` when first byte of the + * response body is received. For HTTP requests, this means that the status line + * and response headers are available. + */ + onResponseStarted(filter: Filter, listener: ((details: OnResponseStartedListenerDetails) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details)` when first byte of the + * response body is received. For HTTP requests, this means that the status line + * and response headers are available. + */ + onResponseStarted(listener: ((details: OnResponseStartedListenerDetails) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details)` just before a request is + * going to be sent to the server, modifications of previous `onBeforeSendHeaders` + * response are visible by the time this listener is fired. + */ + onSendHeaders(filter: Filter, listener: ((details: OnSendHeadersListenerDetails) => void) | (null)): void; + /** + * The `listener` will be called with `listener(details)` just before a request is + * going to be sent to the server, modifications of previous `onBeforeSendHeaders` + * response are visible by the time this listener is fired. + */ + onSendHeaders(listener: ((details: OnSendHeadersListenerDetails) => void) | (null)): void; + } + + interface WebSource { + + // Docs: https://electronjs.org/docs/api/structures/web-source + + code: string; + /** + * Default is 1. + */ + startLine?: number; + url?: string; + } + + interface WebviewTag extends HTMLElement { + + // Docs: https://electronjs.org/docs/api/webview-tag + + /** + * Fired when a load has committed. This includes navigation within the current + * document as well as subframe document-level loads, but does not include + * asynchronous resource loads. + */ + addEventListener(event: 'load-commit', listener: (event: LoadCommitEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'load-commit', listener: (event: LoadCommitEvent) => void): this; + /** + * Fired when the navigation is done, i.e. the spinner of the tab will stop + * spinning, and the `onload` event is dispatched. + */ + addEventListener(event: 'did-finish-load', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'did-finish-load', listener: (event: Event) => void): this; + /** + * This event is like `did-finish-load`, but fired when the load failed or was + * cancelled, e.g. `window.stop()` is invoked. + */ + addEventListener(event: 'did-fail-load', listener: (event: DidFailLoadEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'did-fail-load', listener: (event: DidFailLoadEvent) => void): this; + /** + * Fired when a frame has done navigation. + */ + addEventListener(event: 'did-frame-finish-load', listener: (event: DidFrameFinishLoadEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'did-frame-finish-load', listener: (event: DidFrameFinishLoadEvent) => void): this; + /** + * Corresponds to the points in time when the spinner of the tab starts spinning. + */ + addEventListener(event: 'did-start-loading', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'did-start-loading', listener: (event: Event) => void): this; + /** + * Corresponds to the points in time when the spinner of the tab stops spinning. + */ + addEventListener(event: 'did-stop-loading', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'did-stop-loading', listener: (event: Event) => void): this; + /** + * Fired when document in the given frame is loaded. + */ + addEventListener(event: 'dom-ready', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'dom-ready', listener: (event: Event) => void): this; + /** + * Fired when page title is set during navigation. `explicitSet` is false when + * title is synthesized from file url. + */ + addEventListener(event: 'page-title-updated', listener: (event: PageTitleUpdatedEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'page-title-updated', listener: (event: PageTitleUpdatedEvent) => void): this; + /** + * Fired when page receives favicon urls. + */ + addEventListener(event: 'page-favicon-updated', listener: (event: PageFaviconUpdatedEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'page-favicon-updated', listener: (event: PageFaviconUpdatedEvent) => void): this; + /** + * Fired when page enters fullscreen triggered by HTML API. + */ + addEventListener(event: 'enter-html-full-screen', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'enter-html-full-screen', listener: (event: Event) => void): this; + /** + * Fired when page leaves fullscreen triggered by HTML API. + */ + addEventListener(event: 'leave-html-full-screen', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'leave-html-full-screen', listener: (event: Event) => void): this; + /** + * Fired when the guest window logs a console message. + * + * The following example code forwards all log messages to the embedder's console + * without regard for log level or other properties. + */ + addEventListener(event: 'console-message', listener: (event: ConsoleMessageEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'console-message', listener: (event: ConsoleMessageEvent) => void): this; + /** + * Fired when a result is available for `webview.findInPage` request. + */ + addEventListener(event: 'found-in-page', listener: (event: FoundInPageEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'found-in-page', listener: (event: FoundInPageEvent) => void): this; + /** + * Fired when the guest page attempts to open a new browser window. + * +The following example code opens the new url in system's default browser. + */ + addEventListener(event: 'new-window', listener: (event: NewWindowEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'new-window', listener: (event: NewWindowEvent) => void): this; + /** + * Emitted when a user or the page wants to start navigation. It can happen when + * the `window.location` object is changed or a user clicks a link in the page. + * + * This event will not emit when the navigation is started programmatically with + * APIs like `.loadURL` and `.back`. + * + * It is also not emitted during in-page navigation, such as clicking anchor links + * or updating the `window.location.hash`. Use `did-navigate-in-page` event for + * this purpose. + +Calling `event.preventDefault()` does __NOT__ have any effect. + */ + addEventListener(event: 'will-navigate', listener: (event: WillNavigateEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'will-navigate', listener: (event: WillNavigateEvent) => void): this; + /** + * Emitted when a navigation is done. + * + * This event is not emitted for in-page navigations, such as clicking anchor links + * or updating the `window.location.hash`. Use `did-navigate-in-page` event for + * this purpose. + */ + addEventListener(event: 'did-navigate', listener: (event: DidNavigateEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'did-navigate', listener: (event: DidNavigateEvent) => void): this; + /** + * Emitted when an in-page navigation happened. + * + * When in-page navigation happens, the page URL changes but does not cause + * navigation outside of the page. Examples of this occurring are when anchor links + * are clicked or when the DOM `hashchange` event is triggered. + */ + addEventListener(event: 'did-navigate-in-page', listener: (event: DidNavigateInPageEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'did-navigate-in-page', listener: (event: DidNavigateInPageEvent) => void): this; + /** + * Fired when the guest page attempts to close itself. + * + * The following example code navigates the `webview` to `about:blank` when the + * guest attempts to close itself. + */ + addEventListener(event: 'close', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'close', listener: (event: Event) => void): this; + /** + * Fired when the guest page has sent an asynchronous message to embedder page. + * + * With `sendToHost` method and `ipc-message` event you can communicate between + * guest page and embedder page: + */ + addEventListener(event: 'ipc-message', listener: (event: IpcMessageEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'ipc-message', listener: (event: IpcMessageEvent) => void): this; + /** + * Fired when the renderer process is crashed. + */ + addEventListener(event: 'crashed', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'crashed', listener: (event: Event) => void): this; + /** + * Fired when a plugin process is crashed. + */ + addEventListener(event: 'plugin-crashed', listener: (event: PluginCrashedEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'plugin-crashed', listener: (event: PluginCrashedEvent) => void): this; + /** + * Fired when the WebContents is destroyed. + */ + addEventListener(event: 'destroyed', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'destroyed', listener: (event: Event) => void): this; + /** + * Emitted when media starts playing. + */ + addEventListener(event: 'media-started-playing', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'media-started-playing', listener: (event: Event) => void): this; + /** + * Emitted when media is paused or done playing. + */ + addEventListener(event: 'media-paused', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'media-paused', listener: (event: Event) => void): this; + /** + * Emitted when a page's theme color changes. This is usually due to encountering a + * meta tag: + */ + addEventListener(event: 'did-change-theme-color', listener: (event: DidChangeThemeColorEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'did-change-theme-color', listener: (event: DidChangeThemeColorEvent) => void): this; + /** + * Emitted when mouse moves over a link or the keyboard moves the focus to a link. + */ + addEventListener(event: 'update-target-url', listener: (event: UpdateTargetUrlEvent) => void, useCapture?: boolean): this; + removeEventListener(event: 'update-target-url', listener: (event: UpdateTargetUrlEvent) => void): this; + /** + * Emitted when DevTools is opened. + */ + addEventListener(event: 'devtools-opened', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'devtools-opened', listener: (event: Event) => void): this; + /** + * Emitted when DevTools is closed. + */ + addEventListener(event: 'devtools-closed', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'devtools-closed', listener: (event: Event) => void): this; + /** + * Emitted when DevTools is focused / opened. + */ + addEventListener(event: 'devtools-focused', listener: (event: Event) => void, useCapture?: boolean): this; + removeEventListener(event: 'devtools-focused', listener: (event: Event) => void): this; + addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + /** + * Whether the guest page can go back. + */ + canGoBack(): boolean; + /** + * Whether the guest page can go forward. + */ + canGoForward(): boolean; + /** + * Whether the guest page can go to `offset`. + */ + canGoToOffset(offset: number): boolean; + /** + * Resolves with a NativeImage + * + * Captures a snapshot of the page within `rect`. Omitting `rect` will capture the + * whole visible page. + */ + capturePage(rect?: Rectangle): Promise; + /** + * Clears the navigation history. + */ + clearHistory(): void; + /** + * Closes the DevTools window of guest page. + */ + closeDevTools(): void; + /** + * Executes editing command `copy` in page. + */ + copy(): void; + /** + * Executes editing command `cut` in page. + */ + cut(): void; + /** + * Executes editing command `delete` in page. + */ + delete(): void; + /** + * Initiates a download of the resource at `url` without navigating. + */ + downloadURL(url: string): void; + /** + * A promise that resolves with the result of the executed code or is rejected if + * the result of the code is a rejected promise. + * + * Evaluates `code` in page. If `userGesture` is set, it will create the user + * gesture context in the page. HTML APIs like `requestFullScreen`, which require + * user action, can take advantage of this option for automation. + */ + executeJavaScript(code: string, userGesture?: boolean): Promise; + /** + * The request id used for the request. + * + * Starts a request to find all matches for the `text` in the web page. The result + * of the request can be obtained by subscribing to `found-in-page` event. + */ + findInPage(text: string, options?: FindInPageOptions): number; + /** + * The title of guest page. + */ + getTitle(): string; + /** + * The URL of guest page. + */ + getURL(): string; + /** + * The user agent for guest page. + */ + getUserAgent(): string; + /** + * The WebContents ID of this `webview`. + */ + getWebContentsId(): number; + /** + * the current zoom factor. + */ + getZoomFactor(): number; + /** + * the current zoom level. + */ + getZoomLevel(): number; + /** + * Makes the guest page go back. + */ + goBack(): void; + /** + * Makes the guest page go forward. + */ + goForward(): void; + /** + * Navigates to the specified absolute index. + */ + goToIndex(index: number): void; + /** + * Navigates to the specified offset from the "current entry". + */ + goToOffset(offset: number): void; + /** + * A promise that resolves with a key for the inserted CSS that can later be used + * to remove the CSS via `.removeInsertedCSS(key)`. + * + * Injects CSS into the current web page and returns a unique key for the inserted + * stylesheet. + */ + insertCSS(css: string): Promise; + /** + * Inserts `text` to the focused element. + */ + insertText(text: string): Promise; + /** + * Starts inspecting element at position (`x`, `y`) of guest page. + */ + inspectElement(x: number, y: number): void; + /** + * Opens the DevTools for the service worker context present in the guest page. + */ + inspectServiceWorker(): void; + /** + * Opens the DevTools for the shared worker context present in the guest page. + */ + inspectSharedWorker(): void; + /** + * Whether guest page has been muted. + */ + isAudioMuted(): boolean; + /** + * Whether the renderer process has crashed. + */ + isCrashed(): boolean; + /** + * Whether audio is currently playing. + */ + isCurrentlyAudible(): boolean; + /** + * Whether DevTools window of guest page is focused. + */ + isDevToolsFocused(): boolean; + /** + * Whether guest page has a DevTools window attached. + */ + isDevToolsOpened(): boolean; + /** + * Whether guest page is still loading resources. + */ + isLoading(): boolean; + /** + * Whether the main frame (and not just iframes or frames within it) is still + * loading. + */ + isLoadingMainFrame(): boolean; + /** + * Whether the guest page is waiting for a first-response for the main resource of + * the page. + */ + isWaitingForResponse(): boolean; + /** + * The promise will resolve when the page has finished loading (see + * `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`). + * + * Loads the `url` in the webview, the `url` must contain the protocol prefix, e.g. + * the `http://` or `file://`. + */ + loadURL(url: string, options?: LoadURLOptions): Promise; + /** + * Opens a DevTools window for guest page. + */ + openDevTools(): void; + /** + * Executes editing command `paste` in page. + */ + paste(): void; + /** + * Executes editing command `pasteAndMatchStyle` in page. + */ + pasteAndMatchStyle(): void; + /** + * Prints `webview`'s web page. Same as `webContents.print([options])`. + */ + print(options?: WebviewTagPrintOptions): Promise; + /** + * Resolves with the generated PDF data. + * +Prints `webview`'s web page as PDF, Same as `webContents.printToPDF(options)`. + */ + printToPDF(options: PrintToPDFOptions): Promise; + /** + * Executes editing command `redo` in page. + */ + redo(): void; + /** + * Reloads the guest page. + */ + reload(): void; + /** + * Reloads the guest page and ignores cache. + */ + reloadIgnoringCache(): void; + /** + * Resolves if the removal was successful. + * + * Removes the inserted CSS from the current web page. The stylesheet is identified + * by its key, which is returned from `.insertCSS(css)`. + */ + removeInsertedCSS(key: string): Promise; + /** + * Executes editing command `replace` in page. + */ + replace(text: string): void; + /** + * Executes editing command `replaceMisspelling` in page. + */ + replaceMisspelling(text: string): void; + /** + * Executes editing command `selectAll` in page. + */ + selectAll(): void; + /** + * Send an asynchronous message to renderer process via `channel`, you can also + * send arbitrary arguments. The renderer process can handle the message by + * listening to the `channel` event with the `ipcRenderer` module. + * +See webContents.send for examples. + */ + send(channel: string, ...args: any[]): Promise; + /** + * Sends an input `event` to the page. + * +See webContents.sendInputEvent for detailed description of `event` object. + */ + sendInputEvent(event: (MouseInputEvent) | (MouseWheelInputEvent) | (KeyboardInputEvent)): Promise; + /** + * Set guest page muted. + */ + setAudioMuted(muted: boolean): void; + /** + * Overrides the user agent for the guest page. + */ + setUserAgent(userAgent: string): void; + /** + * Sets the maximum and minimum pinch-to-zoom level. + */ + setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): Promise; + /** + * Changes the zoom factor to the specified factor. Zoom factor is zoom percent + * divided by 100, so 300% = 3.0. + */ + setZoomFactor(factor: number): void; + /** + * Changes the zoom level to the specified level. The original size is 0 and each + * increment above or below represents zooming 20% larger or smaller to default + * limits of 300% and 50% of original size, respectively. The formula for this is + * `scale := 1.2 ^ level`. + * + * > **NOTE**: The zoom policy at the Chromium level is same-origin, meaning that + * the zoom level for a specific domain propagates across all instances of windows + * with the same domain. Differentiating the window URLs will make zoom work + * per-window. + */ + setZoomLevel(level: number): void; + /** + * Shows pop-up dictionary that searches the selected word on the page. + * + * @platform darwin + */ + showDefinitionForSelection(): void; + /** + * Stops any pending navigation. + */ + stop(): void; + /** + * Stops any `findInPage` request for the `webview` with the provided `action`. + */ + stopFindInPage(action: 'clearSelection' | 'keepSelection' | 'activateSelection'): void; + /** + * Executes editing command `undo` in page. + */ + undo(): void; + /** + * Executes editing command `unselect` in page. + */ + unselect(): void; + /** + * A `Boolean`. When this attribute is present the guest page will be allowed to + * open new windows. Popups are disabled by default. + */ + allowpopups: boolean; + /** + * A `String` which is a list of strings which specifies the blink features to be + * disabled separated by `,`. The full list of supported feature strings can be + * found in the RuntimeEnabledFeatures.json5 file. + */ + disableblinkfeatures: string; + /** + * A `Boolean`. When this attribute is present the guest page will have web + * security disabled. Web security is enabled by default. + */ + disablewebsecurity: boolean; + /** + * A `String` which is a list of strings which specifies the blink features to be + * enabled separated by `,`. The full list of supported feature strings can be + * found in the RuntimeEnabledFeatures.json5 file. + */ + enableblinkfeatures: string; + /** + * A `Boolean`. When this attribute is `false` the guest page in `webview` will not + * have access to the `remote` module. The remote module is unavailable by default. + */ + enableremotemodule: boolean; + /** + * A `String` that sets the referrer URL for the guest page. + */ + httpreferrer: string; + /** + * A `Boolean`. When this attribute is present the guest page in `webview` will + * have node integration and can use node APIs like `require` and `process` to + * access low level system resources. Node integration is disabled by default in + * the guest page. + */ + nodeintegration: boolean; + /** + * A `Boolean` for the experimental option for enabling NodeJS support in + * sub-frames such as iframes inside the `webview`. All your preloads will load for + * every iframe, you can use `process.isMainFrame` to determine if you are in the + * main frame or not. This option is disabled by default in the guest page. + */ + nodeintegrationinsubframes: boolean; + /** + * A `String` that sets the session used by the page. If `partition` starts with + * `persist:`, the page will use a persistent session available to all pages in the + * app with the same `partition`. if there is no `persist:` prefix, the page will + * use an in-memory session. By assigning the same `partition`, multiple pages can + * share the same session. If the `partition` is unset then default session of the + * app will be used. + * + * This value can only be modified before the first navigation, since the session + * of an active renderer process cannot change. Subsequent attempts to modify the + * value will fail with a DOM exception. + */ + partition: string; + /** + * A `Boolean`. When this attribute is present the guest page in `webview` will be + * able to use browser plugins. Plugins are disabled by default. + */ + plugins: boolean; + /** + * A `String` that specifies a script that will be loaded before other scripts run + * in the guest page. The protocol of script's URL must be either `file:` or + * `asar:`, because it will be loaded by `require` in guest page under the hood. + * + * When the guest page doesn't have node integration this script will still have + * access to all Node APIs, but global objects injected by Node will be deleted + * after this script has finished executing. + * + * **Note:** This option will appear as `preloadURL` (not `preload`) in the + * `webPreferences` specified to the `will-attach-webview` event. + */ + preload: string; + /** + * A `String` representing the visible URL. Writing to this attribute initiates + * top-level navigation. + * + * Assigning `src` its own value will reload the current page. + * + * The `src` attribute can also accept data URLs, such as `data:text/plain,Hello, + * world!`. + */ + src: string; + /** + * A `String` that sets the user agent for the guest page before the page is + * navigated to. Once the page is loaded, use the `setUserAgent` method to change + * the user agent. + */ + useragent: string; + /** + * A `String` which is a comma separated list of strings which specifies the web + * preferences to be set on the webview. The full list of supported preference + * strings can be found in BrowserWindow. + * + * The string follows the same format as the features string in `window.open`. A + * name by itself is given a `true` boolean value. A preference can be set to + * another value by including an `=`, followed by the value. Special values `yes` + * and `1` are interpreted as `true`, while `no` and `0` are interpreted as + * `false`. + */ + webpreferences: string; + } + + interface AboutPanelOptionsOptions { + /** + * The app's name. + */ + applicationName?: string; + /** + * The app's version. + */ + applicationVersion?: string; + /** + * Copyright information. + */ + copyright?: string; + /** + * The app's build version number. + * + * @platform darwin + */ + version?: string; + /** + * Credit information. + * + * @platform darwin,win32 + */ + credits?: string; + /** + * List of app authors. + * + * @platform linux + */ + authors?: string[]; + /** + * The app's website. + * + * @platform linux + */ + website?: string; + /** + * Path to the app's icon in a JPEG or PNG file format. On Linux, will be shown as + * 64x64 pixels while retaining aspect ratio. + * + * @platform linux,win32 + */ + iconPath?: string; + } + + interface AddRepresentationOptions { + /** + * The scale factor to add the image representation for. + */ + scaleFactor: number; + /** + * Defaults to 0. Required if a bitmap buffer is specified as `buffer`. + */ + width?: number; + /** + * Defaults to 0. Required if a bitmap buffer is specified as `buffer`. + */ + height?: number; + /** + * The buffer containing the raw image data. + */ + buffer?: Buffer; + /** + * The data URL containing either a base 64 encoded PNG or JPEG image. + */ + dataURL?: string; + } + + interface AnimationSettings { + /** + * Returns true if rich animations should be rendered. Looks at session type (e.g. + * remote desktop) and accessibility settings to give guidance for heavy + * animations. + */ + shouldRenderRichAnimation: boolean; + /** + * Determines on a per-platform basis whether scroll animations (e.g. produced by + * home/end key) should be enabled. + */ + scrollAnimationsEnabledBySystem: boolean; + /** + * Determines whether the user desires reduced motion based on platform APIs. + */ + prefersReducedMotion: boolean; + } + + interface AppDetailsOptions { + /** + * Window's App User Model ID. It has to be set, otherwise the other options will + * have no effect. + */ + appId?: string; + /** + * Window's Relaunch Icon. + */ + appIconPath?: string; + /** + * Index of the icon in `appIconPath`. Ignored when `appIconPath` is not set. + * Default is `0`. + */ + appIconIndex?: number; + /** + * Window's Relaunch Command. + */ + relaunchCommand?: string; + /** + * Window's Relaunch Display Name. + */ + relaunchDisplayName?: string; + } + + interface ApplicationInfoForProtocolReturnValue { + /** + * the display icon of the app handling the protocol. + */ + icon: NativeImage; + /** + * installation path of the app handling the protocol. + */ + path: string; + /** + * display name of the app handling the protocol. + */ + name: string; + } + + interface AuthenticationResponseDetails { + url: string; + } + + interface AuthInfo { + isProxy: boolean; + scheme: string; + host: string; + port: number; + realm: string; + } + + interface AutoResizeOptions { + /** + * If `true`, the view's width will grow and shrink together with the window. + * `false` by default. + */ + width?: boolean; + /** + * If `true`, the view's height will grow and shrink together with the window. + * `false` by default. + */ + height?: boolean; + /** + * If `true`, the view's x position and width will grow and shrink proportionally + * with the window. `false` by default. + */ + horizontal?: boolean; + /** + * If `true`, the view's y position and height will grow and shrink proportionally + * with the window. `false` by default. + */ + vertical?: boolean; + } + + interface BeforeSendResponse { + cancel?: boolean; + /** + * When provided, request will be made with these headers. + */ + requestHeaders?: Record; + } + + interface BitmapOptions { + /** + * Defaults to 1.0. + */ + scaleFactor?: number; + } + + interface BlinkMemoryInfo { + /** + * Size of all allocated objects in Kilobytes. + */ + allocated: number; + /** + * Size of all marked objects in Kilobytes. + */ + marked: number; + /** + * Total allocated space in Kilobytes. + */ + total: number; + } + + interface BrowserViewConstructorOptions { + /** + * See BrowserWindow. + */ + webPreferences?: WebPreferences; + } + + interface BrowserWindowConstructorOptions { + /** + * Window's width in pixels. Default is `800`. + */ + width?: number; + /** + * Window's height in pixels. Default is `600`. + */ + height?: number; + /** + * (**required** if y is used) Window's left offset from screen. Default is to + * center the window. + */ + x?: number; + /** + * (**required** if x is used) Window's top offset from screen. Default is to + * center the window. + */ + y?: number; + /** + * The `width` and `height` would be used as web page's size, which means the + * actual window's size will include window frame's size and be slightly larger. + * Default is `false`. + */ + useContentSize?: boolean; + /** + * Show window in the center of the screen. + */ + center?: boolean; + /** + * Window's minimum width. Default is `0`. + */ + minWidth?: number; + /** + * Window's minimum height. Default is `0`. + */ + minHeight?: number; + /** + * Window's maximum width. Default is no limit. + */ + maxWidth?: number; + /** + * Window's maximum height. Default is no limit. + */ + maxHeight?: number; + /** + * Whether window is resizable. Default is `true`. + */ + resizable?: boolean; + /** + * Whether window is movable. This is not implemented on Linux. Default is `true`. + */ + movable?: boolean; + /** + * Whether window is minimizable. This is not implemented on Linux. Default is + * `true`. + */ + minimizable?: boolean; + /** + * Whether window is maximizable. This is not implemented on Linux. Default is + * `true`. + */ + maximizable?: boolean; + /** + * Whether window is closable. This is not implemented on Linux. Default is `true`. + */ + closable?: boolean; + /** + * Whether the window can be focused. Default is `true`. On Windows setting + * `focusable: false` also implies setting `skipTaskbar: true`. On Linux setting + * `focusable: false` makes the window stop interacting with wm, so the window will + * always stay on top in all workspaces. + */ + focusable?: boolean; + /** + * Whether the window should always stay on top of other windows. Default is + * `false`. + */ + alwaysOnTop?: boolean; + /** + * Whether the window should show in fullscreen. When explicitly set to `false` the + * fullscreen button will be hidden or disabled on macOS. Default is `false`. + */ + fullscreen?: boolean; + /** + * Whether the window can be put into fullscreen mode. On macOS, also whether the + * maximize/zoom button should toggle full screen mode or maximize window. Default + * is `true`. + */ + fullscreenable?: boolean; + /** + * Use pre-Lion fullscreen on macOS. Default is `false`. + */ + simpleFullscreen?: boolean; + /** + * Whether to show the window in taskbar. Default is `false`. + */ + skipTaskbar?: boolean; + /** + * Whether the window is in kiosk mode. Default is `false`. + */ + kiosk?: boolean; + /** + * Default window title. Default is `"Electron"`. If the HTML tag `` is + * defined in the HTML file loaded by `loadURL()`, this property will be ignored. + */ + title?: string; + /** + * The window icon. On Windows it is recommended to use `ICO` icons to get best + * visual effects, you can also leave it undefined so the executable's icon will be + * used. + */ + icon?: (NativeImage) | (string); + /** + * Whether window should be shown when created. Default is `true`. + */ + show?: boolean; + /** + * Whether the renderer should be active when `show` is `false` and it has just + * been created. In order for `document.visibilityState` to work correctly on + * first load with `show: false` you should set this to `false`. Setting this to + * `false` will cause the `ready-to-show` event to not fire. Default is `true`. + */ + paintWhenInitiallyHidden?: boolean; + /** + * Specify `false` to create a Frameless Window. Default is `true`. + */ + frame?: boolean; + /** + * Specify parent window. Default is `null`. + */ + parent?: BrowserWindow; + /** + * Whether this is a modal window. This only works when the window is a child + * window. Default is `false`. + */ + modal?: boolean; + /** + * Whether the web view accepts a single mouse-down event that simultaneously + * activates the window. Default is `false`. + */ + acceptFirstMouse?: boolean; + /** + * Whether to hide cursor when typing. Default is `false`. + */ + disableAutoHideCursor?: boolean; + /** + * Auto hide the menu bar unless the `Alt` key is pressed. Default is `false`. + */ + autoHideMenuBar?: boolean; + /** + * Enable the window to be resized larger than screen. Only relevant for macOS, as + * other OSes allow larger-than-screen windows by default. Default is `false`. + */ + enableLargerThanScreen?: boolean; + /** + * Window's background color as a hexadecimal value, like `#66CD00` or `#FFF` or + * `#80FFFFFF` (alpha in #AARRGGBB format is supported if `transparent` is set to + * `true`). Default is `#FFF` (white). + */ + backgroundColor?: string; + /** + * Whether window should have a shadow. Default is `true`. + */ + hasShadow?: boolean; + /** + * Set the initial opacity of the window, between 0.0 (fully transparent) and 1.0 + * (fully opaque). This is only implemented on Windows and macOS. + */ + opacity?: number; + /** + * Forces using dark theme for the window, only works on some GTK+3 desktop + * environments. Default is `false`. + */ + darkTheme?: boolean; + /** + * Makes the window transparent. Default is `false`. On Windows, does not work + * unless the window is frameless. + */ + transparent?: boolean; + /** + * The type of window, default is normal window. See more about this below. + */ + type?: string; + /** + * Specify how the material appearance should reflect window activity state on + * macOS. Must be used with the `vibrancy` property. Possible values are: + */ + visualEffectState?: ('followWindow' | 'active' | 'inactive'); + /** + * The style of window title bar. Default is `default`. Possible values are: + */ + titleBarStyle?: ('default' | 'hidden' | 'hiddenInset' | 'customButtonsOnHover'); + /** + * Set a custom position for the traffic light buttons in frameless windows. + */ + trafficLightPosition?: Point; + /** + * Whether frameless window should have rounded corners on macOS. Default is + * `true`. + */ + roundedCorners?: boolean; + /** + * Shows the title in the title bar in full screen mode on macOS for `hiddenInset` + * titleBarStyle. Default is `false`. + * + * @deprecated + */ + fullscreenWindowTitle?: boolean; + /** + * Use `WS_THICKFRAME` style for frameless windows on Windows, which adds standard + * window frame. Setting it to `false` will remove window shadow and window + * animations. Default is `true`. + */ + thickFrame?: boolean; + /** + * Add a type of vibrancy effect to the window, only on macOS. Can be + * `appearance-based`, `light`, `dark`, `titlebar`, `selection`, `menu`, `popover`, + * `sidebar`, `medium-light`, `ultra-dark`, `header`, `sheet`, `window`, `hud`, + * `fullscreen-ui`, `tooltip`, `content`, `under-window`, or `under-page`. Please + * note that `appearance-based`, `light`, `dark`, `medium-light`, and `ultra-dark` + * are deprecated and have been removed in macOS Catalina (10.15). + */ + vibrancy?: ('appearance-based' | 'light' | 'dark' | 'titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'medium-light' | 'ultra-dark' | 'header' | 'sheet' | 'window' | 'hud' | 'fullscreen-ui' | 'tooltip' | 'content' | 'under-window' | 'under-page'); + /** + * Controls the behavior on macOS when option-clicking the green stoplight button + * on the toolbar or by clicking the Window > Zoom menu item. If `true`, the window + * will grow to the preferred width of the web page when zoomed, `false` will cause + * it to zoom to the width of the screen. This will also affect the behavior when + * calling `maximize()` directly. Default is `false`. + */ + zoomToPageWidth?: boolean; + /** + * Tab group name, allows opening the window as a native tab on macOS 10.12+. + * Windows with the same tabbing identifier will be grouped together. This also + * adds a native new tab button to your window's tab bar and allows your `app` and + * window to receive the `new-window-for-tab` event. + */ + tabbingIdentifier?: string; + /** + * Settings of web page's features. + */ + webPreferences?: WebPreferences; + } + + interface CertificateTrustDialogOptions { + /** + * The certificate to trust/import. + */ + certificate: Certificate; + /** + * The message to display to the user. + */ + message: string; + } + + interface ClearStorageDataOptions { + /** + * Should follow `window.location.origin`’s representation `scheme://host:port`. + */ + origin?: string; + /** + * The types of storages to clear, can contain: `appcache`, `cookies`, + * `filesystem`, `indexdb`, `localstorage`, `shadercache`, `websql`, + * `serviceworkers`, `cachestorage`. If not specified, clear all storage types. + */ + storages?: string[]; + /** + * The types of quotas to clear, can contain: `temporary`, `persistent`, + * `syncable`. If not specified, clear all quotas. + */ + quotas?: string[]; + } + + interface ClientRequestConstructorOptions { + /** + * The HTTP request method. Defaults to the GET method. + */ + method?: string; + /** + * The request URL. Must be provided in the absolute form with the protocol scheme + * specified as http or https. + */ + url?: string; + /** + * The `Session` instance with which the request is associated. + */ + session?: Session; + /** + * The name of the `partition` with which the request is associated. Defaults to + * the empty string. The `session` option supersedes `partition`. Thus if a + * `session` is explicitly specified, `partition` is ignored. + */ + partition?: string; + /** + * Can be `include` or `omit`. Whether to send credentials with this request. If + * set to `include`, credentials from the session associated with the request will + * be used. If set to `omit`, credentials will not be sent with the request (and + * the `'login'` event will not be triggered in the event of a 401). This matches + * the behavior of the fetch option of the same name. If this option is not + * specified, authentication data from the session will be sent, and cookies will + * not be sent (unless `useSessionCookies` is set). + */ + credentials?: ('include' | 'omit'); + /** + * Whether to send cookies with this request from the provided session. If + * `credentials` is specified, this option has no effect. Default is `false`. + */ + useSessionCookies?: boolean; + /** + * Can be `http:` or `https:`. The protocol scheme in the form 'scheme:'. Defaults + * to 'http:'. + */ + protocol?: string; + /** + * The server host provided as a concatenation of the hostname and the port number + * 'hostname:port'. + */ + host?: string; + /** + * The server host name. + */ + hostname?: string; + /** + * The server's listening port number. + */ + port?: number; + /** + * The path part of the request URL. + */ + path?: string; + /** + * Can be `follow`, `error` or `manual`. The redirect mode for this request. When + * mode is `error`, any redirection will be aborted. When mode is `manual` the + * redirection will be cancelled unless `request.followRedirect` is invoked + * synchronously during the `redirect` event. Defaults to `follow`. + */ + redirect?: ('follow' | 'error' | 'manual'); + /** + * The origin URL of the request. + */ + origin?: string; + } + + interface Config { + /** + * The proxy mode. Should be one of `direct`, `auto_detect`, `pac_script`, + * `fixed_servers` or `system`. If it's unspecified, it will be automatically + * determined based on other specified options. + */ + mode?: ('direct' | 'auto_detect' | 'pac_script' | 'fixed_servers' | 'system'); + /** + * The URL associated with the PAC file. + */ + pacScript?: string; + /** + * Rules indicating which proxies to use. + */ + proxyRules?: string; + /** + * Rules indicating which URLs should bypass the proxy settings. + */ + proxyBypassRules?: string; + } + + interface ConsoleMessageEvent extends Event { + /** + * The log level, from 0 to 3. In order it matches `verbose`, `info`, `warning` and + * `error`. + */ + level: number; + /** + * The actual console message + */ + message: string; + /** + * The line number of the source that triggered this console message + */ + line: number; + sourceId: string; + } + + interface ContextMenuParams { + /** + * x coordinate. + */ + x: number; + /** + * y coordinate. + */ + y: number; + /** + * URL of the link that encloses the node the context menu was invoked on. + */ + linkURL: string; + /** + * Text associated with the link. May be an empty string if the contents of the + * link are an image. + */ + linkText: string; + /** + * URL of the top level page that the context menu was invoked on. + */ + pageURL: string; + /** + * URL of the subframe that the context menu was invoked on. + */ + frameURL: string; + /** + * Source URL for the element that the context menu was invoked on. Elements with + * source URLs are images, audio and video. + */ + srcURL: string; + /** + * Type of the node the context menu was invoked on. Can be `none`, `image`, + * `audio`, `video`, `canvas`, `file` or `plugin`. + */ + mediaType: ('none' | 'image' | 'audio' | 'video' | 'canvas' | 'file' | 'plugin'); + /** + * Whether the context menu was invoked on an image which has non-empty contents. + */ + hasImageContents: boolean; + /** + * Whether the context is editable. + */ + isEditable: boolean; + /** + * Text of the selection that the context menu was invoked on. + */ + selectionText: string; + /** + * Title text of the selection that the context menu was invoked on. + */ + titleText: string; + /** + * Alt text of the selection that the context menu was invoked on. + */ + altText: string; + /** + * Suggested filename to be used when saving file through 'Save Link As' option of + * context menu. + */ + suggestedFilename: string; + /** + * Rect representing the coordinates in the document space of the selection. + */ + selectionRect: Rectangle; + /** + * Start position of the selection text. + */ + selectionStartOffset: number; + /** + * The referrer policy of the frame on which the menu is invoked. + */ + referrerPolicy: Referrer; + /** + * The misspelled word under the cursor, if any. + */ + misspelledWord: string; + /** + * An array of suggested words to show the user to replace the `misspelledWord`. + * Only available if there is a misspelled word and spellchecker is enabled. + */ + dictionarySuggestions: string[]; + /** + * The character encoding of the frame on which the menu was invoked. + */ + frameCharset: string; + /** + * If the context menu was invoked on an input field, the type of that field. + * Possible values are `none`, `plainText`, `password`, `other`. + */ + inputFieldType: string; + /** + * If the context is editable, whether or not spellchecking is enabled. + */ + spellcheckEnabled: boolean; + /** + * Input source that invoked the context menu. Can be `none`, `mouse`, `keyboard`, + * `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, + * `adjustSelection`, or `adjustSelectionReset`. + */ + menuSourceType: ('none' | 'mouse' | 'keyboard' | 'touch' | 'touchMenu' | 'longPress' | 'longTap' | 'touchHandle' | 'stylus' | 'adjustSelection' | 'adjustSelectionReset'); + /** + * The flags for the media element the context menu was invoked on. + */ + mediaFlags: MediaFlags; + /** + * These flags indicate whether the renderer believes it is able to perform the + * corresponding action. + */ + editFlags: EditFlags; + } + + interface CookiesGetFilter { + /** + * Retrieves cookies which are associated with `url`. Empty implies retrieving + * cookies of all URLs. + */ + url?: string; + /** + * Filters cookies by name. + */ + name?: string; + /** + * Retrieves cookies whose domains match or are subdomains of `domains`. + */ + domain?: string; + /** + * Retrieves cookies whose path matches `path`. + */ + path?: string; + /** + * Filters cookies by their Secure property. + */ + secure?: boolean; + /** + * Filters out session or persistent cookies. + */ + session?: boolean; + } + + interface CookiesSetDetails { + /** + * The URL to associate the cookie with. The promise will be rejected if the URL is + * invalid. + */ + url: string; + /** + * The name of the cookie. Empty by default if omitted. + */ + name?: string; + /** + * The value of the cookie. Empty by default if omitted. + */ + value?: string; + /** + * The domain of the cookie; this will be normalized with a preceding dot so that + * it's also valid for subdomains. Empty by default if omitted. + */ + domain?: string; + /** + * The path of the cookie. Empty by default if omitted. + */ + path?: string; + /** + * Whether the cookie should be marked as Secure. Defaults to false. + */ + secure?: boolean; + /** + * Whether the cookie should be marked as HTTP only. Defaults to false. + */ + httpOnly?: boolean; + /** + * The expiration date of the cookie as the number of seconds since the UNIX epoch. + * If omitted then the cookie becomes a session cookie and will not be retained + * between sessions. + */ + expirationDate?: number; + /** + * The Same Site policy to apply to this cookie. Can be `unspecified`, + * `no_restriction`, `lax` or `strict`. Default is `no_restriction`. + */ + sameSite?: ('unspecified' | 'no_restriction' | 'lax' | 'strict'); + } + + interface CrashReporterStartOptions { + /** + * URL that crash reports will be sent to as POST. Required unless `uploadToServer` + * is `false`. + */ + submitURL?: string; + /** + * Defaults to `app.name`. + */ + productName?: string; + /** + * Deprecated alias for `{ globalExtra: { _companyName: ... } }`. + * + * @deprecated + */ + companyName?: string; + /** + * Whether crash reports should be sent to the server. If false, crash reports will + * be collected and stored in the crashes directory, but not uploaded. Default is + * `true`. + */ + uploadToServer?: boolean; + /** + * If true, crashes generated in the main process will not be forwarded to the + * system crash handler. Default is `false`. + */ + ignoreSystemCrashHandler?: boolean; + /** + * If true, limit the number of crashes uploaded to 1/hour. Default is `false`. + * + * @platform darwin,win32 + */ + rateLimit?: boolean; + /** + * If true, crash reports will be compressed and uploaded with `Content-Encoding: + * gzip`. Default is `true`. + */ + compress?: boolean; + /** + * Extra string key/value annotations that will be sent along with crash reports + * that are generated in the main process. Only string values are supported. + * Crashes generated in child processes will not contain these extra parameters to + * crash reports generated from child processes, call `addExtraParameter` from the + * child process. + */ + extra?: Record<string, string>; + /** + * Extra string key/value annotations that will be sent along with any crash + * reports generated in any process. These annotations cannot be changed once the + * crash reporter has been started. If a key is present in both the global extra + * parameters and the process-specific extra parameters, then the global one will + * take precedence. By default, `productName` and the app version are included, as + * well as the Electron version. + */ + globalExtra?: Record<string, string>; + } + + interface CreateFromBitmapOptions { + width: number; + height: number; + /** + * Defaults to 1.0. + */ + scaleFactor?: number; + } + + interface CreateFromBufferOptions { + /** + * Required for bitmap buffers. + */ + width?: number; + /** + * Required for bitmap buffers. + */ + height?: number; + /** + * Defaults to 1.0. + */ + scaleFactor?: number; + } + + interface CreateInterruptedDownloadOptions { + /** + * Absolute path of the download. + */ + path: string; + /** + * Complete URL chain for the download. + */ + urlChain: string[]; + mimeType?: string; + /** + * Start range for the download. + */ + offset: number; + /** + * Total length of the download. + */ + length: number; + /** + * Last-Modified header value. + */ + lastModified?: string; + /** + * ETag header value. + */ + eTag?: string; + /** + * Time when download was started in number of seconds since UNIX epoch. + */ + startTime?: number; + } + + interface Data { + text?: string; + html?: string; + image?: NativeImage; + rtf?: string; + /** + * The title of the URL at `text`. + */ + bookmark?: string; + } + + interface Details { + /** + * Process type. One of the following values: + */ + type: ('Utility' | 'Zygote' | 'Sandbox helper' | 'GPU' | 'Pepper Plugin' | 'Pepper Plugin Broker' | 'Unknown'); + /** + * The reason the child process is gone. Possible values: + */ + reason: ('clean-exit' | 'abnormal-exit' | 'killed' | 'crashed' | 'oom' | 'launch-failed' | 'integrity-failure'); + /** + * The exit code for the process (e.g. status from waitpid if on posix, from + * GetExitCodeProcess on Windows). + */ + exitCode: number; + /** + * The non-localized name of the process. + */ + serviceName?: string; + /** + * The name of the process. Examples for utility: `Audio Service`, `Content + * Decryption Module Service`, `Network Service`, `Video Capture`, etc. + */ + name?: string; + } + + interface DidChangeThemeColorEvent extends Event { + themeColor: string; + } + + interface DidCreateWindowDetails { + /** + * URL for the created window. + */ + url: string; + /** + * Name given to the created window in the `window.open()` call. + */ + frameName: string; + /** + * The options used to create the BrowserWindow. They are merged in increasing + * precedence: options inherited from the parent, parsed options from the + * `features` string from `window.open()`, and options given by + * `webContents.setWindowOpenHandler`. Unrecognized options are not filtered out. + */ + options: BrowserWindowConstructorOptions; + /** + * The non-standard features (features not handled Chromium or Electron) + * _Deprecated_ + */ + additionalFeatures: string[]; + /** + * The referrer that will be passed to the new window. May or may not result in the + * `Referer` header being sent, depending on the referrer policy. + */ + referrer: Referrer; + /** + * The post data that will be sent to the new window, along with the appropriate + * headers that will be set. If no post data is to be sent, the value will be + * `null`. Only defined when the window is being created by a form that set + * `target=_blank`. + */ + postBody?: PostBody; + /** + * Can be `default`, `foreground-tab`, `background-tab`, `new-window`, + * `save-to-disk` and `other`. + */ + disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'); + } + + interface DidFailLoadEvent extends Event { + errorCode: number; + errorDescription: string; + validatedURL: string; + isMainFrame: boolean; + } + + interface DidFrameFinishLoadEvent extends Event { + isMainFrame: boolean; + } + + interface DidNavigateEvent extends Event { + url: string; + } + + interface DidNavigateInPageEvent extends Event { + isMainFrame: boolean; + url: string; + } + + interface DisplayBalloonOptions { + /** + * Icon to use when `iconType` is `custom`. + */ + icon?: (NativeImage) | (string); + /** + * Can be `none`, `info`, `warning`, `error` or `custom`. Default is `custom`. + */ + iconType?: ('none' | 'info' | 'warning' | 'error' | 'custom'); + title: string; + content: string; + /** + * The large version of the icon should be used. Default is `true`. Maps to + * `NIIF_LARGE_ICON`. + */ + largeIcon?: boolean; + /** + * Do not play the associated sound. Default is `false`. Maps to `NIIF_NOSOUND`. + */ + noSound?: boolean; + /** + * Do not display the balloon notification if the current user is in "quiet time". + * Default is `false`. Maps to `NIIF_RESPECT_QUIET_TIME`. + */ + respectQuietTime?: boolean; + } + + interface EnableNetworkEmulationOptions { + /** + * Whether to emulate network outage. Defaults to false. + */ + offline?: boolean; + /** + * RTT in ms. Defaults to 0 which will disable latency throttling. + */ + latency?: number; + /** + * Download rate in Bps. Defaults to 0 which will disable download throttling. + */ + downloadThroughput?: number; + /** + * Upload rate in Bps. Defaults to 0 which will disable upload throttling. + */ + uploadThroughput?: number; + } + + interface FeedURLOptions { + url: string; + /** + * HTTP request headers. + * + * @platform darwin + */ + headers?: Record<string, string>; + /** + * Can be `json` or `default`, see the Squirrel.Mac README for more information. + * + * @platform darwin + */ + serverType?: ('json' | 'default'); + } + + interface FileIconOptions { + size: ('small' | 'normal' | 'large'); + } + + interface Filter { + /** + * Array of URL patterns that will be used to filter out the requests that do not + * match the URL patterns. + */ + urls: string[]; + } + + interface FindInPageOptions { + /** + * Whether to search forward or backward, defaults to `true`. + */ + forward?: boolean; + /** + * Whether to begin a new text finding session with this request. Should be `true` + * for initial requests, and `false` for follow-up requests. Defaults to `false`. + */ + findNext?: boolean; + /** + * Whether search should be case-sensitive, defaults to `false`. + */ + matchCase?: boolean; + } + + interface FocusOptions { + /** + * Make the receiver the active app even if another app is currently active. + * + * @platform darwin + */ + steal: boolean; + } + + interface FoundInPageEvent extends Event { + result: FoundInPageResult; + } + + interface FromPartitionOptions { + /** + * Whether to enable cache. + */ + cache: boolean; + } + + interface HandlerDetails { + /** + * The _resolved_ version of the URL passed to `window.open()`. e.g. opening a + * window with `window.open('foo')` will yield something like + * `https://the-origin/the/current/path/foo`. + */ + url: string; + /** + * Name of the window provided in `window.open()` + */ + frameName: string; + /** + * Comma separated list of window features provided to `window.open()`. + */ + features: string; + /** + * Can be `default`, `foreground-tab`, `background-tab`, `new-window`, + * `save-to-disk` or `other`. + */ + disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'); + /** + * The referrer that will be passed to the new window. May or may not result in the + * `Referer` header being sent, depending on the referrer policy. + */ + referrer: Referrer; + /** + * The post data that will be sent to the new window, along with the appropriate + * headers that will be set. If no post data is to be sent, the value will be + * `null`. Only defined when the window is being created by a form that set + * `target=_blank`. + */ + postBody?: PostBody; + } + + interface HeadersReceivedResponse { + cancel?: boolean; + /** + * When provided, the server is assumed to have responded with these headers. + */ + responseHeaders?: Record<string, (string) | (string[])>; + /** + * Should be provided when overriding `responseHeaders` to change header status + * otherwise original response header's status will be used. + */ + statusLine?: string; + } + + interface HeapStatistics { + totalHeapSize: number; + totalHeapSizeExecutable: number; + totalPhysicalSize: number; + totalAvailableSize: number; + usedHeapSize: number; + heapSizeLimit: number; + mallocedMemory: number; + peakMallocedMemory: number; + doesZapGarbage: boolean; + } + + interface IgnoreMouseEventsOptions { + /** + * If true, forwards mouse move messages to Chromium, enabling mouse related events + * such as `mouseleave`. Only used when `ignore` is true. If `ignore` is false, + * forwarding is always disabled regardless of this value. + * + * @platform darwin,win32 + */ + forward?: boolean; + } + + interface ImportCertificateOptions { + /** + * Path for the pkcs12 file. + */ + certificate: string; + /** + * Passphrase for the certificate. + */ + password: string; + } + + interface Info { + /** + * Security origin for the isolated world. + */ + securityOrigin?: string; + /** + * Content Security Policy for the isolated world. + */ + csp?: string; + /** + * Name for isolated world. Useful in devtools. + */ + name?: string; + } + + interface Input { + /** + * Either `keyUp` or `keyDown`. + */ + type: string; + /** + * Equivalent to KeyboardEvent.key. + */ + key: string; + /** + * Equivalent to KeyboardEvent.code. + */ + code: string; + /** + * Equivalent to KeyboardEvent.repeat. + */ + isAutoRepeat: boolean; + /** + * Equivalent to KeyboardEvent.isComposing. + */ + isComposing: boolean; + /** + * Equivalent to KeyboardEvent.shiftKey. + */ + shift: boolean; + /** + * Equivalent to KeyboardEvent.controlKey. + */ + control: boolean; + /** + * Equivalent to KeyboardEvent.altKey. + */ + alt: boolean; + /** + * Equivalent to KeyboardEvent.metaKey. + */ + meta: boolean; + } + + interface InsertCSSOptions { + /** + * Can be either 'user' or 'author'; Specifying 'user' enables you to prevent + * websites from overriding the CSS you insert. Default is 'author'. + */ + cssOrigin?: string; + } + + interface IpcMessageEvent extends Event { + channel: string; + args: any[]; + } + + interface Item { + /** + * The path(s) to the file(s) being dragged. + */ + file: (string[]) | (string); + /** + * The image must be non-empty on macOS. + */ + icon: (NativeImage) | (string); + } + + interface JumpListSettings { + /** + * The minimum number of items that will be shown in the Jump List (for a more + * detailed description of this value see the MSDN docs). + */ + minItems: number; + /** + * Array of `JumpListItem` objects that correspond to items that the user has + * explicitly removed from custom categories in the Jump List. These items must not + * be re-added to the Jump List in the **next** call to `app.setJumpList()`, + * Windows will not display any custom category that contains any of the removed + * items. + */ + removedItems: JumpListItem[]; + } + + interface LoadCommitEvent extends Event { + url: string; + isMainFrame: boolean; + } + + interface LoadExtensionOptions { + /** + * Whether to allow the extension to read local files over `file://` protocol and + * inject content scripts into `file://` pages. This is required e.g. for loading + * devtools extensions on `file://` URLs. Defaults to false. + */ + allowFileAccess: boolean; + } + + interface LoadFileOptions { + /** + * Passed to `url.format()`. + */ + query?: Record<string, string>; + /** + * Passed to `url.format()`. + */ + search?: string; + /** + * Passed to `url.format()`. + */ + hash?: string; + } + + interface LoadURLOptions { + /** + * An HTTP Referrer url. + */ + httpReferrer?: (string) | (Referrer); + /** + * A user agent originating the request. + */ + userAgent?: string; + /** + * Extra headers separated by "\n" + */ + extraHeaders?: string; + postData?: Array<(UploadRawData) | (UploadFile)>; + /** + * Base url (with trailing path separator) for files to be loaded by the data url. + * This is needed only if the specified `url` is a data url and needs to load other + * files. + */ + baseURLForDataURL?: string; + } + + interface LoginItemSettings { + /** + * `true` if the app is set to open at login. + */ + openAtLogin: boolean; + /** + * `true` if the app is set to open as hidden at login. This setting is not + * available on MAS builds. + * + * @platform darwin + */ + openAsHidden: boolean; + /** + * `true` if the app was opened at login automatically. This setting is not + * available on MAS builds. + * + * @platform darwin + */ + wasOpenedAtLogin: boolean; + /** + * `true` if the app was opened as a hidden login item. This indicates that the app + * should not open any windows at startup. This setting is not available on MAS + * builds. + * + * @platform darwin + */ + wasOpenedAsHidden: boolean; + /** + * `true` if the app was opened as a login item that should restore the state from + * the previous session. This indicates that the app should restore the windows + * that were open the last time the app was closed. This setting is not available + * on MAS builds. + * + * @platform darwin + */ + restoreState: boolean; + /** + * `true` if app is set to open at login and its run key is not deactivated. This + * differs from `openAtLogin` as it ignores the `args` option, this property will + * be true if the given executable would be launched at login with **any** + * arguments. + * + * @platform win32 + */ + executableWillLaunchAtLogin: boolean; + launchItems: LaunchItems[]; + } + + interface LoginItemSettingsOptions { + /** + * The executable path to compare against. Defaults to `process.execPath`. + * + * @platform win32 + */ + path?: string; + /** + * The command-line arguments to compare against. Defaults to an empty array. + * + * @platform win32 + */ + args?: string[]; + } + + interface MenuItemConstructorOptions { + /** + * Will be called with `click(menuItem, browserWindow, event)` when the menu item + * is clicked. + */ + click?: (menuItem: MenuItem, browserWindow: (BrowserWindow) | (undefined), event: KeyboardEvent) => void; + /** + * Can be `undo`, `redo`, `cut`, `copy`, `paste`, `pasteAndMatchStyle`, `delete`, + * `selectAll`, `reload`, `forceReload`, `toggleDevTools`, `resetZoom`, `zoomIn`, + * `zoomOut`, `togglefullscreen`, `window`, `minimize`, `close`, `help`, `about`, + * `services`, `hide`, `hideOthers`, `unhide`, `quit`, `startSpeaking`, + * `stopSpeaking`, `zoom`, `front`, `appMenu`, `fileMenu`, `editMenu`, `viewMenu`, + * `shareMenu`, `recentDocuments`, `toggleTabBar`, `selectNextTab`, + * `selectPreviousTab`, `mergeAllWindows`, `clearRecentDocuments`, + * `moveTabToNewWindow` or `windowMenu` - Define the action of the menu item, when + * specified the `click` property will be ignored. See roles. + */ + role?: ('undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'pasteAndMatchStyle' | 'delete' | 'selectAll' | 'reload' | 'forceReload' | 'toggleDevTools' | 'resetZoom' | 'zoomIn' | 'zoomOut' | 'togglefullscreen' | 'window' | 'minimize' | 'close' | 'help' | 'about' | 'services' | 'hide' | 'hideOthers' | 'unhide' | 'quit' | 'startSpeaking' | 'stopSpeaking' | 'zoom' | 'front' | 'appMenu' | 'fileMenu' | 'editMenu' | 'viewMenu' | 'shareMenu' | 'recentDocuments' | 'toggleTabBar' | 'selectNextTab' | 'selectPreviousTab' | 'mergeAllWindows' | 'clearRecentDocuments' | 'moveTabToNewWindow' | 'windowMenu'); + /** + * Can be `normal`, `separator`, `submenu`, `checkbox` or `radio`. + */ + type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio'); + label?: string; + sublabel?: string; + /** + * Hover text for this menu item. + * + * @platform darwin + */ + toolTip?: string; + accelerator?: Accelerator; + icon?: (NativeImage) | (string); + /** + * If false, the menu item will be greyed out and unclickable. + */ + enabled?: boolean; + /** + * default is `true`, and when `false` will prevent the accelerator from triggering + * the item if the item is not visible`. + * + * @platform darwin + */ + acceleratorWorksWhenHidden?: boolean; + /** + * If false, the menu item will be entirely hidden. + */ + visible?: boolean; + /** + * Should only be specified for `checkbox` or `radio` type menu items. + */ + checked?: boolean; + /** + * If false, the accelerator won't be registered with the system, but it will still + * be displayed. Defaults to true. + * + * @platform linux,win32 + */ + registerAccelerator?: boolean; + /** + * The item to share when the `role` is `shareMenu`. + * + * @platform darwin + */ + sharingItem?: SharingItem; + /** + * Should be specified for `submenu` type menu items. If `submenu` is specified, + * the `type: 'submenu'` can be omitted. If the value is not a `Menu` then it will + * be automatically converted to one using `Menu.buildFromTemplate`. + */ + submenu?: (MenuItemConstructorOptions[]) | (Menu); + /** + * Unique within a single menu. If defined then it can be used as a reference to + * this item by the position attribute. + */ + id?: string; + /** + * Inserts this item before the item with the specified label. If the referenced + * item doesn't exist the item will be inserted at the end of the menu. Also + * implies that the menu item in question should be placed in the same “group” as + * the item. + */ + before?: string[]; + /** + * Inserts this item after the item with the specified label. If the referenced + * item doesn't exist the item will be inserted at the end of the menu. + */ + after?: string[]; + /** + * Provides a means for a single context menu to declare the placement of their + * containing group before the containing group of the item with the specified + * label. + */ + beforeGroupContaining?: string[]; + /** + * Provides a means for a single context menu to declare the placement of their + * containing group after the containing group of the item with the specified + * label. + */ + afterGroupContaining?: string[]; + } + + interface MessageBoxOptions { + /** + * Content of the message box. + */ + message: string; + /** + * Can be `"none"`, `"info"`, `"error"`, `"question"` or `"warning"`. On Windows, + * `"question"` displays the same icon as `"info"`, unless you set an icon using + * the `"icon"` option. On macOS, both `"warning"` and `"error"` display the same + * warning icon. + */ + type?: string; + /** + * Array of texts for buttons. On Windows, an empty array will result in one button + * labeled "OK". + */ + buttons?: string[]; + /** + * Index of the button in the buttons array which will be selected by default when + * the message box opens. + */ + defaultId?: number; + /** + * Title of the message box, some platforms will not show it. + */ + title?: string; + /** + * Extra information of the message. + */ + detail?: string; + /** + * If provided, the message box will include a checkbox with the given label. + */ + checkboxLabel?: string; + /** + * Initial checked state of the checkbox. `false` by default. + */ + checkboxChecked?: boolean; + icon?: NativeImage; + /** + * The index of the button to be used to cancel the dialog, via the `Esc` key. By + * default this is assigned to the first button with "cancel" or "no" as the label. + * If no such labeled buttons exist and this option is not set, `0` will be used as + * the return value. + */ + cancelId?: number; + /** + * On Windows Electron will try to figure out which one of the `buttons` are common + * buttons (like "Cancel" or "Yes"), and show the others as command links in the + * dialog. This can make the dialog appear in the style of modern Windows apps. If + * you don't like this behavior, you can set `noLink` to `true`. + */ + noLink?: boolean; + /** + * Normalize the keyboard access keys across platforms. Default is `false`. + * Enabling this assumes `&` is used in the button labels for the placement of the + * keyboard shortcut access key and labels will be converted so they work correctly + * on each platform, `&` characters are removed on macOS, converted to `_` on + * Linux, and left untouched on Windows. For example, a button label of `Vie&w` + * will be converted to `Vie_w` on Linux and `View` on macOS and can be selected + * via `Alt-W` on Windows and Linux. + */ + normalizeAccessKeys?: boolean; + } + + interface MessageBoxReturnValue { + /** + * The index of the clicked button. + */ + response: number; + /** + * The checked state of the checkbox if `checkboxLabel` was set. Otherwise `false`. + */ + checkboxChecked: boolean; + } + + interface MessageBoxSyncOptions { + /** + * Content of the message box. + */ + message: string; + /** + * Can be `"none"`, `"info"`, `"error"`, `"question"` or `"warning"`. On Windows, + * `"question"` displays the same icon as `"info"`, unless you set an icon using + * the `"icon"` option. On macOS, both `"warning"` and `"error"` display the same + * warning icon. + */ + type?: string; + /** + * Array of texts for buttons. On Windows, an empty array will result in one button + * labeled "OK". + */ + buttons?: string[]; + /** + * Index of the button in the buttons array which will be selected by default when + * the message box opens. + */ + defaultId?: number; + /** + * Title of the message box, some platforms will not show it. + */ + title?: string; + /** + * Extra information of the message. + */ + detail?: string; + /** + * If provided, the message box will include a checkbox with the given label. + */ + checkboxLabel?: string; + /** + * Initial checked state of the checkbox. `false` by default. + */ + checkboxChecked?: boolean; + icon?: (NativeImage) | (string); + /** + * The index of the button to be used to cancel the dialog, via the `Esc` key. By + * default this is assigned to the first button with "cancel" or "no" as the label. + * If no such labeled buttons exist and this option is not set, `0` will be used as + * the return value. + */ + cancelId?: number; + /** + * On Windows Electron will try to figure out which one of the `buttons` are common + * buttons (like "Cancel" or "Yes"), and show the others as command links in the + * dialog. This can make the dialog appear in the style of modern Windows apps. If + * you don't like this behavior, you can set `noLink` to `true`. + */ + noLink?: boolean; + /** + * Normalize the keyboard access keys across platforms. Default is `false`. + * Enabling this assumes `&` is used in the button labels for the placement of the + * keyboard shortcut access key and labels will be converted so they work correctly + * on each platform, `&` characters are removed on macOS, converted to `_` on + * Linux, and left untouched on Windows. For example, a button label of `Vie&w` + * will be converted to `Vie_w` on Linux and `View` on macOS and can be selected + * via `Alt-W` on Windows and Linux. + */ + normalizeAccessKeys?: boolean; + } + + interface MessageDetails { + /** + * The actual console message + */ + message: string; + /** + * The version ID of the service worker that sent the log message + */ + versionId: number; + /** + * The type of source for this message. Can be `javascript`, `xml`, `network`, + * `console-api`, `storage`, `app-cache`, `rendering`, `security`, `deprecation`, + * `worker`, `violation`, `intervention`, `recommendation` or `other`. + */ + source: ('javascript' | 'xml' | 'network' | 'console-api' | 'storage' | 'app-cache' | 'rendering' | 'security' | 'deprecation' | 'worker' | 'violation' | 'intervention' | 'recommendation' | 'other'); + /** + * The log level, from 0 to 3. In order it matches `verbose`, `info`, `warning` and + * `error`. + */ + level: number; + /** + * The URL the message came from + */ + sourceUrl: string; + /** + * The line number of the source that triggered this console message + */ + lineNumber: number; + } + + interface MessageEvent { + data: any; + ports: MessagePortMain[]; + } + + interface MoveToApplicationsFolderOptions { + /** + * A handler for potential conflict in move failure. + */ + conflictHandler?: (conflictType: 'exists' | 'existsAndRunning') => boolean; + } + + interface NewWindowEvent extends Event { + url: string; + frameName: string; + /** + * Can be `default`, `foreground-tab`, `background-tab`, `new-window`, + * `save-to-disk` and `other`. + */ + disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'); + /** + * The options which should be used for creating the new `BrowserWindow`. + */ + options: BrowserWindowConstructorOptions; + } + + interface NotificationConstructorOptions { + /** + * A title for the notification, which will be shown at the top of the notification + * window when it is shown. + */ + title?: string; + /** + * A subtitle for the notification, which will be displayed below the title. + * + * @platform darwin + */ + subtitle?: string; + /** + * The body text of the notification, which will be displayed below the title or + * subtitle. + */ + body?: string; + /** + * Whether or not to emit an OS notification noise when showing the notification. + */ + silent?: boolean; + /** + * An icon to use in the notification. + */ + icon?: (string) | (NativeImage); + /** + * Whether or not to add an inline reply option to the notification. + * + * @platform darwin + */ + hasReply?: boolean; + /** + * The timeout duration of the notification. Can be 'default' or 'never'. + * + * @platform linux,win32 + */ + timeoutType?: ('default' | 'never'); + /** + * The placeholder to write in the inline reply input field. + * + * @platform darwin + */ + replyPlaceholder?: string; + /** + * The name of the sound file to play when the notification is shown. + * + * @platform darwin + */ + sound?: string; + /** + * The urgency level of the notification. Can be 'normal', 'critical', or 'low'. + * + * @platform linux + */ + urgency?: ('normal' | 'critical' | 'low'); + /** + * Actions to add to the notification. Please read the available actions and + * limitations in the `NotificationAction` documentation. + * + * @platform darwin + */ + actions?: NotificationAction[]; + /** + * A custom title for the close button of an alert. An empty string will cause the + * default localized text to be used. + * + * @platform darwin + */ + closeButtonText?: string; + /** + * A custom description of the Notification on Windows superseding all properties + * above. Provides full customization of design and behavior of the notification. + * + * @platform win32 + */ + toastXml?: string; + } + + interface OnBeforeRedirectListenerDetails { + id: number; + url: string; + method: string; + webContentsId?: number; + webContents?: WebContents; + frame?: WebFrameMain; + resourceType: string; + referrer: string; + timestamp: number; + redirectURL: string; + statusCode: number; + statusLine: string; + /** + * The server IP address that the request was actually sent to. + */ + ip?: string; + fromCache: boolean; + responseHeaders?: Record<string, string[]>; + } + + interface OnBeforeRequestListenerDetails { + id: number; + url: string; + method: string; + webContentsId?: number; + webContents?: WebContents; + frame?: WebFrameMain; + resourceType: string; + referrer: string; + timestamp: number; + uploadData: UploadData[]; + } + + interface OnBeforeSendHeadersListenerDetails { + id: number; + url: string; + method: string; + webContentsId?: number; + webContents?: WebContents; + frame?: WebFrameMain; + resourceType: string; + referrer: string; + timestamp: number; + requestHeaders: Record<string, string>; + } + + interface OnCompletedListenerDetails { + id: number; + url: string; + method: string; + webContentsId?: number; + webContents?: WebContents; + frame?: WebFrameMain; + resourceType: string; + referrer: string; + timestamp: number; + responseHeaders?: Record<string, string[]>; + fromCache: boolean; + statusCode: number; + statusLine: string; + error: string; + } + + interface OnErrorOccurredListenerDetails { + id: number; + url: string; + method: string; + webContentsId?: number; + webContents?: WebContents; + frame?: WebFrameMain; + resourceType: string; + referrer: string; + timestamp: number; + fromCache: boolean; + /** + * The error description. + */ + error: string; + } + + interface OnHeadersReceivedListenerDetails { + id: number; + url: string; + method: string; + webContentsId?: number; + webContents?: WebContents; + frame?: WebFrameMain; + resourceType: string; + referrer: string; + timestamp: number; + statusLine: string; + statusCode: number; + requestHeaders: Record<string, string>; + responseHeaders?: Record<string, string[]>; + } + + interface OnResponseStartedListenerDetails { + id: number; + url: string; + method: string; + webContentsId?: number; + webContents?: WebContents; + frame?: WebFrameMain; + resourceType: string; + referrer: string; + timestamp: number; + responseHeaders?: Record<string, string[]>; + /** + * Indicates whether the response was fetched from disk cache. + */ + fromCache: boolean; + statusCode: number; + statusLine: string; + } + + interface OnSendHeadersListenerDetails { + id: number; + url: string; + method: string; + webContentsId?: number; + webContents?: WebContents; + frame?: WebFrameMain; + resourceType: string; + referrer: string; + timestamp: number; + requestHeaders: Record<string, string>; + } + + interface OpenDevToolsOptions { + /** + * Opens the devtools with specified dock state, can be `right`, `bottom`, + * `undocked`, `detach`. Defaults to last used dock state. In `undocked` mode it's + * possible to dock back. In `detach` mode it's not. + */ + mode: ('right' | 'bottom' | 'undocked' | 'detach'); + /** + * Whether to bring the opened devtools window to the foreground. The default is + * `true`. + */ + activate?: boolean; + } + + interface OpenDialogOptions { + title?: string; + defaultPath?: string; + /** + * Custom label for the confirmation button, when left empty the default label will + * be used. + */ + buttonLabel?: string; + filters?: FileFilter[]; + /** + * Contains which features the dialog should use. The following values are + * supported: + */ + properties?: Array<'openFile' | 'openDirectory' | 'multiSelections' | 'showHiddenFiles' | 'createDirectory' | 'promptToCreate' | 'noResolveAliases' | 'treatPackageAsDirectory' | 'dontAddToRecent'>; + /** + * Message to display above input boxes. + * + * @platform darwin + */ + message?: string; + /** + * Create security scoped bookmarks when packaged for the Mac App Store. + * + * @platform darwin,mas + */ + securityScopedBookmarks?: boolean; + } + + interface OpenDialogReturnValue { + /** + * whether or not the dialog was canceled. + */ + canceled: boolean; + /** + * An array of file paths chosen by the user. If the dialog is cancelled this will + * be an empty array. + */ + filePaths: string[]; + /** + * An array matching the `filePaths` array of base64 encoded strings which contains + * security scoped bookmark data. `securityScopedBookmarks` must be enabled for + * this to be populated. (For return values, see table here.) + * + * @platform darwin,mas + */ + bookmarks?: string[]; + } + + interface OpenDialogSyncOptions { + title?: string; + defaultPath?: string; + /** + * Custom label for the confirmation button, when left empty the default label will + * be used. + */ + buttonLabel?: string; + filters?: FileFilter[]; + /** + * Contains which features the dialog should use. The following values are + * supported: + */ + properties?: Array<'openFile' | 'openDirectory' | 'multiSelections' | 'showHiddenFiles' | 'createDirectory' | 'promptToCreate' | 'noResolveAliases' | 'treatPackageAsDirectory' | 'dontAddToRecent'>; + /** + * Message to display above input boxes. + * + * @platform darwin + */ + message?: string; + /** + * Create security scoped bookmarks when packaged for the Mac App Store. + * + * @platform darwin,mas + */ + securityScopedBookmarks?: boolean; + } + + interface OpenExternalOptions { + /** + * `true` to bring the opened application to the foreground. The default is `true`. + * + * @platform darwin + */ + activate?: boolean; + /** + * The working directory. + * + * @platform win32 + */ + workingDirectory?: string; + } + + interface Options { + } + + interface PageFaviconUpdatedEvent extends Event { + /** + * Array of URLs. + */ + favicons: string[]; + } + + interface PageTitleUpdatedEvent extends Event { + title: string; + explicitSet: boolean; + } + + interface Parameters { + /** + * Specify the screen type to emulate (default: `desktop`): + */ + screenPosition: ('desktop' | 'mobile'); + /** + * Set the emulated screen size (screenPosition == mobile). + */ + screenSize: Size; + /** + * Position the view on the screen (screenPosition == mobile) (default: `{ x: 0, y: + * 0 }`). + */ + viewPosition: Point; + /** + * Set the device scale factor (if zero defaults to original device scale factor) + * (default: `0`). + */ + deviceScaleFactor: number; + /** + * Set the emulated view size (empty means no override) + */ + viewSize: Size; + /** + * Scale of emulated view inside available space (not in fit to view mode) + * (default: `1`). + */ + scale: number; + } + + interface Payment { + /** + * The identifier of the purchased product. + */ + productIdentifier: string; + /** + * The quantity purchased. + */ + quantity: number; + } + + interface PermissionCheckHandlerHandlerDetails { + /** + * The origin of the frame embedding the frame that made the permission check. + * Only set for cross-origin sub frames making permission checks. + */ + embeddingOrigin?: string; + /** + * The security origin of the `media` check. + */ + securityOrigin?: string; + /** + * The type of media access being requested, can be `video`, `audio` or `unknown` + */ + mediaType?: ('video' | 'audio' | 'unknown'); + /** + * The last URL the requesting frame loaded. This is not provided for cross-origin + * sub frames making permission checks. + */ + requestingUrl?: string; + /** + * Whether the frame making the request is the main frame + */ + isMainFrame: boolean; + } + + interface PermissionRequestHandlerHandlerDetails { + /** + * The url of the `openExternal` request. + */ + externalURL?: string; + /** + * The types of media access being requested, elements can be `video` or `audio` + */ + mediaTypes?: Array<'video' | 'audio'>; + /** + * The last URL the requesting frame loaded + */ + requestingUrl: string; + /** + * Whether the frame making the request is the main frame + */ + isMainFrame: boolean; + } + + interface PluginCrashedEvent extends Event { + name: string; + version: string; + } + + interface PopupOptions { + /** + * Default is the focused window. + */ + window?: BrowserWindow; + /** + * Default is the current mouse cursor position. Must be declared if `y` is + * declared. + */ + x?: number; + /** + * Default is the current mouse cursor position. Must be declared if `x` is + * declared. + */ + y?: number; + /** + * The index of the menu item to be positioned under the mouse cursor at the + * specified coordinates. Default is -1. + * + * @platform darwin + */ + positioningItem?: number; + /** + * Called when menu is closed. + */ + callback?: () => void; + } + + interface PreconnectOptions { + /** + * URL for preconnect. Only the origin is relevant for opening the socket. + */ + url: string; + /** + * number of sockets to preconnect. Must be between 1 and 6. Defaults to 1. + */ + numSockets?: number; + } + + interface PrintToPDFOptions { + /** + * the header and footer for the PDF. + */ + headerFooter?: Record<string, string>; + /** + * `true` for landscape, `false` for portrait. + */ + landscape?: boolean; + /** + * Specifies the type of margins to use. Uses 0 for default margin, 1 for no + * margin, and 2 for minimum margin. and `width` in microns. + */ + marginsType?: number; + /** + * The scale factor of the web page. Can range from 0 to 100. + */ + scaleFactor?: number; + /** + * The page range to print. On macOS, only the first range is honored. + */ + pageRanges?: Record<string, number>; + /** + * Specify page size of the generated PDF. Can be `A3`, `A4`, `A5`, `Legal`, + * `Letter`, `Tabloid` or an Object containing `height` + */ + pageSize?: (string) | (Size); + /** + * Whether to print CSS backgrounds. + */ + printBackground?: boolean; + /** + * Whether to print selection only. + */ + printSelectionOnly?: boolean; + } + + interface Privileges { + /** + * Default false. + */ + standard?: boolean; + /** + * Default false. + */ + secure?: boolean; + /** + * Default false. + */ + bypassCSP?: boolean; + /** + * Default false. + */ + allowServiceWorkers?: boolean; + /** + * Default false. + */ + supportFetchAPI?: boolean; + /** + * Default false. + */ + corsEnabled?: boolean; + /** + * Default false. + */ + stream?: boolean; + } + + interface ProgressBarOptions { + /** + * Mode for the progress bar. Can be `none`, `normal`, `indeterminate`, `error` or + * `paused`. + * + * @platform win32 + */ + mode: ('none' | 'normal' | 'indeterminate' | 'error' | 'paused'); + } + + interface Provider { + spellCheck: (words: string[], callback: (misspeltWords: string[]) => void) => void; + } + + interface ReadBookmark { + title: string; + url: string; + } + + interface RegistrationCompletedDetails { + /** + * The base URL that a service worker is registered for + */ + scope: string; + } + + interface RelaunchOptions { + args?: string[]; + execPath?: string; + } + + interface RenderProcessGoneDetails { + /** + * The reason the render process is gone. Possible values: + */ + reason: ('clean-exit' | 'abnormal-exit' | 'killed' | 'crashed' | 'oom' | 'launch-failed' | 'integrity-failure'); + /** + * The exit code of the process, unless `reason` is `launch-failed`, in which case + * `exitCode` will be a platform-specific launch failure error code. + */ + exitCode: number; + } + + interface Request { + hostname: string; + certificate: Certificate; + validatedCertificate: Certificate; + /** + * Verification result from chromium. + */ + verificationResult: string; + /** + * Error code. + */ + errorCode: number; + } + + interface ResizeOptions { + /** + * Defaults to the image's width. + */ + width?: number; + /** + * Defaults to the image's height. + */ + height?: number; + /** + * The desired quality of the resize image. Possible values are `good`, `better`, + * or `best`. The default is `best`. These values express a desired quality/speed + * tradeoff. They are translated into an algorithm-specific method that depends on + * the capabilities (CPU, GPU) of the underlying platform. It is possible for all + * three methods to be mapped to the same algorithm on a given platform. + */ + quality?: string; + } + + interface ResourceUsage { + images: MemoryUsageDetails; + scripts: MemoryUsageDetails; + cssStyleSheets: MemoryUsageDetails; + xslStyleSheets: MemoryUsageDetails; + fonts: MemoryUsageDetails; + other: MemoryUsageDetails; + } + + interface Response { + cancel?: boolean; + /** + * The original request is prevented from being sent or completed and is instead + * redirected to the given URL. + */ + redirectURL?: string; + } + + interface Result { + requestId: number; + /** + * Position of the active match. + */ + activeMatchOrdinal: number; + /** + * Number of Matches. + */ + matches: number; + /** + * Coordinates of first match region. + */ + selectionArea: Rectangle; + finalUpdate: boolean; + } + + interface SaveDialogOptions { + /** + * The dialog title. Cannot be displayed on some _Linux_ desktop environments. + */ + title?: string; + /** + * Absolute directory path, absolute file path, or file name to use by default. + */ + defaultPath?: string; + /** + * Custom label for the confirmation button, when left empty the default label will + * be used. + */ + buttonLabel?: string; + filters?: FileFilter[]; + /** + * Message to display above text fields. + * + * @platform darwin + */ + message?: string; + /** + * Custom label for the text displayed in front of the filename text field. + * + * @platform darwin + */ + nameFieldLabel?: string; + /** + * Show the tags input box, defaults to `true`. + * + * @platform darwin + */ + showsTagField?: boolean; + properties?: Array<'showHiddenFiles' | 'createDirectory' | 'treatPackageAsDirectory' | 'showOverwriteConfirmation' | 'dontAddToRecent'>; + /** + * Create a security scoped bookmark when packaged for the Mac App Store. If this + * option is enabled and the file doesn't already exist a blank file will be + * created at the chosen path. + * + * @platform darwin,mas + */ + securityScopedBookmarks?: boolean; + } + + interface SaveDialogReturnValue { + /** + * whether or not the dialog was canceled. + */ + canceled: boolean; + /** + * If the dialog is canceled, this will be `undefined`. + */ + filePath?: string; + /** + * Base64 encoded string which contains the security scoped bookmark data for the + * saved file. `securityScopedBookmarks` must be enabled for this to be present. + * (For return values, see table here.) + * + * @platform darwin,mas + */ + bookmark?: string; + } + + interface SaveDialogSyncOptions { + /** + * The dialog title. Cannot be displayed on some _Linux_ desktop environments. + */ + title?: string; + /** + * Absolute directory path, absolute file path, or file name to use by default. + */ + defaultPath?: string; + /** + * Custom label for the confirmation button, when left empty the default label will + * be used. + */ + buttonLabel?: string; + filters?: FileFilter[]; + /** + * Message to display above text fields. + * + * @platform darwin + */ + message?: string; + /** + * Custom label for the text displayed in front of the filename text field. + * + * @platform darwin + */ + nameFieldLabel?: string; + /** + * Show the tags input box, defaults to `true`. + * + * @platform darwin + */ + showsTagField?: boolean; + properties?: Array<'showHiddenFiles' | 'createDirectory' | 'treatPackageAsDirectory' | 'showOverwriteConfirmation' | 'dontAddToRecent'>; + /** + * Create a security scoped bookmark when packaged for the Mac App Store. If this + * option is enabled and the file doesn't already exist a blank file will be + * created at the chosen path. + * + * @platform darwin,mas + */ + securityScopedBookmarks?: boolean; + } + + interface Settings { + /** + * `true` to open the app at login, `false` to remove the app as a login item. + * Defaults to `false`. + */ + openAtLogin?: boolean; + /** + * `true` to open the app as hidden. Defaults to `false`. The user can edit this + * setting from the System Preferences so + * `app.getLoginItemSettings().wasOpenedAsHidden` should be checked when the app is + * opened to know the current value. This setting is not available on MAS builds. + * + * @platform darwin + */ + openAsHidden?: boolean; + /** + * The executable to launch at login. Defaults to `process.execPath`. + * + * @platform win32 + */ + path?: string; + /** + * The command-line arguments to pass to the executable. Defaults to an empty + * array. Take care to wrap paths in quotes. + * + * @platform win32 + */ + args?: string[]; + /** + * `true` will change the startup approved registry key and `enable / disable` the + * App in Task Manager and Windows Settings. Defaults to `true`. + * + * @platform win32 + */ + enabled?: boolean; + /** + * value name to write into registry. Defaults to the app's AppUserModelId(). Set + * the app's login item settings. + * + * @platform win32 + */ + name?: string; + } + + interface SourcesOptions { + /** + * An array of Strings that lists the types of desktop sources to be captured, + * available types are `screen` and `window`. + */ + types: string[]; + /** + * The size that the media source thumbnail should be scaled to. Default is `150` x + * `150`. Set width or height to 0 when you do not need the thumbnails. This will + * save the processing time required for capturing the content of each window and + * screen. + */ + thumbnailSize?: Size; + /** + * Set to true to enable fetching window icons. The default value is false. When + * false the appIcon property of the sources return null. Same if a source has the + * type screen. + */ + fetchWindowIcons?: boolean; + } + + interface SSLConfigConfig { + /** + * Can be `tls1`, `tls1.1`, `tls1.2` or `tls1.3`. The minimum SSL version to allow + * when connecting to remote servers. Defaults to `tls1`. + */ + minVersion?: string; + /** + * Can be `tls1.2` or `tls1.3`. The maximum SSL version to allow when connecting to + * remote servers. Defaults to `tls1.3`. + */ + maxVersion?: string; + /** + * List of cipher suites which should be explicitly prevented from being used in + * addition to those disabled by the net built-in policy. Supported literal forms: + * 0xAABB, where AA is `cipher_suite[0]` and BB is `cipher_suite[1]`, as defined in + * RFC 2246, Section 7.4.1.2. Unrecognized but parsable cipher suites in this form + * will not return an error. Ex: To disable TLS_RSA_WITH_RC4_128_MD5, specify + * 0x0004, while to disable TLS_ECDH_ECDSA_WITH_RC4_128_SHA, specify 0xC002. Note + * that TLSv1.3 ciphers cannot be disabled using this mechanism. + */ + disabledCipherSuites?: number[]; + } + + interface StartLoggingOptions { + /** + * What kinds of data should be captured. By default, only metadata about requests + * will be captured. Setting this to `includeSensitive` will include cookies and + * authentication data. Setting it to `everything` will include all bytes + * transferred on sockets. Can be `default`, `includeSensitive` or `everything`. + */ + captureMode?: ('default' | 'includeSensitive' | 'everything'); + /** + * When the log grows beyond this size, logging will automatically stop. Defaults + * to unlimited. + */ + maxFileSize?: number; + } + + interface SystemMemoryInfo { + /** + * The total amount of physical memory in Kilobytes available to the system. + */ + total: number; + /** + * The total amount of memory not being used by applications or disk cache. + */ + free: number; + /** + * The total amount of swap memory in Kilobytes available to the system. + * + * @platform win32,linux + */ + swapTotal: number; + /** + * The free amount of swap memory in Kilobytes available to the system. + * + * @platform win32,linux + */ + swapFree: number; + } + + interface TitleOptions { + /** + * The font family variant to display, can be `monospaced` or `monospacedDigit`. + * `monospaced` is available in macOS 10.15+ and `monospacedDigit` is available in + * macOS 10.11+. When left blank, the title uses the default system font. + */ + fontType?: ('monospaced' | 'monospacedDigit'); + } + + interface ToBitmapOptions { + /** + * Defaults to 1.0. + */ + scaleFactor?: number; + } + + interface ToDataURLOptions { + /** + * Defaults to 1.0. + */ + scaleFactor?: number; + } + + interface ToPNGOptions { + /** + * Defaults to 1.0. + */ + scaleFactor?: number; + } + + interface TouchBarButtonConstructorOptions { + /** + * Button text. + */ + label?: string; + /** + * A short description of the button for use by screenreaders like VoiceOver. + */ + accessibilityLabel?: string; + /** + * Button background color in hex format, i.e `#ABCDEF`. + */ + backgroundColor?: string; + /** + * Button icon. + */ + icon?: (NativeImage) | (string); + /** + * Can be `left`, `right` or `overlay`. Defaults to `overlay`. + */ + iconPosition?: ('left' | 'right' | 'overlay'); + /** + * Function to call when the button is clicked. + */ + click?: () => void; + /** + * Whether the button is in an enabled state. Default is `true`. + */ + enabled?: boolean; + } + + interface TouchBarColorPickerConstructorOptions { + /** + * Array of hex color strings to appear as possible colors to select. + */ + availableColors?: string[]; + /** + * The selected hex color in the picker, i.e `#ABCDEF`. + */ + selectedColor?: string; + /** + * Function to call when a color is selected. + */ + change?: (color: string) => void; + } + + interface TouchBarConstructorOptions { + items?: Array<(TouchBarButton) | (TouchBarColorPicker) | (TouchBarGroup) | (TouchBarLabel) | (TouchBarPopover) | (TouchBarScrubber) | (TouchBarSegmentedControl) | (TouchBarSlider) | (TouchBarSpacer)>; + escapeItem?: (TouchBarButton) | (TouchBarColorPicker) | (TouchBarGroup) | (TouchBarLabel) | (TouchBarPopover) | (TouchBarScrubber) | (TouchBarSegmentedControl) | (TouchBarSlider) | (TouchBarSpacer) | (null); + } + + interface TouchBarGroupConstructorOptions { + /** + * Items to display as a group. + */ + items: TouchBar; + } + + interface TouchBarLabelConstructorOptions { + /** + * Text to display. + */ + label?: string; + /** + * A short description of the button for use by screenreaders like VoiceOver. + */ + accessibilityLabel?: string; + /** + * Hex color of text, i.e `#ABCDEF`. + */ + textColor?: string; + } + + interface TouchBarPopoverConstructorOptions { + /** + * Popover button text. + */ + label?: string; + /** + * Popover button icon. + */ + icon?: NativeImage; + /** + * Items to display in the popover. + */ + items: TouchBar; + /** + * `true` to display a close button on the left of the popover, `false` to not show + * it. Default is `true`. + */ + showCloseButton?: boolean; + } + + interface TouchBarScrubberConstructorOptions { + /** + * An array of items to place in this scrubber. + */ + items: ScrubberItem[]; + /** + * Called when the user taps an item that was not the last tapped item. + */ + select?: (selectedIndex: number) => void; + /** + * Called when the user taps any item. + */ + highlight?: (highlightedIndex: number) => void; + /** + * Selected item style. Can be `background`, `outline` or `none`. Defaults to + * `none`. + */ + selectedStyle?: ('background' | 'outline' | 'none'); + /** + * Selected overlay item style. Can be `background`, `outline` or `none`. Defaults + * to `none`. + */ + overlayStyle?: ('background' | 'outline' | 'none'); + /** + * Defaults to `false`. + */ + showArrowButtons?: boolean; + /** + * Can be `fixed` or `free`. The default is `free`. + */ + mode?: ('fixed' | 'free'); + /** + * Defaults to `true`. + */ + continuous?: boolean; + } + + interface TouchBarSegmentedControlConstructorOptions { + /** + * Style of the segments: + */ + segmentStyle?: ('automatic' | 'rounded' | 'textured-rounded' | 'round-rect' | 'textured-square' | 'capsule' | 'small-square' | 'separated'); + /** + * The selection mode of the control: + */ + mode?: ('single' | 'multiple' | 'buttons'); + /** + * An array of segments to place in this control. + */ + segments: SegmentedControlSegment[]; + /** + * The index of the currently selected segment, will update automatically with user + * interaction. When the mode is `multiple` it will be the last selected item. + */ + selectedIndex?: number; + /** + * Called when the user selects a new segment. + */ + change?: (selectedIndex: number, isSelected: boolean) => void; + } + + interface TouchBarSliderConstructorOptions { + /** + * Label text. + */ + label?: string; + /** + * Selected value. + */ + value?: number; + /** + * Minimum value. + */ + minValue?: number; + /** + * Maximum value. + */ + maxValue?: number; + /** + * Function to call when the slider is changed. + */ + change?: (newValue: number) => void; + } + + interface TouchBarSpacerConstructorOptions { + /** + * Size of spacer, possible values are: + */ + size?: ('small' | 'large' | 'flexible'); + } + + interface TraceBufferUsageReturnValue { + value: number; + percentage: number; + } + + interface UpdateTargetUrlEvent extends Event { + url: string; + } + + interface UploadProgress { + /** + * Whether the request is currently active. If this is false no other properties + * will be set + */ + active: boolean; + /** + * Whether the upload has started. If this is false both `current` and `total` will + * be set to 0. + */ + started: boolean; + /** + * The number of bytes that have been uploaded so far + */ + current: number; + /** + * The number of bytes that will be uploaded this request + */ + total: number; + } + + interface VisibleOnAllWorkspacesOptions { + /** + * Sets whether the window should be visible above fullscreen windows. + * + * @platform darwin + */ + visibleOnFullScreen?: boolean; + /** + * Calling setVisibleOnAllWorkspaces will by default transform the process type + * between UIElementApplication and ForegroundApplication to ensure the correct + * behavior. However, this will hide the window and dock for a short time every + * time it is called. If your window is already of type UIElementApplication, you + * can bypass this transformation by passing true to skipTransformProcessType. + * + * @platform darwin + */ + skipTransformProcessType?: boolean; + } + + interface WebContentsPrintOptions { + /** + * Don't ask user for print settings. Default is `false`. + */ + silent?: boolean; + /** + * Prints the background color and image of the web page. Default is `false`. + */ + printBackground?: boolean; + /** + * Set the printer device name to use. Must be the system-defined name and not the + * 'friendly' name, e.g 'Brother_QL_820NWB' and not 'Brother QL-820NWB'. + */ + deviceName?: string; + /** + * Set whether the printed web page will be in color or grayscale. Default is + * `true`. + */ + color?: boolean; + margins?: Margins; + /** + * Whether the web page should be printed in landscape mode. Default is `false`. + */ + landscape?: boolean; + /** + * The scale factor of the web page. + */ + scaleFactor?: number; + /** + * The number of pages to print per page sheet. + */ + pagesPerSheet?: number; + /** + * Whether the web page should be collated. + */ + collate?: boolean; + /** + * The number of copies of the web page to print. + */ + copies?: number; + /** + * The page range to print. On macOS, only one range is honored. + */ + pageRanges?: PageRanges[]; + /** + * Set the duplex mode of the printed web page. Can be `simplex`, `shortEdge`, or + * `longEdge`. + */ + duplexMode?: ('simplex' | 'shortEdge' | 'longEdge'); + dpi?: Record<string, number>; + /** + * String to be printed as page header. + */ + header?: string; + /** + * String to be printed as page footer. + */ + footer?: string; + /** + * Specify page size of the printed document. Can be `A3`, `A4`, `A5`, `Legal`, + * `Letter`, `Tabloid` or an Object containing `height`. + */ + pageSize?: (string) | (Size); + } + + interface WebviewTagPrintOptions { + /** + * Don't ask user for print settings. Default is `false`. + */ + silent?: boolean; + /** + * Prints the background color and image of the web page. Default is `false`. + */ + printBackground?: boolean; + /** + * Set the printer device name to use. Must be the system-defined name and not the + * 'friendly' name, e.g 'Brother_QL_820NWB' and not 'Brother QL-820NWB'. + */ + deviceName?: string; + /** + * Set whether the printed web page will be in color or grayscale. Default is + * `true`. + */ + color?: boolean; + margins?: Margins; + /** + * Whether the web page should be printed in landscape mode. Default is `false`. + */ + landscape?: boolean; + /** + * The scale factor of the web page. + */ + scaleFactor?: number; + /** + * The number of pages to print per page sheet. + */ + pagesPerSheet?: number; + /** + * Whether the web page should be collated. + */ + collate?: boolean; + /** + * The number of copies of the web page to print. + */ + copies?: number; + /** + * The page range to print. + */ + pageRanges?: PageRanges[]; + /** + * Set the duplex mode of the printed web page. Can be `simplex`, `shortEdge`, or + * `longEdge`. + */ + duplexMode?: ('simplex' | 'shortEdge' | 'longEdge'); + dpi?: Record<string, number>; + /** + * String to be printed as page header. + */ + header?: string; + /** + * String to be printed as page footer. + */ + footer?: string; + /** + * Specify page size of the printed document. Can be `A3`, `A4`, `A5`, `Legal`, + * `Letter`, `Tabloid` or an Object containing `height`. + */ + pageSize?: (string) | (Size); + } + + interface WillNavigateEvent extends Event { + url: string; + } + + interface EditFlags { + /** + * Whether the renderer believes it can undo. + */ + canUndo: boolean; + /** + * Whether the renderer believes it can redo. + */ + canRedo: boolean; + /** + * Whether the renderer believes it can cut. + */ + canCut: boolean; + /** + * Whether the renderer believes it can copy. + */ + canCopy: boolean; + /** + * Whether the renderer believes it can paste. + */ + canPaste: boolean; + /** + * Whether the renderer believes it can delete. + */ + canDelete: boolean; + /** + * Whether the renderer believes it can select all. + */ + canSelectAll: boolean; + /** + * Whether the renderer believes it can edit text richly. + */ + canEditRichly: boolean; + } + + interface FoundInPageResult { + requestId: number; + /** + * Position of the active match. + */ + activeMatchOrdinal: number; + /** + * Number of Matches. + */ + matches: number; + /** + * Coordinates of first match region. + */ + selectionArea: Rectangle; + finalUpdate: boolean; + } + + interface LaunchItems { + /** + * name value of a registry entry. + * + * @platform win32 + */ + name: string; + /** + * The executable to an app that corresponds to a registry entry. + * + * @platform win32 + */ + path: string; + /** + * the command-line arguments to pass to the executable. + * + * @platform win32 + */ + args: string[]; + /** + * one of `user` or `machine`. Indicates whether the registry entry is under + * `HKEY_CURRENT USER` or `HKEY_LOCAL_MACHINE`. + * + * @platform win32 + */ + scope: string; + /** + * `true` if the app registry key is startup approved and therefore shows as + * `enabled` in Task Manager and Windows settings. + * + * @platform win32 + */ + enabled: boolean; + } + + interface Margins { + /** + * Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen, + * you will also need to specify `top`, `bottom`, `left`, and `right`. + */ + marginType?: ('default' | 'none' | 'printableArea' | 'custom'); + /** + * The top margin of the printed web page, in pixels. + */ + top?: number; + /** + * The bottom margin of the printed web page, in pixels. + */ + bottom?: number; + /** + * The left margin of the printed web page, in pixels. + */ + left?: number; + /** + * The right margin of the printed web page, in pixels. + */ + right?: number; + } + + interface MediaFlags { + /** + * Whether the media element has crashed. + */ + inError: boolean; + /** + * Whether the media element is paused. + */ + isPaused: boolean; + /** + * Whether the media element is muted. + */ + isMuted: boolean; + /** + * Whether the media element has audio. + */ + hasAudio: boolean; + /** + * Whether the media element is looping. + */ + isLooping: boolean; + /** + * Whether the media element's controls are visible. + */ + isControlsVisible: boolean; + /** + * Whether the media element's controls are toggleable. + */ + canToggleControls: boolean; + /** + * Whether the media element can be printed. + */ + canPrint: boolean; + /** + * Whether or not the media element can be downloaded. + */ + canSave: boolean; + /** + * Whether the media element can show picture-in-picture. + */ + canShowPictureInPicture: boolean; + /** + * Whether the media element is currently showing picture-in-picture. + */ + isShowingPictureInPicture: boolean; + /** + * Whether the media element can be rotated. + */ + canRotate: boolean; + /** + * Whether the media element can be looped. + */ + canLoop: boolean; + } + + interface PageRanges { + /** + * Index of the first page to print (0-based). + */ + from: number; + /** + * Index of the last page to print (inclusive) (0-based). + */ + to: number; + } + + interface WebPreferences { + /** + * Whether to enable DevTools. If it is set to `false`, can not use + * `BrowserWindow.webContents.openDevTools()` to open DevTools. Default is `true`. + */ + devTools?: boolean; + /** + * Whether node integration is enabled. Default is `false`. + */ + nodeIntegration?: boolean; + /** + * Whether node integration is enabled in web workers. Default is `false`. More + * about this can be found in Multithreading. + */ + nodeIntegrationInWorker?: boolean; + /** + * Experimental option for enabling Node.js support in sub-frames such as iframes + * and child windows. All your preloads will load for every iframe, you can use + * `process.isMainFrame` to determine if you are in the main frame or not. + */ + nodeIntegrationInSubFrames?: boolean; + /** + * Specifies a script that will be loaded before other scripts run in the page. + * This script will always have access to node APIs no matter whether node + * integration is turned on or off. The value should be the absolute file path to + * the script. When node integration is turned off, the preload script can + * reintroduce Node global symbols back to the global scope. See example here. + */ + preload?: string; + /** + * If set, this will sandbox the renderer associated with the window, making it + * compatible with the Chromium OS-level sandbox and disabling the Node.js engine. + * This is not the same as the `nodeIntegration` option and the APIs available to + * the preload script are more limited. Read more about the option here. + */ + sandbox?: boolean; + /** + * Whether to enable the `remote` module. Default is `false`. + */ + enableRemoteModule?: boolean; + /** + * Sets the session used by the page. Instead of passing the Session object + * directly, you can also choose to use the `partition` option instead, which + * accepts a partition string. When both `session` and `partition` are provided, + * `session` will be preferred. Default is the default session. + */ + session?: Session; + /** + * Sets the session used by the page according to the session's partition string. + * If `partition` starts with `persist:`, the page will use a persistent session + * available to all pages in the app with the same `partition`. If there is no + * `persist:` prefix, the page will use an in-memory session. By assigning the same + * `partition`, multiple pages can share the same session. Default is the default + * session. + */ + partition?: string; + /** + * When specified, web pages with the same `affinity` will run in the same renderer + * process. Note that due to reusing the renderer process, certain `webPreferences` + * options will also be shared between the web pages even when you specified + * different values for them, including but not limited to `preload`, `sandbox` and + * `nodeIntegration`. So it is suggested to use exact same `webPreferences` for web + * pages with the same `affinity`. _Deprecated_ + */ + affinity?: string; + /** + * The default zoom factor of the page, `3.0` represents `300%`. Default is `1.0`. + */ + zoomFactor?: number; + /** + * Enables JavaScript support. Default is `true`. + */ + javascript?: boolean; + /** + * When `false`, it will disable the same-origin policy (usually using testing + * websites by people), and set `allowRunningInsecureContent` to `true` if this + * options has not been set by user. Default is `true`. + */ + webSecurity?: boolean; + /** + * Allow an https page to run JavaScript, CSS or plugins from http URLs. Default is + * `false`. + */ + allowRunningInsecureContent?: boolean; + /** + * Enables image support. Default is `true`. + */ + images?: boolean; + /** + * Make TextArea elements resizable. Default is `true`. + */ + textAreasAreResizable?: boolean; + /** + * Enables WebGL support. Default is `true`. + */ + webgl?: boolean; + /** + * Whether plugins should be enabled. Default is `false`. + */ + plugins?: boolean; + /** + * Enables Chromium's experimental features. Default is `false`. + */ + experimentalFeatures?: boolean; + /** + * Enables scroll bounce (rubber banding) effect on macOS. Default is `false`. + */ + scrollBounce?: boolean; + /** + * A list of feature strings separated by `,`, like `CSSVariables,KeyboardEventKey` + * to enable. The full list of supported feature strings can be found in the + * RuntimeEnabledFeatures.json5 file. + */ + enableBlinkFeatures?: string; + /** + * A list of feature strings separated by `,`, like `CSSVariables,KeyboardEventKey` + * to disable. The full list of supported feature strings can be found in the + * RuntimeEnabledFeatures.json5 file. + */ + disableBlinkFeatures?: string; + /** + * Sets the default font for the font-family. + */ + defaultFontFamily?: DefaultFontFamily; + /** + * Defaults to `16`. + */ + defaultFontSize?: number; + /** + * Defaults to `13`. + */ + defaultMonospaceFontSize?: number; + /** + * Defaults to `0`. + */ + minimumFontSize?: number; + /** + * Defaults to `ISO-8859-1`. + */ + defaultEncoding?: string; + /** + * Whether to throttle animations and timers when the page becomes background. This + * also affects the Page Visibility API. Defaults to `true`. + */ + backgroundThrottling?: boolean; + /** + * Whether to enable offscreen rendering for the browser window. Defaults to + * `false`. See the offscreen rendering tutorial for more details. + */ + offscreen?: boolean; + /** + * Whether to run Electron APIs and the specified `preload` script in a separate + * JavaScript context. Defaults to `true`. The context that the `preload` script + * runs in will only have access to its own dedicated `document` and `window` + * globals, as well as its own set of JavaScript builtins (`Array`, `Object`, + * `JSON`, etc.), which are all invisible to the loaded content. The Electron API + * will only be available in the `preload` script and not the loaded page. This + * option should be used when loading potentially untrusted remote content to + * ensure the loaded content cannot tamper with the `preload` script and any + * Electron APIs being used. This option uses the same technique used by Chrome + * Content Scripts. You can access this context in the dev tools by selecting the + * 'Electron Isolated Context' entry in the combo box at the top of the Console + * tab. + */ + contextIsolation?: boolean; + /** + * If true, values returned from `webFrame.executeJavaScript` will be sanitized to + * ensure JS values can't unsafely cross between worlds when using + * `contextIsolation`. Defaults to `true`. _Deprecated_ + */ + worldSafeExecuteJavaScript?: boolean; + /** + * Whether to use native `window.open()`. Defaults to `false`. Child windows will + * always have node integration disabled unless `nodeIntegrationInSubFrames` is + * true. **Note:** This option is currently experimental. + */ + nativeWindowOpen?: boolean; + /** + * Whether to enable the `<webview>` tag. Defaults to `false`. **Note:** The + * `preload` script configured for the `<webview>` will have node integration + * enabled when it is executed so you should ensure remote/untrusted content is not + * able to create a `<webview>` tag with a possibly malicious `preload` script. You + * can use the `will-attach-webview` event on webContents to strip away the + * `preload` script and to validate or alter the `<webview>`'s initial settings. + */ + webviewTag?: boolean; + /** + * A list of strings that will be appended to `process.argv` in the renderer + * process of this app. Useful for passing small bits of data down to renderer + * process preload scripts. + */ + additionalArguments?: string[]; + /** + * Whether to enable browser style consecutive dialog protection. Default is + * `false`. + */ + safeDialogs?: boolean; + /** + * The message to display when consecutive dialog protection is triggered. If not + * defined the default message would be used, note that currently the default + * message is in English and not localized. + */ + safeDialogsMessage?: string; + /** + * Whether to disable dialogs completely. Overrides `safeDialogs`. Default is + * `false`. + */ + disableDialogs?: boolean; + /** + * Whether dragging and dropping a file or link onto the page causes a navigation. + * Default is `false`. + */ + navigateOnDragDrop?: boolean; + /** + * Autoplay policy to apply to content in the window, can be + * `no-user-gesture-required`, `user-gesture-required`, + * `document-user-activation-required`. Defaults to `no-user-gesture-required`. + */ + autoplayPolicy?: ('no-user-gesture-required' | 'user-gesture-required' | 'document-user-activation-required'); + /** + * Whether to prevent the window from resizing when entering HTML Fullscreen. + * Default is `false`. + */ + disableHtmlFullscreenWindowResize?: boolean; + /** + * An alternative title string provided only to accessibility tools such as screen + * readers. This string is not directly visible to users. + */ + accessibleTitle?: string; + /** + * Whether to enable the builtin spellchecker. Default is `true`. + */ + spellcheck?: boolean; + /** + * Whether to enable the WebSQL api. Default is `true`. + */ + enableWebSQL?: boolean; + /** + * Enforces the v8 code caching policy used by blink. Accepted values are + */ + v8CacheOptions?: ('none' | 'code' | 'bypassHeatCheck' | 'bypassHeatCheckAndEagerCompile'); + /** + * Whether to enable preferred size mode. The preferred size is the minimum size + * needed to contain the layout of the document—without requiring scrolling. + * Enabling this will cause the `preferred-size-changed` event to be emitted on the + * `WebContents` when the preferred size changes. Default is `false`. + */ + enablePreferredSizeMode?: boolean; + } + + interface DefaultFontFamily { + /** + * Defaults to `Times New Roman`. + */ + standard?: string; + /** + * Defaults to `Times New Roman`. + */ + serif?: string; + /** + * Defaults to `Arial`. + */ + sansSerif?: string; + /** + * Defaults to `Courier New`. + */ + monospace?: string; + /** + * Defaults to `Script`. + */ + cursive?: string; + /** + * Defaults to `Impact`. + */ + fantasy?: string; + } + + interface RemoteMainInterface { + app: App; + autoUpdater: AutoUpdater; + BrowserView: typeof BrowserView; + BrowserWindow: typeof BrowserWindow; + ClientRequest: typeof ClientRequest; + clipboard: Clipboard; + CommandLine: typeof CommandLine; + contentTracing: ContentTracing; + Cookies: typeof Cookies; + crashReporter: CrashReporter; + Debugger: typeof Debugger; + desktopCapturer: DesktopCapturer; + dialog: Dialog; + Dock: typeof Dock; + DownloadItem: typeof DownloadItem; + globalShortcut: GlobalShortcut; + inAppPurchase: InAppPurchase; + IncomingMessage: typeof IncomingMessage; + ipcMain: IpcMain; + Menu: typeof Menu; + MenuItem: typeof MenuItem; + MessageChannelMain: typeof MessageChannelMain; + MessagePortMain: typeof MessagePortMain; + nativeImage: typeof NativeImage; + nativeTheme: NativeTheme; + net: Net; + netLog: NetLog; + Notification: typeof Notification; + powerMonitor: PowerMonitor; + powerSaveBlocker: PowerSaveBlocker; + protocol: Protocol; + screen: Screen; + ServiceWorkers: typeof ServiceWorkers; + session: typeof Session; + ShareMenu: typeof ShareMenu; + shell: Shell; + systemPreferences: SystemPreferences; + TouchBar: typeof TouchBar; + TouchBarButton: typeof TouchBarButton; + TouchBarColorPicker: typeof TouchBarColorPicker; + TouchBarGroup: typeof TouchBarGroup; + TouchBarLabel: typeof TouchBarLabel; + TouchBarOtherItemsProxy: typeof TouchBarOtherItemsProxy; + TouchBarPopover: typeof TouchBarPopover; + TouchBarScrubber: typeof TouchBarScrubber; + TouchBarSegmentedControl: typeof TouchBarSegmentedControl; + TouchBarSlider: typeof TouchBarSlider; + TouchBarSpacer: typeof TouchBarSpacer; + Tray: typeof Tray; + webContents: typeof WebContents; + webFrameMain: typeof WebFrameMain; + WebRequest: typeof WebRequest; + } + + + + namespace Common { + const clipboard: Clipboard; + const crashReporter: CrashReporter; + const desktopCapturer: DesktopCapturer; + class NativeImage extends Electron.NativeImage {} + type nativeImage = NativeImage; + const nativeImage: typeof NativeImage; + const shell: Shell; + type AboutPanelOptionsOptions = Electron.AboutPanelOptionsOptions; + type AddRepresentationOptions = Electron.AddRepresentationOptions; + type AnimationSettings = Electron.AnimationSettings; + type AppDetailsOptions = Electron.AppDetailsOptions; + type ApplicationInfoForProtocolReturnValue = Electron.ApplicationInfoForProtocolReturnValue; + type AuthenticationResponseDetails = Electron.AuthenticationResponseDetails; + type AuthInfo = Electron.AuthInfo; + type AutoResizeOptions = Electron.AutoResizeOptions; + type BeforeSendResponse = Electron.BeforeSendResponse; + type BitmapOptions = Electron.BitmapOptions; + type BlinkMemoryInfo = Electron.BlinkMemoryInfo; + type BrowserViewConstructorOptions = Electron.BrowserViewConstructorOptions; + type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions; + type CertificateTrustDialogOptions = Electron.CertificateTrustDialogOptions; + type ClearStorageDataOptions = Electron.ClearStorageDataOptions; + type ClientRequestConstructorOptions = Electron.ClientRequestConstructorOptions; + type Config = Electron.Config; + type ConsoleMessageEvent = Electron.ConsoleMessageEvent; + type ContextMenuParams = Electron.ContextMenuParams; + type CookiesGetFilter = Electron.CookiesGetFilter; + type CookiesSetDetails = Electron.CookiesSetDetails; + type CrashReporterStartOptions = Electron.CrashReporterStartOptions; + type CreateFromBitmapOptions = Electron.CreateFromBitmapOptions; + type CreateFromBufferOptions = Electron.CreateFromBufferOptions; + type CreateInterruptedDownloadOptions = Electron.CreateInterruptedDownloadOptions; + type Data = Electron.Data; + type Details = Electron.Details; + type DidChangeThemeColorEvent = Electron.DidChangeThemeColorEvent; + type DidCreateWindowDetails = Electron.DidCreateWindowDetails; + type DidFailLoadEvent = Electron.DidFailLoadEvent; + type DidFrameFinishLoadEvent = Electron.DidFrameFinishLoadEvent; + type DidNavigateEvent = Electron.DidNavigateEvent; + type DidNavigateInPageEvent = Electron.DidNavigateInPageEvent; + type DisplayBalloonOptions = Electron.DisplayBalloonOptions; + type EnableNetworkEmulationOptions = Electron.EnableNetworkEmulationOptions; + type FeedURLOptions = Electron.FeedURLOptions; + type FileIconOptions = Electron.FileIconOptions; + type Filter = Electron.Filter; + type FindInPageOptions = Electron.FindInPageOptions; + type FocusOptions = Electron.FocusOptions; + type FoundInPageEvent = Electron.FoundInPageEvent; + type FromPartitionOptions = Electron.FromPartitionOptions; + type HandlerDetails = Electron.HandlerDetails; + type HeadersReceivedResponse = Electron.HeadersReceivedResponse; + type HeapStatistics = Electron.HeapStatistics; + type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions; + type ImportCertificateOptions = Electron.ImportCertificateOptions; + type Info = Electron.Info; + type Input = Electron.Input; + type InsertCSSOptions = Electron.InsertCSSOptions; + type IpcMessageEvent = Electron.IpcMessageEvent; + type Item = Electron.Item; + type JumpListSettings = Electron.JumpListSettings; + type LoadCommitEvent = Electron.LoadCommitEvent; + type LoadExtensionOptions = Electron.LoadExtensionOptions; + type LoadFileOptions = Electron.LoadFileOptions; + type LoadURLOptions = Electron.LoadURLOptions; + type LoginItemSettings = Electron.LoginItemSettings; + type LoginItemSettingsOptions = Electron.LoginItemSettingsOptions; + type MenuItemConstructorOptions = Electron.MenuItemConstructorOptions; + type MessageBoxOptions = Electron.MessageBoxOptions; + type MessageBoxReturnValue = Electron.MessageBoxReturnValue; + type MessageBoxSyncOptions = Electron.MessageBoxSyncOptions; + type MessageDetails = Electron.MessageDetails; + type MessageEvent = Electron.MessageEvent; + type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions; + type NewWindowEvent = Electron.NewWindowEvent; + type NotificationConstructorOptions = Electron.NotificationConstructorOptions; + type OnBeforeRedirectListenerDetails = Electron.OnBeforeRedirectListenerDetails; + type OnBeforeRequestListenerDetails = Electron.OnBeforeRequestListenerDetails; + type OnBeforeSendHeadersListenerDetails = Electron.OnBeforeSendHeadersListenerDetails; + type OnCompletedListenerDetails = Electron.OnCompletedListenerDetails; + type OnErrorOccurredListenerDetails = Electron.OnErrorOccurredListenerDetails; + type OnHeadersReceivedListenerDetails = Electron.OnHeadersReceivedListenerDetails; + type OnResponseStartedListenerDetails = Electron.OnResponseStartedListenerDetails; + type OnSendHeadersListenerDetails = Electron.OnSendHeadersListenerDetails; + type OpenDevToolsOptions = Electron.OpenDevToolsOptions; + type OpenDialogOptions = Electron.OpenDialogOptions; + type OpenDialogReturnValue = Electron.OpenDialogReturnValue; + type OpenDialogSyncOptions = Electron.OpenDialogSyncOptions; + type OpenExternalOptions = Electron.OpenExternalOptions; + type Options = Electron.Options; + type PageFaviconUpdatedEvent = Electron.PageFaviconUpdatedEvent; + type PageTitleUpdatedEvent = Electron.PageTitleUpdatedEvent; + type Parameters = Electron.Parameters; + type Payment = Electron.Payment; + type PermissionCheckHandlerHandlerDetails = Electron.PermissionCheckHandlerHandlerDetails; + type PermissionRequestHandlerHandlerDetails = Electron.PermissionRequestHandlerHandlerDetails; + type PluginCrashedEvent = Electron.PluginCrashedEvent; + type PopupOptions = Electron.PopupOptions; + type PreconnectOptions = Electron.PreconnectOptions; + type PrintToPDFOptions = Electron.PrintToPDFOptions; + type Privileges = Electron.Privileges; + type ProgressBarOptions = Electron.ProgressBarOptions; + type Provider = Electron.Provider; + type ReadBookmark = Electron.ReadBookmark; + type RegistrationCompletedDetails = Electron.RegistrationCompletedDetails; + type RelaunchOptions = Electron.RelaunchOptions; + type RenderProcessGoneDetails = Electron.RenderProcessGoneDetails; + type Request = Electron.Request; + type ResizeOptions = Electron.ResizeOptions; + type ResourceUsage = Electron.ResourceUsage; + type Response = Electron.Response; + type Result = Electron.Result; + type SaveDialogOptions = Electron.SaveDialogOptions; + type SaveDialogReturnValue = Electron.SaveDialogReturnValue; + type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions; + type Settings = Electron.Settings; + type SourcesOptions = Electron.SourcesOptions; + type SSLConfigConfig = Electron.SSLConfigConfig; + type StartLoggingOptions = Electron.StartLoggingOptions; + type SystemMemoryInfo = Electron.SystemMemoryInfo; + type TitleOptions = Electron.TitleOptions; + type ToBitmapOptions = Electron.ToBitmapOptions; + type ToDataURLOptions = Electron.ToDataURLOptions; + type ToPNGOptions = Electron.ToPNGOptions; + type TouchBarButtonConstructorOptions = Electron.TouchBarButtonConstructorOptions; + type TouchBarColorPickerConstructorOptions = Electron.TouchBarColorPickerConstructorOptions; + type TouchBarConstructorOptions = Electron.TouchBarConstructorOptions; + type TouchBarGroupConstructorOptions = Electron.TouchBarGroupConstructorOptions; + type TouchBarLabelConstructorOptions = Electron.TouchBarLabelConstructorOptions; + type TouchBarPopoverConstructorOptions = Electron.TouchBarPopoverConstructorOptions; + type TouchBarScrubberConstructorOptions = Electron.TouchBarScrubberConstructorOptions; + type TouchBarSegmentedControlConstructorOptions = Electron.TouchBarSegmentedControlConstructorOptions; + type TouchBarSliderConstructorOptions = Electron.TouchBarSliderConstructorOptions; + type TouchBarSpacerConstructorOptions = Electron.TouchBarSpacerConstructorOptions; + type TraceBufferUsageReturnValue = Electron.TraceBufferUsageReturnValue; + type UpdateTargetUrlEvent = Electron.UpdateTargetUrlEvent; + type UploadProgress = Electron.UploadProgress; + type VisibleOnAllWorkspacesOptions = Electron.VisibleOnAllWorkspacesOptions; + type WebContentsPrintOptions = Electron.WebContentsPrintOptions; + type WebviewTagPrintOptions = Electron.WebviewTagPrintOptions; + type WillNavigateEvent = Electron.WillNavigateEvent; + type EditFlags = Electron.EditFlags; + type FoundInPageResult = Electron.FoundInPageResult; + type LaunchItems = Electron.LaunchItems; + type Margins = Electron.Margins; + type MediaFlags = Electron.MediaFlags; + type PageRanges = Electron.PageRanges; + type WebPreferences = Electron.WebPreferences; + type DefaultFontFamily = Electron.DefaultFontFamily; + type BluetoothDevice = Electron.BluetoothDevice; + type Certificate = Electron.Certificate; + type CertificatePrincipal = Electron.CertificatePrincipal; + type Cookie = Electron.Cookie; + type CPUUsage = Electron.CPUUsage; + type CrashReport = Electron.CrashReport; + type CustomScheme = Electron.CustomScheme; + type DesktopCapturerSource = Electron.DesktopCapturerSource; + type Display = Electron.Display; + type Event = Electron.Event; + type Extension = Electron.Extension; + type ExtensionInfo = Electron.ExtensionInfo; + type FileFilter = Electron.FileFilter; + type FilePathWithHeaders = Electron.FilePathWithHeaders; + type GPUFeatureStatus = Electron.GPUFeatureStatus; + type InputEvent = Electron.InputEvent; + type IOCounters = Electron.IOCounters; + type IpcMainEvent = Electron.IpcMainEvent; + type IpcMainInvokeEvent = Electron.IpcMainInvokeEvent; + type IpcRendererEvent = Electron.IpcRendererEvent; + type JumpListCategory = Electron.JumpListCategory; + type JumpListItem = Electron.JumpListItem; + type KeyboardEvent = Electron.KeyboardEvent; + type KeyboardInputEvent = Electron.KeyboardInputEvent; + type MemoryInfo = Electron.MemoryInfo; + type MemoryUsageDetails = Electron.MemoryUsageDetails; + type MimeTypedBuffer = Electron.MimeTypedBuffer; + type MouseInputEvent = Electron.MouseInputEvent; + type MouseWheelInputEvent = Electron.MouseWheelInputEvent; + type NewWindowWebContentsEvent = Electron.NewWindowWebContentsEvent; + type NotificationAction = Electron.NotificationAction; + type NotificationResponse = Electron.NotificationResponse; + type Point = Electron.Point; + type PostBody = Electron.PostBody; + type PrinterInfo = Electron.PrinterInfo; + type ProcessMemoryInfo = Electron.ProcessMemoryInfo; + type ProcessMetric = Electron.ProcessMetric; + type Product = Electron.Product; + type ProtocolRequest = Electron.ProtocolRequest; + type ProtocolResponse = Electron.ProtocolResponse; + type ProtocolResponseUploadData = Electron.ProtocolResponseUploadData; + type Rectangle = Electron.Rectangle; + type Referrer = Electron.Referrer; + type ScrubberItem = Electron.ScrubberItem; + type SegmentedControlSegment = Electron.SegmentedControlSegment; + type SerialPort = Electron.SerialPort; + type ServiceWorkerInfo = Electron.ServiceWorkerInfo; + type SharedWorkerInfo = Electron.SharedWorkerInfo; + type SharingItem = Electron.SharingItem; + type ShortcutDetails = Electron.ShortcutDetails; + type Size = Electron.Size; + type Task = Electron.Task; + type ThumbarButton = Electron.ThumbarButton; + type TraceCategoriesAndOptions = Electron.TraceCategoriesAndOptions; + type TraceConfig = Electron.TraceConfig; + type Transaction = Electron.Transaction; + type UploadData = Electron.UploadData; + type UploadFile = Electron.UploadFile; + type UploadRawData = Electron.UploadRawData; + type WebSource = Electron.WebSource; + } + + namespace Main { + const app: App; + const autoUpdater: AutoUpdater; + class BrowserView extends Electron.BrowserView {} + class BrowserWindow extends Electron.BrowserWindow {} + class ClientRequest extends Electron.ClientRequest {} + class CommandLine extends Electron.CommandLine {} + const contentTracing: ContentTracing; + class Cookies extends Electron.Cookies {} + class Debugger extends Electron.Debugger {} + const dialog: Dialog; + class Dock extends Electron.Dock {} + class DownloadItem extends Electron.DownloadItem {} + const globalShortcut: GlobalShortcut; + const inAppPurchase: InAppPurchase; + class IncomingMessage extends Electron.IncomingMessage {} + const ipcMain: IpcMain; + class Menu extends Electron.Menu {} + class MenuItem extends Electron.MenuItem {} + class MessageChannelMain extends Electron.MessageChannelMain {} + class MessagePortMain extends Electron.MessagePortMain {} + const nativeTheme: NativeTheme; + const net: Net; + const netLog: NetLog; + class Notification extends Electron.Notification {} + const powerMonitor: PowerMonitor; + const powerSaveBlocker: PowerSaveBlocker; + const protocol: Protocol; + const screen: Screen; + class ServiceWorkers extends Electron.ServiceWorkers {} + class Session extends Electron.Session {} + type session = Session; + const session: typeof Session; + class ShareMenu extends Electron.ShareMenu {} + const systemPreferences: SystemPreferences; + class TouchBar extends Electron.TouchBar {} + class TouchBarButton extends Electron.TouchBarButton {} + class TouchBarColorPicker extends Electron.TouchBarColorPicker {} + class TouchBarGroup extends Electron.TouchBarGroup {} + class TouchBarLabel extends Electron.TouchBarLabel {} + class TouchBarOtherItemsProxy extends Electron.TouchBarOtherItemsProxy {} + class TouchBarPopover extends Electron.TouchBarPopover {} + class TouchBarScrubber extends Electron.TouchBarScrubber {} + class TouchBarSegmentedControl extends Electron.TouchBarSegmentedControl {} + class TouchBarSlider extends Electron.TouchBarSlider {} + class TouchBarSpacer extends Electron.TouchBarSpacer {} + class Tray extends Electron.Tray {} + class WebContents extends Electron.WebContents {} + type webContents = WebContents; + const webContents: typeof WebContents; + class WebFrameMain extends Electron.WebFrameMain {} + type webFrameMain = WebFrameMain; + const webFrameMain: typeof WebFrameMain; + class WebRequest extends Electron.WebRequest {} + type AboutPanelOptionsOptions = Electron.AboutPanelOptionsOptions; + type AddRepresentationOptions = Electron.AddRepresentationOptions; + type AnimationSettings = Electron.AnimationSettings; + type AppDetailsOptions = Electron.AppDetailsOptions; + type ApplicationInfoForProtocolReturnValue = Electron.ApplicationInfoForProtocolReturnValue; + type AuthenticationResponseDetails = Electron.AuthenticationResponseDetails; + type AuthInfo = Electron.AuthInfo; + type AutoResizeOptions = Electron.AutoResizeOptions; + type BeforeSendResponse = Electron.BeforeSendResponse; + type BitmapOptions = Electron.BitmapOptions; + type BlinkMemoryInfo = Electron.BlinkMemoryInfo; + type BrowserViewConstructorOptions = Electron.BrowserViewConstructorOptions; + type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions; + type CertificateTrustDialogOptions = Electron.CertificateTrustDialogOptions; + type ClearStorageDataOptions = Electron.ClearStorageDataOptions; + type ClientRequestConstructorOptions = Electron.ClientRequestConstructorOptions; + type Config = Electron.Config; + type ConsoleMessageEvent = Electron.ConsoleMessageEvent; + type ContextMenuParams = Electron.ContextMenuParams; + type CookiesGetFilter = Electron.CookiesGetFilter; + type CookiesSetDetails = Electron.CookiesSetDetails; + type CrashReporterStartOptions = Electron.CrashReporterStartOptions; + type CreateFromBitmapOptions = Electron.CreateFromBitmapOptions; + type CreateFromBufferOptions = Electron.CreateFromBufferOptions; + type CreateInterruptedDownloadOptions = Electron.CreateInterruptedDownloadOptions; + type Data = Electron.Data; + type Details = Electron.Details; + type DidChangeThemeColorEvent = Electron.DidChangeThemeColorEvent; + type DidCreateWindowDetails = Electron.DidCreateWindowDetails; + type DidFailLoadEvent = Electron.DidFailLoadEvent; + type DidFrameFinishLoadEvent = Electron.DidFrameFinishLoadEvent; + type DidNavigateEvent = Electron.DidNavigateEvent; + type DidNavigateInPageEvent = Electron.DidNavigateInPageEvent; + type DisplayBalloonOptions = Electron.DisplayBalloonOptions; + type EnableNetworkEmulationOptions = Electron.EnableNetworkEmulationOptions; + type FeedURLOptions = Electron.FeedURLOptions; + type FileIconOptions = Electron.FileIconOptions; + type Filter = Electron.Filter; + type FindInPageOptions = Electron.FindInPageOptions; + type FocusOptions = Electron.FocusOptions; + type FoundInPageEvent = Electron.FoundInPageEvent; + type FromPartitionOptions = Electron.FromPartitionOptions; + type HandlerDetails = Electron.HandlerDetails; + type HeadersReceivedResponse = Electron.HeadersReceivedResponse; + type HeapStatistics = Electron.HeapStatistics; + type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions; + type ImportCertificateOptions = Electron.ImportCertificateOptions; + type Info = Electron.Info; + type Input = Electron.Input; + type InsertCSSOptions = Electron.InsertCSSOptions; + type IpcMessageEvent = Electron.IpcMessageEvent; + type Item = Electron.Item; + type JumpListSettings = Electron.JumpListSettings; + type LoadCommitEvent = Electron.LoadCommitEvent; + type LoadExtensionOptions = Electron.LoadExtensionOptions; + type LoadFileOptions = Electron.LoadFileOptions; + type LoadURLOptions = Electron.LoadURLOptions; + type LoginItemSettings = Electron.LoginItemSettings; + type LoginItemSettingsOptions = Electron.LoginItemSettingsOptions; + type MenuItemConstructorOptions = Electron.MenuItemConstructorOptions; + type MessageBoxOptions = Electron.MessageBoxOptions; + type MessageBoxReturnValue = Electron.MessageBoxReturnValue; + type MessageBoxSyncOptions = Electron.MessageBoxSyncOptions; + type MessageDetails = Electron.MessageDetails; + type MessageEvent = Electron.MessageEvent; + type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions; + type NewWindowEvent = Electron.NewWindowEvent; + type NotificationConstructorOptions = Electron.NotificationConstructorOptions; + type OnBeforeRedirectListenerDetails = Electron.OnBeforeRedirectListenerDetails; + type OnBeforeRequestListenerDetails = Electron.OnBeforeRequestListenerDetails; + type OnBeforeSendHeadersListenerDetails = Electron.OnBeforeSendHeadersListenerDetails; + type OnCompletedListenerDetails = Electron.OnCompletedListenerDetails; + type OnErrorOccurredListenerDetails = Electron.OnErrorOccurredListenerDetails; + type OnHeadersReceivedListenerDetails = Electron.OnHeadersReceivedListenerDetails; + type OnResponseStartedListenerDetails = Electron.OnResponseStartedListenerDetails; + type OnSendHeadersListenerDetails = Electron.OnSendHeadersListenerDetails; + type OpenDevToolsOptions = Electron.OpenDevToolsOptions; + type OpenDialogOptions = Electron.OpenDialogOptions; + type OpenDialogReturnValue = Electron.OpenDialogReturnValue; + type OpenDialogSyncOptions = Electron.OpenDialogSyncOptions; + type OpenExternalOptions = Electron.OpenExternalOptions; + type Options = Electron.Options; + type PageFaviconUpdatedEvent = Electron.PageFaviconUpdatedEvent; + type PageTitleUpdatedEvent = Electron.PageTitleUpdatedEvent; + type Parameters = Electron.Parameters; + type Payment = Electron.Payment; + type PermissionCheckHandlerHandlerDetails = Electron.PermissionCheckHandlerHandlerDetails; + type PermissionRequestHandlerHandlerDetails = Electron.PermissionRequestHandlerHandlerDetails; + type PluginCrashedEvent = Electron.PluginCrashedEvent; + type PopupOptions = Electron.PopupOptions; + type PreconnectOptions = Electron.PreconnectOptions; + type PrintToPDFOptions = Electron.PrintToPDFOptions; + type Privileges = Electron.Privileges; + type ProgressBarOptions = Electron.ProgressBarOptions; + type Provider = Electron.Provider; + type ReadBookmark = Electron.ReadBookmark; + type RegistrationCompletedDetails = Electron.RegistrationCompletedDetails; + type RelaunchOptions = Electron.RelaunchOptions; + type RenderProcessGoneDetails = Electron.RenderProcessGoneDetails; + type Request = Electron.Request; + type ResizeOptions = Electron.ResizeOptions; + type ResourceUsage = Electron.ResourceUsage; + type Response = Electron.Response; + type Result = Electron.Result; + type SaveDialogOptions = Electron.SaveDialogOptions; + type SaveDialogReturnValue = Electron.SaveDialogReturnValue; + type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions; + type Settings = Electron.Settings; + type SourcesOptions = Electron.SourcesOptions; + type SSLConfigConfig = Electron.SSLConfigConfig; + type StartLoggingOptions = Electron.StartLoggingOptions; + type SystemMemoryInfo = Electron.SystemMemoryInfo; + type TitleOptions = Electron.TitleOptions; + type ToBitmapOptions = Electron.ToBitmapOptions; + type ToDataURLOptions = Electron.ToDataURLOptions; + type ToPNGOptions = Electron.ToPNGOptions; + type TouchBarButtonConstructorOptions = Electron.TouchBarButtonConstructorOptions; + type TouchBarColorPickerConstructorOptions = Electron.TouchBarColorPickerConstructorOptions; + type TouchBarConstructorOptions = Electron.TouchBarConstructorOptions; + type TouchBarGroupConstructorOptions = Electron.TouchBarGroupConstructorOptions; + type TouchBarLabelConstructorOptions = Electron.TouchBarLabelConstructorOptions; + type TouchBarPopoverConstructorOptions = Electron.TouchBarPopoverConstructorOptions; + type TouchBarScrubberConstructorOptions = Electron.TouchBarScrubberConstructorOptions; + type TouchBarSegmentedControlConstructorOptions = Electron.TouchBarSegmentedControlConstructorOptions; + type TouchBarSliderConstructorOptions = Electron.TouchBarSliderConstructorOptions; + type TouchBarSpacerConstructorOptions = Electron.TouchBarSpacerConstructorOptions; + type TraceBufferUsageReturnValue = Electron.TraceBufferUsageReturnValue; + type UpdateTargetUrlEvent = Electron.UpdateTargetUrlEvent; + type UploadProgress = Electron.UploadProgress; + type VisibleOnAllWorkspacesOptions = Electron.VisibleOnAllWorkspacesOptions; + type WebContentsPrintOptions = Electron.WebContentsPrintOptions; + type WebviewTagPrintOptions = Electron.WebviewTagPrintOptions; + type WillNavigateEvent = Electron.WillNavigateEvent; + type EditFlags = Electron.EditFlags; + type FoundInPageResult = Electron.FoundInPageResult; + type LaunchItems = Electron.LaunchItems; + type Margins = Electron.Margins; + type MediaFlags = Electron.MediaFlags; + type PageRanges = Electron.PageRanges; + type WebPreferences = Electron.WebPreferences; + type DefaultFontFamily = Electron.DefaultFontFamily; + type BluetoothDevice = Electron.BluetoothDevice; + type Certificate = Electron.Certificate; + type CertificatePrincipal = Electron.CertificatePrincipal; + type Cookie = Electron.Cookie; + type CPUUsage = Electron.CPUUsage; + type CrashReport = Electron.CrashReport; + type CustomScheme = Electron.CustomScheme; + type DesktopCapturerSource = Electron.DesktopCapturerSource; + type Display = Electron.Display; + type Event = Electron.Event; + type Extension = Electron.Extension; + type ExtensionInfo = Electron.ExtensionInfo; + type FileFilter = Electron.FileFilter; + type FilePathWithHeaders = Electron.FilePathWithHeaders; + type GPUFeatureStatus = Electron.GPUFeatureStatus; + type InputEvent = Electron.InputEvent; + type IOCounters = Electron.IOCounters; + type IpcMainEvent = Electron.IpcMainEvent; + type IpcMainInvokeEvent = Electron.IpcMainInvokeEvent; + type IpcRendererEvent = Electron.IpcRendererEvent; + type JumpListCategory = Electron.JumpListCategory; + type JumpListItem = Electron.JumpListItem; + type KeyboardEvent = Electron.KeyboardEvent; + type KeyboardInputEvent = Electron.KeyboardInputEvent; + type MemoryInfo = Electron.MemoryInfo; + type MemoryUsageDetails = Electron.MemoryUsageDetails; + type MimeTypedBuffer = Electron.MimeTypedBuffer; + type MouseInputEvent = Electron.MouseInputEvent; + type MouseWheelInputEvent = Electron.MouseWheelInputEvent; + type NewWindowWebContentsEvent = Electron.NewWindowWebContentsEvent; + type NotificationAction = Electron.NotificationAction; + type NotificationResponse = Electron.NotificationResponse; + type Point = Electron.Point; + type PostBody = Electron.PostBody; + type PrinterInfo = Electron.PrinterInfo; + type ProcessMemoryInfo = Electron.ProcessMemoryInfo; + type ProcessMetric = Electron.ProcessMetric; + type Product = Electron.Product; + type ProtocolRequest = Electron.ProtocolRequest; + type ProtocolResponse = Electron.ProtocolResponse; + type ProtocolResponseUploadData = Electron.ProtocolResponseUploadData; + type Rectangle = Electron.Rectangle; + type Referrer = Electron.Referrer; + type ScrubberItem = Electron.ScrubberItem; + type SegmentedControlSegment = Electron.SegmentedControlSegment; + type SerialPort = Electron.SerialPort; + type ServiceWorkerInfo = Electron.ServiceWorkerInfo; + type SharedWorkerInfo = Electron.SharedWorkerInfo; + type SharingItem = Electron.SharingItem; + type ShortcutDetails = Electron.ShortcutDetails; + type Size = Electron.Size; + type Task = Electron.Task; + type ThumbarButton = Electron.ThumbarButton; + type TraceCategoriesAndOptions = Electron.TraceCategoriesAndOptions; + type TraceConfig = Electron.TraceConfig; + type Transaction = Electron.Transaction; + type UploadData = Electron.UploadData; + type UploadFile = Electron.UploadFile; + type UploadRawData = Electron.UploadRawData; + type WebSource = Electron.WebSource; + } + + namespace Renderer { + class BrowserWindowProxy extends Electron.BrowserWindowProxy {} + const contextBridge: ContextBridge; + const ipcRenderer: IpcRenderer; + const remote: Remote; + const webFrame: WebFrame; + const webviewTag: WebviewTag; + type AboutPanelOptionsOptions = Electron.AboutPanelOptionsOptions; + type AddRepresentationOptions = Electron.AddRepresentationOptions; + type AnimationSettings = Electron.AnimationSettings; + type AppDetailsOptions = Electron.AppDetailsOptions; + type ApplicationInfoForProtocolReturnValue = Electron.ApplicationInfoForProtocolReturnValue; + type AuthenticationResponseDetails = Electron.AuthenticationResponseDetails; + type AuthInfo = Electron.AuthInfo; + type AutoResizeOptions = Electron.AutoResizeOptions; + type BeforeSendResponse = Electron.BeforeSendResponse; + type BitmapOptions = Electron.BitmapOptions; + type BlinkMemoryInfo = Electron.BlinkMemoryInfo; + type BrowserViewConstructorOptions = Electron.BrowserViewConstructorOptions; + type BrowserWindowConstructorOptions = Electron.BrowserWindowConstructorOptions; + type CertificateTrustDialogOptions = Electron.CertificateTrustDialogOptions; + type ClearStorageDataOptions = Electron.ClearStorageDataOptions; + type ClientRequestConstructorOptions = Electron.ClientRequestConstructorOptions; + type Config = Electron.Config; + type ConsoleMessageEvent = Electron.ConsoleMessageEvent; + type ContextMenuParams = Electron.ContextMenuParams; + type CookiesGetFilter = Electron.CookiesGetFilter; + type CookiesSetDetails = Electron.CookiesSetDetails; + type CrashReporterStartOptions = Electron.CrashReporterStartOptions; + type CreateFromBitmapOptions = Electron.CreateFromBitmapOptions; + type CreateFromBufferOptions = Electron.CreateFromBufferOptions; + type CreateInterruptedDownloadOptions = Electron.CreateInterruptedDownloadOptions; + type Data = Electron.Data; + type Details = Electron.Details; + type DidChangeThemeColorEvent = Electron.DidChangeThemeColorEvent; + type DidCreateWindowDetails = Electron.DidCreateWindowDetails; + type DidFailLoadEvent = Electron.DidFailLoadEvent; + type DidFrameFinishLoadEvent = Electron.DidFrameFinishLoadEvent; + type DidNavigateEvent = Electron.DidNavigateEvent; + type DidNavigateInPageEvent = Electron.DidNavigateInPageEvent; + type DisplayBalloonOptions = Electron.DisplayBalloonOptions; + type EnableNetworkEmulationOptions = Electron.EnableNetworkEmulationOptions; + type FeedURLOptions = Electron.FeedURLOptions; + type FileIconOptions = Electron.FileIconOptions; + type Filter = Electron.Filter; + type FindInPageOptions = Electron.FindInPageOptions; + type FocusOptions = Electron.FocusOptions; + type FoundInPageEvent = Electron.FoundInPageEvent; + type FromPartitionOptions = Electron.FromPartitionOptions; + type HandlerDetails = Electron.HandlerDetails; + type HeadersReceivedResponse = Electron.HeadersReceivedResponse; + type HeapStatistics = Electron.HeapStatistics; + type IgnoreMouseEventsOptions = Electron.IgnoreMouseEventsOptions; + type ImportCertificateOptions = Electron.ImportCertificateOptions; + type Info = Electron.Info; + type Input = Electron.Input; + type InsertCSSOptions = Electron.InsertCSSOptions; + type IpcMessageEvent = Electron.IpcMessageEvent; + type Item = Electron.Item; + type JumpListSettings = Electron.JumpListSettings; + type LoadCommitEvent = Electron.LoadCommitEvent; + type LoadExtensionOptions = Electron.LoadExtensionOptions; + type LoadFileOptions = Electron.LoadFileOptions; + type LoadURLOptions = Electron.LoadURLOptions; + type LoginItemSettings = Electron.LoginItemSettings; + type LoginItemSettingsOptions = Electron.LoginItemSettingsOptions; + type MenuItemConstructorOptions = Electron.MenuItemConstructorOptions; + type MessageBoxOptions = Electron.MessageBoxOptions; + type MessageBoxReturnValue = Electron.MessageBoxReturnValue; + type MessageBoxSyncOptions = Electron.MessageBoxSyncOptions; + type MessageDetails = Electron.MessageDetails; + type MessageEvent = Electron.MessageEvent; + type MoveToApplicationsFolderOptions = Electron.MoveToApplicationsFolderOptions; + type NewWindowEvent = Electron.NewWindowEvent; + type NotificationConstructorOptions = Electron.NotificationConstructorOptions; + type OnBeforeRedirectListenerDetails = Electron.OnBeforeRedirectListenerDetails; + type OnBeforeRequestListenerDetails = Electron.OnBeforeRequestListenerDetails; + type OnBeforeSendHeadersListenerDetails = Electron.OnBeforeSendHeadersListenerDetails; + type OnCompletedListenerDetails = Electron.OnCompletedListenerDetails; + type OnErrorOccurredListenerDetails = Electron.OnErrorOccurredListenerDetails; + type OnHeadersReceivedListenerDetails = Electron.OnHeadersReceivedListenerDetails; + type OnResponseStartedListenerDetails = Electron.OnResponseStartedListenerDetails; + type OnSendHeadersListenerDetails = Electron.OnSendHeadersListenerDetails; + type OpenDevToolsOptions = Electron.OpenDevToolsOptions; + type OpenDialogOptions = Electron.OpenDialogOptions; + type OpenDialogReturnValue = Electron.OpenDialogReturnValue; + type OpenDialogSyncOptions = Electron.OpenDialogSyncOptions; + type OpenExternalOptions = Electron.OpenExternalOptions; + type Options = Electron.Options; + type PageFaviconUpdatedEvent = Electron.PageFaviconUpdatedEvent; + type PageTitleUpdatedEvent = Electron.PageTitleUpdatedEvent; + type Parameters = Electron.Parameters; + type Payment = Electron.Payment; + type PermissionCheckHandlerHandlerDetails = Electron.PermissionCheckHandlerHandlerDetails; + type PermissionRequestHandlerHandlerDetails = Electron.PermissionRequestHandlerHandlerDetails; + type PluginCrashedEvent = Electron.PluginCrashedEvent; + type PopupOptions = Electron.PopupOptions; + type PreconnectOptions = Electron.PreconnectOptions; + type PrintToPDFOptions = Electron.PrintToPDFOptions; + type Privileges = Electron.Privileges; + type ProgressBarOptions = Electron.ProgressBarOptions; + type Provider = Electron.Provider; + type ReadBookmark = Electron.ReadBookmark; + type RegistrationCompletedDetails = Electron.RegistrationCompletedDetails; + type RelaunchOptions = Electron.RelaunchOptions; + type RenderProcessGoneDetails = Electron.RenderProcessGoneDetails; + type Request = Electron.Request; + type ResizeOptions = Electron.ResizeOptions; + type ResourceUsage = Electron.ResourceUsage; + type Response = Electron.Response; + type Result = Electron.Result; + type SaveDialogOptions = Electron.SaveDialogOptions; + type SaveDialogReturnValue = Electron.SaveDialogReturnValue; + type SaveDialogSyncOptions = Electron.SaveDialogSyncOptions; + type Settings = Electron.Settings; + type SourcesOptions = Electron.SourcesOptions; + type SSLConfigConfig = Electron.SSLConfigConfig; + type StartLoggingOptions = Electron.StartLoggingOptions; + type SystemMemoryInfo = Electron.SystemMemoryInfo; + type TitleOptions = Electron.TitleOptions; + type ToBitmapOptions = Electron.ToBitmapOptions; + type ToDataURLOptions = Electron.ToDataURLOptions; + type ToPNGOptions = Electron.ToPNGOptions; + type TouchBarButtonConstructorOptions = Electron.TouchBarButtonConstructorOptions; + type TouchBarColorPickerConstructorOptions = Electron.TouchBarColorPickerConstructorOptions; + type TouchBarConstructorOptions = Electron.TouchBarConstructorOptions; + type TouchBarGroupConstructorOptions = Electron.TouchBarGroupConstructorOptions; + type TouchBarLabelConstructorOptions = Electron.TouchBarLabelConstructorOptions; + type TouchBarPopoverConstructorOptions = Electron.TouchBarPopoverConstructorOptions; + type TouchBarScrubberConstructorOptions = Electron.TouchBarScrubberConstructorOptions; + type TouchBarSegmentedControlConstructorOptions = Electron.TouchBarSegmentedControlConstructorOptions; + type TouchBarSliderConstructorOptions = Electron.TouchBarSliderConstructorOptions; + type TouchBarSpacerConstructorOptions = Electron.TouchBarSpacerConstructorOptions; + type TraceBufferUsageReturnValue = Electron.TraceBufferUsageReturnValue; + type UpdateTargetUrlEvent = Electron.UpdateTargetUrlEvent; + type UploadProgress = Electron.UploadProgress; + type VisibleOnAllWorkspacesOptions = Electron.VisibleOnAllWorkspacesOptions; + type WebContentsPrintOptions = Electron.WebContentsPrintOptions; + type WebviewTagPrintOptions = Electron.WebviewTagPrintOptions; + type WillNavigateEvent = Electron.WillNavigateEvent; + type EditFlags = Electron.EditFlags; + type FoundInPageResult = Electron.FoundInPageResult; + type LaunchItems = Electron.LaunchItems; + type Margins = Electron.Margins; + type MediaFlags = Electron.MediaFlags; + type PageRanges = Electron.PageRanges; + type WebPreferences = Electron.WebPreferences; + type DefaultFontFamily = Electron.DefaultFontFamily; + type BluetoothDevice = Electron.BluetoothDevice; + type Certificate = Electron.Certificate; + type CertificatePrincipal = Electron.CertificatePrincipal; + type Cookie = Electron.Cookie; + type CPUUsage = Electron.CPUUsage; + type CrashReport = Electron.CrashReport; + type CustomScheme = Electron.CustomScheme; + type DesktopCapturerSource = Electron.DesktopCapturerSource; + type Display = Electron.Display; + type Event = Electron.Event; + type Extension = Electron.Extension; + type ExtensionInfo = Electron.ExtensionInfo; + type FileFilter = Electron.FileFilter; + type FilePathWithHeaders = Electron.FilePathWithHeaders; + type GPUFeatureStatus = Electron.GPUFeatureStatus; + type InputEvent = Electron.InputEvent; + type IOCounters = Electron.IOCounters; + type IpcMainEvent = Electron.IpcMainEvent; + type IpcMainInvokeEvent = Electron.IpcMainInvokeEvent; + type IpcRendererEvent = Electron.IpcRendererEvent; + type JumpListCategory = Electron.JumpListCategory; + type JumpListItem = Electron.JumpListItem; + type KeyboardEvent = Electron.KeyboardEvent; + type KeyboardInputEvent = Electron.KeyboardInputEvent; + type MemoryInfo = Electron.MemoryInfo; + type MemoryUsageDetails = Electron.MemoryUsageDetails; + type MimeTypedBuffer = Electron.MimeTypedBuffer; + type MouseInputEvent = Electron.MouseInputEvent; + type MouseWheelInputEvent = Electron.MouseWheelInputEvent; + type NewWindowWebContentsEvent = Electron.NewWindowWebContentsEvent; + type NotificationAction = Electron.NotificationAction; + type NotificationResponse = Electron.NotificationResponse; + type Point = Electron.Point; + type PostBody = Electron.PostBody; + type PrinterInfo = Electron.PrinterInfo; + type ProcessMemoryInfo = Electron.ProcessMemoryInfo; + type ProcessMetric = Electron.ProcessMetric; + type Product = Electron.Product; + type ProtocolRequest = Electron.ProtocolRequest; + type ProtocolResponse = Electron.ProtocolResponse; + type ProtocolResponseUploadData = Electron.ProtocolResponseUploadData; + type Rectangle = Electron.Rectangle; + type Referrer = Electron.Referrer; + type ScrubberItem = Electron.ScrubberItem; + type SegmentedControlSegment = Electron.SegmentedControlSegment; + type SerialPort = Electron.SerialPort; + type ServiceWorkerInfo = Electron.ServiceWorkerInfo; + type SharedWorkerInfo = Electron.SharedWorkerInfo; + type SharingItem = Electron.SharingItem; + type ShortcutDetails = Electron.ShortcutDetails; + type Size = Electron.Size; + type Task = Electron.Task; + type ThumbarButton = Electron.ThumbarButton; + type TraceCategoriesAndOptions = Electron.TraceCategoriesAndOptions; + type TraceConfig = Electron.TraceConfig; + type Transaction = Electron.Transaction; + type UploadData = Electron.UploadData; + type UploadFile = Electron.UploadFile; + type UploadRawData = Electron.UploadRawData; + type WebSource = Electron.WebSource; + } + + const app: App; + const autoUpdater: AutoUpdater; + const clipboard: Clipboard; + const contentTracing: ContentTracing; + const contextBridge: ContextBridge; + const crashReporter: CrashReporter; + const desktopCapturer: DesktopCapturer; + const dialog: Dialog; + const globalShortcut: GlobalShortcut; + const inAppPurchase: InAppPurchase; + const ipcMain: IpcMain; + const ipcRenderer: IpcRenderer; + type nativeImage = NativeImage; + const nativeImage: typeof NativeImage; + const nativeTheme: NativeTheme; + const net: Net; + const netLog: NetLog; + const powerMonitor: PowerMonitor; + const powerSaveBlocker: PowerSaveBlocker; + const protocol: Protocol; + const remote: Remote; + const screen: Screen; + type session = Session; + const session: typeof Session; + const shell: Shell; + const systemPreferences: SystemPreferences; + type webContents = WebContents; + const webContents: typeof WebContents; + const webFrame: WebFrame; + type webFrameMain = WebFrameMain; + const webFrameMain: typeof WebFrameMain; + const webviewTag: WebviewTag; + +} + +declare module 'electron' { + export = Electron; +} + +declare module 'electron/main' { + export = Electron.Main +} + +declare module 'electron/common' { + export = Electron.Common +} + +declare module 'electron/renderer' { + export = Electron.Renderer +} + +interface NodeRequireFunction { + (moduleName: 'electron'): typeof Electron; + (moduleName: 'electron/main'): typeof Electron.Main; + (moduleName: 'electron/common'): typeof Electron.Common; + (moduleName: 'electron/renderer'): typeof Electron.Renderer; +} + +interface NodeRequire { + (moduleName: 'electron'): typeof Electron; + (moduleName: 'electron/main'): typeof Electron.Main; + (moduleName: 'electron/common'): typeof Electron.Common; + (moduleName: 'electron/renderer'): typeof Electron.Renderer; +} + +interface File { + /** + * The real path to the file on the users filesystem + */ + path: string; +} + +declare module 'original-fs' { + import * as fs from 'fs'; + export = fs; +} + +interface Document { + createElement(tagName: 'webview'): Electron.WebviewTag; +} + +declare namespace NodeJS { + interface Process extends NodeJS.EventEmitter { + + // Docs: https://electronjs.org/docs/api/process + + /** + * Emitted when Electron has loaded its internal initialization script and is + * beginning to load the web page or the main script. + */ + on(event: 'loaded', listener: Function): this; + once(event: 'loaded', listener: Function): this; + addListener(event: 'loaded', listener: Function): this; + removeListener(event: 'loaded', listener: Function): this; + /** + * Causes the main thread of the current process crash. + */ + crash(): void; + /** + * * `allocated` Integer - Size of all allocated objects in Kilobytes. + * * `marked` Integer - Size of all marked objects in Kilobytes. + * * `total` Integer - Total allocated space in Kilobytes. + * + * Returns an object with Blink memory information. It can be useful for debugging + * rendering / DOM related memory issues. Note that all values are reported in + * Kilobytes. + */ + getBlinkMemoryInfo(): Electron.BlinkMemoryInfo; + getCPUUsage(): Electron.CPUUsage; + /** + * The number of milliseconds since epoch, or `null` if the information is + * unavailable + * + * Indicates the creation time of the application. The time is represented as + * number of milliseconds since epoch. It returns null if it is unable to get the + * process creation time. + */ + getCreationTime(): (number) | (null); + /** + * * `totalHeapSize` Integer + * * `totalHeapSizeExecutable` Integer + * * `totalPhysicalSize` Integer + * * `totalAvailableSize` Integer + * * `usedHeapSize` Integer + * * `heapSizeLimit` Integer + * * `mallocedMemory` Integer + * * `peakMallocedMemory` Integer + * * `doesZapGarbage` Boolean + * + * Returns an object with V8 heap statistics. Note that all statistics are reported + * in Kilobytes. + */ + getHeapStatistics(): Electron.HeapStatistics; + getIOCounters(): Electron.IOCounters; + /** + * Resolves with a ProcessMemoryInfo + * + * Returns an object giving memory usage statistics about the current process. Note + * that all statistics are reported in Kilobytes. This api should be called after + * app ready. + * + * Chromium does not provide `residentSet` value for macOS. This is because macOS + * performs in-memory compression of pages that haven't been recently used. As a + * result the resident set size value is not what one would expect. `private` + * memory is more representative of the actual pre-compression memory usage of the + * process on macOS. + */ + getProcessMemoryInfo(): Promise<Electron.ProcessMemoryInfo>; + /** + * * `total` Integer - The total amount of physical memory in Kilobytes available + * to the system. + * * `free` Integer - The total amount of memory not being used by applications or + * disk cache. + * * `swapTotal` Integer _Windows_ _Linux_ - The total amount of swap memory in + * Kilobytes available to the system. + * * `swapFree` Integer _Windows_ _Linux_ - The free amount of swap memory in + * Kilobytes available to the system. + * + * Returns an object giving memory usage statistics about the entire system. Note + * that all statistics are reported in Kilobytes. + */ + getSystemMemoryInfo(): Electron.SystemMemoryInfo; + /** + * The version of the host operating system. + * + * Example: + * + * **Note:** It returns the actual operating system version instead of kernel + * version on macOS unlike `os.release()`. + */ + getSystemVersion(): string; + /** + * Causes the main thread of the current process hang. + */ + hang(): void; + /** + * Sets the file descriptor soft limit to `maxDescriptors` or the OS hard limit, + * whichever is lower for the current process. + * + * @platform darwin,linux + */ + setFdLimit(maxDescriptors: number): void; + /** + * Indicates whether the snapshot has been created successfully. + * +Takes a V8 heap snapshot and saves it to `filePath`. + */ + takeHeapSnapshot(filePath: string): boolean; + /** + * A `String` representing Chrome's version string. + * + */ + readonly chrome: string; + /** + * A `String` (optional) representing a globally unique ID of the current + * JavaScript context. Each frame has its own JavaScript context. When + * contextIsolation is enabled, the isolated world also has a separate JavaScript + * context. This property is only available in the renderer process. + * + */ + readonly contextId?: string; + /** + * A `Boolean` that indicates whether the current renderer context has + * `contextIsolation` enabled. It is `undefined` in the main process. + * + */ + readonly contextIsolated: boolean; + /** + * A `Boolean`. When app is started by being passed as parameter to the default + * app, this property is `true` in the main process, otherwise it is `undefined`. + * + */ + readonly defaultApp: boolean; + /** + * A `String` representing Electron's version string. + * + */ + readonly electron: string; + /** + * A `Boolean`, `true` when the current renderer context is the "main" renderer + * frame. If you want the ID of the current frame you should use + * `webFrame.routingId`. + * + */ + readonly isMainFrame: boolean; + /** + * A `Boolean`. For Mac App Store build, this property is `true`, for other builds + * it is `undefined`. + * + */ + readonly mas: boolean; + /** + * A `Boolean` that controls ASAR support inside your application. Setting this to + * `true` will disable the support for `asar` archives in Node's built-in modules. + */ + noAsar: boolean; + /** + * A `Boolean` that controls whether or not deprecation warnings are printed to + * `stderr`. Setting this to `true` will silence deprecation warnings. This + * property is used instead of the `--no-deprecation` command line flag. + */ + noDeprecation: boolean; + /** + * A `String` representing the path to the resources directory. + * + */ + readonly resourcesPath: string; + /** + * A `Boolean`. When the renderer process is sandboxed, this property is `true`, + * otherwise it is `undefined`. + * + */ + readonly sandboxed: boolean; + /** + * A `Boolean` that controls whether or not deprecation warnings will be thrown as + * exceptions. Setting this to `true` will throw errors for deprecations. This + * property is used instead of the `--throw-deprecation` command line flag. + */ + throwDeprecation: boolean; + /** + * A `Boolean` that controls whether or not deprecations printed to `stderr` + * include their stack trace. Setting this to `true` will print stack traces for + * deprecations. This property is instead of the `--trace-deprecation` command line + * flag. + */ + traceDeprecation: boolean; + /** + * A `Boolean` that controls whether or not process warnings printed to `stderr` + * include their stack trace. Setting this to `true` will print stack traces for + * process warnings (including deprecations). This property is instead of the + * `--trace-warnings` command line flag. + */ + traceProcessWarnings: boolean; + /** + * A `String` representing the current process's type, can be: + * + * * `browser` - The main process + * * `renderer` - A renderer process +* `worker` - In a web worker + * + */ + readonly type: ('browser' | 'renderer' | 'worker'); + /** + * A `Boolean`. If the app is running as a Windows Store app (appx), this property + * is `true`, for otherwise it is `undefined`. + * + */ + readonly windowsStore: boolean; + } + interface ProcessVersions { + readonly electron: string; + readonly chrome: string; + } +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/extension.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/extension.d.ts new file mode 100644 index 00000000..a161558c --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/extension.d.ts @@ -0,0 +1,57 @@ +declare namespace Editor { + + namespace Interface { + // ---- Package ---- start + interface PackageInfo { + debug: boolean; + enable: boolean; + info: PackageJson; + invalid: boolean; + name: string; + path: string; + version: string; + } + + interface PackageJson { + name: string; + version: string; + + title?: string; + author?: string; + debug?: boolean; + description?: string; + main?: string; + editor?: string; + panel?: any; + contributions?: { [key: string]: any }; + } + // ---- Package ---- end + + // ---- UI ---- start + interface PanelInfo { + template?: string; + style?: string; + listeners?: { [key: string]: () => {} }; + methods?: { [key: string]: Function }; + $?: { [key: string]: string }; + ready?(): void; + update?(...args: any[]): void; + beforeClose?(): void; + close?(): void; + } + + namespace UIKit { + interface UIPanelInfo extends PanelInfo { + // 向上触发事件 + dispath(eventName: string, ...arg: any): void; + } + + interface EditorElementBase extends HTMLElement { + value: any; + dispath: (name: string, event: any) => void; + } + + } + // ---- UI ---- end + } +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/index.d.ts new file mode 100644 index 00000000..ef7f4d45 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/index.d.ts @@ -0,0 +1,2 @@ +/// <reference path="./editor.d.ts"/> +/// <reference path="./message.d.ts"/> diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/message.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/message.d.ts new file mode 100644 index 00000000..749bb6ea --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/message.d.ts @@ -0,0 +1,27 @@ +import * as AssetDB from './packages/asset-db/@types/message'; +import * as Scene from './packages/scene/@types/message'; +import * as Engine from './packages/engine/@types/message'; +import * as Builder from './packages/builder/@types/public/message'; +import * as Programming from './packages/programming/@types/message'; +// import * as Extension from './packages/extension/@types/message'; + +declare global { + interface EditorMessageContent { + params: any[], + result: any; + } + + interface EditorMessageMap { + [x: string]: EditorMessageContent; + } + + interface EditorMessageMaps { + [x: string]: EditorMessageMap; + 'asset-db': AssetDB.message; + 'scene': Scene.message; + 'engine': Engine.message; + 'builder': Builder.message; + 'programming': Programming.message, + // 'extension': Extension.message; + } +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/alipay-mini-game/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/alipay-mini-game/@types/index.d.ts new file mode 100644 index 00000000..eeff2f92 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/alipay-mini-game/@types/index.d.ts @@ -0,0 +1,19 @@ + +import { IInternalBuildOptions, IPolyFills, ISettings } from '@editor/library-type/packages/builder/@types/protect'; +export * from '@editor/library-type/packages/builder/@types/protect'; + +export type IOrientation = 'landscape' | 'portrait'; + +export interface IUserSettings extends ISettings { + orientation: IOrientation; +} + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'alipay-mini-game': { + deviceOrientation: IOrientation; + remoteUrl: string; + polyfills?: IPolyFills; + } + } +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/android/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/android/@types/index.d.ts new file mode 100644 index 00000000..17d557a0 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/android/@types/index.d.ts @@ -0,0 +1,73 @@ + + +import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; + +export * from '@editor/library-type/packages/builder/@types/protect'; +export type IOrientation = 'landscape' | 'portrait'; + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'android': IOptions; + native: { + JobSystem: 'none' | 'tbb' | 'taskFlow'; + } + } +} + +export type IAppABI = 'armeabi-v7a' | 'arm64-v8a' | 'x86' | 'x86_64'; + +export interface IOptions { + packageName: string; + orientation: { + landscapeRight: boolean; + landscapeLeft: boolean; + portrait: boolean; + upsideDown: boolean; + }, + + apiLevel: string; + appABIs: IAppABI[]; + + useDebugKeystore: boolean; + keystorePath: string; + keystorePassword: string; + keystoreAlias: string; + keystoreAliasPassword: string; + + appBundle: boolean; + androidInstant: boolean; + remoteUrl: string; + sdkPath: string; + ndkPath: string; + + swappy: boolean; + + renderBackEnd: { + vulkan: boolean; + gles3: boolean; + gles2: boolean; + } +} + +export interface IBuildResult extends InternalBuildResult { + userFrameWorks: boolean; // 是否使用用户的配置数据 +} + +export interface ICertificateSetting { + country: string; + state: string; + locality: string; + organizationalUnit: string; + organization: string; + email: string; + certificatePath: string; + + password: string; // 密钥密码 + confirmPassword: string; // 确认密钥密码 + + alias: string; // 密钥别名 + aliasPassword: string; + confirmAliasPassword: string; + + validity: number; // 有效期 +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/asset-db/@types/message.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/asset-db/@types/message.d.ts new file mode 100644 index 00000000..2cffe3fc --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/asset-db/@types/message.d.ts @@ -0,0 +1,179 @@ +import { AssetInfo, QueryAssetsOption, AssetOperationOption, AssetDBOptions, IAssetMeta } from './public'; + +export interface message extends EditorMessageMap { + 'query-ready': { + params: [], + result: boolean, + }, + 'create-asset': { + params: [ + string, + string | Buffer | null, + ] | [ + string, + string | Buffer | null, + AssetOperationOption, + ], + result: AssetInfo | null, + }, + 'import-asset': { + params: [ + string, + string, + ] | [ + string, + string, + AssetOperationOption, + ], + result: AssetInfo | null, + }, + 'copy-asset': { + params: [ + string, + string, + ] | [ + string, + string, + AssetOperationOption, + ], + result: AssetInfo | null, + }, + 'move-asset': { + params: [ + string, + string, + ] | [ + string, + string, + AssetOperationOption, + ], + result: AssetInfo | null, + }, + 'delete-asset': { + params: [ + string, + ], + result: AssetInfo | null, + }, + 'open-asset': { + params: [ + string, + ], + result: void, + }, + 'save-asset': { + params: [ + string, + string | Buffer, + ], + result: AssetInfo | null, + }, + 'save-asset-meta': { + params: [ + string, + string, + ], + result: AssetInfo | null, + }, + 'reimport-asset': { + params: [ + string, + ], + result: boolean, + }, + 'refresh-asset': { + params: [ + string + ], + result: boolean, + }, + 'query-asset-info': { + params: [ + string, // uuid | url | path + ], + result: AssetInfo | null, + }, + 'query-asset-meta': { + params: [ + string, + ], + result: IAssetMeta | null, + }, + 'query-path': { + params: [ + string, + ], + result: string | null, + }, + 'query-url': { + params: [ + string + ], + result: string | null, + }, + 'query-uuid': { + params: [ + string + ], + result: string | null, + }, + 'query-assets': { + params: [] | [ + QueryAssetsOption, + ], + result: AssetInfo[], + }, + 'generate-available-url': { + params: [ + string, + ], + result: string, + }, + + // private + + 'query-asset-mtime': { + params: [ + string + ], + result: string | null, + }, + 'refresh': { + params: [], + result: void, + }, + 'open-devtools': { + params: [], + result: void, + }, + 'query-db-info': { + params: [ + string, + ], + result: AssetDBOptions, + }, + 'create-asset-dialog': { + params: [ + string, + ] | [ + string, + string, + ], + result: string | null, + }, + 'init-asset': { + params: [ + string, + string, + ], + result: AssetInfo | null, + }, + 'query-all-importer': { + params: [], + result: string[], + }, + 'query-all-asset-types': { + params: [], + result: string[], + }, +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/asset-db/@types/public.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/asset-db/@types/public.d.ts new file mode 100644 index 00000000..93677b82 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/asset-db/@types/public.d.ts @@ -0,0 +1,115 @@ +// Basic information about the resource +// 资源的基础信息 +export interface AssetInfo { + // Asset name + // 资源名字 + name: string; + // Asset display name + // 资源用于显示的名字 + displayName: string; + // URL + source: string; + // loader 加载的层级地址 + path: string; + // loader 加载地址会去掉扩展名,这个参数不去掉 + url: string; + // 绝对路径 + file: string; + // 资源的唯一 ID + uuid: string; + // 使用的导入器名字 + importer: string; + // 类型 + type: string; + // 是否是文件夹 + isDirectory: boolean; + // 导入资源的 map + library: { [key: string]: string }; + // 子资源 map + subAssets: { [key: string]: AssetInfo }; + // 是否显示 + visible: boolean; + // 是否只读 + readonly: boolean; + + // 虚拟资源可以实例化成实体的话,会带上这个扩展名 + instantiation?: string; + // 跳转指向资源 + redirect?: IRedirectInfo; + // 继承类型 + extends?: string[]; + // 是否导入完成 + imported: boolean; + // 是否导入失败 + invalid: boolean; +} + +export interface IRedirectInfo { + // 跳转资源的类型 + type: string; + // 跳转资源的 uuid + uuid: string; +} + +export interface QueryAssetsOption { + type?: string; + pattern?: string; + ccType?: string; + extname?: string; + importer?: string; + isBundle?: boolean; +} + +export interface AssetOperationOption { + // 是否强制覆盖已经存在的文件,默认 false + overwrite?: boolean; + // 是否自动重命名冲突文件,默认 false + rename?: boolean; +} + +export interface AssetDBOptions { + name: string; + target: string; + library: string; + temp: string; + /** + * 0: 忽略错误 + * 1: 仅仅打印错误 + * 2: 打印错误、警告 + * 3: 打印错误、警告、日志 + * 4: 打印错误、警告、日志、调试信息 + */ + level: number; + ignoreFiles: string[]; + readonly: boolean; +} + +export interface ContributionInfo { + mount?: { + path: string; + readonly?: boolean; + }; +} + +export interface ExecuteAssetDBScriptMethodOptions { + name: string; + method: string; + args: any[]; +} + +export interface IAssetMeta { + ver: string; + importer: string; + imported: boolean; + uuid: string; + files: string[]; + subMetas: { + [index: string]: IAssetMeta; + }; + userData: { + [index: string]: any; + }; + displayName: string; + id: string; + name: string; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/assets/@types/public.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/assets/@types/public.d.ts new file mode 100644 index 00000000..c3cd301b --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/assets/@types/public.d.ts @@ -0,0 +1,25 @@ +/** + * 外部插件注册搜索方式指定返回的接口 + * + * @export + * @interface SearchMenuItem + */ +export interface SearchMenuItem { + label: string; + key: string; + // handler 方法是外部扩展的搜索方法,返回 true 表示匹配搜索成功 + // searchValue 表示 assets 面板输入的搜索内容,asset 表示匹配搜索时的节点信息 + handler: (searchVale: string, asset: any) => Boolean; +} + +/** + * 外部插件注册扩展的入口 + * 可以是搜索方式或限定搜索类型 + * + * @export + * @interface SearchExtension + */ +export interface SearchExtension { + typeMenu?: Function; // 限定的搜索类型 + searchMenu: Function; // 搜索方式 +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/baidu-mini-game/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/baidu-mini-game/@types/index.d.ts new file mode 100644 index 00000000..0dbfb5d7 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/baidu-mini-game/@types/index.d.ts @@ -0,0 +1,18 @@ + +export * from '@editor/library-type/packages/builder/@types/protect'; +import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect'; + +export type IOrientation = 'auto' | 'landscape' | 'portrait'; + +export interface IOptions { + appid: string; + remoteServerAddress: string; + buildOpenDataContextTemplate: boolean; + orientation: IOrientation; +} + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'baidu-mini-game': IOptions; + }; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/index.d.ts new file mode 100644 index 00000000..a95d9a28 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/index.d.ts @@ -0,0 +1,2 @@ + +export * from './public'; diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/build-plugin.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/build-plugin.d.ts new file mode 100644 index 00000000..4e13f240 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/build-plugin.d.ts @@ -0,0 +1,88 @@ +import { ITextureCompressType, IPVRQuality, IASTCQuality, IETCQuality, ITextureFormatInfo } from './texture-compress'; +import { IBuildTaskOption } from './options'; +import { IBuildResult } from './build-result'; + +export interface IBuildPluginConfig { + hooks?: string; // relate url about IHook + options?: IDisplayOptions; // config of options + verifyRuleMap?: IVerificationRuleMap; +} + +export type IVerificationFunc = (val: any, ...arg: any[]) => boolean | Promise<boolean>; + +export type IVerificationRuleMap = Record< + string, + { + func?: IVerificationFunc; + message?: string; + } +>; + +export interface ITextureFormatConfig { + displayName: string; + options: IDisplayOptions; + formats: ITextureFormatInfo[]; // 未指定 formats 则当前格式 key 作为存储的格式 value + suffix: string; +} + +export type IDisplayOptions = Record<string, IConfigItem>; + +export type ArrayItem = { + label: string; + value: string; +}; +export interface IConfigItem { + // 配置显示的名字,如果需要翻译,则传入 i18n:${key} + label?: string; + // 设置的简单说明 + description?: string; + // 默认值 + default?: any; + // 配置的类型 + type?: 'array' | 'object'; + itemConfigs?: IConfigItem[] | Record<string, IConfigItem>; + verifyRules?: string[]; + attributes?: any; + render?: { + ui: string; + attributes?: any; + items?: ArrayItem[]; + }; +} + +export interface IBuildPlugin { + configs?: BuildPlugin.Configs; + assetHandlers?: BuildPlugin.AssetHandlers; + load?: BuildPlugin.load; + unload?: BuildPlugin.Unload; +} +export type IBaseHooks = (options: IBuildTaskOption, result: IBuildResult) => Promise<void> | void; +export type IBuildStageHooks = (root: string, options: IBuildTaskOption) => Promise<void> | void; + +export namespace BuildPlugin { + export type Configs = Record<string, IBuildPluginConfig>; + export type AssetHandlers = string; + export type load = () => Promise<void> | void; + export type Unload = () => Promise<void> | void; +} + +export namespace BuildHook { + export type throwError = boolean; // 插件注入的钩子函数,在执行失败时是否直接退出构建流程 + export type title = string; // 插件任务整体 title,支持 i18n 写法 + export type onBeforeBuild = IBaseHooks; + export type onBeforeCompressSettings = IBaseHooks; + export type onAfterCompressSettings = IBaseHooks; + export type onAfterBuild = IBaseHooks; + + export type onAfterMake = IBuildStageHooks; + export type onBeforeMake = IBuildStageHooks; + + export type load = () => Promise<void> | void; + export type unload = () => Promise<void> | void; +} + +export namespace AssetHandlers { + export type compressTextures = ( + tasks: { src: string; dest: string; quality: number | IPVRQuality | IASTCQuality | IETCQuality; format: ITextureCompressType }[], + ) => Promise<void>; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/build-result.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/build-result.d.ts new file mode 100644 index 00000000..cb3a1aa1 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/build-result.d.ts @@ -0,0 +1,190 @@ +/** + * settings.js 里定义的数据 + */ + +import { ISplashSetting, ICustomJointTextureLayout, UUID } from "./options"; + +// ****************************** settings ************************************************ + +// debug: true +// designResolution: {width: "960", height: "640", policy: 4} +// jsList: ["assets/resources/b.js", "assets/resources/a.js"] +// launchScene: "db://assets/New Scene-001.scene" +// platform: "web-desktop" +// rawAssets: { +// assets: { +// "0e95a9f8-d4e7-4849-875a-7a11dd692b34": ["mesh/env/gltf/textures/birch_yellow_mat_baseColor.png", "cc.ImageAsset"] +// } +// internal: { +// "1baf0fc9-befa-459c-8bdd-af1a450a0319": ["effects/builtin-standard.effect", "cc.EffectAsset"] +// } +// } +// scenes: [{url: "db://assets/New Scene-001.scene", uuid: "69dc4a42-cc6c-49fb-9a57-7de0c212f83d"},…] +// startScene: "current_scene" +export interface ISettings { + CocosEngine: string; + debug: boolean; + designResolution: ISettingsDesignResolution; + jsList: string[]; + launchScene: string; + preloadAssets: string[], + moduleIds: string[]; + platform: string; + renderPipeline: string; + physics?: IPhysicsConfig; + exactFitScreen: boolean; + + bundleVers: Record<string, string>; + subpackages: string[]; + remoteBundles: string[]; + server: string; + hasResourcesBundle: boolean; + hasStartSceneBundle: boolean; + + scriptPackages?: string[]; + splashScreen?: ISplashSetting; + + customJointTextureLayouts?: ICustomJointTextureLayout[]; + + importMaps?: Array<{ + url: string; + map: any; + }>; + + macros?: Record<string, any>; + collisionMatrix?: any; + groupList?: any; + // preview + engineModules: string[]; + customLayers: {name: string, bit: number}[]; +} + +// 物理配置 +export interface IVec3Like { + x: number; + y: number; + z: number; +} + +export interface ICollisionMatrix { + [x: string]: number; +} + +export interface IPhysicsMaterial { + friction: number; // 0.5 + rollingFriction: number; // 0.1 + spinningFriction: number; // 0.1 + restitution: number; // 0.1 +} + +export interface IPhysicsConfig { + gravity: IVec3Like; // (0,-10, 0) + allowSleep: boolean; // true + sleepThreshold: number; // 0.1,最小 0 + autoSimulation: boolean; // true + fixedTimeStep: number; // 1 / 60 ,最小 0 + maxSubSteps: number; // 1,最小 0 + defaultMaterial: IPhysicsMaterial; + useNodeChains: boolean; // true + collisionMatrix: ICollisionMatrix; + physicsEngine: string; +} + +export interface IPackageInfo { + name: string; + path: string; + uuids: UUID[]; +} + +export interface ISettingsDesignResolution { + width: number; + height: number; + policy: number; +} + +interface IAssetPathBase { + bundleName?: string; + redirect?: string; // 重定向的 bundle 包名 +} + +export interface IRawAssetPathInfo extends IAssetPathBase { + raw: string[]; +} +export declare interface IAssetPathInfo extends IAssetPathBase { + raw?: string[]; + json?: string; + groupIndex?: number; +} + +export interface IJsonPathInfo extends IAssetPathBase { + json?: string; + groupIndex?: number; +} + +export interface IBuildPaths { + dir: string; // 构建资源输出地址( assets 所在的目录,并不一定与构建目录对应) + settings: string; // settings.json 输出地址 + systemJs?: string; // system.js 生成地址 + engineDir?: string; // 引擎生成地址 + polyfillsJs?: string; // polyfill.js 生成地址 + assets: string; // assets 目录 + subpackages: string; // subpackages 目录 + remote: string; // remote 目录 + bundleScripts: string // bundle 的脚本,某些平台无法下载脚本,则将远程包中的脚本移到本地 + applicationJS: string; // application.js 的生成地址 + compileConfig?: string; // cocos.compile.config.json + importMap: string; // import-map 文件地址 +} + +export declare class IBuildResult { + dest: string; // options 指定的构建目录 + + paths: IBuildPaths; // 构建后资源相关地址集合 + + settings?: ISettings; + + /** + * 指定的 uuid 资源是否包含在构建资源中 + */ + containsAsset: (uuid: string) => boolean; + + /** + * 获取指定 uuid 原始资源的存放路径(不包括序列化 json) + * 自动图集的小图 uuid 和自动图集的 uuid 都将会查询到合图大图的生成路径 + * 实际返回多个路径的情况:查询 uuid 为自动图集资源,且对应图集生成多张大图,纹理压缩会有多个图片格式路径 + */ + getRawAssetPaths: (uuid: string) => IRawAssetPathInfo[]; + + /** + * 获取指定 uuid 资源的序列化 json 路径 + */ + getJsonPathInfo: (uuid: string) => IJsonPathInfo[]; + + /** + * 获取指定 uuid 资源的路径相关信息 + * @return {raw?: string[]; json?: string; groupIndex?: number;} + * @return.raw: 该资源源文件的实际存储位置 + * @return.json: 该资源序列化 json 的实际存储位置,不存在为空 + * @return.groupIndex: 若该资源的序列化 json 在某个 json 分组内,这里标识在分组内的 index,不存在为空 + */ + getAssetPathInfo: (uuid: string) => IAssetPathInfo[]; +} + +export interface IBundleConfig { + importBase: string; // bundle 中 import 目录的名称,通常是 'import' + nativeBase: string; // native 中 native 目录的名称,通常是 'native' + name: string; // bundle 的名称,可以通过 bundle 名称加载 bundle + deps: string[]; // 该 bundle 依赖的其他 bundle 名称 + uuids: UUID[]; // 该 bundle 中的所有资源的 uuid + paths: Record<string, any[]>; // 该 bundle 中可以通过路径加载的资源,参考以前 settings 中 rawAssets 的定义 + scenes: Record<string, UUID|number>; // 该 bundle 中所有场景,场景名为 key, uuid 为 value + packs: Record<UUID, UUID[]>; // 该 bundle 中所有合并的 json, 参考以前 settings 中 packedAssets 的定义 + versions: { import: Array<string|number>, native: Array<string|number> }; // 该 bundle 中所有资源的版本号,参考以前 settings 中 md5AssetsMap 的定义 + redirect: Array<string|number>; // 该 bundle 中重定向到其他 bundle 的资源 + debug: boolean; // 是否是 debug 模式,debug 模式会对 config.json 的数据进行压缩,所以运行时得解压 + types?: string[]; // paths 中的类型数组,参考以前 settings 中 assetTypes 的定义 + encrypted?: boolean; // 原生上使用,标记该 bundle 中的脚本是否加密 + isZip?: boolean; // 是否是 zip 模式 + zipVersion?: string; + extensionMap: Record<string, UUID[]> +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/global.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/global.d.ts new file mode 100644 index 00000000..f5a0a0fa --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/global.d.ts @@ -0,0 +1,7 @@ +import { IBuild } from "."; + +// 定义 builder 进程内的全局变量 +declare global { + // @ts-ignore + const Build: IBuild; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/index.d.ts new file mode 100644 index 00000000..0127871d --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/index.d.ts @@ -0,0 +1,100 @@ +import { ITransformOptions } from './options'; + +export * from './build-result'; +export * from './build-plugin'; +export * from './texture-compress'; +export * from './options'; + +interface IAppendRes { + hash: string; + paths: string[]; +} + +interface ICreateBundleOptions { + excludes?: string[]; + debug?: boolean; + sourceMap?: boolean; +} +export interface IBuildUtils { + /** + * 压缩 uuid + * 'fc991dd7-0033-4b80-9d41-c8a86a702e59' -> 'fc9913XADNLgJ1ByKhqcC5Z' + */ + compressUuid: (uuid: string, min: boolean) => string; + + /** + * 解压缩 uuid + * 'fc9913XADNLgJ1ByKhqcC5Z' -> 'fc991dd7-0033-4b80-9d41-c8a86a702e59' + */ + decompressUuid: (uuid: string) => string; + + /** + * 翻译带有 i18n 开头的名称(i18n:test)(待定) + * 'i18n:test' -> '测试' + */ + transI18nName: (name: string) => string; + + /** + * 移除 db 前缀 + * 'db://assets/test.jpg' -> 'assets/test.jpg' + */ + removeDbHeader: (url: string) => string; + + /** + * 将 db 开头的 url 转为项目里的实际 url + * 'db://assets/test.jpg' -> 'c:/project/assets/test.jpg' + */ + dbUrlToRawPath: (url: string) => string; + + /** + * 从路径里获取存在的 uuid + * 'E:\test3d\library\oc\0c0c1f5742-89b0-4a1e-b5eb-914d84f48c1c.json' -> '0c0c1f5742-89b0-4a1e-b5eb-914d84f48c1c' + */ + getUuidFromPath: (path: string) => string; + + /** + * 检查是否全局安装了 nodejs + */ + isInstallNodeJs: () => Promise<boolean>; + + /** + * 逐文件拷贝 + */ + copyDirSync: (src: string, dest: string) => void; + + /** + * 获取相对路径接口 + * 返回 / 拼接的相对路径 + */ + relativeUrl: (from: string, to: string) => string; + + transformCode: (code: string, options: ITransformOptions) => Promise<string>; + + /** + * 给指定路径添加 md5 + */ + appendMd5ToPaths: (paths: string[]) => Promise<IAppendRes | null>; + + calcMd5: (data: Buffer | string) => string; + + copyPaths: (paths: { src: string; dest: string }[]) => Promise<void[]>; + + createBundle: (src: string, dest: string, options?: ICreateBundleOptions) => Promise<unknown>; +} +export interface IBuild { + Utils: IBuildUtils; + + LIBRARY_NAME: string; + IMPORT_HEADER: string; + NATIVE_HEADER: string; + ASSETS_HEADER: string; + SUBPACKAGES_HEADER: string; + REMOTE_HEADER: string; + BUNDLE_SCRIPTS_HEADER: string; + SCRIPT_NAME: string; + CONFIG_NAME: string; + BUNDLE_ZIP_NAME: string; + projectTempDir: string; + globalTempDir: string; + buildTemplateDir: string; // 构建模板地址 build-templates +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/message.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/message.d.ts new file mode 100644 index 00000000..a25c94fb --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/message.d.ts @@ -0,0 +1,40 @@ +import { IBundleConfig, ISettings } from "./build-result"; +import { ITaskItemJSON } from "./options"; +export interface message extends EditorMessageMap { + 'open-devtools': { + params: [], + result: void, + }, + open: { + params: [], + result: void, + }, + 'generate-preview-setting': { + params: any[], + result: Promise<{ + settings: ISettings; + script2library: Record<string, string>; + bundleConfigs: IBundleConfig[]; + }>, + }, + 'query-tasks-info': { + params: [], + result: { + queue: Record<string, ITaskItemJSON>, + free: Promise<boolean>, + }, + }, + 'query-task': { + params: string[], + result: Promise<ITaskItemJSON>, + }, + /** + * 预览合图 + * @param {object} pacUuid + */ + 'preview-pac': { + params: string[], + result: Promise<ITaskItemJSON>, + }, + +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/options.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/options.d.ts new file mode 100644 index 00000000..18c9aa53 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/options.d.ts @@ -0,0 +1,134 @@ +/** + * 构建所需的完整参数 + */ +export interface IBuildTaskOption { + // 构建后的游戏文件夹生成的路径 + buildPath: string; + debug: boolean; + inlineSpriteFrames: boolean; + md5Cache: boolean; + // bundle 设置 + mainBundleCompressionType: BundleCompressionType; + mainBundleIsRemote: boolean; + moveRemoteBundleScript: boolean; + mergeJson: boolean; + name: string; + // packAutoAtlas: boolean; + platform: Platform; + scenes: IBuildSceneItem[]; + skipCompressTexture: boolean; + sourceMaps: boolean; + startScene: string; + outputName: string; + experimentalEraseModules: boolean; + + /** + * 是否是预览进程发送的构建请求。 + * @default false + */ + preview?: boolean; + + // 项目设置 + includeModules?: string[]; + renderPipeline?: string; + designResolution?: IBuildDesignResolution; + physicsConfig?: any; + flags?: Record<string, boolean>; + + + // 是否使用自定义插屏选项 + replaceSplashScreen?: boolean; + splashScreen: ISplashSetting; + + packages?: Record<string, any>; + id?: string; // 手动配置构建任务 id + // recompileConfig?: IRecompileConfig; + + customLayers: {name: string, value: number}[]; +} + +export type UUID = string; + +export interface ISplashSetting { + base64src: string; + displayRatio: number; + totalTime: number; + effect: string; + clearColor: { x: number; y: number; z: number; w: number }; + displayWatermark: boolean; +} + +export interface ICustomJointTextureLayout { + textureLength: number; + contents: IChunkContent[]; +} + +export interface IChunkContent { + skeleton: null | string; + clips: string[]; +} + +/** + * 构建使用的设计分辨率数据 + */ +export interface IBuildDesignResolution { + height: number; + width: number; + fitWidth?: boolean; + fitHeight?: boolean; +} + +/** + * 构建使用的场景的数据 + */ +export interface IBuildSceneItem { + url: string; + uuid: string; +} + +// **************************** options ******************************************* +export type Platform = + | 'web-desktop' + | 'web-mobile' + | 'wechatgame' + | 'oppo-mini-game' + | 'vivo-mini-game' + | 'huawei-quick-game' + | 'alipay-mini-game' + | 'mac' + | 'ios' + | 'linux' + // | 'ios-app-clip' + | 'android' + | 'ohos' + | 'open-harmonyos' + | 'windows' + | 'xiaomi-quick-game' + | 'baidu-mini-game' + | 'bytedance-mini-game' + | 'cocos-play' + | 'huawei-agc' + | 'link-sure' + | 'qtt' + | 'cocos-runtime' + ; + +export type BundleCompressionType = 'none' | 'merge_dep' | 'merge_all_json' | 'subpackage' | 'zip'; +export type IModules = 'esm' | 'commonjs' | 'systemjs'; + +export interface ITransformOptions { + importMapFormat: IModules; +} + +export type ITaskState = 'waiting' | 'success' | 'failure' | 'cancel' | 'processing'; + +export interface ITaskItemJSON { + id: string; + progress: number; + state: ITaskState; + message: string; + options: IBuildTaskOption; + time: string; + dirty: boolean; + rawOptions: IBuildTaskOption; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/texture-compress.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/texture-compress.d.ts new file mode 100644 index 00000000..b7661803 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/builder/@types/public/texture-compress.d.ts @@ -0,0 +1,70 @@ +export type ITextureCompressType = + | 'jpg' + | 'png' + | 'webp' + | 'pvrtc_4bits_rgb' + | 'pvrtc_4bits_rgba' + | 'pvrtc_4bits_rgb_a' + | 'pvrtc_2bits_rgb' + | 'pvrtc_2bits_rgba' + | 'pvrtc_2bits_rgb_a' + | 'etc1_rgb' + | 'etc1_rgb_a' + | 'etc2_rgb' + | 'etc2_rgba' + | 'astc_4x4' + | 'astc_5x5' + | 'astc_6x6' + | 'astc_8x8' + | 'astc_10x5' + | 'astc_10x10' + | 'astc_12x12' + | string; +export type ITextureCompressPlatform = 'miniGame' | 'web' | 'ios' | 'android'; + +export interface IHandlerInfo { + type: 'program' | 'npm' | 'function'; + info: ICommandInfo | Function; + func?: Function; +} + +export interface ICustomConfig { + id: string; + name: string; + path: string; + command: string; + format: string; + overwrite?: boolean; +} + +export interface ICommandInfo { + command: string; + params?: string[]; + path: string; +} + +export interface ITextureFormatInfo { + displayName: string; + value: ITextureCompressType | string; + formatSuffix?: string; + alpha?: boolean; + formatType?: string; + handler?: IHandlerInfo; + custom?: boolean; + params?: string[]; +} +export interface ISupportFormat { + rgb: ITextureCompressType[]; + rgba: ITextureCompressType[]; +} +export interface IConfigGroupsInfo { + defaultSupport?: ISupportFormat, + support: ISupportFormat, + displayName: string; + icon: string; +} +export type IConfigGroups = Record<ITextureCompressPlatform, IConfigGroupsInfo>; + +export type IPVRQuality = 'fastest' | 'fast' | 'normal' | 'high' | 'best'; +export type IETCQuality = 'slow' | 'fast'; +export type IASTCQuality = 'veryfast' | 'fast' | 'medium' | 'thorough' | 'exhaustive'; diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/bytedance-mini-game/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/bytedance-mini-game/@types/index.d.ts new file mode 100644 index 00000000..68f93489 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/bytedance-mini-game/@types/index.d.ts @@ -0,0 +1,25 @@ + +export * from '@editor/library-type/packages/builder/@types/protect'; +import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect'; + +export type IOrientation = 'auto' | 'landscape' | 'portrait'; + +export interface IOptions { + appid: string; + remoteServerAddress: string; + buildOpenDataContextTemplate: boolean; + orientation: IOrientation; + physX: { + use: 'physX' | 'project'; + notPackPhysXLibs: boolean; + mutiThread: boolean; + subThreadCount: number; + epsilon: number; + }; +} + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'bytedance-mini-game': IOptions; + }; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/cocos-play/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/cocos-play/@types/index.d.ts new file mode 100644 index 00000000..9c1dd550 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/cocos-play/@types/index.d.ts @@ -0,0 +1,30 @@ +/// <reference path="../../../@types/index.d.ts"/> +/// <reference path="@editor/library-type/packages/builder/@types/protect/global.d.ts"/> + +export * from "@editor/library-type/packages/builder/@types/protect"; +import { IInternalBuildOptions } from "@editor/library-type/packages/builder/@types/protect"; + +export type IOrientation = 'landscape' | 'portrait'; + +export interface PlatformSettings { + runtimeVersion: string, + deviceOrientation: IOrientation, + statusbarDisplay: boolean, + startSceneAssetBundle: false, + resourceURL: string, + workerPath: string, + XHRTimeout: number, + WSTimeout: number, + uploadFileTimeout: number, + downloadFileTimeout: number, + cameraPermissionHint: string, + userInfoPermissionHint: string, + locationPermissionHint: string, + albumPermissionHint: string +} + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + "cocos-play": PlatformSettings + } +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/console/@types/pritate.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/console/@types/pritate.d.ts new file mode 100644 index 00000000..bcc826ac --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/console/@types/pritate.d.ts @@ -0,0 +1,25 @@ + +export type logType = 'log' | 'warn' | 'error'; +export interface IMessageItem { + rows: number; // 内部有几行 包括 details & stacks + translateY: number; + show: boolean; + title: string; + content: string[]; // details + count: number; // 重复的个数 + fold: boolean; // 折叠 + type: logType; + message: any; + texture: string; // 纹理 light or dark + date?: number; // 格式化的时间 + time?: number; // 时间戳 + process?: string; + stack: string[]; +} + +export interface INewItem { + type: logType + [propName: string]: any +} + +export type ILogCounter = Record<logType, number>; diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/glTF.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/glTF.d.ts new file mode 100644 index 00000000..be01d8c5 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/glTF.d.ts @@ -0,0 +1,684 @@ +export type GlTfId = number; +/** + * Indices of those attributes that deviate from their initialization value. + */ +export interface AccessorSparseIndices { + /** + * The index of the bufferView with sparse indices. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target. + */ + "bufferView": GlTfId; + /** + * The offset relative to the start of the bufferView in bytes. Must be aligned. + */ + "byteOffset"?: number; + /** + * The indices data type. + */ + "componentType": 5121 | 5123 | 5125 | number; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * Array of size `accessor.sparse.count` times number of components storing the displaced accessor attributes pointed by `accessor.sparse.indices`. + */ +export interface AccessorSparseValues { + /** + * The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target. + */ + "bufferView": GlTfId; + /** + * The offset relative to the start of the bufferView in bytes. Must be aligned. + */ + "byteOffset"?: number; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * Sparse storage of attributes that deviate from their initialization value. + */ +export interface AccessorSparse { + /** + * Number of entries stored in the sparse array. + */ + "count": number; + /** + * Index array of size `count` that points to those accessor attributes that deviate from their initialization value. Indices must strictly increase. + */ + "indices": AccessorSparseIndices; + /** + * Array of size `count` times number of components, storing the displaced accessor attributes pointed by `indices`. Substituted values must have the same `componentType` and number of components as the base accessor. + */ + "values": AccessorSparseValues; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * A typed view into a bufferView. A bufferView contains raw binary data. An accessor provides a typed view into a bufferView or a subset of a bufferView similar to how WebGL's `vertexAttribPointer()` defines an attribute in a buffer. + */ +export interface Accessor { + /** + * The index of the bufferView. + */ + "bufferView"?: GlTfId; + /** + * The offset relative to the start of the bufferView in bytes. + */ + "byteOffset"?: number; + /** + * The datatype of components in the attribute. + */ + "componentType": 5120 | 5121 | 5122 | 5123 | 5125 | 5126 | number; + /** + * Specifies whether integer data values should be normalized. + */ + "normalized"?: boolean; + /** + * The number of attributes referenced by this accessor. + */ + "count": number; + /** + * Specifies if the attribute is a scalar, vector, or matrix. + */ + "type": "SCALAR" | "VEC2" | "VEC3" | "VEC4" | "MAT2" | "MAT3" | "MAT4" | string; + /** + * Maximum value of each component in this attribute. + */ + "max"?: number[]; + /** + * Minimum value of each component in this attribute. + */ + "min"?: number[]; + /** + * Sparse storage of attributes that deviate from their initialization value. + */ + "sparse"?: AccessorSparse; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * The index of the node and TRS property that an animation channel targets. + */ +export interface AnimationChannelTarget { + /** + * The index of the node to target. + */ + "node"?: GlTfId; + /** + * The name of the node's TRS property to modify, or the "weights" of the Morph Targets it instantiates. For the "translation" property, the values that are provided by the sampler are the translation along the x, y, and z axes. For the "rotation" property, the values are a quaternion in the order (x, y, z, w), where w is the scalar. For the "scale" property, the values are the scaling factors along the x, y, and z axes. + */ + "path": "translation" | "rotation" | "scale" | "weights" | string; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * Targets an animation's sampler at a node's property. + */ +export interface AnimationChannel { + /** + * The index of a sampler in this animation used to compute the value for the target. + */ + "sampler": GlTfId; + /** + * The index of the node and TRS property to target. + */ + "target": AnimationChannelTarget; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target). + */ +export interface AnimationSampler { + /** + * The index of an accessor containing keyframe input values, e.g., time. + */ + "input": GlTfId; + /** + * Interpolation algorithm. + */ + "interpolation"?: "LINEAR" | "STEP" | "CUBICSPLINE" | string; + /** + * The index of an accessor, containing keyframe output values. + */ + "output": GlTfId; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * A keyframe animation. + */ +export interface Animation { + /** + * An array of channels, each of which targets an animation's sampler at a node's property. Different channels of the same animation can't have equal targets. + */ + "channels": AnimationChannel[]; + /** + * An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target). + */ + "samplers": AnimationSampler[]; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * Metadata about the glTF asset. + */ +export interface Asset { + /** + * A copyright message suitable for display to credit the content creator. + */ + "copyright"?: string; + /** + * Tool that generated this glTF model. Useful for debugging. + */ + "generator"?: string; + /** + * The glTF version that this asset targets. + */ + "version": string; + /** + * The minimum glTF version that this asset targets. + */ + "minVersion"?: string; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * A buffer points to binary geometry, animation, or skins. + */ +export interface Buffer { + /** + * The uri of the buffer. + */ + "uri"?: string; + /** + * The length of the buffer in bytes. + */ + "byteLength": number; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * A view into a buffer generally representing a subset of the buffer. + */ +export interface BufferView { + /** + * The index of the buffer. + */ + "buffer": GlTfId; + /** + * The offset into the buffer in bytes. + */ + "byteOffset"?: number; + /** + * The length of the bufferView in bytes. + */ + "byteLength": number; + /** + * The stride, in bytes. + */ + "byteStride"?: number; + /** + * The target that the GPU buffer should be bound to. + */ + "target"?: 34962 | 34963 | number; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * An orthographic camera containing properties to create an orthographic projection matrix. + */ +export interface CameraOrthographic { + /** + * The floating-point horizontal magnification of the view. Must not be zero. + */ + "xmag": number; + /** + * The floating-point vertical magnification of the view. Must not be zero. + */ + "ymag": number; + /** + * The floating-point distance to the far clipping plane. `zfar` must be greater than `znear`. + */ + "zfar": number; + /** + * The floating-point distance to the near clipping plane. + */ + "znear": number; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * A perspective camera containing properties to create a perspective projection matrix. + */ +export interface CameraPerspective { + /** + * The floating-point aspect ratio of the field of view. + */ + "aspectRatio"?: number; + /** + * The floating-point vertical field of view in radians. + */ + "yfov": number; + /** + * The floating-point distance to the far clipping plane. + */ + "zfar"?: number; + /** + * The floating-point distance to the near clipping plane. + */ + "znear": number; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene. + */ +export interface Camera { + /** + * An orthographic camera containing properties to create an orthographic projection matrix. + */ + "orthographic"?: CameraOrthographic; + /** + * A perspective camera containing properties to create a perspective projection matrix. + */ + "perspective"?: CameraPerspective; + /** + * Specifies if the camera uses a perspective or orthographic projection. + */ + "type": "perspective" | "orthographic" | string; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * Image data used to create a texture. Image can be referenced by URI or `bufferView` index. `mimeType` is required in the latter case. + */ +export interface Image { + /** + * The uri of the image. + */ + "uri"?: string; + /** + * The image's MIME type. Required if `bufferView` is defined. + */ + "mimeType"?: "image/jpeg" | "image/png" | string; + /** + * The index of the bufferView that contains the image. Use this instead of the image's uri property. + */ + "bufferView"?: GlTfId; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * Reference to a texture. + */ +export interface TextureInfo { + /** + * The index of the texture. + */ + "index": GlTfId; + /** + * The set index of texture's TEXCOORD attribute used for texture coordinate mapping. + */ + "texCoord"?: number; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. + */ +export interface MaterialPbrMetallicRoughness { + /** + * The material's base color factor. + */ + "baseColorFactor"?: number[]; + /** + * The base color texture. + */ + "baseColorTexture"?: TextureInfo; + /** + * The metalness of the material. + */ + "metallicFactor"?: number; + /** + * The roughness of the material. + */ + "roughnessFactor"?: number; + /** + * The metallic-roughness texture. + */ + "metallicRoughnessTexture"?: TextureInfo; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +export interface MaterialNormalTextureInfo { + "index"?: any; + "texCoord"?: any; + /** + * The scalar multiplier applied to each normal vector of the normal texture. + */ + "scale"?: number; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +export interface MaterialOcclusionTextureInfo { + "index"?: any; + "texCoord"?: any; + /** + * A scalar multiplier controlling the amount of occlusion applied. + */ + "strength"?: number; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * The material appearance of a primitive. + */ +export interface Material { + "name"?: any; + "extensions"?: any; + "extras"?: any; + /** + * A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. When not specified, all the default values of `pbrMetallicRoughness` apply. + */ + "pbrMetallicRoughness"?: MaterialPbrMetallicRoughness; + /** + * The normal map texture. + */ + "normalTexture"?: MaterialNormalTextureInfo; + /** + * The occlusion map texture. + */ + "occlusionTexture"?: MaterialOcclusionTextureInfo; + /** + * The emissive map texture. + */ + "emissiveTexture"?: TextureInfo; + /** + * The emissive color of the material. + */ + "emissiveFactor"?: number[]; + /** + * The alpha rendering mode of the material. + */ + "alphaMode"?: "OPAQUE" | "MASK" | "BLEND" | string; + /** + * The alpha cutoff value of the material. + */ + "alphaCutoff"?: number; + /** + * Specifies whether the material is double sided. + */ + "doubleSided"?: boolean; + [k: string]: any; +} +/** + * Geometry to be rendered with the given material. + */ +export interface MeshPrimitive { + /** + * A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data. + */ + "attributes": { + [k: string]: GlTfId; + }; + /** + * The index of the accessor that contains the indices. + */ + "indices"?: GlTfId; + /** + * The index of the material to apply to this primitive when rendering. + */ + "material"?: GlTfId; + /** + * The type of primitives to render. + */ + "mode"?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | number; + /** + * An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only `POSITION`, `NORMAL`, and `TANGENT` supported) to their deviations in the Morph Target. + */ + "targets"?: { + [k: string]: GlTfId; + }[]; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * A set of primitives to be rendered. A node can contain one mesh. A node's transform places the mesh in the scene. + */ +export interface Mesh { + /** + * An array of primitives, each defining geometry to be rendered with a material. + */ + "primitives": MeshPrimitive[]; + /** + * Array of weights to be applied to the Morph Targets. + */ + "weights"?: number[]; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * A node in the node hierarchy. When the node contains `skin`, all `mesh.primitives` must contain `JOINTS_0` and `WEIGHTS_0` attributes. A node can have either a `matrix` or any combination of `translation`/`rotation`/`scale` (TRS) properties. TRS properties are converted to matrices and postmultiplied in the `T * R * S` order to compose the transformation matrix; first the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), only TRS properties may be present; `matrix` will not be present. + */ +export interface Node { + /** + * The index of the camera referenced by this node. + */ + "camera"?: GlTfId; + /** + * The indices of this node's children. + */ + "children"?: GlTfId[]; + /** + * The index of the skin referenced by this node. + */ + "skin"?: GlTfId; + /** + * A floating-point 4x4 transformation matrix stored in column-major order. + */ + "matrix"?: number[]; + /** + * The index of the mesh in this node. + */ + "mesh"?: GlTfId; + /** + * The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar. + */ + "rotation"?: number[]; + /** + * The node's non-uniform scale, given as the scaling factors along the x, y, and z axes. + */ + "scale"?: number[]; + /** + * The node's translation along the x, y, and z axes. + */ + "translation"?: number[]; + /** + * The weights of the instantiated Morph Target. Number of elements must match number of Morph Targets of used mesh. + */ + "weights"?: number[]; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * Texture sampler properties for filtering and wrapping modes. + */ +export interface Sampler { + /** + * Magnification filter. + */ + "magFilter"?: 9728 | 9729 | number; + /** + * Minification filter. + */ + "minFilter"?: 9728 | 9729 | 9984 | 9985 | 9986 | 9987 | number; + /** + * s wrapping mode. + */ + "wrapS"?: 33071 | 33648 | 10497 | number; + /** + * t wrapping mode. + */ + "wrapT"?: 33071 | 33648 | 10497 | number; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * The root nodes of a scene. + */ +export interface Scene { + /** + * The indices of each root node. + */ + "nodes"?: GlTfId[]; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * Joints and matrices defining a skin. + */ +export interface Skin { + /** + * The index of the accessor containing the floating-point 4x4 inverse-bind matrices. The default is that each matrix is a 4x4 identity matrix, which implies that inverse-bind matrices were pre-applied. + */ + "inverseBindMatrices"?: GlTfId; + /** + * The index of the node used as a skeleton root. When undefined, joints transforms resolve to scene root. + */ + "skeleton"?: GlTfId; + /** + * Indices of skeleton nodes, used as joints in this skin. + */ + "joints": GlTfId[]; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * A texture and its sampler. + */ +export interface Texture { + /** + * The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used. + */ + "sampler"?: GlTfId; + /** + * The index of the image used by this texture. + */ + "source"?: GlTfId; + "name"?: any; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} +/** + * The root object for a glTF asset. + */ +export interface GlTf { + /** + * Names of glTF extensions used somewhere in this asset. + */ + "extensionsUsed"?: string[]; + /** + * Names of glTF extensions required to properly load this asset. + */ + "extensionsRequired"?: string[]; + /** + * An array of accessors. + */ + "accessors"?: Accessor[]; + /** + * An array of keyframe animations. + */ + "animations"?: Animation[]; + /** + * Metadata about the glTF asset. + */ + "asset": Asset; + /** + * An array of buffers. + */ + "buffers"?: Buffer[]; + /** + * An array of bufferViews. + */ + "bufferViews"?: BufferView[]; + /** + * An array of cameras. + */ + "cameras"?: Camera[]; + /** + * An array of images. + */ + "images"?: Image[]; + /** + * An array of materials. + */ + "materials"?: Material[]; + /** + * An array of meshes. + */ + "meshes"?: Mesh[]; + /** + * An array of nodes. + */ + "nodes"?: Node[]; + /** + * An array of samplers. + */ + "samplers"?: Sampler[]; + /** + * The index of the default scene. + */ + "scene"?: GlTfId; + /** + * An array of scenes. + */ + "scenes"?: Scene[]; + /** + * An array of skins. + */ + "skins"?: Skin[]; + /** + * An array of textures. + */ + "textures"?: Texture[]; + "extensions"?: any; + "extras"?: any; + [k: string]: any; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/gltf-validator.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/gltf-validator.d.ts new file mode 100644 index 00000000..9b804037 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/gltf-validator.d.ts @@ -0,0 +1,109 @@ + +declare module 'gltf-validator' { + /** + * Returns a version string. + */ + export const version: string; + + /** + * Returns an array of supported extensions names. + */ + export const supportedExtensions: string[]; + + /** + * @param uri Relative URI of the external resource. + * @returns Promise with Uint8Array data. + */ + export type ExternalResourceFunction = (uri: string) => Promise<Uint8Array>; + + export interface ValidationOptions { + /** + * Absolute or relative asset URI that will be copied to validation report. + */ + uri?: string; + + /** + * Max number of reported issues. Use 0 for unlimited output. + */ + maxIssues?: number; + + /** + * Array of ignored issue codes. + */ + ignoredIssues?: string[]; + + /** + * Object with overridden severities for issue codes. + */ + severityOverrides?: { + [x: string]: number; + }; + + /** + * Function for loading external resources. If omitted, external resources are not validated. + */ + externalResourceFunction?: ExternalResourceFunction; + + /** + * Set to false to skip reading of accessor data. + */ + validateAccessorData?: boolean; + } + + export interface Resource { + pointer: string; + mimeType: string; + storage: string; + uri: string; + } + + export interface Report { + uri: string; + mimeType: string; + validatorVersion: string; + validatedAt: string; + issues: { + numErrors: number; + numWarnings: number; + numInfos: number; + numHints: number; + messages: Array<{ + code: string; + message: string; + pointer: string; + severity: number; + }>; + truncated: boolean; + }; + info: { + version: string; + generator: string; + resources: Array<{ + pointer: string; + mimeType: string; + storage: string; + uri: string; + }>; + hasAnimations: boolean; + hasMaterials: boolean; + hasMorphTargets: boolean; + hasSkins: boolean; + hasTextures: boolean; + hasDefaultScene: boolean; + primitivesCount: number; + maxAttributesUsed: number; + }; + } + + export function validateBytes(data: Uint8Array, options?: ValidationOptions): Promise<Report>; + + export function validateString(json: string, options?: ValidationOptions): Promise<Report>; + + export const enum Severity { + Error = 0, + + Warning = 1, + + Information = 2, + } +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/i18n-well-defined.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/i18n-well-defined.d.ts new file mode 100644 index 00000000..3ab7a8eb --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/i18n-well-defined.d.ts @@ -0,0 +1,811 @@ +declare module "@base/electron-i18n" { + export function translation(key: string, language?: any): string; +} + +declare interface I18NWellDefinedDictionary { + ['about.title']: []; + ['about.editor']: []; + ['about.engine']: []; + ['about.version']: []; + ['animator.title']: []; + ['animator.loading.wait_scene_ready']: []; + ['animator.loading.init_animation_data']: []; + ['animator.mask.need_select_node']: []; + ['animator.mask.need_animation_component']: []; + ['animator.mask.need_animation_clip']: []; + ['animator.mask.enter_animation_mode']: []; + ['animator.mask.add_animation_component']: []; + ['animator.mask.add_animation_clip']: []; + ['animator.toolbar.exit']: []; + ['animator.toolbar.setting']: []; + ['animator.toolbar.order']: []; + ['animator.toolbar.jump_first_frame']: []; + ['animator.toolbar.jump_prev_frame']: []; + ['animator.toolbar.play_animation']: []; + ['animator.toolbar.stop_animation']: []; + ['animator.toolbar.pause_animation']: []; + ['animator.toolbar.jump_next_frame']: []; + ['animator.toolbar.jump_last_frame']: []; + ['animator.toolbar.insert_event']: []; + ['animator.toolbar.save_clip']: []; + ['animator.property.title']: []; + ['animator.property.create_prop']: []; + ['animator.property.remove_prop']: []; + ['animator.property.clear_keys']: []; + ['animator.property.create_key']: []; + ['animator.property.remove_key']: []; + ['animator.property.copy_key']: []; + ['animator.property.paste_key']: []; + ['animator.property.spacing_key']: []; + ['animator.property.spacing_frame']: []; + ['animator.event.title']: []; + ['animator.event.add_func']: []; + ['animator.event.del_func']: []; + ['animator.event.add_params']: []; + ['animator.event.del_params']: []; + ['animator.event.clear_params']: []; + ['animator.event.create']: []; + ['animator.event.paste']: []; + ['animator.bezier.title']: []; + ['animator.bezier.click_to_apply']: []; + ['animator.node.title']: []; + ['animator.node.move_data']: []; + ['animator.node.move_data_to']: []; + ['animator.node.clear_data']: []; + ['animator.preview_row.line_tips']: []; + ['animator.preview_row.open_curve_editor']: []; + ['animator.preview_row.asset_type_should_be']: []; + ['animator.preview_row.asset_position_tips']: []; + ['animator.is_save']: []; + ['animator.is_save_message']: []; + ['animator.is_paste_overwrite']: []; + ['animator.is_paste_overwrite_message']: []; + ['animator.overwrite']: []; + ['animator.is_clear']: []; + ['animator.is_clear_message']: []; + ['animator.is_move_data']: []; + ['animator.is_move_data_message']: []; + ['animator.is_remove_prop.title']: []; + ['animator.is_remove_prop.message']: []; + ['animator.is_remove_prop.remove']: []; + ['animator.is_clear_prop.title']: []; + ['animator.is_clear_prop.message']: []; + ['animator.is_clear_prop.remove']: []; + ['animator.move']: []; + ['animator.clear']: []; + ['animator.copy']: []; + ['animator.paste']: []; + ['animator.save']: []; + ['animator.abort']: []; + ['animator.cancel']: []; + ['animator.edit']: []; + ['animator.delete']: []; + ['animator.toolbar.spacing_frame']: []; + ['asset-db.mask.startup']: []; + ['asset-db.mask.loading']: []; + ['asset-db.debug-mode']: []; + ['asset-db.operate.dialogError']: []; + ['asset-db.operate.dialogWarning']: []; + ['asset-db.operate.dialogQuestion']: []; + ['asset-db.operate.dialogInfo']: []; + ['asset-db.fail.readonly']: []; + ['asset-db.createAsset.fail.unknown']: []; + ['asset-db.createAsset.fail.url']: []; + ['asset-db.createAsset.fail.exist']: []; + ['asset-db.createAsset.fail.drop']: []; + ['asset-db.createAsset.fail.toUrl']: []; + ['asset-db.createAsset.fail.uuid']: []; + ['asset-db.createAsset.fail.content']: []; + ['asset-db.createAsset.fail.readonly']: []; + ['asset-db.createAsset.warn.overwrite']: []; + ['asset-db.dropAsset.overwrite']: []; + ['asset-db.dropAsset.reserve']: []; + ['asset-db.dropAsset.fail.unknown']: []; + ['asset-db.dropAsset.fail.url']: []; + ['asset-db.dropAsset.fail.filepaths']: []; + ['asset-db.dropAsset.fail.readonly']: []; + ['asset-db.dropAsset.warn.overwrite']: []; + ['asset-db.dropAsset.warn.sameway']: []; + ['asset-db.saveAsset.fail.unknown']: []; + ['asset-db.saveAsset.fail.uuid']: []; + ['asset-db.saveAsset.fail.content']: []; + ['asset-db.saveAsset.fail.readonly']: []; + ['asset-db.saveAssetMeta.fail.unknown']: []; + ['asset-db.saveAssetMeta.fail.uuid']: []; + ['asset-db.saveAssetMeta.fail.content']: []; + ['asset-db.saveAssetMeta.fail.readonly']: []; + ['asset-db.copyAsset.fail.unknown']: []; + ['asset-db.copyAsset.fail.url']: []; + ['asset-db.copyAsset.fail.source']: []; + ['asset-db.copyAsset.fail.target']: []; + ['asset-db.copyAsset.fail.include']: []; + ['asset-db.copyAsset.fail.parent']: []; + ['asset-db.copyAsset.fail.readonly']: []; + ['asset-db.copyAsset.fail.metauuid']: []; + ['asset-db.moveAsset.fail.unknown']: []; + ['asset-db.moveAsset.fail.url']: []; + ['asset-db.moveAsset.fail.source']: []; + ['asset-db.moveAsset.fail.target']: []; + ['asset-db.moveAsset.fail.exist']: []; + ['asset-db.moveAsset.fail.include']: []; + ['asset-db.moveAsset.fail.parent']: []; + ['asset-db.moveAsset.fail.readonly_source']: []; + ['asset-db.moveAsset.fail.readonly']: []; + ['asset-db.moveAsset.warn.overwrite']: []; + ['asset-db.deleteAsset.fail.unknown']: []; + ['asset-db.deleteAsset.fail.url']: []; + ['asset-db.deleteAsset.fail.unexist']: []; + ['asset-db.deleteAsset.fail.readonly']: []; + ['asset-db.preferences.log_level']: []; + ['asset-db.preferences.log_level_debug']: []; + ['asset-db.preferences.log_level_log']: []; + ['asset-db.preferences.log_level_warn']: []; + ['asset-db.preferences.log_level_error']: []; + ['asset-db.importers.glTF.glTF_asset_group_mesh']: []; + ['asset-db.importers.glTF.glTF_asset_group_animation']: []; + ['asset-db.importers.glTF.glTF_asset_group_node']: []; + ['asset-db.importers.glTF.glTF_asset_group_skin']: []; + ['asset-db.importers.glTF.glTF_asset_group_sampler']: []; + ['asset-db.importers.glTF.glTF_asset']: [{ + group: any; + index: any; + name: any; + }]; + ['asset-db.importers.glTF.glTF_asset_no_name']: [{ + group: any; + index: any; + }]; + ['asset-db.importers.glTF.unsupported_alpha_mode']: [{ + material: any; + mode: any; + }]; + ['asset-db.importers.glTF.unsupported_texture_parameter']: [{ + texture: any; + sampler: any; + type: any; + value: any; + }]; + ['asset-db.importers.glTF.texture_parameter_min_filter']: []; + ['asset-db.importers.glTF.texture_parameter_mag_filter']: []; + ['asset-db.importers.glTF.unsupported_channel_path']: [{ + animation: any; + channel: any; + path: any; + }]; + ['asset-db.importers.glTF.reference_skin_in_different_scene']: [{ + node: any; + skin: any; + }]; + ['asset-db.importers.glTF.disallow_cubic_spline_channel_split']: [{ + animation: any; + channel: any; + }]; + ['asset-db.importers.glTF.failed_to_calculate_tangents_due_to_lack_of_normals']: [{ + mesh: any; + primitive: any; + }]; + ['asset-db.importers.glTF.failed_to_calculate_tangents_due_to_lack_of_uvs']: [{ + mesh: any; + primitive: any; + }]; + ['asset-db.importers.glTF.failed_to_load_image']: [{ + url: any; + reason: any; + }]; + ['asset-db.importers.glTF.image_uri_should_be_file_url']: []; + ['asset-db.importers.glTF.failed_to_convert_tga']: []; + ['asset-db.importers.fbx.failed_to_convert_fbx_file']: [{ + path: any; + }]; + ['asset-db.importers.fbx.no_available_fbx_temp_dir']: []; + ['asset-db.importers.fbx.fbx2glTF_exists_with_non_zero_code']: [{ + code: any; + output: any; + }]; + ['asset-db.importers.javascript.transform_failure']: [{ + path: any; + reason: any; + }]; + ['assets.title']: []; + ['assets.previewTitle']: []; + ['assets.menu.createMenu']: []; + ['assets.menu.searchPlaceholder_name']: []; + ['assets.menu.searchPlaceholder_uuid']: []; + ['assets.menu.searchPlaceholder_type']: []; + ['assets.menu.searchTip']: []; + ['assets.menu.search']: []; + ['assets.menu.searchName']: []; + ['assets.menu.searchUuid']: []; + ['assets.menu.searchType']: []; + ['assets.menu.sort']: []; + ['assets.menu.sortName']: []; + ['assets.menu.sortType']: []; + ['assets.menu.refresh']: []; + ['assets.menu.allExpand']: []; + ['assets.menu.allCollapse']: []; + ['assets.menu.new']: []; + ['assets.menu.newFolder']: []; + ['assets.menu.newJavaScript']: []; + ['assets.menu.newTypeScript']: []; + ['assets.menu.newCubeMap']: []; + ['assets.menu.newScene']: []; + ['assets.menu.newMaterial']: []; + ['assets.menu.newPhysicsMaterial']: []; + ['assets.menu.newEffect']: []; + ['assets.menu.newChunk']: []; + ['assets.menu.newAnimation']: []; + ['assets.menu.renderPipeline']: []; + ['assets.menu.forwardPipeline']: []; + ['assets.menu.renderPipelineTS']: []; + ['assets.menu.RenderFlowTS']: []; + ['assets.menu.RenderStageTS']: []; + ['assets.menu.newPac']: []; + ['assets.menu.newTerrain']: []; + ['assets.menu.copy']: []; + ['assets.menu.cut']: []; + ['assets.menu.paste']: []; + ['assets.menu.delete']: []; + ['assets.menu.rename']: []; + ['assets.menu.selectall']: []; + ['assets.menu.readonly']: []; + ['assets.menu.revealInlibrary']: []; + ['assets.menu.reimport']: []; + ['assets.menu.revealInExplorer']: []; + ['assets.menu.showUuid']: []; + ['assets.menu.recommendTS']: []; + ['assets.operate.cutReady']: []; + ['assets.operate.cutDone']: []; + ['assets.operate.copyReady']: []; + ['assets.operate.copyDone']: []; + ['assets.operate.dialogError']: []; + ['assets.operate.dialogWarning']: []; + ['assets.operate.dialogQuestion']: []; + ['assets.operate.dialogInfo']: []; + ['assets.operate.refreshing']: []; + ['assets.operate.assetDataError']: []; + ['assets.operate.sureDelete']: [{ + length: any; + filelist: any; + }]; + ['assets.operate.renameFail']: []; + ['assets.operate.pasteFail_parent_into_child']: []; + ['assets.operate.refreshFail']: []; + ['assets.operate.readDefaultFileFail']: []; + ['assets.operate.errorNewnameDuplicate']: []; + ['assets.operate.errorNewnameUnlegal']: []; + ['assets.operate.errorNewnameEmpty']: []; + ['assets.operate.errorScriptName']: []; + ['assets.operate.errorScriptClassName']: []; + ['assets.deprecate.fire']: []; + ['builder.title']: []; + ['builder.create_user_template']: []; + ['builder.build_config']: []; + ['builder.build']: []; + ['builder.compile']: []; + ['builder.select_all']: []; + ['builder.open_compile_file']: []; + ['builder.source_map']: []; + ['builder.recompile_engine']: []; + ['builder.debug_mode']: []; + ['builder.web_debugger']: []; + ['builder.require']: []; + ['builder.new_build_task']: []; + ['builder.empty_task_holder']: []; + ['builder.empty_scene']: []; + ['builder.reveal_in_explorer']: []; + ['builder.view_build_config']: []; + ['builder.recompile']: []; + ['builder.compress_texture']: []; + ['builder.pack_autoAtlas']: []; + ['builder.replace_splash_screen']: []; + ['builder.run']: []; + ['builder.open']: []; + ['builder.export']: []; + ['builder.import']: []; + ['builder.export_build_config']: []; + ['builder.import_build_config']: []; + ['builder.include_project_setting']: []; + ['builder.only_build_panel']: []; + ['builder.options.taskName']: []; + ['builder.options.name']: []; + ['builder.options.platform']: []; + ['builder.options.build_path']: []; + ['builder.options.start_scene']: []; + ['builder.options.inline_SpriteFrames']: []; + ['builder.options.merge_json_by_scene']: []; + ['builder.options.merge_start_scene']: []; + ['builder.options.orientation']: []; + ['builder.options.scenes']: []; + ['builder.options.debug']: []; + ['builder.options.resolution']: []; + ['builder.options.preview_url']: []; + ['builder.options.source_map']: []; + ['builder.options.force_combile_engine']: []; + ['builder.options.web_debugger']: []; + ['builder.options.compress_texture']: []; + ['builder.options.pack_autoAtlas']: []; + ['builder.package']: []; + ['builder.package_hint']: []; + ['builder.desktop_icon']: []; + ['builder.desktop_icon_hint']: []; + ['builder.version_name']: []; + ['builder.version_name_hint']: []; + ['builder.version_number']: []; + ['builder.version_number_hint']: []; + ['builder.support_min_platform']: []; + ['builder.support_min_platform_hint']: []; + ['builder.full_screen']: []; + ['builder.screen_orientation']: []; + ['builder.landscape']: []; + ['builder.portrait']: []; + ['builder.tiny_packet_mode']: []; + ['builder.tiny_packet_path']: []; + ['builder.tiny_packet_path_hint']: []; + ['builder.keystore']: []; + ['builder.use_debug_keystore']: []; + ['builder.private_pem_path']: []; + ['builder.private_pem_path_hint']: []; + ['builder.certificate_pem_path']: []; + ['builder.certificate_pem_path_hint']: []; + ['builder.print_finger']: []; + ['builder.pack_res_to_first_pack']: []; + ['builder.custom_npm_path']: []; + ['builder.custom_npm_path_hint']: []; + ['builder.custom_manifest_data']: []; + ['builder.custom_manifest_data_error']: []; + ['builder.remote_url']: []; + ['builder.not_install_nodejs_windows_error']: []; + ['builder.not_install_nodejs_mac_error']: []; + ['builder.rpk_installing']: []; + ['builder.rpk_install_fail']: []; + ['builder.rpk_install_success']: []; + ['builder.not_mainfest_data']: []; + ['builder.npm_installed_success']: []; + ['builder.npm_install_fail']: []; + ['builder.oppo.new']: []; + ['builder.oppo.not_empty']: []; + ['builder.oppo.icon_not_exist']: []; + ['builder.oppo.signature_not_exist']: []; + ['builder.oppo.private_pem_path_error']: []; + ['builder.oppo.certificate_pem_path_error']: []; + ['builder.certificate.country']: []; + ['builder.certificate.state']: []; + ['builder.certificate.locality']: []; + ['builder.certificate.organization']: []; + ['builder.certificate.organizationalUnit']: []; + ['builder.certificate.commonName']: []; + ['builder.certificate.email']: []; + ['builder.certificate.certificatePath']: []; + ['builder.certificate.generate']: []; + ['builder.certificate.build_certificate_complete']: []; + ['builder.certificate.build_certificate_fail']: []; + ['builder.huawei.select_certificate_path']: []; + ['builder.huawei.install_nodejs_before_view_certificate']: []; + ['builder.huawei.select_certificate_path_after_view_certificate']: []; + ['builder.huawei.certificate_fingerprint']: []; + ['builder.huawei.certificate_fingerprint_error']: []; + ['builder.huawei.use_native_renderer']: []; + ['builder.wechat_game.separate_engine']: []; + ['builder.wechat_game.separate_engine_tips']: []; + ['builder.wechat_game.client_path_error']: [{ + path: any; + }]; + ['builder.wechat_game.client_info_path_err']: [{ + path: any; + }]; + ['builder.wechat_game.client_version_low']: []; + ['builder.wechat_game.remote_server_address']: []; + ['builder.wechat_game.remote_server_address_tips']: []; + ['builder.wechat_game.sub_context']: []; + ['builder.wechat_game.sub_context_tips']: []; + ['builder.wechat_game.build_sub']: []; + ['builder.wechat_game.build_sub_tips']: []; + ['builder.wechat_game.wechatgame_app_path_empty']: []; + ['builder.error.build_error']: []; + ['builder.error.dirty_info']: []; + ['builder.error.build_dir_not_exists']: [{ + buildDir: any; + }]; + ['builder.error.build_path_contains_space']: []; + ['builder.error.build_path_contains_chinese']: []; + ['builder.error.can_not_empty']: []; + ['builder.error.project_name_not_legal']: []; + ['builder.error.package_name_not_legal']: []; + ['builder.error.package_name_start_with_number']: []; + ['builder.error.select_scenes_to_build']: []; + ['builder.error.binary_api_level']: []; + ['builder.error.path_too_long_title']: []; + ['builder.error.path_too_long_desc']: [{ + max_length: any; + }]; + ['builder.error.keep_raw_texture_of_atlas']: [{ + texturePath: any; + pacPath: any; + assetPath: any; + }]; + ['builder.error.arm64_not_support']: [{ + current_api: any; + min_version: any; + }]; + ['builder.warn.same_url']: []; + ['builder.tasks.build_asset']: []; + ['builder.tasks.build_engine']: []; + ['builder.tasks.build_img']: []; + ['builder.tasks.build_json']: []; + ['builder.tasks.build_atlas']: []; + ['builder.tasks.build_script']: []; + ['builder.tasks.build_suffix']: []; + ['builder.tasks.build_template']: []; + ['builder.tasks.load_script']: []; + ['builder.tasks.sort_asset']: []; + ['builder.tasks.sort_image']: []; + ['builder.tasks.sort_script']: []; + ['builder.tasks.sort_sprite_frame']: []; + ['builder.tasks.sort_texture']: []; + ['builder.tasks.sort_json']: []; + ['builder.tasks.settings.compress']: []; + ['builder.tasks.settings.design_resolution']: []; + ['builder.tasks.settings.group']: []; + ['builder.tasks.settings.md5']: []; + ['builder.tasks.settings.scene']: []; + ['builder.tasks.settings.script']: []; + ['builder.tips.enter_name']: []; + ['builder.tips.taskName']: []; + ['builder.tips.build_path']: []; + ['builder.tips.build_scenes']: []; + ['builder.tips.inline_SpriteFrames']: []; + ['builder.tips.md5Cache']: []; + ['builder.tips.merge_start_scene']: []; + ['builder.tips.debug']: []; + ['builder.tips.resolution']: []; + ['builder.tips.web_debugger']: []; + ['builder.tips.creat_template_success']: []; + ['builder.tips.set_start_scene']: []; + ['builder.splash_setting.title']: []; + ['builder.splash_setting.drag_img_here']: []; + ['builder.splash_setting.img_loading']: []; + ['builder.splash_setting.confirm']: []; + ['builder.splash_setting.settings.total_time']: []; + ['builder.splash_setting.settings.display_ratio']: []; + ['builder.splash_setting.settings.clear_color']: []; + ['builder.splash_setting.settings.effect']: []; + ['builder.splash_setting.settings.display_watermark']: []; + ['builder.splash_setting.is_save_dialog.title']: []; + ['builder.splash_setting.is_save_dialog.save']: []; + ['builder.splash_setting.is_save_dialog.cancel']: []; + ['builder.splash_setting.is_save_dialog.abort']: []; + ['builder.is_remove_task.title']: []; + ['builder.is_remove_task.has_building_task']: []; + ['builder.is_remove_task.message']: []; + ['builder.is_remove_task.remove']: []; + ['builder.is_remove_task.deep_remove']: []; + ['builder.is_remove_task.cancel']: []; + ['builder.is_stop_build.title']: []; + ['builder.is_stop_build.message']: []; + ['builder.is_stop_build.stop']: []; + ['builder.is_stop_build.cancel']: []; + ['builder.is_close_win.title']: []; + ['builder.is_close_win.message']: []; + ['builder.is_close_win.force_close']: []; + ['builder.is_close_win.cancel']: []; + ['builder.is_save_scene.title']: []; + ['builder.is_save_scene.message']: []; + ['builder.is_save_scene.save']: []; + ['builder.is_save_scene.ignore']: []; + ['builder.is_save_scene.cancel']: []; + ['builder.merge_json_by_scene']: []; + ['builder.not_require']: []; + ['builder.options.open_compile_file']: []; + ['builder.custom_manifest_file_path']: []; + ['builder.custom_manifest_file_path_hint']: []; + ['builder.install_nodejs_before_view_certificate']: []; + ['builder.window_default_npm_path_error']: []; + ['builder.mac_default_npm_path_error']: []; + ['builder.oppo.package_name_error']: []; + ['builder.huawei.certificate_fingerprint_window_error']: []; + ['builder.huawei.certificate_fingerprint_mac_error']: []; + ['console.title']: []; + ['console.editorLog']: []; + ['console.cocosLog']: []; + ['console.tabbar.regex']: []; + ['console.preferences.display_date']: []; + ['console.preferences.font_size']: []; + ['console.preferences.line_height']: []; + ['engine.title']: []; + ['engine.compile_engine']: []; + ['engine.wait_quick_compile']: []; + ['engine.confirm']: []; + ['engine.browse']: []; + ['engine.open']: []; + ['engine.engine_directory_illegal']: []; + ['engine.engine_compile_failed']: []; + ['engine.engine_compile_crash']: []; + ['engine.javascript_engine']: []; + ['engine.use_builtin_engine']: []; + ['engine.custom_engine_path']: []; + ['engine.QUICK_COMPILER.engine_modified_info']: []; + ['engine.resources_docs_1']: []; + ['engine.resources_docs_2']: []; + ['engine.resources_docs_3']: []; + ['engine.resources_docs_4']: []; + ['hierarchy.title']: []; + ['hierarchy.menu.createMenu']: []; + ['hierarchy.menu.searchPlaceholder']: []; + ['hierarchy.menu.searchPlaceholder_name']: []; + ['hierarchy.menu.searchPlaceholder_uuid']: []; + ['hierarchy.menu.searchPlaceholder_component']: []; + ['hierarchy.menu.searchTip']: []; + ['hierarchy.menu.search']: []; + ['hierarchy.menu.searchName']: []; + ['hierarchy.menu.searchUuid']: []; + ['hierarchy.menu.searchComponent']: []; + ['hierarchy.menu.refresh']: []; + ['hierarchy.menu.allExpand']: []; + ['hierarchy.menu.allCollapse']: []; + ['hierarchy.menu.newNode']: []; + ['hierarchy.menu.newNodeEmpty']: []; + ['hierarchy.menu.new3dObject']: []; + ['hierarchy.menu.new3dCube']: []; + ['hierarchy.menu.new3dCylinder']: []; + ['hierarchy.menu.new3dSphere']: []; + ['hierarchy.menu.new3dCapsule']: []; + ['hierarchy.menu.new3dCone']: []; + ['hierarchy.menu.new3dTorus']: []; + ['hierarchy.menu.new3dPlane']: []; + ['hierarchy.menu.new3dQuad']: []; + ['hierarchy.menu.newLightObject']: []; + ['hierarchy.menu.newLightDirectional']: []; + ['hierarchy.menu.newLightSphere']: []; + ['hierarchy.menu.newLightSpot']: []; + ['hierarchy.menu.newCameraObject']: []; + ['hierarchy.menu.newTerrain']: []; + ['hierarchy.menu.newEffects']: []; + ['hierarchy.menu.newEffectsParticle']: []; + ['hierarchy.menu.newUI']: []; + ['hierarchy.menu.newUICanvas']: []; + ['hierarchy.menu.newUISprite']: []; + ['hierarchy.menu.newUILabel']: []; + ['hierarchy.menu.newUIButton']: []; + ['hierarchy.menu.newUIToggle']: []; + ['hierarchy.menu.newUIToggleGroup']: []; + ['hierarchy.menu.newUISlider']: []; + ['hierarchy.menu.newUIProgressBar']: []; + ['hierarchy.menu.newUIWidget']: []; + ['hierarchy.menu.newUIEditBox']: []; + ['hierarchy.menu.newUILayout']: []; + ['hierarchy.menu.newUIScrollView']: []; + ['hierarchy.menu.newUIMask']: []; + ['hierarchy.menu.copy']: []; + ['hierarchy.menu.cut']: []; + ['hierarchy.menu.paste']: []; + ['hierarchy.menu.delete']: []; + ['hierarchy.menu.rename']: []; + ['hierarchy.menu.duplicate']: []; + ['hierarchy.menu.showUuid']: []; + ['hierarchy.menu.link_prefab']: []; + ['hierarchy.menu.link_prefab_error_node_empty']: []; + ['hierarchy.menu.link_prefab_error_node_isScene']: []; + ['hierarchy.menu.link_prefab_error_asset_empty']: []; + ['hierarchy.menu.link_prefab_error_asset_invalid']: []; + ['hierarchy.menu.link_prefab_make_sure']: []; + ['hierarchy.menu.unlink_prefab']: []; + ['hierarchy.menu.unlink_prefab_error_prefab_empty']: []; + ['hierarchy.menu.errorNewnameEmpty']: []; + ['hierarchy.operate.cutReady']: []; + ['hierarchy.operate.cutDone']: []; + ['hierarchy.operate.copyReady']: []; + ['hierarchy.operate.copyDone']: []; + ['hierarchy.operate.duplicateDone']: []; + ['hierarchy.operate.dialogError']: []; + ['hierarchy.operate.dialogWarning']: []; + ['hierarchy.operate.dialogQuestion']: []; + ['hierarchy.operate.dialogInfo']: []; + ['hierarchy.operate.renameFail']: []; + ['inspector.title']: []; + ['inspector.add_component']: []; + ['inspector.lock_unlock']: []; + ['inspector.backward_selection']: []; + ['inspector.forward_selection']: []; + ['inspector.menu.remove_component']: []; + ['inspector.menu.move_up_component']: []; + ['inspector.menu.move_down_component']: []; + ['inspector.menu.copy_node_value']: []; + ['inspector.menu.paste_node_value']: []; + ['inspector.menu.copy_component']: []; + ['inspector.menu.paste_component']: []; + ['inspector.menu.paste_component_values']: []; + ['inspector.asset.directory.is_subpackage']: []; + ['inspector.asset.directory.subpackage_name']: []; + ['inspector.asset.javascript.plugin']: []; + ['inspector.asset.javascript.loadPluginInWeb']: []; + ['inspector.asset.javascript.loadPluginInEditor']: []; + ['inspector.asset.javascript.loadPluginInNative']: []; + ['inspector.asset.fbx.browse']: []; + ['inspector.asset.spriteFrame.edit']: []; + ['inspector.asset.texture.modeWarn']: []; + ['inspector.node.layer.confirm_message']: []; + ['inspector.node.layer.change_children']: []; + ['inspector.node.layer.change_self']: []; + ['inspector.gradient.title']: []; + ['inspector.curve_editor.title']: []; + ['inspector.sprite_editor.title']: []; + ['inspector.sprite_editor.scale']: []; + ['inspector.sprite_editor.reset']: []; + ['inspector.sprite_editor.save']: []; + ['inspector.sprite_editor.saveError']: []; + ['inspector.sprite_editor.border']: []; + ['inspector.sprite_editor.left']: []; + ['inspector.sprite_editor.right']: []; + ['inspector.sprite_editor.top']: []; + ['inspector.sprite_editor.bottom']: []; + ['inspector.check_is_saved.message']: []; + ['inspector.check_is_saved.save']: []; + ['inspector.check_is_saved.abort']: []; + ['inspector.prefab.local']: []; + ['inspector.prefab.reset']: []; + ['inspector.prefab.save']: []; + ['inspector.prefab.link']: []; + ['inspector.prefab.unlink']: []; + ['inspector.prefab.lost']: []; + ['inspector.prefab.exist']: []; + ['packager.title']: []; + ['packager.menu.internal']: []; + ['packager.menu.project']: []; + ['packager.menu.global']: []; + ['packager.menu.add']: []; + ['packager.menu.addProject']: []; + ['packager.menu.addGlobal']: []; + ['packager.menu.addLabel']: []; + ['packager.menu.addSuccess']: []; + ['packager.menu.import']: []; + ['packager.menu.importProject']: []; + ['packager.menu.importGlobal']: []; + ['packager.menu.importSuccess']: []; + ['packager.menu.install']: []; + ['packager.menu.installProject']: []; + ['packager.menu.installGlobal']: []; + ['packager.menu.installSuccess']: []; + ['packager.menu.selectDirectory']: []; + ['packager.menu.search']: []; + ['packager.menu.openFolder']: []; + ['packager.menu.author']: []; + ['packager.menu.state']: []; + ['packager.menu.remove']: []; + ['packager.menu.removeSuccess']: []; + ['packager.menu.removeConfirm']: []; + ['packager.menu.enable']: []; + ['packager.menu.disable']: []; + ['packager.menu.enabled']: []; + ['packager.menu.disabled']: []; + ['packager.menu.invalid']: []; + ['packager.menu.confirm']: []; + ['packager.menu.addError']: []; + ['packager.menu.importError']: []; + ['preferences.title']: []; + ['preferences.nav.general']: []; + ['preferences.nav.edit']: []; + ['preferences.nav.extension']: []; + ['preferences.nav.native']: []; + ['preferences.nav.laboratory']: []; + ['preferences.general.language']: []; + ['preferences.general.step']: []; + ['preferences.general.preci']: []; + ['preferences.general.theme']: []; + ['preferences.general.themeColor']: []; + ['preferences.general.preview_ip']: []; + ['preferences.edit.script_editor']: []; + ['preferences.edit.picture_editor']: []; + ['preferences.edit.browse']: []; + ['preferences.edit.remove']: []; + ['preferences.edit.internal']: []; + ['preferences.native.wechatgame_app_path']: []; + ['preferences.extension.package']: []; + ['preferences.laboratory.about']: []; + ['preferences.laboratory.new_add_component']: []; + ['preferences.browse']: []; + ['preferences.open']: []; + ['preview.title']: []; + ['preview.automatic']: []; + ['preview.automatic_tooltip']: []; + ['preview.scene_is_empty']: []; + ['preview.play']: []; + ['preview.refresh_device']: []; + ['preview.scan']: []; + ['preview.create_template']: []; + ['preview.load_current_scene_error']: []; + ['preview.creat_template_success']: []; + ['project-setting.title']: []; + ['project-setting.nav.preview']: []; + ['project-setting.nav.groupList']: []; + ['project-setting.nav.modules']: []; + ['project-setting.nav.engine']: []; + ['project-setting.nav.layer']: []; + ['project-setting.nav.graphics']: []; + ['project-setting.nav.general']: []; + ['project-setting.nav.projectPath']: []; + ['project-setting.nav.wizardPath']: []; + ['project-setting.preview.start_scene']: []; + ['project-setting.preview.auto_refresh']: []; + ['project-setting.preview.current_scene']: []; + ['project-setting.preview.simulator_setting_type']: []; + ['project-setting.preview.global']: []; + ['project-setting.preview.project']: []; + ['project-setting.preview.simulator_device_orientation']: []; + ['project-setting.preview.simulator_resolution']: []; + ['project-setting.preview.customize_resolution']: []; + ['project-setting.preview.vertical']: []; + ['project-setting.preview.horizontal']: []; + ['project-setting.modules.title']: []; + ['project-setting.modules.info']: []; + ['project-setting.modules.warn']: []; + ['project-setting.modules.module']: []; + ['project-setting.modules.inquiry']: []; + ['project-setting.modules.submodule']: []; + ['project-setting.modules.inquiry_all']: []; + ['project-setting.engine.cocos_default']: []; + ['project-setting.engine.user_customize']: []; + ['project-setting.engine.renderPipeline']: []; + ['project-setting.engine.physics']: []; + ['project-setting.engine.builtin']: []; + ['project-setting.engine.cannon']: []; + ['project-setting.engine.ammo']: []; + ['project-setting.general.browse']: []; + ['project-setting.general.ts_compiler']: []; + ['project-setting.general.tslint.title']: []; + ['project-setting.general.tslint.default']: []; + ['project-setting.general.tslint.path']: []; + ['project-setting.general.section_canvas']: []; + ['project-setting.general.design_resolution']: []; + ['project-setting.general.width']: []; + ['project-setting.general.height']: []; + ['project-setting.general.fit_width']: []; + ['project-setting.general.fit_height']: []; + ['project-setting.general.type_check_level']: []; + ['project-setting.general.type_check_tips.disable']: []; + ['project-setting.general.type_check_tips.checkOnly']: []; + ['project-setting.general.type_check_tips.fatalOnError']: []; + ['scene.title']: []; + ['scene.new']: []; + ['scene.save']: []; + ['scene.save_as']: []; + ['scene.develop']: []; + ['scene.terrain.is_create_message']: []; + ['scene.terrain.is_create']: []; + ['scene.terrain.cancel']: []; + ['scene.terrain.edit']: []; + ['scene.terrain.save']: []; + ['scene.terrain.delete']: []; + ['scene.terrain.abort']: []; + ['scene.messages.warning']: []; + ['scene.messages.scenario_modified']: []; + ['scene.messages.want_to_save']: []; + ['scene.messages.save']: []; + ['scene.messages.dont_save']: []; + ['scene.messages.cancel']: []; + ['scene.messages.save_as_fail']: []; + ['scene.save_prefab']: []; + ['scene.close_prefab']: []; + ['scene.save_clip']: []; + ['scene.close_clip']: []; + ['scene.gizmos.icon3d']: []; + ['scene.gizmos.showGrid']: []; + ['scene.ui_tools.zoom_up']: []; + ['scene.ui_tools.zoom_down']: []; + ['scene.ui_tools.zoom_reset']: []; + ['scene.ui_tools.align_top']: []; + ['scene.ui_tools.align_v_center']: []; + ['scene.ui_tools.align_bottom']: []; + ['scene.ui_tools.align_left']: []; + ['scene.ui_tools.align_h_center']: []; + ['scene.ui_tools.align_right']: []; + ['scene.ui_tools.distribute_top']: []; + ['scene.ui_tools.distribute_v_center']: []; + ['scene.ui_tools.distribute_bottom']: []; + ['scene.ui_tools.distribute_left']: []; + ['scene.ui_tools.distribute_h_center']: []; + ['scene.ui_tools.distribute_right']: []; + ['tester.auto_tooltip']: []; + ['tester.play_tooltip']: []; + ['tester.pause_tooltip']: []; + ['ui-kit.title']: []; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/third-parts.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/third-parts.d.ts new file mode 100644 index 00000000..2aafc90b --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine-extends/@types/third-parts.d.ts @@ -0,0 +1,156 @@ +declare module 'tga-js' { + export default class TGA { + width: number; + height: number; + getImageData(imageData?: ImageData): ImageData | {width: number, height: number, data: Uint8ClampedArray}; + constructor(); + load(data: Buffer): null; + } +} + +declare module 'psd.js' { + import PNG from 'pngjs'; + export default class PSD { + constructor (data: Buffer); + + parse(); + + image: { + toPng(): PNG; + }; + } +} + +declare module 'draco3dgltf' { + export function createDecoderModule(options: DecoderModuleOptions): typeof DecoderModule; + + export interface DecoderModuleOptions { + + } + + interface DecoderModule { + + } + + namespace DecoderModule { + function destroy(decoder: Decoder): void; + + function destroy(buffer: DecoderBuffer): void; + + function destroy(int32Array: DracoInt32Array): void; + + function destroy(mesh: Geometry): void; + + export class DecoderBuffer { + public Init(buffer: Int8Array, size: number): void; + } + + export class Decoder { + public GetEncodedGeometryType(buffer: DecoderBuffer): GeometryType; + + public DecodeBufferToMesh(buffer: DecoderBuffer, mesh: Mesh): Status; + + public DecodeBufferToPointCloud(buffer: DecoderBuffer, pointCloud: PointCloud): Status; + + public GetFaceFromMesh(geometry: Geometry, index: number, out: DracoInt32Array): void; + + public GetAttributeId(geometry: Geometry, attributeType: AttributeType): number; + + public GetAttributeByUniqueId(geometry: Geometry, uniqueId: number): Attribute; + + public GetAttribute(geometry: Geometry, attributeId: number): Attribute; + + public GetAttributeInt8ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoInt8Array): void; + + public GetAttributeInt16ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoInt16Array): void; + + public GetAttributeInt32ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoInt32Array): void; + + public GetAttributeUInt8ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoUInt8Array): void; + + public GetAttributeUInt16ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoUInt16Array): void; + + public GetAttributeUInt32ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoUInt32Array): void; + + public GetAttributeFloatForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoFloat32Array): void; + } + + class Status { + public ok(): boolean; + public error_msg(): string; + } + + enum GeometryType { + // See below + } + + export const TRIANGULAR_MESH: GeometryType; + + export const POINT_CLOUD: GeometryType; + + export class Mesh { + public ptr: number; + + public num_faces(): number; + + public num_points(): number; + } + + export class PointCloud { + public ptr: number; + + public num_points(): number; + } + + export type Geometry = Mesh | PointCloud; + + enum AttributeType { + // See below + } + + export const POSITION: AttributeType; + export const NORMAL: AttributeType; + export const COLOR: AttributeType; + export const TEX_COORD: AttributeType; + + class Attribute { + private constructor(); + public num_components(): number; + } + + export class DracoInt8Array { + public size(): number; + public GetValue(index: number): number; + } + + export class DracoInt16Array { + public size(): number; + public GetValue(index: number): number; + } + + export class DracoInt32Array { + public size(): number; + public GetValue(index: number): number; + } + + export class DracoUInt8Array { + public size(): number; + public GetValue(index: number): number; + } + + export class DracoUInt16Array { + public size(): number; + public GetValue(index: number): number; + } + + export class DracoUInt32Array { + public size(): number; + public GetValue(index: number): number; + } + + export class DracoFloat32Array { + public size(): number; + public GetValue(index: number): number; + } + } +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine/@types/message.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine/@types/message.d.ts new file mode 100644 index 00000000..27f361a9 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/engine/@types/message.d.ts @@ -0,0 +1,16 @@ +export interface message extends EditorMessageMap { + 'query-info': { + params: [] | [ + string, + ], + result: { + type: string; + version: string; + path: string; + nativeVersion: string; // 原生引擎类型 'custom' 'builtin' + nativePath: string; + editor: string; + renderPipeline: string; + }, + }, +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/huawei-agc/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/huawei-agc/@types/index.d.ts new file mode 100644 index 00000000..4725986b --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/huawei-agc/@types/index.d.ts @@ -0,0 +1,49 @@ + +export * from '@editor/library-type/packages/builder/@types/protect'; +import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; +/// <reference path="@editor/library-type/packages/builder/@types/protect/global.d.ts"/> + +export type IOrientation = 'landscape' | 'portrait'; + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'android': IOptions; + } +} + +export type IAppABI = 'armeabi-v7a' | 'arm64-v8a' | 'x86' | 'x86_64'; + +export interface IOptions { + packageName: string; + orientation: { + landscapeRight: boolean; + landscapeLeft: boolean; + portrait: boolean; + upsideDown: boolean; + }, + + apiLevel: string; + appABIs: IAppABI[]; + + useDebugKeystore: boolean; + keystorePath: string; + keystorePassword: string; + keystoreAlias: string; + keystoreAliasPassword: string; + + appBundle: boolean; + androidInstant: boolean; + remoteUrl: string; + sdkPath: string; + ndkPath: string; + + renderBackEnd: { + vulkan: boolean; + gles3: boolean; + gles2: boolean; + } +} + +export interface IBuildResult extends InternalBuildResult { + userFrameWorks: boolean; // 是否使用用户的配置数据 +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/huawei-quick-game/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/huawei-quick-game/@types/index.d.ts new file mode 100644 index 00000000..a4cfca69 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/huawei-quick-game/@types/index.d.ts @@ -0,0 +1,34 @@ +/// <reference path="../../../@types/index.d.ts"/> +/// <reference path="@editor/library-type/packages/builder/@types/protect/global.d.ts"/> +export * from "@editor/library-type/packages/builder/@types/protect"; +import { IInternalBuildOptions } from "@editor/library-type/packages/builder/@types/protect/index"; + +export type IOrientation = 'landscape' | 'portrait'; + +export interface ITaskOption extends IInternalBuildOptions { + packages:{ + 'huawei-quick-game': IOptions; + }; +} + +export interface IOptions { + package: string; + icon: string; + versionName: string; + versionCode: string; + minPlatformVersion: string; + deviceOrientation: IOrientation; + tinyPackageServer: string; + useDebugKey: boolean; + privatePemPath: string; + certificatePemPath: string; + + fullScreen: boolean; + logLevel: string; + manifestPath?: string; +} + +export interface ICompileOptions { + name: string; + tinyPackageServer: string; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ios-app-clip/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ios-app-clip/@types/index.d.ts new file mode 100644 index 00000000..721d3319 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ios-app-clip/@types/index.d.ts @@ -0,0 +1,24 @@ + +export * from '@editor/library-type/packages/builder/@types/protect'; +import { IInternalBuildOptions, IPolyFills } from '@editor/library-type/packages/builder/@types/protect'; + +export type IOrientation = 'landscape' | 'portrait'; + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'ios-app-clip': IOptions; + }; +} + +export interface IOptions { + orientation: { + landscapeRight: boolean; + landscapeLeft: boolean; + portrait: boolean; + upsideDown: boolean; + }; + polyfills?: IPolyFills; + mainPackagePath: string; + embedXcodeprojTarget?: string; + remoteServerAddress: string; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ios/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ios/@types/index.d.ts new file mode 100644 index 00000000..4333251b --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ios/@types/index.d.ts @@ -0,0 +1,39 @@ + +export * from '@editor/library-type/packages/builder/@types/protect'; +import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; + +export type IOrientation = 'landscape' | 'portrait'; + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'ios': IOptions; + native: { + JobSystem: 'none' | 'tbb' | 'taskFlow'; + }; + } +} + +export interface IBuildResult extends InternalBuildResult { + userFrameWorks: boolean; // 是否使用用户的配置数据 +} + +export interface IOptions { + packageName: string; + orientation: { + landscapeRight: boolean; + landscapeLeft: boolean; + portrait: boolean; + upsideDown: boolean; + }, + skipUpdateXcodeProject: boolean; + renderBackEnd: { + metal: boolean; + gles3: boolean; + gles2: boolean; + }, + osTarget: { + iphoneos: boolean, + simulator: boolean, + }, + developerTeam?: string, +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/link-sure/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/link-sure/@types/index.d.ts new file mode 100644 index 00000000..a811c8fd --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/link-sure/@types/index.d.ts @@ -0,0 +1,30 @@ +/// <reference path="../../../@types/index.d.ts"/> +/// <reference path="@editor/library-type/packages/builder/@types/protect/global.d.ts"/> + +export * from "@editor/library-type/packages/builder/@types/protect"; +import { IInternalBuildOptions } from "@editor/library-type/packages/builder/@types/protect"; + +export type IOrientation = 'landscape' | 'portrait'; + +export interface PlatformSettings { + runtimeVersion: string, + deviceOrientation: IOrientation, + statusbarDisplay: boolean, + startSceneAssetBundle: false, + resourceURL: string, + workerPath: string, + XHRTimeout: number, + WSTimeout: number, + uploadFileTimeout: number, + downloadFileTimeout: number, + cameraPermissionHint: string, + userInfoPermissionHint: string, + locationPermissionHint: string, + albumPermissionHint: string +} + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + "link-sure": PlatformSettings + } +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/linux/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/linux/@types/index.d.ts new file mode 100644 index 00000000..d4059010 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/linux/@types/index.d.ts @@ -0,0 +1,3 @@ +/// <reference path="../../../@types/index.d.ts"/> + +export * from "@editor/library-type/packages/builder/@types/protect"; diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/mac/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/mac/@types/index.d.ts new file mode 100644 index 00000000..16bc8565 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/mac/@types/index.d.ts @@ -0,0 +1,26 @@ + +export * from '@editor/library-type/packages/builder/@types/protect'; +import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; + +export type IOrientation = 'landscape' | 'portrait'; + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'mac': IOptions; + } +} + +export interface IOptions { + packageName: string; + renderBackEnd: { + metal: boolean; + gles3: boolean; + gles2: boolean; + }, + supportM1: boolean; + skipUpdateXcodeProject: boolean; +} + +export interface IBuildCache extends InternalBuildResult { + userFrameWorks: boolean; // 是否使用用户的配置数据 +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ohos/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ohos/@types/index.d.ts new file mode 100644 index 00000000..fbfc5ff3 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/ohos/@types/index.d.ts @@ -0,0 +1,36 @@ + + +import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; + +export * from '@editor/library-type/packages/builder/@types/protect'; +export type IOrientation = 'landscape' | 'portrait'; + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'ohos': IOptions; + } +} + +export interface IOptions { + packageName: string; + orientation: { + landscapeRight: boolean; + landscapeLeft: boolean; + portrait: boolean; + upsideDown: boolean; + }, + + apiLevel: string; + sdkPath: string; + ndkPath: string; + + renderBackEnd: { + // vulkan: boolean; + gles3: boolean; + // gles2: boolean; + } +} + +export interface IBuildResult extends InternalBuildResult { + userFrameWorks: boolean; // 是否使用用户的配置数据 +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/open-harmonyos/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/open-harmonyos/@types/index.d.ts new file mode 100644 index 00000000..21317968 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/open-harmonyos/@types/index.d.ts @@ -0,0 +1,38 @@ + + +/// <reference path="../../../@types/index.d.ts"/> +/// <reference path="@editor/library-type/packages/builder/@types/protect/global.d.ts"/> + +export * from "@editor/library-type/packages/builder/@types/protect"; +import { IInternalBuildOptions, InternalBuildResult } from "@editor/library-type/packages/builder/@types/protect"; +export type IOrientation = 'landscape' | 'portrait'; + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'open-harmonyos': IOptions; + } +} + +export interface IOptions { + packageName: string; + orientation: { + landscapeRight: boolean; + landscapeLeft: boolean; + portrait: boolean; + upsideDown: boolean; + }, + + apiLevel: string; + sdkPath: string; + ndkPath: string; + + renderBackEnd: { + // vulkan: boolean; + gles3: boolean; + // gles2: boolean; + } +} + +export interface IBuildResult extends InternalBuildResult { + userFrameWorks: boolean; // 是否使用用户的配置数据 +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/oppo-mini-game/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/oppo-mini-game/@types/index.d.ts new file mode 100644 index 00000000..69b6c852 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/oppo-mini-game/@types/index.d.ts @@ -0,0 +1,33 @@ +/// <reference path="../../../@types/editor/index.d.ts"/> +/// <reference path="@editor/library-type/packages/builder/@types/protect/global.d.ts"/> +export * from "@editor/library-type/packages/builder/@types/protect"; +import { IInternalBuildOptions } from "@editor/library-type/packages/builder/@types/protect"; + +export type IOrientation = 'landscape' | 'portrait'; +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'oppo-mini-game': IOptions; + }; +} + +export interface IOptions { + package: string; + icon: string; + versionName: string; + versionCode: string; + minPlatformVersion: string; + deviceOrientation: IOrientation; + tinyPackageServer: string; + useDebugKey: boolean; + privatePemPath: string; + certificatePemPath: string; + hasSubPackage?: boolean; + separateEngine: boolean; +} + +export interface ICompileOptions { + name: string; + tinyPackageServer: string; + useDebugKey: boolean; + hasSubPackage: boolean; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/package-asset/@types/public.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/package-asset/@types/public.d.ts new file mode 100644 index 00000000..8afa06d5 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/package-asset/@types/public.d.ts @@ -0,0 +1,60 @@ +export interface MenuAssetInfo { + // 资源名字 + name: string; + // 资源用于显示的名字 + displayName: string; + // loader 加载的层级地址 + url: string; + // 绝对路径 + file: string; + // 资源的唯一 ID + uuid: string; + // 使用的导入器名字 + importer: string; + // 类型 + type: string; + // 是否是文件夹 + isDirectory: boolean; + // 是否只读 + readonly: boolean; + // 虚拟资源可以实例化成实体的话,会带上这个扩展名 + instantiation?: string; + // 跳转指向资源 + redirect?: IRedirectInfo; + // 继承类型 + extends?: string[]; + // 是否导入完成 + imported: boolean; + // 是否导入失败 + invalid: boolean; +} + +export interface IRedirectInfo { + // 跳转资源的类型 + type: string; + // 跳转资源的 uuid + uuid: string; +} +export interface IAssetInfo { + name: string; // 资源名字 + displayName: string; // 资源用于显示的名字 + source: string; // url 地址 + path: string; // loader 加载的层级地址 + url: string; // loader 加载地址会去掉扩展名,这个参数不去掉 + file: string; // 绝对路径 + uuid: string; // 资源的唯一 ID + importer: string; // 使用的导入器名字 + imported: boolean; // 是否结束导入过程 + invalid: boolean; // 是否导入成功 + type: string; // 类型 + isDirectory: boolean; // 是否是文件夹 + library: { [key: string]: string }; // 导入资源的 map + subAssets: { [key: string]: IAssetInfo }; // 子资源 map + visible: boolean; // 是否显示 + readonly: boolean; // 是否只读 + + instantiation?: string; // 虚拟资源可以实例化成实体的话,会带上这个扩展名 + redirect?: IRedirectInfo; // 跳转指向资源 + meta?: any, + fatherInfo?: any; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/preview/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/preview/@types/index.d.ts new file mode 100644 index 00000000..fa8cee5d --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/preview/@types/index.d.ts @@ -0,0 +1 @@ +export * from './protect/'; diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/programming/@types/message.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/programming/@types/message.d.ts new file mode 100644 index 00000000..7f4b1831 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/programming/@types/message.d.ts @@ -0,0 +1,19 @@ +export interface message extends EditorMessageMap { + 'query-shared-settings': { + params: [], + result: { + useDefineForClassFields: boolean; + allowDeclareFields: boolean; + loose: boolean; + guessCommonJsExports: boolean; + exportsConditions: string[]; + importMap?: { + json: { + imports?: Record<string, string>; + scopes?: Record<string, Record<string, string>>; + }; + url: string; + }; + } + }; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/qtt/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/qtt/@types/index.d.ts new file mode 100644 index 00000000..4522ea48 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/qtt/@types/index.d.ts @@ -0,0 +1,41 @@ +/// <reference path="../../../@types/editor/index.d.ts"/> +/// <reference path="@editor/library-type/packages/builder/@types/protect/global.d.ts"/> + +export * from "@editor/library-type/packages/builder/@types/protect"; +import { IInternalBuildOptions } from "@editor/library-type/packages/builder/@types/protect"; + +export type IOrientation = 'landscape' | 'portrait'; + +export interface PlatformSettings { + runtimeVersion: string, + deviceOrientation: IOrientation, + statusbarDisplay: boolean, + startSceneAssetBundle: false, + resourceURL: string, + workerPath: string, + XHRTimeout: number, + WSTimeout: number, + uploadFileTimeout: number, + downloadFileTimeout: number, + cameraPermissionHint: string, + userInfoPermissionHint: string, + locationPermissionHint: string, + albumPermissionHint: string, + + package: string; + icon: string; + versionName: string; + versionCode: string; + + //校验数据 + packageValidity: string, + iconValidity: string; + versionNameValidity: string; + versionCodeValidity: string; +} + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + "qtt": PlatformSettings + } +} \ No newline at end of file diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/engine-view.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/engine-view.d.ts new file mode 100644 index 00000000..ceeb0e9a --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/engine-view.d.ts @@ -0,0 +1,73 @@ +import type { WebviewTag } from "electron"; +import ISceneFacade from './scene-facade-interface'; +/** + * 这个是 engine-view 标签的接口 + */ +export interface EngineView { + dirty: boolean; + managerReady: boolean; + + $scene: WebviewTag; + depend: any; + $floatWindow: any; + + // 封装的 webview 通讯模块 + ipc: any; + + info: any; + + + /** + * 初始化 + */ + init(): Promise<any>; + + /** + * 调用场景进程里的方法 + * @param methodName + * @param params + * @param forced + * @param timeout + */ + + callSceneMethod<T extends keyof ISceneFacade>(methodName: T, params: Parameters<ISceneFacade[T]>, forced?: boolean, timeout?: boolean): Promise<ReturnType<typeof ISceneFacade[T]>> + + /** + * 执行组件方法 + * @param options + */ + executeComponentMethod(options: { uuid: string, index: number, methodNames: string[] }); + + ////////////// + + attachFloatWindow(name: string, options: FloatWindowOptions) + + detachFloatWindow(name: string) + + attachToolbar(name: string, options: any) + + detachToolbar(name: string) + + attachInfobar(name: string, options: any) + + detachInfobar(name: string) +} +export interface FloatWindowOptions { + type: string; + width: number; + height: number; + top?: number; + bottom?: number; + left?: number; + right?: number; + + dock?: boolean; + + mode?: 'dock' | 'simple'; + + template: string; + ready?: ($window: HTMLDivElement, info: ScenePluginInfo, componentMap: { [type: string]: ScenePluginComponentInfo[] }) => void; + close?: Function; + update?: Function; + send?: Function; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/message.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/message.d.ts new file mode 100644 index 00000000..680c54f4 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/message.d.ts @@ -0,0 +1,68 @@ +import { + SetPropertyOptions, +} from './public'; + +export interface message extends EditorMessageMap { + 'update-create-node-template': { + params: [], + result: any, + }, + 'open': { + params: [], + result: any, + }, + 'open-devtools': { + params: [], + result: any, + }, + 'graphical-tools': { + params: [ + boolean, + ], + result: void, + }, + 'open-scene': { + params: [ + string, + ], + result: boolean, + }, + 'save-scene': { + params: [] | [ + boolean, + ], + result: boolean, + }, + 'save-as-scene': { + params: [ + boolean, + ], + result: boolean, + }, + 'close-scene': { + params: [], + result: boolean, + }, + 'set-property': { + params: [ + SetPropertyOptions, + ], + result: boolean, + }, + 'query-node-tree': { + params: [] | [ + string, + ], + result: any, + }, + 'execute-scene-script': { + params: [] | [ + { + name: string; + method: string; + args: any[]; + } + ], + result: any, + }, +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/public.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/public.d.ts new file mode 100644 index 00000000..76133126 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/public.d.ts @@ -0,0 +1,408 @@ +// ---- 一些 engine 基础数据 ---- start +interface Vec2 { + x: number; + y: number; +} + +export interface Vec3 { + x: number; + y: number; + z: number; +} + +interface Vec4 { + x: number; + y: number; + z: number; + w: number; +} + +interface Quat { + x: number; + y: number; + z: number; + w: number; +} + +interface Color3 { + r: number; + g: number; + b: number; +} + +interface Color4 { + r: number; + g: number; + b: number; + a: number; +} + +interface Mat3 { + m00: number; + m01: number; + m02: number; + + m03: number; + m04: number; + m05: number; + + m06: number; + m07: number; + m08: number; +} + +interface Mat4 { + m00: number; + m01: number; + m02: number; + m03: number; + + m04: number; + m05: number; + m06: number; + m07: number; + + m08: number; + m09: number; + m10: number; + m11: number; + + m12: number; + m13: number; + m14: number; + m15: number; +} +// ---- 一些 engine 基础数据 ---- end + +// ---- 操作消息的参数定义 --- strart + +// set-property 消息的 options 定义 +export interface SetPropertyOptions { + uuid: string; // 修改属性的对象的 uuid + path: string; // 属性挂载对象的搜索路径 + // key: string; // 属性的 key + dump: IProperty; // 属性 dump 出来的数据 +} + +// move-array-element 消息的 options 定义 +export interface MoveArrayOptions { + uuid: string; + path: string; + target: number; + offset: number; +} + +// remove-array-element 消息的 options 定义 +export interface RemoveArrayOptions { + uuid: string; + path: string; + index: number; +} + +export interface PasteNodeOptions { + target: string; // 目标节点 + uuids: string | string[]; // 被复制的节点 uuids + keepWorldTransform?: boolean; // 是否保持新节点的世界坐标不变 +} + +export interface CutNodeOptions { + parent: string; // 父节点 + uuids: string | string[]; // 被移入的节点 uuids + keepWorldTransform?: boolean; // 是否保持新节点的世界坐标不变 +} + +// create-node 消息的 options 定义 +export interface CreateNodeOptions { + parent?: string; + components?: string[]; + + name?: string; + dump?: INode | IScene; // node 初始化应用的数据 + keepWorldTransform?: boolean; // 是否保持新节点的世界坐标不变 + type?: string; // 资源类型 + assetUuid?: string; // asset uuid , type value 格式保持兼容拖动的数据格式,有资源 id,则从资源内创建对应的节点 + canvasRequired?: boolean; // 是否需要有 Canvas + unlinkPrefab?: boolean; // 创建后取消 prefab 状态 + position?: Vec3; // 指定生成的位置 +} + +export interface ResetNodeOptions { + uuid: string | string[]; +} + +export interface RemoveNodeOptions { + uuid: string | string[]; + keepWorldTransform?: boolean; +} + +export interface CreateComponentOptions { + uuid: string; + component: string; +} + +export interface ResetComponentOptions { + uuid: string; +} + +export interface RemoveComponentOptions { + uuid: string; + component: string; +} + +export interface ExecuteComponentMethodOptions { + uuid: string; + name: string; + args: any[]; +} + +export interface IAnimOperation { + funcName: string; + args: any[]; +} + +export interface ExecuteSceneScriptMethodOptions { + name: string; + method: string; + args: any[]; +} + +export type IPropertyValueType = IProperty | IProperty[] | null | undefined | number | boolean | string | Vec3 | Vec2; + +export interface IPropertyGroupOptions { + id: string // 默认 'default' + name: string, + displayOrder: number, // 默认 Infinity, 排在最后面 + style: string // 默认为 'tab' +} + +export interface IProperty { + value: { [key: string]: IPropertyValueType } | IPropertyValueType; + default?: any; // 默认值 + + // 多选节点之后,这里存储多个数据,用于自行判断多选后的显示效果,无需更新该数据 + values?: ({ [key: string]: IPropertyValueType } | IPropertyValueType)[]; + + cid?: string; + type?: string; + readonly?: boolean; + visible?: boolean; + name?: string; + + elementTypeData?: IProperty; // 数组里的数据的默认值 dump + + path?: string; // 数据的搜索路径,这个是由使用方填充的 + + isArray?: boolean; + invalid?: boolean; + extends?: string[]; // 继承链 + displayName?: string; // 显示到界面上的名字 + displayOrder?: number; // 显示排序 + group?: IPropertyGroupOptions; // tab + tooltip?: string; // 提示文本 + editor?: any; // 组件上定义的编辑器数据 + animatable?: boolean; // 是否可以在动画中编辑 + + // Enum + enumList?: any[]; // enum 类型的 list 选项数组 + + bitmaskList?: any[]; + + // Number + min?: number; // 数值类型的最小值 + max?: number; // 数值类型的最大值 + step?: number; // 数值类型的步进值 + slide?: boolean; // 数组是否显示为滑块 + unit?: string; // 显示的单位 + radian?: boolean; // 标识是否为角度 + + // Label + multiline?: boolean; // 字符串是否允许换行 + // nullable?: boolean; 属性是否允许为空 +} + +export interface IRemovedComponentInfo { + name: string; + fileID: string; +} + +export interface INode { + active: IProperty; + locked: IProperty; + name: IProperty; + position: IProperty; + + /** + * 此为 dump 数据,非 node.rotation + * 实际指向 node.eulerAngles + * rotation 为了给用户更友好的文案 + */ + rotation: IProperty; + + scale: IProperty; + layer: IProperty; + uuid: IProperty; + + children: any[]; + parent: any; + + __comps__: IProperty[]; + __type__: string; + __prefab__?: any; + _prefabInstance?: any; + removedComponents?: IRemovedComponentInfo[]; + mountedRoot?: string; +} + +export interface IComponent extends IProperty { + value: { + enabled: IPropertyValueType; + uuid: IPropertyValueType; + name: IPropertyValueType; + } & Record<string, IPropertyValueType>; + mountedRoot?: string; +} + +export interface IScene { + name: IProperty; + active: IProperty; + locked: IProperty; + _globals: any; + isScene: boolean; + autoReleaseAssets: IProperty; + + uuid: IProperty; + children: any[]; + parent: any; + __type__: string; + targetOverrides?: any; +} + +export interface ITargetOverrideInfo { + source: string; + sourceInfo?: string[]; + propertyPath: string[]; + target: string; + targetInfo?: string[]; +} +// ---- 操作消息的参数定义 --- end + +// ---- 场景插件返回的 info 信息 ---- start +interface ScenePluginNodeInfo { + uuid: string; + components: ScenePluginComponentInfo[]; +} + +// 场景插件传回的场景信息 +export interface ScenePluginInfo { + // 选中节点列表 + nodes: ScenePluginNodeInfo[]; + + // gizmo 的一些信息 + gizmo: { + is2D: boolean; + }; + // 当前编辑模式数组 + modes: string[]; +} + +// 场景插件传回的组件信息 +export interface ScenePluginComponentInfo { + uuid: string; + enabled: boolean; + type: string; +} + +export interface QueryClassesOptions { + extends?: string | string[]; + excludeSelf?: boolean; +} + +// ---- 场景插件返回的 info 信息 ---- end + +// ---- 动画数据 ---- start + +export interface IKeyDumpData { + frame: number; + dump: any; // value的dump数据 + inTangent?: number; + inTangentWeight?: number; + outTangent?: number; + outTangentWeight?: number; + interpMode?: number; + broken?: boolean; + tangentWeightMode?: number; + imgUrl?: string; + easingMethod?: number; +} + +export interface IDumpType { + value: string; + extends?: string[]; +} + +export interface IPropCurveDumpData { + nodePath: string; + // 原始的 keyframe 数据 + keyframes: IKeyDumpData[]; + displayName: string; + key: string; + type?: IDumpType; + preExtrap: number; + postExtrap: number; + isCurveSupport: boolean; // 是否支持贝塞尔曲线编辑 +} + +export interface IAnimCopyKeySrcInfo { + curvesDump: IPropCurveDumpData[]; +} + +export interface IAnimCopyNodeSrcInfo { + curvesDump: IPropCurveDumpData[]; +} + +export interface IAnimCopyNodeDstInfo { + nodePath: string; +} + +interface IEventDump { + frame: number; + func: string; + params: string[]; +} + +export interface IAnimCopyEventSrcInfo { + eventsDump: IEventDump[]; +} + +export interface IAnimCopyPropSrcInfo { + curvesDump: IPropCurveDumpData[]; +} + +export interface IAnimCopyPropDstInfo { + nodePath: string; + propKeys?: string[]; +} + +export interface IAnimCopyKeyDstInfo { + nodePath: string; + propKeys?: string[]; + startFrame: number; +} + +export interface IAnimCopyEventDstInfo { + startFrame: number; +} +// ---- 动画数据 ---- end + +// ---- Contributions ---- start + +export interface ContributionDropItem { + type: string; + message: string; +} + +// ---- Contributions ---- end + +export interface UnitTestInfo { + name: string; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/scene-facade-interface.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/scene-facade-interface.d.ts new file mode 100644 index 00000000..f6732247 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/scene/@types/scene-facade-interface.d.ts @@ -0,0 +1,827 @@ +import { + SetPropertyOptions, + MoveArrayOptions, + RemoveArrayOptions, + CutNodeOptions, + PasteNodeOptions, + CreateNodeOptions, + RemoveNodeOptions, + CreateComponentOptions, + RemoveComponentOptions, + ExecuteComponentMethodOptions, + IAnimOperation, + ExecuteSceneScriptMethodOptions, + QueryClassesOptions, +} from './public'; + +import { Node, Vec3, Quat } from 'cc'; +import type ParticleManager from '../source/script/3d/manager/particle'; +import { ISceneEvents } from '../source/script/3d/manager/scene-events-interface'; + +interface ISceneFacade extends ISceneEvents { + init(): void; + + ////////// + // node // + ////////// + + /** + * 打开某个场景 + * @param uuid 场景uuid + */ + openScene(uuid: string): Promise<boolean>; + + /** + * 保存当前场景 + */ + saveScene(asNew: boolean): Promise<boolean>; + + closeScene(): Promise<boolean>; + + /** + * 软刷新场景 + */ + softReloadScene(json: any): Promise<boolean>; + + reloadScene(): Promise<boolean>; + + /** + * 查询当前场景的节点树信息 + * @param uuid 节点的唯一标识符 + */ + queryNodeTree(uuid: string): Promise<any>; + + /** + * 查询使用了资源 UUID 的节点 + * @param uuid 资源 asset uuid + */ + queryNodesByAssetUuid(uuid: string): Promise<any>; + + /** + * 查询当前场景的序列化数据 + */ + querySceneSerializedData(): Promise<any>; + + /** + * 查询当前场景是否被修改 + */ + querySceneDirty(): Promise<any>; + + /** + * 查询引擎内所有的类 + */ + queryClasses(options?: QueryClassesOptions): Promise<any>; + + /** + * 查询引擎内所有的组件列表 + */ + queryComponents(): Promise<any>; + + /** + * 查询引擎组件列表是否含有指定类名的脚本 + * @param name 查询脚本的名字 + */ + queryComponentHasScript(name: string): Promise<boolean>; + + /** + * 查询引擎内 Layer 的内置项 + */ + queryLayerBuiltin(): Promise<any>; + + /** + * 查询当前场景的编辑模式 + */ + queryMode(): string; + + /** + * 查询当前场景资源的 uuid + */ + queryCurrentSceneUuid(): string; + + ////////// + // node // + ////////// + + /** + * 查询一个节点的 dump 数据 + * @param uuid 节点的唯一标识符 + */ + queryNodeDump(uuid: string): Promise<any>; + + /** + * 查询一个节点内挂载的所有组件以及对应的函数 + * @param uuid 节点的唯一标识符 + */ + queryComponentFunctionOfNode(uuid: string): Promise<any>; + + /** + * 设置某个元素内的属性 + * @param options + */ + setNodeProperty(options: SetPropertyOptions): Promise<boolean>; + + /** + * 设置某个元素内的某个属性的默认值 + * @param options + */ + resetNodeProperty(options: SetPropertyOptions): Promise<boolean>; + + /** + * 将一个属性从 null 值变为可编辑的值 + * @param options + */ + updateNodePropertyFromNull(options: SetPropertyOptions): Promise<boolean>; + + /** + * 设置某个节点连同它的子集的 layer 属性值 + * @param options + */ + setNodeAndChildrenLayer(options: SetPropertyOptions): void; + + /** + * 移动数组类型 property 内的某个 item 的位置 + * @param options + */ + moveNodeArrayElement(options: MoveArrayOptions): void; + + /** + * 删除数组类型 property 内的某个 item 的位置 + * @param options + */ + removeNodeArrayElement(options: RemoveArrayOptions): Promise<boolean>; + + /** + * 实时获取新节点在一个父节点下的有效名称 + * 规则是 Node 同名时为 Node-001 + * @param name 名称 + * @param parentUuid 父节点 uuid + */ + generateNodeAvailableName(name: string, parentUuid: string): Promise<string>; + + /** + * 暂存一个节点的实例化对象 + * 一般用在复制节点的动作,给下一步粘贴(创建)节点准备数据 + * @param uuids 节点uuid + */ + copyNode(uuids: string | string[]): string[]; + + /** + * 复制节点自身 + * ctrl + d + * @param uuids 节点uuid + */ + duplicateNode(uuids: string | string[]): string[]; + + /** + * 粘贴节点 + * @param options 参数 + */ + pasteNode(options: PasteNodeOptions): Promise<string[]>; + + /** + * 挂载节点 + * @param options 参数 + */ + setNodeParent(options: CutNodeOptions): Promise<string[]>; + + /** + * 创建一个新的节点 + * @param options 参数 + */ + createNode(options: CreateNodeOptions): Promise<any>; + + /** + * 重置节点属性 position rotation scale + * @param options 参数 + */ + resetNode(uuid: string): Promise<any>; + + /** + * 删除一个节点 + * @param options 参数 + */ + removeNode(options: RemoveNodeOptions): void; + + /** + * 锁定一个节点不让其在场景中被选中 + * @param uuids 节点uuid + * @param locked true | false + * @param loop true | false 是否循环子孙级节点设置 + */ + changeNodeLock(uuids: string | string[], locked: Boolean, loop: Boolean): void; + + /** + * 从资源数据还原一个 prefab 节点 + * @param uuid 节点uuid + * @param assetUuid 资源uuid + */ + restorePrefab(uuid: string, assetUuid: string): Promise<boolean>; + + /////////////// + // component // + /////////////// + + /** + * 查询一个组件的 dump 数据 + * @param uuid 节点的唯一标识符 + */ + queryComponent(uuid: string): Promise<boolean>; + + /** + * 在某个节点上创建一个组件 + * @param options 参数 + */ + createComponent(options: CreateComponentOptions): void; + + /** + * 重置组件 + * @param uuid 组件 + */ + resetComponent(uuid: string): void; + + /** + * 删除某个节点上的某个组件 + * @param options 参数 + */ + removeComponent(options: RemoveComponentOptions): void; + + /** + * 执行 entity 上指定组件的方法 + * @param options 参数 + */ + executeComponentMethod(options: ExecuteComponentMethodOptions): Promise<boolean>; + + /** + * 执行插件注册的场景脚本方法 + * @param name 插件名字 + * @param method 方法名字 + * @param args 传入的参数 + */ + executeSceneScriptMethod(options: ExecuteSceneScriptMethodOptions): Promise<any>; + + /////////////// + // undo/redo // + /////////////// + + /** + * 保存一次操作记录 + */ + snapshot(command?: any): void; + + /** + * 放弃当前步骤的所有变动记录 + */ + abortSnapshot(): void; + + /** + * 撤销一次操作记录 + */ + undo(): void; + + /** + * 重做一次操作记录 + */ + redo(): void; + + /** + * 记录变动的节点 + * @param node + * @param enable enable = false 是内部 undo redo 产生的变化, 不参与重新记录 + */ + recordNode(node: Node, enable: boolean): void; + + /////////// + // asset // + /////////// + + /** + * 查询所有内置 Effects + */ + queryAllEffects(): Promise<any>; + + /** + * 查询一个 material 的 dump 数据 + * @param uuid material 的唯一标识符 + */ + queryMaterial(uuid: string): Promise<any>; + + /** + * 根据 effecName 构建指定 Effect 的 props 和 defines 属性 + * @param effectName effect 的名字 + */ + queryEffect(effectName: string): Promise<any>; + + /** + * 查询所有 RenderPipelines + */ + queryAllRenderPipelines(): Promise<any>; + + /** + * 同步预览 RenderPipelines + */ + previewRenderPipeline(uuid: string, data: any): Promise<any>; + + /** + * 查询当个 RenderPipeline + * @param uuid 查询的资源的唯一标识符 + */ + queryRenderPipeline(uuid: string): Promise<any>; + + /** + * 查询所有 RenderFlows + */ + queryAllRenderFlows(): Promise<any>; + + /** + * 查询所有 RenderStages + */ + queryAllRenderStages(): Promise<any>; + + /** + * 材质,实时预览 material 数据 + * @param uuid 材质uuid + * @param material 材质数据 + */ + previewMaterial(uuid: string, material: any): void; + + /** + * 应用材质 + * @param uuid 材质uuid + * @param materialDump 材质dump数据 + */ + applyMaterial(uuid: string, materialDump: any): void; + + /** + * 修改 physics-material + * @param dump dump数据 + */ + changePhysicsMaterial(dump: any): Promise<any>; + + /** + * 保存 physics-material + * @param uuid uuid + */ + applyPhysicsMaterial(uuid: string): void; + + /** + * 修改 animation-mask + * @param dump dump数据 + */ + changeAnimationMask(dump: any): Promise<any>; + + /** + * 保存 animation-mask + * @param uuid uuid + */ + applyAnimationMask(uuid: string): void; + + /** + * 修改 render-stage + * @param dump dump数据 + */ + changeRenderStage(dump: any): Promise<any>; + + /** + * 保存 render-stage + * @param uuid uuid + */ + applyRenderStage(uuid: string): void; + + /** + * 修改 render-flow + * @param dump dump数据 + */ + changeRenderFlow(dump: any): Promise<any>; + + /** + * 保存 render-flow + * @param uuid uuid + */ + applyRenderFlow(uuid: string): void; + + /** + * 保存 render-texture + * @param uuid uuid + * @param dump dump数据 + */ + applyRenderTexture(uuid: string, dump: any): void; + + /** + * 选择一个 RenderPipeline + * @param name 名字 + */ + selectRenderPipeline(name: string): Promise<any>; + + /** + * 修改了 RenderPipeline 数据 + * @param dump 数据 + */ + changeRenderPipeline(dump: any): Promise<any>; + + /** + * 应用 RenderPipeline 数据 + * @param uuid pipeline uuid + * @param renderPipelineDump RenderPipeline的dump数据 + */ + applyRenderPipeline(uuid: string, renderPipelineDump: any): void; + + /** + * 选择一个 RenderFlow 类型 + * @param name 名字 + * @param index 索引 + */ + selectRenderFlow(name: string, index: number): Promise<any>; + + /** + * 选择一个 RenderStage 类型 + * @param name 名字 + * @param flowIndex 索引 + * @param stageIndex 索引 + */ + selectRenderStage(name: string, flowIndex: number, stageIndex: number): Promise<any>; + + /** + * 查询一个 physics-material 的 dump 数据 + * @param uuid 资源的唯一标识符 + */ + queryPhysicsMaterial(uuid: string): any; + + /** + * 查询一个 animation-mask 的 dump 数据 + * @param uuid 资源的唯一标识符 + */ + queryAnimationMask(uuid: string): any; + + /** + * 查询一个 render-stage 的 dump 数据 + * @param uuid 资源的唯一标识符 + */ + queryRenderStage(uuid: string): any; + + /** + * 查询一个 render-flow 的 dump 数据 + * @param uuid 资源的唯一标识符 + */ + queryRenderFlow(uuid: string): any; + + /** + * 查询可以被创建为节点的所有资源类型 + */ + queryCreatableAssetTypes(): any; + + assetChange(uuid: string, info?: any, meta?: any): Promise<void>; + + assetDelete(uuid: string, info?: any): void; + + /** + * 一个资源更新到场景的引用中后发出此消息 + * @param uuid 资源uuid + */ + assetRefresh(uuid: string): void; + + /////////// + // gizmo // + /////////// + + /** + * 查询当前 gizmo 工具的名字 + */ + queryGizmoToolName(): Promise<string>; + + /** + * 查询 gizmo 中心点类型 + */ + queryGizmoPivot(): Promise<string>; + + /** + * 查询 gizmo 坐标类型 + */ + queryGizmoCoordinate(): Promise<string>; + + /** + * 查询 是否处于2D编辑模式 + */ + queryIs2D(): Promise<boolean>; + + /** + * 查询icon gizmo是否为3D + */ + queryIsIconGizmo3D(): boolean; + + /** + * 获取icon gizmo的大小 + */ + queryIconGizmoSize(): number; + + /** + * 改变Gizmo的操作工具 + * @param name 变换工具名字 + */ + setTransformToolName(name: string): void; + + /** + * 改变基准中心 + * @param name 中心位置名 + */ + setPivot(name: string): void; + + /** + * 设置使用全局或局部坐标系 + * @param type 坐标系类型 + */ + setCoordinate(type: string): void; + + /** + * 是否进入2D编辑模式 + * @param value 是否使用2D + */ + setIs2D(value: boolean): void; + + /** + * 设置icon gizmo是否为3D + * @param is3D 是否为3D icon + */ + setIconGizmo3D(is3D: boolean): void; + + /** + * 设置icon gizmo的大小 + * + * @param size icon大小 + */ + setIconGizmoSize(size: number): void; + + //////////// + // camera // + //////////// + /** + * 聚焦于某个节点 + * @param uuid 节点uuid + */ + focus(uuid: string[] | null, position?: Vec3, rotation?: Quat, viewCenter?: Vec3, immediate?: boolean): void; + + /** + * 将编辑相机数据拷贝到节点上 + * @param uuids 节点数组 + */ + alignNodeToSceneView(uuids: string[]): void; + + /** + * 查询grid是否可见 + */ + queryIsGridVisible(): boolean; + /** + * 设置grid是否可见 + * @param visible 是否可见 + */ + setGridVisible(visible: boolean): void; + + /** + * 将选中的节点与场景相机对齐 + */ + alignWithView(): void; + + /** + * 将场景相机与选中的节点对齐 + */ + alignViewWithNode(): void; + /** + * 设置网格线的颜色 + * @param color 网格线的颜色[255,255,255,255] + */ + setGridLineColor(color: number[]): void; + + getCameraProperty(): any; + setCameraProperty(opts: any): void; + getCameraWheelSpeed(): number; + setCameraWheelSpeed(speed: number): void; + getCameraWanderSpeed(): number; + setCameraWanderSpeed(speed: number): void; + zoomSceneViewUp(): void; + zoomSceneViewDown(): void; + resetSceneViewZoom(): void; + + /////////////// + // animation // + /////////////// + + /** + * 查询当前动画的播放状态 + */ + queryCurrentAnimationState(): any; + + /** + * 查询当前动画的播放状态 + */ + queryCurrentAnimationInfo(): any; + + /** + * 传入一个节点,查询这个节点所在的动画节点的 uuid + * @param uuid 查询的节点的 uuid + */ + queryAnimationRootNode(uuid: string): string; + + /** + * 查询动画根节点的动画数据信息 + * @param uuid 查询的节点的 uuid + */ + queryAnimationRootInfo(uuid: string): any; + + /** + * 查询一个 clip 的 dump 数据 + * @param nodeUuid 节点的唯一标识符 + * @param clipUuid 动画的唯一标识符 + */ + queryAnimationClip(nodeUuid: string, clipUuid: string): any; + + /** + * 查询一个节点上,可以编辑的动画属性数组 + * @param uuid 动画的 uuid + */ + queryAnimationProperties(uuid: string): any; + + /** + * 查询一个节点上的所有动画 clips 信息 + * @param nodeUuid 节点的唯一标识符 + */ + queryAnimationClipsInfo(nodeUuid: string): any; + + /** + * 查询动画当前的播放时间信息 + * @param clipUuid 动画资源的唯一标识符 + */ + queryAnimationClipCurrentTime(clipUuid: string): number; + + /** + * 查询动画当前轨道的某一帧的数值 + * @param clipUuid 动画 uuid + * @param nodePath 查询数据所在的节点搜索路径 + * @param propKey 属性名字 + * @param frame 关键帧数 + */ + queryAnimationPropValueAtFrame(clipUuid: string, nodePath: string, propKey: string, frame: number): any; + + /** + * 更改当前动画编辑模式 + * @param uuid uuid + * @param active 激活或关闭 + */ + recordAnimation(uuid: string, active: boolean): Promise<boolean>; + + /** + * 切换动画根节点 + * @param uuid uuid + * @param clipUuid uuid of clip + */ + changeAnimationRootNode(uuid: string, clipUuid: string): Promise<boolean>; + + /** + * 更改当前当前关键帧 + * @param time 时间 + */ + setCurEditTime(time: number): Promise<boolean>; + + /** + * 更改当前正在编辑的动画的播放状态 + * @param operate 操作 + * @param clipUuid uuid of clip + */ + changeClipState(operate: string, clipUuid: string): Promise<boolean>; + + /** + * 更改当前正在编辑的动画 uuid + * @param clipUuid uuid of clip + */ + setEditClip(clipUuid: string): Promise<boolean>; + + /** + * 保存动画数据 + */ + saveClip(): Promise<boolean>; + + /** + * 动画操作 + * + * @param operationList 操作方法数组 + */ + applyAnimationOperation(operationList: IAnimOperation[]): Promise<boolean>; + + ///////////// + // preview // + ///////////// + queryPreviewWindowList(): any; + + //////////// + // script // + //////////// + queryScriptName(uuid: string): Promise<any>; + loadScript(uuid: string): Promise<void>; + removeScript(info: any): Promise<void>; + scriptChange(info: any): Promise<void>; + + /////////////// + // selection // + /////////////// + _selectNode(uuid: string): void; + _unselectNode(uuid: string): void; + querySelection(): string[]; + isSelectNode(uuid: string): boolean; + selectNode(uuid: string): void; + unselectNode(uuid: string): void; + clearSelection(): void; + + //////////// + // effect // + //////////// + registerEffects(uuids: string[]): void; + removeEffects(uuids: string[]): void; + updateEffect(uuid: string): void; + + ///////////// + // terrain // + ///////////// + onRemoveTerrain(uuid: string, info: any): void; + + ///////////// + // prefab // + ///////////// + createPrefab(uuid: string, url: string): any; + getPrefabData(uuid: string): any; + linkPrefab(nodeUuid: string, assetUuid: string): any; + unlinkPrefab(nodeUuid: string, removeNested: boolean): any; + applyPrefab(nodeUuid: string): any; + + ////////// + // UI // + ////////// + distributeSelectionUI(type: string): void; + alignSelectionUI(type: string): void; + + //////////////// + // particle // + //////////////// + /** + * 查询粒子播放的信息 + * @param uuid 粒子组件的 uuid + */ + queryParticlePlayInfo(uuid: string): any; + /** + * 设置粒子播放速度 + * @param uuid 粒子组件的 uuid + * @param speed + */ + setParticlePlaySpeed(uuid: string, speed: number): void; + /** + * 播放选中的粒子 + * @param uuid 粒子组件的 uuid + */ + playParticle(); + /** + * 重新开始播放选中的粒子 + * @param uuid 粒子组件的 uuid + */ + restartParticle(); + /** + * 暂停选中的粒子 + * @param uuid 粒子组件的 uuid + */ + pauseParticle(); + /** + * 停止播放选中的粒子 + * @param uuid 粒子组件的 uuid + */ + stopParticle(); + ///////////////// + // wireframe // + ///////////////// + // applyWireframeStorage(mode: any, color: any): void; + // setWireframeMode(mode: any): void; + // setWireframeColor(color: any): void; + + //////////////// + // game view // + //////////////// + changeGameMode(val: boolean): void; + pauseGameView(isPause: boolean): void; + stepGameView(): void; + platformGameView(val: string): void; + + /////////////////// + // physics // + /////////////////// + updatePhysicsGroup(): void; + + // others + onEngineUpdate(): void; + + /////////////////// + // physics 2D // + /////////////////// + regeneratePolygon2DPoints(uuid: string): void; + + /////////////////// + // particle 2D // + /////////////////// + exportParticlePlist(uuid: string): Promise<any>; +} + +export default ISceneFacade; diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/server/@types/package.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/server/@types/package.d.ts new file mode 100644 index 00000000..4a06db2a --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/server/@types/package.d.ts @@ -0,0 +1,27 @@ +// 消息定义 +interface MessageInterface { + params: any[], + result: any; +} + +// host +export interface HostInfo { + host: string; + ip: string; + port: number; +} + +// 消息定义 +export interface main { + scene: { + [x: string]: MessageInterface; + 'query-port': { + params: [], + result: number, + }; + 'scan-lan': { + params: [], + result: HostInfo[], + }; + } +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/shortcuts/@types/shortcut.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/shortcuts/@types/shortcut.d.ts new file mode 100644 index 00000000..ed042378 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/shortcuts/@types/shortcut.d.ts @@ -0,0 +1,19 @@ +export interface ShortcutItem { + when: string; + message: string; + shortcut: string; + pkgName: string; + rawShortcut?: string; + key: string; + missing?: boolean; +} + +export type IShortcutItemMap = Record<string, ShortcutItem>; + +export interface IShortcutEditInfo { + key: string; + shortcut: string; + searches: ShortcutItem[]; + conflict: boolean; + when: string; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/vivo-mini-game/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/vivo-mini-game/@types/index.d.ts new file mode 100644 index 00000000..5d561006 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/vivo-mini-game/@types/index.d.ts @@ -0,0 +1,33 @@ +/// <reference path="../../../@types/editor/index.d.ts"/> +/// <reference path="@editor/library-type/packages/builder/@types/protect/global.d.ts"/> +export * from "@editor/library-type/packages/builder/@types/protect"; +import { IInternalBuildOptions } from "@editor/library-type/packages/builder/@types/protect"; + +export type IOrientation = 'landscape' | 'portrait'; + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'vivo-mini-game': IOptions; + } +} + +export interface IOptions { + package: string; + icon: string; + versionName: string; + versionCode: string; + minPlatformVersion: string; + deviceOrientation: IOrientation; + tinyPackageServer: string; + useDebugKey: boolean; + privatePemPath: string; + certificatePemPath: string; + logLevel: string; + separateEngine: boolean; +} + +export interface ICompileOptions { + name: string; + tinyPackageServer: string; + useDebugKey: boolean; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/web-desktop/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/web-desktop/@types/index.d.ts new file mode 100644 index 00000000..cfd6ad4b --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/web-desktop/@types/index.d.ts @@ -0,0 +1,76 @@ + +export * from '@editor/library-type/packages/builder/@types/protect'; +import { appTemplateData, IInternalBuildOptions, IPolyFills } from '@editor/library-type/packages/builder/@types/protect'; + +export interface IOptions { + resolution: { + designHeight: number; + designWidth: number; + }, + polyfills?: IPolyFills; + remoteServerAddress?: string; +} +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'web-desktop': IOptions; + }; + appTemplateData: appTemplateData; +} + +export interface IBaseItem { + /** + * Display text. + */ + label: string; + + /** + * Description. + */ + description?: string; + + required?: boolean; + + native?: string; + + wechatPlugin?: boolean; +} + +export interface IModuleItem extends IBaseItem { + /** + * Display text. + */ + label: string; + + /** + * Description. + */ + description?: string; + + /** + * Whether if the feature of options allow multiple selection. + */ + multi?: boolean; + + /** + * If have default it will checked + */ + default?: string[]; + + options?: Record<string, IBaseItem>; + + category?: string; + + flags?: Record<string, IFlagBaseItem>; +} + +export interface IDisplayModuleItem extends IModuleItem { + _value: boolean; + _option?: string; + options?: Record<string, IDisplayModuleItem>; +} + +export interface IDisplayModuleCache { + _value: boolean; + _option?: string; + flags?: Record<string, boolean>; +} \ No newline at end of file diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/web-mobile/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/web-mobile/@types/index.d.ts new file mode 100644 index 00000000..3b3fbd6e --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/web-mobile/@types/index.d.ts @@ -0,0 +1,20 @@ +/// <reference path='../../../@types/index'/> +export * from '@editor/library-type/packages/builder/@types/protect'; + +import { IInternalBuildOptions, IPolyFills, ISettings } from '@editor/library-type/packages/builder/@types/protect'; + +export type IOrientation = 'auto' | 'landscape' | 'portrait'; +export interface IOptions { + orientation: IOrientation; + embedWebDebugger: boolean; + remoteServerAddress: string; + polyfills: any; +} +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'web-mobile': IOptions; + } +} +export interface IUserSettings extends ISettings { + orientation: IOrientation; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/wechatgame/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/wechatgame/@types/index.d.ts new file mode 100644 index 00000000..273c145e --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/wechatgame/@types/index.d.ts @@ -0,0 +1,81 @@ + +/// <reference path='../../../@types/index'/> +export * from '@editor/library-type/packages/builder/@types/protect'; + +import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect'; + +export type IOrientation = 'auto' | 'landscape' | 'portrait'; + +export interface IOptions { + appid: string; + remoteServerAddress: string; + buildOpenDataContextTemplate: boolean; + orientation: IOrientation; + separateEngine: boolean; + wasm: 'js' | 'wasm' | boolean; + enabelWebGL2: 'off' | 'sameAsProjectSetting'; +} + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + wechatgame: IOptions; + }; +} + +export interface IBaseItem { + /** + * Display text. + */ + label: string; + + /** + * Description. + */ + description?: string; + + required?: boolean; + + native?: string; + + wechatPlugin?: boolean; +} + +export interface IModuleItem extends IBaseItem { + /** + * Display text. + */ + label: string; + + /** + * Description. + */ + description?: string; + + /** + * Whether if the feature of options allow multiple selection. + */ + multi?: boolean; + + /** + * If have default it will checked + */ + default?: string[]; + + options?: Record<string, IBaseItem>; + + category?: string; + + flags?: Record<string, IFlagBaseItem>; +} + +export interface IDisplayModuleItem extends IModuleItem { + _value: boolean; + _option?: string; + options?: Record<string, IDisplayModuleItem>; +} + +export interface IDisplayModuleCache { + _value: boolean; + _option?: string; + flags?: Record<string, boolean>; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/windows/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/windows/@types/index.d.ts new file mode 100644 index 00000000..42905947 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/windows/@types/index.d.ts @@ -0,0 +1,24 @@ + +export * from '@editor/library-type/packages/builder/@types/protect'; +import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect'; + +export type IOrientation = 'landscape' | 'portrait'; + +export interface ITaskOption extends IInternalBuildOptions { + packages: { + 'windows': IOptions; + } +} + +export interface IOptions { + renderBackEnd: { + vulkan: boolean; + gles3: boolean; + gles2: boolean; + }; + serverMode: boolean; +} + +export interface IBuildResult extends InternalBuildResult { + userFrameWorks: boolean; // 是否使用用户的配置数据 +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/xiaomi-quick-game/@types/index.d.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/xiaomi-quick-game/@types/index.d.ts new file mode 100644 index 00000000..df93e813 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/@types/packages/xiaomi-quick-game/@types/index.d.ts @@ -0,0 +1,38 @@ + +export * from '@editor/library-type/packages/builder/@types/protect'; +import { IInternalBuildOptions, ISettings } from '@editor/library-type/packages/builder/@types/protect'; + +export type IOrientation = 'landscape' | 'portrait'; + +export interface ITaskOption extends IInternalBuildOptions { + packages:{ + 'xiaomi-quick-game': IOptions; + }; +} + +export interface IOptions { + package: string; + icon: string; + versionName: string; + versionCode: string; + minPlatformVersion: string; + deviceOrientation: IOrientation; + tinyPackageServer: string; + useDebugKey: boolean; + privatePemPath: string; + certificatePemPath: string; + logLevel: string; + + encapsulation: boolean; + makeAfterBuild: boolean; +} + +export interface ICompileOption { + name: string; + useDebugKey: boolean; + tinyPackageServer: string; +} + +export interface IUserSettings extends ISettings { + orientation: IOrientation; +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/LICENSE b/JisolGameCocos/extensions/oops-plugin-excel-to-json/LICENSE new file mode 100644 index 00000000..5c43ca56 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 dgflash + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/README.md b/JisolGameCocos/extensions/oops-plugin-excel-to-json/README.md new file mode 100644 index 00000000..0f35a0a6 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/README.md @@ -0,0 +1,22 @@ +### 游戏配置数据生成 + 数据对象代码生成器插件 +![Cocos Creator 3.x 配套游戏配置数据生成 + 数据对象代码生成器插件](https://img-blog.csdnimg.cn/0b3d49ff88ef46b0aad7e3835967c7ea.png) + +### Cocos Creator 3.x 配置Excel文件目录、配置Json数据输出目录、配置脚本输出目录 +![Cocos Creator 3.x 配置Excel文件目录、配置Json数据输出目录、配置脚本输出目录](https://img-blog.csdnimg.cn/8970f630863e44239c288c6ff8e44b32.png) + + +### Cocos Creator 3.x 扩展 -> Oops-Framework Excel To Json +![Cocos Creator 3.x 扩展 -> Oops-Framework Excel To Json](https://img-blog.csdnimg.cn/b5abda11872b4408a34801afb62024f1.png) + +### Cocos Creator 3.x 生成数据资源与脚本资源 +![Cocos Creator 3.x 生成数据资源与脚本资源,减少编码工作](https://img-blog.csdnimg.cn/52a312d076464e719bde2c3d48acfd49.png) + +工具指向策划配置表目录后,每次更新配置时,一键生成数据与静态配置表代码,在项目中后期平凡维护修改时,提高开发效率。 + +### Excel中数据规则 +- Excel中前五行为工具规则数据 +- 第一行为字段中文名 +- 第二行为字段英文名,会生成为json数据的字段名 +- 第三行为字段数据类型,只支持number、string类型,数组和对象类型可自行扩展 +- 第四行标记输出服务器数据时,是否存在这个字段"server"为显示字段,"server_no"为删除字段 +- 第五行标记输出客户端数据时,是否存在这个字段"client"为显示字段,"client_no"为删除字段 \ No newline at end of file diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/ExcelToJson.js b/JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/ExcelToJson.js new file mode 100644 index 00000000..55bac7ea --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/ExcelToJson.js @@ -0,0 +1,308 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.run = void 0; +const path_1 = __importDefault(require("path")); +const JsonToTs_1 = require("./JsonToTs"); +const main_1 = require("./main"); +const fs = require('fs'); +const excel = require('exceljs'); +/** + * Excel转Json数据 + * @param {*} src 读取的excel文件目录 + * @param {*} dst 导出的json文件目录 + * @param {*} name excel文件名 + * @param {*} isClient 是否为客户端数据 + */ +async function convert(src, dst, name, isClient) { + let r = {}; + let names = []; // 文名字段名 + let keys = []; // 字段名 + let types = []; // 通用字段数据类型 + let types_client = {}; // 客户端数据类型 + let primary = []; // 多主键配置 + // let primary_index: number[] = []; + const workbook = new excel.Workbook(); + // 读取excel + await workbook.xlsx.readFile(src); + const worksheet = workbook.getWorksheet(1); // 获取第一个worksheet + let rowNum = 0; + let rowStartIndex = 0; + worksheet.eachRow((row, rowNumber) => { + let data = {}; + // console.log(row.values); + if (rowNumber <= 3) { + for (let index = 0; index < row.values.length; index++) { + const value = row.values[index]; + if (value) { + // console.log(value); + if (rowNumber === 1) { + keys.push(value); // 字段英文名 + if (primary.length == 0) { + rowStartIndex = index; + primary.push(value); + } + } + else if (rowNumber === 2) { + types.push(value); // 通用字段数据类型 + } + else if (rowNumber === 3) { + names.push(value); // 字段中文名 + } + } + } + } + else { + if (rowNum == 0) { + rowNum = Math.min(keys.length, types.length, names.length); + } + for (let index = 0; index < rowNum; index++) { + const value = row.values[index + rowStartIndex]; + let type = types[index]; + let key = keys[index]; + switch (type) { + case "int": + case "long": + data[key] = value ? parseInt(value) : 0; + types_client[key] = { + en: "number", + zh: names[index] + }; + break; + case "float": + case "double": + data[key] = value ? parseFloat(value) : 0; + types_client[key] = { + en: "number", + zh: names[index] + }; + break; + case "string": + data[key] = value ? value : ""; + types_client[key] = { + en: "string", + zh: names[index] + }; + break; + case "boolean": + data[key] = value == "true"; + types_client[key] = { + en: "boolean", + zh: names[index] + }; + break; + // case "any": + // data[key] = JSON.parse(value); + // types_client[key] = { + // en: "any", + // zh: names[index] + // }; + // break; + case "cobj": + try { + data[key] = value ? JSON.parse(`{"${value.toString().replace(/[:]+/g, "\":").replace(/[,]+/g, ",\"")}}`) : "{}"; + types_client[key] = { + en: "object", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-cobj-- ${value}`); + } + break; + case "carr": + try { + let newValue = value ? `["${value.toString().replace(/[,]+/g, "\",\"")}"]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "string[]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr-- ${value}`); + } + break; + case "carr_int": + case "carr_long": + case "carr_float": + case "carr_double": + try { + let newValue = value ? `[${value}]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "number[]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr_int`); + } + break; + case "carr_string": + try { + let newValue; + if (value) { + if (value[0] == "\"") { + newValue = `[${value}]`; + } + else { + newValue = `["${value.toString().replace(/[,]+/g, "\",\"")}"]`; + } + } + else { + newValue = "[]"; + } + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "string[]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr_string-- ${value}`); + } + break; + case "carr_object": + case "carr_obj": + try { + let newValue = value ? `[{"${value.toString().replace(/[;]+/g, ",").replace(/[:]+/g, "\":").replace(/[,]+/g, "},{\"")}}]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "object[]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr_object-- ${value}`); + } + break; + case "carr2": + try { + let newValue; + if (value) { + newValue = `"${value.toString().replace(/[:]+/g, "\":\"").replace(/[,]+/g, "\",\"")}"`; + newValue = `[[${newValue.replace(/[,]+/g, "],[").replace(/[:]+/g, ",")}]]`; + } + else { + newValue = "[]"; + } + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "string[][]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr2-- ${value}`); + } + break; + case "carr2_int": + case "carr2_long": + case "carr2_float": + case "carr2_double": + try { + let newValue = value ? `[[${value.toString().replace(/[,]+/g, "],[").replace(/[:]+/g, ",")}]]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "number[][]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr2_int-- ${value}`); + } + break; + case "carr2_obj": + try { + let newValue = value ? `[{"${value.toString().replace(/[,]+/g, "\",\"").replace(/[:]+/g, "\":\"").replace(/[,]+/g, "},{").replace(/[;]+/g, "\",\"")}"}]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "object[][]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr2-- ${value}`); + } + break; + case "carr2_objnum": + try { + let newValue = value ? `[{"${value.toString().replace(/[:]+/g, "\":").replace(/[,]+/g, "},{\"").replace(/[;]+/g, ",\"")}}]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "object[][]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr2_objnum-- ${value}`); + } + break; + } + } + } + // 生成数据(多主键) + if (rowNumber > 3) { + let temp = null; + for (var i = 0; i < primary.length; i++) { + let k = primary[i]; + let id = data[k]; + if (primary.length == 1) { + r[id] = data; + } + else { + if (i == primary.length - 1) { + temp[id] = data; + } + else if (i == 0) { + if (r[id] == undefined) { + r[id] = {}; + } + temp = r[id]; + } + else { + temp[id] = {}; + temp = temp[id]; + } + } + } + } + }); + // 写入流 + if (r["undefined"] == null) { + await fs.writeFileSync(dst, JSON.stringify(r)); + // 生成客户端脚本 + if (isClient) + (0, JsonToTs_1.createTs)(name, types_client, r, primary); + console.log(isClient ? "客户端数据" : "服务器数据", "生成成功", dst); + } + else { + console.warn(isClient ? "客户端数据" : "服务器数据", "无数据", dst); + console.warn(r); + } +} +function run() { + var inputExcelPath = path_1.default.join(__dirname, main_1.config.PathExcel); + var outJsonPath = path_1.default.join(__dirname, main_1.config.PathJson); + const files = fs.readdirSync(inputExcelPath); + files.forEach((f) => { + let name = f.substring(0, f.indexOf(".")); + let ext = f.toString().substring(f.lastIndexOf(".") + 1); + if (ext == "xlsx") { + convert(inputExcelPath + f, outJsonPath + name + ".json", name, true); // 客户端数据 + } + }); +} +exports.run = run; diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/JsonToTs.js b/JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/JsonToTs.js new file mode 100644 index 00000000..723488c3 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/JsonToTs.js @@ -0,0 +1,62 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createTs = void 0; +const path_1 = __importDefault(require("path")); +const main_1 = require("./main"); +const fs = require('fs'); +async function createTs(name, fieldType, data, primary) { + // 主键参数 + var script_init_params = ""; + var script_init_data = ""; + var script_init_var = ""; + var script_init_value = ""; + primary.forEach(key => { + script_init_params += `${key}: number, `; + script_init_data += `[${key}]`; + script_init_var += `/** ${fieldType[key].zh} */\r private _${key}: number = 0;\r `; + script_init_value += `this._${key} = ${key};\r `; + }); + script_init_params = script_init_params.substring(0, script_init_params.length - 2); + script_init_var = script_init_var.substring(0, script_init_var.length - 5); + script_init_value = script_init_value.substring(0, script_init_value.length - 9); + // 字段 + var field = ""; + for (var id in fieldType) { + // if (primary.indexOf(id) == -1) { + field += ` + /** ${fieldType[id].zh} */ + get ${id}(): ${fieldType[id].en} { + return this.data.${id}; + }`; + // } + } + var script = `import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil"; + +export class Table${name} { + static TableName: string = "${name}"; + + static getAllConfig(): { [id: string]: Table${name} } { + return JsonUtil.get(Table${name}.TableName); + } + + static getConfig(id: number | string) { + return Table${name}.getAllConfig()[id] as Table${name}; + } + + private data: any; + + init(${script_init_params}) { + var table = JsonUtil.get(Table${name}.TableName); + this.data = table${script_init_data}; + ${script_init_value} + } + ${script_init_var} +${field} +}`; + var p = path_1.default.join(__dirname, main_1.config.PathTs); + await fs.writeFileSync(`${p}Table${name}.ts`, script); +} +exports.createTs = createTs; diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/main.js b/JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/main.js new file mode 100644 index 00000000..9773e880 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/dist/main.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.methods = exports.config = exports.unload = exports.load = void 0; +const ExcelToJson_1 = require("./ExcelToJson"); +/** + * @en Hooks triggered after extension loading is complete + * @zh 扩展加载完成后触发的钩子 + */ +function load() { } +exports.load = load; +/** + * @en Hooks triggered after extension uninstallation is complete + * @zh 扩展卸载完成后触发的钩子 + */ +function unload() { } +exports.unload = unload; +/** + * @en + * @zh 为扩展的主进程的注册方法 + */ +exports.methods = { + async excelToJson() { + exports.config = await Editor.Profile.getProject("oops-plugin-excel-to-json"); + if (exports.config.PathExcel == null) { + console.warn("项目->项目设置->Excel To Json->PathExcel 配置路径"); + return; + } + if (exports.config.PathJson == null) { + console.warn("项目->项目设置->Excel To Json->PathJson 配置路径"); + return; + } + if (exports.config.PathTs == null) { + console.warn("项目->项目设置->Excel To Json->PathTs 配置路径"); + return; + } + (0, ExcelToJson_1.run)(); + } +}; diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/i18n/en.js b/JisolGameCocos/extensions/oops-plugin-excel-to-json/i18n/en.js new file mode 100644 index 00000000..8c98a8cd --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/i18n/en.js @@ -0,0 +1,7 @@ +"use strict"; +module.exports = +{ + title: "Oops Framework Excel To Json", + description:"Oops framework Excel to JSON data plug-in", + excel_to_json: "Excel To Json", +}; \ No newline at end of file diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/i18n/zh.js b/JisolGameCocos/extensions/oops-plugin-excel-to-json/i18n/zh.js new file mode 100644 index 00000000..ff5cc32a --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/i18n/zh.js @@ -0,0 +1,7 @@ +"use strict"; +module.exports = +{ + title: "Oops Framework Excel To Json", + description:"Oops Framework Excel 转 Json 数据插件", + excel_to_json: "Excel To Json", +}; \ No newline at end of file diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/package-lock.json b/JisolGameCocos/extensions/oops-plugin-excel-to-json/package-lock.json new file mode 100644 index 00000000..07b5767b --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/package-lock.json @@ -0,0 +1,1911 @@ +{ + "name": "oops-plugin-excel-to-json", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "oops-plugin-excel-to-json", + "version": "1.0.0", + "dependencies": { + "fs-extra": "^10.0.0" + }, + "devDependencies": { + "@types/fs-extra": "^9.0.5", + "@types/node": "^16.0.1", + "exceljs": "^4.2.1" + } + }, + "node_modules/@fast-csv/format": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz", + "integrity": "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==", + "dev": true, + "dependencies": { + "@types/node": "^14.0.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.isboolean": "^3.0.3", + "lodash.isequal": "^4.5.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0" + } + }, + "node_modules/@fast-csv/format/node_modules/@types/node": { + "version": "14.18.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.16.tgz", + "integrity": "sha512-X3bUMdK/VmvrWdoTkz+VCn6nwKwrKCFTHtqwBIaQJNx4RUIBBUFXM00bqPz/DsDd+Icjmzm6/tyYZzeGVqb6/Q==", + "dev": true + }, + "node_modules/@fast-csv/parse": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/@fast-csv/parse/-/parse-4.3.6.tgz", + "integrity": "sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA==", + "dev": true, + "dependencies": { + "@types/node": "^14.0.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.groupby": "^4.6.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0", + "lodash.isundefined": "^3.0.1", + "lodash.uniq": "^4.5.0" + } + }, + "node_modules/@fast-csv/parse/node_modules/@types/node": { + "version": "14.18.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.16.tgz", + "integrity": "sha512-X3bUMdK/VmvrWdoTkz+VCn6nwKwrKCFTHtqwBIaQJNx4RUIBBUFXM00bqPz/DsDd+Icjmzm6/tyYZzeGVqb6/Q==", + "dev": true + }, + "node_modules/@types/fs-extra": { + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", + "integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "16.11.32", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.32.tgz", + "integrity": "sha512-+fnfNvG5JQdC1uGZiTx+0QVtoOHcggy6+epx65JYroPGsE1uhp+vo5kioiGKsAkor6ocwHteU2EvO7N8vtOZtA==", + "dev": true + }, + "node_modules/archiver": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.1.tgz", + "integrity": "sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w==", + "dev": true, + "dependencies": { + "archiver-utils": "^2.1.0", + "async": "^3.2.3", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.0.0", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/archiver-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "dev": true, + "dependencies": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/archiver-utils/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/archiver-utils/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/archiver-utils/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/async": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", + "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/binary": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", + "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", + "dev": true, + "dependencies": { + "buffers": "~0.1.1", + "chainsaw": "~0.1.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bluebird": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/buffer-indexof-polyfill": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", + "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/buffers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=", + "dev": true, + "engines": { + "node": ">=0.2.0" + } + }, + "node_modules/chainsaw": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", + "dev": true, + "dependencies": { + "traverse": ">=0.3.0 <0.4" + }, + "engines": { + "node": "*" + } + }, + "node_modules/compress-commons": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.1.tgz", + "integrity": "sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ==", + "dev": true, + "dependencies": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "dev": true, + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/crc32-stream": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.2.tgz", + "integrity": "sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w==", + "dev": true, + "dependencies": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/dayjs": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.1.tgz", + "integrity": "sha512-ER7EjqVAMkRRsxNCC5YqJ9d9VQYuWdGt7aiH2qA5R5wt8ZmWaP2dLUSIK6y/kVzLMlmh1Tvu5xUf4M/wdGJ5KA==", + "dev": true + }, + "node_modules/duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/duplexer2/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/duplexer2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/duplexer2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/exceljs": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/exceljs/-/exceljs-4.3.0.tgz", + "integrity": "sha512-hTAeo5b5TPvf8Z02I2sKIT4kSfCnOO2bCxYX8ABqODCdAjppI3gI9VYiGCQQYVcBaBSKlFDMKlAQRqC+kV9O8w==", + "dev": true, + "dependencies": { + "archiver": "^5.0.0", + "dayjs": "^1.8.34", + "fast-csv": "^4.3.1", + "jszip": "^3.5.0", + "readable-stream": "^3.6.0", + "saxes": "^5.0.1", + "tmp": "^0.2.0", + "unzipper": "^0.10.11", + "uuid": "^8.3.0" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "node_modules/fast-csv": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-4.3.6.tgz", + "integrity": "sha512-2RNSpuwwsJGP0frGsOmTb9oUF+VkFSM4SyLTDgwf2ciHWTarN0lQTC+F2f/t5J9QjW+c65VFIAAu85GsvMIusw==", + "dev": true, + "dependencies": { + "@fast-csv/format": "4.3.5", + "@fast-csv/parse": "4.3.6" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fstream": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + }, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/fstream/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", + "dev": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jszip": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.9.1.tgz", + "integrity": "sha512-H9A60xPqJ1CuC4Ka6qxzXZeU8aNmgOeP5IFqwJbQQwtu2EUYxota3LdsiZWplF7Wgd9tkAd0mdu36nceSaPuYw==", + "dev": true, + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" + } + }, + "node_modules/jszip/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/jszip/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/jszip/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lazystream/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/lazystream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/lazystream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/listenercount": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", + "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=", + "dev": true + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", + "dev": true + }, + "node_modules/lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, + "node_modules/lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", + "dev": true + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "node_modules/lodash.groupby": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", + "integrity": "sha1-Cwih3PaDl8OXhVwyOXg4Mt90A9E=", + "dev": true + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=", + "dev": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "node_modules/lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", + "dev": true + }, + "node_modules/lodash.isnil": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz", + "integrity": "sha1-SeKM1VkBNFjIFMVHnTxmOiG/qmw=", + "dev": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "node_modules/lodash.isundefined": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", + "integrity": "sha1-I+89lTVWUgOmbO/VuDD4SJEa+0g=", + "dev": true + }, + "node_modules/lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=", + "dev": true + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdir-glob": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.1.tgz", + "integrity": "sha512-91/k1EzZwDx6HbERR+zucygRFfiPl2zkIYZtv3Jjr6Mn7SkKcVct8aVO+sSRiGMc6fLf72du3d92/uY63YPdEA==", + "dev": true, + "dependencies": { + "minimatch": "^3.0.4" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, + "node_modules/traverse": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unzipper": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.11.tgz", + "integrity": "sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.17", + "binary": "~0.3.0", + "bluebird": "~3.4.1", + "buffer-indexof-polyfill": "~1.0.0", + "duplexer2": "~0.1.4", + "fstream": "^1.0.12", + "graceful-fs": "^4.2.2", + "listenercount": "~1.0.1", + "readable-stream": "~2.3.6", + "setimmediate": "~1.0.4" + } + }, + "node_modules/unzipper/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/unzipper/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/unzipper/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "node_modules/zip-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz", + "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", + "dev": true, + "dependencies": { + "archiver-utils": "^2.1.0", + "compress-commons": "^4.1.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + } + }, + "dependencies": { + "@fast-csv/format": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz", + "integrity": "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==", + "dev": true, + "requires": { + "@types/node": "^14.0.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.isboolean": "^3.0.3", + "lodash.isequal": "^4.5.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0" + }, + "dependencies": { + "@types/node": { + "version": "14.18.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.16.tgz", + "integrity": "sha512-X3bUMdK/VmvrWdoTkz+VCn6nwKwrKCFTHtqwBIaQJNx4RUIBBUFXM00bqPz/DsDd+Icjmzm6/tyYZzeGVqb6/Q==", + "dev": true + } + } + }, + "@fast-csv/parse": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/@fast-csv/parse/-/parse-4.3.6.tgz", + "integrity": "sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA==", + "dev": true, + "requires": { + "@types/node": "^14.0.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.groupby": "^4.6.0", + "lodash.isfunction": "^3.0.9", + "lodash.isnil": "^4.0.0", + "lodash.isundefined": "^3.0.1", + "lodash.uniq": "^4.5.0" + }, + "dependencies": { + "@types/node": { + "version": "14.18.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.16.tgz", + "integrity": "sha512-X3bUMdK/VmvrWdoTkz+VCn6nwKwrKCFTHtqwBIaQJNx4RUIBBUFXM00bqPz/DsDd+Icjmzm6/tyYZzeGVqb6/Q==", + "dev": true + } + } + }, + "@types/fs-extra": { + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", + "integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "16.11.32", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.32.tgz", + "integrity": "sha512-+fnfNvG5JQdC1uGZiTx+0QVtoOHcggy6+epx65JYroPGsE1uhp+vo5kioiGKsAkor6ocwHteU2EvO7N8vtOZtA==", + "dev": true + }, + "archiver": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.1.tgz", + "integrity": "sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w==", + "dev": true, + "requires": { + "archiver-utils": "^2.1.0", + "async": "^3.2.3", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.0.0", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + } + }, + "archiver-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "dev": true, + "requires": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "async": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", + "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true + }, + "binary": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", + "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", + "dev": true, + "requires": { + "buffers": "~0.1.1", + "chainsaw": "~0.1.0" + } + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "bluebird": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-indexof-polyfill": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", + "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==", + "dev": true + }, + "buffers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=", + "dev": true + }, + "chainsaw": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", + "dev": true, + "requires": { + "traverse": ">=0.3.0 <0.4" + } + }, + "compress-commons": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.1.tgz", + "integrity": "sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ==", + "dev": true, + "requires": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "dev": true + }, + "crc32-stream": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.2.tgz", + "integrity": "sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w==", + "dev": true, + "requires": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + } + }, + "dayjs": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.1.tgz", + "integrity": "sha512-ER7EjqVAMkRRsxNCC5YqJ9d9VQYuWdGt7aiH2qA5R5wt8ZmWaP2dLUSIK6y/kVzLMlmh1Tvu5xUf4M/wdGJ5KA==", + "dev": true + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "exceljs": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/exceljs/-/exceljs-4.3.0.tgz", + "integrity": "sha512-hTAeo5b5TPvf8Z02I2sKIT4kSfCnOO2bCxYX8ABqODCdAjppI3gI9VYiGCQQYVcBaBSKlFDMKlAQRqC+kV9O8w==", + "dev": true, + "requires": { + "archiver": "^5.0.0", + "dayjs": "^1.8.34", + "fast-csv": "^4.3.1", + "jszip": "^3.5.0", + "readable-stream": "^3.6.0", + "saxes": "^5.0.1", + "tmp": "^0.2.0", + "unzipper": "^0.10.11", + "uuid": "^8.3.0" + } + }, + "fast-csv": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-4.3.6.tgz", + "integrity": "sha512-2RNSpuwwsJGP0frGsOmTb9oUF+VkFSM4SyLTDgwf2ciHWTarN0lQTC+F2f/t5J9QjW+c65VFIAAu85GsvMIusw==", + "dev": true, + "requires": { + "@fast-csv/format": "4.3.5", + "@fast-csv/parse": "4.3.6" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fstream": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "jszip": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.9.1.tgz", + "integrity": "sha512-H9A60xPqJ1CuC4Ka6qxzXZeU8aNmgOeP5IFqwJbQQwtu2EUYxota3LdsiZWplF7Wgd9tkAd0mdu36nceSaPuYw==", + "dev": true, + "requires": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, + "requires": { + "immediate": "~3.0.5" + } + }, + "listenercount": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", + "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=", + "dev": true + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", + "dev": true + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, + "lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.groupby": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", + "integrity": "sha1-Cwih3PaDl8OXhVwyOXg4Mt90A9E=", + "dev": true + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", + "dev": true + }, + "lodash.isnil": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz", + "integrity": "sha1-SeKM1VkBNFjIFMVHnTxmOiG/qmw=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.isundefined": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", + "integrity": "sha1-I+89lTVWUgOmbO/VuDD4SJEa+0g=", + "dev": true + }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=", + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "requires": { + "minimist": "^1.2.6" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdir-glob": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.1.tgz", + "integrity": "sha512-91/k1EzZwDx6HbERR+zucygRFfiPl2zkIYZtv3Jjr6Mn7SkKcVct8aVO+sSRiGMc6fLf72du3d92/uY63YPdEA==", + "dev": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "requires": { + "xmlchars": "^2.2.0" + } + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, + "tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "requires": { + "rimraf": "^3.0.0" + } + }, + "traverse": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=", + "dev": true + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + }, + "unzipper": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.11.tgz", + "integrity": "sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw==", + "dev": true, + "requires": { + "big-integer": "^1.6.17", + "binary": "~0.3.0", + "bluebird": "~3.4.1", + "buffer-indexof-polyfill": "~1.0.0", + "duplexer2": "~0.1.4", + "fstream": "^1.0.12", + "graceful-fs": "^4.2.2", + "listenercount": "~1.0.1", + "readable-stream": "~2.3.6", + "setimmediate": "~1.0.4" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "zip-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz", + "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", + "dev": true, + "requires": { + "archiver-utils": "^2.1.0", + "compress-commons": "^4.1.0", + "readable-stream": "^3.6.0" + } + } + } +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/package.json b/JisolGameCocos/extensions/oops-plugin-excel-to-json/package.json new file mode 100644 index 00000000..542decd7 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/package.json @@ -0,0 +1,55 @@ +{ + "package_version": 2, + "version": "1.0.0", + "name": "oops-plugin-excel-to-json", + "description": "i18n:oops-plugin-excel-to-json.description", + "main": "./dist/main.js", + "author": "dgflash", + "dependencies": { + "fs-extra": "^10.0.0" + }, + "devDependencies": { + "@types/fs-extra": "^9.0.5", + "@types/node": "^16.0.1", + "exceljs": "^4.2.1" + }, + "contributions": { + "project": { + "tab1": { + "label": "Excel to Json", + "content": { + "PathExcel": { + "ui": "ui-input", + "default": "" + }, + "PathJson": { + "ui": "ui-input", + "default": "" + }, + "PathTs": { + "ui": "ui-input", + "default": "" + } + } + } + }, + "menu": [ + { + "path": "i18n:menu.extension", + "label": "i18n:oops-plugin-excel-to-json.title", + "message": "excelToJson" + } + ], + "messages": { + "excelToJson": { + "methods": [ + "excelToJson" + ] + } + } + }, + "scripts": { + "build": "tsc -b", + "watch": "tsc -w" + } +} diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/src/ExcelToJson.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/src/ExcelToJson.ts new file mode 100644 index 00000000..5a9bfae4 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/src/ExcelToJson.ts @@ -0,0 +1,304 @@ +import path from "path"; +import { createTs } from "./JsonToTs"; +import { config } from "./main"; + +const fs = require('fs') +const excel = require('exceljs'); + +/** + * Excel转Json数据 + * @param {*} src 读取的excel文件目录 + * @param {*} dst 导出的json文件目录 + * @param {*} name excel文件名 + * @param {*} isClient 是否为客户端数据 + */ +async function convert(src: string, dst: string, name: string, isClient: boolean) { + let r: any = {}; + let names: any[] = []; // 文名字段名 + let keys: any[] = []; // 字段名 + let types: any[] = []; // 通用字段数据类型 + let types_client: any = {}; // 客户端数据类型 + let primary: string[] = []; // 多主键配置 + // let primary_index: number[] = []; + + const workbook = new excel.Workbook(); + + // 读取excel + await workbook.xlsx.readFile(src); + const worksheet = workbook.getWorksheet(1); // 获取第一个worksheet + let rowNum = 0; + let rowStartIndex = 0; + worksheet.eachRow((row: any, rowNumber: number) => { + let data: any = {}; + // console.log(row.values); + if (rowNumber <= 3) { + for (let index = 0; index < row.values.length; index++) { + const value = row.values[index]; + if (value) { + // console.log(value); + if (rowNumber === 1) { + keys.push(value);// 字段英文名 + if (primary.length == 0) { + rowStartIndex = index; + primary.push(value); + } + } + else if (rowNumber === 2) { + types.push(value);// 通用字段数据类型 + } + else if (rowNumber === 3) { + names.push(value);// 字段中文名 + } + } + } + } else { + if (rowNum == 0) { + rowNum = Math.min(keys.length, types.length, names.length); + } + + for (let index = 0; index < rowNum; index++) { + const value = row.values[index + rowStartIndex]; + let type = types[index]; + let key = keys[index]; + switch (type) { + case "int": + case "long": + data[key] = value ? parseInt(value) : 0; + types_client[key] = { + en: "number", + zh: names[index] + }; + break; + case "float": + case "double": + data[key] = value ? parseFloat(value) : 0; + types_client[key] = { + en: "number", + zh: names[index] + }; + break; + case "string": + data[key] = value ? value : ""; + types_client[key] = { + en: "string", + zh: names[index] + }; + break; + case "boolean": + data[key] = value == "true"; + types_client[key] = { + en: "boolean", + zh: names[index] + }; + break; + // case "any": + // data[key] = JSON.parse(value); + // types_client[key] = { + // en: "any", + // zh: names[index] + // }; + // break; + case "cobj": + try { + + data[key] = value ? JSON.parse(`{"${value.toString().replace(/[:]+/g, "\":").replace(/[,]+/g, ",\"")}}`) : "{}"; + types_client[key] = { + en: "object", + zh: names[index] + }; + } catch (error) { + console.log(error); + console.log(`格式错误-cobj-- ${value}`); + } + break; + case "carr": + try { + let newValue = value ? `["${value.toString().replace(/[,]+/g, "\",\"")}"]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "string[]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr-- ${value}`); + } + break; + case "carr_int": + case "carr_long": + case "carr_float": + case "carr_double": + try { + let newValue = value ? `[${value}]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "number[]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr_int`); + } + break; + case "carr_string": + try { + let newValue; + if (value) { + if (value[0] == "\"") { + newValue = `[${value}]`; + } else { + newValue = `["${value.toString().replace(/[,]+/g, "\",\"")}"]`; + } + } else { + newValue = "[]"; + } + + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "string[]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr_string-- ${value}`); + } + break; + case "carr_object": + case "carr_obj": + try { + let newValue = value ? `[{"${value.toString().replace(/[;]+/g, ",").replace(/[:]+/g, "\":").replace(/[,]+/g, "},{\"")}}]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "object[]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr_object-- ${value}`); + } + break; + case "carr2": + try { + let newValue; + if (value) { + newValue = `"${value.toString().replace(/[:]+/g, "\":\"").replace(/[,]+/g, "\",\"")}"`; + newValue = `[[${newValue.replace(/[,]+/g, "],[").replace(/[:]+/g, ",")}]]`; + } else { + newValue = "[]"; + } + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "string[][]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr2-- ${value}`); + } + break; + case "carr2_int": + case "carr2_long": + case "carr2_float": + case "carr2_double": + try { + let newValue = value ? `[[${value.toString().replace(/[,]+/g, "],[").replace(/[:]+/g, ",")}]]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "number[][]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr2_int-- ${value}`); + } + break; + case "carr2_obj": + try { + let newValue = value ? `[{"${value.toString().replace(/[,]+/g, "\",\"").replace(/[:]+/g, "\":\"").replace(/[,]+/g, "},{").replace(/[;]+/g, "\",\"")}"}]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "object[][]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr2-- ${value}`); + } + break; + case "carr2_objnum": + try { + let newValue = value ? `[{"${value.toString().replace(/[:]+/g, "\":").replace(/[,]+/g, "},{\"").replace(/[;]+/g, ",\"")}}]` : "[]"; + data[key] = JSON.parse(newValue); + types_client[key] = { + en: "object[][]", + zh: names[index] + }; + } + catch (error) { + console.log(error); + console.log(`格式错误-carr2_objnum-- ${value}`); + } + break; + } + } + } + // 生成数据(多主键) + if (rowNumber > 3) { + let temp: any = null; + for (var i = 0; i < primary.length; i++) { + let k = primary[i]; + let id = data[k]; + if (primary.length == 1) { + r[id] = data; + } + else { + if (i == primary.length - 1) { + temp[id] = data; + } + else if (i == 0) { + if (r[id] == undefined) { + r[id] = {}; + } + temp = r[id]; + } + else { + temp[id] = {}; + temp = temp[id]; + } + } + } + } + }); + // 写入流 + if (r["undefined"] == null) { + await fs.writeFileSync(dst, JSON.stringify(r)); + + // 生成客户端脚本 + if (isClient) createTs(name, types_client, r, primary); + console.log(isClient ? "客户端数据" : "服务器数据", "生成成功", dst); + } + else { + console.warn(isClient ? "客户端数据" : "服务器数据", "无数据", dst); + console.warn(r); + } +} + +export function run() { + var inputExcelPath = path.join(__dirname, config.PathExcel); + var outJsonPath = path.join(__dirname, config.PathJson); + const files = fs.readdirSync(inputExcelPath); + files.forEach((f: any) => { + let name = f.substring(0, f.indexOf(".")); + let ext = f.toString().substring(f.lastIndexOf(".") + 1); + if (ext == "xlsx") { + convert(inputExcelPath + f, outJsonPath + name + ".json", name, true); // 客户端数据 + } + }); +} \ No newline at end of file diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/src/JsonToTs.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/src/JsonToTs.ts new file mode 100644 index 00000000..7ea8ab51 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/src/JsonToTs.ts @@ -0,0 +1,61 @@ +import path from "path"; +import { config } from "./main"; + +const fs = require('fs') + +export async function createTs(name: string, fieldType: any, data: any, primary: string[]) { + // 主键参数 + var script_init_params = ""; + var script_init_data = ""; + var script_init_var = ""; + var script_init_value = ""; + primary.forEach(key => { + script_init_params += `${key}: number, `; + script_init_data += `[${key}]`; + script_init_var += `/** ${fieldType[key].zh} */\r private _${key}: number = 0;\r `; + script_init_value += `this._${key} = ${key};\r ` + }); + script_init_params = script_init_params.substring(0, script_init_params.length - 2); + script_init_var = script_init_var.substring(0, script_init_var.length - 5); + script_init_value = script_init_value.substring(0, script_init_value.length - 9); + + // 字段 + var field = ""; + for (var id in fieldType) { + // if (primary.indexOf(id) == -1) { + field += ` + /** ${fieldType[id].zh} */ + get ${id}(): ${fieldType[id].en} { + return this.data.${id}; + }`; + // } + } + + var script = +`import { JsonUtil } from "../../../ngame/util/JsonUtil"; + +export class Table${name} { + static TableName: string = "${name}"; + + static getAllConfig(): { [id: string]: Table${name} } { + return JsonUtil.get(Table${name}.TableName); + } + + static getConfig(id: number | string) { + return Table${name}.getAllConfig()[id] as Table${name}; + } + + private data: any; + + init(${script_init_params}) { + var table = JsonUtil.get(Table${name}.TableName); + this.data = table${script_init_data}; + ${script_init_value} + } + ${script_init_var} +${field} +}`; + + var p = path.join(__dirname, config.PathTs); + await fs.writeFileSync(`${p}Table${name}.ts`, script); +} \ No newline at end of file diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/src/main.ts b/JisolGameCocos/extensions/oops-plugin-excel-to-json/src/main.ts new file mode 100644 index 00000000..768801c0 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/src/main.ts @@ -0,0 +1,41 @@ +import { run } from "./ExcelToJson"; + +/** + * @en Hooks triggered after extension loading is complete + * @zh 扩展加载完成后触发的钩子 + */ +export function load() { } + +/** + * @en Hooks triggered after extension uninstallation is complete + * @zh 扩展卸载完成后触发的钩子 + */ +export function unload() { } + +export var config: any; + +/** + * @en + * @zh 为扩展的主进程的注册方法 + */ +export const methods: { [key: string]: (...any: any) => any } = { + async excelToJson() { + config = await Editor.Profile.getProject("oops-plugin-excel-to-json"); + if (config.PathExcel == null) { + console.warn("项目->项目设置->Excel To Json->PathExcel 配置路径"); + return; + } + + if (config.PathJson == null) { + console.warn("项目->项目设置->Excel To Json->PathJson 配置路径"); + return; + } + + if (config.PathTs == null) { + console.warn("项目->项目设置->Excel To Json->PathTs 配置路径"); + return; + } + + run(); + } +}; diff --git a/JisolGameCocos/extensions/oops-plugin-excel-to-json/tsconfig.json b/JisolGameCocos/extensions/oops-plugin-excel-to-json/tsconfig.json new file mode 100644 index 00000000..f799ee99 --- /dev/null +++ b/JisolGameCocos/extensions/oops-plugin-excel-to-json/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "ES2017", + "module": "CommonJS", + "outDir": "./dist", + "rootDir": "./src", + "strict": true, + "moduleResolution": "node", + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + } +} \ No newline at end of file diff --git a/JisolGameCocos/settings/v2/packages/oops-plugin-excel-to-json.json b/JisolGameCocos/settings/v2/packages/oops-plugin-excel-to-json.json new file mode 100644 index 00000000..ae2e62fd --- /dev/null +++ b/JisolGameCocos/settings/v2/packages/oops-plugin-excel-to-json.json @@ -0,0 +1,6 @@ +{ + "__version__": "1.0.0", + "PathExcel": "../../../config/", + "PathJson": "../../../assets/resources/config/game/", + "PathTs": "../../../assets/resources/config/ts/" +}