@loftyshaky/shared 0.0.34 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ext.js CHANGED
@@ -1 +1 @@
1
- import{c as commonjsGlobal,_ as __awaiter,a as _}from"./chunk-main-00a79e55.js";import{M as Main}from"./chunk-main-707d1b35.js";import"react";import"react-dom";var lib={},browserPolyfill={exports:{}};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,function(module){if("undefined"==typeof browser||Object.getPrototypeOf(browser)!==Object.prototype){const CHROME_SEND_MESSAGE_CALLBACK_NO_RESPONSE_MESSAGE="The message port closed before a response was received.",SEND_RESPONSE_DEPRECATION_WARNING="Returning a Promise is the preferred way to send a reply from an onMessage/onMessageExternal listener, as the sendResponse will be removed from the specs (See https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage)",wrapAPIs=extensionAPIs=>{const apiMetadata={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(apiMetadata).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class DefaultWeakMap extends WeakMap{constructor(createItem,items){super(items),this.createItem=createItem}get(key){return this.has(key)||this.set(key,this.createItem(key)),super.get(key)}}const isThenable=value=>value&&"object"==typeof value&&"function"==typeof value.then,makeCallback=(promise,metadata)=>(...callbackArgs)=>{extensionAPIs.runtime.lastError?promise.reject(new Error(extensionAPIs.runtime.lastError.message)):metadata.singleCallbackArg||callbackArgs.length<=1&&!1!==metadata.singleCallbackArg?promise.resolve(callbackArgs[0]):promise.resolve(callbackArgs)},pluralizeArguments=numArgs=>1==numArgs?"argument":"arguments",wrapAsyncFunction=(name,metadata)=>function(target,...args){if(args.length<metadata.minArgs)throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`);if(args.length>metadata.maxArgs)throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`);return new Promise(((resolve,reject)=>{if(metadata.fallbackToNoCallback)try{target[name](...args,makeCallback({resolve:resolve,reject:reject},metadata))}catch(cbError){console.warn(`${name} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,cbError),target[name](...args),metadata.fallbackToNoCallback=!1,metadata.noCallback=!0,resolve()}else metadata.noCallback?(target[name](...args),resolve()):target[name](...args,makeCallback({resolve:resolve,reject:reject},metadata))}))},wrapMethod=(target,method,wrapper)=>new Proxy(method,{apply:(targetMethod,thisObj,args)=>wrapper.call(thisObj,target,...args)});let hasOwnProperty=Function.call.bind(Object.prototype.hasOwnProperty);const wrapObject=(target,wrappers={},metadata={})=>{let cache=Object.create(null),handlers={has:(proxyTarget,prop)=>prop in target||prop in cache,get(proxyTarget,prop,receiver){if(prop in cache)return cache[prop];if(!(prop in target))return;let value=target[prop];if("function"==typeof value)if("function"==typeof wrappers[prop])value=wrapMethod(target,target[prop],wrappers[prop]);else if(hasOwnProperty(metadata,prop)){let wrapper=wrapAsyncFunction(prop,metadata[prop]);value=wrapMethod(target,target[prop],wrapper)}else value=value.bind(target);else if("object"==typeof value&&null!==value&&(hasOwnProperty(wrappers,prop)||hasOwnProperty(metadata,prop)))value=wrapObject(value,wrappers[prop],metadata[prop]);else{if(!hasOwnProperty(metadata,"*"))return Object.defineProperty(cache,prop,{configurable:!0,enumerable:!0,get:()=>target[prop],set(value){target[prop]=value}}),value;value=wrapObject(value,wrappers[prop],metadata["*"])}return cache[prop]=value,value},set:(proxyTarget,prop,value,receiver)=>(prop in cache?cache[prop]=value:target[prop]=value,!0),defineProperty:(proxyTarget,prop,desc)=>Reflect.defineProperty(cache,prop,desc),deleteProperty:(proxyTarget,prop)=>Reflect.deleteProperty(cache,prop)},proxyTarget=Object.create(target);return new Proxy(proxyTarget,handlers)},wrapEvent=wrapperMap=>({addListener(target,listener,...args){target.addListener(wrapperMap.get(listener),...args)},hasListener:(target,listener)=>target.hasListener(wrapperMap.get(listener)),removeListener(target,listener){target.removeListener(wrapperMap.get(listener))}}),onRequestFinishedWrappers=new DefaultWeakMap((listener=>"function"!=typeof listener?listener:function(req){const wrappedReq=wrapObject(req,{},{getContent:{minArgs:0,maxArgs:0}});listener(wrappedReq)}));let loggedSendResponseDeprecationWarning=!1;const onMessageWrappers=new DefaultWeakMap((listener=>"function"!=typeof listener?listener:function(message,sender,sendResponse){let wrappedSendResponse,result,didCallSendResponse=!1,sendResponsePromise=new Promise((resolve=>{wrappedSendResponse=function(response){loggedSendResponseDeprecationWarning||(console.warn(SEND_RESPONSE_DEPRECATION_WARNING,(new Error).stack),loggedSendResponseDeprecationWarning=!0),didCallSendResponse=!0,resolve(response)}}));try{result=listener(message,sender,wrappedSendResponse)}catch(err){result=Promise.reject(err)}const isResultThenable=!0!==result&&isThenable(result);if(!0!==result&&!isResultThenable&&!didCallSendResponse)return!1;const sendPromisedResult=promise=>{promise.then((msg=>{sendResponse(msg)}),(error=>{let message;message=error&&(error instanceof Error||"string"==typeof error.message)?error.message:"An unexpected error occurred",sendResponse({__mozWebExtensionPolyfillReject__:!0,message:message})})).catch((err=>{console.error("Failed to send onMessage rejected reply",err)}))};return sendPromisedResult(isResultThenable?result:sendResponsePromise),!0})),wrappedSendMessageCallback=({reject:reject,resolve:resolve},reply)=>{extensionAPIs.runtime.lastError?extensionAPIs.runtime.lastError.message===CHROME_SEND_MESSAGE_CALLBACK_NO_RESPONSE_MESSAGE?resolve():reject(new Error(extensionAPIs.runtime.lastError.message)):reply&&reply.__mozWebExtensionPolyfillReject__?reject(new Error(reply.message)):resolve(reply)},wrappedSendMessage=(name,metadata,apiNamespaceObj,...args)=>{if(args.length<metadata.minArgs)throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`);if(args.length>metadata.maxArgs)throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`);return new Promise(((resolve,reject)=>{const wrappedCb=wrappedSendMessageCallback.bind(null,{resolve:resolve,reject:reject});args.push(wrappedCb),apiNamespaceObj.sendMessage(...args)}))},staticWrappers={devtools:{network:{onRequestFinished:wrapEvent(onRequestFinishedWrappers)}},runtime:{onMessage:wrapEvent(onMessageWrappers),onMessageExternal:wrapEvent(onMessageWrappers),sendMessage:wrappedSendMessage.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:wrappedSendMessage.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},settingMetadata={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return apiMetadata.privacy={network:{"*":settingMetadata},services:{"*":settingMetadata},websites:{"*":settingMetadata}},wrapObject(extensionAPIs,staticWrappers,apiMetadata)};if("object"!=typeof chrome||!chrome||!chrome.runtime||!chrome.runtime.id)throw new Error("This script should only be loaded in a browser extension.");module.exports=wrapAPIs(chrome)}else module.exports=browser}(browserPolyfill),Object.defineProperty(lib,"__esModule",{value:!0});var browser$1=lib.browser=browserPolyfill.exports;global.we=browser$1;global.misplaced_dependency=culprit_page=>err((()=>{if(page!==culprit_page){const msg=we.i18n.getMessage("dependencicies_from_other_page_loaded_into_this_page_alert")+culprit_page.toUpperCase();"background"===page?console.log(msg):alert(msg)}}),"shr_1094");class Ext{constructor(){this.log_error=(error_obj,error_code)=>{Main.i().output_error(error_obj,error_code)},this.get_ext_version=()=>{try{return we.runtime.getManifest().version}catch(error_obj){this.log_error(error_obj,"shr_1095")}return""},this.iterate_all_tabs=callback=>__awaiter(this,void 0,void 0,(function*(){try{(yield we.windows.getAll({populate:!0,windowTypes:["normal"]})).forEach((self=>{n(self.tabs)&&self.tabs.forEach((tab=>{n(tab.id)&&callback(tab)}))}))}catch(error_obj){this.log_error(error_obj,"shr_1096")}})),this.msg=msg=>{try{const msg_2=n(we.i18n.getMessage)?we.i18n.getMessage(msg):"";return n(msg_2)?msg_2:""}catch(error_obj){this.log_error(error_obj,"shr_1097")}return""},this.get_active_tab=()=>__awaiter(this,void 0,void 0,(function*(){try{return(yield we.tabs.query({active:!0,currentWindow:!0}))[0]}catch(error_obj){this.log_error(error_obj,"shr_1098")}})),this.send_msg=msg=>__awaiter(this,void 0,void 0,(function*(){try{yield we.runtime.sendMessage(msg)}catch(error_obj){this.log_error(error_obj,"shr_1099")}})),this.send_msg_resp=msg=>__awaiter(this,void 0,void 0,(function*(){try{return yield we.runtime.sendMessage(msg)}catch(error_obj){this.log_error(error_obj,"shr_1100")}})),this.send_msg_to_tab=(id,msg)=>__awaiter(this,void 0,void 0,(function*(){try{yield we.tabs.sendMessage(id,msg)}catch(error_obj){this.log_error(error_obj,"shr_1101")}})),this.send_msg_to_tab_resp=(id,msg)=>__awaiter(this,void 0,void 0,(function*(){try{return yield we.tabs.sendMessage(id,msg)}catch(error_obj){this.log_error(error_obj,"shr_1102")}})),this.send_msg_to_active_tab=msg=>__awaiter(this,void 0,void 0,(function*(){try{const tab=yield this.get_active_tab();n(tab)&&n(tab.id)&&(yield this.send_msg_to_tab(tab.id,msg))}catch(error_obj){this.log_error(error_obj,"shr_1103")}})),this.send_msg_to_active_tab_resp=msg=>__awaiter(this,void 0,void 0,(function*(){try{const tab=yield this.get_active_tab();if(n(tab)&&n(tab.id))return this.send_msg_to_tab(tab.id,msg)}catch(error_obj){this.log_error(error_obj,"shr_1104")}})),this.send_msg_to_all_tabs=msg=>__awaiter(this,void 0,void 0,(function*(){try{yield this.iterate_all_tabs((tab=>__awaiter(this,void 0,void 0,(function*(){try{n(tab.id)&&(yield this.send_msg_to_tab(tab.id,msg))}catch(error_obj){this.log_error(error_obj,"shr_1105")}}))))}catch(error_obj){this.log_error(error_obj,"shr_1106")}})),this.storage_get=keys=>__awaiter(this,void 0,void 0,(function*(){try{const data_sync=yield we.storage.sync.get(keys);if(n(data_sync))return data_sync;return yield we.storage.local.get(keys)}catch(error_obj){this.log_error(error_obj,"shr_1107")}})),this.storage_set=obj=>__awaiter(this,void 0,void 0,(function*(){try{const data_local=yield we.storage.local.get();if(n(data_local)){const merged_data=_.merge(data_local,obj);yield we.storage.sync.set(merged_data)}else yield we.storage.sync.set(obj);yield we.storage.local.clear()}catch(error_obj){const data_sync=yield we.storage.sync.get();n(data_sync)&&(yield we.storage.local.set(data_sync),yield we.storage.sync.clear()),yield we.storage.local.set(obj)}})),this.inject_js_and_css_in_content_script=(js_file_paths,css_file_paths)=>__awaiter(this,void 0,void 0,(function*(){yield this.iterate_all_tabs((tab=>__awaiter(this,void 0,void 0,(function*(){try{if(n(tab.id)){const already_injected_script_func=()=>document.title.includes("​​​​​​​​​​"),result=yield we.scripting.executeScript({function:already_injected_script_func,target:{tabId:tab.id}});result[0].result||(js_file_paths.forEach((file_path=>{try{we.scripting.executeScript({target:{tabId:tab.id},files:[file_path]})}catch(error_obj){this.log_error(error_obj,"shr_1108")}})),css_file_paths.forEach((file_path=>{try{we.scripting.insertCSS({target:{tabId:tab.id},files:[file_path]})}catch(error_obj){this.log_error(error_obj,"shr_1109")}})))}}catch(error_obj){this.log_error(error_obj,"shr_1110")}}))))}))}static i(){return this.i0||(this.i0=new this)}}global.ext=Ext.i(),err((()=>{const title=global.document?document.querySelector("title"):void 0;["https:","http:"].includes(global.location.protocol)?global.page="content_script":global.page=n(title)&&n(title.dataset.page)?title.dataset.page:"background"}),"shr_1093");export{Ext};
1
+ import{c as commonjsGlobal,_ as __awaiter,a as _}from"./chunk-main-a7524397.js";import{M as Main}from"./chunk-main-40daee2f.js";import"react";import"react-dom";var lib={},browserPolyfill={exports:{}};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,function(module){if("undefined"==typeof browser||Object.getPrototypeOf(browser)!==Object.prototype){const CHROME_SEND_MESSAGE_CALLBACK_NO_RESPONSE_MESSAGE="The message port closed before a response was received.",SEND_RESPONSE_DEPRECATION_WARNING="Returning a Promise is the preferred way to send a reply from an onMessage/onMessageExternal listener, as the sendResponse will be removed from the specs (See https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage)",wrapAPIs=extensionAPIs=>{const apiMetadata={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(apiMetadata).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class DefaultWeakMap extends WeakMap{constructor(createItem,items){super(items),this.createItem=createItem}get(key){return this.has(key)||this.set(key,this.createItem(key)),super.get(key)}}const isThenable=value=>value&&"object"==typeof value&&"function"==typeof value.then,makeCallback=(promise,metadata)=>(...callbackArgs)=>{extensionAPIs.runtime.lastError?promise.reject(new Error(extensionAPIs.runtime.lastError.message)):metadata.singleCallbackArg||callbackArgs.length<=1&&!1!==metadata.singleCallbackArg?promise.resolve(callbackArgs[0]):promise.resolve(callbackArgs)},pluralizeArguments=numArgs=>1==numArgs?"argument":"arguments",wrapAsyncFunction=(name,metadata)=>function(target,...args){if(args.length<metadata.minArgs)throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`);if(args.length>metadata.maxArgs)throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`);return new Promise(((resolve,reject)=>{if(metadata.fallbackToNoCallback)try{target[name](...args,makeCallback({resolve:resolve,reject:reject},metadata))}catch(cbError){console.warn(`${name} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,cbError),target[name](...args),metadata.fallbackToNoCallback=!1,metadata.noCallback=!0,resolve()}else metadata.noCallback?(target[name](...args),resolve()):target[name](...args,makeCallback({resolve:resolve,reject:reject},metadata))}))},wrapMethod=(target,method,wrapper)=>new Proxy(method,{apply:(targetMethod,thisObj,args)=>wrapper.call(thisObj,target,...args)});let hasOwnProperty=Function.call.bind(Object.prototype.hasOwnProperty);const wrapObject=(target,wrappers={},metadata={})=>{let cache=Object.create(null),handlers={has:(proxyTarget,prop)=>prop in target||prop in cache,get(proxyTarget,prop,receiver){if(prop in cache)return cache[prop];if(!(prop in target))return;let value=target[prop];if("function"==typeof value)if("function"==typeof wrappers[prop])value=wrapMethod(target,target[prop],wrappers[prop]);else if(hasOwnProperty(metadata,prop)){let wrapper=wrapAsyncFunction(prop,metadata[prop]);value=wrapMethod(target,target[prop],wrapper)}else value=value.bind(target);else if("object"==typeof value&&null!==value&&(hasOwnProperty(wrappers,prop)||hasOwnProperty(metadata,prop)))value=wrapObject(value,wrappers[prop],metadata[prop]);else{if(!hasOwnProperty(metadata,"*"))return Object.defineProperty(cache,prop,{configurable:!0,enumerable:!0,get:()=>target[prop],set(value){target[prop]=value}}),value;value=wrapObject(value,wrappers[prop],metadata["*"])}return cache[prop]=value,value},set:(proxyTarget,prop,value,receiver)=>(prop in cache?cache[prop]=value:target[prop]=value,!0),defineProperty:(proxyTarget,prop,desc)=>Reflect.defineProperty(cache,prop,desc),deleteProperty:(proxyTarget,prop)=>Reflect.deleteProperty(cache,prop)},proxyTarget=Object.create(target);return new Proxy(proxyTarget,handlers)},wrapEvent=wrapperMap=>({addListener(target,listener,...args){target.addListener(wrapperMap.get(listener),...args)},hasListener:(target,listener)=>target.hasListener(wrapperMap.get(listener)),removeListener(target,listener){target.removeListener(wrapperMap.get(listener))}}),onRequestFinishedWrappers=new DefaultWeakMap((listener=>"function"!=typeof listener?listener:function(req){const wrappedReq=wrapObject(req,{},{getContent:{minArgs:0,maxArgs:0}});listener(wrappedReq)}));let loggedSendResponseDeprecationWarning=!1;const onMessageWrappers=new DefaultWeakMap((listener=>"function"!=typeof listener?listener:function(message,sender,sendResponse){let wrappedSendResponse,result,didCallSendResponse=!1,sendResponsePromise=new Promise((resolve=>{wrappedSendResponse=function(response){loggedSendResponseDeprecationWarning||(console.warn(SEND_RESPONSE_DEPRECATION_WARNING,(new Error).stack),loggedSendResponseDeprecationWarning=!0),didCallSendResponse=!0,resolve(response)}}));try{result=listener(message,sender,wrappedSendResponse)}catch(err){result=Promise.reject(err)}const isResultThenable=!0!==result&&isThenable(result);if(!0!==result&&!isResultThenable&&!didCallSendResponse)return!1;const sendPromisedResult=promise=>{promise.then((msg=>{sendResponse(msg)}),(error=>{let message;message=error&&(error instanceof Error||"string"==typeof error.message)?error.message:"An unexpected error occurred",sendResponse({__mozWebExtensionPolyfillReject__:!0,message:message})})).catch((err=>{console.error("Failed to send onMessage rejected reply",err)}))};return sendPromisedResult(isResultThenable?result:sendResponsePromise),!0})),wrappedSendMessageCallback=({reject:reject,resolve:resolve},reply)=>{extensionAPIs.runtime.lastError?extensionAPIs.runtime.lastError.message===CHROME_SEND_MESSAGE_CALLBACK_NO_RESPONSE_MESSAGE?resolve():reject(new Error(extensionAPIs.runtime.lastError.message)):reply&&reply.__mozWebExtensionPolyfillReject__?reject(new Error(reply.message)):resolve(reply)},wrappedSendMessage=(name,metadata,apiNamespaceObj,...args)=>{if(args.length<metadata.minArgs)throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`);if(args.length>metadata.maxArgs)throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`);return new Promise(((resolve,reject)=>{const wrappedCb=wrappedSendMessageCallback.bind(null,{resolve:resolve,reject:reject});args.push(wrappedCb),apiNamespaceObj.sendMessage(...args)}))},staticWrappers={devtools:{network:{onRequestFinished:wrapEvent(onRequestFinishedWrappers)}},runtime:{onMessage:wrapEvent(onMessageWrappers),onMessageExternal:wrapEvent(onMessageWrappers),sendMessage:wrappedSendMessage.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:wrappedSendMessage.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},settingMetadata={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return apiMetadata.privacy={network:{"*":settingMetadata},services:{"*":settingMetadata},websites:{"*":settingMetadata}},wrapObject(extensionAPIs,staticWrappers,apiMetadata)};if("object"!=typeof chrome||!chrome||!chrome.runtime||!chrome.runtime.id)throw new Error("This script should only be loaded in a browser extension.");module.exports=wrapAPIs(chrome)}else module.exports=browser}(browserPolyfill),Object.defineProperty(lib,"__esModule",{value:!0});var browser$1=lib.browser=browserPolyfill.exports;global.we=browser$1;global.misplaced_dependency=culprit_page=>err((()=>{if(page!==culprit_page){const msg=we.i18n.getMessage("dependencicies_from_other_page_loaded_into_this_page_alert")+culprit_page.toUpperCase();"background"===page?console.log(msg):alert(msg)}}),"shr_1094");class Ext{constructor(){this.log_error=(error_obj,error_code)=>{Main.i().output_error(error_obj,error_code)},this.get_ext_version=()=>{try{return we.runtime.getManifest().version}catch(error_obj){this.log_error(error_obj,"shr_1095")}return""},this.iterate_all_tabs=callback=>__awaiter(this,void 0,void 0,(function*(){try{(yield we.windows.getAll({populate:!0,windowTypes:["normal"]})).forEach((self=>{n(self.tabs)&&self.tabs.forEach((tab=>{n(tab.id)&&callback(tab)}))}))}catch(error_obj){this.log_error(error_obj,"shr_1096")}})),this.msg=msg=>{try{const msg_2=n(we.i18n.getMessage)?we.i18n.getMessage(msg):"";return n(msg_2)?msg_2:""}catch(error_obj){this.log_error(error_obj,"shr_1097")}return""},this.get_active_tab=()=>__awaiter(this,void 0,void 0,(function*(){try{return(yield we.tabs.query({active:!0,currentWindow:!0}))[0]}catch(error_obj){this.log_error(error_obj,"shr_1098")}})),this.send_msg=msg=>__awaiter(this,void 0,void 0,(function*(){try{yield we.runtime.sendMessage(msg)}catch(error_obj){this.log_error(error_obj,"shr_1099")}})),this.send_msg_resp=msg=>__awaiter(this,void 0,void 0,(function*(){try{return yield we.runtime.sendMessage(msg)}catch(error_obj){this.log_error(error_obj,"shr_1100")}})),this.send_msg_to_tab=(id,msg)=>__awaiter(this,void 0,void 0,(function*(){try{yield we.tabs.sendMessage(id,msg)}catch(error_obj){this.log_error(error_obj,"shr_1101")}})),this.send_msg_to_tab_resp=(id,msg)=>__awaiter(this,void 0,void 0,(function*(){try{return yield we.tabs.sendMessage(id,msg)}catch(error_obj){this.log_error(error_obj,"shr_1102")}})),this.send_msg_to_active_tab=msg=>__awaiter(this,void 0,void 0,(function*(){try{const tab=yield this.get_active_tab();n(tab)&&n(tab.id)&&(yield this.send_msg_to_tab(tab.id,msg))}catch(error_obj){this.log_error(error_obj,"shr_1103")}})),this.send_msg_to_active_tab_resp=msg=>__awaiter(this,void 0,void 0,(function*(){try{const tab=yield this.get_active_tab();if(n(tab)&&n(tab.id))return this.send_msg_to_tab(tab.id,msg)}catch(error_obj){this.log_error(error_obj,"shr_1104")}})),this.send_msg_to_all_tabs=msg=>__awaiter(this,void 0,void 0,(function*(){try{yield this.iterate_all_tabs((tab=>__awaiter(this,void 0,void 0,(function*(){try{n(tab.id)&&(yield this.send_msg_to_tab(tab.id,msg))}catch(error_obj){this.log_error(error_obj,"shr_1105")}}))))}catch(error_obj){this.log_error(error_obj,"shr_1106")}})),this.storage_get=keys=>__awaiter(this,void 0,void 0,(function*(){try{const data_sync=yield we.storage.sync.get(keys);if(n(data_sync))return data_sync;return yield we.storage.local.get(keys)}catch(error_obj){this.log_error(error_obj,"shr_1107")}})),this.storage_set=(obj,replace)=>__awaiter(this,void 0,void 0,(function*(){try{const data_local=yield we.storage.local.get();if(n(data_local)){const merged_data=n(replace)?obj:_.merge(data_local,obj);yield we.storage.sync.set(merged_data)}else yield we.storage.sync.set(obj);yield we.storage.local.clear()}catch(error_obj){const data_sync=yield we.storage.sync.get();n(data_sync)&&(yield we.storage.local.set(data_sync),yield we.storage.sync.clear()),yield we.storage.local.set(obj)}})),this.storage_remove=keys=>__awaiter(this,void 0,void 0,(function*(){try{yield we.storage.sync.remove(keys)}catch(error_obj){yield we.storage.local.remove(keys)}})),this.inject_js_and_css_in_content_script=(js_file_paths,css_file_paths)=>__awaiter(this,void 0,void 0,(function*(){yield this.iterate_all_tabs((tab=>__awaiter(this,void 0,void 0,(function*(){try{if(n(tab.id)){const already_injected_script_func=()=>document.title.includes("​​​​​​​​​​"),result=yield we.scripting.executeScript({function:already_injected_script_func,target:{tabId:tab.id}});result[0].result||(js_file_paths.forEach((file_path=>{try{we.scripting.executeScript({target:{tabId:tab.id},files:[file_path]})}catch(error_obj){this.log_error(error_obj,"shr_1108")}})),css_file_paths.forEach((file_path=>{try{we.scripting.insertCSS({target:{tabId:tab.id},files:[file_path]})}catch(error_obj){this.log_error(error_obj,"shr_1109")}})))}}catch(error_obj){this.log_error(error_obj,"shr_1110")}}))))}))}static i(){return this.i0||(this.i0=new this)}}global.ext=Ext.i(),err((()=>{const title=global.document?document.querySelector("title"):void 0;["https:","http:"].includes(global.location.protocol)?global.page="content_script":global.page=n(title)&&n(title.dataset.page)?title.dataset.page:"background"}),"shr_1093");export{Ext};
package/index.js CHANGED
@@ -1 +1 @@
1
- import{B as Body,a as Body$3,C as CloseBtn,E as ExtName,b as Msg,c as Main$7,V as Visibility}from"./chunk-main-707d1b35.js";import{S as Sections,B as Body$1,f as Body$2,g as BaseTr,T as Transition,M as Main$1,h as Main$2,i as Main$4,j as Main$6}from"./chunk-main-00a79e55.js";export{X,p as prevent_default,k as stop_propagation}from"./chunk-main-00a79e55.js";import"react";import{M as Main$3,a as Main$5}from"./chunk-main-bacabf12.js";import"react-dom";var index$f=Object.freeze({__proto__:null,Body:Body}),t=Object.freeze({__proto__:null});var vars=Object.freeze({__proto__:null,scrollbar_width:17});const init_shared=()=>err((()=>{err((()=>{Sections.i().init_options()}),"shr_1087")}),"shr_1112");var index$e=Object.freeze({__proto__:null,Body:Body$1}),index$d=Object.freeze({__proto__:null,Body:Body$2}),index$c=Object.freeze({__proto__:null,BaseTr:BaseTr}),index$b=Object.freeze({__proto__:null,Transition:Transition}),index$a=Object.freeze({__proto__:null,Main:Main$1}),index$9=Object.freeze({__proto__:null,Main:Main$2});var index$8=Object.freeze({__proto__:null,Tabs:class{constructor(){this.keep_long=()=>err((()=>{we.tabs.onUpdated.addListener((tab_id=>err((()=>{we.tabs.connect(tab_id)}),"shr_1113")))}),"shr_1114"),this.add_on_connect_listener=()=>err((()=>{we.runtime.onConnect.addListener((()=>{}))}),"shr_1115")}static i(){return this.i0||(this.i0=new this)}}}),index$7=Object.freeze({__proto__:null,Main:Main$3}),index$6=Object.freeze({__proto__:null,Main:Main$4}),index$5=Object.freeze({__proto__:null,Main:Main$5});var index$4=Object.freeze({__proto__:null,Main:class{constructor(){this.to_object=({arr:arr,section:section,subsection:subsection})=>err((()=>{const obj_final={};return arr.forEach((item=>err((()=>{obj_final[item.name]=item,section&&(obj_final[item.name].section=section),subsection&&(obj_final[item.name].subsection=subsection)}),"shr_1136"))),obj_final}),"shr_1137")}static i(){return this.i0||(this.i0=new this)}}}),index$3=Object.freeze({__proto__:null,Main:Main$6}),index$2=Object.freeze({__proto__:null}),index$1=Object.freeze({__proto__:null,Body:Body$3,CloseBtn:CloseBtn,ExtName:ExtName,Msg:Msg}),index=Object.freeze({__proto__:null,Main:Main$7,Visibility:Visibility});export{index$f as c_crash_handler,index$1 as c_error,index$e as c_ext_version,index$d as c_loading_screen,index$c as c_tr,index as d_crash_handler,index$a as d_loading_screen,index$2 as i_data,init_shared,index$b as o_tr,index$9 as s_css_vars,index$8 as s_keep_alive,index$7 as s_no_tr,index$6 as s_tab_index,index$5 as s_theme,index$4 as s_utils,index$3 as s_viewport,t,vars};
1
+ import{B as Body,a as Body$3,C as CloseBtn,E as ExtName,b as Msg,c as Main$7,V as Visibility}from"./chunk-main-40daee2f.js";import{S as Sections,B as Body$1,f as Body$2,g as BaseTr,T as Transition,M as Main$1,h as Main$2,i as Main$4,j as Main$6}from"./chunk-main-a7524397.js";export{X,p as prevent_default,k as stop_propagation}from"./chunk-main-a7524397.js";import"react";import{M as Main$3,a as Main$5}from"./chunk-main-51348ab9.js";import"react-dom";var index$f=Object.freeze({__proto__:null,Body:Body}),t=Object.freeze({__proto__:null});var vars=Object.freeze({__proto__:null,scrollbar_width:17});const init_shared=()=>err((()=>{err((()=>{Sections.i().init_options()}),"shr_1087")}),"shr_1112");var index$e=Object.freeze({__proto__:null,Body:Body$1}),index$d=Object.freeze({__proto__:null,Body:Body$2}),index$c=Object.freeze({__proto__:null,BaseTr:BaseTr}),index$b=Object.freeze({__proto__:null,Transition:Transition}),index$a=Object.freeze({__proto__:null,Main:Main$1}),index$9=Object.freeze({__proto__:null,Main:Main$2});var index$8=Object.freeze({__proto__:null,Tabs:class{constructor(){this.keep_long=()=>err((()=>{we.tabs.onUpdated.addListener((tab_id=>err((()=>{we.tabs.connect(tab_id)}),"shr_1113")))}),"shr_1114"),this.add_on_connect_listener=()=>err((()=>{we.runtime.onConnect.addListener((()=>{}))}),"shr_1115")}static i(){return this.i0||(this.i0=new this)}}}),index$7=Object.freeze({__proto__:null,Main:Main$3}),index$6=Object.freeze({__proto__:null,Main:Main$4}),index$5=Object.freeze({__proto__:null,Main:Main$5});var index$4=Object.freeze({__proto__:null,Main:class{constructor(){this.to_object=({arr:arr,section:section,subsection:subsection})=>err((()=>{const obj_final={};return arr.forEach((item=>err((()=>{obj_final[item.name]=item,section&&(obj_final[item.name].section=section),subsection&&(obj_final[item.name].subsection=subsection)}),"shr_1136"))),obj_final}),"shr_1137")}static i(){return this.i0||(this.i0=new this)}}}),index$3=Object.freeze({__proto__:null,Main:Main$6}),index$2=Object.freeze({__proto__:null}),index$1=Object.freeze({__proto__:null,Body:Body$3,CloseBtn:CloseBtn,ExtName:ExtName,Msg:Msg}),index=Object.freeze({__proto__:null,Main:Main$7,Visibility:Visibility});export{index$f as c_crash_handler,index$1 as c_error,index$e as c_ext_version,index$d as c_loading_screen,index$c as c_tr,index as d_crash_handler,index$a as d_loading_screen,index$2 as i_data,init_shared,index$b as o_tr,index$9 as s_css_vars,index$8 as s_keep_alive,index$7 as s_no_tr,index$6 as s_tab_index,index$5 as s_theme,index$4 as s_utils,index$3 as s_viewport,t,vars};
package/inputs.js CHANGED
@@ -1 +1 @@
1
- import{l as Btn,C as Checkbox,F as File,H as HelpBtn,n as Help,q as Hr$1,I as InputItem,L as Label,t as LinkBtn,u as Link$1,R as Range$1,v as SectionBtn,w as SectionContent,x as Section,y as Select,z as TextBtn,A as Text,D as Textarea$1,U as UploadBox$1,E as InputBase,G as computedFn,V as Val,m as makeObservable,b as observable,J as Btn$1,K as Checkbox$1,N as File$1,O as LinkBtn$1,P as Option,Q as Section$1,W as Select$1,Y as Text$1,Z as Color$1,a as _,$ as Visibility,a0 as Help$1,a1 as InputWidth,a2 as Label$1,a3 as NestedInput,a4 as Text$2,a5 as UploadBox$2,a6 as ColorPicker,a7 as Position}from"./chunk-main-00a79e55.js";import"react";import"react-dom";var index$7=Object.freeze({__proto__:null,Btn:Btn,Checkbox:Checkbox,File:File,HelpBtn:HelpBtn,Help:Help,Hr:Hr$1,InputItem:InputItem,Label:Label,LinkBtn:LinkBtn,Link:Link$1,Range:Range$1,SectionBtn:SectionBtn,SectionContent:SectionContent,Section:Section,Select:Select,TextBtn:TextBtn,Text:Text,Textarea:Textarea$1,UploadBox:UploadBox$1});var index$6=Object.freeze({__proto__:null,InputBase:InputBase,Btn:Btn$1,Checkbox:Checkbox$1,File:File$1,Hr:class{constructor(obj){this.type="hr",Object.assign(this,obj),this.name=obj.name}},LinkBtn:LinkBtn$1,Link:class{constructor(obj){this.type="link",this.force_resolve=!1,this.text=()=>err((()=>ext.msg(`${this.name}_link_text`)||ext.msg(`${this.name}_${this.browser}_link_text`)),"shr_1069"),this.href_final=()=>err((()=>n(this.href)?this.href:ext.msg(`${this.name}_link_href`)||ext.msg(`${this.name}_${this.browser}_link_href`)),"shr_1070"),this.show_link=()=>err((()=>{const link_is_cross_browser=!n(this.browser),link_browser_is_the_same_as_env_browser=this.browser===env.browser;return link_is_cross_browser||!link_browser_is_the_same_as_env_browser||n(this.force_resolve)&&this.force_resolve}),"shr_1071"),Object.assign(this,obj),this.name=obj.name}},Option:Option,Range:class extends InputBase{constructor(obj){super(obj),this.type="range",this.min=0,this.max=100,this.step=1,this.displayed_val=computedFn((function({input:input}){return n(input.step)?Math.round(Val.i().access({input:input})/input.step):0})),this.lower_fill_percentage=computedFn((function({input:input}){return 100*input.displayed_val({input:input})/(n(input.max)&&n(input.step)?input.max/input.step:0)})),this.lower_fill_width=computedFn((function({input:input}){return`${input.lower_fill_percentage({input:input})}%`})),this.help_is_present_cls=computedFn((function({input:input}){return input.include_help?"help_is_present":""})),Object.assign(this,obj)}},Section:Section$1,Select:Select$1,Text:Text$1,Textarea:class extends InputBase{constructor(obj){super(obj),this.type="textarea",Object.assign(this,obj)}},UploadBox:class extends InputBase{constructor(obj){super(obj),this.type="upload_box",this.multiple=!1,this.accept=".png,.jpg,.jpeg,.gif",this.loading_msg_is_visible=!1,this.error_msg_is_visible=!1,this.is_in_hover_state=!1,this.drag_counter=0,this.loading_msg_visibility_cls=computedFn((function(){return this.loading_msg_is_visible?"":"none"})),this.error_msg_visibility_cls=computedFn((function(){return this.error_msg_is_visible?"":"none"})),this.loading_cls=computedFn((function(){return this.loading_msg_is_visible?"loading":""})),makeObservable(this,{loading_msg_is_visible:observable,error_msg_is_visible:observable,is_in_hover_state:observable}),Object.assign(this,obj)}}});const color_picker_state={is_initialized:!1,is_visible:!1,is_closed:!0};var index$5=Object.freeze({__proto__:null,Color:class extends InputBase{constructor(obj){super(obj),this.type="color",this.include_visualization=!0,this.include_palette_label=!1,this.palette_is_visible=!1,this.palette_is_closed=!0,this.palette_width="0",this.palette_height="0",this.color_picker_width="0",this.color_picker_height="0",this.include_remove_color_btn=!0,this.include_ok_btn=!1,this.state=Object.assign({main:color_picker_state},Array(Color$1.i().palette_color_amount).fill(color_picker_state).reduce(((accumulator,val,i)=>(accumulator[i]=val,accumulator)),{})),this.is_palette_color=({i:i})=>err((()=>"number"==typeof i),"shr_1030"),this.visualization_cls=({i:i})=>err((()=>"main"===i?"visualization":""),"shr_1031"),this.palette_visualization_cls=({i:i})=>err((()=>"main"===i?"":"palette_visualization"),"shr_1032"),this.inset_border_cls=({i:i})=>err((()=>"main"===i?"":"inset_border"),"shr_1033"),this.el_to_show_type=({i:i})=>err((()=>"main"===i?"color_picker_or_palette":"color_picker"),"shr_1034"),this.color_picker_is_visible=computedFn((function({i:i}){return n(this.state)&&this.state[i].is_visible})),this.palette_w_is_visible=computedFn((function(){return!this.include_visualization||this.palette_is_visible})),this.visualization_outline_opened=computedFn((function({i:i}){return"main"===i&&this.palette_is_visible||n(this.state)&&this.state[i].is_visible?"opened":""})),this.visualization_outline_selected=computedFn((function({i:i}){return this.is_palette_color({i:i})&&i===(n(this.val_accessor)?_.get(data,this.val_accessor):data.settings[this.name])?"selected":""})),this.palette_visualization_outline_selected=computedFn((function({i:i}){return i===data.settings.selected_palette_color?"selected":""})),this.color_picker_is_closed_visibility_cls=computedFn((function({i:i}){return n(this.state)&&this.state[i].is_closed?"none":""})),this.palette_is_closed_visibility_cls=computedFn((function(){return this.palette_is_closed?"none":""})),this.color_help_visibility_cls=computedFn((function(){return Visibility.i().color_help_is_visible?"":"none"})),makeObservable(this,{palette_is_visible:observable,palette_is_closed:observable,palette_width:observable,palette_height:observable,color_picker_width:observable,color_picker_height:observable,state:observable}),Object.assign(this,obj),this.select_palette_color_callback=obj.select_palette_color_callback,this.remove_color_callback=obj.remove_color_callback,this.restore_default_palette_callback=obj.restore_default_palette_callback,this.hide_color_help_callback=obj.hide_color_help_callback}}}),index$4=Object.freeze({__proto__:null,Help:Help$1,InputWidth:InputWidth,Label:Label$1,NestedInput:NestedInput,Val:Val,Text:Text$2,UploadBox:UploadBox$2}),index$3=Object.freeze({__proto__:null,Color:Color$1,Visibility:Visibility}),index$2=Object.freeze({__proto__:null,ColorPicker:ColorPicker,Position:Position}),index$1=Object.freeze({__proto__:null}),index=Object.freeze({__proto__:null});export{index$7 as c_inputs,index$3 as d_color,index$4 as d_inputs,index as i_color,index$1 as i_inputs,index$5 as o_color,index$6 as o_inputs,index$2 as s_color};
1
+ import{l as Btn,C as Checkbox,F as File,H as HelpBtn,n as Help,q as Hr$1,I as InputItem,L as Label,t as LinkBtn,u as Link$1,R as Range$1,v as SectionBtn,w as SectionContent,x as Section,y as Select,z as TextBtn,A as Text,D as Textarea$1,U as UploadBox$1,E as InputBase,G as computedFn,V as Val,m as makeObservable,b as observable,J as Btn$1,K as Checkbox$1,N as File$1,O as LinkBtn$1,P as Option,Q as Section$1,W as Select$1,Y as Text$1,Z as Color$1,a as _,$ as Visibility,a0 as Help$1,a1 as InputWidth,a2 as Label$1,a3 as NestedInput,a4 as Text$2,a5 as UploadBox$2,a6 as ColorPicker,a7 as Position}from"./chunk-main-a7524397.js";import"react";import"react-dom";var index$7=Object.freeze({__proto__:null,Btn:Btn,Checkbox:Checkbox,File:File,HelpBtn:HelpBtn,Help:Help,Hr:Hr$1,InputItem:InputItem,Label:Label,LinkBtn:LinkBtn,Link:Link$1,Range:Range$1,SectionBtn:SectionBtn,SectionContent:SectionContent,Section:Section,Select:Select,TextBtn:TextBtn,Text:Text,Textarea:Textarea$1,UploadBox:UploadBox$1});var index$6=Object.freeze({__proto__:null,InputBase:InputBase,Btn:Btn$1,Checkbox:Checkbox$1,File:File$1,Hr:class{constructor(obj){this.type="hr",Object.assign(this,obj),this.name=obj.name}},LinkBtn:LinkBtn$1,Link:class{constructor(obj){this.type="link",this.force_resolve=!1,this.text=()=>err((()=>ext.msg(`${this.name}_link_text`)||ext.msg(`${this.name}_${this.browser}_link_text`)),"shr_1069"),this.href_final=()=>err((()=>n(this.href)?this.href:ext.msg(`${this.name}_link_href`)||ext.msg(`${this.name}_${this.browser}_link_href`)),"shr_1070"),this.show_link=()=>err((()=>{const link_is_cross_browser=!n(this.browser),link_browser_is_the_same_as_env_browser=this.browser===env.browser;return link_is_cross_browser||!link_browser_is_the_same_as_env_browser||n(this.force_resolve)&&this.force_resolve}),"shr_1071"),Object.assign(this,obj),this.name=obj.name}},Option:Option,Range:class extends InputBase{constructor(obj){super(obj),this.type="range",this.min=0,this.max=100,this.step=1,this.displayed_val=computedFn((function({input:input}){return n(input.step)?Math.round(Val.i().access({input:input})/input.step):0})),this.lower_fill_percentage=computedFn((function({input:input}){return 100*input.displayed_val({input:input})/(n(input.max)&&n(input.step)?input.max/input.step:0)})),this.lower_fill_width=computedFn((function({input:input}){return`${input.lower_fill_percentage({input:input})}%`})),this.help_is_present_cls=computedFn((function({input:input}){return input.include_help?"help_is_present":""})),Object.assign(this,obj)}},Section:Section$1,Select:Select$1,Text:Text$1,Textarea:class extends InputBase{constructor(obj){super(obj),this.type="textarea",Object.assign(this,obj)}},UploadBox:class extends InputBase{constructor(obj){super(obj),this.type="upload_box",this.multiple=!1,this.accept=".png,.jpg,.jpeg,.gif",this.loading_msg_is_visible=!1,this.error_msg_is_visible=!1,this.is_in_hover_state=!1,this.drag_counter=0,this.loading_msg_visibility_cls=computedFn((function(){return this.loading_msg_is_visible?"":"none"})),this.error_msg_visibility_cls=computedFn((function(){return this.error_msg_is_visible?"":"none"})),this.loading_cls=computedFn((function(){return this.loading_msg_is_visible?"loading":""})),makeObservable(this,{loading_msg_is_visible:observable,error_msg_is_visible:observable,is_in_hover_state:observable}),Object.assign(this,obj)}}});const color_picker_state={is_initialized:!1,is_visible:!1,is_closed:!0};var index$5=Object.freeze({__proto__:null,Color:class extends InputBase{constructor(obj){super(obj),this.type="color",this.include_visualization=!0,this.include_palette_label=!1,this.palette_is_visible=!1,this.palette_is_closed=!0,this.palette_width="0",this.palette_height="0",this.color_picker_width="0",this.color_picker_height="0",this.include_remove_color_btn=!0,this.include_ok_btn=!1,this.state=Object.assign({main:color_picker_state},Array(Color$1.i().palette_color_amount).fill(color_picker_state).reduce(((accumulator,val,i)=>(accumulator[i]=val,accumulator)),{})),this.is_palette_color=({i:i})=>err((()=>"number"==typeof i),"shr_1030"),this.visualization_cls=({i:i})=>err((()=>"main"===i?"visualization":""),"shr_1031"),this.palette_visualization_cls=({i:i})=>err((()=>"main"===i?"":"palette_visualization"),"shr_1032"),this.inset_border_cls=({i:i})=>err((()=>"main"===i?"":"inset_border"),"shr_1033"),this.el_to_show_type=({i:i})=>err((()=>"main"===i?"color_picker_or_palette":"color_picker"),"shr_1034"),this.color_picker_is_visible=computedFn((function({i:i}){return n(this.state)&&this.state[i].is_visible})),this.palette_w_is_visible=computedFn((function(){return!this.include_visualization||this.palette_is_visible})),this.visualization_outline_opened=computedFn((function({i:i}){return"main"===i&&this.palette_is_visible||n(this.state)&&this.state[i].is_visible?"opened":""})),this.visualization_outline_selected=computedFn((function({i:i}){return this.is_palette_color({i:i})&&i===(n(this.val_accessor)?_.get(data,this.val_accessor):data.settings[this.name])?"selected":""})),this.palette_visualization_outline_selected=computedFn((function({i:i}){return i===data.settings.selected_palette_color?"selected":""})),this.color_picker_is_closed_visibility_cls=computedFn((function({i:i}){return n(this.state)&&this.state[i].is_closed?"none":""})),this.palette_is_closed_visibility_cls=computedFn((function(){return this.palette_is_closed?"none":""})),this.color_help_visibility_cls=computedFn((function(){return Visibility.i().color_help_is_visible?"":"none"})),makeObservable(this,{palette_is_visible:observable,palette_is_closed:observable,palette_width:observable,palette_height:observable,color_picker_width:observable,color_picker_height:observable,state:observable}),Object.assign(this,obj),this.select_palette_color_callback=obj.select_palette_color_callback,this.remove_color_callback=obj.remove_color_callback,this.restore_default_palette_callback=obj.restore_default_palette_callback,this.hide_color_help_callback=obj.hide_color_help_callback}}}),index$4=Object.freeze({__proto__:null,Help:Help$1,InputWidth:InputWidth,Label:Label$1,NestedInput:NestedInput,Val:Val,Text:Text$2,UploadBox:UploadBox$2}),index$3=Object.freeze({__proto__:null,Color:Color$1,Visibility:Visibility}),index$2=Object.freeze({__proto__:null,ColorPicker:ColorPicker,Position:Position}),index$1=Object.freeze({__proto__:null}),index=Object.freeze({__proto__:null});export{index$7 as c_inputs,index$3 as d_color,index$4 as d_inputs,index as i_color,index$1 as i_inputs,index$5 as o_color,index$6 as o_inputs,index$2 as s_color};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@loftyshaky/shared",
3
3
  "description": "-",
4
- "version": "0.0.34",
4
+ "version": "0.0.35",
5
5
  "author": "loftyshaky",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -1,7 +1,6 @@
1
1
  @import '../shared/index';
2
2
  @import 'ext_version';
3
3
  @import 'main';
4
- @import 'scrollbar';
5
4
  @import 'section_btns';
6
5
  @import 'sections';
7
6
  @import 'transitions';
@@ -10,8 +10,6 @@ html,
10
10
  }
11
11
 
12
12
  .main_2 {
13
- @include border;
14
-
15
13
  display: flex;
16
14
  height: calc(100vh - #{$main_margin_4 + 2});
17
15
  max-width: 1366px - $main_margin_2 + 2px;
@@ -9,19 +9,8 @@
9
9
  height: 100%;
10
10
  }
11
11
 
12
- .filler::after,
13
- .section_btn::after {
14
- content: '';
15
- position: absolute;
16
- height: 100%;
17
- width: 1px;
18
- top: 0;
19
- right: 0;
20
- }
21
-
22
12
  .section_btn {
23
13
  @include input_basic;
24
- @include border_bottom;
25
14
 
26
15
  position: relative;
27
16
  text-align: left;
@@ -33,8 +22,31 @@
33
22
  cursor: default;
34
23
  }
35
24
 
36
- &.selected::after {
37
- width: 0;
25
+ &.selected::before,
26
+ &:not(.selected):hover::before {
27
+ content: '';
28
+ height: 33px;
29
+ position: absolute;
30
+ top: 0;
31
+ bottom: 0;
32
+ left: 3px;
33
+ margin: auto;
34
+ width: 3px;
35
+ }
36
+
37
+ &:not(.selected):hover::before {
38
+ animation: var(--animation);
39
+ animation-name: fade_in;
38
40
  }
39
41
  }
40
42
  }
43
+
44
+ @keyframes fade_in {
45
+ 0% {
46
+ opacity: 0;
47
+ }
48
+
49
+ 100% {
50
+ opacity: 1;
51
+ }
52
+ }
@@ -1,11 +1,11 @@
1
1
  .input_item,
2
2
  .input_w,
3
- .help {
3
+ .help, {
4
4
  transition: var(--transition);
5
5
  transition-property: opacity;
6
6
  }
7
7
 
8
- .section_btn {
8
+ .section_btns .section_btn::before {
9
9
  transition: var(--transition);
10
10
  transition-property: background-color;
11
11
  }
@@ -42,7 +42,6 @@ $btn_padding: 6px;
42
42
 
43
43
  .pcr-app {
44
44
  @include box_shadow_important;
45
- @include border;
46
45
 
47
46
  position: relative !important;
48
47
  left: initial !important;
@@ -74,7 +74,6 @@
74
74
  }
75
75
 
76
76
  .palette {
77
- @include border;
78
77
  @include box_shadow;
79
78
 
80
79
  position: fixed;
@@ -1,17 +1,12 @@
1
- $gaq: #1d2329;
2
- $nrf: #395475;
3
- $qhv: #3d679c;
4
- $yos: #475566;
5
1
  $htc: #2a3038;
2
+ $gaq: #1d2329;
3
+ $hev: #42505e;
6
4
  $lpe: white;
7
- $nqp: rgba(174, 35, 43, 0.99);
8
- $cop: #3b7949;
9
- $pdv: $yellow;
10
- $pec: #ff8787;
11
- $bvs: #77ff6f;
12
- $nmy: #f493ff;
13
- $dfp: #29394d;
14
- $myo: #09a700;
5
+ $yos: #144581;
6
+ $qgp: #1b5a17;
7
+ $ycp: #308af9;
8
+ $cop: #09a700;
15
9
  $ptn: #bb141c;
16
10
  $uzf: #b938c7;
17
- $ycp: #308af9;
11
+ $dfp: #29394d;
12
+ $nqp: rgba(174, 35, 43, 0.99);
@@ -1,17 +1,12 @@
1
- $gaq: #efefef;
2
- $nrf: #ffec82;
3
- $qhv: #ffe02e;
4
- $yos: $light_orange;
5
1
  $htc: white;
2
+ $gaq: #efefef;
3
+ $hev: #bbb;
6
4
  $lpe: $black;
7
- $nqp: rgba(255, 77, 85, 0.99);
8
- $cop: #a1ff83;
9
- $pdv: $blue;
10
- $pec: #ff6565;
11
- $bvs: #0bc700;
12
- $nmy: #eb36ff;
13
- $dfp: #a2d4ff;
14
- $myo: #14bf0a;
5
+ $yos: #c7e0ff;
6
+ $qgp: #beffba;
7
+ $ycp: #2e8cff;
8
+ $cop: #14bf0a;
15
9
  $ptn: #d0111a;
16
10
  $uzf: #ca26dd;
17
- $ycp: #2e8cff;
11
+ $dfp: #a2d4ff;
12
+ $nqp: rgba(255, 77, 85, 0.99);
@@ -1,17 +1,12 @@
1
- $gaq: #000308;
2
- $nrf: #1d293b;
3
- $qhv: #264061;
4
- $yos: #262c33;
5
1
  $htc: #0a0e14;
2
+ $gaq: #000308;
3
+ $hev: #1f2c40;
6
4
  $lpe: #e5e5e5;
7
- $nqp: rgba(120, 30, 34, 0.99);
8
- $cop: #1d4025;
9
- $pdv: #e1e56a;
10
- $pec: #e57a7a;
11
- $bvs: #6be565;
12
- $nmy: #dc85e5;
13
- $dfp: #0f1721;
14
- $myo: #089200;
15
- $ptn: #bd141c;
16
- $uzf: #af22bf;
5
+ $yos: #0e2e54;
6
+ $qgp: #133e10;
17
7
  $ycp: #2176de;
8
+ $cop: #089200;
9
+ $ptn: #b1131a;
10
+ $uzf: #af22bf;
11
+ $dfp: #0f1721;
12
+ $nqp: rgba(120, 30, 34, 0.99);
@@ -3,5 +3,5 @@
3
3
  @import 'template';
4
4
 
5
5
  .main_2 {
6
- box-shadow: rgb(0, 115, 255, 70%) 0 0 33px, rgba(255, 255, 255, 0.4) 0 0 10px;
6
+ box-shadow: rgb(0, 115, 255, 1) 0 0 33px, rgba(255, 255, 255, 0.4) 0 0 10px;
7
7
  }
@@ -7,22 +7,30 @@
7
7
  color: white !important;
8
8
  }
9
9
 
10
- ::-webkit-scrollbar-thumb {
11
- background-color: $lpe;
12
- }
10
+ :not(html):not(body):not(select) {
11
+ &::-webkit-scrollbar-corner,
12
+ &::-webkit-resizer {
13
+ background-color: $hev;
14
+ border-color: $hev;
15
+ }
13
16
 
14
- ::-webkit-scrollbar-track {
15
- background-color: $gaq;
16
- border-color: $lpe;
17
- }
17
+ &::-webkit-scrollbar-track {
18
+ background-color: $gaq;
19
+ border-color: $gaq;
20
+ }
18
21
 
19
- ::-webkit-scrollbar-corner,
20
- ::-webkit-resizer {
21
- background-color: $lpe;
22
- }
22
+ &::-webkit-scrollbar-thumb {
23
+ background-color: $hev;
24
+ }
25
+
26
+ &::-webkit-scrollbar-thumb:hover {
27
+ background-color: $lpe;
28
+ }
23
29
 
24
- .main {
25
- border-color: $lpe;
30
+ &::-webkit-scrollbar-track:horizontal,
31
+ &::-webkit-scrollbar-track:vertical {
32
+ border-color: $hev;
33
+ }
26
34
  }
27
35
 
28
36
  .loading_screen {
@@ -39,11 +47,11 @@ body {
39
47
  background-color: $gaq;
40
48
 
41
49
  .btn.text {
42
- outline-color: $lpe;
50
+ outline-color: $hev;
43
51
  background-color: $gaq;
44
52
 
45
53
  &:hover {
46
- background-color: $yos;
54
+ background-color: $qgp;
47
55
  }
48
56
  }
49
57
  }
@@ -57,7 +65,7 @@ textarea {
57
65
  }
58
66
 
59
67
  hr {
60
- background-color: $lpe;
68
+ background-color: $hev;
61
69
  }
62
70
 
63
71
  .sections {
@@ -65,27 +73,18 @@ hr {
65
73
  }
66
74
 
67
75
  .section_btns {
68
- background-color: $nrf;
69
-
70
- .filler::after {
71
- background-color: $lpe;
72
- }
73
- }
74
-
75
- .section_btn {
76
- border-color: $lpe;
77
- background-color: $nrf;
76
+ background-color: $gaq;
78
77
 
79
- &.selected {
80
- background-color: $htc;
81
- }
78
+ .section_btn {
79
+ background-color: $gaq;
82
80
 
83
- &:not(.selected):hover {
84
- background-color: $cop;
85
- }
81
+ &.selected::before {
82
+ background-color: $ycp;
83
+ }
86
84
 
87
- &::after {
88
- background-color: $lpe;
85
+ &:not(.selected):hover::before {
86
+ background-color: $cop;
87
+ }
89
88
  }
90
89
  }
91
90
 
@@ -94,6 +93,10 @@ hr {
94
93
  }
95
94
 
96
95
  .input_item {
96
+ .inset_border::before {
97
+ outline-color: $hev;
98
+ }
99
+
97
100
  .input {
98
101
  background-color: $gaq;
99
102
  }
@@ -113,7 +116,7 @@ hr {
113
116
  .input_w {
114
117
  .visualization,
115
118
  .palette_visualization {
116
- border-color: $lpe;
119
+ border-color: $hev;
117
120
  background-color: $gaq;
118
121
  }
119
122
  }
@@ -135,13 +138,13 @@ hr {
135
138
  }
136
139
 
137
140
  &::-webkit-slider-runnable-track {
138
- outline-color: $lpe;
141
+ outline-color: $hev;
139
142
  }
140
143
  }
141
144
  }
142
145
 
143
146
  .checkbox .box {
144
- outline-color: $lpe;
147
+ outline-color: $hev;
145
148
  background-color: $gaq;
146
149
 
147
150
  svg {
@@ -150,23 +153,23 @@ hr {
150
153
  }
151
154
 
152
155
  .upload_box {
153
- outline-color: $lpe;
156
+ outline-color: $hev;
154
157
 
155
158
  .background {
156
159
  &.upload_box_idle {
157
- background-color: $nrf;
160
+ background-color: $gaq;
158
161
  }
159
162
 
160
163
  &.upload_box_hover {
161
- background-color: $qhv;
164
+ background-color: $qgp;
162
165
  }
163
166
 
164
167
  &.loading {
165
168
  background-image: repeating-linear-gradient(-45deg,
166
- $nrf,
167
- $nrf 14px,
169
+ $gaq,
168
170
  $gaq 14px,
169
- $gaq 28px);
171
+ $qgp 14px,
172
+ $qgp 28px);
170
173
  }
171
174
  }
172
175
  }
@@ -178,16 +181,15 @@ hr {
178
181
 
179
182
  input {
180
183
  background-color: $gaq !important;
181
- border-color: $lpe !important;
184
+ outline-color: $hev !important;
182
185
 
183
186
  &:hover:not(.pcr-result):not(.active) {
184
- background-color: $yos !important;
187
+ background-color: $qgp !important;
185
188
  }
186
189
  }
187
190
  }
188
191
 
189
192
  .pcr-app {
190
- border-color: $lpe !important;
191
193
  background-color: $htc !important;
192
194
  }
193
195
 
@@ -196,43 +198,43 @@ hr {
196
198
  .pcr-slider,
197
199
  .pcr-picker,
198
200
  .pcr-result {
199
- border-color: $lpe !important;
201
+ border-color: $hev !important;
200
202
  }
201
203
 
202
204
  .pcr-type.active {
203
- background-color: $nrf !important;
205
+ background-color: $yos !important;
204
206
  }
205
207
  }
206
208
 
207
209
  .link {
208
- color: $pdv;
210
+ color: $ycp;
209
211
 
210
212
  &:visited {
211
- color: $pec;
213
+ color: $ptn;
212
214
  }
213
215
 
214
216
  &:hover {
215
- color: $bvs;
217
+ color: $cop;
216
218
  }
217
219
 
218
220
  &:active {
219
- color: $nmy;
221
+ color: $uzf;
220
222
  }
221
223
  }
222
224
 
223
225
  .link_btn {
224
- color: $pdv;
226
+ color: $ycp;
225
227
 
226
228
  &:visited {
227
- color: $pec;
229
+ color: $ptn;
228
230
  }
229
231
 
230
232
  &:hover {
231
- color: $bvs;
233
+ color: $cop;
232
234
  }
233
235
 
234
236
  &:active {
235
- color: $nmy;
237
+ color: $uzf;
236
238
  }
237
239
  }
238
240
 
@@ -3,7 +3,7 @@
3
3
  .input_item {
4
4
  .input_w {
5
5
  &.is_in_focus_state:not(.select)::before {
6
- outline-color: $myo;
6
+ outline-color: $cop;
7
7
  }
8
8
 
9
9
  &.is_in_warn_state:not(.select)::before {
@@ -34,15 +34,18 @@ body.keyboard .btn.text:focus,
34
34
  .keyboard .input_item .pcr-palette:focus,
35
35
  .keyboard .input_item .pcr-slider:focus,
36
36
  .keyboard .input_item .pcr-picker:focus,
37
- .input_item .pcr-result:focus,
38
37
  .keyboard .input_item .color_picker_w input:not(.pcr-result):focus {
39
38
  outline-color: $uzf !important;
40
39
  }
41
40
 
41
+ .input_item .pcr-result:focus {
42
+ outline-color: $cop !important;
43
+ }
44
+
42
45
  .input_item .pcr-result:focus {
43
46
  border-color: $uzf !important;
44
47
  }
45
48
 
46
49
  .keyboard .section_btn:not(.selected):focus {
47
- box-shadow: inset 0 0 0 2px $uzf, inset -3px 0 0 0 $uzf;
50
+ box-shadow: inset 0 0 0 2px $uzf, inset -2px 0 0 0 $uzf;
48
51
  }
@@ -3,5 +3,5 @@
3
3
  @import 'template';
4
4
 
5
5
  .main_2 {
6
- box-shadow: rgba(0, 102, 255, 0.7) 0 0 36px, rgba(255, 255, 255, 0.4) 0 0 10px;
6
+ box-shadow: rgba(0, 102, 255, 0.85) 0 0 36px, rgba(255, 255, 255, 0.4) 0 0 10px;
7
7
  }
package/settings.js CHANGED
@@ -1 +1 @@
1
- import{a8 as Body,a9 as BackUp,S as Sections,_ as __awaiter,m as makeObservable,d as action}from"./chunk-main-00a79e55.js";import"react";import{a as Main$1}from"./chunk-main-bacabf12.js";import"react-dom";var index$4=Object.freeze({__proto__:null,Body:Body}),index$3=Object.freeze({__proto__:null,BackUp:BackUp,Sections:Sections});var index$2=Object.freeze({__proto__:null,Main:class{constructor(){this.set_permission=({name:name,optional_permission_checkbox_dict:optional_permission_checkbox_dict})=>err_async((()=>__awaiter(this,void 0,void 0,(function*(){const permissions=optional_permission_checkbox_dict[name];if(yield we.permissions.contains(permissions)){(yield we.permissions.remove(permissions))&&this.set_checkbox_val({name:name,val:!1})}else{(yield we.permissions.request(permissions))&&this.set_checkbox_val({name:name,val:!0})}}))),"shr_1221"),this.set_checkbox_val=({name:name,val:val})=>err((()=>{data.ui[name]=val}),"shr_1222"),makeObservable(this,{set_checkbox_val:action})}static i(){return this.i0||(this.i0=new this)}}});var index$1=Object.freeze({__proto__:null,Theme:class{constructor(){this.change=({input:input,name:name,additional_theme_callback:additional_theme_callback})=>err((()=>{"options_page_theme"===input.name&&Main$1.i().set({name:name,additional_theme_callback:additional_theme_callback})}),"shr_1088")}static i(){return this.i0||(this.i0=new this)}}}),index=Object.freeze({__proto__:null});export{index$4 as c_settings,index$2 as d_optional_permissions,index$3 as d_settings,index as i_optional_permissions,index$1 as s_settings};
1
+ import{a8 as Body,a9 as BackUp,S as Sections,_ as __awaiter,m as makeObservable,d as action}from"./chunk-main-a7524397.js";import"react";import{a as Main$1}from"./chunk-main-51348ab9.js";import"react-dom";var index$4=Object.freeze({__proto__:null,Body:Body}),index$3=Object.freeze({__proto__:null,BackUp:BackUp,Sections:Sections});var index$2=Object.freeze({__proto__:null,Main:class{constructor(){this.set_permission=({name:name,optional_permission_checkbox_dict:optional_permission_checkbox_dict})=>err_async((()=>__awaiter(this,void 0,void 0,(function*(){const permissions=optional_permission_checkbox_dict[name];if(yield we.permissions.contains(permissions)){(yield we.permissions.remove(permissions))&&this.set_checkbox_val({name:name,val:!1})}else{(yield we.permissions.request(permissions))&&this.set_checkbox_val({name:name,val:!0})}}))),"shr_1221"),this.set_checkbox_val=({name:name,val:val})=>err((()=>{data.ui[name]=val}),"shr_1222"),makeObservable(this,{set_checkbox_val:action})}static i(){return this.i0||(this.i0=new this)}}});var index$1=Object.freeze({__proto__:null,Theme:class{constructor(){this.change=({input:input,name:name,additional_theme_callback:additional_theme_callback})=>err((()=>{"options_page_theme"===input.name&&Main$1.i().set({name:name,additional_theme_callback:additional_theme_callback})}),"shr_1088")}static i(){return this.i0||(this.i0=new this)}}}),index=Object.freeze({__proto__:null});export{index$4 as c_settings,index$2 as d_optional_permissions,index$3 as d_settings,index as i_optional_permissions,index$1 as s_settings};
@@ -21,6 +21,7 @@ export declare class Ext {
21
21
  send_msg_to_active_tab_resp: (msg: t.Msg) => Promise<any>;
22
22
  send_msg_to_all_tabs: (msg: t.Msg) => Promise<void>;
23
23
  storage_get: (keys?: string | string[] | undefined) => Promise<any>;
24
- storage_set: (obj: t.AnyRecord) => Promise<void>;
24
+ storage_set: (obj: t.AnyRecord, replace?: boolean | undefined) => Promise<void>;
25
+ storage_remove: (keys: string[]) => Promise<void>;
25
26
  inject_js_and_css_in_content_script: (js_file_paths: string[], css_file_paths: string[]) => Promise<void>;
26
27
  }
@@ -1,12 +0,0 @@
1
- .main {
2
- ::-webkit-scrollbar-track:vertical {
3
- border-color: unset;
4
- }
5
-
6
- .section_btns::-webkit-scrollbar-track:vertical {
7
- @include border_right;
8
-
9
- border-left: 0;
10
- border-color: unset;
11
- }
12
- }