From 95bf160ba9edbd151fd2ac905eace6fa01e58691 Mon Sep 17 00:00:00 2001 From: dragonwocky Date: Tue, 15 Dec 2020 23:49:49 +1100 Subject: [PATCH] remove core mods --- repo/core/app.css | 9 - repo/core/buttons.js | 106 --- repo/core/client.js | 269 ------- repo/core/colorjoe/min.js | 4 - repo/core/colorjoe/picker.css | 1 - repo/core/createWindow.js | 89 --- repo/core/css/buttons.css | 43 - repo/core/css/scrollbars.css | 29 - repo/core/css/theme.css | 1123 --------------------------- repo/core/css/titlebar.css | 48 -- repo/core/enhancerMenu.js | 762 ------------------ repo/core/icons/alwaysontop_off.svg | 1 - repo/core/icons/alwaysontop_on.svg | 1 - repo/core/icons/close.svg | 1 - repo/core/icons/file.svg | 1 - repo/core/icons/mac+linux.png | Bin 8295 -> 0 bytes repo/core/icons/maximize_off.svg | 1 - repo/core/icons/maximize_on.svg | 1 - repo/core/icons/minimize.svg | 1 - repo/core/icons/question.svg | 1 - repo/core/icons/user.png | Bin 324 -> 0 bytes repo/core/icons/windows.ico | Bin 285478 -> 0 bytes repo/core/menu.css | 655 ---------------- repo/core/menu.html | 43 - repo/core/mod.js | 103 --- repo/core/render.js | 1066 ------------------------- repo/core/systemMenu.js | 477 ------------ repo/core/tabs.css | 196 ----- repo/core/tray.js | 261 ------- repo/core/variables.css | 810 ------------------- repo/tabs/mod.js | 49 -- 31 files changed, 6151 deletions(-) delete mode 100644 repo/core/app.css delete mode 100644 repo/core/buttons.js delete mode 100644 repo/core/client.js delete mode 100644 repo/core/colorjoe/min.js delete mode 100644 repo/core/colorjoe/picker.css delete mode 100644 repo/core/createWindow.js delete mode 100644 repo/core/css/buttons.css delete mode 100644 repo/core/css/scrollbars.css delete mode 100644 repo/core/css/theme.css delete mode 100644 repo/core/css/titlebar.css delete mode 100644 repo/core/enhancerMenu.js delete mode 100644 repo/core/icons/alwaysontop_off.svg delete mode 100644 repo/core/icons/alwaysontop_on.svg delete mode 100644 repo/core/icons/close.svg delete mode 100644 repo/core/icons/file.svg delete mode 100644 repo/core/icons/mac+linux.png delete mode 100644 repo/core/icons/maximize_off.svg delete mode 100644 repo/core/icons/maximize_on.svg delete mode 100644 repo/core/icons/minimize.svg delete mode 100644 repo/core/icons/question.svg delete mode 100644 repo/core/icons/user.png delete mode 100644 repo/core/icons/windows.ico delete mode 100644 repo/core/menu.css delete mode 100644 repo/core/menu.html delete mode 100644 repo/core/mod.js delete mode 100644 repo/core/render.js delete mode 100644 repo/core/systemMenu.js delete mode 100644 repo/core/tabs.css delete mode 100644 repo/core/tray.js delete mode 100644 repo/core/variables.css delete mode 100644 repo/tabs/mod.js diff --git a/repo/core/app.css b/repo/core/app.css deleted file mode 100644 index 06ffc57..0000000 --- a/repo/core/app.css +++ /dev/null @@ -1,9 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * under the MIT license - */ - -@import './css/theme.css'; -@import './css/scrollbars.css'; -@import './css/titlebar.css'; diff --git a/repo/core/buttons.js b/repo/core/buttons.js deleted file mode 100644 index d132722..0000000 --- a/repo/core/buttons.js +++ /dev/null @@ -1,106 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * under the MIT license - */ - -'use strict'; - -module.exports = (store) => { - const helpers = require('../../pkg/helpers.js'), - path = require('path'), - fs = require('fs-extra'), - browser = require('electron').remote.getCurrentWindow(), - is_mac = process.platform === 'darwin', - buttons = { - element: helpers.createElement('
'), - insert: [ - ...((store('mods')['72886371-dada-49a7-9afc-9f275ecf29d3'] || {}) - .enabled - ? ['alwaysontop'] - : []), - ...(store().frameless && !store().tiling_mode && !is_mac - ? ['minimize', 'maximize', 'close'] - : []), - ], - icons: { - raw: { - alwaysontop: { - on: fs.readFile( - path.resolve(`${__dirname}/icons/alwaysontop_on.svg`) - ), - off: fs.readFile( - path.resolve(`${__dirname}/icons/alwaysontop_off.svg`) - ), - }, - minimize: fs.readFile( - path.resolve(`${__dirname}/icons/minimize.svg`) - ), - maximize: { - on: fs.readFile(path.resolve(`${__dirname}/icons/maximize_on.svg`)), - off: fs.readFile( - path.resolve(`${__dirname}/icons/maximize_off.svg`) - ), - }, - close: fs.readFile(path.resolve(`${__dirname}/icons/close.svg`)), - }, - alwaysontop() { - return browser.isAlwaysOnTop() - ? buttons.icons.raw.alwaysontop.on - : buttons.icons.raw.alwaysontop.off; // '🠙' : '🠛' - }, - minimize() { - return buttons.icons.raw.minimize; // '⚊' - }, - maximize() { - return browser.isMaximized() - ? buttons.icons.raw.maximize.on - : buttons.icons.raw.maximize.off; // '🗗' : '🗖' - }, - close() { - return buttons.icons.raw.close; // '⨉' - }, - }, - actions: { - async alwaysontop() { - browser.setAlwaysOnTop(!browser.isAlwaysOnTop()); - this.innerHTML = await buttons.icons.alwaysontop(); - }, - minimize() { - browser.minimize(); - }, - async maximize() { - browser.isMaximized() ? browser.unmaximize() : browser.maximize(); - this.innerHTML = await buttons.icons.maximize(); - }, - close() { - browser.close(); - }, - }, - }; - - if (!buttons.insert.includes('alwaysontop')) browser.setAlwaysOnTop(false); - - (async () => { - for (let btn of buttons.insert) { - buttons.element.innerHTML += ``; - } - for (let btn of buttons.insert) { - buttons.element.querySelector(`.window-button.btn-${btn}`).onclick = - buttons.actions[btn]; - } - if (store().frameless && !store().tiling_mode && !is_mac) { - window.addEventListener('resize', (event) => { - Promise.resolve(buttons.icons.maximize()).then((icon) => { - icon = icon.toString(); - const el = buttons.element.querySelector('.btn-maximize'); - if (el.innerHTML != icon) el.innerHTML = icon; - }); - }); - } - })(); - - return buttons; -}; diff --git a/repo/core/client.js b/repo/core/client.js deleted file mode 100644 index a6eddd0..0000000 --- a/repo/core/client.js +++ /dev/null @@ -1,269 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * (c) 2020 TarasokUA - * under the MIT license - */ - -'use strict'; - -module.exports = (store, __exports) => { - const electron = require('electron'), - helpers = require('../../pkg/helpers.js'), - notionIpc = require(`${helpers - .getNotionResources() - .replace(/\\/g, '/')}/app/helpers/notionIpc.js`), - { toKeyEvent } = require('keyboardevent-from-electron-accelerator'), - tabsEnabled = (store('mods')['e1692c29-475e-437b-b7ff-3eee872e1a42'] || {}) - .enabled; - - document.defaultView.addEventListener('keyup', (event) => { - // additional hotkeys - if (event.key === 'F5') location.reload(); - // open menu on hotkey toggle - if (store().menu_toggle) { - const hotkey = { - ctrlKey: false, - metaKey: false, - altKey: false, - shiftKey: false, - ...toKeyEvent(store().menu_toggle), - }; - let triggered = true; - for (let prop in hotkey) - if ( - hotkey[prop] !== event[prop] && - !(prop === 'key' && event[prop] === 'Dead') - ) - triggered = false; - if (triggered) electron.ipcRenderer.send('enhancer:open-menu'); - } - if (tabsEnabled) { - const tabStore = () => store('e1692c29-475e-437b-b7ff-3eee872e1a42'); - if (tabStore().select_modifier) { - // switch between tabs via key modifier - const select_tab_modifier = { - ctrlKey: false, - metaKey: false, - altKey: false, - shiftKey: false, - ...toKeyEvent(tabStore().select_modifier), - }; - let triggered = true; - for (let prop in select_tab_modifier) - if (select_tab_modifier[prop] !== event[prop]) triggered = false; - if ( - triggered && - [ - '1', - '2', - '3', - '4', - '5', - '6', - '7', - '8', - '9', - 'ArrowRight', - 'ArrowLeft', - ].includes(event.key) - ) - electron.ipcRenderer.sendToHost('enhancer:select-tab', event.key); - } - if (tabStore().new_tab) { - // create/close tab keybindings - const new_tab_keybinding = { - ctrlKey: false, - metaKey: false, - altKey: false, - shiftKey: false, - ...toKeyEvent(tabStore().new_tab), - }; - let triggered = true; - for (let prop in new_tab_keybinding) - if (new_tab_keybinding[prop] !== event[prop]) triggered = false; - if (triggered) electron.ipcRenderer.sendToHost('enhancer:new-tab'); - } - if (tabStore().close_tab) { - const close_tab_keybinding = { - ctrlKey: false, - metaKey: false, - altKey: false, - shiftKey: false, - ...toKeyEvent(tabStore().close_tab), - }; - let triggered = true; - for (let prop in close_tab_keybinding) - if (close_tab_keybinding[prop] !== event[prop]) triggered = false; - if (triggered) electron.ipcRenderer.sendToHost('enhancer:close-tab'); - } - } - }); - - const attempt_interval = setInterval(enhance, 500); - async function enhance() { - if ( - !document.querySelector('.notion-frame') || - !document.querySelector('.notion-sidebar') || - !document.querySelector('.notion-topbar') - ) - return; - clearInterval(attempt_interval); - - // frameless - if (store().frameless && !store().tiling_mode && !tabsEnabled) { - document.body.classList.add('frameless'); - // draggable area - document - .querySelector('.notion-topbar') - .prepend(helpers.createElement('
')); - } - - // window buttons - if (!tabsEnabled) { - const buttons = require('./buttons.js')(store); - document - .querySelector('.notion-topbar > div[style*="display: flex"]') - .appendChild(buttons.element); - } - document - .querySelector('.notion-history-back-button') - .parentElement.nextElementSibling.classList.add( - 'notion-topbar-breadcrumb' - ); - document - .querySelector('.notion-topbar-share-menu') - .parentElement.classList.add('notion-topbar-actions'); - - const getStyle = (prop) => - getComputedStyle( - document.querySelector('.notion-app-inner') - ).getPropertyValue(prop); - - // external theming - document.defaultView.addEventListener('keydown', (event) => { - if ((event.ctrlKey || event.metaKey) && event.key === 'f') { - notionIpc.sendNotionToIndex('search:set-theme', { - 'mode': document.querySelector('.notion-dark-theme') - ? 'dark' - : 'light', - 'colors': { - 'white': getStyle('--theme--option_active-color'), - 'blue': getStyle('--theme--option_active-background'), - }, - 'borderRadius': 3, - 'textColor': getStyle('--theme--text'), - 'popoverBackgroundColor': getStyle('--theme--card'), - 'popoverBoxShadow': getStyle('--theme--box-shadow_strong'), - 'inputBoxShadow': `box-shadow: ${getStyle( - `--theme--primary` - )} 0px 0px 0px 1px inset, ${getStyle( - `--theme--primary_hover` - )} 0px 0px 0px 2px !important`, - 'inputBackgroundColor': getStyle('--theme--main'), - 'dividerColor': getStyle('--theme--table-border'), - 'shadowOpacity': 0.2, - }); - } - }); - - function setAppTheme() { - const theme = document.querySelector('.notion-dark-theme') - ? 'dark' - : 'light'; - electron.ipcRenderer.send('enhancer:set-app-theme', theme); - } - setAppTheme(); - new MutationObserver(setAppTheme).observe( - document.querySelector('.notion-app-inner'), - { attributes: true } - ); - electron.ipcRenderer.on('enhancer:get-app-theme', setAppTheme); - - if (tabsEnabled) { - let tab_title = { img: '', emoji: '', text: '' }; - if (process.platform === 'darwin') - document - .querySelector('.notion-sidebar [style*="37px"]:empty') - .remove(); - const TITLE_OBSERVER = new MutationObserver(() => - __electronApi.setWindowTitle('notion.so') - ); - __electronApi.setWindowTitle = (title) => { - const $container = - document.querySelector( - '.notion-peek-renderer [style="padding-left: calc(126px + env(safe-area-inset-left)); padding-right: calc(126px + env(safe-area-inset-right)); max-width: 100%; width: 100%;"]' - ) || - document.querySelector( - '.notion-frame [style="padding-left: calc(96px + env(safe-area-inset-left)); padding-right: calc(96px + env(safe-area-inset-right)); max-width: 100%; margin-bottom: 8px; width: 100%;"]' - ) || - document.querySelector('.notion-peek-renderer') || - document.querySelector('.notion-frame'), - icon = $container.querySelector( - '.notion-record-icon img:not([src^="data:"])' - ), - img = - icon && icon.getAttribute('src') - ? `` - : '', - emoji = icon ? icon.getAttribute('aria-label') : ''; - let text = $container.querySelector('[placeholder="Untitled"]'); - text = text - ? text.innerText || 'Untitled' - : [ - setTimeout(() => __electronApi.setWindowTitle(title), 250), - title, - ][1]; - TITLE_OBSERVER.disconnect(); - TITLE_OBSERVER.observe($container, { - childList: true, - subtree: true, - characterData: true, - attributes: true, - }); - if ( - tab_title.img !== img || - tab_title.emoji !== emoji || - tab_title.text !== text - ) { - tab_title = { - img, - emoji, - text, - }; - electron.ipcRenderer.sendToHost('enhancer:set-tab-title', tab_title); - } - }; - __electronApi.openInNewWindow = (urlPath) => { - electron.ipcRenderer.sendToHost( - 'enhancer:new-tab', - `notion://www.notion.so${urlPath}` - ); - }; - } else if (store().frameless && !store().tiling_mode) { - let sidebar_width; - function setSidebarWidth(list) { - const new_sidebar_width = - list[0].target.style.height === 'auto' - ? '0px' - : list[0].target.style.width; - if (new_sidebar_width !== sidebar_width) { - sidebar_width = new_sidebar_width; - electron.ipcRenderer.sendToHost( - 'enhancer:sidebar-width', - sidebar_width - ); - } - } - new MutationObserver(setSidebarWidth).observe( - document.querySelector('.notion-sidebar'), - { attributes: true } - ); - setSidebarWidth([{ target: document.querySelector('.notion-sidebar') }]); - } - } -}; diff --git a/repo/core/colorjoe/min.js b/repo/core/colorjoe/min.js deleted file mode 100644 index 0d60153..0000000 --- a/repo/core/colorjoe/min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! colorjoe - v4.1.1 - Juho Vepsalainen - MIT -https://bebraw.github.com/colorjoe - 2020-01-27 */ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.colorjoe=n()}(this,function(){"use strict";"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function e(e,n){return e(n={exports:{}},n.exports),n.exports}var p=e(function(e,n){e.exports=function(){function r(e,n){e?(t(e,n,"touchstart","touchmove","touchend"),t(e,n,"mousedown","mousemove","mouseup")):console.warn("drag is missing elem!")}return r.xyslider=function(e){var n=i(e.class||"",e.parent),t=i("pointer",n);return i("shape shape1",t),i("shape shape2",t),i("bg bg1",n),i("bg bg2",n),r(n,a(e.cbs,t)),{background:n,pointer:t}},r.slider=function(e){var n=i(e.class,e.parent),t=i("pointer",n);return i("shape",t),i("bg",n),r(n,a(e.cbs,t)),{background:n,pointer:t}},r;function a(e,t){var n={};for(var r in e)n[r]=a(e[r]);function a(n){return function(e){e.pointer=t,n(e)}}return n}function i(e,n){return t="div",r=e,a=n,i=document.createElement(t),r&&(i.className=r),a.appendChild(i),i;var t,r,a,i}function t(r,e,n,a,i){var t,o,u,s=(e=(t=e)?{begin:t.begin||p,change:t.change||p,end:t.end||p}:{begin:function(e){o={x:e.elem.offsetLeft,y:e.elem.offsetTop},u=e.cursor},change:function(e){d(e.elem,"left",o.x+e.cursor.x-u.x+"px"),d(e.elem,"top",o.y+e.cursor.y-u.y+"px")},end:p}).begin,l=e.change,f=e.end;c(r,n,function(n){var t=function(e){var n=Array.prototype.slice,t=n.apply(arguments,[1]);return function(){return e.apply(null,t.concat(n.apply(arguments)))}}(g,l,r);c(document,a,t),c(document,i,function e(){h(document,a,t),h(document,i,e),g(f,r,n)}),g(s,r,n)})}function c(e,n,t){var r=!1;try{var a=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("testPassive",null,a),window.removeEventListener("testPassive",null,a)}catch(e){}e.addEventListener(n,t,!!r&&{passive:!1})}function h(e,n,t){e.removeEventListener(n,t,!1)}function d(e,n,t){e.style[n]=t}function p(){}function g(e,n,t){t.preventDefault();var r,a,i,o={x:(r=n.getBoundingClientRect()).left,y:r.top},u=n.clientWidth,s=n.clientHeight,l={x:(i=t,(i.touches?i.touches[i.touches.length-1]:i).clientX),y:(a=t,(a.touches?a.touches[a.touches.length-1]:a).clientY)},f=(l.x-o.x)/u,c=(l.y-o.y)/s;e({x:isNaN(f)?0:f,y:isNaN(c)?0:c,cursor:l,elem:n,e:t})}}()}),a=e(function(e,n){e.exports=function(){function c(e){if(Array.isArray(e)){if("string"==typeof e[0]&&"function"==typeof c[e[0]])return new c[e[0]](e.slice(1,e.length));if(4===e.length)return new c.RGB(e[0]/255,e[1]/255,e[2]/255,e[3]/255)}else if("string"==typeof e){var n=e.toLowerCase();c.namedColors[n]&&(e="#"+c.namedColors[n]),"transparent"===n&&(e="rgba(0,0,0,0)");var t=e.match(p);if(t){var r=t[1].toUpperCase(),a=h(t[8])?t[8]:parseFloat(t[8]),i="H"===r[0],o=t[3]?100:i?360:255,u=t[5]||i?100:255,s=t[7]||i?100:255;if(h(c[r]))throw new Error("color."+r+" is not installed.");return new c[r](parseFloat(t[2])/o,parseFloat(t[4])/u,parseFloat(t[6])/s,a)}e.length<6&&(e=e.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,"$1$1$2$2$3$3"));var l=e.match(/^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$/i);if(l)return new c.RGB(parseInt(l[1],16)/255,parseInt(l[2],16)/255,parseInt(l[3],16)/255);if(c.CMYK){var f=e.match(new RegExp("^cmyk\\("+d.source+","+d.source+","+d.source+","+d.source+"\\)$","i"));if(f)return new c.CMYK(parseFloat(f[1])/100,parseFloat(f[2])/100,parseFloat(f[3])/100,parseFloat(f[4])/100)}}else if("object"==typeof e&&e.isColor)return e;return!1}var u=[],h=function(e){return void 0===e},e=/\s*(\.\d+|\d+(?:\.\d+)?)(%)?\s*/,d=/\s*(\.\d+|100|\d?\d(?:\.\d+)?)%\s*/,p=new RegExp("^(rgb|hsl|hsv)a?\\("+e.source+","+e.source+","+e.source+"(?:,"+/\s*(\.\d+|\d+(?:\.\d+)?)\s*/.source+")?\\)$","i");c.namedColors={},c.installColorSpace=function(a,i,e){function n(e,r){var n={};for(var t in n[r.toLowerCase()]=function(){return this.rgb()[r.toLowerCase()]()},c[r].propertyNames.forEach(function(t){var e="black"===t?"k":t.charAt(0);n[t]=n[e]=function(e,n){return this[r.toLowerCase()]()[t](e,n)}}),n)n.hasOwnProperty(t)&&void 0===c[e].prototype[t]&&(c[e].prototype[t]=n[t])}(c[a]=function(e){var r=Array.isArray(e)?e:arguments;i.forEach(function(e,n){var t=r[n];if("alpha"===e)this._alpha=isNaN(t)||1n)return!1;return!0},r.toJSON=function(){return[a].concat(i.map(function(e){return this["_"+e]},this))},e)if(e.hasOwnProperty(t)){var o=t.match(/^from(.*)$/);o?c[o[1].toUpperCase()].prototype[a.toLowerCase()]=e[t]:r[t]=e[t]}return r[a.toLowerCase()]=function(){return this},r.toString=function(){return"["+a+" "+i.map(function(e){return this["_"+e]},this).join(", ")+"]"},i.forEach(function(t){var e="black"===t?"k":t.charAt(0);r[t]=r[e]=function(n,e){return void 0===n?this["_"+t]:e?new this.constructor(i.map(function(e){return this["_"+e]+(t===e?n:0)},this)):new this.constructor(i.map(function(e){return t===e?n:this["_"+e]},this))}}),u.forEach(function(e){n(a,e),n(e,a)}),u.push(a),c},c.pluginList=[],c.use=function(e){return-1===c.pluginList.indexOf(e)&&(this.pluginList.push(e),e(c)),c},c.installMethod=function(n,t){return u.forEach(function(e){c[e].prototype[n]=t}),this},c.installColorSpace("RGB",["red","green","blue","alpha"],{hex:function(){var e=(65536*Math.round(255*this._red)+256*Math.round(255*this._green)+Math.round(255*this._blue)).toString(16);return"#"+"00000".substr(0,6-e.length)+e},hexa:function(){var e=Math.round(255*this._alpha).toString(16);return"#"+"00".substr(0,2-e.length)+e+this.hex().substr(1,6)},css:function(){return"rgb("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+")"},cssa:function(){return"rgba("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+","+this._alpha+")"}});var n=function(a){a.installColorSpace("XYZ",["x","y","z","alpha"],{fromRgb:function(){var e=function(e){return.04045t[e]?r[e]=(n[e]-t[e])/(1-t[e]):n[e]>t[e]?r[e]=(t[e]-n[e])/t[e]:r[e]=0}),r._red>r._green?r._red>r._blue?n._alpha=r._red:n._alpha=r._blue:r._green>r._blue?n._alpha=r._green:n._alpha=r._blue,n._alpha<1e-10||(a.forEach(function(e){n[e]=(n[e]-t[e])/n._alpha+t[e]}),n._alpha*=r._alpha),n})})}()}),g=n(b,"div");function b(e,n,t){var r=document.createElement(e);return r.className=n,t.appendChild(r),r}function n(e){var n=Array.prototype.slice,t=n.apply(arguments,[1]);return function(){return e.apply(null,t.concat(n.apply(arguments)))}}function t(e,n,t){return Math.min(Math.max(e,n),t)}var v={clamp:t,e:b,div:g,partial:n,labelInput:function(e,n,t,r){var a="colorPickerInput"+Math.floor(1001*Math.random()),i=g(e,t);return{label:(c=n,h=i,d=a,p=b("label","",h),p.innerHTML=c,d&&p.setAttribute("for",d),p),input:(o="text",u=i,s=r,l=a,f=b("input","",u),f.type=o,s&&(f.maxLength=s),l&&f.setAttribute("id",l),s&&(f.maxLength=s),f)};var o,u,s,l,f;var c,h,d,p},X:function(e,n){e.style.left=t(100*n,0,100)+"%"},Y:function(e,n){e.style.top=t(100*n,0,100)+"%"},BG:function(e,n){e.style.background=n}};var r={currentColor:function(e){var n=v.div("currentColorContainer",e),t=v.div("currentColor",n);return{change:function(e){v.BG(t,e.cssa())}}},fields:function(e,t,n){var r=n.space,a=n.limit||255,i=0<=n.fix?n.fix:0,o=(""+a).length+i;o=i?o+1:o;var u=r.split(""),s="A"==r[r.length-1];if(r=s?r.slice(0,-1):r,["RGB","HSL","HSV","CMYK"].indexOf(r)<0)return console.warn("Invalid field names",r);var l=v.div("colorFields",e),f=u.map(function(e){e=e.toLowerCase();var n=v.labelInput("color "+e,e,l,o);return n.input.onblur=c,n.input.onkeydown=h,n.input.onkeyup=d,{name:e,e:n}});function c(){t.done()}function h(e){e.ctrlKey||e.altKey||!/^[a-zA-Z]$/.test(e.key)||e.preventDefault()}function d(){var n=[r];f.forEach(function(e){n.push(e.e.input.value/a)}),s||n.push(t.getAlpha()),t.set(n)}return{change:function(n){f.forEach(function(e){e.e.input.value=(n[e.name]()*a).toFixed(i)})}}},hex:function(e,r,n){var t=v.labelInput("hex",n.label||"",e,7);return t.input.value="#",t.input.onkeyup=function(e){var n=e.keyCode||e.which,t=e.target.value;t=function(e,n,t){for(var r=e,a=e.length;a (https://dragonwocky.me/) - * (c) 2020 TarasokUA - * under the MIT license - */ - -'use strict'; - -module.exports = (store, __exports) => { - const electron = require('electron'), - allWindows = () => - electron.BrowserWindow.getAllWindows().filter( - (win) => win.getTitle() !== 'notion-enhancer menu' - ), - // createWindow = __exports.createWindow, - path = require('path'), - helpers = require('../../pkg/helpers.js'); - - __exports.createWindow = function (relativeUrl, focused_window) { - if (!relativeUrl) relativeUrl = ''; - const window_state = require(`${helpers - .getNotionResources() - .replace(/\\/g, '/')}/app/node_modules/electron-window-state/index.js`)( - { - defaultWidth: 1320, - defaultHeight: 860, - } - ), - rect = { - x: window_state.x, - y: window_state.y, - width: window_state.width, - height: window_state.height, - }; - focused_window = - focused_window || electron.BrowserWindow.getFocusedWindow(); - if (focused_window && !focused_window.isMaximized()) { - rect.x = focused_window.getPosition()[0] + 20; - rect.y = focused_window.getPosition()[1] + 20; - rect.width = focused_window.getSize()[0]; - rect.height = focused_window.getSize()[1]; - } - let window = new electron.BrowserWindow({ - show: false, - backgroundColor: '#ffffff', - titleBarStyle: 'hiddenInset', - frame: !store().frameless, - webPreferences: { - preload: path.resolve( - `${helpers.getNotionResources()}/app/renderer/index.js` - ), - webviewTag: true, - session: electron.session.fromPartition('persist:notion'), - enableRemoteModule: true, - }, - ...rect, - }); - window.once('ready-to-show', function () { - if ( - !store().openhidden || - allWindows().some((win) => win.isVisible() && win.id != window.id) - ) { - window.show(); - window.focus(); - if (store().maximized) window.maximize(); - if ( - (focused_window && focused_window.isFullScreen()) || - window_state.isFullScreen - ) - window.setFullScreen(true); - } - }); - let intended_quit = false; - window.on('close', (e) => { - if (intended_quit || !store().close_to_tray || allWindows().length > 1) { - window_state.saveState(window); - window = null; - } else { - e.preventDefault(); - window.hide(); - } - }); - electron.app.on('before-quit', () => (intended_quit = true)); - window.loadURL(__exports.getIndexUrl(relativeUrl)); - return window; - }; - return __exports.createWindow; -}; diff --git a/repo/core/css/buttons.css b/repo/core/css/buttons.css deleted file mode 100644 index 70b8465..0000000 --- a/repo/core/css/buttons.css +++ /dev/null @@ -1,43 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * (c) 2020 TarasokUA - * under the MIT license - */ - -.window-buttons-area { - display: flex; - align-items: center; - font-size: 14px; -} -.window-button { - background: transparent; - border: 0; - margin: 0px 0px 0px 9px; - width: 32px; - line-height: 26px; - border-radius: 4px; - font-size: 16px; - transition: background 0.2s; - cursor: default; -} -.window-button svg { - margin-top: 8px; - width: 14px; - height: 14px; -} -.window-button svg path { - fill: currentColor; -} -.window-button svg line { - stroke: currentColor; -} - -.window-button:hover { - background: var(--theme--interactive_hover); - box-shadow: 0 0 0 0.5px var(--theme--interactive_hover-border); -} -.window-button.btn-close:hover { - background: var(--theme--button_close); - color: var(--theme--button_close-fill); -} diff --git a/repo/core/css/scrollbars.css b/repo/core/css/scrollbars.css deleted file mode 100644 index a837c92..0000000 --- a/repo/core/css/scrollbars.css +++ /dev/null @@ -1,29 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * (c) 2020 TarasokUA - * under the MIT license - */ - -[data-tweaks*='[smooth_scrollbars]'] .notion-scroller { - cursor: auto; -} -[data-tweaks*='[smooth_scrollbars]'] ::-webkit-scrollbar { - width: 8px; /* vertical */ - height: 8px; /* horizontal */ - -webkit-app-region: no-drag; -} -[data-tweaks*='[smooth_scrollbars]'] ::-webkit-scrollbar-corner { - background-color: transparent; /* overlap */ -} -[data-tweaks*='[smooth_scrollbars]'] ::-webkit-scrollbar-thumb { - border-radius: 5px; -} - -[data-tweaks*='[smooth_scrollbars]'] ::-webkit-scrollbar-thumb { - background-color: var(--theme--scrollbar); - border: 1px solid var(--theme--scrollbar-border); -} -[data-tweaks*='[smooth_scrollbars]'] ::-webkit-scrollbar-thumb:hover { - background: var(--theme--scrollbar_hover); -} diff --git a/repo/core/css/theme.css b/repo/core/css/theme.css deleted file mode 100644 index 8bbf38b..0000000 --- a/repo/core/css/theme.css +++ /dev/null @@ -1,1123 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * (c) 2020 TarasokUA - * (c) 2020 Arecsu - * (c) 2020 u/zenith_illinois - * (c) 2020 admiraldus (https://github.com/admiraldus) - * under the MIT license - */ - -/** app **/ - -.notion-body, -.notion-body.dark [style*='background: rgb(47, 52, 55)'], -.notion-body.dark [style*='background-color: rgb(47, 52, 55)'], -.notion-body:not(.dark) - .notion-light-theme - [style*='background: white']:not(.notion-help-button), -.notion-body:not(.dark) - .notion-dark-theme - [style*='background: white']:not(.notion-help-button):not([style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;']), -.notion-body:not(.dark) [style*='background-color: white'] { - background: var(--theme--main) !important; -} -.notion-sidebar > div, -.notion-body.dark [style*='background: rgb(55, 60, 63)'], -.notion-body.dark [style*='background: rgb(120, 123, 123)'], -.notion-body:not(.dark) [style*='background: rgb(247, 246, 243)'], -.notion-body:not(.dark) [style*='background: rgb(223, 223, 222)'] { - background: var(--theme--sidebar) !important; -} -.notion-peek-renderer, -[style*='background: rgba(15, 15, 15, 0.6)'] { - background: var(--theme--overlay) !important; -} - -.notion-frame - .notion-scroller - [style*='env(safe-area-inset-'][style*=' width: 900px'], -.notion-frame - .notion-scroller - [style*='env(safe-area-inset-'][style*=';width: 900px'], -.notion-frame - .notion-scroller - [style*='height: 30vh'] - [style*='pointer-events:'][style*='max-width: 100%; width: 900px'] { - width: var(--theme--page_normal-width) !important; -} - -.notion-frame - [style*='padding-left: calc(96px + env(safe-area-inset-left)); padding-right: calc(96px + env(safe-area-inset-right));'] { - padding-left: var(--theme--page-padding) !important; - padding-right: var(--theme--page-padding) !important; -} - -.notion-page-content [data-block-id][style*='max-width'] { - max-width: 100% !important; -} -.notion-frame - .notion-scroller - [style*='env(safe-area-inset-'][style*=' width: 100%'], -.notion-frame - .notion-scroller - [style*='height: 30vh'] - [style*='pointer-events:'][style*='max-width: 100%; width: 100%'] { - width: var(--theme--page_full-width) !important; -} -.notion-frame .notion-scroller [style*='padding-left: 136.5px;'] { - padding-left: 0 !important; -} -.notion-frame .notion-scroller [style*='padding-right: 136.5px;'] { - padding-right: 0 !important; -} -.notion-collection_view-block > :first-child, -.notion-collection_view-block .notion-scroller > :first-child { - padding-left: 0 !important; - padding-right: 0 !important; -} - -.notion-peek-renderer - .notion-scroller.vertical - [style*='position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; height: 20vh;'], -.notion-peek-renderer - .notion-scroller.vertical - [style*='position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; height: 20vh;'] - img { - height: var(--theme--preview_banner-height) !important; -} -[style^='position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; height: 30vh;'], -[style^='position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; height: 30vh;'] - img { - height: var(--theme--page_banner-height) !important; -} - -/* colour help button - one of the few specific classes notion does give us */ -.notion-help-button { - background: var(--theme--interactive_hover) !important; - box-shadow: 0 0 0 0.5px var(--theme--interactive_hover-border) !important; -} - -/* page preview sizing */ -.notion-peek-renderer > div:nth-child(2) { - max-width: var(--theme--preview-width) !important; -} -.notion-peek-renderer .notion-page-content [style*='max-width: 943px;'] { - max-width: none !important; -} - -.notion-peek-renderer - .notion-scroller.vertical - [style*='padding-left: calc(126px + env(safe-area-inset-left));'] { - padding-left: var(--theme--preview-padding) !important; -} -.notion-peek-renderer - .notion-scroller.vertical - [style*='padding-right: calc(126px + env(safe-area-inset-right));'] { - padding-right: var(--theme--preview-padding) !important; -} -.notion-peek-renderer - .notion-scroller.vertical - [style*='margin-left: calc(126px + env(safe-area-inset-left));'] { - margin-left: var(--theme--preview-padding) !important; -} -.notion-peek-renderer - .notion-scroller.vertical - [style*='margin-right: calc(126px + env(safe-area-inset-right));'] { - margin-right: var(--theme--preview-padding) !important; -} -.notion-peek-renderer .notion-page-content { - padding-left: var(--theme--preview-padding) !important; - padding-right: var(--theme--preview-padding) !important; - width: 100%; -} - -/** fonts **/ - -[style*='Segoe UI'] { - font-family: var(--theme--font_sans) !important; -} -[style*='Georgia'] { - font-family: var(--theme--font_serif) !important; -} -[style*='iawriter-mono'] { - font-family: var(--theme--font_mono) !important; -} -[style*='SFMono-Regular'] { - font-family: var(--theme--font_code) !important; -} -.notion-selectable.notion-quote-block div[spellcheck="true"] { - font-family: var(--theme--font_quote) !important; -} -[placeholder='Heading 1'], [placeholder='Heading 2'], [placeholder='Heading 3'] { - font-family: var(--theme--font_headings) !important; -} -.notion-frame .notion-page-block div[placeholder='Untitled'], -.notion-overlay-container .notion-page-block div[placeholder='Untitled'] { - font-size: calc( - var(--theme--font_body-size) * (var(--theme--font_heading1-size) / 1em) - ) !important; -} -[placeholder='Heading 1'] { - font-size: calc( - var(--theme--font_body-size) * (var(--theme--font_heading1-size) / 1em) - ) !important; -} -[placeholder='Heading 2'] { - font-size: calc( - var(--theme--font_body-size) * (var(--theme--font_heading2-size) / 1em) - ) !important; -} -[placeholder='Heading 3'] { - font-size: calc( - var(--theme--font_body-size) * (var(--theme--font_heading3-size) / 1em) - ) !important; -} -.notion-frame .notion-scroller.vertical.horizontal [style*='font-size: 14px'], -.notion-overlay-container .notion-scroller.vertical [style*='font-size: 14px'] { - font-size: var(--theme--font_label-size) !important; -} -.notion-frame .notion-scroller.vertical.horizontal .notion-page-content, -.notion-overlay-container .notion-scroller.vertical .notion-page-content { - font-size: var(--theme--font_body-size) !important; -} -.notion-frame - .notion-scroller.vertical.horizontal - .notion-page-content[style*='font-size: 14px'], -.notion-overlay-container - .notion-scroller.vertical - .notion-page-content[style*='font-size: 14px'] { - font-size: var(--theme--font_body-size_small) !important; -} -.notion-code-block [placeholder=' '] { - font-size: var(--theme--font_code-size) !important; -} -.notion-sidebar [style*='font-size: 14px'] { - font-size: var(--theme--font_sidebar-size) !important; -} - -/** text-block readability **/ - -.notion-page-content .notion-selectable.notion-text-block { - line-height: var(--theme--text-block_line-height) !important; - margin-top: var(--theme--text-block_margin-top) !important; -} - -/** databases **/ - -.notion-body.dark [style*='background: rgb(63, 68, 71)'], -.notion-body.dark [style*='background-color: rgb(64, 68, 71);'], -.notion-body:not(.dark) - .notion-scroller.horizontal.vertical - .notion-selectable - > a[style*='background: white'], -.notion-body:not(.dark) [style*='background: rgb(247, 246, 243)'], -.notion-body:not(.dark) - .notion-dark-theme - [style*='background: white'][style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;'] { - background: var(--theme--card) !important; -} -.notion-body.dark - .notion-page-block.notion-collection-item - [style*='background: rgba(255, 255, 255, 0.05)'], -.notion-body:not(.dark) - .notion-page-block.notion-collection-item - [style*='background: rgba(55, 53, 47, 0.024)'] { - background: var(--theme--gallery) !important; -} -.notion-body.dark .notion-scroller > [style*='rgb(55, 60, 63)'], -.notion-body:not(.dark) [style*='background: rgba(242, 241, 238, 0.6)'] { - background: var(--theme--select_input) !important; -} - -.notion-body.dark - [style*='box-shadow: rgba(255, 255, 255, 0.14) 0px -1px inset;'], -.notion-body:not(.dark) - [style*='box-shadow: rgba(55, 53, 47, 0.16) 0px -1px 0px inset'] { - box-shadow: rgba(55, 53, 47, 0.16) 0px -1px inset !important; -} - -.notion-body.dark [style*='box-shadow: rgba(255, 255, 255, 0.07) 0px 1px 0px'], -.notion-body:not(.dark) - [style*='box-shadow: rgba(55, 53, 47, 0.09) 0px 1px 0px'] { - box-shadow: var(--theme--ui-border) 0px 1px 0px !important; -} -.notion-body.dark - [style*='box-shadow: rgba(255, 255, 255, 0.14) 0px 1px 0px inset'], -.notion-body:not(.dark) - [style*='box-shadow: rgba(55, 53, 47, 0.16) 0px 1px 0px inset'] { - box-shadow: var(--theme--table-border) 0px 1px 0px inset !important; -} - -.notion-body.dark [style*='box-shadow: rgb(47, 52, 55) -3px 0px 0px;'], -.notion-body:not(.dark) [style*='box-shadow: white -3px 0px 0px;'] { - box-shadow: var(--theme--main) -3px 0px 0px !important; -} -.notion-body.dark - [style*='box-shadow: rgb(47, 52, 55) -3px 0px 0px, rgba(255, 255, 255, 0.14) 0px 1px 0px'], -.notion-body:not(.dark) - [style*='box-shadow: white -3px 0px 0px, rgba(55, 53, 47, 0.16) 0px 1px 0px'], -.notion-body:not(.dark) - [style*='box-shadow: rgba(255, 255, 255, 0.07) 0px -1px 0px'] { - box-shadow: var(--theme--main) -3px 0px 0px, - var(--theme--ui-border) 0px 1px 0px !important; -} - -.notion-body.dark [style*='border-top: 1px solid rgba(255, 255, 255,'], -.notion-body:not(.dark) [style*='border-top: 1px solid rgba(55, 53, 47,'] { - border-top: 1px solid var(--theme--table-border) !important; -} -.notion-body.dark - [style*='box-shadow: rgba(255, 255, 255, 0.14) -1px 0px 0px'] { - box-shadow: var(--theme--table-border) -1px 0px 0px !important; -} -.notion-body.dark [style*='border-bottom: 1px solid rgba(255, 255, 255,'], -.notion-body:not(.dark) [style*='border-bottom: 1px solid rgba(55, 53, 47,'] { - border-bottom: 1px solid var(--theme--table-border) !important; -} -.notion-body.dark [style*='box-shadow: rgba(255, 255, 255, 0.14) 0px 1px 0px'], -.notion-body:not(.dark) - [style*='box-shadow: rgba(55, 53, 47, 0.16) 0px 1px 0px'] { - box-shadow: var(--theme--table-border) 0px 1px 0px !important; -} -.notion-body.dark [style*='border-right: 1px solid rgba(255, 255, 255,'], -.notion-body:not(.dark) [style*='border-right: 1px solid rgba(55, 53, 47,'] { - border-right: 1px solid var(--theme--table-border) !important; -} -.notion-body.dark [style*='box-shadow: rgba(255, 255, 255, 0.07) 0px -1px 0px'], -.notion-body.dark [style*='box-shadow: rgba(55, 53, 47, 0.09) 0px -1px 0px'], -.notion-body:not(.dark) - [style*='box-shadow: rgba(55, 53, 47, 0.09) 0px -1px 0px'] { - box-shadow: var(--theme--ui-border) 0px -1px 0px !important; -} -.notion-body.dark [style*='border-left: 1px solid rgba(255, 255, 255,'], -.notion-body.dark - .notion-block-permission-settings-public-access - [role='button'][style*='border-left: none'], -.notion-body:not(.dark) [style*='border-left: 1px solid rgba(55, 53, 47,'] { - border-left: 1px solid var(--theme--table-border) !important; -} -.notion-body.dark - [style*='box-shadow: rgba(255, 255, 255, 0.14) 1px 0px 0px inset'], -.notion-body:not(.dark) - [style*='box-shadow: rgba(55, 53, 47, 0.16) 1px 0px 0px inset'] { - box-shadow: var(--theme--table-border) 1px 0px 0px inset !important; -} -.notion-body:not(.dark) - [style*='box-shadow: rgba(55, 53, 47, 0.09) -1px 0px 0px'], -.notion-body:not(.dark) - [style*='box-shadow: rgba(55, 53, 47, 0.16) -1px 0px 0px'] { - box-shadow: -1px -1px 0 var(--theme--table-border) !important; -} - -.notion-body.dark - [style*='border-top: 1px solid rgb(77, 81, 83)'], -.notion-body:not(.dark) - [style*='border-top: 1px solid rgb(223, 223, 222)'] { - border-top: 1px solid var(--theme--table-border_row) !important; -} -.notion-body.dark - [style*='border-bottom: 1px solid rgb(77, 81, 83)'], -.notion-body:not(.dark) - [style*='border-bottom: 1px solid rgb(223, 223, 222)'] { - border-bottom: 1px solid var(--theme--table-border_row) !important; -} -.notion-body.dark - [style*='border-right: 1px solid rgb(77, 81, 83)'], -.notion-body:not(.dark) - [style*='border-right: 1px solid rgb(223, 223, 222)'] { - border-right: 1px solid var(--theme--table-border_row) !important; -} - -.notion-body.dark - [style*='border-right: 1px solid rgb(63, 66, 69)'], -.notion-body:not(.dark) - [style*='border-right: 1px solid rgb(237, 237, 236)'] { - border-right: 1px solid var(--theme--table-border_column) !important; -} - -.notion-body.dark - [style*='box-shadow: rgb(47, 52, 55) -3px 0px 0px, rgb(77, 81, 83) 0px 1px 0px'], -.notion-body:not(.dark) - [style*='box-shadow: white -3px 0px 0px, rgb(223, 223, 222) 0px 1px 0px'] { - box-shadow: var(--theme--main) -3px 0px 0px, - var(--theme--table-border_row) 0px 1px 0px !important; -} -.notion-body.dark - [style*='box-shadow: rgb(77, 81, 83) -1px 0px 0px'], -.notion-body:not(.dark) - [style*='box-shadow: rgb(223, 223, 222) -1px 0px 0px'] { - box-shadow: var(--theme--table-border_row) -1px 0px 0px !important; -} -.notion-body.dark - [style*='box-shadow: rgb(77, 81, 83) 0px 1px 0px'], -.notion-body:not(.dark) - [style*='box-shadow: rgb(223, 223, 222) 0px 1px 0px'] { - box-shadow: var(--theme--table-border_row) 0 1px 0px !important; -} -.notion-body.dark - [style*='box-shadow: rgb(77, 81, 83) 0px 1px 0px inset'], -.notion-body:not(.dark) - [style*='box-shadow: rgb(223, 223, 222) 0px 1px 0px inset'] { - box-shadow: var(--theme--table-border_row) 0 1px 0px inset !important; -} - -[style*='border: 1px solid rgba(46, 170, 220, 0.6)'] { - border: 1px solid var(--theme--table-border_selected) !important; -} - -.notion-body.dark - [style*='background-image: linear-gradient(to right, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.14) 100%);'], -.notion-body:not(.dark) - [style*='background-image: linear-gradient(to right, rgba(55, 53, 47, 0.16) 0%, rgba(55, 53, 47, 0.16) 100%);'] { - background-image: linear-gradient( - to right, - var(--theme--bg_gray) 0%, - var(--theme--bg_gray) 100% - ) !important; -} - -.notion-body.dark [style*='background: rgb(71, 76, 80)'], -.notion-body.dark [style*='background: rgb(80, 85, 88)'], -.notion-body.dark [style*='background: rgb(98, 102, 104)'], -.notion-body.dark [style*='height: 1px; background: rgba(255, 255, 255, 0.07)'], -.notion-body:not(.dark) [style*='background: rgba(55, 53, 47,'], -.notion-body:not(.dark) [style*='background: rgb(239, 239, 238)'], -.notion-body:not(.dark) [style*='background: rgba(206, 205, 202, 0.5)'] { - background: var(--theme--interactive_hover) !important; - box-shadow: 0 0 0 0.5px var(--theme--interactive_hover-border) !important; -} - -/* normalise inline-table size */ -.notion-page-content .notion-collection_view-block[style*=' width'], -.notion-page-content .notion-collection_view-block[style^='width'] { - width: 100% !important; -} -.notion-page-content - .notion-collection_view-block - [style*='padding-left: 50px'], -.notion-page-content - .notion-collection_view-block - [style*='padding-left: 96px'], -.notion-page-content - .notion-collection_view-block - [style*='padding-left: 126px'] { - padding-left: 0 !important; -} -.notion-page-content - .notion-collection_view-block - [style*='padding-right: 50px'], -.notion-page-content - .notion-collection_view-block - [style*='padding-right: 96px'], -.notion-page-content - .notion-collection_view-block - [style*='padding-right: 126px'] { - padding-right: 0 !important; -} -.notion-page-content - .notion-collection_view-block - [style*='min-width: calc(100% - 192px);'], -.notion-page-content - .notion-collection_view-block - [style*='min-width: 708px;'] { - min-width: 100% !important; -} -.notion-page-content .notion-collection_view-block > div { - padding: 0 1px; -} - -/* smooth transitions */ -.notion-calendar-view-day, -.DayPicker-Day--today:not(.DayPicker-Day--selected):not(.DayPicker-Day--value):not(.DayPicker-Day--start):not(.DayPicker-Day--end), -.DayPicker-Day.DayPicker-Day--start.DayPicker-Day--selected, -.DayPicker:not(.DayPicker--interactionDisabled) .DayPicker-Day--outside:hover, -.DayPicker:not(.DayPicker--interactionDisabled) - .DayPicker-Day:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--value):not(.DayPicker-Day--start):not(.DayPicker-Day--end) { - transition: all 200ms ease !important; -} -.notion-token-remove-button { - transition: opacity 200ms ease !important; -} -.notion-to_do-block > div > div > div[style*='background:'] { - transition: background 200ms ease !important; -} - -/* fix button resizing */ -.notion-collection_view-block [role='button'], -.notion-collection_view_page-block [role='button'] { - border-width: 0 !important; -} - -/** general ui **/ - -::selection, -[style*='background: rgba(46, 170, 220,']:not([style*='background: rgba(46, 170, 220, 0)']), -[style*='background-color: rgba(46, 170, 220,']:not([style*='background-color: rgba(46, 170, 220, 0)']) { - background: var(--theme--selected) !important; -} - -[style*=' color: rgb(46, 170, 220)'], -[style^='color: rgb(46, 170, 220)'] { - color: var(--theme--primary) !important; -} -[style*='fill: rgb(46, 170, 220)'] { - fill: var(--theme--primary) !important; -} -[style*='background: rgb(46, 170, 220)'], -[style*='background-color: rgb(46, 170, 220)'] { - background: var(--theme--primary) !important; -} -[style*='box-shadow: rgb(46, 170, 220) 0px 0px 0px 2px inset'] { - box-shadow: var(--theme--primary) 0px 0px 0px 2px inset !important; -} -[style*='background: rgb(6, 156, 205)'] { - background: var(--theme--primary_hover) !important; -} -[style*='background: rgb(0, 141, 190)'] { - background: var(--theme--primary_click) !important; -} -[style*='background: rgb(46, 170, 220)'][style*='color: white'], -[style*='background-color: rgb(46, 170, 220)'][style*='color: white'], -[style*='background: rgb(6, 156, 205)'][style*='color: white'], -[style*='background: rgb(0, 141, 190)'][style*='color: white'] { - color: var(--theme--primary_text) !important; -} -[style*='background: rgb(46, 170, 220)'] [style*='fill: white'], -[style*='background-color: rgb(46, 170, 220)'] [style*='fill: white'], -[style*='background: rgb(6, 156, 205)'] [style*='fill: white'], -[style*='background: rgb(0, 141, 190)'] [style*='fill: white'] { - fill: var(--theme--primary_text) !important; -} -.DayPicker-Day--today:not(.DayPicker-Day--selected):not(.DayPicker-Day--value):not(.DayPicker-Day--start):not(.DayPicker-Day--end)::after, -[style*='background: rgb(235, 87, 87)'] { - background: var(--theme--primary_indicator) !important; -} -[style*='background: rgb(235, 87, 87)'][style*='color: white'] { - color: var(--theme--primary_indicator_text) !important; -} -#notion-app .DayPicker:not(.DayPicker--interactionDisabled) .DayPicker-Day--outside:hover, #notion-app .DayPicker:not(.DayPicker--interactionDisabled) .DayPicker-Day:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--value):not(.DayPicker-Day--start):not(.DayPicker-Day--end):hover { - background: var(--theme--primary_indicator_hover) !important; -} - -.notion-body.dark - [style*='box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px'], -.notion-body:not(.dark) - [style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px'] { - box-shadow: var(--theme--box-shadow_strong) !important; -} -.notion-body.dark - [style*='box-shadow: rgba(15, 15, 15, 0.2) 0px 0px 0px 1px, rgba(15, 15, 15, 0.2) 0px 2px 4px'], -.notion-body:not(.dark) - [style*='box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 2px 4px'] { - box-shadow: var(--theme--box-shadow) !important; -} - -.notion-to_do-block > div [role='button']:hover, -.notion-to_do-block > div [role='button']:hover .checkboxSquare, -.notion-to_do-block > div [role='button']:hover .check { - background: var(--theme--option_hover-background) !important; -} -.notion-to_do-block > div [role='button']:hover .checkboxSquare path, -.notion-to_do-block > div [role='button']:hover .check polygon { - fill: var(--theme--option_hover-color) !important; -} -.notion-to_do-block > div [role='button']:not(:hover) .check { - background: var(--theme--option_active-background) !important; -} -.notion-to_do-block > div [role='button']:not(:hover) .check polygon { - fill: var(--theme--option_active-color) !important; -} - -.notion-to_do-block .checkboxSquare { - background: var(--theme--option-background) !important; -} -.notion-to_do-block .checkboxSquare path { - fill: var(--theme--option-color) !important; -} - -[style*='color: rgb(235, 87, 87); border: 1px solid rgba(235, 87, 87, 0.5);'] { - color: var(--theme--danger_text) !important; - border: 1px solid var(--theme--danger_border) !important; -} - -/* divider */ - -.notion-body.dark .notion-divider-block [style*='border-bottom: 1px solid rgba(255, 255, 255,'], -.notion-body:not(.dark) .notion-divider-block [style*='border-bottom: 1px solid rgba(55, 53, 47,'] { - border-bottom: 1px solid var(--theme--divider) !important; -} - -/* inputs */ -.notion-focusable:focus-within { - box-shadow: var(--theme--primary_hover) 0px 0px 0px 2px !important; -} - -/** content colours **/ - -.notion-body, -.notion-frame .notion-page-block, -.notion-body.dark [style*=' color: rgba(255, 255, 255, 0.9)'], -.notion-body.dark [style^='color: rgba(255, 255, 255, 0.9)'], -.notion-body.dark [style*=' color: rgba(255, 255, 255, 0.7)'], -.notion-body.dark [style^='color: rgba(255, 255, 255, 0.7)'], -.notion-body:not(.dark) [style*=' color: rgb(55, 53, 47);'], -.notion-body:not(.dark) [style^='color: rgb(55, 53, 47);'] { - color: var(--theme--text) !important; -} -.notion-body.dark [style*='color: rgba(255, 255, 255, 0.6)'], -.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.6)'], -.notion-body:not(.dark) [style*='color: rgba(25, 23, 17, 0.6)'] { - color: var(--theme--text_ui) !important; -} -::placeholder { - opacity: 1 !important; -} -::placeholder, -[style*='-webkit-text-fill-color:'], -.notion-body.dark [style*='color: rgba(255, 255, 255, 0.4)'], -.notion-body.dark [style*='color: rgba(255, 255, 255, 0.4)']::before, -.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.4)'], -.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.4)']::before { - color: var(--theme--text_ui_info) !important; - -webkit-text-fill-color: var(--theme--text_ui_info) !important; -} -.notion-body.dark [style*='fill: rgb(202, 204, 206)'] { - fill: var(--theme--text) !important; -} - -.notion-body.dark [style*='fill: rgba(255, 255, 255, 0.6)'], -.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.8)'], -.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.6)'], -.notion-body:not(.dark) [style*='fill: rgba(25, 23, 17, 0.6)'] { - fill: var(--theme--text_ui) !important; -} -.notion-body.dark [style*='fill: rgba(202, 204, 206, 0.6)'], -.notion-body.dark [style*='fill: rgba(202, 204, 206, 0.4)'], -.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.4)'], -.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.3)'] { - fill: var(--theme--text_ui_info) !important; -} -.notion-body.dark [style*='border-color:rgba(255,255,255,0.4);opacity:0.7'], -.notion-body:not(.dark) [style*='border-color:rgba(55,53,47,0.4);opacity:0.7'] { - border-color: var(--theme--text_ui_info) !important; -} -.notion-body.dark [style*='caret-color: rgba(255, 255, 255, 0.9)'], -.notion-body:not(.dark) [style*='caret-color: rgb(55, 53, 47)'] { - caret-color: var(--theme--text) !important; -} - -.notion-body.dark [style*='color:rgba(151,154,155,0.95)'], -.notion-body.dark - [style*='color: rgba(255, 255, 255, 0.6); fill: rgba(255, 255, 255, 0.6);'], -.notion-body:not(.dark) [style*='color:rgb(155,154,151)'], -.notion-body:not(.dark) - [style*='color: rgba(55, 53, 47, 0.6); fill: rgba(55, 53, 47, 0.6);'] { - color: var(--theme--text_gray) !important; - fill: var(--theme--text_gray) !important; -} -.notion-body.dark [style*='background:rgb(69,75,78)'], -.notion-body:not(.dark) [style*='background:rgb(235,236,237)'] { - background: var(--theme--bg_gray) !important; - color: var(--theme--bg_gray-text) !important; -} -.notion-body.dark - [style*='color:rgba(151,154,155,0.95)'] - [style*='background:rgb(69,75,78)'], -.notion-body.dark - [style*='color: rgba(255, 255, 255, 0.6); fill: rgba(255, 255, 255, 0.6);'] - [style*='background:rgb(69,75,78)'], -.notion-body:not(.dark) - [style*='color:rgb(155,154,151)'] - [style*='background:rgb(235,236,237)'], -.notion-body:not(.dark) - [style*='color: rgba(55, 53, 47, 0.6); fill: rgba(55, 53, 47, 0.6);'] - [style*='background:rgb(235,236,237)'] { - background: var(--theme--bg_gray) !important; - color: var(--theme--text_gray) !important; - fill: var(--theme--text_gray) !important; -} -.notion-body.dark [style*='background: rgb(69, 75, 78)'], -.notion-body:not(.dark) [style*='background: rgb(235, 236, 237)'] { - background: var(--theme--line_gray) !important; - color: var(--theme--line_gray-text) !important; -} -.notion-body.dark [style*='background: rgba(151, 154, 155, 0.5)'], -.notion-body:not(.dark) [style*='background: rgba(140, 46, 0, 0.2)'] { - background: var(--theme--select_gray) !important; - color: var(--theme--select_gray-text) !important; -} -.notion-body.dark [style*='background: rgba(69, 75, 78, 0.3)'], -.notion-body:not(.dark) [style*='background: rgba(235, 236, 237, 0.3)'] { - background: var(--theme--callout_gray) !important; - color: var(--theme--callout_gray-text) !important; -} - -.notion-body.dark [style*='color:rgb(147,114,100)'], -.notion-body.dark - [style*='color: rgb(147, 114, 100); fill: rgb(147, 114, 100);'], -.notion-body:not(.dark) [style*='color:rgb(100,71,58)'], -.notion-body:not(.dark) - [style*='color: rgb(100, 71, 58); fill: rgb(100, 71, 58);'] { - color: var(--theme--text_brown) !important; - fill: var(--theme--text_brown) !important; -} -.notion-body.dark [style*='background:rgb(67,64,64)'], -.notion-body:not(.dark) [style*='background:rgb(233,229,227)'] { - background: var(--theme--bg_brown) !important; - color: var(--theme--bg_brown-text) !important; -} -.notion-body.dark - [style*='color:rgb(147,114,100)'] - [style*='background:rgb(67,64,64)'], -.notion-body.dark - [style*='color: rgb(147, 114, 100); fill: rgb(147, 114, 100);'] - [style*='background:rgb(67,64,64)'], -.notion-body:not(.dark) - [style*='color:rgb(100,71,58)'] - [style*='background:rgb(233,229,227)'], -.notion-body:not(.dark) - [style*='color: rgb(100, 71, 58); fill: rgb(100, 71, 58);'] - [style*='background:rgb(233,229,227)'] { - background: var(--theme--bg_brown) !important; - color: var(--theme--text_brown) !important; - fill: var(--theme--text_brown) !important; -} -.notion-body.dark [style*='background: rgb(67, 64, 64)'], -.notion-body:not(.dark) [style*='background: rgb(233, 229, 227)'] { - background: var(--theme--line_brown) !important; - color: var(--theme--line_brown-text) !important; -} -.notion-body.dark [style*='background: rgba(147, 114, 100, 0.5)'], -.notion-body:not(.dark) [style*='background: rgba(140, 46, 0, 0.2)'] { - background: var(--theme--select_brown) !important; - color: var(--theme--select_brown-text) !important; -} -.notion-body.dark [style*='background: rgba(67, 64, 64, 0.3)'], -.notion-body:not(.dark) [style*='background: rgba(233, 229, 227, 0.3)'] { - background: var(--theme--callout_brown) !important; - color: var(--theme--callout_brown-text) !important; -} - -.notion-body.dark [style*='color:rgb(255,163,68)'], -.notion-body.dark [style*='color: rgb(255, 163, 68); fill: rgb(255, 163, 68);'], -.notion-body:not(.dark) [style*='color:rgb(217,115,13)'], -.notion-body:not(.dark) - [style*='color: rgb(217, 115, 13); fill: rgb(217, 115, 13);'] { - color: var(--theme--text_orange) !important; - fill: var(--theme--text_orange) !important; -} -.notion-body.dark [style*='background:rgb(89,74,58)'], -.notion-body:not(.dark) [style*='background:rgb(250,235,221)'] { - background: var(--theme--bg_orange) !important; - color: var(--theme--bg_orange-text) !important; -} -.notion-body.dark - [style*='color:rgb(255,163,68)'] - [style*='background:rgb(89,74,58)'], -.notion-body.dark - [style*='color: rgb(255, 163, 68); fill: rgb(255, 163, 68);'] - [style*='background:rgb(89,74,58)'], -.notion-body:not(.dark) - [style*='color:rgb(217,115,13)'] - [style*='background:rgb(250,235,221)'], -.notion-body:not(.dark) - [style*='color: rgb(217, 115, 13); fill: rgb(217, 115, 13);'] - [style*='background:rgb(250,235,221)'] { - background: var(--theme--bg_orange) !important; - color: var(--theme--text_orange) !important; - fill: var(--theme--text_orange) !important; -} -.notion-body.dark [style*='background: rgb(89, 74, 58)'], -.notion-body:not(.dark) [style*='background: rgb(250, 235, 221)'] { - background: var(--theme--line_orange) !important; - color: var(--theme--line_orange-text) !important; -} -.notion-body.dark [style*='background: rgba(255, 163, 68, 0.5)'], -.notion-body:not(.dark) [style*='background: rgba(245, 93, 0, 0.2)'] { - background: var(--theme--select_orange) !important; - color: var(--theme--select_orange-text) !important; -} -.notion-body.dark [style*='background: rgba(89, 74, 58, 0.3)'], -.notion-body:not(.dark) [style*='background: rgba(250, 235, 221, 0.3)'] { - background: var(--theme--callout_orange) !important; - color: var(--theme--callout_orange-text) !important; -} - -.notion-body.dark [style*='color:rgb(255,220,73)'], -.notion-body.dark [style*='color: rgb(255, 220, 73); fill: rgb(255, 220, 73);'], -.notion-body:not(.dark) [style*='color:rgb(223,171,1)'], -.notion-body:not(.dark) - [style*='color: rgb(223, 171, 1); fill: rgb(223, 171, 1);'] { - color: var(--theme--text_yellow) !important; - fill: var(--theme--text_yellow) !important; -} -.notion-body.dark [style*='background:rgb(89,86,59)'], -.notion-body:not(.dark) [style*='background:rgb(251,243,219)'] { - background: var(--theme--bg_yellow) !important; - color: var(--theme--bg_yellow-text) !important; -} -.notion-body.dark - [style*='color:rgb(255,220,73)'] - [style*='background:rgb(89,86,59)'], -.notion-body.dark - [style*='color: rgb(255, 220, 73); fill: rgb(255, 220, 73);'] - [style*='background:rgb(89,86,59)'], -.notion-body:not(.dark) - [style*='color:rgb(223,171,1)'] - [style*='background:rgb(251,243,219)'], -.notion-body:not(.dark) - [style*='color: rgb(223, 171, 1); fill: rgb(223, 171, 1);'] - [style*='background:rgb(251,243,219)'] { - background: var(--theme--bg_yellow) !important; - color: var(--theme--text_yellow) !important; - fill: var(--theme--text_yellow) !important; -} -.notion-body.dark [style*='background: rgb(89, 86, 59)'], -.notion-body:not(.dark) [style*='background: rgb(251, 243, 219)'] { - background: var(--theme--line_yellow) !important; - color: var(--theme--line_yellow-text) !important; -} -.notion-body.dark [style*='background: rgba(255, 220, 73, 0.5)'], -.notion-body:not(.dark) [style*='background: rgba(233, 168, 0, 0.2)'] { - background: var(--theme--select_yellow) !important; - color: var(--theme--select_yellow-text) !important; -} -.notion-body.dark [style*='background: rgba(89, 86, 59, 0.3)'], -.notion-body:not(.dark) [style*='background: rgba(251, 243, 219, 0.3)'] { - background: var(--theme--callout_yellow) !important; - color: var(--theme--callout_yellow-text) !important; -} - -.notion-body.dark [style*='color:rgb(77,171,154)'], -.notion-body.dark [style*='color: rgb(77, 171, 154); fill: rgb(77, 171, 154);'], -.notion-body:not(.dark) [style*='color:rgb(15,123,108)'], -.notion-body:not(.dark) - [style*='color: rgb(15, 123, 108); fill: rgb(15, 123, 108);'] { - color: var(--theme--text_green) !important; - fill: var(--theme--text_green) !important; -} -.notion-body.dark [style*='background:rgb(53,76,75)'], -.notion-body:not(.dark) [style*='background:rgb(221,237,234)'] { - background: var(--theme--bg_green) !important; - color: var(--theme--bg_green-text) !important; -} -.notion-body.dark - [style*='color:rgb(77,171,154)'] - [style*='background:rgb(53,76,75)'], -.notion-body.dark - [style*='color: rgb(77, 171, 154); fill: rgb(77, 171, 154);'] - [style*='background:rgb(53,76,75)'], -.notion-body:not(.dark) - [style*='color:rgb(15,123,108)'] - [style*='background:rgb(221,237,234)'], -.notion-body:not(.dark) - [style*='color: rgb(15, 123, 108); fill: rgb(15, 123, 108);'] - [style*='background:rgb(221,237,234)'] { - background: var(--theme--bg_green) !important; - color: var(--theme--text_green) !important; - fill: var(--theme--text_green) !important; -} -.notion-body.dark [style*='background: rgb(53, 76, 75)'], -.notion-body:not(.dark) [style*='background: rgb(221, 237, 234)'] { - background: var(--theme--line_green) !important; - color: var(--theme--line_green-text) !important; -} -.notion-body.dark [style*='background: rgba(77, 171, 154, 0.5)'], -.notion-body:not(.dark) [style*='background: rgba(0, 135, 107, 0.2)'] { - background: var(--theme--select_green) !important; - color: var(--theme--select_green-text) !important; -} -.notion-body.dark [style*='background: rgba(53, 76, 75, 0.3)'], -.notion-body:not(.dark) [style*='background: rgba(221, 237, 234, 0.3)'] { - background: var(--theme--callout_green) !important; - color: var(--theme--callout_green-text) !important; -} - -.notion-body.dark [style*='color:rgb(82,156,202)'], -.notion-body.dark [style*='color: rgb(82, 156, 202); fill: rgb(82, 156, 202);'], -.notion-body:not(.dark) [style*='color:rgb(11,110,153)'], -.notion-body:not(.dark) - [style*='color: rgb(11, 110, 153); fill: rgb(11, 110, 153);'] { - color: var(--theme--text_blue) !important; - fill: var(--theme--text_blue) !important; -} -.notion-body.dark [style*='background:rgb(54,73,84)'], -.notion-body:not(.dark) [style*='background:rgb(221,235,241)'] { - background: var(--theme--bg_blue) !important; - color: var(--theme--bg_blue-text) !important; -} -.notion-body.dark - [style*='color:rgb(82,156,202)'] - [style*='background:rgb(54,73,84)'], -.notion-body.dark - [style*='color: rgb(82, 156, 202); fill: rgb(82, 156, 202);'] - [style*='background:rgb(54,73,84)'], -.notion-body:not(.dark) - [style*='color:rgb(11,110,153)'] - [style*='background:rgb(221,235,241)'], -.notion-body:not(.dark) - [style*='color: rgb(11, 110, 153); fill: rgb(11, 110, 153);'] - [style*='background:rgb(221,235,241)'] { - background: var(--theme--bg_blue) !important; - color: var(--theme--text_blue) !important; - fill: var(--theme--text_blue) !important; -} -.notion-body.dark [style*='background: rgb(54, 73, 84)'], -.notion-body:not(.dark) [style*='background: rgb(221, 235, 241)'] { - background: var(--theme--line_blue) !important; - color: var(--theme--line_blue-text) !important; -} -.notion-body.dark [style*='background: rgba(82, 156, 202, 0.5)'], -.notion-body:not(.dark) [style*='background: rgba(0, 120, 223, 0.2)'] { - background: var(--theme--select_blue) !important; - color: var(--theme--select_blue-text) !important; -} -.notion-body.dark [style*='background: rgba(54, 73, 84, 0.3)'], -.notion-body:not(.dark) [style*='background: rgba(221, 235, 241, 0.3)'] { - background: var(--theme--callout_blue) !important; - color: var(--theme--callout_blue-text) !important; -} - -.notion-body.dark [style*='color:rgb(154,109,215)'], -.notion-body.dark - [style*='color: rgb(154, 109, 215); fill: rgb(154, 109, 215);'], -.notion-body:not(.dark) [style*='color:rgb(105,64,165)'], -.notion-body:not(.dark) - [style*='color: rgb(105, 64, 165); fill: rgb(105, 64, 165);'] { - color: var(--theme--text_purple) !important; - fill: var(--theme--text_purple) !important; -} -.notion-body.dark [style*='background:rgb(68,63,87)'], -.notion-body:not(.dark) [style*='background:rgb(234,228,242)'] { - background: var(--theme--bg_purple) !important; - color: var(--theme--bg_purple-text) !important; -} -.notion-body.dark - [style*='color:rgb(154,109,215)'] - [style*='background:rgb(68,63,87)'], -.notion-body.dark - [style*='color: rgb(154, 109, 215); fill: rgb(154, 109, 215);'] - [style*='background:rgb(68,63,87)'], -.notion-body:not(.dark) - [style*='color:rgb(105,64,165)'] - [style*='background:rgb(234,228,242)'], -.notion-body:not(.dark) - [style*='color: rgb(105, 64, 165); fill: rgb(105, 64, 165);'] - [style*='background:rgb(234,228,242)'] { - background: var(--theme--bg_purple) !important; - color: var(--theme--text_purple) !important; - fill: var(--theme--text_purple) !important; -} -.notion-body.dark [style*='background: rgb(68, 63, 87)'], -.notion-body:not(.dark) [style*='background: rgb(234, 228, 242)'] { - background: var(--theme--line_purple) !important; - color: var(--theme--line_purple-text) !important; -} -.notion-body.dark [style*='background: rgba(154, 109, 215, 0.5)'], -.notion-body:not(.dark) [style*='background: rgba(103, 36, 222, 0.2)'] { - background: var(--theme--select_purple) !important; - color: var(--theme--select_purple-text) !important; -} -.notion-body.dark [style*='background: rgba(68, 63, 87, 0.3)'], -.notion-body:not(.dark) [style*='background: rgba(234, 228, 242, 0.3)'] { - background: var(--theme--callout_purple) !important; - color: var(--theme--callout_purple-text) !important; -} - -.notion-body.dark [style*='color:rgb(226,85,161)'], -.notion-body.dark [style*='color: rgb(226, 85, 161); fill: rgb(226, 85, 161);'], -.notion-body:not(.dark) [style*='color:rgb(173,26,114)'], -.notion-body:not(.dark) - [style*='color: rgb(173, 26, 114); fill: rgb(173, 26, 114);'] { - color: var(--theme--text_pink) !important; - fill: var(--theme--text_pink) !important; -} -.notion-body.dark [style*='background:rgb(83,59,76)'], -.notion-body:not(.dark) [style*='background:rgb(244,223,235)'] { - background: var(--theme--bg_pink) !important; - color: var(--theme--bg_pink-text) !important; -} -.notion-body.dark - [style*='color:rgb(226,85,161)'] - [style*='background:rgb(83,59,76)'], -.notion-body.dark - [style*='color: rgb(226, 85, 161); fill: rgb(226, 85, 161);'] - [style*='background:rgb(83,59,76)'], -.notion-body:not(.dark) - [style*='color:rgb(173,26,114)'] - [style*='background:rgb(244,223,235)'], -.notion-body:not(.dark) - [style*='color: rgb(173, 26, 114); fill: rgb(173, 26, 114);'] - [style*='background:rgb(244,223,235)'] { - background: var(--theme--bg_pink) !important; - color: var(--theme--text_pink) !important; - fill: var(--theme--text_pink) !important; -} -.notion-body.dark [style*='background: rgb(83, 59, 76)'], -.notion-body:not(.dark) [style*='background: rgb(244, 223, 235)'] { - background: var(--theme--line_pink) !important; - color: var(--theme--line_pink-text) !important; -} -.notion-body.dark [style*='background: rgba(226, 85, 161, 0.5)'], -.notion-body:not(.dark) [style*='background: rgba(221, 0, 129, 0.2)'] { - background: var(--theme--select_pink) !important; - color: var(--theme--select_pink-text) !important; -} -.notion-body.dark [style*='background: rgba(83, 59, 76, 0.3)'], -.notion-body:not(.dark) [style*='background: rgba(244, 223, 235, 0.3)'] { - background: var(--theme--callout_pink) !important; - color: var(--theme--callout_pink-text) !important; -} - -.notion-body.dark [style*='color:rgb(255,115,105)'], -.notion-body.dark - [style*='color: rgb(255, 115, 105); fill: rgb(255, 115, 105);'], -.notion-body:not(.dark) [style*='color:rgb(224,62,62)'], -.notion-body:not(.dark) - [style*='color: rgb(224, 62, 62); fill: rgb(224, 62, 62);'] { - color: var(--theme--text_red) !important; - fill: var(--theme--text_red) !important; -} -.notion-body.dark [style*='background:rgb(89,65,65)'], -.notion-body:not(.dark) [style*='background:rgb(251,228,228)'] { - background: var(--theme--bg_red) !important; - color: var(--theme--bg_red-text) !important; -} -.notion-body.dark - [style*='color:rgb(255,115,105)'] - [style*='background:rgb(89,65,65)'], -.notion-body.dark - [style*='color: rgb(255, 115, 105); fill: rgb(255, 115, 105);'] - [style*='background:rgb(89,65,65)'], -.notion-body:not(.dark) - [style*='color:rgb(224,62,62)'] - [style*='background:rgb(251,228,228)'], -.notion-body:not(.dark) - [style*='color: rgb(224, 62, 62); fill: rgb(224, 62, 62);'] - [style*='background:rgb(251,228,228)'] { - background: var(--theme--bg_red) !important; - color: var(--theme--text_red) !important; - fill: var(--theme--text_red) !important; -} -.notion-body.dark [style*='background: rgb(89, 65, 65)'], -.notion-body:not(.dark) [style*='background: rgb(251, 228, 228)'] { - background: var(--theme--line_red) !important; - color: var(--theme--line_red-text) !important; -} -.notion-body.dark [style*='background: rgba(255, 115, 105, 0.5);'], -.notion-body:not(.dark) [style*='background: rgba(255, 0, 26, 0.2)'] { - background: var(--theme--select_red) !important; - color: var(--theme--select_red-text) !important; -} -.notion-body.dark [style*='background: rgba(89, 65, 65, 0.3)'], -.notion-body:not(.dark) [style*='background: rgba(251, 228, 228, 0.3)'] { - background: var(--theme--callout_red) !important; - color: var(--theme--callout_red-text) !important; -} - -/* fix highlight padding: this isn't a typo */ -[style*='background:rgb('] { - padding-bottom: 3px !important; -} - -/** code **/ - -[style*='color:#EB5757'] { - color: var(--theme--code_inline-text) !important; - background: var(--theme--code_inline-background) !important; -} - -.notion-page-content .notion-code-block { - background: var(--theme--code-background) !important; -} -.notion-code-block > div { - color: var(--theme--code-text) !important; -} -.notion-code-block .token.function { - color: var(--theme--code_function) !important; -} -.notion-code-block .token.parameter { - color: var(--theme--code_parameter) !important; -} -.notion-code-block .token.keyword { - color: var(--theme--code_keyword) !important; -} -.notion-code-block .token.constant { - color: var(--theme--code_constant) !important; -} -.notion-code-block .token.tag { - color: var(--theme--code_tag) !important; -} -.notion-code-block .token.operator { - color: var(--theme--code_operator) !important; -} -.notion-code-block .token.important { - color: var(--theme--code_important) !important; -} -.notion-code-block .token.regex { - color: var(--theme--code_regex) !important; -} -.notion-code-block .token.property { - color: var(--theme--code_property) !important; -} -.notion-code-block .token.builtin { - color: var(--theme--code_builtin) !important; -} -.notion-code-block .token.class-name { - color: var(--theme--code_class-name) !important; -} -.notion-code-block .token.attr-name { - color: var(--theme--code_attr-name) !important; -} -.notion-code-block .token.attr-value { - color: var(--theme--code_attr-value) !important; -} -.notion-code-block .token.selector { - color: var(--theme--code_selector) !important; -} -.notion-code-block .token.id { - color: var(--theme--code_id) !important; -} -.notion-code-block .token.class { - color: var(--theme--code_class) !important; -} -.notion-code-block .token.pseudo-element { - color: var(--theme--code_pseudo-element) !important; -} -.notion-code-block .token.pseudo-class { - color: var(--theme--code_pseudo-class) !important; -} -.notion-code-block .token.attribute { - color: var(--theme--code_attribute) !important; -} -.notion-code-block .token.value { - color: var(--theme--code_value) !important; -} -.notion-code-block .token.unit { - color: var(--theme--code_unit) !important; -} -.notion-code-block .token.comment { - color: var(--theme--code_comment) !important; -} -.notion-code-block .token.punctuation { - color: var(--theme--code_punctuation) !important; -} -.notion-code-block .token.annotation { - color: var(--theme--code_annotation) !important; -} -.notion-code-block .token.decorator { - color: var(--theme--code_decorator) !important; -} -.notion-code-block .token.doctype { - color: var(--theme--code_doctype) !important; -} -.notion-code-block .token.number { - color: var(--theme--code_number) !important; -} -.notion-code-block .token.string { - color: var(--theme--code_string) !important; -} -.notion-code-block .token.boolean { - color: var(--theme--code_boolean) !important; -} diff --git a/repo/core/css/titlebar.css b/repo/core/css/titlebar.css deleted file mode 100644 index 9ab225c..0000000 --- a/repo/core/css/titlebar.css +++ /dev/null @@ -1,48 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * (c) 2020 TarasokUA - * under the MIT license - */ - -@import './buttons.css'; - -.frameless .notion-topbar { - height: calc(var(--configured--dragarea_height, 15px) + 45px) !important; -} -.frameless .window-dragarea { - height: var(--configured--dragarea_height, 15px); - width: 100%; -} -.frameless .window-dragarea { - background: var(--theme--dragarea); -} - -.frameless [style*='top: 10.4972px'] { - top: calc(10.4972px + var(--configured--dragarea_height, 15px)) !important; -} - -@media (max-width: 760px) { - .frameless .notion-topbar { - height: calc(var(--configured--dragarea_height, 15px) + 80px) !important; - } - .frameless .notion-topbar > :nth-child(2) { - height: 80px !important; - display: grid !important; - grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; - } - .window-buttons-area { - grid-row: 1; - grid-column: 9 / span end; - justify-content: flex-end; - } - .notion-topbar-breadcrumb { - grid-row: 2; - grid-column: 1 / span 8; - } - .notion-topbar-actions { - grid-row: 2; - grid-column: 9 / span end; - justify-content: flex-end; - } -} diff --git a/repo/core/enhancerMenu.js b/repo/core/enhancerMenu.js deleted file mode 100644 index 909c251..0000000 --- a/repo/core/enhancerMenu.js +++ /dev/null @@ -1,762 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * under the MIT license - */ - -'use strict'; - -const store = require('../../pkg/store.js'), - { createElement, getEnhancements } = require('../../pkg/helpers.js'), - fs = require('fs-extra'), - path = require('path'), - electron = require('electron'), - { toKeyEvent } = require('keyboardevent-from-electron-accelerator'); - -window['__start'] = async () => { - document.body.setAttribute('data-platform', process.platform); - - // mod loader - const modules = getEnhancements(); - if (modules.loaded.length) { - console.info( - ` enhancements loaded: ${modules.loaded - .map((mod) => mod.name) - .join(', ')}.` - ); - } - if (modules.invalid.length) { - createAlert( - 'error', - `invalid mods found: ${modules.invalid - .map((mod) => `${mod}`) - .join(', ')}.` - ).append(); - } - const coreStore = (...args) => { - const mod = modules.loaded.find( - (m) => m.id === '0f0bf8b6-eae6-4273-b307-8fc43f2ee082' - ); - return !args.length - ? store(mod.id, mod.defaults) - : args.length === 1 && typeof args[0] === 'object' - ? store(mod.id, { ...mod.defaults, ...args[0] }) - : store(args[0], { ...mod.defaults, ...args[1] }); - }; - - electron.ipcRenderer.send('enhancer:get-app-theme'); - electron.ipcRenderer.on('enhancer:set-app-theme', (event, theme) => { - document.body.className = `notion-${theme}-theme`; - }); - - const buttons = require('./buttons.js')(() => ({ - '72886371-dada-49a7-9afc-9f275ecf29d3': { - enabled: (store('mods')['72886371-dada-49a7-9afc-9f275ecf29d3'] || {}) - .enabled, - }, - tiling_mode: coreStore().tiling_mode, - frameless: coreStore().frameless, - })); - document.querySelector('#titlebar').appendChild(buttons.element); - - function createAlert(type, message) { - if (!type) - throw Error(' @ createAlert: no alert type specified'); - const el = createElement(` - - `); - return { - el, - resolve() { - el.remove(); - }, - prepend() { - document.querySelector('#alerts').prepend(el); - return this; - }, - append() { - document.querySelector('#alerts').appendChild(el); - return this; - }, - }; - } - - // update checker - fetch( - `https://api.github.com/repos/notion-enhancer/notion-enhancer/releases/latest` - ) - .then((res) => res.json()) - .then((res) => { - const raw_v = require('./mod.js').version, - version = { - local: raw_v.split(/[~-]/g)[0], - repo: res.tag_name.slice(1), - }; - if (version.local == version.repo) return; - // compare func from https://github.com/substack/semver-compare - version.sorted = [version.local, version.repo].sort((a, b) => { - const pa = a.split('.'), - pb = b.split('.'); - for (let i = 0; i < 3; i++) { - let na = Number(pa[i]), - nb = Number(pb[i]); - if (na > nb) return 1; - if (nb > na) return -1; - if (!isNaN(na) && isNaN(nb)) return 1; - if (isNaN(na) && !isNaN(nb)) return -1; - } - return 0; - }); - createAlert( - 'warning', - version.sorted[0] == version.local - ? `update v${version.repo} available!
- run npm i -g notion-enhancer` - : `local build v${raw_v} is unstable.` - ).prepend(); - }); - - const $popup = document.querySelector('#popup'); - document.addEventListener('keyup', (event) => { - if (event.key === 'F5') location.reload(); - // further-configuration popup - if ( - $popup.classList.contains('visible') && - ['Enter', 'Escape'].includes(event.key) - ) - $popup.classList.remove('visible'); - // close window on hotkey toggle - if (coreStore().menu_toggle) { - const hotkey = { - ctrlKey: false, - metaKey: false, - altKey: false, - shiftKey: false, - ...toKeyEvent(coreStore().menu_toggle), - }; - let triggered = true; - for (let prop in hotkey) - if ( - hotkey[prop] !== event[prop] && - !(prop === 'key' && event[prop] === 'Dead') - ) - triggered = false; - if (triggered || ((event.ctrlKey || event.metaKey) && event.key === 'w')) - electron.remote.getCurrentWindow().close(); - } - // focus search - const meta = - !(event.ctrlKey || event.metaKey) && !event.altKey && !event.shiftKey; - if ( - meta && - document.activeElement.getAttribute('tabindex') === '0' && - event.key === 'Enter' - ) - document.activeElement.click(); - if (document.activeElement.tagName.toLowerCase() === 'input') { - if (document.activeElement.type === 'checkbox' && event.key === 'Enter') - document.activeElement.checked = !document.activeElement.checked; - if ( - ['Escape', 'Enter'].includes(event.key) && - document.activeElement.type !== 'checkbox' && - (document.activeElement.parentElement.id !== 'search' || - event.key === 'Escape') - ) - document.activeElement.blur(); - } else if (meta && event.key === '/') - document.querySelector('#search > input').focus(); - if ( - (event.ctrlKey || event.metaKey) && - event.key === 'f' && - !event.altKey && - !event.shiftKey - ) - document.querySelector('#search > input').focus(); - }); - - let colorpicker_target = null; - const $colorpicker = colorjoe - .rgb('colorpicker') - .on('change', function (color) { - if (!colorpicker_target) return; - colorpicker_target.elem.style.setProperty( - '--configured--color-value', - color.css() - ); - store(colorpicker_target.id)[colorpicker_target.key] = color.css(); - }) - .update(); - document - .querySelector('#colorpicker') - .appendChild(createElement('')); - document.querySelectorAll('#popup .close-modal').forEach((el) => - el.addEventListener('click', (event) => { - $popup.classList.remove('visible'); - }) - ); - - const conflicts = { - relaunch: null, - detected: () => - store('mods', { - conflicts: { dark: false, light: false }, - }).conflicts, - alerts: [], - check() { - document.body.classList.remove('conflict'); - conflicts.alerts.forEach((alert) => alert.resolve()); - conflicts.alerts = []; - const enabled = modules.loaded.filter( - (mod) => - store('mods', { [mod.id]: { enabled: false } })[mod.id].enabled && - mod.tags.includes('theme') - ), - dark = enabled.filter((mod) => mod.tags.includes('dark')), - light = enabled.filter((mod) => mod.tags.includes('light')); - for (let mode of [ - [dark, 'dark'], - [light, 'light'], - ]) { - const conflictID = mode[0] - .map((mod) => mod.id) - .sort() - .join('||'); - if ( - conflicts.detected()[mode[1]] && - conflicts.detected()[mode[1]][0] === conflictID && - conflicts.detected()[mode[1]][1] - ) - continue; - if (mode[0].length > 1) { - document.body.classList.add('conflict'); - conflicts.detected()[mode[1]] = [conflictID, false]; - const alert = createAlert( - 'error', - `conflicting ${mode[1]} themes: ${mode[0] - .map((mod) => `${mod.name}`) - .join( - ', ' - )}.
resolve or dismiss to continue.` - ); - alert.el - .querySelector('[data-action="dismiss"]') - .addEventListener('click', (event) => { - conflicts.detected()[mode[1]] = [conflictID, true]; - conflicts.check(); - }); - alert.append(); - conflicts.alerts.push(alert); - } else conflicts.detected()[mode[1]] = false; - } - search(); - }, - }; - function modified() { - conflicts.check(); - if (conflicts.relaunch) return; - conflicts.relaunch = createAlert( - 'info', - 'changes may not fully apply until app relaunch.' - ); - conflicts.relaunch.el - .querySelector('[data-action="relaunch"]') - .addEventListener('click', (event) => { - electron.remote.app.relaunch(); - electron.remote.app.quit(); - }); - conflicts.relaunch.append(); - } - - const search_filters = { - enabled: true, - disabled: true, - tags: new Set( - modules.loaded - .map((mod) => mod.tags) - .flat() - .sort() - ), - }; - function innerText(elem) { - let text = ''; - for (let $node of elem.childNodes) { - if ($node.nodeType === 3) text += $node.textContent; - if ($node.nodeType === 1) { - if ($node.getAttribute('data-tooltip')) - text += $node.getAttribute('data-tooltip'); - text += ['text', 'number'].includes($node.type) - ? $node.value - : innerText($node); - } - } - return text; - } - function search() { - modules.loaded.forEach((mod) => { - const $search_input = document.querySelector('#search > input'), - conflictingIDs = [conflicts.detected().dark, conflicts.detected().light] - .filter((conflict) => conflict && !conflict[1]) - .map(([mods, dismissed]) => mods.split('||')) - .flat(); - if ( - conflictingIDs.length || - document.body.classList.contains('reorder') - ) { - $search_input.disabled = true; - } else $search_input.disabled = false; - if ( - !document.body.classList.contains('reorder') && - (conflictingIDs.length - ? !conflictingIDs.some((id) => id.includes(mod.id)) - : (mod.elem.classList.contains('enabled') && - !search_filters.enabled) || - (mod.elem.classList.contains('disabled') && - !search_filters.disabled) || - !mod.tags.some((tag) => search_filters.tags.has(tag)) || - ($search_input.value && - !innerText(mod.elem) - .toLowerCase() - .includes($search_input.value.toLowerCase().trim()))) - ) - return (mod.elem.style.display = 'none'); - mod.elem.style.display = 'block'; - }); - } - document.querySelector('#search > input').addEventListener('input', search); - - function createTag(tagname, onclick, color) { - if (!tagname) - throw Error(' @ createTag: no tagname specified'); - if (!onclick) - throw Error(' @ createTag: no action specified'); - const el = createElement( - `${tagname}` - ); - document.querySelector('#tags').append(el); - el.addEventListener('click', (event) => { - if ( - !document.body.classList.contains('reorder') && - !document.body.classList.contains('conflict') - ) { - el.className = el.className === 'selected' ? '' : 'selected'; - onclick(el.className === 'selected'); - } - }); - return el; - } - createTag('enabled', (state) => [ - ((search_filters.enabled = state), search()), - ]); - createTag('disabled', (state) => [ - (search_filters.disabled = state), - search(), - ]); - for (let tag of search_filters.tags) - createTag(`#${tag}`, (state) => [ - state ? search_filters.tags.add(tag) : search_filters.tags.delete(tag), - search(), - ]); - - // mod info + options - function markdown(string) { - const parsed = string - .split('\n') - .map((line) => - line - .trim() - .replace(/\s+/g, ' ') - // > quote - .replace(/^>\s+(.+)$/g, '
$1
') - // ~~strikethrough~~ - .replace(/([^\\])?~~((?:(?!~~).)*[^\\])~~/g, '$1$2') - // __underline__ - .replace(/([^\\])?__((?:(?!__).)*[^\\])__/g, '$1$2') - // **bold** - .replace(/([^\\])?\*\*((?:(?!\*\*).)*[^\\])\*\*/g, '$1$2') - // *italic* - .replace(/([^\\])?\*([^*]*[^\\*])\*/g, '$1$2') - // _italic_ - .replace(/([^\\])?_([^_]*[^\\_])_/g, '$1$2') - // `code` - .replace(/([^\\])?`([^`]*[^\\`])`/g, '$1$2') - // ![image_title](source) - .replace( - /([^\\])?\!\[([^\]]*[^\\\]]?)\]\(([^)]*[^\\)])\)/g, - `$1$2` - ) - // [link](destination) - .replace( - /([^\\])?\[([^\]]*[^\\\]]?)\]\(([^)]*[^\\)])\)/g, - '$1$2' - ) - ) - .map((line) => - line.startsWith('
') ? line : `

${line}

` - ) - .join(''); - return parsed; - } - - const file_icon = await fs.readFile( - path.resolve(`${__dirname}/icons/file.svg`) - ), - question_icon = ( - await fs.readFile(path.resolve(`${__dirname}/icons/question.svg`)) - ).toString(); - function createOption(opt, id) { - let $opt; - const desc = opt.desc - ? question_icon.replace( - ' - - `; - break; - case 'select': - $opt = ` - - - `; - break; - case 'input': - $opt = ` - - - `; - break; - case 'color': - $opt = ` - - - `; - break; - case 'file': - $opt = ` - - - `; - } - $opt = createElement(`

${$opt}

`); - if (opt.type === 'color') { - $opt - .querySelector(`#${opt.type}_${id}--${opt.key}`) - .style.setProperty( - '--configured--color-value', - store(id, { [opt.key]: opt.value })[opt.key] - ); - } else if (opt.type === 'file') { - $opt.querySelector('.clear').addEventListener('click', (event) => { - store(id)[opt.key] = ''; - $opt.querySelector('.path').innerText = 'choose a file...'; - }); - } else { - $opt.querySelector(`#${opt.type}_${id}--${opt.key}`).value = store(id, { - [opt.key]: opt.type === 'select' ? opt.value[0] : opt.value, - })[opt.key]; - } - - return $opt; - } - - const $modules = document.querySelector('#modules'), - fileExists = (file) => fs.pathExistsSync(path.resolve(file)); - - for (let mod of modules.loaded) { - const enabled = - mod.alwaysActive || - store('mods', { - [mod.id]: { enabled: false }, - })[mod.id].enabled, - author = - typeof mod.author === 'object' - ? mod.author - : { - name: mod.author, - link: `https://github.com/${mod.author}`, - avatar: `https://github.com/${mod.author}.png`, - }; - if (enabled) { - for (let sheet of ['menu', 'variables']) { - if (fileExists(`${__dirname}/../${mod.dir}/${sheet}.css`)) { - document.head.appendChild( - createElement( - `` - ) - ); - } - } - } - mod.elem = createElement(` -
-
-

${mod.name}` - : `class="toggle"> - - ` - }

-

${mod.tags - .map((tag) => (tag.startsWith('#') ? tag : `#${tag}`)) - .join(' ')}

-
${markdown(mod.desc)}
-

- - - ${author.name} - - v${mod.version} -

-
- ${ - mod.options && mod.options.length - ? '
' - : '' - } -
- `); - const $enable = mod.elem.querySelector(`#enable_${mod.id}`); - if ($enable) - $enable.addEventListener('click', (event) => { - store('mods', { [mod.id]: { enabled: false } })[mod.id].enabled = - $enable.checked; - mod.elem.className = store('mods', { [mod.id]: { enabled: false } })[ - mod.id - ].enabled - ? 'enabled' - : 'disabled'; - if ( - $enable.checked && - coreStore().autoresolve && - mod.tags.includes('theme') - ) { - modules.loaded.forEach((other) => { - const $other_enable = other.elem.querySelector( - `#enable_${other.id}` - ); - if ( - other !== mod && - $other_enable && - $other_enable.checked && - other.tags.includes('theme') - ) { - for (let mode of ['dark', 'light']) - if (other.tags.includes(mode) && mod.tags.includes(mode)) - $other_enable.click(); - } - }); - } - search(); - modified(); - }); - - const $options = mod.elem.querySelector('.options'); - if ($options) - for (const opt of mod.options) { - if ( - Object.keys(opt.platformOverwrite || {}).some( - (platform) => process.platform === platform - ) - ) { - continue; - } - const $opt = createOption(opt, mod.id); - if (opt.type === 'color') { - const $preview = $opt.querySelector('input'); - $opt.addEventListener('click', (event) => { - colorpicker_target = { - id: mod.id, - key: opt.key, - elem: $preview, - }; - $colorpicker.set(store(mod.id)[opt.key]); - $popup.classList.add('visible'); - }); - } else { - $opt - .querySelector(`#${opt.type}_${mod.id}--${opt.key}`) - .addEventListener('change', (event) => { - modified(); - if (opt.type === 'toggle') { - store(mod.id)[opt.key] = event.target.checked; - } else if (opt.type === 'file') { - if (event.target.files.length) - store(mod.id)[opt.key] = event.target.files[0].path; - $opt.querySelector('.path').innerText = store(mod.id)[opt.key] - ? store(mod.id)[opt.key].split(path.sep).reverse()[0] - : 'choose a file...'; - } else - store(mod.id)[opt.key] = - typeof opt.value === 'number' - ? +event.target.value - : event.target.value; - }); - } - $options.appendChild($opt); - } - if (mod.tags.includes('core')) $modules.append(mod.elem); - } - document - .querySelectorAll('input[type="checkbox"]') - .forEach((checkbox) => - checkbox.addEventListener('click', (event) => event.target.blur()) - ); - conflicts.check(); - - // draggable re-ordering - const draggable = { - state: 0, - tags: ['b', 'span'], - $toggle: document.querySelector('#draggable-toggle'), - list: modules.loaded - .filter((m) => !m.tags.includes('core')) - .map((m) => m.elem), - target: null, - render() { - draggable.target = null; - for (let $node of draggable.list) { - $node.draggable = false; - $modules.append($node); - } - }, - mouseover(event) { - if (!draggable.target && event.target.innerText) { - for (let $node of draggable.list) $node.draggable = false; - const $node = draggable.list.find( - (node) => node.innerText === event.target.innerText - ); - if ($node) $node.draggable = draggable.state; - } - }, - }; - document.addEventListener('dragstart', (event) => { - draggable.target = event.target; - event.target.style.opacity = 0.5; - }); - document.addEventListener('dragend', (event) => { - event.target.style.opacity = ''; - }); - document.addEventListener('dragover', (event) => { - event.preventDefault(); - document - .querySelectorAll('.dragged-over') - .forEach((el) => el.classList.remove('dragged-over')); - const $node = [ - draggable.list[0].previousElementSibling, - ...draggable.list, - ].find((node) => node.innerText === event.target.innerText); - if ($node) $node.classList.add('dragged-over'); - }); - document.addEventListener('drop', (event) => { - event.preventDefault(); - document - .querySelectorAll('.dragged-over') - .forEach((el) => el.classList.remove('dragged-over')); - if ( - draggable.target && - draggable.target.innerText !== event.target.innerText - ) { - const from = draggable.list.findIndex( - (node) => node.innerText === draggable.target.innerText - ), - to = - event.target.innerText === - draggable.list[0].previousElementSibling.innerText - ? 0 - : draggable.list.findIndex( - (node) => node.innerText === event.target.innerText - ) + 1; - if (to >= 0) { - draggable.list.splice( - to > from ? to - 1 : to, - 0, - draggable.list.splice(from, 1)[0] - ); - store('mods').priority = draggable.list.map((m) => m.id); - } - } - draggable.render(); - modified(); - }); - document.addEventListener('mouseover', draggable.mouseover); - draggable.render(); - draggable.$toggle.addEventListener('click', (event) => { - draggable.state = !draggable.state; - draggable.tags = draggable.tags.reverse(); - draggable.$toggle.innerHTML = ` - <${draggable.tags[0]} data-bolded="configure">configure | - <${draggable.tags[1]} data-bolded="reorder">reorder - `; - document.body.classList[draggable.state ? 'add' : 'remove']('reorder'); - $modules - .querySelectorAll('input') - .forEach((input) => (input.disabled = draggable.state)); - search(); - }); - - const $tooltip = document.querySelector('#tooltip'); - document.querySelectorAll('[data-tooltip]').forEach((el) => { - el.addEventListener('mouseenter', (e) => { - $tooltip.innerText = el.getAttribute('data-tooltip'); - $tooltip.classList.add('active'); - }); - el.addEventListener('mouseover', (e) => { - $tooltip.style.top = e.clientY - $tooltip.clientHeight + 'px'; - $tooltip.style.left = - e.clientX < window.innerWidth / 2 ? e.clientX + 'px' : ''; - $tooltip.style.right = - e.clientX > window.innerWidth / 2 - ? window.innerWidth - e.clientX + 'px' - : ''; - }); - el.addEventListener('mouseleave', (e) => - $tooltip.classList.remove('active') - ); - }); -}; diff --git a/repo/core/icons/alwaysontop_off.svg b/repo/core/icons/alwaysontop_off.svg deleted file mode 100644 index 96afcf0..0000000 --- a/repo/core/icons/alwaysontop_off.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/repo/core/icons/alwaysontop_on.svg b/repo/core/icons/alwaysontop_on.svg deleted file mode 100644 index 3fec5d5..0000000 --- a/repo/core/icons/alwaysontop_on.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/repo/core/icons/close.svg b/repo/core/icons/close.svg deleted file mode 100644 index 7268fb0..0000000 --- a/repo/core/icons/close.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/repo/core/icons/file.svg b/repo/core/icons/file.svg deleted file mode 100644 index 81c387e..0000000 --- a/repo/core/icons/file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/repo/core/icons/mac+linux.png b/repo/core/icons/mac+linux.png deleted file mode 100644 index 3a7708f539f0bd34da5c4acabc2f47fec0932f49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8295 zcmZ`7$Fe?``CJwawZC@A=3|0$>_`7kOJ6h?P-ppv2g##v#2jp6d$7-OPsA~Bj> zI1aRIAFXWHfG-ZzM(Ty##!_NjS5Ka1zG+5I!e8LbZ)!%Km=Ml2nQFwZ%ETPS7R8Ql zHetWRF~!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q5eH;2H}aHH)X;P$3eR<_shtu6T1l0GQgo2X)yYI?C1r z?O-)>T)1B84qgclhvv3ek>1~|_REw>7KMvh_y37_g<1|0tBPdz1VkNA!zr>anXRwo z7GT3ApVzZP>!VEi#6QbKxro}Y-n*YB-%^;m7Yg-$&*x}%CXpl^DHYjqc(lM? zxY+{qhcgl)Cc`cJYRf7v92&Kj@<&3Gy-BOK4g50-I&hwL2O6XRL0y{o5s0uBgKpUEqfdeD-lr@n7zV<2o#5YmvT*R>4Wxvho&bE z{+^nR2LByJPqO6#9OJxay)^MMxO81{;btu)1Kx=4w8WZ?n;@WmvupAG?kjJ#DAZf zDMl82%kvhAKSJ5LqUJU0cPly!9TiPyzP \ No newline at end of file diff --git a/repo/core/icons/maximize_on.svg b/repo/core/icons/maximize_on.svg deleted file mode 100644 index af77a3e..0000000 --- a/repo/core/icons/maximize_on.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/repo/core/icons/minimize.svg b/repo/core/icons/minimize.svg deleted file mode 100644 index d179e14..0000000 --- a/repo/core/icons/minimize.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/repo/core/icons/question.svg b/repo/core/icons/question.svg deleted file mode 100644 index 3389568..0000000 --- a/repo/core/icons/question.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/repo/core/icons/user.png b/repo/core/icons/user.png deleted file mode 100644 index 252c20d3a5394add646d31042401691dddc00d11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 324 zcmeAS@N?(olHy`uVBq!ia0vp^mq3`28A!5*^DqJ_mUKs7M+SzC{oH>NS%G|oWRD45bDP46hOx7_4S6Fo+k-*%fF5lwb?+332`Z|9{Vo{!Z=( zAQ8qSZ+91l4pvzYAcwug)7O>#35PVVsKl*|)+(TowWo_?NW|f{ClB&A81S%c@Zh-= zDmjz0s>U&iLFi_DxZ#0Qho8=QU3b97ebStBJKs&$zis(^PI0|O#ZJbblaju!D*Cn@ zXpCx!YeY#(Vo9o1a#1RfVlXl=GSD@!&^0m-F*LR^GO#i+&^9ozGBCIxt?7oMAvZrI YGp!Q0hJ|huL4IcNboFyt=akR{07zC~o&W#< diff --git a/repo/core/icons/windows.ico b/repo/core/icons/windows.ico deleted file mode 100644 index 3f8a1c7a3d7f63b62564fcc5cdbdb992829fc193..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 285478 zcmeI53Ai0avBxinfQTU?Ld3izBAbAK2ob^(WHSN+vdO;562f8xgn&RoL_{_rK-j|; zAOvKIfDvO7BAW<^h^P^BBO(tG5qUo3@p#Vr|2n4*eJ8V@Im^9w`upnioaw!%tGc?n zy1J`tiLRx(1`h0!Kdfu?Qe9m;baizN8@A~GG`+t|?>5}9_J578uDw612y(<5iGgnlEDW*_`%@gAOCo;&N}M^n{K*kFlyAO;45GG zN^sOsM+K*xa!T-%pZp|HnhCY^7uf|p);DK@5cagfR+m4H zG0u0Q&IcZNV6fwkI|d_0j0lDgAMODB898!fu>JPi2fzRQ@84CLbCq`48tyEq=N*`v#!Xi2| zOewY&K!5T&)d@QCw0!EP$KVaY!dhMVzBBZHs$jC<9Kp$g(Sm&hqXe5O&f4-<6)Z1U zO0Z;>dMMsu0ynN+eDTGgySv-b4se8Vn#WOh0d06o>0XonqL^ z@TD(($&D$+b2M<7WtIsB4jdQ^88XC;)2+7J%Ej4lzx{%vk3KpWH*TC8n~YJ$D)jNO z#~yQI@8y?Y4*u)E{>#;$I?2rx^ym-$UrAvv5Ptme$Gftj+eu^BjY-fF-XTHyUlug|!m$K%}nG^i?fB$y?{Rh9Fe)?(m4qTl&b!sqq^5oz< z-}#PfJAFW3?6lKP!RDK99;~_UVG)*T4RCu>A7N zyRw&Fdg;YzG~Zu%W9dnf>Sz;bpx4v^T&}r^lutkC|GUg@%!|YUtbEer$OBr%cjjC2 z-Us5?f1Yvv{~!PO$BUJ(D9b92`{vBUR(802@_}YEe-p-BZM4kFNb~*jYjG#4{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El0~%{S-599J@!fmy@LiqBk6;~<%9SA z=B!>HL4m3nIeS23-0>P3^U#dCT%$JrSJQi2qre02EjUu|#>!_uWs-d4p%3U8xdw7j zaL8x{G{OM>!gvg$7w_twqLk;dIg^m%(6)#$8xpp$z*ILO&B=H4~sgOl(Z2MEUM|3vwd z{CiO_zfrjdZ@(8F8N(I-UYy19nEPJXqNnjaqf7{gcXjoMv3RiFtWeLxtG*wz9^qa8 zt@msh^k|+JKC~7gF5J2^)ckr5OVrXYtiK68)WYY6Uf2JQTohqK{YB_uXi9jk2STad z`@5(CG2N$V?{oRbbzfK4q6Vgg$910yaQVk|pM@{fLyQ|w1`A^X_1cBcjSnA5`UxrF z@xfiBkMF*&uAv#i@TBg^6235{{&Q2pCo~wIlw9>s>^_AjcAvr%yDvj{V)rWj!j$@_h0je%pB6qL zC4FMB>fc~^^5^MVAuT-l^L4GzXn6AH?^>bR;mO0NYlSL2aR65Rlh{4g_^I$Gae!3# zlh{2K{#5vrI6x}=N$j2qe=7V*93U0`Bz8}QKNbEY4v-3e61%6@Rse_(kEdA8=7{><3!3^%mcOwd%+2UJb3~AJ@Q< z79LYU3y#@9sP!(fB74xP9~Yt4yNgPR7(_!Ch1l<6!*INXm>)t^d+qrXyf5ijuO7v# lMvv;%BfR&qN51#2=hMPPh4g&c;~&+C$$n8hwe`IO{|^rTKWYE~ diff --git a/repo/core/menu.css b/repo/core/menu.css deleted file mode 100644 index 412c901..0000000 --- a/repo/core/menu.css +++ /dev/null @@ -1,655 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * (c) 2020 admiraldus (https://github.com/admiraldus) - * under the MIT license - */ - -@import './css/buttons.css'; -@import './css/scrollbars.css'; - -@keyframes spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@keyframes fade { - from { - opacity: 0; - } - to { - opacity: 1; - } -} - -* { - box-sizing: border-box; - word-break: break-word; - text-decoration: none; - text-size-adjust: 100%; - font-family: var(--theme--font_sans); - outline-color: var(--theme--table-border); -} -html, -body { - width: 100%; - height: 100%; - margin: 0; - padding: 0; - display: block; - overflow: hidden; - background: var(--theme--main); - color: var(--theme--text); -} - -main { - padding: 1em 1em 2.9em 1em; - height: 100%; - overflow: auto; -} -main section { - border-radius: 2px; - margin-bottom: 0.75em; -} - -/* inline formatting */ - -code { - border-radius: 0.1em; - padding: 0.2em 0.4em; - font: 0.85em var(--theme--font_code); - background: var(--theme--code_inline-background); -} - -button { - color: var(--theme--text); -} - -u { - text-decoration: underline; -} -s { - text-decoration: line-through; -} - -/* titlebar */ - -#titlebar::before { - content: ''; - position: absolute; - width: 100%; - -webkit-app-region: no-drag; - top: 0; - left: 0; - height: 2px; -} - -#titlebar { - display: flex; - -webkit-app-region: drag; - background: var(--theme--dragarea); -} -#titlebar button { - -webkit-app-region: no-drag; -} -#titlebar .window-buttons-area { - margin: 0.4em 0.4em 0.4em auto; -} -#titlebar .window-buttons-area:empty { - display: none; -} -[data-platform='darwin'] #titlebar { - height: 2.65em; -} - -/* alerts */ - -#alerts [role='alert'] { - display: flex; - padding: 0.75em; - background: var(--theme--interactive_hover); - border: 1px solid var(--theme--interactive_hover-border); -} -#alerts [role='alert']::before { - content: '!'; - display: block; - /* margin: auto 0; */ - font-weight: bold; - font-size: 1.2em; - padding-right: 0.5rem; - color: var(--theme--interactive_hover-border); -} -#alerts [role='alert'] p { - font-size: 1rem; - margin: auto 0; - padding-left: 0.5em; - color: var(--theme--line_text); -} - -#alerts .error::before { - color: var(--theme--select_red); -} -#alerts .error { - color: var(--theme--line_red-text); - background: var(--theme--line_red); - border-color: var(--theme--select_red); -} -#alerts .warning::before { - color: var(--theme--select_yellow); -} -#alerts .warning { - color: var(--theme--line_yellow-text); - background: var(--theme--line_yellow); - border-color: var(--theme--select_yellow); -} -#alerts .info::before { - color: var(--theme--select_blue); -} -#alerts .info { - color: var(--theme--line_blue-text); - background: var(--theme--line_blue); - border-color: var(--theme--select_blue); -} -#alerts .success::before { - content: '✓'; - color: var(--theme--select_green); -} -#alerts .success { - color: var(--theme--line_green-text); - background: var(--theme--line_green); - border-color: var(--theme--select_green); -} - -#alerts code { - background: transparent; - text-decoration: underline; -} - -[data-action] { - text-decoration: underline dotted; - cursor: pointer; -} - -/* search */ - -#search { - position: relative; - margin-bottom: 0.75em; -} - -#search > svg { - position: absolute; - width: 1em; - height: 1em; - top: 1.3em; - left: 1em; -} -#search > svg path { - fill: var(--theme--text_ui_info); -} -#search > input { - width: 100%; - padding: 1em 1.4em 1em 2.8em; - font: 1em var(--theme--font_sans); - background: var(--theme--card); - border: 1px solid var(--theme--table-border); - color: var(--theme--text); - border-radius: 2px; -} -#search > input::placeholder { - font-weight: bold; - color: var(--theme--text_ui_info); -} -#search > input:focus { - box-shadow: var(--theme--table-border) 0.04em 0.04em, - var(--theme--table-border) -0.04em -0.04em, - var(--theme--table-border) -0.04em 0.04em, - var(--theme--table-border) 0.04em -0.04em; - outline: none; -} - -#search #tags > span { - cursor: pointer; - display: inline-block; - font-size: 0.8em; - padding: 0.2em 0.5em; - margin-top: 0.5em; - background: var(--theme--option-background); - color: var(--theme--option-color); - border-radius: 2px; - transition: color 200ms, background 200ms, opacity 200ms; - user-select: none; -} -#search #tags > span:not(:last-child) { - margin-right: 0.5em; -} -#search #tags > span:hover { - background: var(--theme--option_hover-background); - color: var(--theme--option_hover-color); -} -#search #tags > span::before { - content: '× '; -} -#search #tags > .selected { - background: var(--tag_color, var(--theme--option_active-background)); - color: var(--theme--option_active-color); -} -#search #tags > .selected::before { - content: '✓ '; -} - -/* module meta */ - -#modules { - position: relative; -} -#modules section { - background: var(--theme--sidebar); - border: 1px solid var(--theme--table-border); -} -#modules section > div { - padding: 0.75em; -} -.notion-light-theme #modules section { - background: var(--theme--main); -} - -#modules section h3, -#modules section p { - margin: 0; - font-size: 1rem; -} - -#modules section .desc { - margin: 0.3em 0 0.4em 0; - font-size: 0.9em; -} -#modules section .desc p { - font-size: inherit; - margin: 0; -} -#modules section .desc blockquote { - margin: 0.3em 0; - border-left: 0.3em solid var(--theme--table-border); - padding-left: 0.7em; -} - -#modules section .desc a { - color: currentColor; - text-decoration: underline dotted; -} - -#modules section .desc img { - width: 100%; - max-width: 20em; - margin: 0.5em 0; -} -#modules section .desc :first-child img:first-child { - margin-top: 0; -} -#modules section .desc :last-child img:last-child { - margin-bottom: 0; -} - -#modules section .author { - color: currentColor; -} -#modules section .author img { - height: 1em; - width: 1em; - margin-bottom: 0.15625em; - display: inline-block; - vertical-align: middle; - border-radius: 50%; - object-fit: cover; -} -#modules section .tags, -#modules section .version { - font-size: 0.85em; - color: var(--theme--text_ui); -} - -/* module options */ - -#modules .disabled .options { - display: none; -} -#modules section .options { - border-top: 1px solid var(--theme--table-border); - background: var(--theme--card); -} -#modules section .options p { - font-size: 0.9em; -} -#modules section .options p:not(:last-child) { - padding-bottom: 0.5em; - border-bottom: 0.5px solid var(--theme--table-border); - margin-bottom: 0.5em; -} - -svg[data-tooltip] { - height: 1em; - width: 1em; - margin: 0 0 -2px 1px; - color: var(--theme--text_ui_info); -} -#tooltip { - pointer-events: none; - position: absolute; - padding: 0.25em 0.5em 0.5em 0.5em; - margin: 0 1em; - border-radius: 3px; - box-shadow: var(--theme--box-shadow_strong); - border-right-width: 1px; - font-size: calc(var(--theme--font_label-size) * 0.8); - background: var(--theme--interactive_hover); - opacity: 0; - transition: opacity 120ms ease-in; -} -#tooltip.active { - opacity: 1; -} - -.toggle *, -.input *, -.select *, -.color *, -.file * { - cursor: pointer; -} -.select select, -.input input[type='text'], -.input input[type='number'], -.file input[type='file'] + label .choose { - width: 100%; - margin: 0.25em 0; - font-size: 0.9rem; - padding: 0.4rem 0.2rem; - border: none; - color: var(--theme--text); - background: var(--theme--main); -} -.select select:focus, -.input input[type='text']:focus, -.input input[type='number']:focus, -.file input[type='file']:focus + label .choose, -.file input[type='file'] + label .choose:hover { - outline: var(--theme--table-border) solid 2px; -} -.file input[type='file'], -.toggle input[type='checkbox'] { - opacity: 0; - width: 0.1px; - height: 0.1px; - position: fixed; -} - -.input input[type='text'], -.input input[type='number'] { - padding: 0.4rem; - cursor: text; -} - -.file input[type='file'] + label .label { - position: relative; - display: flex; -} -.file input[type='file'] + label .label .name { - flex-basis: calc(100% - 1.5rem); -} -.file input[type='file'] + label .label .clear { - font-size: 1rem; - position: absolute; - top: 0.4em; - right: 0; - width: 1em; - height: 0.1em; - border: 0.35em solid var(--theme--card); - background: currentColor; -} -.file input[type='file'] + label .choose { - display: block; - white-space: nowrap; - overflow: hidden; -} -.file input[type='file'] + label .choose svg { - padding-top: 0.5em; - height: 1.25em; - width: 1.25em; -} - -.toggle input[type='checkbox'] + label { - display: flex; - --menu--toggle_bg: rgba(135, 131, 120, 0.3); -} -.toggle input[type='checkbox'] + label .name { - flex-basis: calc(100% - 2.25em); - margin-right: 0.75em; -} -.toggle input[type='checkbox'] + label .switch { - position: relative; - top: 0.2em; - float: right; - height: 1em; - width: 1.85em; - padding: 0.1em; - background: var(--menu--toggle_bg); - border-radius: 3.14em; - transition: background 300ms; -} -.toggle input[type='checkbox'] + label .switch::before { - content: ''; - display: block; - width: 0.8em; - height: 0.8em; - border-radius: 50%; - transform: translateX(var(--menu--toggle_offset, 0)); - transition: transform 350ms, box-shadow 350ms; - background: var(--theme--option_active-color); - /* box-shadow: 2px 1px 4px var(--theme--table-border); */ -} - -.toggle input[type='checkbox']:checked + label { - --menu--toggle_offset: 0.8em; - --menu--toggle_bg: var(--theme--primary); -} - -.color { - display: flex; -} -.color label { - flex-basis: 70%; -} -.color input[type='button'] { - flex-basis: 30%; - box-shadow: 2px 1px 4px var(--theme--table-border); - border: 1px solid var(--theme--option_active-color); - border-radius: 3px; - background: var(--configured--color-value); - margin: 0; -} -.color input[type='button']:focus { - box-shadow: 3px 2px 5px var(--theme--table-border); -} - -/* further-configuration popup */ - -#popup, -#popup-overlay { - position: absolute; - top: 0; - height: 100vh; - width: 100vw; -} -#popup { - display: none; -} -#popup.visible { - display: flex; - animation: fade 200ms ease; -} -#popup-overlay { - background: var(--theme--overlay); -} - -.colorPicker { - margin: auto; - position: relative; - border: 1px solid var(--theme--table-border); - background: var(--theme--card); -} - -.colorPicker .twod { - border-radius: 4px; -} -.colorPicker .twod .bg { - border-radius: 2px; -} -.colorPicker .oned, -.colorPicker .oned .bg { - margin-left: 0; - height: 212.5px; -} -.colorPicker .oned .bg { - border-radius: 4px; - border: 1px solid var(--theme--table-border); -} -.colorPicker > button { - display: block; - position: absolute; - bottom: 8px; - right: 8px; - margin: 0; - padding: 0; - border: none; - width: 21px; - height: 20px; - cursor: pointer; - background: transparent; - transition: background 0.2s; -} -.colorPicker > button::after { - content: '×'; - font-size: 1.5em; - position: relative; - bottom: 5px; -} -.colorPicker > button:hover { - background: var(--theme--interactive_hover); - border-radius: 4px; - box-shadow: 0 0 0 0.5px var(--theme--interactive_hover-border); -} -.colorPicker > button:focus { - outline: none; - box-shadow: 0 0 0 1px var(--theme--table-border); -} -.colorPicker .twod .pointer .shape.shape1 { - width: 11px; - height: 11px; -} -.colorPicker .twod .pointer .shape.shape2 { - width: 9px; - height: 9px; -} -.colorPicker .oned .pointer .shape { - height: 6.5px; - margin-left: 0; - border: 2px solid #fff; - box-shadow: 0 0 0 1px #000; -} -.shape { - cursor: pointer; -} - -@media (max-width: 300px) { - .colorPicker .twod, - .colorPicker .twod .bg { - width: 200px; - height: 200px; - } - .colorPicker .oned, - .colorPicker .oned .bg { - height: 172.5px; - } -} -@media (max-width: 250px) { - .colorPicker .twod, - .colorPicker .twod .bg { - width: 150px; - height: 150px; - } - .colorPicker .oned, - .colorPicker .oned .bg { - height: 132.5px; - } -} - -/* draggable re-ordering of mods */ - -#draggable-toggle { - background: none; - border: none; - margin-top: 0.8em; - padding-left: 0; - cursor: pointer; - color: var(--theme--text_ui); -} - -[data-bolded] { - display: inline-flex; - flex-direction: column; -} -[data-bolded]::after { - content: attr(data-bolded); - height: 0; - visibility: hidden; - overflow: hidden; - user-select: none; - pointer-events: none; - font-weight: bold; -} - -.reorder #search #tags > span, -.reorder #search #tags > span:hover, -.conflict #search #tags > span, -.conflict #search #tags > span:hover { - opacity: 0.7; - background: var(--theme--option-background); -} -.reorder #search #tags > .selected, -.reorder #search #tags > .selected:hover, -.conflict #search #tags > .selected, -.conflict #search #tags > .selected:hover { - background: var(--tag_color, var(--theme--option_active-background)); -} - -.reorder #modules .dragged-over::after { - content: ''; - height: 0.25em; - width: 99%; - position: absolute; - margin: 0.3em 0; - opacity: 0.7; - background: var(--theme--selected); -} - -.reorder #modules .switch, -.reorder #modules .tags, -.reorder #modules .desc, -.reorder #modules .options, -.reorder #modules .author, -.reorder #modules .version { - display: none; -} -.reorder #modules .core .toggle * { - cursor: text; -} -.reorder #modules section:not(.core) label::before { - content: '::'; - margin-right: 0.4em; - color: var(--theme--text_ui); -} diff --git a/repo/core/menu.html b/repo/core/menu.html deleted file mode 100644 index 8369d30..0000000 --- a/repo/core/menu.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - notion-enhancer menu - - - - - -
-
-
- -
-
- - - - - diff --git a/repo/core/mod.js b/repo/core/mod.js deleted file mode 100644 index f38e99f..0000000 --- a/repo/core/mod.js +++ /dev/null @@ -1,103 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * under the MIT license - */ - -'use strict'; - -module.exports = { - id: '0f0bf8b6-eae6-4273-b307-8fc43f2ee082', - alwaysActive: true, - tags: ['core'], - name: 'notion-enhancer core', - desc: 'the cli, modloader, menu, & tray.', - version: require('../../package.json').version, - author: 'dragonwocky', - options: [ - { - key: 'autoresolve', - label: 'auto-resolve theme conflicts', - desc: - 'when a theme is enabled any other themes of the same mode (light/dark) will be disabled.', - type: 'toggle', - value: false, - }, - { - key: 'openhidden', - label: 'hide app on open', - desc: - 'app can be made visible by clicking the tray icon or using the hotkey.', - type: 'toggle', - value: false, - }, - { - key: 'maximized', - label: 'auto-maximise windows', - desc: - 'whenever a window is un-hidden or is created it will be maximised.', - type: 'toggle', - value: false, - }, - { - key: 'close_to_tray', - label: 'close window to the tray', - desc: `pressing the × close button will hide the app instead of quitting it.\ - it can be re-shown by clicking the tray icon or using the hotkey.`, - type: 'toggle', - value: true, - platformOverwrite: { - darwin: true, - }, - }, - { - key: 'frameless', - label: 'integrated titlebar', - desc: `replace the native titlebar with buttons inset into the app.`, - type: 'toggle', - value: true, - platformOverwrite: { - darwin: false, - }, - }, - { - key: 'tiling_mode', - label: 'tiling window manager mode', - desc: `completely remove the close/minimise/maximise buttons - - this is for a special type of window manager. if you don't understand it, don't use it.`, - type: 'toggle', - value: false, - }, - { - key: 'hotkey', - label: 'window display hotkey:', - desc: 'used to toggle hiding/showing all app windows.', - type: 'input', - value: 'CommandOrControl+Shift+A', - }, - { - key: 'menu_toggle', - label: 'open enhancements menu hotkey:', - desc: 'used to toggle opening/closing this menu while notion is focused.', - type: 'input', - value: 'Alt+E', - }, - { - key: 'default_page', - label: 'default page id/url:', - desc: `every new tab/window that isn't opening a url via the notion://\ - protocol will load this page. to get a page link from within the app,\ - go to the triple-dot menu and click "copy link".\ - leave blank to just load the last page you opened.`, - type: 'input', - value: '', - }, - ], - hacks: { - 'main/main.js': require('./tray.js'), - 'main/systemMenu.js': require('./systemMenu.js'), - 'main/createWindow.js': require('./createWindow.js'), - 'renderer/index.js': require('./render.js'), - 'renderer/preload.js': require('./client.js'), - }, -}; diff --git a/repo/core/render.js b/repo/core/render.js deleted file mode 100644 index cfc1857..0000000 --- a/repo/core/render.js +++ /dev/null @@ -1,1066 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * under the MIT license - */ - -'use strict'; - -const url = require('url'), - path = require('path'), - electron = require('electron'), - fs = require('fs-extra'), - { - getNotionResources, - getEnhancements, - createElement, - } = require('../../pkg/helpers.js'), - __notion = getNotionResources(), - config = require(`${__notion}/app/config.js`), - constants = require(`${__notion}/app/shared/constants.js`), - notion_intl = require(`${__notion}/app/shared/notion-intl/index.js`), - notionIpc = require(`${__notion}/app/helpers/notionIpc.js`), - localizationHelper = require(`${__notion}/app/helpers/localizationHelper.js`), - koMessages = require(`${__notion}/app/i18n/ko_KR/messages.json`), - schemeHelpers = require(`${__notion}/app/shared/schemeHelpers.js`), - React = require(`${__notion}/app/node_modules/react/index.js`), - ReactDOM = require(`${__notion}/app/node_modules/react-dom/index.js`), - { toKeyEvent } = require('keyboardevent-from-electron-accelerator'); - -const insertCSP = `{ - const csp = document.createElement('meta'); - csp.httpEquiv = 'Content-Security-Policy'; - csp.content = "script-src 'self' 'unsafe-inline' 'unsafe-eval' enhancement: https://gist.github.com https://apis.google.com https://api.amplitude.com https://widget.intercom.io https://js.intercomcdn.com https://logs-01.loggly.com https://cdn.segment.com https://analytics.pgncs.notion.so https://checkout.stripe.com https://embed.typeform.com https://admin.typeform.com https://platform.twitter.com https://cdn.syndication.twimg.com; connect-src 'self' https://msgstore.www.notion.so wss://msgstore.www.notion.so https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com https: http: https://api.amplitude.com https://api.embed.ly https://js.intercomcdn.com https://api-iam.intercom.io wss://nexus-websocket-a.intercom.io https://logs-01.loggly.com https://api.segment.io https://api.pgncs.notion.so https://checkout.stripe.com https://cdn.contentful.com https://preview.contentful.com https://images.ctfassets.net https://api.unsplash.com https://boards-api.greenhouse.io; font-src 'self' data: enhancement: https: http:; img-src 'self' data: blob: https: https://platform.twitter.com https://syndication.twitter.com https://pbs.twimg.com https://ton.twimg.com; style-src 'self' 'unsafe-inline' enhancement: https: http:; frame-src https: http:; media-src https: http:"; - document.head.appendChild(csp); -}`, - idToNotionURL = (id) => - `notion://www.notion.so/${ - url.parse(id).pathname.split('/').reverse()[0] || '' - }/${url.parse(id).search || ''}`; - -module.exports = (store, __exports) => { - if ((store('mods')['e1692c29-475e-437b-b7ff-3eee872e1a42'] || {}).enabled) { - class Index extends React.PureComponent { - constructor() { - super(...arguments); - this.state = { - error: false, - searching: false, - searchingPeekView: false, - zoomFactor: 1, - tabs: new Map([[0, { title: 'notion.so', open: true }]]), - slideIn: new Set(), - slideOut: new Set(), - }; - this.$titlebar = null; - this.$dragging = null; - this.views = { - active: null, - current: { - $el: () => this.views.html[this.views.current.id], - id: 0, - }, - react: {}, - html: {}, - loaded: {}, - tabs: {}, - }; - this.$search = null; - this.handleReload = () => { - this.setState({ error: false }); - Object.values(this.views.html).forEach(($notion) => { - if ($notion.isWaitingForResponse()) $notion.reload(); - }); - }; - this.communicateWithView = this.communicateWithView.bind(this); - this.startSearch = this.startSearch.bind(this); - this.stopSearch = this.stopSearch.bind(this); - this.nextSearch = this.nextSearch.bind(this); - this.prevSearch = this.prevSearch.bind(this); - this.clearSearch = this.clearSearch.bind(this); - this.doneSearch = this.doneSearch.bind(this); - - // draggable re-ordering - const getTab = ($el) => { - if ($el.tagName !== 'BUTTON') $el = $el.parentElement; - if ($el.innerText === '+') - return [null, document.querySelector('.tab.new')]; - const tab = Object.entries(this.views.tabs).find( - ([id, $node]) => $node === $el - ); - return tab ? [+tab[0], tab[1]] : []; - }; - document.addEventListener('dragstart', (event) => { - if (!this.$titlebar) return; - const tab = getTab(event.target); - this.$dragging = tab[0]; - event.dataTransfer.setData( - 'text', - JSON.stringify({ - target: electron.remote.getCurrentWindow().webContents.id, - tab: tab[0], - title: tab[1].children[0].innerText, - url: document.getElementById(getTab(event.target)[0]).src, - }) - ); - event.target.style.opacity = 0.5; - }); - document.addEventListener('dragend', (event) => { - if (!this.$titlebar) return; - event.target.style.opacity = ''; - document - .querySelectorAll('.dragged-over') - .forEach((el) => el.classList.remove('dragged-over')); - }); - document.addEventListener('dragover', (event) => { - if (!this.$titlebar) return; - event.preventDefault(); - document - .querySelectorAll('.dragged-over') - .forEach((el) => el.classList.remove('dragged-over')); - const tab = getTab(event.target)[1]; - if (tab) tab.classList.add('dragged-over'); - }); - document.addEventListener('drop', async (event) => { - event.preventDefault(); - const eventData = JSON.parse(event.dataTransfer.getData('text')); - if ( - eventData.target !== - electron.remote.getCurrentWindow().webContents.id - ) { - electron.ipcRenderer.send( - 'enhancer:close-tab', - eventData.target, - eventData.tab - ); - this.$dragging = await this.newTab( - eventData.url, - eventData.title, - false - ); - } - if (this.$titlebar) { - const from = getTab(this.views.tabs[+this.$dragging]), - to = getTab(event.target); - if (from[0] !== to[0]) { - if (to[1].classList.contains('new')) { - const list = new Map(this.state.tabs); - list.delete(from[0]); - list.set(from[0], this.state.tabs.get(from[0])); - this.setState({ tabs: list }); - } else { - const list = [...this.state.tabs], - fromIndex = list.findIndex( - ([id, { title, open }]) => id === from[0] - ), - toIndex = list.findIndex( - ([id, { title, open }]) => id === to[0] - ); - list.splice( - toIndex > fromIndex ? toIndex - 1 : toIndex, - 0, - list.splice(fromIndex, 1)[0] - ); - this.setState({ tabs: new Map(list) }); - } - } - this.$dragging = null; - } - }); - electron.ipcRenderer.on('enhancer:close-tab', (event, tab) => { - this.closeTab(tab); - }); - } - - componentDidMount() { - const buttons = require('./buttons.js')(store); - this.$titlebar.appendChild(buttons.element); - this.loadListeners(); - - let electronWindow; - try { - electronWindow = electron.remote.getCurrentWindow(); - } catch (error) { - notionIpc.sendToMain('notion:log-error', { - level: 'error', - from: 'index', - type: 'GetCurrentWindowError', - error: error.message, - }); - } - if (!electronWindow) { - this.setState({ error: true }); - this.handleReload(); - return; - } - electronWindow.addListener('app-command', (e, cmd) => { - if (cmd === 'browser-backward' && webContents.canGoBack()) { - this.views.current.$el().goBack(); - } else if (cmd === 'browser-forward' && webContents.canGoForward()) { - this.views.current.$el().goForward(); - } - }); - electronWindow.addListener('swipe', (e, dir) => { - if (dir === 'left' && webContents.canGoBack()) { - this.views.current.$el().goBack(); - } else if (dir === 'right' && webContents.canGoForward()) { - this.views.current.$el().goForward(); - } - }); - electronWindow.addListener('focus', (e) => { - this.views.current.$el().focus(); - }); - } - - newTab(url = '', title = 'notion.so', animate = true) { - let id = 0; - const list = new Map(this.state.tabs); - while (this.state.tabs.get(id) && this.state.tabs.get(id).open) id++; - list.delete(id); - return this.openTab(id, { - state: list, - load: url || true, - title, - animate, - }); - } - openTab( - id, - { - state = new Map(this.state.tabs), - slideOut = new Set(this.state.slideOut), - load, - animate, - title = 'notion.so', - } = { - state: new Map(this.state.tabs), - slideOut: new Set(this.state.slideOut), - load: false, - title: 'notion.so', - animate: false, - } - ) { - return new Promise((res, rej) => { - if (!id && id !== 0) { - if (state.get(this.views.current.id).open) return res(id); - const currentIndex = [...state].findIndex( - ([id, { title, open }]) => id === this.views.current.id - ); - id = ([...state].find( - ([id, { title, open }], tabIndex) => - open && tabIndex > currentIndex - ) || [...state].find(([id, { title, open }]) => open))[0]; - } - const current_src = this.views.current.$el().src; - this.views.current.id = id; - this.setState( - { - tabs: state.set(id, { - title: state.get(id) ? state.get(id).title : title, - open: true, - }), - slideIn: animate - ? this.state.slideIn.add(id) - : this.state.slideIn, - slideOut: slideOut, - }, - async () => { - this.focusTab(); - new Promise((resolve, reject) => { - let attempt, - clear = () => { - clearInterval(attempt); - return true; - }; - attempt = setInterval(() => { - if (this.views.current.id !== id) return clear() && reject(); - if (document.body.contains(this.views.html[id])) - return clear() && resolve(); - }, 50); - }) - .then(() => { - if (load) { - this.views.html[id].style.opacity = '0'; - let unhide; - unhide = () => { - this.views.html[id].style.opacity = ''; - this.views.html[id].removeEventListener( - 'did-stop-loading', - unhide - ); - }; - this.views.html[id].addEventListener( - 'did-stop-loading', - unhide - ); - this.views.html[id].loadURL( - typeof load === 'string' - ? load - : store().default_page - ? idToNotionURL(store().default_page) - : current_src - ); - } - }) - .catch(() => { - // nothing - }) - .finally(() => { - setTimeout(() => { - this.setState( - { slideIn: new Set(), slideOut: new Set() }, - () => res(id) - ); - }, 150); - }); - } - ); - }); - } - closeTab(id) { - if ((!id && id !== 0) || !this.state.tabs.get(id)) return; - const list = new Map(this.state.tabs); - list.set(id, { ...list.get(id), open: false }); - if (![...list].filter(([id, { title, open }]) => open).length) - return electron.remote.getCurrentWindow().close(); - return this.openTab( - this.views.current.id === id ? null : this.views.current.id, - { state: list, slideOut: this.state.slideOut.add(id) } - ); - } - focusTab() { - if (this.views.active === this.views.current.id) return; - this.loadListeners(); - this.blurListeners(); - this.focusListeners(); - for (const id in this.views.loaded) { - if (this.views.loaded.hasOwnProperty(id) && this.views.loaded[id]) { - const selected = - id == this.views.current.id && - this.state.tabs.get(+id) && - this.state.tabs.get(+id).open; - this.views.loaded[id].style.display = selected ? 'flex' : 'none'; - if (selected) { - this.views.active = +id; - this.views.loaded[id].focus(); - const electronWindow = electron.remote.getCurrentWindow(), - title = - (this.state.tabs.get(+id).emoji - ? `${this.state.tabs.get(+id).emoji} ` - : '') + (this.state.tabs.get(+id).text || 'Notion Desktop'); - if (electronWindow && electronWindow.getTitle() !== title) - electronWindow.setTitle(title); - } - } - } - } - selectTab(num) { - if (num === 'ArrowLeft') { - const prev = document.querySelector('.tab.current') - .previousElementSibling; - if (prev) prev.click(); - } else if (num === 'ArrowRight') { - const next = document.querySelector('.tab.current') - .nextElementSibling; - if (next && !next.classList.contains('new')) next.click(); - } else { - num = +num; - if (num == 9) { - document - .querySelector('#tabs') - .children[ - document.querySelector('#tabs').children.length - 2 - ].click(); - } else if ( - document.querySelector('#tabs').children[num - 1] && - document.querySelector('#tabs').children.length > num - ) { - document.querySelector('#tabs').children[num - 1].click(); - } - } - } - - communicateWithView(event) { - switch (event.channel) { - case 'enhancer:set-tab-title': - if (this.state.tabs.get(+event.target.id)) { - this.setState({ - tabs: new Map( - this.state.tabs.set(+event.target.id, { - ...this.state.tabs.get(+event.target.id), - title: event.args[0], - }) - ), - }); - const electronWindow = electron.remote.getCurrentWindow(), - title = - (event.args[0].emoji ? `${event.args[0].emoji} ` : '') + - (event.args[0].text || 'Notion Desktop'); - if ( - event.target.id == this.views.current.id && - electronWindow.getTitle() !== title - ) - electronWindow.setTitle(title); - } - break; - case 'enhancer:select-tab': - this.selectTab(event.args[0]); - break; - case 'enhancer:new-tab': - this.newTab(event.args[0]); - break; - case 'enhancer:close-tab': - this.closeTab( - event.args[0] || event.args[0] === 0 - ? event.args[0] - : this.views.current.id - ); - break; - } - } - startSearch(isPeekView) { - this.setState( - { - searching: true, - searchingPeekView: isPeekView, - }, - () => { - if (document.activeElement instanceof HTMLElement) - document.activeElement.blur(); - this.$search.focus(); - notionIpc.sendIndexToSearch(this.$search, 'search:start'); - notionIpc.sendIndexToNotion(this.$search, 'search:started'); - } - ); - } - stopSearch() { - notionIpc.sendIndexToSearch(this.$search, 'search:reset'); - this.setState({ - searching: false, - }); - this.lastSearchQuery = undefined; - this.views.current - .$el() - - .stopFindInPage('clearSelection'); - notionIpc.sendIndexToNotion(this.views.current.$el(), 'search:stopped'); - } - nextSearch(query) { - this.views.current - .$el() - - .findInPage(query, { - forward: true, - findNext: query === this.lastSearchQuery, - }); - this.lastSearchQuery = query; - } - prevSearch(query) { - this.views.current - .$el() - - .findInPage(query, { - forward: false, - findNext: query === this.lastSearchQuery, - }); - this.lastSearchQuery = query; - } - clearSearch() { - this.lastSearchQuery = undefined; - this.views.current - .$el() - - .stopFindInPage('clearSelection'); - } - doneSearch() { - this.lastSearchQuery = undefined; - this.views.current - .$el() - - .stopFindInPage('clearSelection'); - this.setState({ searching: false }); - if (document.activeElement instanceof HTMLElement) { - document.activeElement.blur(); - } - this.views.current.$el().focus(); - notionIpc.sendIndexToNotion(this.views.current.$el(), 'search:stopped'); - } - focusListeners() { - if (!this.views.current.$el() || !this.$search) return; - this.views.current - .$el() - .addEventListener('ipc-message', this.communicateWithView); - notionIpc.receiveIndexFromNotion.addListener( - this.views.current.$el(), - 'search:start', - this.startSearch - ); - notionIpc.receiveIndexFromNotion.addListener( - this.views.current.$el(), - 'search:stop', - this.stopSearch - ); - notionIpc.receiveIndexFromSearch.addListener( - this.$search, - 'search:next', - this.nextSearch - ); - notionIpc.receiveIndexFromSearch.addListener( - this.$search, - 'search:prev', - this.prevSearch - ); - notionIpc.receiveIndexFromSearch.addListener( - this.$search, - 'search:clear', - this.clearSearch - ); - notionIpc.receiveIndexFromSearch.addListener( - this.$search, - 'search:stop', - this.doneSearch - ); - } - blurListeners() { - if (!this.views.current.$el() || !this.$search) return; - if (this.state.searching) this.stopSearch(); - this.views.current - .$el() - .removeEventListener('ipc-message', this.communicateWithView); - notionIpc.receiveIndexFromNotion.removeListener( - this.views.current.$el(), - 'search:start', - this.startSearch - ); - notionIpc.receiveIndexFromNotion.removeListener( - this.views.current.$el(), - 'search:stop', - this.stopSearch - ); - notionIpc.receiveIndexFromSearch.removeListener( - this.$search, - 'search:next', - this.nextSearch - ); - notionIpc.receiveIndexFromSearch.removeListener( - this.$search, - 'search:prev', - this.prevSearch - ); - notionIpc.receiveIndexFromSearch.removeListener( - this.$search, - 'search:clear', - this.clearSearch - ); - notionIpc.receiveIndexFromSearch.removeListener( - this.$search, - 'search:stop', - this.doneSearch - ); - } - loadListeners() { - if (!this.$search) return; - Object.entries(this.views.html) - .filter(([id, $notion]) => !this.views.loaded[id] && $notion) - .forEach(([id, $notion]) => { - if (!$notion) return; - this.views.loaded[id] = $notion; - $notion.addEventListener('did-fail-load', (error) => { - // logger.info('Failed to load:', error); - if ( - error.errorCode === -3 || - !error.validatedURL.startsWith( - schemeHelpers.getSchemeUrl({ - httpUrl: config.default.baseURL, - protocol: config.default.protocol, - }) - ) - ) { - return; - } - this.setState({ error: true }); - }); - $notion.addEventListener('dom-ready', () => { - // $notion.executeJavaScript(insertCSP); - electron.remote.webContents - .fromId($notion.getWebContentsId()) - .addListener('found-in-page', (event, result) => { - const matches = result - ? { - count: result.matches, - index: result.activeMatchOrdinal, - } - : { count: 0, index: 0 }; - notionIpc.sendIndexToSearch( - this.$search, - 'search:result', - matches - ); - }); - notionIpc.proxyAllMainToNotion($notion); - }); - notionIpc.receiveIndexFromNotion.addListener( - $notion, - 'search:set-theme', - (theme) => { - notionIpc.sendIndexToSearch( - this.$search, - 'search:set-theme', - theme - ); - } - ); - notionIpc.receiveIndexFromNotion.addListener( - $notion, - 'zoom', - (zoomFactor) => { - $notion.setZoomFactor(zoomFactor); - this.$search.setZoomFactor(zoomFactor); - this.setState({ zoomFactor }); - } - ); - let electronWindow; - try { - electronWindow = electron.remote.getCurrentWindow(); - } catch (error) { - notionIpc.sendToMain('notion:log-error', { - level: 'error', - from: 'index', - type: 'GetCurrentWindowError', - error: error.message, - }); - } - if (!electronWindow) { - this.setState({ error: true }); - this.handleReload(); - return; - } - const sendFullScreenChangeEvent = () => { - notionIpc.sendIndexToNotion( - $notion, - 'notion:full-screen-changed' - ); - }; - electronWindow.addListener( - 'enter-full-screen', - sendFullScreenChangeEvent - ); - electronWindow.addListener( - 'leave-full-screen', - sendFullScreenChangeEvent - ); - electronWindow.addListener( - 'enter-html-full-screen', - sendFullScreenChangeEvent - ); - electronWindow.addListener( - 'leave-html-full-screen', - sendFullScreenChangeEvent - ); - }); - } - - renderTitlebar() { - return React.createElement( - 'header', - { - id: 'titlebar', - ref: ($titlebar) => { - this.$titlebar = $titlebar; - }, - onClick: (e) => { - this.views.current.$el().focus(); - }, - }, - React.createElement('button', { - id: 'open-enhancer-menu', - onClick: (e) => { - electron.ipcRenderer.send('enhancer:open-menu'); - }, - }), - React.createElement( - 'div', - { id: 'tabs' }, - ...[...this.state.tabs] - .filter( - ([id, { title, open }]) => open || this.state.slideOut.has(id) - ) - .map(([id, { title, open }]) => - React.createElement( - 'button', - { - className: - 'tab' + - (id === this.views.current.id ? ' current' : '') + - (this.state.slideIn.has(id) ? ' slideIn' : '') + - (this.state.slideOut.has(id) ? ' slideOut' : ''), - draggable: true, - onClick: (e) => { - if (!e.target.classList.contains('close')) - this.openTab(id); - }, - onMouseUp: (e) => { - if (window.event.which === 2) this.closeTab(id); - }, - ref: ($tab) => { - this.views.tabs[id] = $tab; - }, - }, - React.createElement('span', { - dangerouslySetInnerHTML: { - __html: (title.img || '') + (title.text || 'notion.so'), - }, - }), - React.createElement( - 'span', - { - className: 'close', - onClick: () => { - this.closeTab(id); - }, - }, - '×' - ) - ) - ), - React.createElement( - 'button', - { - className: 'tab new', - onClick: () => { - this.newTab(); - }, - }, - React.createElement('span', {}, '+') - ) - ) - ); - } - renderNotionContainer() { - this.views.react = Object.fromEntries( - [...this.state.tabs].map(([id, { title, open }]) => { - return [ - id, - this.views.react[id] || - React.createElement('webview', { - className: 'notion', - id, - ref: ($notion) => { - this.views.html[id] = $notion; - this.focusTab(); - }, - partition: constants.electronSessionPartition, - preload: path.resolve(`${__notion}/app/renderer/preload.js`), - src: this.props.notionUrl, - webpreferences: 'spellcheck=yes, enableremotemodule=yes', - }), - ]; - }) - ); - return React.createElement( - 'div', - { - style: { - flexGrow: 1, - display: this.state.error ? 'none' : 'flex', - }, - }, - ...Object.values(this.views.react) - ); - } - renderSearchContainer() { - return React.createElement( - 'div', - { - style: { - position: 'fixed', - overflow: 'hidden', - pointerEvents: 'none', - padding: '0 20px', - top: - (this.state.searchingPeekView - ? 0 - : process.platform === 'darwin' - ? 37 - : 45) * this.state.zoomFactor, - right: (48 - 24) * this.state.zoomFactor, - width: 460 * this.state.zoomFactor, - height: 72 * this.state.zoomFactor, - zIndex: 99, - }, - }, - React.createElement('webview', { - id: 'search', - style: { - width: '100%', - height: '100%', - transition: `transform 70ms ease-${ - this.state.searching ? 'out' : 'in' - }`, - transform: `translateY(${this.state.searching ? '0' : '-100'}%)`, - pointerEvents: this.state.searching ? 'auto' : 'none', - }, - ref: ($search) => { - this.$search = $search; - this.focusTab(); - }, - partition: constants.electronSessionPartition, - preload: `file://${path.resolve( - `${__notion}/app/renderer/search.js` - )}`, - src: `file://${path.resolve( - `${__notion}/app/renderer/search.html` - )}`, - webpreferences: 'spellcheck=no, enableremotemodule=yes', - }) - ); - } - renderErrorContainer() { - return React.createElement( - 'div', - { - style: { - position: 'fixed', - top: 0, - left: 0, - right: 0, - bottom: 0, - display: this.state.error ? 'flex' : 'none', - flexDirection: 'column', - alignItems: 'center', - justifyContent: 'center', - padding: 24, - paddingBottom: '8vh', - }, - }, - React.createElement('img', { - style: { - width: 300, - maxWidth: '100%', - }, - src: './onboarding-offline.png', - }), - React.createElement( - 'div', - { - style: { - paddingTop: 16, - paddingBottom: 16, - textAlign: 'center', - lineHeight: 1.4, - fontSize: 17, - letterSpacing: '-0.01em', - color: '#424241', - fontWeight: 500, - }, - }, - React.createElement( - 'div', - null, - React.createElement(notion_intl.FormattedMessage, { - id: 'desktopLogin.offline.title', - defaultMessage: 'Welcome to Notion!', - values: { - strong: (...chunks) => - React.createElement('strong', null, chunks), - }, - }) - ), - React.createElement( - 'div', - null, - React.createElement(notion_intl.FormattedMessage, { - id: 'desktopLogin.offline.message', - defaultMessage: 'Connect to the internet to get started.', - }) - ) - ), - React.createElement( - 'div', - null, - React.createElement( - 'button', - { - style: { - background: '#fefaf8', - border: '1px solid #f1cbca', - boxSizing: 'border-box', - boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.1)', - borderRadius: 3, - lineHeight: 'normal', - fontSize: 14, - fontWeight: 600, - letterSpacing: '-0.03em', - color: '#d8615c', - paddingLeft: 12, - paddingRight: 12, - height: 36, - }, - onClick: this.handleReload, - }, - React.createElement(notion_intl.FormattedMessage, { - id: - 'desktopLogin.offline.retryConnectingToInternetButton.label', - defaultMessage: 'Try again', - }) - ) - ) - ); - } - render() { - const notionLocale = localizationHelper.getNotionLocaleFromElectronLocale( - window.navigator.language - ), - result = React.createElement( - notion_intl.IntlProvider, - { - locale: notionLocale, - messages: - notionLocale === 'ko-KR' - ? koMessages - : { - 'desktopLogin.offline.title': - 'Welcome to Notion!', - 'desktopLogin.offline.message': - 'Connect to the internet to get started.', - 'desktopLogin.offline.retryConnectingToInternetButton.label': - 'Try again', - }, - }, - this.renderTitlebar(), - this.renderNotionContainer(), - this.renderSearchContainer(), - this.renderErrorContainer() - ); - document.body.classList[this.state.error ? 'add' : 'remove']('error'); - this.loadListeners(); - return result; - } - } - - window['__start'] = () => { - document.body.className = 'notion-dark-theme'; - document.body.setAttribute('data-platform', process.platform); - - const modules = getEnhancements(); - for (let mod of modules.loaded) { - for (let font of mod.fonts || []) { - document - .querySelector('head') - .appendChild( - createElement(``) - ); - } - } - - for (let mod of modules.loaded) { - if ( - mod.alwaysActive || - store('mods', { [mod.id]: { enabled: false } })[mod.id].enabled - ) { - const fileExists = (file) => fs.pathExistsSync(path.resolve(file)); - for (let sheet of ['tabs', 'variables']) { - if (fileExists(`${__dirname}/../${mod.dir}/${sheet}.css`)) { - document.head.appendChild( - createElement( - `` - ) - ); - } - } - } - } - electron.ipcRenderer.on('enhancer:set-app-theme', (event, theme) => { - document.body.className = `notion-${theme}-theme`; - }); - - const parsed = url.parse(window.location.href, true), - notionUrl = - parsed.query.path || - (store().default_page - ? idToNotionURL(store().default_page) - : schemeHelpers.getSchemeUrl({ - httpUrl: config.default.baseURL, - protocol: config.default.protocol, - })); - delete parsed.search; - delete parsed.query; - const plainUrl = url.format(parsed); - window.history.replaceState(undefined, undefined, plainUrl); - - document.title = localizationHelper - .createIntlShape( - localizationHelper.getNotionLocaleFromElectronLocale( - window.navigator.language - ) - ) - .formatMessage( - notion_intl.defineMessages({ - documentTitle: { - id: 'desktop.documentTitle', - defaultMessage: 'Notion Desktop', - }, - }).documentTitle - ); - const $root = document.getElementById('root'); - ReactDOM.render( - React.createElement(Index, { notionUrl: notionUrl }), - $root - ); - }; - } else { - const __start = window['__start']; - window['__start'] = () => { - __start(); - - if (store().default_page) { - new Promise((res, rej) => { - let attempt; - attempt = setInterval(() => { - if ( - !document.getElementById('notion') || - !document.getElementById('notion').loadURL - ) - return; - clearInterval(attempt); - res(); - }, 50); - }).then(() => { - if ( - document.getElementById('notion').getAttribute('src') === - 'notion://www.notion.so' && - idToNotionURL(store().default_page) - ) { - document - .getElementById('notion') - .loadURL(idToNotionURL(store().default_page)); - } - }); - } - - const dragarea = document.querySelector( - '#root [style*="-webkit-app-region: drag"]' - ), - default_styles = dragarea.getAttribute('style'); - if (store().tiling_mode) { - dragarea.style.display = 'none'; - } else { - document - .getElementById('notion') - .addEventListener('ipc-message', (event) => { - if (event.channel !== 'enhancer:sidebar-width') return; - dragarea.setAttribute( - 'style', - `${default_styles} top: 2px; height: ${ - store('cf8a7b27-5a4c-4d45-a4cb-1d2bbc9e9014').dragarea_height - }px; left: ${event.args[0]};` - ); - }); - - document.getElementById('notion').addEventListener('dom-ready', () => { - // document.getElementById('notion').executeJavaScript(insertCSP); - }); - } - }; - } -}; diff --git a/repo/core/systemMenu.js b/repo/core/systemMenu.js deleted file mode 100644 index 2fb0535..0000000 --- a/repo/core/systemMenu.js +++ /dev/null @@ -1,477 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * under the MIT license - */ - -'use strict'; - -module.exports = (store, __exports) => { - const electron = require('electron'), - fs = require('fs-extra'), - { getNotionResources } = require('../../pkg/helpers.js'), - __notion = getNotionResources(), - createWindow = require(`${__notion}/app/main/createWindow.js`), - config = require(`${__notion}/app/config.js`), - notion_intl = require(`${__notion}/app/shared/notion-intl/index.js`), - localizationHelper = require(`${__notion}/app/helpers/localizationHelper.js`), - isMac = process.platform === 'darwin', - // why is it inversed? i have no idea, but for some reason this is what works - tabsEnabled = !(store('mods')['e1692c29-475e-437b-b7ff-3eee872e1a42'] || {}) - .enabled, - menuMessages = notion_intl.defineMessages({ - fileMenuTitle: { - id: 'desktopTopbar.fileMenu.title', - defaultMessage: 'File', - }, - editMenuTitle: { - id: 'desktopTopbar.editMenu.title', - defaultMessage: 'Edit', - }, - viewMenuTitle: { - id: 'desktopTopbar.viewMenu.title', - defaultMessage: 'View', - }, - windowMenuTitle: { - id: 'desktopTopbar.windowMenu.title', - defaultMessage: 'Window', - }, - helpTitle: { - id: 'desktopTopbar.helpMenu.title', - defaultMessage: 'Help', - }, - newWindow: { - id: 'desktopTopbar.fileMenu.newWindow', - defaultMessage: 'New Window', - }, - closeWindow: { - id: 'desktopTopbar.fileMenu.close', - defaultMessage: 'Close Window', - }, - quit: { - id: 'desktopTopbar.fileMenu.quit', - defaultMessage: 'Exit', - }, - undo: { - id: 'desktopTopbar.editMenu.undo', - defaultMessage: 'Undo', - }, - redo: { - id: 'desktopTopbar.editMenu.redo', - defaultMessage: 'Redo', - }, - cut: { - id: 'desktopTopbar.editMenu.cut', - defaultMessage: 'Cut', - }, - copy: { - id: 'desktopTopbar.editMenu.copy', - defaultMessage: 'Copy', - }, - paste: { - id: 'desktopTopbar.editMenu.paste', - defaultMessage: 'Paste', - }, - selectAll: { - id: 'desktopTopbar.editMenu.selectAll', - defaultMessage: 'Select All', - }, - startSpeaking: { - id: 'desktopTopbar.editMenu.speech.startSpeaking', - defaultMessage: 'Start Speaking', - }, - stopSpeaking: { - id: 'desktopTopbar.editMenu.speech.stopSpeaking', - defaultMessage: 'Stop Speaking', - }, - speech: { - id: 'desktopTopbar.editMenu.speech', - defaultMessage: 'Speech', - }, - reload: { - id: 'desktopTopbar.viewMenu.reload', - defaultMessage: 'Reload', - }, - togglefullscreen: { - id: 'desktopTopbar.viewMenu.togglefullscreen', - defaultMessage: 'Toggle Full Screen', - }, - toggleDevTools: { - id: 'desktopTopbar.toggleDevTools', - defaultMessage: 'Toggle Developer Tools', - }, - toggleWindowDevTools: { - id: 'desktopTopbar.toggleWindowDevTools', - defaultMessage: 'Toggle Window Developer Tools', - }, - maximize: { - id: 'desktopTopbar.windowMenu.maximize', - defaultMessage: 'Maximize', - }, - minimize: { - id: 'desktopTopbar.windowMenu.minimize', - defaultMessage: 'Minimize', - }, - zoom: { - id: 'desktopTopbar.windowMenu.zoom', - defaultMessage: 'Zoom', - }, - front: { - id: 'desktopTopbar.windowMenu.front', - defaultMessage: 'Front', - }, - close: { - id: 'desktopTopbar.windowMenu.close', - defaultMessage: 'Close', - }, - help: { - id: 'desktopTopbar.helpMenu.openHelpAndSupport', - defaultMessage: 'Open Help & Support', - }, - reset: { - id: 'desktopTopbar.appMenu.resetAppAndClearData', - defaultMessage: 'Reset App & Clear Local Data', - }, - about: { - id: 'desktopTopbar.appMenu.about', - defaultMessage: 'About Notion', - }, - services: { - id: 'desktopTopbar.appMenu.services', - defaultMessage: 'Services', - }, - hide: { id: 'desktopTopbar.appMenu.hide', defaultMessage: 'Hide Notion' }, - hideOthers: { - id: 'desktopTopbar.appMenu.hideOthers', - defaultMessage: 'Hide Others', - }, - unhide: { - id: 'desktopTopbar.appMenu.unhide', - defaultMessage: 'Show All', - }, - quitMac: { id: 'desktopTopbar.appMenu.quit', defaultMessage: 'Quit' }, - }), - escapeAmpersand = (message) => message.replace(/&/g, '&&'); - __exports.setupSystemMenu = (locale) => { - const intl = localizationHelper.createIntlShape(locale), - fileMenu = { - role: 'fileMenu', - label: escapeAmpersand(intl.formatMessage(menuMessages.fileMenuTitle)), - submenu: isMac - ? [ - { - label: escapeAmpersand( - intl.formatMessage(menuMessages.newWindow) - ), - accelerator: 'CmdOrCtrl+Shift+N', - click: () => createWindow.createWindow(), - }, - ...(tabsEnabled - ? [ - { - role: 'close', - label: escapeAmpersand( - intl.formatMessage(menuMessages.closeWindow) - ), - }, - ] - : []), - ] - : [ - { - label: escapeAmpersand( - intl.formatMessage(menuMessages.newWindow) - ), - accelerator: 'CmdOrCtrl+Shift+N', - click: () => createWindow.createWindow(), - }, - ...(tabsEnabled - ? [ - { - role: 'quit', - label: escapeAmpersand( - intl.formatMessage(menuMessages.quit) - ), - }, - ] - : []), - ], - }, - editMenu = { - role: 'editMenu', - label: escapeAmpersand(intl.formatMessage(menuMessages.editMenuTitle)), - submenu: isMac - ? [ - { - role: 'undo', - label: escapeAmpersand(intl.formatMessage(menuMessages.undo)), - }, - { - role: 'redo', - label: escapeAmpersand(intl.formatMessage(menuMessages.redo)), - }, - { type: 'separator' }, - { - role: 'cut', - label: escapeAmpersand(intl.formatMessage(menuMessages.cut)), - }, - { - role: 'copy', - label: escapeAmpersand(intl.formatMessage(menuMessages.copy)), - }, - { - role: 'paste', - label: escapeAmpersand(intl.formatMessage(menuMessages.paste)), - }, - { - role: 'selectAll', - label: escapeAmpersand( - intl.formatMessage(menuMessages.selectAll) - ), - }, - { type: 'separator' }, - { - label: escapeAmpersand(intl.formatMessage(menuMessages.speech)), - submenu: [ - { - role: 'startSpeaking', - label: escapeAmpersand( - intl.formatMessage(menuMessages.startSpeaking) - ), - }, - { - role: 'stopSpeaking', - label: escapeAmpersand( - intl.formatMessage(menuMessages.stopSpeaking) - ), - }, - ], - }, - ] - : [ - { - role: 'undo', - label: escapeAmpersand(intl.formatMessage(menuMessages.undo)), - }, - { - role: 'redo', - label: escapeAmpersand(intl.formatMessage(menuMessages.redo)), - }, - { type: 'separator' }, - { - role: 'cut', - label: escapeAmpersand(intl.formatMessage(menuMessages.cut)), - }, - { - role: 'copy', - label: escapeAmpersand(intl.formatMessage(menuMessages.copy)), - }, - { - role: 'paste', - label: escapeAmpersand(intl.formatMessage(menuMessages.paste)), - }, - { type: 'separator' }, - { - role: 'selectAll', - label: escapeAmpersand( - intl.formatMessage(menuMessages.selectAll) - ), - }, - ], - }, - viewMenu = { - role: 'viewMenu', - label: escapeAmpersand(intl.formatMessage(menuMessages.viewMenuTitle)), - submenu: [ - { - label: escapeAmpersand(intl.formatMessage(menuMessages.reload)), - accelerator: 'CmdOrCtrl+R', - click() { - const focusedWebContents = electron.webContents.getFocusedWebContents(); - if (focusedWebContents) { - if (focusedWebContents.hostWebContents) { - for (const webContentsInstance of electron.webContents.getAllWebContents()) { - if ( - webContentsInstance.hostWebContents === - focusedWebContents.hostWebContents - ) { - webContentsInstance.reload(); - } - } - } else { - focusedWebContents.reload(); - } - } - }, - }, - { - label: escapeAmpersand( - intl.formatMessage(menuMessages.toggleDevTools) - ), - accelerator: isMac ? 'Alt+Command+I' : 'Ctrl+Shift+I', - click() { - let focusedWebContents = electron.webContents.getFocusedWebContents(); - if (focusedWebContents) { - const focusedWebContentsUrl = focusedWebContents.getURL(); - if ( - focusedWebContentsUrl.startsWith('file://') && - focusedWebContentsUrl.endsWith('/search.html') - ) { - const notionWebviewWebContents = electron.webContents - .getAllWebContents() - .find( - (webContentsInstance) => - webContentsInstance.hostWebContents === - focusedWebContents.hostWebContents && - webContentsInstance !== focusedWebContents - ); - if (notionWebviewWebContents) { - focusedWebContents = notionWebviewWebContents; - } - } - focusedWebContents.toggleDevTools(); - } - }, - }, - { - label: escapeAmpersand( - intl.formatMessage(menuMessages.toggleWindowDevTools) - ), - accelerator: isMac ? 'Shift+Alt+Command+I' : 'Alt+Ctrl+Shift+I', - visible: false, - click(menuItem, focusedWindow) { - if (focusedWindow) { - focusedWindow.webContents.toggleDevTools(); - } - }, - }, - { type: 'separator' }, - { - role: 'togglefullscreen', - label: escapeAmpersand( - intl.formatMessage(menuMessages.togglefullscreen) - ), - }, - ], - }, - windowMenu = { - role: 'windowMenu', - label: escapeAmpersand( - intl.formatMessage(menuMessages.windowMenuTitle) - ), - submenu: isMac - ? [ - { - role: 'minimize', - label: escapeAmpersand( - intl.formatMessage(menuMessages.minimize) - ), - }, - { - role: 'zoom', - label: escapeAmpersand(intl.formatMessage(menuMessages.zoom)), - }, - { type: 'separator' }, - { - role: 'front', - label: escapeAmpersand(intl.formatMessage(menuMessages.front)), - }, - ] - : [ - { - role: 'minimize', - label: escapeAmpersand( - intl.formatMessage(menuMessages.minimize) - ), - }, - { - label: escapeAmpersand( - intl.formatMessage(menuMessages.maximize) - ), - click(item, focusedWindow) { - if (focusedWindow) { - if (focusedWindow.isMaximized()) { - focusedWindow.unmaximize(); - } else { - focusedWindow.maximize(); - } - } - }, - }, - ...(tabsEnabled - ? [ - { - role: 'close', - label: escapeAmpersand( - intl.formatMessage(menuMessages.close) - ), - }, - ] - : []), - ], - }, - helpMenu = { - role: 'help', - label: escapeAmpersand(intl.formatMessage(menuMessages.helpTitle)), - submenu: [ - { - label: escapeAmpersand(intl.formatMessage(menuMessages.help)), - click() { - electron.shell.openExternal(config.default.baseURL + '/help'); - }, - }, - ], - }, - appMenu = { - role: 'appMenu', - submenu: [ - { - role: 'about', - label: escapeAmpersand(intl.formatMessage(menuMessages.about)), - }, - { type: 'separator' }, - { - label: escapeAmpersand(intl.formatMessage(menuMessages.reset)), - async click(item, focusedWindow) { - await fs.remove(electron.app.getPath('userData')); - electron.app.relaunch(); - electron.app.exit(); - }, - }, - { type: 'separator' }, - { - role: 'services', - label: escapeAmpersand(intl.formatMessage(menuMessages.services)), - }, - { type: 'separator' }, - { - role: 'hide', - label: escapeAmpersand(intl.formatMessage(menuMessages.hide)), - }, - { - role: 'hideOthers', - label: escapeAmpersand(intl.formatMessage(menuMessages.hideOthers)), - }, - { - role: 'unhide', - label: escapeAmpersand(intl.formatMessage(menuMessages.unhide)), - }, - ...(tabsEnabled - ? [ - { type: 'separator' }, - { - role: 'quit', - label: escapeAmpersand( - intl.formatMessage(menuMessages.quitMac) - ), - }, - ] - : []), - ], - }, - template = [fileMenu, editMenu, viewMenu, windowMenu, helpMenu]; - if (isMac) template.unshift(appMenu); - const menu = electron.Menu.buildFromTemplate(template); - electron.Menu.setApplicationMenu(menu); - }; -}; diff --git a/repo/core/tabs.css b/repo/core/tabs.css deleted file mode 100644 index 41c53fb..0000000 --- a/repo/core/tabs.css +++ /dev/null @@ -1,196 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * under the MIT license - */ - -@import './css/buttons.css'; - -* { - box-sizing: border-box; - word-break: break-word; - text-decoration: none; - text-size-adjust: 100%; - font-family: var(--theme--font_sans) !important; - outline-color: var(--theme--table-border); -} - -@keyframes spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} -@keyframes tabSlide { - from { - width: 0; - } - to { - width: 8.5em; - } -} - -body:not(.error)::after { - z-index: 1; - content: ''; - position: absolute; - left: calc(50% - 15px); - top: calc(50% + 10px); - width: 18px; - height: 18px; - opacity: 0.5; - border: 4px solid var(--theme--text); - border-top-color: transparent; - border-radius: 50%; - animation: spin 0.8s linear infinite; -} - -html, -body, -#root { - background: var(--theme--main) !important; - position: relative; - height: 100%; - margin: 0; -} -#root { - display: flex; - flex-direction: column; -} - -[data-platform='darwin'] #titlebar { - padding-left: 4em; -} -#titlebar::before { - content: ''; - position: absolute; - width: 100%; - -webkit-app-region: no-drag; - top: 0; - left: 0; - height: 2px; -} -#titlebar { - display: flex; - flex-shrink: 1; - user-select: none; - -webkit-app-region: drag; - background: var(--theme--dragarea); -} -#titlebar button { - color: var(--theme--text); - -webkit-app-region: no-drag; - border: none; - background: transparent; -} -#titlebar .window-buttons-area { - margin: 0.5em 0.55em 0.5em auto; -} -#titlebar .window-buttons-area:empty { - display: none; -} - -#open-enhancer-menu::before { - content: ''; - height: 1.25em; - width: 1.25em; - display: inline-block; - margin: auto 1em -0.25em 1em; - background-size: contain; - background-image: url('enhancement://core/icons/mac+linux.png'); - background-repeat: no-repeat; -} -#tabs { - margin-top: auto; - flex-wrap: wrap; - display: flex; - align-items: center; -} -#tabs .tab:not(.new):not(.current) { - flex: 1 1 30px; - min-width: 30px; -} -#tabs button:nth-child(16) { - display: none; - opacity: 0; -} -#tabs .tab { - display: inline-flex; - background: var(--theme--main); - border: none; - font-size: 1.15em; - padding: 0.2em 0.4em; - text-align: left; - border-bottom: 0.22em solid var(--theme--table-border); - opacity: 0.8; -} -#tabs .tab img { - object-fit: cover; - height: 1em; - width: 1em; - border-radius: 3px; - margin: 0 0.5em -0.16em 0.1em; -} -#tabs .tab:not(.new) { - margin-top: 0.5em; -} -#tabs .tab:not(.new) span:not(.close) { - width: 8.5em; - margin-right: 0.22em; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -#tabs .tab.slideIn span:not(.close) { - animation: tabSlide 100ms ease-in-out; -} -#tabs .tab.slideOut { - width: 0; - animation: tabSlide 100ms ease-in-out reverse; -} -#tabs .tab .close { - padding: 0 0.35em 0.1em 0.3em; - margin-left: auto; - font-weight: bold; -} -#tabs .tab.current { - opacity: 1; - background: var(--theme--selected); - border-bottom: 0.22em solid var(--theme--option_active-background); -} -#tabs .tab.new { - background: none; - border: none; - margin-left: -0.1em; - margin-top: 0.3em; -} -#tabs .tab.new span { - padding: 0 0.35em 0.1em 0.3em; - font-weight: bold; -} -#tabs .tab:hover { - opacity: 1; -} -#tabs .tab .close:hover, -#tabs .tab.new span:hover, -#titlebar .window-button:hover { - border-radius: 0.22em; - background: var(--theme--table-border); - box-shadow: 0 0 0 0.5px var(--theme--interactive_hover-border); -} -#titlebar .window-button.btn-close:hover { - background: var(--theme--button_close); - color: var(--theme--button_close-fill); -} -#tabs .tab.dragged-over { - box-shadow: inset 0.22em 0 0 0 var(--theme--selected); -} - -.notion { - z-index: 2; - width: 100%; - height: 100%; - display: none; -} diff --git a/repo/core/tray.js b/repo/core/tray.js deleted file mode 100644 index 53464a8..0000000 --- a/repo/core/tray.js +++ /dev/null @@ -1,261 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * (c) 2020 TarasokUA - * under the MIT license - */ - -'use strict'; - -let tray, enhancer_menu; - -module.exports = (store, __exports) => { - const electron = require('electron'), - path = require('path'), - is_mac = process.platform === 'darwin', - is_win = process.platform === 'win32', - helpers = require('../../pkg/helpers.js'), - getAllWindows = electron.BrowserWindow.getAllWindows; - - function newWindow() { - require('./createWindow.js')( - store, - require(path.resolve( - `${helpers.getNotionResources()}/app/main/createWindow.js` - )) - )( - '', - getAllWindows().find((win) => win !== enhancer_menu) - ); - } - - electron.app.on('second-instance', (event, args, workingDirectory) => { - const windows = getAllWindows(); - if (windows.some((win) => win.isVisible())) { - newWindow(); - } else { - windows.forEach((window) => { - window.show(); - window.focus(); - if (store().maximized) window.maximize(); - }); - } - }); - - electron.app.once('ready', () => { - // tray - - tray = new electron.Tray( - is_win - ? path.resolve(`${__dirname}/icons/windows.ico`) - : new electron.nativeImage.createFromPath( - path.resolve(`${__dirname}/icons/mac+linux.png`) - ).resize({ - width: 16, - height: 16, - }) - ); - - // menu - - electron.ipcMain.on('enhancer:open-menu', openEnhancerMenu); - electron.ipcMain.on('enhancer:set-app-theme', (event, arg) => { - electron.webContents - .getAllWebContents() - .forEach((webContents) => - webContents.send('enhancer:set-app-theme', arg) - ); - }); - electron.ipcMain.on('enhancer:get-app-theme', (event, arg) => { - electron.webContents - .getAllWebContents() - .forEach((webContents) => - webContents.send('enhancer:get-app-theme', arg) - ); - }); - electron.ipcMain.on('enhancer:close-tab', (event, target, tab) => { - electron.webContents - .fromId(target) - .webContents.send('enhancer:close-tab', tab); - }); - - function calculateWindowPos(width, height) { - const screen = electron.screen.getDisplayNearestPoint({ - x: tray.getBounds().x, - y: tray.getBounds().y, - }); - // left - if (screen.workArea.x > 0) - return { - x: screen.workArea.x, - y: screen.workArea.height - height, - }; - // top - if (screen.workArea.y > 0) - return { - x: Math.round( - tray.getBounds().x + tray.getBounds().width / 2 - width / 2 - ), - y: screen.workArea.y, - }; - // right - if (screen.workArea.width < screen.bounds.width) - return { - x: screen.workArea.width - width, - y: screen.bounds.height - height, - }; - // bottom - return { - x: Math.round( - tray.getBounds().x + tray.getBounds().width / 2 - width / 2 - ), - y: screen.workArea.height - height, - }; - } - - function openEnhancerMenu() { - if (enhancer_menu) return enhancer_menu.show(); - const window_state = require(`${helpers - .getNotionResources() - .replace(/\\/g, '/')}/app/node_modules/electron-window-state/index.js`)( - { - file: 'menu.windowstate.json', - path: helpers.__data, - defaultWidth: 275, - defaultHeight: 600, - } - ); - enhancer_menu = new electron.BrowserWindow({ - show: true, - frame: !store().frameless, - titleBarStyle: 'hiddenInset', - x: - window_state.x || - calculateWindowPos(window_state.width, window_state.height).x, - y: - window_state.y || - calculateWindowPos(window_state.width, window_state.height).y, - width: window_state.width, - height: window_state.height, - webPreferences: { - preload: path.resolve(`${__dirname}/enhancerMenu.js`), - nodeIntegration: true, - session: electron.session.fromPartition('persist:notion'), - enableRemoteModule: true, - }, - }); - enhancer_menu.loadURL('enhancement://core/menu.html'); - enhancer_menu.on('close', (e) => { - window_state.saveState(enhancer_menu); - enhancer_menu = null; - }); - // enhancer_menu.webContents.openDevTools(); - } - - // tray - - const contextMenu = electron.Menu.buildFromTemplate([ - { - type: 'normal', - label: 'GitHub', - click: () => { - electron.shell.openExternal( - 'https://github.com/notion-enhancer/notion-enhancer/blob/master/DOCUMENTATION.md' - ); - }, - }, - { - type: 'normal', - label: 'Discord', - click: () => { - electron.shell.openExternal('https://discord.gg/sFWPXtA'); - }, - }, - { - type: 'separator', - }, - { - type: 'normal', - label: 'Bug Report', - click: () => { - electron.shell.openExternal( - 'https://github.com/notion-enhancer/notion-enhancer/issues/new?labels=bug&template=bug-report.md' - ); - }, - }, - { - type: 'normal', - label: 'Feature Proposal', - click: () => { - electron.shell.openExternal( - 'https://github.com/notion-enhancer/notion-enhancer/issues/new?labels=enhancement&template=feature-proposal.md' - ); - }, - }, - { - type: 'separator', - }, - { - type: 'normal', - label: 'Enhancements', - accelerator: store().menu_toggle, - click: openEnhancerMenu, - }, - { - type: 'normal', - label: 'New Window', - click: newWindow(), - accelerator: 'CommandOrControl+Shift+N', - }, - { - type: 'normal', - label: 'Toggle Visibility', - accelerator: store().hotkey, - click: toggleWindows, - }, - { - type: 'separator', - }, - { - label: 'Relaunch', - click: () => { - electron.app.relaunch(); - electron.app.quit(); - }, - }, - { - label: 'Quit', - role: 'quit', - }, - ]); - tray.setContextMenu(contextMenu); - tray.setToolTip('Notion'); - - // hotkey - - function showWindows(windows) { - if (is_mac) electron.app.show(); - if (store().maximized) windows.forEach((win) => [win.maximize()]); - else windows.forEach((win) => win.show()); - electron.app.focus({ steal: true }); - } - function hideWindows(windows) { - windows.forEach((win) => [win.isFocused() && win.blur(), win.hide()]); - if (is_mac) electron.app.hide(); - } - function toggleWindows() { - const windows = getAllWindows(); - if (windows.some((win) => win.isVisible())) hideWindows(windows); - else showWindows(windows); - } - tray.on('click', toggleWindows); - if (store().hotkey) { - electron.globalShortcut.register(store().hotkey, () => { - const windows = getAllWindows(); - if (windows.some((win) => win.isFocused() && win.isVisible())) - hideWindows(windows); - else showWindows(windows); - }); - } - }); -}; diff --git a/repo/core/variables.css b/repo/core/variables.css deleted file mode 100644 index 63d2f9d..0000000 --- a/repo/core/variables.css +++ /dev/null @@ -1,810 +0,0 @@ -/* - * notion-enhancer - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * (c) 2020 TarasokUA - * (c) 2020 Arecsu - * (c) 2020 u/zenith_illinois - * (c) 2020 admiraldus (https://github.com/admiraldus) - * under the MIT license - */ - -:root { - /** dark **/ - - --theme_dark--main: rgb(47, 52, 55); - --theme_dark--sidebar: rgb(55, 60, 63); - --theme_dark--overlay: rgba(15, 15, 15, 0.6); - --theme_dark--dragarea: #272d2f; - --theme_dark--box-shadow: rgba(15, 15, 15, 0.2) 0px 0px 0px 1px, - rgba(15, 15, 15, 0.2) 0px 2px 4px; - --theme_dark--box-shadow_strong: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, - rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px; - --theme_dark--page_normal-width: 900px; - --theme_dark--page_full-width: 100%; - --theme_dark--page-padding: calc(96px + env(safe-area-inset-left)); - --theme_dark--page_banner-height: 30vh; - --theme_dark--preview-width: 977px; - --theme_dark--preview-padding: 8rem; - --theme_dark--preview_banner-height: 20vh; - - --theme_dark--font_sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', - Helvetica, 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji', - 'Segoe UI Symbol'; - --theme_dark--font_serif: Lyon-Text, Georgia, YuMincho, 'Yu Mincho', - 'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'Songti TC', 'Songti SC', - SimSun, 'Nanum Myeongjo', NanumMyeongjo, Batang, serif; - --theme_dark--font_mono: iawriter-mono, Nitti, Menlo, Courier, monospace; - --theme_dark--font_code: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, - Courier, monospace; - --theme_dark--font_quote: var(--theme_dark--font_sans); - --theme_dark--font_headings: var(--theme_dark--font_sans); - - --theme_dark--font_title-size: 40px; - --theme_dark--font_heading1-size: 1.875em; - --theme_dark--font_heading2-size: 1.5em; - --theme_dark--font_heading3-size: 1.25em; - --theme_dark--font_label-size: 14px; - --theme_dark--font_body-size: 16px; - --theme_dark--font_body-size_small: 14px; - --theme_dark--font_code-size: 0.796875em; - --theme_dark--font_sidebar-size: 14px; - - --theme_dark--text-block_line-height: 1.5; - --theme_dark--text-block_margin-top: 1px; - - --theme_dark--scrollbar: #505457; - --theme_dark--scrollbar-border: transparent; - --theme_dark--scrollbar_hover: #696d6f; - - --theme_dark--card: rgb(63, 68, 71); - --theme_dark--gallery: rgba(255, 255, 255, 0.05); - --theme_dark--select_input: rgb(55, 60, 63); - --theme_dark--table-border: rgba(255, 255, 255, 0.1); - --theme_dark--table-border_row: rgb(77, 81, 83); - --theme_dark--table-border_column: rgb(63, 66, 69); - --theme_dark--table-border_selected: rgba(46, 170, 220, 0.6); - --theme_dark--ui-border: rgba(255, 255, 255, 0.07); - --theme_dark--interactive_hover: rgb(71, 76, 80); - --theme_dark--interactive_hover-border: transparent; - --theme_dark--button_close: #e81123; - --theme_dark--button_close-fill: white; - - --theme_dark--selected: rgba(46, 170, 220, 0.2); - --theme_dark--primary: rgb(46, 170, 220); - --theme_dark--primary_text: white; - --theme_dark--primary_hover: rgb(6, 156, 205); - --theme_dark--primary_click: rgb(0, 141, 190); - --theme_dark--primary_indicator: rgb(235, 87, 87); - --theme_dark--primary_indicator_text: var(--theme_dark--primary_text); - --theme_dark--primary_indicator_hover: rgba(45, 156, 219, 0.2); - - --theme_dark--option-color: white; - --theme_dark--option-background: transparent; - --theme_dark--option_active-color: white; - --theme_dark--option_active-background: var(--theme_dark--primary); - --theme_dark--option_hover-color: white; - --theme_dark--option_hover-background: rgb(71, 76, 80); - - --theme_dark--danger_text: rgb(235, 87, 87); - --theme_dark--danger_border: rgba(235, 87, 87, 0.5); - - --theme_dark--divider: var(--theme_dark--table-border); - - --theme_dark--text: rgba(255, 255, 255, 0.9); - --theme_dark--text_ui: rgba(255, 255, 255, 0.6); - --theme_dark--text_ui_info: rgba(255, 255, 255, 0.4); - - --theme_dark--text_gray: rgba(151, 154, 155, 0.95); - --theme_dark--text_brown: rgb(147, 114, 100); - --theme_dark--text_orange: rgb(255, 163, 68); - --theme_dark--text_yellow: rgb(255, 220, 73); - --theme_dark--text_green: rgb(77, 171, 154); - --theme_dark--text_blue: rgb(82, 156, 202); - --theme_dark--text_purple: rgb(154, 109, 215); - --theme_dark--text_pink: rgb(226, 85, 161); - --theme_dark--text_red: rgb(255, 115, 105); - - --theme_dark--bg-text: var(--theme_dark--text); - --theme_dark--bg_gray: rgb(69, 75, 78); - --theme_dark--bg_gray-text: var(--theme_dark--bg-text); - --theme_dark--bg_brown: rgb(67, 64, 64); - --theme_dark--bg_brown-text: var(--theme_dark--bg-text); - --theme_dark--bg_orange: rgb(89, 74, 58); - --theme_dark--bg_orange-text: var(--theme_dark--bg-text); - --theme_dark--bg_yellow: rgb(89, 86, 59); - --theme_dark--bg_yellow-text: var(--theme_dark--bg-text); - --theme_dark--bg_green: rgb(53, 76, 75); - --theme_dark--bg_green-text: var(--theme_dark--bg-text); - --theme_dark--bg_blue: rgb(54, 73, 84); - --theme_dark--bg_blue-text: var(--theme_dark--bg-text); - --theme_dark--bg_purple: rgb(68, 63, 87); - --theme_dark--bg_purple-text: var(--theme_dark--bg-text); - --theme_dark--bg_pink: rgb(83, 59, 76); - --theme_dark--bg_pink-text: var(--theme_dark--bg-text); - --theme_dark--bg_red: rgb(89, 65, 65); - --theme_dark--bg_red-text: var(--theme_dark--bg-text); - - --theme_dark--line-text: var(--theme_dark--text); - --theme_dark--line_gray: rgb(69, 75, 78); - --theme_dark--line_gray-text: var(--theme_dark--line-text); - --theme_dark--line_brown: rgb(67, 64, 64); - --theme_dark--line_brown-text: var(--theme_dark--line-text); - --theme_dark--line_orange: rgb(89, 74, 58); - --theme_dark--line_orange-text: var(--theme_dark--line-text); - --theme_dark--line_yellow: rgb(89, 86, 59); - --theme_dark--line_yellow-text: var(--theme_dark--line-text); - --theme_dark--line_green: rgb(53, 76, 75); - --theme_dark--line_green-text: var(--theme_dark--line-text); - --theme_dark--line_blue: rgb(54, 73, 84); - --theme_dark--line_blue-text: var(--theme_dark--line-text); - --theme_dark--line_purple: rgb(68, 63, 87); - --theme_dark--line_purple-text: var(--theme_dark--line-text); - --theme_dark--line_pink: rgb(83, 59, 76); - --theme_dark--line_pink-text: var(--theme_dark--line-text); - --theme_dark--line_red: rgb(89, 65, 65); - --theme_dark--line_red-text: var(--theme_dark--line-text); - - --theme_dark--select-text: var(--theme_dark--text); - --theme_dark--select_gray: rgba(151, 154, 155, 0.5); - --theme_dark--select_gray-text: var(--theme_dark--select-text); - --theme_dark--select_brown: rgba(147, 114, 100, 0.5); - --theme_dark--select_brown-text: var(--theme_dark--select-text); - --theme_dark--select_orange: rgba(255, 163, 68, 0.5); - --theme_dark--select_orange-text: var(--theme_dark--select-text); - --theme_dark--select_yellow: rgba(255, 220, 73, 0.5); - --theme_dark--select_yellow-text: var(--theme_dark--select-text); - --theme_dark--select_green: rgba(77, 171, 154, 0.5); - --theme_dark--select_green-text: var(--theme_dark--select-text); - --theme_dark--select_blue: rgba(82, 156, 202, 0.5); - --theme_dark--select_blue-text: var(--theme_dark--select-text); - --theme_dark--select_purple: rgba(154, 109, 215, 0.5); - --theme_dark--select_purple-text: var(--theme_dark--select-text); - --theme_dark--select_pink: rgba(226, 85, 161, 0.5); - --theme_dark--select_pink-text: var(--theme_dark--select-text); - --theme_dark--select_red: rgba(255, 115, 105, 0.5); - --theme_dark--select_red-text: var(--theme_dark--select-text); - - --theme_dark--callout-text: var(--theme_dark--text); - --theme_dark--callout_gray: rgba(69, 75, 78, 0.3); - --theme_dark--callout_gray-text: var(--theme_dark--callout-text); - --theme_dark--callout_brown: rgba(67, 64, 64, 0.3); - --theme_dark--callout_brown-text: var(--theme_dark--callout-text); - --theme_dark--callout_orange: rgba(89, 74, 58, 0.3); - --theme_dark--callout_orange-text: var(--theme_dark--callout-text); - --theme_dark--callout_yellow: rgba(89, 86, 59, 0.3); - --theme_dark--callout_yellow-text: var(--theme_dark--callout-text); - --theme_dark--callout_green: rgba(53, 76, 75, 0.3); - --theme_dark--callout_green-text: var(--theme_dark--callout-text); - --theme_dark--callout_blue: rgba(54, 73, 84, 0.3); - --theme_dark--callout_blue-text: var(--theme_dark--callout-text); - --theme_dark--callout_purple: rgba(68, 63, 87, 0.3); - --theme_dark--callout_purple-text: var(--theme_dark--callout-text); - --theme_dark--callout_pink: rgba(83, 59, 76, 0.3); - --theme_dark--callout_pink-text: var(--theme_dark--callout-text); - --theme_dark--callout_red: rgba(89, 65, 65, 0.3); - --theme_dark--callout_red-text: var(--theme_dark--callout-text); - - --theme_dark--code_inline-text: #eb5757; - --theme_dark--code_inline-background: rgba(135, 131, 120, 0.15); - --theme_dark--code-text: var(--theme_dark--text); - --theme_dark--code-background: var(--theme_dark--card); - --theme_dark--code_function: var(--theme_dark--code-text); - --theme_dark--code_parameter: var(--theme_dark--code-text); - --theme_dark--code_keyword: hsl(350, 40%, 70%); - --theme_dark--code_constant: hsl(350, 40%, 70%); - --theme_dark--code_tag: hsl(350, 40%, 70%); - --theme_dark--code_operator: hsl(40, 90%, 60%); - --theme_dark--code_important: #e90; - --theme_dark--code_regex: #e90; - --theme_dark--code_property: hsl(350, 40%, 70%); - --theme_dark--code_builtin: hsl(75, 70%, 60%); - --theme_dark--code_class-name: var(--theme_dark--code-text); - --theme_dark--code_attr-name: hsl(75, 70%, 60%); - --theme_dark--code_attr-value: hsl(350, 40%, 70%); - --theme_dark--code_selector: hsl(75, 70%, 60%); - --theme_dark--code_id: var(--theme_dark--code-text); - --theme_dark--code_class: var(--theme_dark--code-text); - --theme_dark--code_pseudo-element: var(--theme_dark--code-text); - --theme_dark--code_pseudo-class: var(--theme_dark--code-text); - --theme_dark--code_attribute: var(--theme_dark--code-text); - --theme_dark--code_value: var(--theme_dark--code-text); - --theme_dark--code_unit: var(--theme_dark--code-text); - --theme_dark--code_comment: hsl(30, 20%, 50%); - --theme_dark--code_punctuation: var(--theme_dark--code-text); - --theme_dark--code_annotation: var(--theme_dark--code_punctuation); - --theme_dark--code_decorator: var(--theme_dark--code_punctuation); - --theme_dark--code_doctype: hsl(30, 20%, 50%); - --theme_dark--code_number: hsl(350, 40%, 70%); - --theme_dark--code_string: hsl(75, 70%, 60%); - --theme_dark--code_boolean: hsl(350, 40%, 70%); - - /** light **/ - - --theme_light--main: white; - --theme_light--sidebar: rgb(247, 246, 243); - --theme_light--overlay: rgba(15, 15, 15, 0.6); - --theme_light--dragarea: rgba(55, 53, 47, 0.04); - --theme_light--box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, - rgba(15, 15, 15, 0.1) 0px 2px 4px; - --theme_light--box-shadow_strong: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, - rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px; - --theme_light--page_normal-width: 900px; - --theme_light--page_full-width: 100%; - --theme_light--page-padding: calc(96px + env(safe-area-inset-left)); - --theme_light--page_banner-height: 30vh; - --theme_light--preview-width: 977px; - --theme_light--preview-padding: 8rem; - --theme_light--preview_banner-height: 20vh; - - --theme_light--font_sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', - Helvetica, 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji', - 'Segoe UI Symbol'; - --theme_light--font_serif: Lyon-Text, Georgia, YuMincho, 'Yu Mincho', - 'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'Songti TC', 'Songti SC', - SimSun, 'Nanum Myeongjo', NanumMyeongjo, Batang, serif; - --theme_light--font_mono: iawriter-mono, Nitti, Menlo, Courier, monospace; - --theme_light--font_code: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, - Courier, monospace; - --theme_light--font_quote: var(--theme_light--font_sans); - --theme_light--font_headings: var(--theme_light--font_sans); - - --theme_light--font_title-size: 40px; - --theme_light--font_heading1-size: 1.875em; - --theme_light--font_heading2-size: 1.5em; - --theme_light--font_heading3-size: 1.25em; - --theme_light--font_label-size: 14px; - --theme_light--font_body-size: 16px; - --theme_light--font_body-size_small: 14px; - --theme_light--font_code-size: 0.796875em; - --theme_light--font_sidebar-size: 14px; - - --theme_light--text-block_line-height: 1.5; - --theme_light--text-block_margin-top: 1px; - - --theme_light--scrollbar: #d9d8d6; - --theme_light--scrollbar-border: #cacac8; - --theme_light--scrollbar_hover: #cacac8; - - --theme_light--card: rgb(247, 247, 247); - --theme_light--gallery: rgba(55, 53, 47, 0.024); - --theme_light--select_input: rgba(242, 241, 238, 0.6); - --theme_light--table-border: rgba(55, 53, 47, 0.16); - --theme_light--table-border_row: rgb(223, 223, 222); - --theme_light--table-border_column: rgb(237, 237, 236); - --theme_light--table-border_selected: rgba(46, 170, 220, 0.6); - --theme_light--ui-border: rgba(55, 53, 47, 0.09); - --theme_light--interactive_hover: rgb(239, 239, 239); - --theme_light--interactive_hover-border: transparent; - --theme_light--button_close: #e81123; - --theme_light--button_close-fill: white; - - --theme_light--selected: rgba(46, 170, 220, 0.2); - --theme_light--primary: rgb(46, 170, 220); - --theme_light--primary_text: white; - --theme_light--primary_hover: rgb(6, 156, 205); - --theme_light--primary_click: rgb(0, 141, 190); - --theme_light--primary_indicator: rgb(235, 87, 87); - --theme_light--primary_indicator_text: var(--theme_light--primary_text); - --theme_light--primary_indicator_hover: rgba(45, 156, 219, 0.2); - - --theme_light--option-color: black; - --theme_light--option-background: transparent; - --theme_light--option_hover-color: black; - --theme_light--option_hover-background: rgba(55, 53, 47, 0.08); - --theme_light--option_active-color: white; - --theme_light--option_active-background: var(--theme_light--primary); - - --theme_light--danger_text: rgb(235, 87, 87); - --theme_light--danger_border: rgba(235, 87, 87, 0.5); - - --theme_light--divider: var(--theme_light--table-border); - - --theme_light--text: rgb(55, 53, 47); - --theme_light--text_ui: rgba(55, 53, 47, 0.6); - --theme_light--text_ui: rgba(55, 53, 47, 0.6); - --theme_light--text_ui_info: rgba(55, 53, 47, 0.4); - - --theme_light--text_gray: rgb(155, 154, 151); - --theme_light--text_brown: rgb(100, 71, 58); - --theme_light--text_orange: rgb(217, 115, 13); - --theme_light--text_yellow: rgb(223, 171, 1); - --theme_light--text_green: rgb(15, 123, 108); - --theme_light--text_blue: rgb(11, 110, 153); - --theme_light--text_purple: rgb(105, 64, 165); - --theme_light--text_pink: rgb(173, 26, 114); - --theme_light--text_red: rgb(224, 62, 62); - - --theme_light--bg-text: var(--theme_light--text); - --theme_light--bg_gray: rgb(235, 236, 237); - --theme_light--bg_gray-text: var(--theme_light--bg-text); - --theme_light--bg_brown: rgb(233, 229, 227); - --theme_light--bg_brown-text: var(--theme_light--bg-text); - --theme_light--bg_orange: rgb(250, 235, 221); - --theme_light--bg_orange-text: var(--theme_light--bg-text); - --theme_light--bg_yellow: rgb(251, 243, 219); - --theme_light--bg_yellow-text: var(--theme_light--bg-text); - --theme_light--bg_green: rgb(221, 237, 234); - --theme_light--bg_green-text: var(--theme_light--bg-text); - --theme_light--bg_blue: rgb(221, 235, 241); - --theme_light--bg_blue-text: var(--theme_light--bg-text); - --theme_light--bg_purple: rgb(234, 228, 242); - --theme_light--bg_purple-text: var(--theme_light--bg-text); - --theme_light--bg_pink: rgb(244, 223, 235); - --theme_light--bg_pink-text: var(--theme_light--bg-text); - --theme_light--bg_red: rgb(251, 228, 228); - --theme_light--bg_red-text: var(--theme_light--bg-text); - - --theme_light--line-text: var(--theme_light--text); - --theme_light--line_gray: rgb(235, 236, 237); - --theme_light--line_gray-text: var(--theme_light--line-text); - --theme_light--line_brown: rgb(233, 229, 227); - --theme_light--line_brown-text: var(--theme_light--line-text); - --theme_light--line_orange: rgb(250, 235, 221); - --theme_light--line_orange-text: var(--theme_light--line-text); - --theme_light--line_yellow: rgb(251, 243, 219); - --theme_light--line_yellow-text: var(--theme_light--line-text); - --theme_light--line_green: rgb(221, 237, 234); - --theme_light--line_green-text: var(--theme_light--line-text); - --theme_light--line_blue: rgb(221, 235, 241); - --theme_light--line_blue-text: var(--theme_light--line-text); - --theme_light--line_purple: rgb(234, 228, 242); - --theme_light--line_purple-text: var(--theme_light--line-text); - --theme_light--line_pink: rgb(244, 223, 235); - --theme_light--line_pink-text: var(--theme_light--line-text); - --theme_light--line_red: rgb(251, 228, 228); - --theme_light--line_red-text: var(--theme_light--line-text); - - --theme_light--select-text: var(--theme_light--text); - --theme_light--select_gray: rgba(140, 46, 0, 0.2); - --theme_light--select_gray-text: var(--theme_light--select-text); - --theme_light--select_brown: rgba(140, 46, 0, 0.2); - --theme_light--select_brown-text: var(--theme_light--select-text); - --theme_light--select_orange: rgba(245, 93, 0, 0.2); - --theme_light--select_orange-text: var(--theme_light--select-text); - --theme_light--select_yellow: rgba(233, 168, 0, 0.2); - --theme_light--select_yellow-text: var(--theme_light--select-text); - --theme_light--select_green: rgba(0, 135, 107, 0.2); - --theme_light--select_green-text: var(--theme_light--select-text); - --theme_light--select_blue: rgba(0, 120, 223, 0.2); - --theme_light--select_blue-text: var(--theme_light--select-text); - --theme_light--select_purple: rgba(103, 36, 222, 0.2); - --theme_light--select_purple-text: var(--theme_light--select-text); - --theme_light--select_pink: rgba(221, 0, 129, 0.2); - --theme_light--select_pink-text: var(--theme_light--select-text); - --theme_light--select_red: rgba(255, 0, 26, 0.2); - --theme_light--select_red-text: var(--theme_light--select-text); - - --theme_light--callout-text: var(--theme_light--text); - --theme_light--callout_gray: rgba(235, 236, 237, 0.3); - --theme_light--callout_gray-text: var(--theme_light--callout-text); - --theme_light--callout_brown: rgba(233, 229, 227, 0.3); - --theme_light--callout_brown-text: var(--theme_light--callout-text); - --theme_light--callout_orange: rgba(250, 235, 221, 0.3); - --theme_light--callout_orange-text: var(--theme_light--callout-text); - --theme_light--callout_yellow: rgba(251, 243, 219, 0.3); - --theme_light--callout_yellow-text: var(--theme_light--callout-text); - --theme_light--callout_green: rgba(221, 237, 234, 0.3); - --theme_light--callout_green-text: var(--theme_light--callout-text); - --theme_light--callout_blue: rgba(221, 235, 241, 0.3); - --theme_light--callout_blue-text: var(--theme_light--callout-text); - --theme_light--callout_purple: rgba(234, 228, 242, 0.3); - --theme_light--callout_purple-text: var(--theme_light--callout-text); - --theme_light--callout_pink: rgba(244, 223, 235, 0.3); - --theme_light--callout_pink-text: var(--theme_light--callout-text); - --theme_light--callout_red: rgba(251, 228, 228, 0.3); - --theme_light--callout_red-text: var(--theme_light--callout-text); - - --theme_light--code_inline-text: #eb5757; - --theme_light--code_inline-background: rgba(135, 131, 120, 0.15); - --theme_light--code-text: var(--theme_light--text); - --theme_light--code-background: var(--theme_light--card); - --theme_light--code_function: #dd4a68; - --theme_light--code_parameter: var(--theme_light--code-text); - --theme_light--code_keyword: #07a; - --theme_light--code_constant: #905; - --theme_light--code_tag: #905; - --theme_light--code_operator: #9a6e3a; - --theme_light--code_important: #e90; - --theme_light--code_regex: #e90; - --theme_light--code_property: #905; - --theme_light--code_builtin: #690; - --theme_light--code_class-name: #dd4a68; - --theme_light--code_attr-name: #690; - --theme_light--code_attr-value: #07a; - --theme_light--code_selector: #690; - --theme_light--code_id: var(--theme_light--code-text); - --theme_light--code_class: var(--theme_light--code-text); - --theme_light--code_pseudo-element: var(--theme_light--code-text); - --theme_light--code_pseudo-class: var(--theme_light--code-text); - --theme_light--code_attribute: var(--theme_light--code-text); - --theme_light--code_value: var(--theme_light--code-text); - --theme_light--code_unit: var(--theme_light--code-text); - --theme_light--code_comment: slategray; - --theme_light--code_punctuation: #999; - --theme_light--code_annotation: var(--theme_light--code_punctuation); - --theme_light--code_decorator: var(--theme_light--code_punctuation); - --theme_light--code_doctype: slategray; - --theme_light--code_number: #905; - --theme_light--code_string: #690; - --theme_light--code_boolean: #905; -} - -.notion-dark-theme { - --theme--main: var(--theme_dark--main); - --theme--sidebar: var(--theme_dark--sidebar); - --theme--overlay: var(--theme_dark--overlay); - --theme--dragarea: var(--theme_dark--dragarea); - --theme--box-shadow: var(--theme_dark--box-shadow); - --theme--box-shadow_strong: var(--theme_dark--box-shadow_strong); - --theme--page_normal-width: var(--theme_dark--page_normal-width); - --theme--page_full-width: var(--theme_dark--page_full-width); - --theme--page-padding: var(--theme_dark--page-padding); - --theme--page_banner-height: var(--theme_dark--page_banner-height); - --theme--preview-width: var(--theme_dark--preview-width); - --theme--preview-padding: var(--theme_dark--preview-padding); - --theme--preview_banner-height: var(--theme_dark--preview_banner-height); - --theme--font_sans: var(--theme_dark--font_sans); - --theme--font_serif: var(--theme_dark--font_serif); - --theme--font_mono: var(--theme_dark--font_mono); - --theme--font_code: var(--theme_dark--font_code); - --theme--font_quote: var(--theme_dark--font_quote); - --theme--font_headings: var(--theme_dark--font_headings); - --theme--font_title-size: var(--theme_dark--font_title-size); - --theme--font_heading1-size: var(--theme_dark--font_heading1-size); - --theme--font_heading2-size: var(--theme_dark--font_heading2-size); - --theme--font_heading3-size: var(--theme_dark--font_heading3-size); - --theme--font_label-size: var(--theme_dark--font_label-size); - --theme--font_body-size: var(--theme_dark--font_body-size); - --theme--font_body-size_small: var(--theme_dark--font_body-size_small); - --theme--font_code-size: var(--theme_dark--font_code-size); - --theme--font_sidebar-size: var(--theme_dark--font_sidebar-size); - --theme--text-block_line-height: var(--theme_dark--text-block_line-height); - --theme--text-block_margin-top: var(--theme_dark--text-block_margin-top); - --theme--scrollbar: var(--theme_dark--scrollbar); - --theme--scrollbar-border: var(--theme_dark--scrollbar-border); - --theme--scrollbar_hover: var(--theme_dark--scrollbar_hover); - --theme--card: var(--theme_dark--card); - --theme--gallery: var(--theme_dark--gallery); - --theme--select_input: var(--theme_dark--select_input); - --theme--table-border: var(--theme_dark--table-border); - --theme--table-border_row: var(--theme_dark--table-border_row); - --theme--table-border_column: var(--theme_dark--table-border_column); - --theme--table-border_selected: var(--theme_dark--table-border_selected); - --theme--ui-border: var(--theme_dark--ui-border); - --theme--interactive_hover: var(--theme_dark--interactive_hover); - --theme--interactive_hover-border: var( - --theme_dark--interactive_hover-border - ); - --theme--button_close: var(--theme_dark--button_close); - --theme--button_close-fill: var(--theme_dark--button_close-fill); - --theme--selected: var(--theme_dark--selected); - --theme--primary: var(--theme_dark--primary); - --theme--primary_text: var(--theme_dark--primary_text); - --theme--primary_hover: var(--theme_dark--primary_hover); - --theme--primary_click: var(--theme_dark--primary_click); - --theme--primary_indicator: var(--theme_dark--primary_indicator); - --theme--primary_indicator_text: var(--theme_dark--primary_indicator_text); - --theme--primary_indicator_hover: var(--theme_dark--primary_indicator_hover); - --theme--option-color: var(--theme_dark--option-color); - --theme--option-background: var(--theme_dark--option-background); - --theme--option_active-color: var(--theme_dark--option_active-color); - --theme--option_active-background: var( - --theme_dark--option_active-background - ); - --theme--option_hover-color: var(--theme_dark--option_hover-color); - --theme--option_hover-background: var(--theme_dark--option_hover-background); - --theme--danger_text: var(--theme_dark--danger_text); - --theme--danger_border: var(--theme_dark--danger_border); - --theme--divider: var(--theme_dark--divider); - --theme--text: var(--theme_dark--text); - --theme--text_ui: var(--theme_dark--text_ui); - --theme--text_ui_info: var(--theme_dark--text_ui_info); - --theme--text_gray: var(--theme_dark--text_gray); - --theme--text_brown: var(--theme_dark--text_brown); - --theme--text_orange: var(--theme_dark--text_orange); - --theme--text_yellow: var(--theme_dark--text_yellow); - --theme--text_green: var(--theme_dark--text_green); - --theme--text_blue: var(--theme_dark--text_blue); - --theme--text_purple: var(--theme_dark--text_purple); - --theme--text_pink: var(--theme_dark--text_pink); - --theme--text_red: var(--theme_dark--text_red); - --theme--select-text: var(--theme_dark--select-text); - --theme--bg-text: var(--theme_dark--bg-text); - --theme--bg_gray: var(--theme_dark--bg_gray); - --theme--bg_gray-text: var(--theme_dark--bg_gray-text); - --theme--bg_brown: var(--theme_dark--bg_brown); - --theme--bg_brown-text: var(--theme_dark--bg_brown-text); - --theme--bg_orange: var(--theme_dark--bg_orange); - --theme--bg_orange-text: var(--theme_dark--bg_orange-text); - --theme--bg_yellow: var(--theme_dark--bg_yellow); - --theme--bg_yellow-text: var(--theme_dark--bg_yellow-text); - --theme--bg_green: var(--theme_dark--bg_green); - --theme--bg_green-text: var(--theme_dark--bg_green-text); - --theme--bg_blue: var(--theme_dark--bg_blue); - --theme--bg_blue-text: var(--theme_dark--bg_blue-text); - --theme--bg_purple: var(--theme_dark--bg_purple); - --theme--bg_purple-text: var(--theme_dark--bg_purple-text); - --theme--bg_pink: var(--theme_dark--bg_pink); - --theme--bg_pink-text: var(--theme_dark--bg_pink-text); - --theme--bg_red: var(--theme_dark--bg_red); - --theme--bg_red-text: var(--theme_dark--bg_red-text); - --theme--line-text: var(--theme_dark--line-text); - --theme--line_gray: var(--theme_dark--line_gray); - --theme--line_gray-text: var(--theme_dark--line_gray-text); - --theme--line_brown: var(--theme_dark--line_brown); - --theme--line_brown-text: var(--theme_dark--line_brown-text); - --theme--line_orange: var(--theme_dark--line_orange); - --theme--line_orange-text: var(--theme_dark--line_orange-text); - --theme--line_yellow: var(--theme_dark--line_yellow); - --theme--line_yellow-text: var(--theme_dark--line_yellow-text); - --theme--line_green: var(--theme_dark--line_green); - --theme--line_green-text: var(--theme_dark--line_green-text); - --theme--line_blue: var(--theme_dark--line_blue); - --theme--line_blue-text: var(--theme_dark--line_blue-text); - --theme--line_purple: var(--theme_dark--line_purple); - --theme--line_purple-text: var(--theme_dark--line_purple-text); - --theme--line_pink: var(--theme_dark--line_pink); - --theme--line_pink-text: var(--theme_dark--line_pink-text); - --theme--line_red: var(--theme_dark--line_red); - --theme--line_red-text: var(--theme_dark--line_red-text); - --theme--select_gray: var(--theme_dark--select_gray); - --theme--select_gray-text: var(--theme_dark--select_gray-text); - --theme--select_brown: var(--theme_dark--select_brown); - --theme--select_brown-text: var(--theme_dark--select_brown-text); - --theme--select_orange: var(--theme_dark--select_orange); - --theme--select_orange-text: var(--theme_dark--select_orange-text); - --theme--select_yellow: var(--theme_dark--select_yellow); - --theme--select_yellow-text: var(--theme_dark--select_yellow-text); - --theme--select_green: var(--theme_dark--select_green); - --theme--select_green-text: var(--theme_dark--select_green-text); - --theme--select_blue: var(--theme_dark--select_blue); - --theme--select_blue-text: var(--theme_dark--select_blue-text); - --theme--select_purple: var(--theme_dark--select_purple); - --theme--select_purple-text: var(--theme_dark--select_purple-text); - --theme--select_pink: var(--theme_dark--select_pink); - --theme--select_pink-text: var(--theme_dark--select_pink-text); - --theme--select_red: var(--theme_dark--select_red); - --theme--select_red-text: var(--theme_dark--select_red-text); - --theme--callout-text: var(--theme_dark--callout-text); - --theme--callout_gray: var(--theme_dark--callout_gray); - --theme--callout_gray-text: var(--theme_dark--callout_gray-text); - --theme--callout_brown: var(--theme_dark--callout_brown); - --theme--callout_brown-text: var(--theme_dark--callout_brown-text); - --theme--callout_orange: var(--theme_dark--callout_orange); - --theme--callout_orange-text: var(--theme_dark--callout_orange-text); - --theme--callout_yellow: var(--theme_dark--callout_yellow); - --theme--callout_yellow-text: var(--theme_dark--callout_yellow-text); - --theme--callout_green: var(--theme_dark--callout_green); - --theme--callout_green-text: var(--theme_dark--callout_green-text); - --theme--callout_blue: var(--theme_dark--callout_blue); - --theme--callout_blue-text: var(--theme_dark--callout_blue-text); - --theme--callout_purple: var(--theme_dark--callout_purple); - --theme--callout_purple-text: var(--theme_dark--callout_purple-text); - --theme--callout_pink: var(--theme_dark--callout_pink); - --theme--callout_pink-text: var(--theme_dark--callout_pink-text); - --theme--callout_red: var(--theme_dark--callout_red); - --theme--callout_red-text: var(--theme_dark--callout_red-text); - --theme--code_inline-text: var(--theme_dark--code_inline-text); - --theme--code_inline-background: var(--theme_dark--code_inline-background); - --theme--code-text: var(--theme_dark--code-text); - --theme--code-background: var(--theme_dark--code-background); - --theme--code_function: var(--theme_dark--code_function); - --theme--code_parameter: var(--theme_dark--code_parameter); - --theme--code_keyword: var(--theme_dark--code_keyword); - --theme--code_constant: var(--theme_dark--code_constant); - --theme--code_tag: var(--theme_dark--code_tag); - --theme--code_operator: var(--theme_dark--code_operator); - --theme--code_important: var(--theme_dark--code_important); - --theme--code_regex: var(--theme_dark--code_regex); - --theme--code_property: var(--theme_dark--code_property); - --theme--code_builtin: var(--theme_dark--code_builtin); - --theme--code_class-name: var(--theme_dark--code_class-name); - --theme--code_attr-name: var(--theme_dark--code_attr-name); - --theme--code_attr-value: var(--theme_dark--code_attr-value); - --theme--code_selector: var(--theme_dark--code_selector); - --theme--code_id: var(--theme_dark--code_id); - --theme--code_class: var(--theme_dark--code_class); - --theme--code_pseudo-element: var(--theme_dark--code_pseudo-element); - --theme--code_pseudo-class: var(--theme_dark--code_pseudo-class); - --theme--code_attribute: var(--theme_dark--code_attribute); - --theme--code_value: var(--theme_dark--code_value); - --theme--code_unit: var(--theme_dark--code_unit); - --theme--code_comment: var(--theme_dark--code_comment); - --theme--code_punctuation: var(--theme_dark--code_punctuation); - --theme--code_annotation: var(--theme_dark--code_annotation); - --theme--code_decorator: var(--theme_dark--code_decorator); - --theme--code_doctype: var(--theme_dark--code_doctype); - --theme--code_number: var(--theme_dark--code_number); - --theme--code_string: var(--theme_dark--code_string); - --theme--code_boolean: var(--theme_dark--code_boolean); -} - -.notion-light-theme { - --theme--main: var(--theme_light--main); - --theme--sidebar: var(--theme_light--sidebar); - --theme--overlay: var(--theme_light--overlay); - --theme--dragarea: var(--theme_light--dragarea); - --theme--box-shadow: var(--theme_light--box-shadow); - --theme--box-shadow_strong: var(--theme_light--box-shadow_strong); - --theme--page_normal-width: var(--theme_light--page_normal-width); - --theme--page_full-width: var(--theme_light--page_full-width); - --theme--page-padding: var(--theme_light--page-padding); - --theme--page_banner-height: var(--theme_light--page_banner-height); - --theme--preview-width: var(--theme_light--preview-width); - --theme--preview-padding: var(--theme_light--preview-padding); - --theme--preview_banner-height: var(--theme_light--preview_banner-height); - --theme--font_sans: var(--theme_light--font_sans); - --theme--font_serif: var(--theme_light--font_serif); - --theme--font_mono: var(--theme_light--font_mono); - --theme--font_code: var(--theme_light--font_code); - --theme--font_quote: var(--theme_light--font_quote); - --theme--font_headings: var(--theme_light--font_headings); - --theme--font_title-size: var(--theme_light--font_title-size); - --theme--font_heading1-size: var(--theme_light--font_heading1-size); - --theme--font_heading2-size: var(--theme_light--font_heading2-size); - --theme--font_heading3-size: var(--theme_light--font_heading3-size); - --theme--font_label-size: var(--theme_light--font_label-size); - --theme--font_body-size: var(--theme_light--font_body-size); - --theme--font_body-size_small: var(--theme_light--font_body-size_small); - --theme--font_code-size: var(--theme_light--font_code-size); - --theme--font_sidebar-size: var(--theme_light--font_sidebar-size); - --theme--text-block_line-height: var(--theme_light--text-block_line-height); - --theme--text-block_margin-top: var(--theme_light--text-block_margin-top); - --theme--scrollbar: var(--theme_light--scrollbar); - --theme--scrollbar-border: var(--theme_light--scrollbar-border); - --theme--scrollbar_hover: var(--theme_light--scrollbar_hover); - --theme--card: var(--theme_light--card); - --theme--gallery: var(--theme_light--gallery); - --theme--select_input: var(--theme_light--select_input); - --theme--table-border: var(--theme_light--table-border); - --theme--table-border_row: var(--theme_light--table-border_row); - --theme--table-border_column: var(--theme_light--table-border_column); - --theme--table-border_selected: var(--theme_light--table-border_selected); - --theme--ui-border: var(--theme_light--ui-border); - --theme--interactive_hover: var(--theme_light--interactive_hover); - --theme--interactive_hover-border: var( - --theme_light--interactive_hover-border - ); - --theme--button_close: var(--theme_light--button_close); - --theme--button_close-fill: var(--theme_light--button_close-fill); - --theme--selected: var(--theme_light--selected); - --theme--primary: var(--theme_light--primary); - --theme--primary_text: var(--theme_light--primary_text); - --theme--primary_hover: var(--theme_light--primary_hover); - --theme--primary_click: var(--theme_light--primary_click); - --theme--primary_indicator: var(--theme_light--primary_indicator); - --theme--primary_indicator_text: var(--theme_light--primary_indicator_text); - --theme--primary_indicator_hover: var(--theme_light--primary_indicator_hover); - --theme--option-color: var(--theme_light--option-color); - --theme--option-background: var(--theme_light--option-background); - --theme--option_hover-color: var(--theme_light--option_hover-color); - --theme--option_hover-background: var(--theme_light--option_hover-background); - --theme--option_active-color: var(--theme_light--option_active-color); - --theme--option_active-background: var( - --theme_light--option_active-background - ); - --theme--danger_text: var(--theme_light--danger_text); - --theme--danger_border: var(--theme_light--danger_border); - --theme--divider: var(--theme_light--divider); - --theme--text: var(--theme_light--text); - --theme--text_ui: var(--theme_light--text_ui); - --theme--text_ui_info: var(--theme_light--text_ui_info); - --theme--text_gray: var(--theme_light--text_gray); - --theme--text_brown: var(--theme_light--text_brown); - --theme--text_orange: var(--theme_light--text_orange); - --theme--text_yellow: var(--theme_light--text_yellow); - --theme--text_green: var(--theme_light--text_green); - --theme--text_blue: var(--theme_light--text_blue); - --theme--text_purple: var(--theme_light--text_purple); - --theme--text_pink: var(--theme_light--text_pink); - --theme--text_red: var(--theme_light--text_red); - --theme--select-text: var(--theme_light--select-text); - --theme--bg-text: var(--theme_light--bg-text); - --theme--bg_gray: var(--theme_light--bg_gray); - --theme--bg_gray-text: var(--theme_light--bg_gray-text); - --theme--bg_brown: var(--theme_light--bg_brown); - --theme--bg_brown-text: var(--theme_light--bg_brown-text); - --theme--bg_orange: var(--theme_light--bg_orange); - --theme--bg_orange-text: var(--theme_light--bg_orange-text); - --theme--bg_yellow: var(--theme_light--bg_yellow); - --theme--bg_yellow-text: var(--theme_light--bg_yellow-text); - --theme--bg_green: var(--theme_light--bg_green); - --theme--bg_green-text: var(--theme_light--bg_green-text); - --theme--bg_blue: var(--theme_light--bg_blue); - --theme--bg_blue-text: var(--theme_light--bg_blue-text); - --theme--bg_purple: var(--theme_light--bg_purple); - --theme--bg_purple-text: var(--theme_light--bg_purple-text); - --theme--bg_pink: var(--theme_light--bg_pink); - --theme--bg_pink-text: var(--theme_light--bg_pink-text); - --theme--bg_red: var(--theme_light--bg_red); - --theme--bg_red-text: var(--theme_light--bg_red-text); - --theme--line-text: var(--theme_light--line-text); - --theme--line_gray: var(--theme_light--line_gray); - --theme--line_gray-text: var(--theme_light--line_gray-text); - --theme--line_brown: var(--theme_light--line_brown); - --theme--line_brown-text: var(--theme_light--line_brown-text); - --theme--line_orange: var(--theme_light--line_orange); - --theme--line_orange-text: var(--theme_light--line_orange-text); - --theme--line_yellow: var(--theme_light--line_yellow); - --theme--line_yellow-text: var(--theme_light--line_yellow-text); - --theme--line_green: var(--theme_light--line_green); - --theme--line_green-text: var(--theme_light--line_green-text); - --theme--line_blue: var(--theme_light--line_blue); - --theme--line_blue-text: var(--theme_light--line_blue-text); - --theme--line_purple: var(--theme_light--line_purple); - --theme--line_purple-text: var(--theme_light--line_purple-text); - --theme--line_pink: var(--theme_light--line_pink); - --theme--line_pink-text: var(--theme_light--line_pink-text); - --theme--line_red: var(--theme_light--line_red); - --theme--line_red-text: var(--theme_light--line_red-text); - --theme--select_gray: var(--theme_light--select_gray); - --theme--select_gray-text: var(--theme_light--select_gray-text); - --theme--select_brown: var(--theme_light--select_brown); - --theme--select_brown-text: var(--theme_light--select_brown-text); - --theme--select_orange: var(--theme_light--select_orange); - --theme--select_orange-text: var(--theme_light--select_orange-text); - --theme--select_yellow: var(--theme_light--select_yellow); - --theme--select_yellow-text: var(--theme_light--select_yellow-text); - --theme--select_green: var(--theme_light--select_green); - --theme--select_green-text: var(--theme_light--select_green-text); - --theme--select_blue: var(--theme_light--select_blue); - --theme--select_blue-text: var(--theme_light--select_blue-text); - --theme--select_purple: var(--theme_light--select_purple); - --theme--select_purple-text: var(--theme_light--select_purple-text); - --theme--select_pink: var(--theme_light--select_pink); - --theme--select_pink-text: var(--theme_light--select_pink-text); - --theme--select_red: var(--theme_light--select_red); - --theme--select_red-text: var(--theme_light--select_red-text); - --theme--callout-text: var(--theme_light--callout-text); - --theme--callout_gray: var(--theme_light--callout_gray); - --theme--callout_gray-text: var(--theme_light--callout_gray-text); - --theme--callout_brown: var(--theme_light--callout_brown); - --theme--callout_brown-text: var(--theme_light--callout_brown-text); - --theme--callout_orange: var(--theme_light--callout_orange); - --theme--callout_orange-text: var(--theme_light--callout_orange-text); - --theme--callout_yellow: var(--theme_light--callout_yellow); - --theme--callout_yellow-text: var(--theme_light--callout_yellow-text); - --theme--callout_green: var(--theme_light--callout_green); - --theme--callout_green-text: var(--theme_light--callout_green-text); - --theme--callout_blue: var(--theme_light--callout_blue); - --theme--callout_blue-text: var(--theme_light--callout_blue-text); - --theme--callout_purple: var(--theme_light--callout_purple); - --theme--callout_purple-text: var(--theme_light--callout_purple-text); - --theme--callout_pink: var(--theme_light--callout_pink); - --theme--callout_pink-text: var(--theme_light--callout_pink-text); - --theme--callout_red: var(--theme_light--callout_red); - --theme--callout_red-text: var(--theme_light--callout_red-text); - --theme--code_inline-text: var(--theme_light--code_inline-text); - --theme--code_inline-background: var(--theme_light--code_inline-background); - --theme--code-text: var(--theme_light--code-text); - --theme--code-background: var(--theme_light--code-background); - --theme--code_function: var(--theme_light--code_function); - --theme--code_parameter: var(--theme_light--code_parameter); - --theme--code_keyword: var(--theme_light--code_keyword); - --theme--code_constant: var(--theme_light--code_constant); - --theme--code_tag: var(--theme_light--code_tag); - --theme--code_operator: var(--theme_light--code_operator); - --theme--code_important: var(--theme_light--code_important); - --theme--code_regex: var(--theme_light--code_regex); - --theme--code_property: var(--theme_light--code_property); - --theme--code_builtin: var(--theme_light--code_builtin); - --theme--code_class-name: var(--theme_light--code_class-name); - --theme--code_attr-name: var(--theme_light--code_attr-name); - --theme--code_attr-value: var(--theme_light--code_attr-value); - --theme--code_selector: var(--theme_light--code_selector); - --theme--code_id: var(--theme_light--code_id); - --theme--code_class: var(--theme_light--code_class); - --theme--code_pseudo-element: var(--theme_light--code_pseudo-element); - --theme--code_pseudo-class: var(--theme_light--code_pseudo-class); - --theme--code_attribute: var(--theme_light--code_attribute); - --theme--code_value: var(--theme_light--code_value); - --theme--code_unit: var(--theme_light--code_unit); - --theme--code_comment: var(--theme_light--code_comment); - --theme--code_punctuation: var(--theme_light--code_punctuation); - --theme--code_annotation: var(--theme_light--code_annotation); - --theme--code_decorator: var(--theme_light--code_decorator); - --theme--code_doctype: var(--theme_light--code_doctype); - --theme--code_number: var(--theme_light--code_number); - --theme--code_string: var(--theme_light--code_string); - --theme--code_boolean: var(--theme_light--code_boolean); -} diff --git a/repo/tabs/mod.js b/repo/tabs/mod.js deleted file mode 100644 index 7e9d7dc..0000000 --- a/repo/tabs/mod.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * tabs - * (c) 2020 dragonwocky (https://dragonwocky.me/) - * under the MIT license - */ - -'use strict'; - -// this is just a pseudo mod to "separate" the options -// from the core module - the core still handles actually -// making it work. -module.exports = { - id: 'e1692c29-475e-437b-b7ff-3eee872e1a42', - tags: ['core', 'extension'], - name: 'tabs', - desc: 'have multiple notion pages open in a single window.', - version: '0.1.0', - author: 'dragonwocky', - options: [ - { - key: 'select_modifier', - label: - 'tab select modifier (key+1, +2, +3, ... +9 and key+left/right arrows):', - type: 'select', - value: [ - 'Alt', - 'Command', - 'Control', - 'Super', - 'Alt+Shift', - 'Command+Shift', - 'Control+Shift', - 'Super+Shift', - ], - }, - { - key: 'new_tab', - label: 'new tab keybinding:', - type: 'input', - value: 'CommandOrControl+T', - }, - { - key: 'close_tab', - label: 'close tab keybinding:', - type: 'input', - value: 'CommandOrControl+W', - }, - ], -};