mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update debugger-frontend from bf5ec69...78d3771 (#44753)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44753 Changelog: [Internal] - Update `react-native/debugger-frontend` from bf5ec69...78d3771 Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/compare/bf5ec692e1e8aca4b59ed154b9b03f44ddc6496e...78d377129ab12bd3b80d1b9416699b01149f4ccf). Reviewed By: huntie Differential Revision: D58069944 fbshipit-source-id: 8a5ce5644c208eb13cb3d5d839d00bd7657a52d1
This commit is contained in:
1 parent
9d3bac6fd5
commit
c43adb2134
4 files changed
+5
-5
No files matched your search
@@ -1,5 +1,5 @@
|
||||
@generated SignedSource<<e2d379d34de573e6494f775e2810cb60>>
|
||||
Git revision: bf5ec692e1e8aca4b59ed154b9b03f44ddc6496e
|
||||
@generated SignedSource<<a34fe4047398140c18511a8564704917>>
|
||||
Git revision: 78d377129ab12bd3b80d1b9416699b01149f4ccf
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebookexperimental/rn-chrome-devtools-frontend
|
||||
|
||||
@@ -1 +1 @@
|
||||
import*as e from"../platform/platform.js";import*as r from"../root/root.js";import*as o from"../common/common.js";import*as t from"../i18n/i18n.js";var n;!function(e){e.AppendedToURL="appendedToURL",e.CanceledSaveURL="canceledSaveURL",e.ColorThemeChanged="colorThemeChanged",e.ContextMenuCleared="contextMenuCleared",e.ContextMenuItemSelected="contextMenuItemSelected",e.DeviceCountUpdated="deviceCountUpdated",e.DevicesDiscoveryConfigChanged="devicesDiscoveryConfigChanged",e.DevicesPortForwardingStatusChanged="devicesPortForwardingStatusChanged",e.DevicesUpdated="devicesUpdated",e.DispatchMessage="dispatchMessage",e.DispatchMessageChunk="dispatchMessageChunk",e.EnterInspectElementMode="enterInspectElementMode",e.EyeDropperPickedColor="eyeDropperPickedColor",e.FileSystemsLoaded="fileSystemsLoaded",e.FileSystemRemoved="fileSystemRemoved",e.FileSystemAdded="fileSystemAdded",e.FileSystemFilesChangedAddedRemoved="FileSystemFilesChangedAddedRemoved",e.IndexingTotalWorkCalculated="indexingTotalWorkCalculated",e.IndexingWorked="indexingWorked",e.IndexingDone="indexingDone",e.KeyEventUnhandled="keyEventUnhandled",e.ReattachRootTarget="reattachMainTarget",e.ReloadInspectedPage="reloadInspectedPage",e.RevealSourceLine="revealSourceLine",e.SavedURL="savedURL",e.SearchCompleted="searchCompleted",e.SetInspectedTabId="setInspectedTabId",e.SetUseSoftMenu="setUseSoftMenu",e.ShowPanel="showPanel"}(n||(n={}));const s=[[n.AppendedToURL,"appendedToURL",["url"]],[n.CanceledSaveURL,"canceledSaveURL",["url"]],[n.ColorThemeChanged,"colorThemeChanged",[]],[n.ContextMenuCleared,"contextMenuCleared",[]],[n.ContextMenuItemSelected,"contextMenuItemSelected",["id"]],[n.DeviceCountUpdated,"deviceCountUpdated",["count"]],[n.DevicesDiscoveryConfigChanged,"devicesDiscoveryConfigChanged",["config"]],[n.DevicesPortForwardingStatusChanged,"devicesPortForwardingStatusChanged",["status"]],[n.DevicesUpdated,"devicesUpdated",["devices"]],[n.DispatchMessage,"dispatchMessage",["messageObject"]],[n.DispatchMessageChunk,"dispatchMessageChunk",["messageChunk","messageSize"]],[n.EnterInspectElementMode,"enterInspectElementMode",[]],[n.EyeDropperPickedColor,"eyeDropperPickedColor",["color"]],[n.FileSystemsLoaded,"fileSystemsLoaded",["fileSystems"]],[n.FileSystemRemoved,"fileSystemRemoved",["fileSystemPath"]],[n.FileSystemAdded,"fileSystemAdded",["errorMessage","fileSystem"]],[n.FileSystemFilesChangedAddedRemoved,"fileSystemFilesChangedAddedRemoved",["changed","added","removed"]],[n.IndexingTotalWorkCalculated,"indexingTotalWorkCalculated",["requestId","fileSystemPath","totalWork"]],[n.IndexingWorked,"indexingWorked",["requestId","fileSystemPath","worked"]],[n.IndexingDone,"indexingDone",["requestId","fileSystemPath"]],[n.KeyEventUnhandled,"keyEventUnhandled",["event"]],[n.ReattachRootTarget,"reattachMainTarget",[]],[n.ReloadInspectedPage,"reloadInspectedPage",["hard"]],[n.RevealSourceLine,"revealSourceLine",["url","lineNumber","columnNumber"]],[n.SavedURL,"savedURL",["url","fileSystemPath"]],[n.SearchCompleted,"searchCompleted",["requestId","fileSystemPath","files"]],[n.SetInspectedTabId,"setInspectedTabId",["tabId"]],[n.SetUseSoftMenu,"setUseSoftMenu",["useSoftMenu"]],[n.ShowPanel,"showPanel",["panelName"]]];var i=Object.freeze({__proto__:null,get Events(){return n},EventDescriptors:s});const a={systemError:"System error",connectionError:"Connection error",certificateError:"Certificate error",httpError:"HTTP error",cacheError:"Cache error",signedExchangeError:"Signed Exchange error",ftpError:"FTP error",certificateManagerError:"Certificate manager error",dnsResolverError:"DNS resolver error",unknownError:"Unknown error",httpErrorStatusCodeSS:"HTTP error: status code {PH1}, {PH2}",invalidUrl:"Invalid URL",decodingDataUrlFailed:"Decoding Data URL failed"},d=t.i18n.registerUIStrings("core/host/ResourceLoader.ts",a),c=t.i18n.getLocalizedString.bind(void 0,d);let l=0;const u={},m=function(e){return u[++l]=e,l},g=function(e){u[e].close(),delete u[e]},p=function(e,r){u[e].write(r)};let h=function(e,r,t,n){const s=new o.StringOutputStream.StringOutputStream;w(e,r,s,(function(e,r,o){t(e,r,s.data(),o)}),n)};function v(e,r,o){if(void 0===e||void 0===o)return null;if(0!==e){if(function(e){return e<=-300&&e>-400}(e))return c(a.httpErrorStatusCodeSS,{PH1:String(r),PH2:o});const t=function(e){return c(e>-100?a.systemError:e>-200?a.connectionError:e>-300?a.certificateError:e>-400?a.httpError:e>-500?a.cacheError:e>-600?a.signedExchangeError:e>-700?a.ftpError:e>-800?a.certificateManagerError:e>-900?a.dnsResolverError:a.unknownError)}(e);return`${t}: ${o}`}return null}const w=function(e,r,t,n,s){const i=m(t);if(new o.ParsedURL.ParsedURL(e).isDataURL())return void(e=>new Promise(((r,o)=>{const t=new XMLHttpRequest;t.withCredentials=!1,t.open("GET",e,!0),t.onreadystatechange=function(){if(t.readyState===XMLHttpRequest.DONE){if(200!==t.status)return t.onreadystatechange=null,void o(new Error(String(t.status)));t.onreadystatechange=null,r(t.responseText)}},t.send(null)})))(e).thLine truncated
|
||||
import*as e from"../platform/platform.js";import*as r from"../root/root.js";import*as o from"../common/common.js";import*as t from"../i18n/i18n.js";var n;!function(e){e.AppendedToURL="appendedToURL",e.CanceledSaveURL="canceledSaveURL",e.ColorThemeChanged="colorThemeChanged",e.ContextMenuCleared="contextMenuCleared",e.ContextMenuItemSelected="contextMenuItemSelected",e.DeviceCountUpdated="deviceCountUpdated",e.DevicesDiscoveryConfigChanged="devicesDiscoveryConfigChanged",e.DevicesPortForwardingStatusChanged="devicesPortForwardingStatusChanged",e.DevicesUpdated="devicesUpdated",e.DispatchMessage="dispatchMessage",e.DispatchMessageChunk="dispatchMessageChunk",e.EnterInspectElementMode="enterInspectElementMode",e.EyeDropperPickedColor="eyeDropperPickedColor",e.FileSystemsLoaded="fileSystemsLoaded",e.FileSystemRemoved="fileSystemRemoved",e.FileSystemAdded="fileSystemAdded",e.FileSystemFilesChangedAddedRemoved="FileSystemFilesChangedAddedRemoved",e.IndexingTotalWorkCalculated="indexingTotalWorkCalculated",e.IndexingWorked="indexingWorked",e.IndexingDone="indexingDone",e.KeyEventUnhandled="keyEventUnhandled",e.ReattachRootTarget="reattachMainTarget",e.ReloadInspectedPage="reloadInspectedPage",e.RevealSourceLine="revealSourceLine",e.SavedURL="savedURL",e.SearchCompleted="searchCompleted",e.SetInspectedTabId="setInspectedTabId",e.SetUseSoftMenu="setUseSoftMenu",e.ShowPanel="showPanel"}(n||(n={}));const s=[[n.AppendedToURL,"appendedToURL",["url"]],[n.CanceledSaveURL,"canceledSaveURL",["url"]],[n.ColorThemeChanged,"colorThemeChanged",[]],[n.ContextMenuCleared,"contextMenuCleared",[]],[n.ContextMenuItemSelected,"contextMenuItemSelected",["id"]],[n.DeviceCountUpdated,"deviceCountUpdated",["count"]],[n.DevicesDiscoveryConfigChanged,"devicesDiscoveryConfigChanged",["config"]],[n.DevicesPortForwardingStatusChanged,"devicesPortForwardingStatusChanged",["status"]],[n.DevicesUpdated,"devicesUpdated",["devices"]],[n.DispatchMessage,"dispatchMessage",["messageObject"]],[n.DispatchMessageChunk,"dispatchMessageChunk",["messageChunk","messageSize"]],[n.EnterInspectElementMode,"enterInspectElementMode",[]],[n.EyeDropperPickedColor,"eyeDropperPickedColor",["color"]],[n.FileSystemsLoaded,"fileSystemsLoaded",["fileSystems"]],[n.FileSystemRemoved,"fileSystemRemoved",["fileSystemPath"]],[n.FileSystemAdded,"fileSystemAdded",["errorMessage","fileSystem"]],[n.FileSystemFilesChangedAddedRemoved,"fileSystemFilesChangedAddedRemoved",["changed","added","removed"]],[n.IndexingTotalWorkCalculated,"indexingTotalWorkCalculated",["requestId","fileSystemPath","totalWork"]],[n.IndexingWorked,"indexingWorked",["requestId","fileSystemPath","worked"]],[n.IndexingDone,"indexingDone",["requestId","fileSystemPath"]],[n.KeyEventUnhandled,"keyEventUnhandled",["event"]],[n.ReattachRootTarget,"reattachMainTarget",[]],[n.ReloadInspectedPage,"reloadInspectedPage",["hard"]],[n.RevealSourceLine,"revealSourceLine",["url","lineNumber","columnNumber"]],[n.SavedURL,"savedURL",["url","fileSystemPath"]],[n.SearchCompleted,"searchCompleted",["requestId","fileSystemPath","files"]],[n.SetInspectedTabId,"setInspectedTabId",["tabId"]],[n.SetUseSoftMenu,"setUseSoftMenu",["useSoftMenu"]],[n.ShowPanel,"showPanel",["panelName"]]];var i=Object.freeze({__proto__:null,get Events(){return n},EventDescriptors:s});const a={systemError:"System error",connectionError:"Connection error",certificateError:"Certificate error",httpError:"HTTP error",cacheError:"Cache error",signedExchangeError:"Signed Exchange error",ftpError:"FTP error",certificateManagerError:"Certificate manager error",dnsResolverError:"DNS resolver error",unknownError:"Unknown error",httpErrorStatusCodeSS:"HTTP error: status code {PH1}, {PH2}",invalidUrl:"Invalid URL",decodingDataUrlFailed:"Decoding Data URL failed"},d=t.i18n.registerUIStrings("core/host/ResourceLoader.ts",a),c=t.i18n.getLocalizedString.bind(void 0,d);let l=0;const u={},m=function(e){return u[++l]=e,l},g=function(e){u[e].close(),delete u[e]},p=function(e,r){u[e].write(r)};let h=function(e,r,t,n){const s=new o.StringOutputStream.StringOutputStream;w(e,r,s,(function(e,r,o){t(e,r,s.data(),o)}),n)};function v(e,r,o){if(void 0===e||void 0===o)return null;if(0!==e){if(function(e){return e<=-300&&e>-400}(e))return c(a.httpErrorStatusCodeSS,{PH1:String(r),PH2:o});const t=function(e){return c(e>-100?a.systemError:e>-200?a.connectionError:e>-300?a.certificateError:e>-400?a.httpError:e>-500?a.cacheError:e>-600?a.signedExchangeError:e>-700?a.ftpError:e>-800?a.certificateManagerError:e>-900?a.dnsResolverError:a.unknownError)}(e);return`${t}: ${o}`}return null}const w=function(e,r,t,n,s){const i=m(t);if(new o.ParsedURL.ParsedURL(e).isDataURL())return void(e=>new Promise(((r,o)=>{const t=new XMLHttpRequest;t.withCredentials=!1,t.open("GET",e,!0),t.onreadystatechange=function(){if(t.readyState===XMLHttpRequest.DONE){if(200!==t.status)return t.onreadystatechange=null,void o(new Error(String(t.status)));t.onreadystatechange=null,r(t.responseText)}},t.send(null)})))(e).thLine truncated
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as o from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";import*as n from"../../models/issues_manager/issues_manager.js";import*as a from"../../core/sdk/sdk.js";import*as r from"../../models/workspace/workspace.js";import*as s from"../../panels/network/forward/forward.js";import*as l from"../../core/host/host.js";import*as c from"../main/main.js";import*as d from"../../core/rn_experiments/rn_experiments.js";const g={toggleDeviceToolbar:"Toggle device toolbar",captureScreenshot:"Capture screenshot",captureFullSizeScreenshot:"Capture full size screenshot",captureNodeScreenshot:"Capture node screenshot",showMediaQueries:"Show media queries",device:"device",hideMediaQueries:"Hide media queries",showRulers:"Show rulers in the Device Mode toolbar",hideRulers:"Hide rulers in the Device Mode toolbar",showDeviceFrame:"Show device frame",hideDeviceFrame:"Hide device frame"},m=t.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",g),w=t.i18n.getLazilyComputedLocalizedString.bind(void 0,m);let u;async function p(){return u||(u=await import("../../panels/emulation/emulation.js")),u}i.ActionRegistration.registerActionExtension({category:"MOBILE",actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>new((await p()).DeviceModeWrapper.ActionDelegate),condition:o.Runtime.conditions.canDock,title:w(g.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:"SCREENSHOT",loadActionDelegate:async()=>new((await p()).DeviceModeWrapper.ActionDelegate),condition:o.Runtime.conditions.canDock,title:w(g.captureScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:"SCREENSHOT",loadActionDelegate:async()=>new((await p()).DeviceModeWrapper.ActionDelegate),condition:o.Runtime.conditions.canDock,title:w(g.captureFullSizeScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:"SCREENSHOT",loadActionDelegate:async()=>new((await p()).DeviceModeWrapper.ActionDelegate),condition:o.Runtime.conditions.canDock,title:w(g.captureNodeScreenshot)}),e.Settings.registerSettingExtension({category:"MOBILE",settingName:"show-media-query-inspector",settingType:"boolean",defaultValue:!1,options:[{value:!0,title:w(g.showMediaQueries)},{value:!1,title:w(g.hideMediaQueries)}],tags:[w(g.device)]}),e.Settings.registerSettingExtension({category:"MOBILE",settingName:"emulation.show-rulers",settingType:"boolean",defaultValue:!1,options:[{value:!0,title:w(g.showRulers)},{value:!1,title:w(g.hideRulers)}],tags:[w(g.device)]}),e.Settings.registerSettingExtension({category:"MOBILE",settingName:"emulation.show-device-outline",settingType:"boolean",defaultValue:!1,options:[{value:!0,title:w(g.showDeviceFrame)},{value:!1,title:w(g.hideDeviceFrame)}],tags:[w(g.device)]}),i.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:o.Runtime.conditions.canDock,location:"main-toolbar-left",order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),e.AppProvider.registerAppProvider({loadAppProvider:async()=>(await p()).AdvancedApp.AdvancedAppProvider.instance(),condition:o.Runtime.conditions.canDock,order:0}),i.ContextMenu.registerItem({location:"deviceModeMenu/save",order:12,actionId:"emulation.capture-screenshot"}),i.ContextMenu.registerItem({location:"deviceModeMenu/save",order:13,actionId:"emulation.capture-full-height-screenshot"});const v={sensors:"Sensors",geolocation:"geolocation",timezones:"timezones",locale:"locale",locales:"locales",accelerometer:"accelerometer",deviceOrientation:"device orientation",locations:"Locations",touch:"Touch",devicebased:"Device-based",forceEnabled:"Force enabled",emulateIdleDetectorState:"Emulate Idle Detector state",noIdleEmulation:"No idle emulation",userActiveScreenUnlocked:"User active, screen unlocked",userActiveScreenLocked:"User active, screen locked",userIdleScreenUnlocked:"User idle, screen unlocked",userIdleScreenLocked:"User idle, screen locked",showSensors:"Show Sensors",showLocations:"Show Locations"},y=t.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",v),R=t.i18n.getLazilyComputedLocalizedString.bind(void 0,y);let h;async function f(){return h||(h=await import("../../panels/sensors/sensors.js")),h}i.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:R(v.showSensors),title:R(v.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>new((await f()).SensorsView.SensorsView),tags:[R(v.geolocation),R(v.timezones),R(v.locale),R(v.locales),R(v.accelerometer),R(v.deviceOrientation)]}),i.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:R(v.Line truncated
|
||||
import"../shell/shell.js";import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as o from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";import*as n from"../../models/issues_manager/issues_manager.js";import*as a from"../../core/sdk/sdk.js";import*as r from"../../models/workspace/workspace.js";import*as s from"../../panels/network/forward/forward.js";import*as l from"../../core/host/host.js";import*as c from"../main/main.js";import*as d from"../../core/rn_experiments/rn_experiments.js";const g={toggleDeviceToolbar:"Toggle device toolbar",captureScreenshot:"Capture screenshot",captureFullSizeScreenshot:"Capture full size screenshot",captureNodeScreenshot:"Capture node screenshot",showMediaQueries:"Show media queries",device:"device",hideMediaQueries:"Hide media queries",showRulers:"Show rulers in the Device Mode toolbar",hideRulers:"Hide rulers in the Device Mode toolbar",showDeviceFrame:"Show device frame",hideDeviceFrame:"Hide device frame"},m=t.i18n.registerUIStrings("panels/emulation/emulation-meta.ts",g),w=t.i18n.getLazilyComputedLocalizedString.bind(void 0,m);let u;async function p(){return u||(u=await import("../../panels/emulation/emulation.js")),u}i.ActionRegistration.registerActionExtension({category:"MOBILE",actionId:"emulation.toggle-device-mode",toggleable:!0,loadActionDelegate:async()=>new((await p()).DeviceModeWrapper.ActionDelegate),condition:o.Runtime.conditions.canDock,title:w(g.toggleDeviceToolbar),iconClass:"devices",bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+M"},{platform:"mac",shortcut:"Shift+Meta+M"}]}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-screenshot",category:"SCREENSHOT",loadActionDelegate:async()=>new((await p()).DeviceModeWrapper.ActionDelegate),condition:o.Runtime.conditions.canDock,title:w(g.captureScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-full-height-screenshot",category:"SCREENSHOT",loadActionDelegate:async()=>new((await p()).DeviceModeWrapper.ActionDelegate),condition:o.Runtime.conditions.canDock,title:w(g.captureFullSizeScreenshot)}),i.ActionRegistration.registerActionExtension({actionId:"emulation.capture-node-screenshot",category:"SCREENSHOT",loadActionDelegate:async()=>new((await p()).DeviceModeWrapper.ActionDelegate),condition:o.Runtime.conditions.canDock,title:w(g.captureNodeScreenshot)}),e.Settings.registerSettingExtension({category:"MOBILE",settingName:"show-media-query-inspector",settingType:"boolean",defaultValue:!1,options:[{value:!0,title:w(g.showMediaQueries)},{value:!1,title:w(g.hideMediaQueries)}],tags:[w(g.device)]}),e.Settings.registerSettingExtension({category:"MOBILE",settingName:"emulation.show-rulers",settingType:"boolean",defaultValue:!1,options:[{value:!0,title:w(g.showRulers)},{value:!1,title:w(g.hideRulers)}],tags:[w(g.device)]}),e.Settings.registerSettingExtension({category:"MOBILE",settingName:"emulation.show-device-outline",settingType:"boolean",defaultValue:!1,options:[{value:!0,title:w(g.showDeviceFrame)},{value:!1,title:w(g.hideDeviceFrame)}],tags:[w(g.device)]}),i.Toolbar.registerToolbarItem({actionId:"emulation.toggle-device-mode",condition:o.Runtime.conditions.canDock,location:"main-toolbar-left",order:1,showLabel:void 0,loadItem:void 0,separator:void 0}),e.AppProvider.registerAppProvider({loadAppProvider:async()=>(await p()).AdvancedApp.AdvancedAppProvider.instance(),condition:o.Runtime.conditions.canDock,order:0}),i.ContextMenu.registerItem({location:"deviceModeMenu/save",order:12,actionId:"emulation.capture-screenshot"}),i.ContextMenu.registerItem({location:"deviceModeMenu/save",order:13,actionId:"emulation.capture-full-height-screenshot"});const v={sensors:"Sensors",geolocation:"geolocation",timezones:"timezones",locale:"locale",locales:"locales",accelerometer:"accelerometer",deviceOrientation:"device orientation",locations:"Locations",touch:"Touch",devicebased:"Device-based",forceEnabled:"Force enabled",emulateIdleDetectorState:"Emulate Idle Detector state",noIdleEmulation:"No idle emulation",userActiveScreenUnlocked:"User active, screen unlocked",userActiveScreenLocked:"User active, screen locked",userIdleScreenUnlocked:"User idle, screen unlocked",userIdleScreenLocked:"User idle, screen locked",showSensors:"Show Sensors",showLocations:"Show Locations"},y=t.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",v),R=t.i18n.getLazilyComputedLocalizedString.bind(void 0,y);let h;async function f(){return h||(h=await import("../../panels/sensors/sensors.js")),h}i.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:R(v.showSensors),title:R(v.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>new((await f()).SensorsView.SensorsView),tags:[R(v.geolocation),R(v.timezones),R(v.locale),R(v.locales),R(v.accelerometer),R(v.deviceOrientation)]}),i.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:R(v.Line truncated
|
||||
@@ -1,3 +1,3 @@
|
||||
import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as i from"../../core/platform/platform.js";import*as n from"../../core/root/root.js";import*as s from"../../core/host/host.js";import*as o from"../visual_logging/visual_logging.js";import*as r from"../../models/text_utils/text_utils.js";import*as a from"../components/icon_button/icon_button.js";import*as l from"../components/adorners/adorners.js";import*as h from"../components/settings/settings.js";import*as d from"./utils/utils.js";export{d as Utils};import*as c from"../../core/dom_extension/dom_extension.js";import*as u from"../components/helpers/helpers.js";import*as m from"./theme_support/theme_support.js";import*as p from"../lit-html/lit-html.js";let g;class b{flavorsInternal;eventDispatchers;constructor(){this.flavorsInternal=new Map,this.eventDispatchers=new Map}static instance(e={forceNew:null}){const{forceNew:t}=e;return g&&!t||(g=new b),g}static removeInstance(){g=void 0}setFlavor(e,t){(this.flavorsInternal.get(e)||null)!==t&&(t?this.flavorsInternal.set(e,t):this.flavorsInternal.delete(e),this.dispatchFlavorChange(e,t))}dispatchFlavorChange(e,t){for(const i of f)i.contextTypes().includes(e)&&i.loadListener().then((e=>e.flavorChanged(t)));const i=this.eventDispatchers.get(e);i&&i.dispatchEventToListeners("FlavorChanged",t)}addFlavorChangeListener(t,i,n){let s=this.eventDispatchers.get(t);s||(s=new e.ObjectWrapper.ObjectWrapper,this.eventDispatchers.set(t,s)),s.addEventListener("FlavorChanged",i,n)}removeFlavorChangeListener(e,t,i){const n=this.eventDispatchers.get(e);n&&(n.removeEventListener("FlavorChanged",t,i),n.hasEventListeners("FlavorChanged")||this.eventDispatchers.delete(e))}flavor(e){return this.flavorsInternal.get(e)||null}flavors(){return new Set(this.flavorsInternal.keys())}}const f=[];var v=Object.freeze({__proto__:null,Context:b,registerListener:function(e){f.push(e)}});const w={elements:"Elements",screenshot:"Screenshot",network:"Network",memory:"Memory",javascript_profiler:"JavaScript Profiler",console:"Console",performance:"Performance",mobile:"Mobile",help:"Help",layers:"Layers",navigation:"Navigation",drawer:"Drawer",global:"Global",resources:"Resources",background_services:"Background Services",settings:"Settings",debugger:"Debugger",sources:"Sources",rendering:"Rendering",recorder:"Recorder",changes:"Changes"},x=t.i18n.registerUIStrings("ui/legacy/ActionRegistration.ts",w),E=t.i18n.getLocalizedString.bind(void 0,x);class I extends e.ObjectWrapper.ObjectWrapper{enabledInternal=!0;toggledInternal=!1;actionRegistration;constructor(e){super(),this.actionRegistration=e}id(){return this.actionRegistration.actionId}async execute(){if(!this.actionRegistration.loadActionDelegate)return!1;const e=await this.actionRegistration.loadActionDelegate(),t=this.id();return e.handleAction(b.instance(),t)}icon(){return this.actionRegistration.iconClass}toggledIcon(){return this.actionRegistration.toggledIconClass}toggleWithRedColor(){return Boolean(this.actionRegistration.toggleWithRedColor)}setEnabled(e){this.enabledInternal!==e&&(this.enabledInternal=e,this.dispatchEventToListeners("Enabled",e))}enabled(){return this.enabledInternal}category(){return this.actionRegistration.category}tags(){if(this.actionRegistration.tags)return this.actionRegistration.tags.map((e=>e())).join("\0")}toggleable(){return Boolean(this.actionRegistration.toggleable)}title(){let e=this.actionRegistration.title?this.actionRegistration.title():t.i18n.lockedString("");const i=this.actionRegistration.options;if(i)for(const t of i)t.value!==this.toggledInternal&&(e=t.title());return e}toggled(){return this.toggledInternal}setToggled(e){console.assert(this.toggleable(),"Shouldn't be toggling an untoggleable action",this.id()),this.toggledInternal!==e&&(this.toggledInternal=e,this.dispatchEventToListeners("Toggled",e))}options(){return this.actionRegistration.options}contextTypes(){if(this.actionRegistration.contextTypes)return this.actionRegistration.contextTypes()}canInstantiate(){return Boolean(this.actionRegistration.loadActionDelegate)}bindings(){return this.actionRegistration.bindings}experiment(){return this.actionRegistration.experiment}setting(){return this.actionRegistration.setting}condition(){return this.actionRegistration.condition}order(){return this.actionRegistration.order}}const y=new Map;function S(){y.clear()}function C(){return Array.from(y.values()).filter((t=>{const i=t.setting();try{if(i&&!e.Settings.moduleSetting(i).get())return!1}catch(e){if(e.message.startsWith("No setting registered"))return!1}return n.Runtime.Runtime.isDescriptorEnabled({experiment:t.experiment(),condition:t.condition()})})).sort(((e,t)=>(e.order()||0)-(t.order()||0)))}var T=Object.freeze({__proto__:null,Action:I,registerActionExtension:function(e){const t=e.actionId;if(y.has(t))throw new Error(`Duplicate action ID '${t}'`);if(!i.StringUtilities.isExtendedKebabCase(t))throw new Error(`Invalid action ID '${t}'`);y.set(t,new I(e))},reset:SLine truncated
|
||||
<x-link href='${e}' tabindex="0" class='${n=n||""} devtools-link' ${s?"no-click":""}
|
||||
jslog=${o.link().track({click:!0}).context(r)}>${i.StringUtilities.trimMiddle(t,150)}</x-link>`}constructor(){super(),this.style.setProperty("display","inline"),H(this),this.setAttribute("tabindex","0"),this.setAttribute("target","_blank"),this.setAttribute("rel","noopener"),this.hrefInternal=null,this.clickable=!0,this.onClick=e=>{e.consume(!0),this.hrefInternal&&s.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(this.hrefInternal),this.dispatchEvent(new Event("x-link-invoke"))},this.onKeyDown=e=>{i.KeyboardUtilities.isEnterOrSpaceKey(e)&&(e.consume(!0),this.hrefInternal&&s.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(this.hrefInternal)),this.dispatchEvent(new Event("x-link-invoke"))}}static get observedAttributes(){return Lt.observedAttributes.concat(["href","no-click","title"])}get href(){return this.hrefInternal}attributeChangedCallback(e,t,i){if("no-click"===e)return this.clickable=!i,void this.updateClick();if("href"===e){i||(i="");let e=null,t=null;try{t=new URL(ws(i)),e=t.toString()}catch{}return t&&"javascript:"===t.protocol&&(e=null),this.hrefInternal=e,this.hasAttribute("title")||Jt.install(this,i),void this.updateClick()}super.attributeChangedCallback(e,t,i)}updateClick(){null!==this.hrefInternal&&this.clickable?(this.addEventListener("click",this.onClick,!1),this.addEventListener("keydown",this.onKeyDown,!1),this.style.setProperty("cursor","pointer")):(this.removeEventListener("click",this.onClick,!1),this.removeEventListener("keydown",this.onKeyDown,!1),this.style.removeProperty("cursor"))}}customElements.define("x-link",go);const bo=p.html`<p>Hello, <x-link>world!</x-link></p>`;var fo=Object.freeze({__proto__:null,XLink:go,ContextMenuProvider:class{appendApplicableItems(e,t,i){let n=i;for(;n&&!(n instanceof go);)n=n.parentNodeOrShadowHost();if(!n||!n.href)return;const o=n;t.revealSection().appendItem(Un(),(()=>{o.href&&s.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(o.href)}),{jslogContext:"open-in-new-tab"}),t.revealSection().appendItem(Kn(),(()=>{o.href&&s.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(o.href)}),{jslogContext:"copy-link-address"})}},sample:bo});const vo={learnMore:"Learn more"},wo=t.i18n.registerUIStrings("ui/legacy/EmptyWidget.ts",vo),xo=t.i18n.getLocalizedString.bind(void 0,wo);var Eo=Object.freeze({__proto__:null,EmptyWidget:class extends Nt{textElement;constructor(e){super(),this.registerRequiredCSS(io),this.element.classList.add("empty-view-scroller"),this.contentElement=this.element.createChild("div","empty-view"),this.contentElement.setAttribute("jslog",`${o.section("empty-view")}`),this.textElement=this.contentElement.createChild("div","empty-bold-text"),this.textElement.textContent=e}appendParagraph(){return this.contentElement.createChild("p")}appendLink(e){const t=go.create(e,xo(vo.learnMore),void 0,void 0,"learn-more");return this.contentElement.appendChild(t)}set text(e){this.textElement.textContent=e}}}),Io={cssContent:'.filter-bar{background-color:var(--sys-color-cdt-base-container);flex:none;flex-wrap:wrap;align-items:center;border-bottom:1px solid var(--sys-color-divider);color:var(--sys-color-on-surface-subtle)}.filter-text-filter{display:inline-flex;margin-left:1px;margin-right:2px;min-width:40px;max-width:200px;height:24px;align-items:center}.filter-bitset-filter{padding:2px;display:inline-flex;overflow:hidden;height:24px;position:relative;margin:0}.filter-bitset-filter span{color:var(--sys-color-on-surface);outline:1px solid var(--sys-color-neutral-outline);outline-offset:-1px;box-sizing:border-box;display:inline-block;flex:none;margin:auto 2px;padding:3px 6px;background:transparent;border-radius:6px;overflow:hidden;cursor:pointer;font-weight:500;font-size:11px}.filter-bitset-filter span:focus-visible{outline:-webkit-focus-ring-color auto 5px}.filter-bitset-filter span:hover{outline:none;background:var(--sys-color-state-hover-on-subtle)}.filter-bitset-filter span.selected,\n.filter-bitset-filter span:active{color:var(--sys-color-on-tonal-container);outline:none;background-color:var(--sys-color-tonal-container)}.filter-bitset-filter-divider{background-color:var(--sys-color-divider);height:16px;width:1px;margin:auto 2px;display:inline-block}.filter-checkbox-filter{padding-left:4px;padding-right:7px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-flex;vertical-align:middle;height:24px;position:relative}.filter-checkbox-filter > [is="dt-checkbox"]{display:flex;margin:auto 0}.toolbar-has-dropdown-shrinkable{flex-shrink:1}.filter-divider{background-color:var(--sys-color-on-base-divider);width:1px;margin:5px 4px;height:16px}.toolbar-button{white-space:nowrap;overflow:hidden;min-width:28px;background:transparent;border-radius:0}.toolbar-button .active-filters-count{margin-right:5px;--override-adorner-background-color:var(--sys-color-tonal-container);--override-adorner-border-color:var(--sys-color-tonal-container);--override-adorner-text-color:var(--sys-color-primaryLine truncated
|
||||
jslog=${o.link().track({click:!0}).context(r)}>${i.StringUtilities.trimMiddle(t,150)}</x-link>`}constructor(){super(),this.style.setProperty("display","inline"),H(this),this.setAttribute("tabindex","0"),this.setAttribute("target","_blank"),this.setAttribute("rel","noopener"),this.hrefInternal=null,this.clickable=!0,this.onClick=e=>{e.consume(!0),this.hrefInternal&&s.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(this.hrefInternal),this.dispatchEvent(new Event("x-link-invoke"))},this.onKeyDown=e=>{i.KeyboardUtilities.isEnterOrSpaceKey(e)&&(e.consume(!0),this.hrefInternal&&s.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(this.hrefInternal)),this.dispatchEvent(new Event("x-link-invoke"))}}static get observedAttributes(){return Lt.observedAttributes.concat(["href","no-click","title"])}get href(){return this.hrefInternal}attributeChangedCallback(e,t,i){if("no-click"===e)return this.clickable=!i,void this.updateClick();if("href"===e){i||(i="");let e=null,t=null;try{t=new URL(ws(i)),e=t.toString()}catch{}return t&&"javascript:"===t.protocol&&(e=null),this.hrefInternal=e,this.hasAttribute("title")||Jt.install(this,i),void this.updateClick()}super.attributeChangedCallback(e,t,i)}updateClick(){null!==this.hrefInternal&&this.clickable?(this.addEventListener("click",this.onClick,!1),this.addEventListener("keydown",this.onKeyDown,!1),this.style.setProperty("cursor","pointer")):(this.removeEventListener("click",this.onClick,!1),this.removeEventListener("keydown",this.onKeyDown,!1),this.style.removeProperty("cursor"))}}customElements.define("x-link",go);const bo=p.html`<p>Hello, <x-link>world!</x-link></p>`;var fo=Object.freeze({__proto__:null,XLink:go,ContextMenuProvider:class{appendApplicableItems(e,t,i){let n=i;for(;n&&!(n instanceof go);)n=n.parentNodeOrShadowHost();if(!n||!n.href)return;const o=n;t.revealSection().appendItem(Un(),(()=>{o.href&&s.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(o.href)}),{jslogContext:"open-in-new-tab"}),t.revealSection().appendItem(Kn(),(()=>{o.href&&s.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(o.href)}),{jslogContext:"copy-link-address"})}},sample:bo});const vo={learnMore:"Learn more"},wo=t.i18n.registerUIStrings("ui/legacy/EmptyWidget.ts",vo),xo=t.i18n.getLocalizedString.bind(void 0,wo);var Eo=Object.freeze({__proto__:null,EmptyWidget:class extends Nt{textElement;constructor(e){super(),this.registerRequiredCSS(io),this.element.classList.add("empty-view-scroller"),this.contentElement=this.element.createChild("div","empty-view"),this.contentElement.setAttribute("jslog",`${o.section("empty-view")}`),this.textElement=this.contentElement.createChild("div","empty-bold-text"),this.textElement.textContent=e}appendParagraph(){return this.contentElement.createChild("p")}appendLink(e){const t=go.create(e,xo(vo.learnMore),void 0,void 0,"learn-more");return this.contentElement.appendChild(t)}set text(e){this.textElement.textContent=e}}}),Io={cssContent:'.filter-bar{background-color:var(--sys-color-cdt-base-container);flex:none;flex-wrap:wrap;align-items:center;border-bottom:1px solid var(--sys-color-divider);color:var(--sys-color-on-surface-subtle)}.filter-text-filter{display:inline-flex;margin-left:1px;margin-right:2px;min-width:40px;max-width:200px;height:24px;align-items:center}.filter-bitset-filter{padding:2px;display:inline-flex;overflow:hidden;height:24px;position:relative;margin:0}.filter-bitset-filter span{color:var(--sys-color-on-surface);outline:1px solid var(--sys-color-neutral-outline);outline-offset:-1px;box-sizing:border-box;display:inline-block;flex:none;margin:auto 2px;padding:3px 6px;background:transparent;border-radius:6px;overflow:hidden;cursor:pointer;font-weight:500;font-size:11px}.filter-bitset-filter span:focus-visible{outline:-webkit-focus-ring-color auto 5px}.filter-bitset-filter span:hover{outline:none;background:var(--sys-color-state-hover-on-subtle)}.filter-bitset-filter span.selected,\n.filter-bitset-filter span:active{color:var(--sys-color-on-tonal-container);outline:none;background-color:var(--sys-color-tonal-container)}.filter-bitset-filter-divider{background-color:var(--sys-color-divider);height:16px;width:1px;margin:auto 2px;display:inline-block}.filter-checkbox-filter{padding-left:4px;padding-right:7px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-flex;vertical-align:middle;height:24px;position:relative}.filter-checkbox-filter > [is="dt-checkbox"]{display:flex;margin:auto 0}.toolbar-has-dropdown-shrinkable{flex-shrink:1}.filter-divider{background-color:var(--sys-color-on-base-divider);width:1px;margin:5px 4px;height:16px}.toolbar-button{white-space:nowrap;overflow:hidden;min-width:28px;background:transparent;border-radius:0}.toolbar-button .active-filters-count{margin-right:5px;--override-adorner-background-color:var(--sys-color-tonal-container);--override-adorner-border-color:var(--sys-color-tonal-container);--override-adorner-text-color:var(--sys-color-primaryLine truncated
|
||||
Reference in new issue
Block a user