From 47104caa6e224bd1e50413192f066f0b858e72cd Mon Sep 17 00:00:00 2001 From: sli97 <775303361@qq.com> Date: Thu, 21 Sep 2023 01:32:11 +0800 Subject: [PATCH] init --- .gitignore | 22 + @types/editor.d.ts | 1210 ++ @types/electron.d.ts | 16090 ++++++++++++++++ @types/extension.d.ts | 66 + @types/index.d.ts | 3 + @types/message.d.ts | 37 + .../adsense-h5g-plugin/@types/index.d.ts | 16 + .../alipay-mini-game/@types/index.d.ts | 17 + @types/packages/android/@types/index.d.ts | 73 + .../@types/engine-editor-extras.d.ts | 17 + @types/packages/animator/@types/vue.d.ts | 5 + @types/packages/asset-db/@types/message.d.ts | 139 + @types/packages/asset-db/@types/public.d.ts | 113 + @types/packages/assets/@types/public.d.ts | 24 + @types/packages/assets/@types/vue.d.ts | 7 + @types/packages/builder/@types/index.d.ts | 2 + @types/packages/builder/@types/message.d.ts | 12 + .../builder/@types/public/build-plugin.d.ts | 113 + .../builder/@types/public/build-result.d.ts | 202 + .../builder/@types/public/global.d.ts | 6 + .../packages/builder/@types/public/index.d.ts | 102 + .../builder/@types/public/options.d.ts | 263 + .../@types/public/texture-compress.d.ts | 118 + .../bytedance-mini-game/@types/index.d.ts | 29 + @types/packages/certificate/@types/index.d.ts | 1 + .../channel-upload-tools/@types/index.d.ts | 1 + @types/packages/console/@types/pritate.d.ts | 33 + .../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 | 160 + .../engine/@types/editor-extends/index.d.ts | 51 + .../@types/editor-extends/index.d.ts.map | 1 + .../@types/editor-extends/manager/asset.d.ts | 15 + .../editor-extends/manager/asset.d.ts.map | 1 + .../editor-extends/manager/component.d.ts | 63 + .../editor-extends/manager/component.d.ts.map | 1 + .../@types/editor-extends/manager/dialog.d.ts | 32 + .../editor-extends/manager/dialog.d.ts.map | 1 + .../@types/editor-extends/manager/node.d.ts | 49 + .../editor-extends/manager/node.d.ts.map | 1 + .../@types/editor-extends/manager/script.d.ts | 26 + .../editor-extends/manager/script.d.ts.map | 1 + .../missing-class-reporter.d.ts | 13 + .../missing-class-reporter.d.ts.map | 1 + .../missing-object-reporter.d.ts | 8 + .../missing-object-reporter.d.ts.map | 1 + .../missing-reporter/missing-reporter.d.ts | 20 + .../missing-reporter.d.ts.map | 1 + .../missing-reporter/object-walker.d.ts | 43 + .../missing-reporter/object-walker.d.ts.map | 1 + .../editor-extends/utils/deserialize.d.ts | 7 + .../editor-extends/utils/deserialize.d.ts.map | 1 + .../@types/editor-extends/utils/geometry.d.ts | 19 + .../editor-extends/utils/geometry.d.ts.map | 1 + .../@types/editor-extends/utils/prefab.d.ts | 18 + .../editor-extends/utils/prefab.d.ts.map | 1 + .../utils/serialize/compiled/builder.d.ts | 55 + .../utils/serialize/compiled/builder.d.ts.map | 1 + .../serialize/compiled/create-class-mask.d.ts | 12 + .../compiled/create-class-mask.d.ts.map | 1 + .../utils/serialize/compiled/pack-jsons.d.ts | 8 + .../serialize/compiled/pack-jsons.d.ts.map | 1 + .../utils/serialize/compiled/types.d.ts | 101 + .../utils/serialize/compiled/types.d.ts.map | 1 + .../utils/serialize/dynamic-builder.d.ts | 74 + .../utils/serialize/dynamic-builder.d.ts.map | 1 + .../editor-extends/utils/serialize/index.d.ts | 13 + .../utils/serialize/index.d.ts.map | 1 + .../utils/serialize/parser.d.ts | 112 + .../utils/serialize/parser.d.ts.map | 1 + .../@types/editor-extends/utils/uuid.d.ts | 20 + .../@types/editor-extends/utils/uuid.d.ts.map | 1 + .../engine/@types/engine-compiler/index.d.ts | 23 + .../@types/engine-compiler/index.d.ts.map | 1 + @types/packages/engine/@types/index.d.ts | 15 + @types/packages/engine/@types/message.d.ts | 22 + @types/packages/engine/@types/module.d.ts | 78 + .../fb-instant-games/@types/index.d.ts | 15 + @types/packages/huawei-agc/@types/index.d.ts | 50 + .../huawei-quick-game/@types/index.d.ts | 35 + .../packages/information/@types/message.d.ts | 32 + .../packages/information/@types/public.d.ts | 35 + @types/packages/ios/@types/index.d.ts | 42 + @types/packages/linux/@types/index.d.ts | 18 + @types/packages/mac/@types/index.d.ts | 30 + @types/packages/ohos/@types/index.d.ts | 36 + @types/packages/openharmony/@types/index.d.ts | 40 + .../packages/oppo-mini-game/@types/index.d.ts | 33 + .../packages/package-asset/@types/public.d.ts | 60 + @types/packages/preferences/@types/index.d.ts | 66 + .../packages/preferences/@types/message.d.ts | 28 + @types/packages/preview/@types/index.d.ts | 1 + @types/packages/program/@types/message.d.ts | 28 + @types/packages/program/@types/public.d.ts | 18 + .../packages/programming/@types/message.d.ts | 7 + @types/packages/project/@types/index.d.ts | 62 + @types/packages/project/@types/message.d.ts | 27 + .../runtime-dev-tools/@types/index.d.ts | 2 + .../scene/@types/animation/public.d.ts | 176 + .../packages/scene/@types/cce/3d/assets.d.ts | 12 + .../scene/@types/cce/3d/assets.d.ts.map | 1 + .../cce/3d/facade/animation-scene-facade.d.ts | 47 + .../3d/facade/animation-scene-facade.d.ts.map | 1 + .../cce/3d/facade/general-scene-facade.d.ts | 301 + .../3d/facade/general-scene-facade.d.ts.map | 1 + .../cce/3d/facade/prefab-scene-facade.d.ts | 17 + .../3d/facade/prefab-scene-facade.d.ts.map | 1 + .../cce/3d/facade/preview-scene-facade.d.ts | 29 + .../3d/facade/preview-scene-facade.d.ts.map | 1 + .../cce/3d/facade/scene-facade-fsm.d.ts | 24 + .../cce/3d/facade/scene-facade-fsm.d.ts.map | 1 + .../cce/3d/facade/scene-facade-manager.d.ts | 343 + .../3d/facade/scene-facade-manager.d.ts.map | 1 + .../facade/scene-facade-state-interface.d.ts | 24 + .../scene-facade-state-interface.d.ts.map | 1 + .../facade/scene-facade-state-transition.d.ts | 22 + .../scene-facade-state-transition.d.ts.map | 1 + .../manager/animation-graph-preview/base.d.ts | 51 + .../animation-graph-preview/base.d.ts.map | 1 + .../animation-graph-preview/motion.d.ts | 15 + .../animation-graph-preview/motion.d.ts.map | 1 + .../animation-graph-preview/transition.d.ts | 14 + .../transition.d.ts.map | 1 + .../animation/editor-animation-aux-curve.d.ts | 74 + .../editor-animation-aux-curve.d.ts.map | 1 + .../animation/editor-animation-clip.d.ts | 304 + .../animation/editor-animation-clip.d.ts.map | 1 + .../editor-animation-combined-curve.d.ts | 53 + .../editor-animation-combined-curve.d.ts.map | 1 + .../editor-animation-curve-base.d.ts | 49 + .../editor-animation-curve-base.d.ts.map | 1 + .../animation/editor-animation-curve.d.ts | 81 + .../animation/editor-animation-curve.d.ts.map | 1 + .../cce/3d/manager/animation/index.d.ts | 238 + .../cce/3d/manager/animation/index.d.ts.map | 1 + .../3d/manager/animation/type-defines.d.ts | 100 + .../manager/animation/type-defines.d.ts.map | 1 + .../3d/manager/animation/uniform-handler.d.ts | 30 + .../animation/uniform-handler.d.ts.map | 1 + .../cce/3d/manager/animation/utils.d.ts | 127 + .../cce/3d/manager/animation/utils.d.ts.map | 1 + .../asset/animation-graph-variant.d.ts | 14 + .../asset/animation-graph-variant.d.ts.map | 1 + .../cce/3d/manager/asset/animation-mask.d.ts | 11 + .../3d/manager/asset/animation-mask.d.ts.map | 1 + .../cce/3d/manager/asset/asset-watcher.d.ts | 29 + .../3d/manager/asset/asset-watcher.d.ts.map | 1 + .../manager/asset/edit-component-asset.d.ts | 34 + .../asset/edit-component-asset.d.ts.map | 1 + .../@types/cce/3d/manager/asset/index.d.ts | 154 + .../cce/3d/manager/asset/index.d.ts.map | 1 + .../@types/cce/3d/manager/asset/material.d.ts | 81 + .../cce/3d/manager/asset/material.d.ts.map | 1 + .../3d/manager/asset/physics-material.d.ts | 6 + .../manager/asset/physics-material.d.ts.map | 1 + .../cce/3d/manager/asset/render-pipeline.d.ts | 38 + .../3d/manager/asset/render-pipeline.d.ts.map | 1 + .../@types/cce/3d/manager/asset/utils.d.ts | 7 + .../cce/3d/manager/asset/utils.d.ts.map | 1 + .../camera/2d/camera-controller-2d.d.ts | 61 + .../camera/2d/camera-controller-2d.d.ts.map | 1 + .../3d/manager/camera/2d/mode/idle-mode.d.ts | 7 + .../manager/camera/2d/mode/idle-mode.d.ts.map | 1 + .../3d/manager/camera/2d/mode/mode-base.d.ts | 23 + .../manager/camera/2d/mode/mode-base.d.ts.map | 1 + .../3d/manager/camera/2d/mode/pan-mode.d.ts | 10 + .../manager/camera/2d/mode/pan-mode.d.ts.map | 1 + .../3d/manager/camera/2d/ruler-interface.d.ts | 9 + .../camera/2d/ruler-interface.d.ts.map | 1 + .../cce/3d/manager/camera/2d/web/ruler.d.ts | 18 + .../3d/manager/camera/2d/web/ruler.d.ts.map | 1 + .../camera/3d/camera-controller-3d.d.ts | 111 + .../camera/3d/camera-controller-3d.d.ts.map | 1 + .../3d/manager/camera/3d/mode/idle-mode.d.ts | 7 + .../manager/camera/3d/mode/idle-mode.d.ts.map | 1 + .../3d/manager/camera/3d/mode/mode-base.d.ts | 23 + .../manager/camera/3d/mode/mode-base.d.ts.map | 1 + .../3d/manager/camera/3d/mode/orbit-mode.d.ts | 12 + .../camera/3d/mode/orbit-mode.d.ts.map | 1 + .../3d/manager/camera/3d/mode/pan-mode.d.ts | 12 + .../manager/camera/3d/mode/pan-mode.d.ts.map | 1 + .../manager/camera/3d/mode/wander-mode.d.ts | 32 + .../camera/3d/mode/wander-mode.d.ts.map | 1 + .../cce/3d/manager/camera/animate-value.d.ts | 28 + .../3d/manager/camera/animate-value.d.ts.map | 1 + .../camera/camera-controller-base.d.ts | 49 + .../camera/camera-controller-base.d.ts.map | 1 + .../camera/editor-camera-components.d.ts | 29 + .../camera/editor-camera-components.d.ts.map | 1 + .../cce/3d/manager/camera/grid/index.d.ts | 42 + .../cce/3d/manager/camera/grid/index.d.ts.map | 1 + .../3d/manager/camera/grid/linear-ticks.d.ts | 35 + .../manager/camera/grid/linear-ticks.d.ts.map | 1 + .../@types/cce/3d/manager/camera/index.d.ts | 124 + .../cce/3d/manager/camera/index.d.ts.map | 1 + .../cce/3d/manager/camera/listener.d.ts | 8 + .../cce/3d/manager/camera/listener.d.ts.map | 1 + .../camera/operation-mode-interface.d.ts | 13 + .../camera/operation-mode-interface.d.ts.map | 1 + .../@types/cce/3d/manager/camera/tween.d.ts | 51 + .../cce/3d/manager/camera/tween.d.ts.map | 1 + .../@types/cce/3d/manager/camera/utils.d.ts | 84 + .../cce/3d/manager/camera/utils.d.ts.map | 1 + .../cce/3d/manager/component/index.d.ts | 87 + .../cce/3d/manager/component/index.d.ts.map | 1 + .../cce/3d/manager/component/utils.d.ts | 22 + .../cce/3d/manager/component/utils.d.ts.map | 1 + .../scene/@types/cce/3d/manager/effects.d.ts | 28 + .../@types/cce/3d/manager/effects.d.ts.map | 1 + .../3d/manager/engine/geometry_renderer.d.ts | 18 + .../manager/engine/geometry_renderer.d.ts.map | 1 + .../@types/cce/3d/manager/engine/index.d.ts | 59 + .../cce/3d/manager/engine/index.d.ts.map | 1 + .../@types/cce/3d/manager/engine/time.d.ts | 67 + .../cce/3d/manager/engine/time.d.ts.map | 1 + .../scene/@types/cce/3d/manager/gizmos.d.ts | 3 + .../@types/cce/3d/manager/gizmos.d.ts.map | 1 + .../cce/3d/manager/history/animation.d.ts | 30 + .../cce/3d/manager/history/animation.d.ts.map | 1 + .../cce/3d/manager/history/icommand.d.ts | 5 + .../cce/3d/manager/history/icommand.d.ts.map | 1 + .../@types/cce/3d/manager/history/prefab.d.ts | 22 + .../cce/3d/manager/history/prefab.d.ts.map | 1 + .../cce/3d/manager/history/preview.d.ts | 32 + .../cce/3d/manager/history/preview.d.ts.map | 1 + .../@types/cce/3d/manager/history/scene.d.ts | 44 + .../cce/3d/manager/history/scene.d.ts.map | 1 + .../3d/manager/history/snapshot-command.d.ts | 11 + .../manager/history/snapshot-command.d.ts.map | 1 + .../3d/manager/history/undo-manager-base.d.ts | 26 + .../history/undo-manager-base.d.ts.map | 1 + .../@types/cce/3d/manager/ipc/index.d.ts | 3 + .../@types/cce/3d/manager/ipc/index.d.ts.map | 1 + .../@types/cce/3d/manager/ipc/web/ipc.d.ts | 12 + .../cce/3d/manager/ipc/web/ipc.d.ts.map | 1 + .../cce/3d/manager/ipc/web/webview.d.ts | 18 + .../cce/3d/manager/ipc/web/webview.d.ts.map | 1 + .../scene/@types/cce/3d/manager/lod.d.ts | 40 + .../scene/@types/cce/3d/manager/lod.d.ts.map | 1 + .../3d/manager/material-preview/index.d.ts | 24 + .../manager/material-preview/index.d.ts.map | 1 + .../cce/3d/manager/mesh-preview/index.d.ts | 32 + .../3d/manager/mesh-preview/index.d.ts.map | 1 + .../scene/@types/cce/3d/manager/message.d.ts | 9 + .../@types/cce/3d/manager/message.d.ts.map | 1 + .../cce/3d/manager/mini-preview/apply.d.ts | 5 + .../3d/manager/mini-preview/apply.d.ts.map | 1 + .../cce/3d/manager/mini-preview/index.d.ts | 24 + .../3d/manager/mini-preview/index.d.ts.map | 1 + .../3d/manager/mini-preview/private.d.ts.map | 1 + .../cce/3d/manager/model-preview/index.d.ts | 89 + .../3d/manager/model-preview/index.d.ts.map | 1 + .../@types/cce/3d/manager/node/index.d.ts | 301 + .../@types/cce/3d/manager/node/index.d.ts.map | 1 + .../@types/cce/3d/manager/node/utils.d.ts | 33 + .../@types/cce/3d/manager/node/utils.d.ts.map | 1 + .../@types/cce/3d/manager/operation.d.ts | 3 + .../@types/cce/3d/manager/operation.d.ts.map | 1 + .../cce/3d/manager/particle-2d/index.d.ts | 7 + .../cce/3d/manager/particle-2d/index.d.ts.map | 1 + .../scene/@types/cce/3d/manager/particle.d.ts | 75 + .../@types/cce/3d/manager/particle.d.ts.map | 1 + .../cce/3d/manager/physics-2d/index.d.ts | 12 + .../cce/3d/manager/physics-2d/index.d.ts.map | 1 + .../manager/physics-2d/marching-squares.d.ts | 13 + .../physics-2d/marching-squares.d.ts.map | 1 + .../@types/cce/3d/manager/physics-2d/rdp.d.ts | 3 + .../cce/3d/manager/physics-2d/rdp.d.ts.map | 1 + .../scene/@types/cce/3d/manager/plugin.d.ts | 40 + .../@types/cce/3d/manager/plugin.d.ts.map | 1 + .../cce/3d/manager/prefab/component.d.ts | 52 + .../cce/3d/manager/prefab/component.d.ts.map | 1 + .../@types/cce/3d/manager/prefab/index.d.ts | 90 + .../cce/3d/manager/prefab/index.d.ts.map | 1 + .../@types/cce/3d/manager/prefab/node.d.ts | 158 + .../cce/3d/manager/prefab/node.d.ts.map | 1 + .../@types/cce/3d/manager/prefab/utils.d.ts | 164 + .../cce/3d/manager/prefab/utils.d.ts.map | 1 + .../cce/3d/manager/preview-play/index.d.ts | 62 + .../3d/manager/preview-play/index.d.ts.map | 1 + .../manager/preview/Interactive-preview.d.ts | 27 + .../preview/Interactive-preview.d.ts.map | 1 + .../@types/cce/3d/manager/preview/buffer.d.ts | 44 + .../cce/3d/manager/preview/buffer.d.ts.map | 1 + .../@types/cce/3d/manager/preview/index.d.ts | 28 + .../cce/3d/manager/preview/index.d.ts.map | 1 + .../cce/3d/manager/preview/preview-base.d.ts | 10 + .../3d/manager/preview/preview-base.d.ts.map | 1 + .../manager/preview/scene-preview/index.d.ts | 18 + .../preview/scene-preview/index.d.ts.map | 1 + .../3d/manager/scene-events-interface.d.ts | 22 + .../manager/scene-events-interface.d.ts.map | 1 + .../cce/3d/manager/scene-view/index.d.ts | 24 + .../cce/3d/manager/scene-view/index.d.ts.map | 1 + .../3d/manager/scene-view/light-manager.d.ts | 16 + .../manager/scene-view/light-manager.d.ts.map | 1 + .../manager/scene-view/scene-view-data.d.ts | 25 + .../scene-view/scene-view-data.d.ts.map | 1 + .../@types/cce/3d/manager/scene/index.d.ts | 4 + .../cce/3d/manager/scene/index.d.ts.map | 1 + .../scene/proxy/animation-scene-proxy.d.ts | 53 + .../proxy/animation-scene-proxy.d.ts.map | 1 + .../scene/proxy/gameview-scene-proxy.d.ts | 42 + .../scene/proxy/gameview-scene-proxy.d.ts.map | 1 + .../scene/proxy/general-scene-proxy.d.ts | 76 + .../scene/proxy/general-scene-proxy.d.ts.map | 1 + .../scene/proxy/prefab-scene-proxy.d.ts | 71 + .../scene/proxy/prefab-scene-proxy.d.ts.map | 1 + .../3d/manager/scene/proxy/scene-proxy.d.ts | 83 + .../manager/scene/proxy/scene-proxy.d.ts.map | 1 + .../cce/3d/manager/scene/scene-cache.d.ts | 25 + .../cce/3d/manager/scene/scene-cache.d.ts.map | 1 + .../cce/3d/manager/scene/scene-manager.d.ts | 93 + .../3d/manager/scene/scene-manager.d.ts.map | 1 + .../@types/cce/3d/manager/scene/utils.d.ts | 41 + .../cce/3d/manager/scene/utils.d.ts.map | 1 + .../scene/@types/cce/3d/manager/scripts.d.ts | 40 + .../@types/cce/3d/manager/scripts.d.ts.map | 1 + .../@types/cce/3d/manager/selection.d.ts | 22 + .../@types/cce/3d/manager/selection.d.ts.map | 1 + .../@types/cce/3d/manager/shortcut/index.d.ts | 18 + .../cce/3d/manager/shortcut/index.d.ts.map | 1 + .../3d/manager/skeleton-preview/index.d.ts | 16 + .../manager/skeleton-preview/index.d.ts.map | 1 + .../manager/startup/engine/adapter-util.d.ts | 12 + .../startup/engine/adapter-util.d.ts.map | 1 + .../cce/3d/manager/startup/engine/index.d.ts | 30 + .../3d/manager/startup/engine/index.d.ts.map | 1 + .../@types/cce/3d/manager/startup/index.d.ts | 66 + .../cce/3d/manager/startup/index.d.ts.map | 1 + .../@types/cce/3d/manager/startup/log.d.ts | 8 + .../cce/3d/manager/startup/log.d.ts.map | 1 + .../cce/3d/manager/startup/overwrite.d.ts | 14 + .../cce/3d/manager/startup/overwrite.d.ts.map | 1 + .../@types/cce/3d/manager/terrain/index.d.ts | 52 + .../cce/3d/manager/terrain/index.d.ts.map | 1 + .../cce/3d/manager/thumbnail/index.d.ts | 35 + .../cce/3d/manager/thumbnail/index.d.ts.map | 1 + .../thumbnail/mesh-thumbnail-generator.d.ts | 12 + .../mesh-thumbnail-generator.d.ts.map | 1 + .../thumbnail-generator-interface.d.ts | 15 + .../thumbnail-generator-interface.d.ts.map | 1 + .../scene/@types/cce/3d/manager/ui/index.d.ts | 7 + .../@types/cce/3d/manager/ui/index.d.ts.map | 1 + .../cce/3d/manager/unit-test/index.d.ts | 10 + .../cce/3d/manager/unit-test/index.d.ts.map | 1 + .../manager/unit-test/nested-prefab-test.d.ts | 8 + .../unit-test/nested-prefab-test.d.ts.map | 1 + .../unit-test/target-override-test.d.ts | 8 + .../unit-test/target-override-test.d.ts.map | 1 + .../unit-test/unit-test-interface.d.ts | 6 + .../unit-test/unit-test-interface.d.ts.map | 1 + .../cce/3d/manager/wireframe/index.d.ts | 59 + .../cce/3d/manager/wireframe/index.d.ts.map | 1 + .../cce/3d/manager/wireframe/wireframe.d.ts | 7 + .../3d/manager/wireframe/wireframe.d.ts.map | 1 + .../3d/preload/preview/editor-preview.d.ts | 14 + .../preload/preview/editor-preview.d.ts.map | 1 + .../cce/3d/preload/preview/preload.d.ts | 11 + .../cce/3d/preload/preview/preload.d.ts.map | 1 + .../@types/cce/3d/preload/web/preload.d.ts | 6 + .../cce/3d/preload/web/preload.d.ts.map | 1 + .../scene/@types/cce/3d/utils/dump/index.d.ts | 3 + .../@types/cce/3d/utils/dump/index.d.ts.map | 1 + .../utils/get-component-function-of-node.d.ts | 4 + .../get-component-function-of-node.d.ts.map | 1 + .../@types/cce/3d/utils/is-child-class.d.ts | 3 + .../cce/3d/utils/is-child-class.d.ts.map | 1 + .../state-machine/finite-state-machine.d.ts | 14 + .../finite-state-machine.d.ts.map | 1 + .../utils/state-machine/state-interface.d.ts | 7 + .../state-machine/state-interface.d.ts.map | 1 + .../3d/utils/state-machine/transition.d.ts | 14 + .../utils/state-machine/transition.d.ts.map | 1 + .../scene/@types/cce/3d/utils/timer-util.d.ts | 20 + .../@types/cce/3d/utils/timer-util.d.ts.map | 1 + .../scene/@types/cce/3d/utils/types.d.ts | 31 + .../scene/@types/cce/3d/utils/types.d.ts.map | 1 + .../scene/@types/cce/export/dump/asset.d.ts | 7 + .../@types/cce/export/dump/asset.d.ts.map | 1 + .../scene/@types/cce/export/dump/decode.d.ts | 27 + .../@types/cce/export/dump/decode.d.ts.map | 1 + .../@types/cce/export/dump/dump-defines.d.ts | 6 + .../cce/export/dump/dump-defines.d.ts.map | 1 + .../scene/@types/cce/export/dump/encode.d.ts | 27 + .../@types/cce/export/dump/encode.d.ts.map | 1 + .../scene/@types/cce/export/dump/index.d.ts | 60 + .../@types/cce/export/dump/index.d.ts.map | 1 + .../dump/types/animation-curve-dump.d.ts | 10 + .../dump/types/animation-curve-dump.d.ts.map | 1 + .../cce/export/dump/types/asset-dump.d.ts | 9 + .../cce/export/dump/types/asset-dump.d.ts.map | 1 + .../cce/export/dump/types/component-dump.d.ts | 9 + .../export/dump/types/component-dump.d.ts.map | 1 + .../cce/export/dump/types/dump-interface.d.ts | 24 + .../export/dump/types/dump-interface.d.ts.map | 1 + .../cce/export/dump/types/gradient-dump.d.ts | 9 + .../export/dump/types/gradient-dump.d.ts.map | 1 + .../cce/export/dump/types/node-dump.d.ts | 9 + .../cce/export/dump/types/node-dump.d.ts.map | 1 + .../cce/export/dump/types/number-dump.d.ts | 9 + .../export/dump/types/number-dump.d.ts.map | 1 + .../export/dump/types/real-curve-dump.d.ts | 12 + .../dump/types/real-curve-dump.d.ts.map | 1 + .../cce/export/dump/types/string-dump.d.ts | 9 + .../export/dump/types/string-dump.d.ts.map | 1 + .../export/dump/types/typed-array-dump.d.ts | 9 + .../dump/types/typed-array-dump.d.ts.map | 1 + .../export/dump/types/value-type-dump.d.ts | 9 + .../dump/types/value-type-dump.d.ts.map | 1 + .../scene/@types/cce/export/dump/utils.d.ts | 26 + .../@types/cce/export/dump/utils.d.ts.map | 1 + .../@types/cce/export/undo/animation.d.ts | 44 + .../@types/cce/export/undo/animation.d.ts.map | 1 + .../scene/@types/cce/export/undo/base.d.ts | 53 + .../@types/cce/export/undo/base.d.ts.map | 1 + .../scene/@types/cce/export/undo/index.d.ts | 3 + .../@types/cce/export/undo/index.d.ts.map | 1 + .../scene/@types/cce/export/undo/scene.d.ts | 106 + .../@types/cce/export/undo/scene.d.ts.map | 1 + .../scene/@types/cce/export/undo/test.d.ts | 7 + .../@types/cce/export/undo/test.d.ts.map | 1 + .../scene/@types/cce/public/EventEmitter.d.ts | 7 + .../@types/cce/public/EventEmitter.d.ts.map | 1 + .../scene/@types/cce/public/event-enum.d.ts | 28 + .../@types/cce/public/event-enum.d.ts.map | 1 + .../@types/cce/public/gizmos/3d/cce.d.ts | 23 + .../@types/cce/public/gizmos/3d/cce.d.ts.map | 1 + .../components/camera-component-gizmo.d.ts | 28 + .../camera-component-gizmo.d.ts.map | 1 + .../3d/elements/components/canvas-gizmo.d.ts | 19 + .../elements/components/canvas-gizmo.d.ts.map | 1 + ...-character-controller-component-gizmo.d.ts | 21 + ...racter-controller-component-gizmo.d.ts.map | 1 + ...-character-controller-component-gizmo.d.ts | 23 + ...racter-controller-component-gizmo.d.ts.map | 1 + .../colliders/2d/box-collider-2d-gizmo.d.ts | 29 + .../2d/box-collider-2d-gizmo.d.ts.map | 1 + .../2d/circle-collider-2d-gizmo.d.ts | 26 + .../2d/circle-collider-2d-gizmo.d.ts.map | 1 + .../2d/polygon-collider-2d-gizmo.d.ts | 44 + .../2d/polygon-collider-2d-gizmo.d.ts.map | 1 + .../box-collider-component-gizmo.d.ts | 21 + .../box-collider-component-gizmo.d.ts.map | 1 + .../capsule-collider-component-gizmo.d.ts | 23 + .../capsule-collider-component-gizmo.d.ts.map | 1 + .../cone-collider-component-gizmo.d.ts | 23 + .../cone-collider-component-gizmo.d.ts.map | 1 + .../cylinder-collider-component-gizmo.d.ts | 23 + ...cylinder-collider-component-gizmo.d.ts.map | 1 + .../colliders/mesh-collider-gizmo.d.ts | 18 + .../colliders/mesh-collider-gizmo.d.ts.map | 1 + .../colliders/plane-collider-gizmo.d.ts | 12 + .../colliders/plane-collider-gizmo.d.ts.map | 1 + .../colliders/simplex-collider-gizmo.d.ts | 20 + .../colliders/simplex-collider-gizmo.d.ts.map | 1 + .../sphere-collider-component-gizmo.d.ts | 23 + .../sphere-collider-component-gizmo.d.ts.map | 1 + .../joint/2d/Spring-joint-2d-gizmo.d.ts | 5 + .../joint/2d/Spring-joint-2d-gizmo.d.ts.map | 1 + .../joint/2d/distance-joint-2d-gizmo.d.ts | 9 + .../joint/2d/distance-joint-2d-gizmo.d.ts.map | 1 + .../joint/2d/fixed-joint-2d-gizmo.d.ts | 5 + .../joint/2d/fixed-joint-2d-gizmo.d.ts.map | 1 + .../joint/2d/hinge-joint-2d-gizmo.d.ts | 5 + .../joint/2d/hinge-joint-2d-gizmo.d.ts.map | 1 + .../components/joint/2d/joint-2d-gizmo.d.ts | 27 + .../joint/2d/joint-2d-gizmo.d.ts.map | 1 + .../joint/2d/relative-joint-2d-gizmo.d.ts | 5 + .../joint/2d/relative-joint-2d-gizmo.d.ts.map | 1 + .../joint/2d/slider-joint-2d-gizmo.d.ts | 5 + .../joint/2d/slider-joint-2d-gizmo.d.ts.map | 1 + .../joint/2d/wheel-joint-2d-gizmo.d.ts | 5 + .../joint/2d/wheel-joint-2d-gizmo.d.ts.map | 1 + .../components/light-component-gizmo.d.ts | 29 + .../components/light-component-gizmo.d.ts.map | 1 + .../directional-light-component-gizmo.d.ts | 20 + ...directional-light-component-gizmo.d.ts.map | 1 + .../components/light/light-probe-gizmo.d.ts | 57 + .../light/light-probe-gizmo.d.ts.map | 1 + .../light/sphere-light-component-gizmo.d.ts | 25 + .../sphere-light-component-gizmo.d.ts.map | 1 + .../light/spot-light-component-gizmo.d.ts | 31 + .../light/spot-light-component-gizmo.d.ts.map | 1 + .../elements/components/lod-group-gizmo.d.ts | 20 + .../components/lod-group-gizmo.d.ts.map | 1 + .../components/model-component-gizmo.d.ts | 20 + .../components/model-component-gizmo.d.ts.map | 1 + .../particle-system-component-gizmo.d.ts | 56 + .../particle-system-component-gizmo.d.ts.map | 1 + .../components/reflection-probe-gizmo.d.ts | 31 + .../reflection-probe-gizmo.d.ts.map | 1 + .../skinning-model-component-gizmo.d.ts | 19 + .../skinning-model-component-gizmo.d.ts.map | 1 + .../components/terrain/terrain-brush.d.ts | 62 + .../components/terrain/terrain-brush.d.ts.map | 1 + .../terrain/terrain-editor-manage.d.ts | 7 + .../terrain/terrain-editor-manage.d.ts.map | 1 + .../terrain/terrain-editor-mode.d.ts | 16 + .../terrain/terrain-editor-mode.d.ts.map | 1 + .../terrain/terrain-editor-paint.d.ts | 24 + .../terrain/terrain-editor-paint.d.ts.map | 1 + .../terrain/terrain-editor-sculpt-tools.d.ts | 31 + .../terrain-editor-sculpt-tools.d.ts.map | 1 + .../terrain/terrain-editor-sculpt.d.ts | 22 + .../terrain/terrain-editor-sculpt.d.ts.map | 1 + .../terrain/terrain-editor-select.d.ts | 29 + .../terrain/terrain-editor-select.d.ts.map | 1 + .../components/terrain/terrain-editor.d.ts | 31 + .../terrain/terrain-editor.d.ts.map | 1 + .../components/terrain/terrain-gizmo.d.ts | 78 + .../components/terrain/terrain-gizmo.d.ts.map | 1 + .../components/terrain/terrain-operation.d.ts | 66 + .../terrain/terrain-operation.d.ts.map | 1 + .../ui-transform-component-gizmo.d.ts | 20 + .../ui-transform-component-gizmo.d.ts.map | 1 + .../components/video-player-gizmo.d.ts | 27 + .../components/video-player-gizmo.d.ts.map | 1 + .../3d/elements/components/webview-gizmo.d.ts | 24 + .../components/webview-gizmo.d.ts.map | 1 + .../elements/controller/box-controller.d.ts | 31 + .../controller/box-controller.d.ts.map | 1 + .../controller/capsule-controller.d.ts | 47 + .../controller/capsule-controller.d.ts.map | 1 + .../controller/circle-controller.d.ts | 31 + .../controller/circle-controller.d.ts.map | 1 + .../elements/controller/cone-controller.d.ts | 42 + .../controller/cone-controller.d.ts.map | 1 + .../elements/controller/controller-base.d.ts | 107 + .../controller/controller-base.d.ts.map | 1 + .../controller/cylinder-controller.d.ts | 47 + .../controller/cylinder-controller.d.ts.map | 1 + .../direction-light-controller.d.ts | 10 + .../direction-light-controller.d.ts.map | 1 + .../elements/controller/disc-controller.d.ts | 57 + .../controller/disc-controller.d.ts.map | 1 + .../controller/editable-controller.d.ts | 44 + .../controller/editable-controller.d.ts.map | 1 + .../controller/frustum-controller.d.ts | 37 + .../controller/frustum-controller.d.ts.map | 1 + .../controller/hemisphere-controller.d.ts | 29 + .../controller/hemisphere-controller.d.ts.map | 1 + .../elements/controller/icon-controller.d.ts | 18 + .../controller/icon-controller.d.ts.map | 1 + .../elements/controller/image-controller.d.ts | 15 + .../controller/image-controller.d.ts.map | 1 + .../controller/joint-2d-controller.d.ts | 39 + .../controller/joint-2d-controller.d.ts.map | 1 + .../light-probe-bounding-box-controller.d.ts | 31 + ...ght-probe-bounding-box-controller.d.ts.map | 1 + .../controller/light-probe-controller.d.ts | 131 + .../light-probe-controller.d.ts.map | 1 + .../light-probe-tetrahedron-controller.d.ts | 31 + ...ight-probe-tetrahedron-controller.d.ts.map | 1 + .../elements/controller/line-controller.d.ts | 14 + .../controller/line-controller.d.ts.map | 1 + .../elements/controller/lines-controller.d.ts | 15 + .../controller/lines-controller.d.ts.map | 1 + .../elements/controller/lod-controller.d.ts | 19 + .../controller/lod-controller.d.ts.map | 1 + .../elements/controller/mesh-controller.d.ts | 11 + .../controller/mesh-controller.d.ts.map | 1 + .../particlesystem-cone-controller.d.ts | 42 + .../particlesystem-cone-controller.d.ts.map | 1 + .../elements/controller/plane-controller.d.ts | 11 + .../controller/plane-controller.d.ts.map | 1 + .../elements/controller/point-controller.d.ts | 11 + .../controller/point-controller.d.ts.map | 1 + .../controller/polygon-controller.d.ts | 51 + .../controller/polygon-controller.d.ts.map | 1 + .../controller/position-controller.d.ts | 48 + .../controller/position-controller.d.ts.map | 1 + .../elements/controller/quad-controller.d.ts | 25 + .../controller/quad-controller.d.ts.map | 1 + .../controller/rectangle-controller.d.ts | 64 + .../controller/rectangle-controller.d.ts.map | 1 + .../controller/rotation-controller.d.ts | 56 + .../controller/rotation-controller.d.ts.map | 1 + .../elements/controller/scale-controller.d.ts | 37 + .../controller/scale-controller.d.ts.map | 1 + .../controller/sphere-controller.d.ts | 34 + .../controller/sphere-controller.d.ts.map | 1 + .../controller/terrain-controller.d.ts | 20 + .../controller/terrain-controller.d.ts.map | 1 + .../controller/tetrahedron-cotroller.d.ts | 13 + .../controller/tetrahedron-cotroller.d.ts.map | 1 + .../controller/triangle-controller.d.ts | 14 + .../controller/triangle-controller.d.ts.map | 1 + .../controller/world-axis-controller.d.ts | 23 + .../controller/world-axis-controller.d.ts.map | 1 + .../public/gizmos/3d/elements/gizmo-base.d.ts | 54 + .../gizmos/3d/elements/gizmo-base.d.ts.map | 1 + .../icon-gizmo/camera-icon-gizmo.d.ts | 6 + .../icon-gizmo/camera-icon-gizmo.d.ts.map | 1 + .../directional-light-icon-gizmo.d.ts | 6 + .../directional-light-icon-gizmo.d.ts.map | 1 + .../elements/icon-gizmo/icon-gizmo-base.d.ts | 29 + .../icon-gizmo/icon-gizmo-base.d.ts.map | 1 + .../icon-gizmo/light-probe-icon-gizmo.d.ts | 6 + .../light-probe-icon-gizmo.d.ts.map | 1 + .../particle-system-icon-gizmo.d.ts | 6 + .../particle-system-icon-gizmo.d.ts.map | 1 + .../reflection-probe-icon-gizmo.d.ts | 7 + .../reflection-probe-icon-gizmo.d.ts.map | 1 + .../icon-gizmo/sphere-light-icon-gizmo.d.ts | 7 + .../sphere-light-icon-gizmo.d.ts.map | 1 + .../icon-gizmo/spot-light-icon-gizmo.d.ts | 7 + .../icon-gizmo/spot-light-icon-gizmo.d.ts.map | 1 + .../listener/gizmo-event-listener.d.ts | 9 + .../listener/gizmo-event-listener.d.ts.map | 1 + .../gizmo-operation-event-listener.d.ts | 20 + .../gizmo-operation-event-listener.d.ts.map | 1 + .../light-probe-edit-mode-listener.d.ts | 6 + .../light-probe-edit-mode-listener.d.ts.map | 1 + .../gizmos/3d/elements/scene-gizmo.d.ts | 16 + .../gizmos/3d/elements/scene-gizmo.d.ts.map | 1 + .../3d/elements/transform/position-gizmo.d.ts | 86 + .../transform/position-gizmo.d.ts.map | 1 + .../3d/elements/transform/rect-gizmo.d.ts | 57 + .../3d/elements/transform/rect-gizmo.d.ts.map | 1 + .../3d/elements/transform/rotation-gizmo.d.ts | 33 + .../transform/rotation-gizmo.d.ts.map | 1 + .../3d/elements/transform/scale-gizmo.d.ts | 24 + .../elements/transform/scale-gizmo.d.ts.map | 1 + .../elements/transform/transform-gizmo.d.ts | 31 + .../transform/transform-gizmo.d.ts.map | 1 + .../utils/controller-shape-collider.d.ts | 7 + .../utils/controller-shape-collider.d.ts.map | 1 + .../3d/elements/utils/controller-shape.d.ts | 151 + .../elements/utils/controller-shape.d.ts.map | 1 + .../3d/elements/utils/controller-utils.d.ts | 43 + .../elements/utils/controller-utils.d.ts.map | 1 + .../cce/public/gizmos/3d/gizmo-defines.d.ts | 18 + .../public/gizmos/3d/gizmo-defines.d.ts.map | 1 + .../cce/public/gizmos/3d/gizmo-manager.d.ts | 163 + .../public/gizmos/3d/gizmo-manager.d.ts.map | 1 + .../cce/public/gizmos/3d/gizmo-operation.d.ts | 58 + .../public/gizmos/3d/gizmo-operation.d.ts.map | 1 + .../@types/cce/public/gizmos/defines.d.ts | 99 + .../@types/cce/public/gizmos/defines.d.ts.map | 1 + .../cce/public/gizmos/gizmo-config.d.ts | 6 + .../cce/public/gizmos/gizmo-config.d.ts.map | 1 + .../scene/@types/cce/public/gizmos/index.d.ts | 3 + .../@types/cce/public/gizmos/index.d.ts.map | 1 + .../@types/cce/public/gizmos/utils/2d.d.ts | 18 + .../cce/public/gizmos/utils/2d.d.ts.map | 1 + .../@types/cce/public/gizmos/utils/3d.d.ts | 19 + .../cce/public/gizmos/utils/3d.d.ts.map | 1 + .../cce/public/gizmos/utils/engine/2d.d.ts | 38 + .../public/gizmos/utils/engine/2d.d.ts.map | 1 + .../cce/public/gizmos/utils/engine/3d.d.ts | 67 + .../public/gizmos/utils/engine/3d.d.ts.map | 1 + .../gizmos/utils/engine/engine-interface.d.ts | 30 + .../utils/engine/engine-interface.d.ts.map | 1 + .../cce/public/gizmos/utils/engine/index.d.ts | 3 + .../public/gizmos/utils/engine/index.d.ts.map | 1 + .../cce/public/gizmos/utils/external.d.ts | 14 + .../cce/public/gizmos/utils/external.d.ts.map | 1 + .../@types/cce/public/gizmos/utils/index.d.ts | 3 + .../cce/public/gizmos/utils/index.d.ts.map | 1 + .../@types/cce/public/gizmos/utils/misc.d.ts | 10 + .../cce/public/gizmos/utils/misc.d.ts.map | 1 + .../gizmos/utils/rect-transform-snapping.d.ts | 111 + .../utils/rect-transform-snapping.d.ts.map | 1 + .../cce/public/gizmos/utils/set-util.d.ts | 28 + .../cce/public/gizmos/utils/set-util.d.ts.map | 1 + .../gizmos/utils/transform-tool-data.d.ts | 63 + .../gizmos/utils/transform-tool-data.d.ts.map | 1 + .../public/gizmos/utils/utils-interface.d.ts | 58 + .../gizmos/utils/utils-interface.d.ts.map | 1 + .../scene/@types/cce/public/ipc/utils.d.ts | 36 + .../@types/cce/public/ipc/utils.d.ts.map | 1 + .../@types/cce/public/operation/index.d.ts | 81 + .../cce/public/operation/index.d.ts.map | 1 + .../selection/gizmo-selection-logic.d.ts | 30 + .../selection/gizmo-selection-logic.d.ts.map | 1 + .../cce/public/selection/gizmo-selection.d.ts | 32 + .../public/selection/gizmo-selection.d.ts.map | 1 + .../@types/cce/public/selection/index.d.ts | 72 + .../cce/public/selection/index.d.ts.map | 1 + .../cce/public/selection/uuid-array.d.ts | 13 + .../cce/public/selection/uuid-array.d.ts.map | 1 + .../packages/scene/@types/cce/utils/aabb.d.ts | 130 + .../scene/@types/cce/utils/aabb.d.ts.map | 1 + .../scene/@types/cce/utils/assertion.d.ts | 14 + .../scene/@types/cce/utils/assertion.d.ts.map | 1 + .../scene/@types/cce/utils/asset.d.ts | 9 + .../scene/@types/cce/utils/asset.d.ts.map | 1 + .../@types/cce/utils/callbacks-invoker.d.ts | 99 + .../cce/utils/callbacks-invoker.d.ts.map | 1 + .../@types/cce/utils/device-adapter.d.ts | 45 + .../@types/cce/utils/device-adapter.d.ts.map | 1 + .../scene/@types/cce/utils/dump/decode.d.ts | 28 + .../@types/cce/utils/dump/decode.d.ts.map | 1 + .../@types/cce/utils/dump/dump-defines.d.ts | 6 + .../cce/utils/dump/dump-defines.d.ts.map | 1 + .../scene/@types/cce/utils/dump/encode.d.ts | 27 + .../@types/cce/utils/dump/encode.d.ts.map | 1 + .../scene/@types/cce/utils/dump/index.d.ts | 18 + .../@types/cce/utils/dump/index.d.ts.map | 1 + .../dump/types/animation-curve-dump.d.ts | 10 + .../dump/types/animation-curve-dump.d.ts.map | 1 + .../cce/utils/dump/types/asset-dump.d.ts | 9 + .../cce/utils/dump/types/asset-dump.d.ts.map | 1 + .../cce/utils/dump/types/component-dump.d.ts | 9 + .../utils/dump/types/component-dump.d.ts.map | 1 + .../cce/utils/dump/types/dump-interface.d.ts | 6 + .../utils/dump/types/dump-interface.d.ts.map | 1 + .../cce/utils/dump/types/gradient-dump.d.ts | 9 + .../utils/dump/types/gradient-dump.d.ts.map | 1 + .../cce/utils/dump/types/node-dump.d.ts | 9 + .../cce/utils/dump/types/node-dump.d.ts.map | 1 + .../cce/utils/dump/types/number-dump.d.ts | 9 + .../cce/utils/dump/types/number-dump.d.ts.map | 1 + .../cce/utils/dump/types/real-curve-dump.d.ts | 12 + .../utils/dump/types/real-curve-dump.d.ts.map | 1 + .../cce/utils/dump/types/string-dump.d.ts | 9 + .../cce/utils/dump/types/string-dump.d.ts.map | 1 + .../utils/dump/types/typed-array-dump.d.ts | 9 + .../dump/types/typed-array-dump.d.ts.map | 1 + .../cce/utils/dump/types/value-type-dump.d.ts | 9 + .../utils/dump/types/value-type-dump.d.ts.map | 1 + .../scene/@types/cce/utils/dump/utils.d.ts | 25 + .../@types/cce/utils/dump/utils.d.ts.map | 1 + .../packages/scene/@types/cce/utils/env.d.ts | 10 + .../scene/@types/cce/utils/env.d.ts.map | 1 + .../scene/@types/cce/utils/event-emitter.d.ts | 9 + .../@types/cce/utils/event-emitter.d.ts.map | 1 + .../@types/cce/utils/geom-utils/enums.d.ts | 21 + .../cce/utils/geom-utils/enums.d.ts.map | 1 + .../cce/utils/geom-utils/intersect.d.ts | 8 + .../cce/utils/geom-utils/intersect.d.ts.map | 1 + .../@types/cce/utils/geom-utils/ray.d.ts | 93 + .../@types/cce/utils/geom-utils/ray.d.ts.map | 1 + .../@types/cce/utils/geom-utils/triangle.d.ts | 107 + .../cce/utils/geom-utils/triangle.d.ts.map | 1 + .../scene/@types/cce/utils/graphics.d.ts | 11 + .../scene/@types/cce/utils/graphics.d.ts.map | 1 + .../scene/@types/cce/utils/index.d.ts | 4 + .../scene/@types/cce/utils/index.d.ts.map | 1 + .../scene/@types/cce/utils/ipc/utils.d.ts | 44 + .../scene/@types/cce/utils/ipc/utils.d.ts.map | 1 + .../scene/@types/cce/utils/lodash.d.ts | 3 + .../scene/@types/cce/utils/lodash.d.ts.map | 1 + .../scene/@types/cce/utils/math/index.d.ts | 179 + .../@types/cce/utils/math/index.d.ts.map | 1 + .../scene/@types/cce/utils/math/mat3.d.ts | 124 + .../scene/@types/cce/utils/math/mat3.d.ts.map | 1 + .../scene/@types/cce/utils/math/mat4.d.ts | 209 + .../scene/@types/cce/utils/math/mat4.d.ts.map | 1 + .../scene/@types/cce/utils/math/quat.d.ts | 179 + .../scene/@types/cce/utils/math/quat.d.ts.map | 1 + .../@types/cce/utils/math/type-define.d.ts | 74 + .../cce/utils/math/type-define.d.ts.map | 1 + .../scene/@types/cce/utils/math/utils.d.ts | 135 + .../@types/cce/utils/math/utils.d.ts.map | 1 + .../scene/@types/cce/utils/math/vec2.d.ts | 154 + .../scene/@types/cce/utils/math/vec2.d.ts.map | 1 + .../scene/@types/cce/utils/math/vec3.d.ts | 208 + .../scene/@types/cce/utils/math/vec3.d.ts.map | 1 + .../@types/cce/utils/memop/recycle-pool.d.ts | 44 + .../cce/utils/memop/recycle-pool.d.ts.map | 1 + .../packages/scene/@types/cce/utils/misc.d.ts | 8 + .../scene/@types/cce/utils/misc.d.ts.map | 1 + .../packages/scene/@types/cce/utils/node.d.ts | 102 + .../scene/@types/cce/utils/node.d.ts.map | 1 + .../packages/scene/@types/cce/utils/path.d.ts | 3 + .../scene/@types/cce/utils/path.d.ts.map | 1 + .../packages/scene/@types/cce/utils/pool.d.ts | 11 + .../scene/@types/cce/utils/pool.d.ts.map | 1 + .../scene/@types/cce/utils/raycast.d.ts | 118 + .../scene/@types/cce/utils/raycast.d.ts.map | 1 + .../scene/@types/cce/utils/window.d.ts | 7 + .../scene/@types/cce/utils/window.d.ts.map | 1 + @types/packages/scene/@types/engine-view.d.ts | 72 + @types/packages/scene/@types/message.d.ts | 320 + @types/packages/scene/@types/public.d.ts | 358 + .../scene/@types/scene-facade-interface.d.ts | 860 + @types/packages/server/@types/message.d.ts | 11 + @types/packages/server/@types/package.d.ts | 27 + .../packages/shortcuts/@types/shortcut.d.ts | 20 + .../taobao-creative-app/@types/index.d.ts | 16 + .../taobao-mini-game/@types/index.d.ts | 96 + .../packages/vivo-mini-game/@types/index.d.ts | 33 + @types/packages/web-desktop/@types/index.d.ts | 29 + @types/packages/web-mobile/@types/index.d.ts | 27 + @types/packages/wechatgame/@types/index.d.ts | 104 + .../packages/wechatprogram/@types/index.d.ts | 99 + @types/packages/windows/@types/index.d.ts | 31 + .../xiaomi-quick-game/@types/index.d.ts | 36 + @types/utils.d.ts | 9 + @types/utils/index.d.ts | 247 + README.md | 72 + cc.d.ts | 8 + .../inspector/behavior-editor.js | 79 + dist/main.js | 29 + dist/panels/default/index.js | 1299 ++ dist/runtime/base/Action.js | 7 + dist/runtime/base/Composite.js | 12 + dist/runtime/base/Condition.js | 7 + dist/runtime/base/Decorator.js | 7 + dist/runtime/base/Node.js | 25 + dist/runtime/base/ParentNode.js | 30 + dist/runtime/base/index.js | 22 + dist/runtime/component/Behavior.js | 108 + dist/runtime/component/BehaviorEditor.js | 18 + dist/runtime/component/BehaviorManager.js | 383 + dist/runtime/core/Behavior.js | 115 + dist/runtime/core/BehaviorEditor.js | 21 + dist/runtime/core/BehaviorManager.js | 540 + dist/runtime/core/BehaviorSource.js | 77 + dist/runtime/core/BehaviorTree.js | 150 + dist/runtime/core/Blackboard.js | 26 + dist/runtime/core/base/Action.js | 7 + dist/runtime/core/base/Composite.js | 12 + dist/runtime/core/base/Condition.js | 7 + dist/runtime/core/base/Decorator.js | 7 + dist/runtime/core/base/Node.js | 25 + dist/runtime/core/base/ParentNode.js | 30 + dist/runtime/core/base/index.js | 22 + dist/runtime/core/biz/Action/Log.js | 25 + dist/runtime/core/biz/Action/Wait.js | 34 + dist/runtime/core/biz/Action/index.js | 18 + dist/runtime/core/biz/Composite/Parallel.js | 59 + .../core/biz/Composite/RandomSequence.js | 84 + dist/runtime/core/biz/Composite/Selector.js | 47 + dist/runtime/core/biz/Composite/Sequence.js | 47 + dist/runtime/core/biz/Composite/index.js | 20 + .../runtime/core/biz/Condition/ConditionHP.js | 22 + dist/runtime/core/biz/Condition/index.js | 17 + dist/runtime/core/biz/Decorator/Inverter.js | 32 + dist/runtime/core/biz/Decorator/Repeater.js | 36 + .../core/biz/Decorator/UntilSuccess.js | 30 + dist/runtime/core/biz/Decorator/index.js | 19 + dist/runtime/core/biz/index.js | 20 + dist/runtime/core/decorator.js | 13 + dist/runtime/core/decorator/index.js | 13 + dist/runtime/core/enum/index.js | 17 + dist/runtime/core/index.js | 23 + dist/runtime/core/utils.js | 120 + dist/runtime/core/utils/index.js | 65 + dist/runtime/decorator/index.js | 13 + dist/runtime/index.js | 18 + dist/runtime/node/action/ActionCommon.js | 17 + dist/runtime/node/action/Log.js | 26 + dist/runtime/node/action/Wait.js | 35 + dist/runtime/node/action/index.js | 17 + dist/runtime/node/base/Action.js | 7 + dist/runtime/node/base/Composite.js | 12 + dist/runtime/node/base/Condition.js | 7 + dist/runtime/node/base/Decorator.js | 7 + dist/runtime/node/base/Node.js | 27 + dist/runtime/node/base/ParentNode.js | 34 + dist/runtime/node/base/index.js | 22 + dist/runtime/node/composite/Parallel.js | 54 + dist/runtime/node/composite/RandomSequence.js | 64 + dist/runtime/node/composite/Selector.js | 48 + dist/runtime/node/composite/Sequence.js | 48 + dist/runtime/node/composite/index.js | 20 + .../runtime/node/condition/ConditionCommon.js | 16 + dist/runtime/node/condition/ConditionHP.js | 23 + dist/runtime/node/condition/index.js | 17 + dist/runtime/node/decorator/Inverter.js | 33 + dist/runtime/node/decorator/Repeater.js | 43 + dist/runtime/node/decorator/UntilSuccess.js | 23 + dist/runtime/node/decorator/index.js | 19 + dist/runtime/node/enum/index.js | 17 + dist/runtime/node/index.js | 22 + dist/runtime/utils/index.js | 65 + i18n/en.js | 6 + i18n/zh.js | 6 + lib/index.js | 15803 +++++++++++++++ package-lock.json | 68 + package.json | 66 + .../inspector/behavior-editor.ts | 81 + src/main.ts | 24 + src/panels/default/index.ts | 1401 ++ src/panels/static/logo.png | Bin 0 -> 41308 bytes src/panels/static/style/default/index.css | 115 + src/panels/static/template/default/index.html | 3 + src/panels/static/template/vue/app.html | 192 + src/runtime/core.meta | 9 + src/runtime/core/Behavior.ts.meta | 9 + src/runtime/core/BehaviorEditor.ts | 9 + src/runtime/core/BehaviorEditor.ts.meta | 9 + src/runtime/core/BehaviorManager.ts | 591 + src/runtime/core/BehaviorManager.ts.meta | 9 + src/runtime/core/BehaviorSource.ts | 73 + src/runtime/core/BehaviorSource.ts.meta | 9 + src/runtime/core/BehaviorTree.ts | 153 + src/runtime/core/BehaviorTree.ts.meta | 9 + src/runtime/core/Blackboard.ts | 27 + src/runtime/core/Blackboard.ts.meta | 9 + src/runtime/core/decorator.ts | 10 + src/runtime/core/decorator.ts.meta | 9 + src/runtime/core/index.ts | 7 + src/runtime/core/index.ts.meta | 9 + src/runtime/core/utils.ts | 132 + src/runtime/core/utils.ts.meta | 9 + src/runtime/index.ts | 2 + src/runtime/index.ts.meta | 9 + src/runtime/node.meta | 9 + src/runtime/node/action.meta | 9 + src/runtime/node/action/ActionCommon.ts | 5 + src/runtime/node/action/ActionCommon.ts.meta | 9 + src/runtime/node/action/Log.ts.meta | 9 + src/runtime/node/action/Wait.ts.meta | 9 + src/runtime/node/action/index.ts | 1 + src/runtime/node/action/index.ts.meta | 9 + src/runtime/node/base.meta | 9 + src/runtime/node/base/Action.ts | 3 + src/runtime/node/base/Action.ts.meta | 9 + src/runtime/node/base/Composite.ts | 6 + src/runtime/node/base/Composite.ts.meta | 9 + src/runtime/node/base/Condition.ts | 3 + src/runtime/node/base/Condition.ts.meta | 9 + src/runtime/node/base/Decorator.ts | 3 + src/runtime/node/base/Decorator.ts.meta | 9 + src/runtime/node/base/Node.ts | 56 + src/runtime/node/base/Node.ts.meta | 9 + src/runtime/node/base/ParentNode.ts | 47 + src/runtime/node/base/ParentNode.ts.meta | 9 + src/runtime/node/base/index.ts | 6 + src/runtime/node/base/index.ts.meta | 9 + src/runtime/node/composite.meta | 9 + .../node/composite/BTNodeParallel.ts.meta | 9 + .../node/composite/BTNodeRandom.ts.meta | 9 + .../node/composite/BTNodeSelector.ts.meta | 9 + .../node/composite/BTNodeSequence.ts.meta | 9 + src/runtime/node/composite/Parallel.ts | 47 + src/runtime/node/composite/Parallel.ts.meta | 9 + src/runtime/node/composite/RandomSequence.ts | 56 + .../node/composite/RandomSequence.ts.meta | 9 + src/runtime/node/composite/Selector.ts | 40 + src/runtime/node/composite/Selector.ts.meta | 9 + src/runtime/node/composite/Sequence.ts | 40 + src/runtime/node/composite/Sequence.ts.meta | 9 + src/runtime/node/composite/index.ts | 4 + src/runtime/node/composite/index.ts.meta | 9 + src/runtime/node/condition.meta | 9 + src/runtime/node/condition/ConditionCommon.ts | 5 + .../node/condition/ConditionCommon.ts.meta | 9 + .../node/condition/ConditionHP.ts.meta | 9 + .../node/condition/ConditionalHP.ts.meta | 9 + .../node/condition/ConditionalMP.ts.meta | 9 + src/runtime/node/condition/index.ts | 1 + src/runtime/node/condition/index.ts.meta | 9 + src/runtime/node/decorator.meta | 9 + src/runtime/node/decorator/Inverter.ts | 24 + src/runtime/node/decorator/Inverter.ts.meta | 9 + src/runtime/node/decorator/Repeater.ts | 35 + src/runtime/node/decorator/Repeater.ts.meta | 9 + src/runtime/node/decorator/UntilSuccess.ts | 13 + .../node/decorator/UntilSuccess.ts.meta | 9 + src/runtime/node/decorator/index.ts | 3 + src/runtime/node/decorator/index.ts.meta | 9 + src/runtime/node/enum.meta | 9 + src/runtime/node/enum/index.ts | 13 + src/runtime/node/enum/index.ts.meta | 9 + src/runtime/node/index.ts | 6 + src/runtime/node/index.ts.meta | 9 + src/shims-vue.d.ts | 4 + tsconfig.json | 15 + 964 files changed, 62409 insertions(+) create mode 100644 .gitignore create mode 100644 @types/editor.d.ts create mode 100644 @types/electron.d.ts create mode 100644 @types/extension.d.ts create mode 100644 @types/index.d.ts create mode 100644 @types/message.d.ts create mode 100644 @types/packages/adsense-h5g-plugin/@types/index.d.ts create mode 100644 @types/packages/alipay-mini-game/@types/index.d.ts create mode 100644 @types/packages/android/@types/index.d.ts create mode 100644 @types/packages/animation-graph/@types/engine-editor-extras.d.ts create mode 100644 @types/packages/animator/@types/vue.d.ts create mode 100644 @types/packages/asset-db/@types/message.d.ts create mode 100644 @types/packages/asset-db/@types/public.d.ts create mode 100644 @types/packages/assets/@types/public.d.ts create mode 100644 @types/packages/assets/@types/vue.d.ts create mode 100644 @types/packages/builder/@types/index.d.ts create mode 100644 @types/packages/builder/@types/message.d.ts create mode 100644 @types/packages/builder/@types/public/build-plugin.d.ts create mode 100644 @types/packages/builder/@types/public/build-result.d.ts create mode 100644 @types/packages/builder/@types/public/global.d.ts create mode 100644 @types/packages/builder/@types/public/index.d.ts create mode 100644 @types/packages/builder/@types/public/options.d.ts create mode 100644 @types/packages/builder/@types/public/texture-compress.d.ts create mode 100644 @types/packages/bytedance-mini-game/@types/index.d.ts create mode 100644 @types/packages/certificate/@types/index.d.ts create mode 100644 @types/packages/channel-upload-tools/@types/index.d.ts create mode 100644 @types/packages/console/@types/pritate.d.ts create mode 100644 @types/packages/engine-extends/@types/glTF.d.ts create mode 100644 @types/packages/engine-extends/@types/gltf-validator.d.ts create mode 100644 @types/packages/engine-extends/@types/i18n-well-defined.d.ts create mode 100644 @types/packages/engine-extends/@types/third-parts.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/index.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/index.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/manager/asset.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/manager/asset.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/manager/component.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/manager/component.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/manager/dialog.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/manager/dialog.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/manager/node.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/manager/node.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/manager/script.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/manager/script.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/missing-reporter/missing-class-reporter.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/missing-reporter/missing-class-reporter.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/missing-reporter/missing-object-reporter.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/missing-reporter/missing-object-reporter.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/missing-reporter/missing-reporter.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/missing-reporter/missing-reporter.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/missing-reporter/object-walker.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/missing-reporter/object-walker.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/utils/deserialize.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/utils/deserialize.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/utils/geometry.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/utils/geometry.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/utils/prefab.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/utils/prefab.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/compiled/builder.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/compiled/builder.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/compiled/create-class-mask.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/compiled/create-class-mask.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/compiled/pack-jsons.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/compiled/pack-jsons.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/compiled/types.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/compiled/types.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/dynamic-builder.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/dynamic-builder.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/index.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/index.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/parser.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/utils/serialize/parser.d.ts.map create mode 100644 @types/packages/engine/@types/editor-extends/utils/uuid.d.ts create mode 100644 @types/packages/engine/@types/editor-extends/utils/uuid.d.ts.map create mode 100644 @types/packages/engine/@types/engine-compiler/index.d.ts create mode 100644 @types/packages/engine/@types/engine-compiler/index.d.ts.map create mode 100644 @types/packages/engine/@types/index.d.ts create mode 100644 @types/packages/engine/@types/message.d.ts create mode 100644 @types/packages/engine/@types/module.d.ts create mode 100644 @types/packages/fb-instant-games/@types/index.d.ts create mode 100644 @types/packages/huawei-agc/@types/index.d.ts create mode 100644 @types/packages/huawei-quick-game/@types/index.d.ts create mode 100644 @types/packages/information/@types/message.d.ts create mode 100644 @types/packages/information/@types/public.d.ts create mode 100644 @types/packages/ios/@types/index.d.ts create mode 100644 @types/packages/linux/@types/index.d.ts create mode 100644 @types/packages/mac/@types/index.d.ts create mode 100644 @types/packages/ohos/@types/index.d.ts create mode 100644 @types/packages/openharmony/@types/index.d.ts create mode 100644 @types/packages/oppo-mini-game/@types/index.d.ts create mode 100644 @types/packages/package-asset/@types/public.d.ts create mode 100644 @types/packages/preferences/@types/index.d.ts create mode 100644 @types/packages/preferences/@types/message.d.ts create mode 100644 @types/packages/preview/@types/index.d.ts create mode 100644 @types/packages/program/@types/message.d.ts create mode 100644 @types/packages/program/@types/public.d.ts create mode 100644 @types/packages/programming/@types/message.d.ts create mode 100644 @types/packages/project/@types/index.d.ts create mode 100644 @types/packages/project/@types/message.d.ts create mode 100644 @types/packages/runtime-dev-tools/@types/index.d.ts create mode 100644 @types/packages/scene/@types/animation/public.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/assets.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/assets.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/facade/animation-scene-facade.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/facade/animation-scene-facade.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/facade/general-scene-facade.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/facade/general-scene-facade.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/facade/prefab-scene-facade.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/facade/prefab-scene-facade.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/facade/preview-scene-facade.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/facade/preview-scene-facade.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/facade/scene-facade-fsm.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/facade/scene-facade-fsm.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/facade/scene-facade-manager.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/facade/scene-facade-manager.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/facade/scene-facade-state-interface.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/facade/scene-facade-state-interface.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/facade/scene-facade-state-transition.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/facade/scene-facade-state-transition.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation-graph-preview/base.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation-graph-preview/base.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation-graph-preview/motion.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation-graph-preview/motion.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation-graph-preview/transition.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation-graph-preview/transition.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/editor-animation-aux-curve.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/editor-animation-aux-curve.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/editor-animation-clip.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/editor-animation-clip.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/editor-animation-combined-curve.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/editor-animation-combined-curve.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/editor-animation-curve-base.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/editor-animation-curve-base.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/editor-animation-curve.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/editor-animation-curve.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/type-defines.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/type-defines.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/uniform-handler.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/uniform-handler.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/animation/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/animation-graph-variant.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/animation-graph-variant.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/animation-mask.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/animation-mask.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/asset-watcher.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/asset-watcher.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/edit-component-asset.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/edit-component-asset.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/material.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/material.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/physics-material.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/physics-material.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/render-pipeline.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/render-pipeline.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/asset/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/camera-controller-2d.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/camera-controller-2d.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/mode/idle-mode.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/mode/idle-mode.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/mode/mode-base.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/mode/mode-base.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/mode/pan-mode.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/mode/pan-mode.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/ruler-interface.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/ruler-interface.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/web/ruler.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/2d/web/ruler.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/camera-controller-3d.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/camera-controller-3d.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/mode/idle-mode.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/mode/idle-mode.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/mode/mode-base.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/mode/mode-base.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/mode/orbit-mode.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/mode/orbit-mode.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/mode/pan-mode.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/mode/pan-mode.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/mode/wander-mode.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/3d/mode/wander-mode.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/animate-value.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/animate-value.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/camera-controller-base.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/camera-controller-base.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/editor-camera-components.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/editor-camera-components.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/grid/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/grid/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/grid/linear-ticks.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/grid/linear-ticks.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/listener.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/listener.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/operation-mode-interface.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/operation-mode-interface.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/tween.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/tween.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/camera/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/component/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/component/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/component/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/component/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/effects.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/effects.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/engine/geometry_renderer.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/engine/geometry_renderer.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/engine/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/engine/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/engine/time.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/engine/time.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/gizmos.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/gizmos.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/animation.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/animation.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/icommand.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/icommand.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/prefab.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/prefab.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/preview.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/preview.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/scene.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/scene.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/snapshot-command.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/snapshot-command.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/undo-manager-base.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/history/undo-manager-base.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/ipc/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/ipc/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/ipc/web/ipc.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/ipc/web/ipc.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/ipc/web/webview.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/ipc/web/webview.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/lod.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/lod.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/material-preview/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/material-preview/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/mesh-preview/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/mesh-preview/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/message.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/message.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/mini-preview/apply.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/mini-preview/apply.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/mini-preview/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/mini-preview/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/mini-preview/private.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/model-preview/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/model-preview/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/node/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/node/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/node/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/node/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/operation.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/operation.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/particle-2d/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/particle-2d/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/particle.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/particle.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/physics-2d/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/physics-2d/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/physics-2d/marching-squares.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/physics-2d/marching-squares.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/physics-2d/rdp.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/physics-2d/rdp.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/plugin.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/plugin.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/prefab/component.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/prefab/component.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/prefab/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/prefab/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/prefab/node.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/prefab/node.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/prefab/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/prefab/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview-play/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview-play/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview/Interactive-preview.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview/Interactive-preview.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview/buffer.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview/buffer.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview/preview-base.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview/preview-base.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview/scene-preview/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/preview/scene-preview/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene-events-interface.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene-events-interface.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene-view/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene-view/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene-view/light-manager.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene-view/light-manager.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene-view/scene-view-data.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene-view/scene-view-data.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/proxy/animation-scene-proxy.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/proxy/animation-scene-proxy.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/proxy/gameview-scene-proxy.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/proxy/gameview-scene-proxy.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/proxy/general-scene-proxy.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/proxy/general-scene-proxy.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/proxy/prefab-scene-proxy.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/proxy/prefab-scene-proxy.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/proxy/scene-proxy.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/proxy/scene-proxy.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/scene-cache.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/scene-cache.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/scene-manager.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/scene-manager.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scene/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/scripts.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/scripts.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/selection.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/selection.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/shortcut/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/shortcut/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/skeleton-preview/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/skeleton-preview/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/startup/engine/adapter-util.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/startup/engine/adapter-util.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/startup/engine/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/startup/engine/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/startup/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/startup/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/startup/log.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/startup/log.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/startup/overwrite.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/startup/overwrite.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/terrain/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/terrain/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/thumbnail/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/thumbnail/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/thumbnail/mesh-thumbnail-generator.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/thumbnail/mesh-thumbnail-generator.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/thumbnail/thumbnail-generator-interface.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/thumbnail/thumbnail-generator-interface.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/ui/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/ui/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/unit-test/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/unit-test/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/unit-test/nested-prefab-test.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/unit-test/nested-prefab-test.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/unit-test/target-override-test.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/unit-test/target-override-test.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/unit-test/unit-test-interface.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/unit-test/unit-test-interface.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/wireframe/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/wireframe/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/manager/wireframe/wireframe.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/manager/wireframe/wireframe.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/preload/preview/editor-preview.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/preload/preview/editor-preview.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/preload/preview/preload.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/preload/preview/preload.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/preload/web/preload.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/preload/web/preload.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/utils/dump/index.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/utils/dump/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/utils/get-component-function-of-node.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/utils/get-component-function-of-node.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/utils/is-child-class.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/utils/is-child-class.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/utils/state-machine/finite-state-machine.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/utils/state-machine/finite-state-machine.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/utils/state-machine/state-interface.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/utils/state-machine/state-interface.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/utils/state-machine/transition.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/utils/state-machine/transition.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/utils/timer-util.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/utils/timer-util.d.ts.map create mode 100644 @types/packages/scene/@types/cce/3d/utils/types.d.ts create mode 100644 @types/packages/scene/@types/cce/3d/utils/types.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/asset.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/asset.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/decode.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/decode.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/dump-defines.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/dump-defines.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/encode.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/encode.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/index.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/types/animation-curve-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/types/animation-curve-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/types/asset-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/types/asset-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/types/component-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/types/component-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/types/dump-interface.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/types/dump-interface.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/types/gradient-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/types/gradient-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/types/node-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/types/node-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/types/number-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/types/number-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/types/real-curve-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/types/real-curve-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/types/string-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/types/string-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/types/typed-array-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/types/typed-array-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/types/value-type-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/types/value-type-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/dump/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/export/dump/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/undo/animation.d.ts create mode 100644 @types/packages/scene/@types/cce/export/undo/animation.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/undo/base.d.ts create mode 100644 @types/packages/scene/@types/cce/export/undo/base.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/undo/index.d.ts create mode 100644 @types/packages/scene/@types/cce/export/undo/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/undo/scene.d.ts create mode 100644 @types/packages/scene/@types/cce/export/undo/scene.d.ts.map create mode 100644 @types/packages/scene/@types/cce/export/undo/test.d.ts create mode 100644 @types/packages/scene/@types/cce/export/undo/test.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/EventEmitter.d.ts create mode 100644 @types/packages/scene/@types/cce/public/EventEmitter.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/event-enum.d.ts create mode 100644 @types/packages/scene/@types/cce/public/event-enum.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/cce.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/cce.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/camera-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/camera-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/canvas-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/canvas-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/character-controllers/box-character-controller-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/character-controllers/box-character-controller-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/character-controllers/capsule-character-controller-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/character-controllers/capsule-character-controller-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/2d/box-collider-2d-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/2d/box-collider-2d-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/2d/circle-collider-2d-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/2d/circle-collider-2d-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/2d/polygon-collider-2d-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/2d/polygon-collider-2d-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/box-collider-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/box-collider-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/capsule-collider-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/capsule-collider-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/cone-collider-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/cone-collider-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/cylinder-collider-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/cylinder-collider-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/mesh-collider-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/mesh-collider-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/plane-collider-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/plane-collider-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/simplex-collider-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/simplex-collider-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/sphere-collider-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/colliders/sphere-collider-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/Spring-joint-2d-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/Spring-joint-2d-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/distance-joint-2d-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/distance-joint-2d-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/fixed-joint-2d-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/fixed-joint-2d-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/hinge-joint-2d-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/hinge-joint-2d-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/joint-2d-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/joint-2d-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/relative-joint-2d-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/relative-joint-2d-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/slider-joint-2d-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/slider-joint-2d-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/wheel-joint-2d-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/joint/2d/wheel-joint-2d-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/light-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/light-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/light/directional-light-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/light/directional-light-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/light/light-probe-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/light/light-probe-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/light/sphere-light-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/light/sphere-light-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/light/spot-light-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/light/spot-light-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/lod-group-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/lod-group-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/model-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/model-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/particle-system-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/particle-system-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/reflection-probe-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/reflection-probe-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/skinning-model-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/skinning-model-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-brush.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-brush.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-manage.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-manage.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-mode.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-mode.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-paint.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-paint.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-sculpt-tools.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-sculpt-tools.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-sculpt.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-sculpt.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-select.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor-select.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-editor.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-operation.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/terrain/terrain-operation.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/ui-transform-component-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/ui-transform-component-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/video-player-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/video-player-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/webview-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/components/webview-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/box-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/box-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/capsule-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/capsule-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/circle-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/circle-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/cone-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/cone-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/controller-base.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/controller-base.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/cylinder-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/cylinder-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/direction-light-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/direction-light-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/disc-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/disc-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/editable-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/editable-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/frustum-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/frustum-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/hemisphere-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/hemisphere-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/icon-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/icon-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/image-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/image-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/joint-2d-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/joint-2d-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/light-probe-bounding-box-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/light-probe-bounding-box-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/light-probe-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/light-probe-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/light-probe-tetrahedron-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/light-probe-tetrahedron-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/line-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/line-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/lines-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/lines-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/lod-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/lod-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/mesh-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/mesh-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/particlesystem-cone-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/particlesystem-cone-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/plane-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/plane-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/point-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/point-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/polygon-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/polygon-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/position-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/position-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/quad-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/quad-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/rectangle-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/rectangle-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/rotation-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/rotation-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/scale-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/scale-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/sphere-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/sphere-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/terrain-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/terrain-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/tetrahedron-cotroller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/tetrahedron-cotroller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/triangle-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/triangle-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/world-axis-controller.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/controller/world-axis-controller.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/gizmo-base.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/gizmo-base.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/camera-icon-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/camera-icon-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/directional-light-icon-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/directional-light-icon-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/icon-gizmo-base.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/icon-gizmo-base.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/light-probe-icon-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/light-probe-icon-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/particle-system-icon-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/particle-system-icon-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/reflection-probe-icon-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/reflection-probe-icon-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/sphere-light-icon-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/sphere-light-icon-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/spot-light-icon-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/icon-gizmo/spot-light-icon-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/listener/gizmo-event-listener.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/listener/gizmo-event-listener.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/listener/gizmo-operation-event-listener.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/listener/gizmo-operation-event-listener.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/listener/light-probe-edit-mode-listener.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/listener/light-probe-edit-mode-listener.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/scene-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/scene-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/transform/position-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/transform/position-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/transform/rect-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/transform/rect-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/transform/rotation-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/transform/rotation-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/transform/scale-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/transform/scale-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/transform/transform-gizmo.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/transform/transform-gizmo.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/utils/controller-shape-collider.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/utils/controller-shape-collider.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/utils/controller-shape.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/utils/controller-shape.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/utils/controller-utils.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/elements/utils/controller-utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/gizmo-defines.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/gizmo-defines.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/gizmo-manager.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/gizmo-manager.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/gizmo-operation.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/3d/gizmo-operation.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/defines.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/defines.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/gizmo-config.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/gizmo-config.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/index.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/2d.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/2d.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/3d.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/3d.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/engine/2d.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/engine/2d.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/engine/3d.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/engine/3d.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/engine/engine-interface.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/engine/engine-interface.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/engine/index.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/engine/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/external.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/external.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/index.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/misc.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/misc.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/rect-transform-snapping.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/rect-transform-snapping.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/set-util.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/set-util.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/transform-tool-data.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/transform-tool-data.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/utils-interface.d.ts create mode 100644 @types/packages/scene/@types/cce/public/gizmos/utils/utils-interface.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/ipc/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/public/ipc/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/operation/index.d.ts create mode 100644 @types/packages/scene/@types/cce/public/operation/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/selection/gizmo-selection-logic.d.ts create mode 100644 @types/packages/scene/@types/cce/public/selection/gizmo-selection-logic.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/selection/gizmo-selection.d.ts create mode 100644 @types/packages/scene/@types/cce/public/selection/gizmo-selection.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/selection/index.d.ts create mode 100644 @types/packages/scene/@types/cce/public/selection/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/public/selection/uuid-array.d.ts create mode 100644 @types/packages/scene/@types/cce/public/selection/uuid-array.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/aabb.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/aabb.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/assertion.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/assertion.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/asset.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/asset.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/callbacks-invoker.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/callbacks-invoker.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/device-adapter.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/device-adapter.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/decode.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/decode.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/dump-defines.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/dump-defines.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/encode.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/encode.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/index.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/animation-curve-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/animation-curve-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/asset-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/asset-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/component-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/component-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/dump-interface.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/dump-interface.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/gradient-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/gradient-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/node-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/node-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/number-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/number-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/real-curve-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/real-curve-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/string-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/string-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/typed-array-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/typed-array-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/value-type-dump.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/types/value-type-dump.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/dump/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/dump/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/env.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/env.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/event-emitter.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/event-emitter.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/geom-utils/enums.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/geom-utils/enums.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/geom-utils/intersect.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/geom-utils/intersect.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/geom-utils/ray.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/geom-utils/ray.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/geom-utils/triangle.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/geom-utils/triangle.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/graphics.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/graphics.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/index.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/ipc/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/ipc/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/lodash.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/lodash.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/math/index.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/math/index.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/math/mat3.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/math/mat3.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/math/mat4.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/math/mat4.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/math/quat.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/math/quat.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/math/type-define.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/math/type-define.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/math/utils.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/math/utils.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/math/vec2.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/math/vec2.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/math/vec3.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/math/vec3.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/memop/recycle-pool.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/memop/recycle-pool.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/misc.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/misc.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/node.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/node.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/path.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/path.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/pool.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/pool.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/raycast.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/raycast.d.ts.map create mode 100644 @types/packages/scene/@types/cce/utils/window.d.ts create mode 100644 @types/packages/scene/@types/cce/utils/window.d.ts.map create mode 100644 @types/packages/scene/@types/engine-view.d.ts create mode 100644 @types/packages/scene/@types/message.d.ts create mode 100644 @types/packages/scene/@types/public.d.ts create mode 100644 @types/packages/scene/@types/scene-facade-interface.d.ts create mode 100644 @types/packages/server/@types/message.d.ts create mode 100644 @types/packages/server/@types/package.d.ts create mode 100644 @types/packages/shortcuts/@types/shortcut.d.ts create mode 100644 @types/packages/taobao-creative-app/@types/index.d.ts create mode 100644 @types/packages/taobao-mini-game/@types/index.d.ts create mode 100644 @types/packages/vivo-mini-game/@types/index.d.ts create mode 100644 @types/packages/web-desktop/@types/index.d.ts create mode 100644 @types/packages/web-mobile/@types/index.d.ts create mode 100644 @types/packages/wechatgame/@types/index.d.ts create mode 100644 @types/packages/wechatprogram/@types/index.d.ts create mode 100644 @types/packages/windows/@types/index.d.ts create mode 100644 @types/packages/xiaomi-quick-game/@types/index.d.ts create mode 100644 @types/utils.d.ts create mode 100644 @types/utils/index.d.ts create mode 100644 README.md create mode 100644 cc.d.ts create mode 100644 dist/contributions/inspector/behavior-editor.js create mode 100644 dist/main.js create mode 100644 dist/panels/default/index.js create mode 100644 dist/runtime/base/Action.js create mode 100644 dist/runtime/base/Composite.js create mode 100644 dist/runtime/base/Condition.js create mode 100644 dist/runtime/base/Decorator.js create mode 100644 dist/runtime/base/Node.js create mode 100644 dist/runtime/base/ParentNode.js create mode 100644 dist/runtime/base/index.js create mode 100644 dist/runtime/component/Behavior.js create mode 100644 dist/runtime/component/BehaviorEditor.js create mode 100644 dist/runtime/component/BehaviorManager.js create mode 100644 dist/runtime/core/Behavior.js create mode 100644 dist/runtime/core/BehaviorEditor.js create mode 100644 dist/runtime/core/BehaviorManager.js create mode 100644 dist/runtime/core/BehaviorSource.js create mode 100644 dist/runtime/core/BehaviorTree.js create mode 100644 dist/runtime/core/Blackboard.js create mode 100644 dist/runtime/core/base/Action.js create mode 100644 dist/runtime/core/base/Composite.js create mode 100644 dist/runtime/core/base/Condition.js create mode 100644 dist/runtime/core/base/Decorator.js create mode 100644 dist/runtime/core/base/Node.js create mode 100644 dist/runtime/core/base/ParentNode.js create mode 100644 dist/runtime/core/base/index.js create mode 100644 dist/runtime/core/biz/Action/Log.js create mode 100644 dist/runtime/core/biz/Action/Wait.js create mode 100644 dist/runtime/core/biz/Action/index.js create mode 100644 dist/runtime/core/biz/Composite/Parallel.js create mode 100644 dist/runtime/core/biz/Composite/RandomSequence.js create mode 100644 dist/runtime/core/biz/Composite/Selector.js create mode 100644 dist/runtime/core/biz/Composite/Sequence.js create mode 100644 dist/runtime/core/biz/Composite/index.js create mode 100644 dist/runtime/core/biz/Condition/ConditionHP.js create mode 100644 dist/runtime/core/biz/Condition/index.js create mode 100644 dist/runtime/core/biz/Decorator/Inverter.js create mode 100644 dist/runtime/core/biz/Decorator/Repeater.js create mode 100644 dist/runtime/core/biz/Decorator/UntilSuccess.js create mode 100644 dist/runtime/core/biz/Decorator/index.js create mode 100644 dist/runtime/core/biz/index.js create mode 100644 dist/runtime/core/decorator.js create mode 100644 dist/runtime/core/decorator/index.js create mode 100644 dist/runtime/core/enum/index.js create mode 100644 dist/runtime/core/index.js create mode 100644 dist/runtime/core/utils.js create mode 100644 dist/runtime/core/utils/index.js create mode 100644 dist/runtime/decorator/index.js create mode 100644 dist/runtime/index.js create mode 100644 dist/runtime/node/action/ActionCommon.js create mode 100644 dist/runtime/node/action/Log.js create mode 100644 dist/runtime/node/action/Wait.js create mode 100644 dist/runtime/node/action/index.js create mode 100644 dist/runtime/node/base/Action.js create mode 100644 dist/runtime/node/base/Composite.js create mode 100644 dist/runtime/node/base/Condition.js create mode 100644 dist/runtime/node/base/Decorator.js create mode 100644 dist/runtime/node/base/Node.js create mode 100644 dist/runtime/node/base/ParentNode.js create mode 100644 dist/runtime/node/base/index.js create mode 100644 dist/runtime/node/composite/Parallel.js create mode 100644 dist/runtime/node/composite/RandomSequence.js create mode 100644 dist/runtime/node/composite/Selector.js create mode 100644 dist/runtime/node/composite/Sequence.js create mode 100644 dist/runtime/node/composite/index.js create mode 100644 dist/runtime/node/condition/ConditionCommon.js create mode 100644 dist/runtime/node/condition/ConditionHP.js create mode 100644 dist/runtime/node/condition/index.js create mode 100644 dist/runtime/node/decorator/Inverter.js create mode 100644 dist/runtime/node/decorator/Repeater.js create mode 100644 dist/runtime/node/decorator/UntilSuccess.js create mode 100644 dist/runtime/node/decorator/index.js create mode 100644 dist/runtime/node/enum/index.js create mode 100644 dist/runtime/node/index.js create mode 100644 dist/runtime/utils/index.js create mode 100644 i18n/en.js create mode 100644 i18n/zh.js create mode 100644 lib/index.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src/contributions/inspector/behavior-editor.ts create mode 100644 src/main.ts create mode 100644 src/panels/default/index.ts create mode 100644 src/panels/static/logo.png create mode 100644 src/panels/static/style/default/index.css create mode 100644 src/panels/static/template/default/index.html create mode 100644 src/panels/static/template/vue/app.html create mode 100644 src/runtime/core.meta create mode 100644 src/runtime/core/Behavior.ts.meta create mode 100644 src/runtime/core/BehaviorEditor.ts create mode 100644 src/runtime/core/BehaviorEditor.ts.meta create mode 100644 src/runtime/core/BehaviorManager.ts create mode 100644 src/runtime/core/BehaviorManager.ts.meta create mode 100644 src/runtime/core/BehaviorSource.ts create mode 100644 src/runtime/core/BehaviorSource.ts.meta create mode 100644 src/runtime/core/BehaviorTree.ts create mode 100644 src/runtime/core/BehaviorTree.ts.meta create mode 100644 src/runtime/core/Blackboard.ts create mode 100644 src/runtime/core/Blackboard.ts.meta create mode 100644 src/runtime/core/decorator.ts create mode 100644 src/runtime/core/decorator.ts.meta create mode 100644 src/runtime/core/index.ts create mode 100644 src/runtime/core/index.ts.meta create mode 100644 src/runtime/core/utils.ts create mode 100644 src/runtime/core/utils.ts.meta create mode 100644 src/runtime/index.ts create mode 100644 src/runtime/index.ts.meta create mode 100644 src/runtime/node.meta create mode 100644 src/runtime/node/action.meta create mode 100644 src/runtime/node/action/ActionCommon.ts create mode 100644 src/runtime/node/action/ActionCommon.ts.meta create mode 100644 src/runtime/node/action/Log.ts.meta create mode 100644 src/runtime/node/action/Wait.ts.meta create mode 100644 src/runtime/node/action/index.ts create mode 100644 src/runtime/node/action/index.ts.meta create mode 100644 src/runtime/node/base.meta create mode 100644 src/runtime/node/base/Action.ts create mode 100644 src/runtime/node/base/Action.ts.meta create mode 100644 src/runtime/node/base/Composite.ts create mode 100644 src/runtime/node/base/Composite.ts.meta create mode 100644 src/runtime/node/base/Condition.ts create mode 100644 src/runtime/node/base/Condition.ts.meta create mode 100644 src/runtime/node/base/Decorator.ts create mode 100644 src/runtime/node/base/Decorator.ts.meta create mode 100644 src/runtime/node/base/Node.ts create mode 100644 src/runtime/node/base/Node.ts.meta create mode 100644 src/runtime/node/base/ParentNode.ts create mode 100644 src/runtime/node/base/ParentNode.ts.meta create mode 100644 src/runtime/node/base/index.ts create mode 100644 src/runtime/node/base/index.ts.meta create mode 100644 src/runtime/node/composite.meta create mode 100644 src/runtime/node/composite/BTNodeParallel.ts.meta create mode 100644 src/runtime/node/composite/BTNodeRandom.ts.meta create mode 100644 src/runtime/node/composite/BTNodeSelector.ts.meta create mode 100644 src/runtime/node/composite/BTNodeSequence.ts.meta create mode 100644 src/runtime/node/composite/Parallel.ts create mode 100644 src/runtime/node/composite/Parallel.ts.meta create mode 100644 src/runtime/node/composite/RandomSequence.ts create mode 100644 src/runtime/node/composite/RandomSequence.ts.meta create mode 100644 src/runtime/node/composite/Selector.ts create mode 100644 src/runtime/node/composite/Selector.ts.meta create mode 100644 src/runtime/node/composite/Sequence.ts create mode 100644 src/runtime/node/composite/Sequence.ts.meta create mode 100644 src/runtime/node/composite/index.ts create mode 100644 src/runtime/node/composite/index.ts.meta create mode 100644 src/runtime/node/condition.meta create mode 100644 src/runtime/node/condition/ConditionCommon.ts create mode 100644 src/runtime/node/condition/ConditionCommon.ts.meta create mode 100644 src/runtime/node/condition/ConditionHP.ts.meta create mode 100644 src/runtime/node/condition/ConditionalHP.ts.meta create mode 100644 src/runtime/node/condition/ConditionalMP.ts.meta create mode 100644 src/runtime/node/condition/index.ts create mode 100644 src/runtime/node/condition/index.ts.meta create mode 100644 src/runtime/node/decorator.meta create mode 100644 src/runtime/node/decorator/Inverter.ts create mode 100644 src/runtime/node/decorator/Inverter.ts.meta create mode 100644 src/runtime/node/decorator/Repeater.ts create mode 100644 src/runtime/node/decorator/Repeater.ts.meta create mode 100644 src/runtime/node/decorator/UntilSuccess.ts create mode 100644 src/runtime/node/decorator/UntilSuccess.ts.meta create mode 100644 src/runtime/node/decorator/index.ts create mode 100644 src/runtime/node/decorator/index.ts.meta create mode 100644 src/runtime/node/enum.meta create mode 100644 src/runtime/node/enum/index.ts create mode 100644 src/runtime/node/enum/index.ts.meta create mode 100644 src/runtime/node/index.ts create mode 100644 src/runtime/node/index.ts.meta create mode 100644 src/shims-vue.d.ts create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9110a3c --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ + +#/////////////////////////// +# Cocos Creator 3D Project +#/////////////////////////// +library/ +temp/ +local/ +build/ +profiles/ +native +#////////////////////////// +# NPM +#////////////////////////// +node_modules/ +#////////////////////////// +# VSCode +#////////////////////////// +.vscode/ +#////////////////////////// +# WebStorm +#////////////////////////// +.idea/ \ No newline at end of file diff --git a/@types/editor.d.ts b/@types/editor.d.ts new file mode 100644 index 0000000..774822f --- /dev/null +++ b/@types/editor.d.ts @@ -0,0 +1,1210 @@ +/// +/// + +import * as NodeJSPath from 'path'; +import type { FileFilter, BrowserWindow, OpenDialogReturnValue, SaveDialogReturnValue, MessageBoxReturnValue, MenuItemConstructorOptions } from 'electron'; + +type BaseType = string | number | boolean | undefined | null; + +declare global { + export namespace Editor { + export namespace App { + export const userAgent: string; + /** + * 是否是开发模式 + * Development mode + */ + export const dev: boolean; + /** + * 编辑器启动参数 + * Editor startup parameters + */ + export const args: {[key: string]: string | number}; + /** + * 编辑器版本号 + * 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 namespace Clipboard { + export type ICopyType = 'image' | 'text' | 'files' | string; + /** + * 获取剪贴板内容 + * @param type + */ + export function read(type: ICopyType): string | number | {[key: string]: string | number | boolean | null}; + /** + * 写入剪贴板内容 + * @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 namespace Dialog { + + export interface SaveDialogOptions { + title?: string; + path?: string; + button?: string; + filters?: FileFilter[]; + } + 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?: SaveDialogOptions, 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 namespace 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 namespace I18n { + export type I18nMap = { + [key: string]: string | number; + }; + /** + * 获取当前的语言 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?: I18nMap): string; + /** + * 选择一种翻译语言 + * Choose a translation language + * + * @param language 选择当前使用的语言 Select the language currently in use + */ + export function select(language: string): void; + } + export namespace Layout { + interface ILayoutItem { + 'min-width': number; + 'min-height': number; + direction: 'row' | 'column' | 'none'; + percent: number; + minimize: boolean; + children?: ILayoutItem[]; + active?: string; + panels?: string[]; + } + + export interface ILayout { + version: 1; + layout: ILayoutItem; + } + /** + * 应用布局信息 + * Application layout information + * + * @param json 布局文件内容 Layout file content + */ + export function apply(json: ILayout); + /** + * 查询当前的布局信息,返回一个布局 json 对象 + * Query the current layout information and return a layout json object + * + * @param name + */ + export function query(name?: string): Promise; + } + export namespace Logger { + interface ILogInfo { + process?: 'browser' | 'renderer', + type: 'log' | 'info' | 'warn' | 'error', + message: string, + stack: string, + time: number, + } + /** + * 清空所有的日志 + * Clear all logs + */ + export function clear(regexp?: RegExp): void; + /** + * 查询所有日志 + * Query all logs + */ + export function query(): ILogInfo[]; + } + export namespace Menu { + export interface BaseMenuItem { + // 菜单类型 + type?: 'normal' | 'separator' | 'submenu' | 'checkbox' | 'radio'; + // 菜单项的名字 + label?: string; + // 菜单附加说明 + sublabel?: string; + // 是否显示 + visible?: boolean; + // checkbox 或 radio 类型菜单项指定是否选中 + checked?: boolean; + // 如果为 false,该菜单项将会置灰且不可点击 + enabled?: boolean; + // 一个图标的绝对路径 + icon?: string; + // 显示在按钮上的快捷键,只负责显示 + accelerator?: string; + + // 排序,数字越小越靠前 + order?: number; + // 菜单属于哪一个分组 + group?: string; + + // 菜单点击后发送哪一个消息 + message?: string; + // 发送消息指定发送到某个插件 + target?: string; + // 消息附带的参数 + params?: (string | number | boolean | { [key: string]: string | number | boolean })[]; + // 按钮点击后的事件,定义后 message 将失效 + click?: Function | null; + // 菜单项的行为,定义 click 属性后此属性将被忽略 + role?: MenuItemConstructorOptions['role']; + // 子菜单 + submenu?: MenuTemplateItem[]; + } + export interface MainMenuItem extends BaseMenuItem { + path: string; + } + export interface ContextMenuItem extends BaseMenuItem { + accelerator?: string; + } + export type MenuTemplateItem = 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): void; + } + export namespace Message { + export interface MessageInfo { + methods: string[]; + public?: boolean; + description?: string; + doc?: string; + sync?: boolean; + } + export interface TableBase { + [x: string]: any; + params: (string | number | boolean | { [key: string]: string | number | boolean })[]; + } + /** + * 发送一个消息,并等待返回 + * 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: (string | number | boolean | undefined | null | { [key: string]: any } | (string | number | boolean)[])[]): void; + } + export namespace Network { + export type RequestData = string | number | { + [index: string]: string | number | (string | number)[]; + } + /** + * 查询当前电脑的 ip 列表 + * Query the IP list of the current computer + */ + export function queryIPList(): string[]; + /** + * 检查一个端口是否被占用 + * 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?: RequestData, + ): Promise; + /** + * Post 方式请求某个服务器数据 + * POST requests data from a server + * + * @param url + * @param data + */ + export function post( + url: string, + data?: RequestData, + ): Promise; + /** + * 获取某个可用的端口号 + * get the port that is free + * + * @param port + */ + export function getFreePort(port: number): Promise; + } + export namespace Package { + // export module VERSION: string; + export interface IGetPackageOptions { + name?: string; + debug?: boolean; + path?: string; + enable?: boolean; + invalid?: boolean; + } + export interface PackageJson { + name: string; + version: string; + author?: string; + description?: string; + main?: string; + windows?: string; + debug?: boolean; + panel?: any; + editor?: string; + } + export type PathType = 'home' | 'data' | 'temp'; + /** + * 查询插件列表 + * Query Plug-in List + * + * @param options + */ + export function getPackages(options?: IGetPackageOptions): Editor.Interface.PackageInfo[]; + /** + * 注册一个插件 + * Register a plug-in + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + * + * @param path + */ + export function register(path: string): void; + /** + * 反注册一个插件 + * Unregister a plug-in + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + * + * @param path + */ + export function unregister(path: string): void; + /** + * 启动一个插件 + * Enable a plug-in + * + * @param path + */ + export function enable(path: string): void; + /** + * 关闭一个插件 + * Disable a plug-in + * + * @param path + */ + export function disable(path: string, options?: { replacement?: boolean }): void; + /** + * 获取一个插件的几个预制目录地址 + * 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): string | undefined; + } + export namespace Panel { + 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?: () => void; + /** + * @en Hooks triggered when the panel is hidden + * @zh 面板隐藏的时候触发的钩子 + */ + hide?: () => void; + }; + + /** + * @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 + /** + * 打开一个面板 + * Open up a panel + * + * @param name + * @param args + */ + export function open(name: string, ...args: (BaseType | { [key: string]: any })[]): Promise; + /** + * 打开一个面板 + * Open up a panel + * + * @param besidePanel + * @param name + * @param args + */ + export function openBeside(besidePanel: string, name: string, ...args: (BaseType | { [key: string]: any })[]): Promise; + /** + * 关闭一个面板 + * Close a panel + * + * @param name + */ + export function close(name: string): Promise; + /** + * 将焦点传递给一个面板 + * Pass focus to a panel + * + * @param name + */ + export function focus(name: string): Promise; + /** + * 检查面板是否已经打开 + * 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 function define void, Selector = Record, M = Record>( + options: Options, + ): void; + } + export namespace Profile { + export type PreferencesProtocol = 'default' | 'global' | 'local'; + export type ProjectProtocol = 'default' | 'project'; + export type TempProtocol = 'temp'; + export type ProfileValueType = string | boolean | number | { [key: string]: any } | (string | boolean | number)[]; + export interface ProfileGetOptions { + type: 'deep' | 'current' | 'inherit'; + } + export interface ProfileObj { + get: (key?: string, options?: ProfileGetOptions) => void; + set: (key?: string, value?: any) => void; + 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: Editor.Profile.ProfileValueType, 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: Editor.Profile.ProfileValueType, 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: Editor.Profile.ProfileValueType): Promise; + /** + * 删除某个插件配置 + * Delete a plug-in configuration + * + * @param name 插件名 The plugin name + * @param key 配置路径 Configure path + */ + export function removeTemp(name: string, key: string): Promise; + } + export namespace Project { + /** + * 当前项目路径 + * 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; + } + export namespace Selection { + /** + * 选中一个或者一组元素 + * Select one or a group of elements + * + * @param type + * @param uuid + */ + export function select(type: string, uuid: string | string[]): void; + /** + * 取消一个或者一组元素的选中状态 + * To deselect one or a group of elements + * + * @param type + * @param uuid + */ + export function unselect(type: string, uuid: string | string[]): void; + /** + * 清空一个类型的所有选中元素 + * Clears all selected elements of a type + * + * @param type + */ + export function clear(type: string): void; + /** + * 更新当前选中的类型数据 + * Updates the currently selected type data + * + * @param type + * @param uuids + */ + export function update(type: string, uuids: string[]): void; + /** + * 悬停触碰了某个元素 + * 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): void; + /** + * 获取最后选中的元素的类型 + * 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 namespace Task { + export interface NoticeButtonOptions { + label: string; + target: string; + message: string; + params?: (string | number | boolean | (string | number | boolean)[] | {[key: string]: string | number | boolean})[]; + } + export interface NoticeOptions { + // 通知标题 + // Notice title + title: string; + // 通知内容 + // Notice content + message?: string; + // 消息类型 + // Notice type + type?: 'error' | 'warn' | 'log' | 'success'; + // 来源插件 + // Notice source + source?: string; + // 提示上的按钮,能够触发一个插件上的消息 + // The button on the prompt can trigger a message on the plugin + buttons?: NoticeButtonOptions[]; + // 显示时间,默认不自动消失 + // Show time, default does not disappear automatically + timeout?: number; + } + /** + * 添加一个通知 + * Add a notification + * + * @param options 消息配置 Message configuration + * @return id 当前 notice ID,可用于查找移除 + */ + export function addNotice(options: NoticeOptions): number; + /** + * 删除一个通知 + * Delete a notification + * + * @param id 通知 id Notification ID + */ + export function removeNotice(id: number): void; + /** + * 修改 notice 自动移除的时间 + * Modify notice automatic removal time + * + * @param id 通知 id Notification ID + * @param time 超时时间 timeout + */ + export function changeNoticeTimeout(id: number, time: number): void; + /** + * 查询所有通知 + * Query all notifications + */ + export function queryNotices(): NoticeOptions[]; + } + export namespace Theme { + /** + * 获取所有主题的名字 + * Gets the names of all topics + */ + export function getList(): string[]; + /** + * 使用某个皮肤 + * Use a certain skin + * + * @param name + */ + export function use(name?: string): void; + } + export namespace 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: CustomElementConstructor): void; + } + export namespace User { + export interface UserData { + session_id: string; + session_key: string; + cocos_uid: string; + email: string; + nickname: string; + } + export interface UserTokenData { + access_token: string; + cocos_uid: number; + expires_in: number; + } + /** + * 跳过 User + * Skip the User + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + */ + export function skip(): void; + /** + * 获取 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): void; + /** + * 监听一次事件 + * Listening for one event + * 谨慎使用,之后会被移除 + * Use with caution and it will be removed later + * @param action + * @param handle + */ + export function once(action: string, handle: Function): void; + /** + * 取消已经监听的事件 + * 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): void; + } + export namespace Utils { + // export namespace 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 function trashItem(path: string): Promise; + // } + // export namespace 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 namespace 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): number; + // /** + // * @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; + // /** + // * 乘法函数 + // * 入参:函数内部转化时会先转字符串再转数值,因而传入字符串或 number 均可 + // * 返回值:arg1 乘 arg2 的精确结果 + // * @param {number} arg1 + // * @param {number} arg2 + // */ + // export function multi(arg1: number, arg2: number): number; + // /** + // * 除法函数 + // * 入参:函数内部转化时会先转字符串再转数值,因而传入字符串或 number 均可 + // * 返回值:arg1 除 arg2 的精确结果 + // * @param {number} arg1 + // * @param {number} arg2 + // */ + // export function divide(arg1: number, arg2: number): number; + // /** + // * 保留小数点 + // * @param val + // * @param num + // */ + // export function toFixed(val: number, num: number): number; + // } + // export namespace 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 namespace Url { + // /** + // * 快捷获取文档路径 + // * @param relativeUrl + // * @param type + // */ + // export function getDocUrl(relativeUrl: string, type?: 'manual' | 'api'): string; + // } + + // export namespace 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 + // * compress 是否压缩,默认 true + // */ + // export function generate(compress?: boolean): string; + // /** + // * 从路径中提取 UUID + // * ".../5b/5b9cbc23-76b3-41ff-9953-4219fdbea72c/Fontin-SmallCaps.ttf" -> "5b9cbc23-76b3-41ff-9953-4219fdbea72c" + // */ + // export function getUuidFromLibPath(path: string): string; + // /** + // * 获取子资源的短 uuid + // * @param name + // */ + // export function nameToSubId(name: string): string; + // } + + // export namespace Process { + // export enum LogLevel { + // LOG, + // WARN, + // ERROR, + // NULL, + // } + // export interface IQuickSpawnOption { + // cwd?: string; + // env?: any; + // // 输出等级,默认 = 0,即 log 级别以上都打印 + // logLevel?: LogLevel; + + // downGradeWaring?: boolean; // 警告将会转为 log 打印,默认为 false + // downGradeLog?: boolean; // log 将会转为 debug 打印,默认为 true + // downGradeError?: boolean; // 错误将会转为警告打印,默认为 false + + // onlyPrintWhenError?: boolean; // 默认为 true, 日志都正常收集,但仅在发生错误时打印信息,其他时候静默处理 + + // prefix?: string; // 日志输出前缀 + // } + // /** + // * 快速开启子进程,无需再自行监听输出,将会返回一个标记完成的 promise 对象 + // * @param command 命令 + // * @param cmdParams 参数数组 + // * @param options 可选,开启的一些参数配置 + // */ + // export function quickSpawn(command: string, cmdParams: string[], options?: IQuickSpawnOption):Promise; + // } + } + export namespace Module { + /** + * 导入一个项目模块。 + * @param url 项目模块的 Database URL。 + * @experimental 实验性质。 + */ + export function importProjectModule(url: string): Promise; + } + export namespace Windows { + export function open(layout: Editor.Layout.ILayout, rect: { x: number, y: number, width: number, height: number}): void; + } + } +} diff --git a/@types/electron.d.ts b/@types/electron.d.ts new file mode 100644 index 0000000..7aff6b9 --- /dev/null +++ b/@types/electron.d.ts @@ -0,0 +1,16090 @@ +// 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 `