mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-06 21:49:03 +00:00
update imports for api folder structure
This commit is contained in:
parent
6ee8086b51
commit
6874b905eb
@ -50,6 +50,7 @@
|
|||||||
[style*='position: absolute; top: 3px; left: -20px; width: 18px; height: 24px; pointer-events: auto; cursor: -webkit-grab;']
|
[style*='position: absolute; top: 3px; left: -20px; width: 18px; height: 24px; pointer-events: auto; cursor: -webkit-grab;']
|
||||||
[data-block-id] {
|
[data-block-id] {
|
||||||
background: var(--theme--bg) !important;
|
background: var(--theme--bg) !important;
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
.notion-frame
|
.notion-frame
|
||||||
> [style*='position: absolute; top: 0px; left: 0px;']
|
> [style*='position: absolute; top: 0px; left: 0px;']
|
||||||
@ -90,5 +91,5 @@
|
|||||||
[style*='position: absolute; top: 3px; left: -20px; width: 18px; height: 24px; pointer-events: auto; cursor: -webkit-grab;']
|
[style*='position: absolute; top: 3px; left: -20px; width: 18px; height: 24px; pointer-events: auto; cursor: -webkit-grab;']
|
||||||
+ .notion-focusable
|
+ .notion-focusable
|
||||||
> .plus:hover {
|
> .plus:hover {
|
||||||
background: rgba(255, 255, 255, 0.1) !important;
|
background: var(--theme--ui_interactive-hover) !important;
|
||||||
}
|
}
|
||||||
|
0
repo/integrated-titlebar/buttons.css
Normal file
0
repo/integrated-titlebar/buttons.css
Normal file
11
repo/integrated-titlebar/client.mjs
Normal file
11
repo/integrated-titlebar/client.mjs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* notion-enhancer: integrated titlebar
|
||||||
|
* (c) 2021 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
||||||
|
* (https://notion-enhancer.github.io/) under the MIT license
|
||||||
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
export default async function (api, db) {
|
||||||
|
//
|
||||||
|
}
|
82
repo/integrated-titlebar/createWindow.cjs
Normal file
82
repo/integrated-titlebar/createWindow.cjs
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* notion-enhancer: integrated titlebar
|
||||||
|
* (c) 2021 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
||||||
|
* (https://notion-enhancer.github.io/) under the MIT license
|
||||||
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = async function (api, db, __exports) {
|
||||||
|
const notionCreateWindow = __exports.createWindow;
|
||||||
|
// __exports.createWindow = (relativeUrl = '', args) => {
|
||||||
|
// const windowState = require('electron-window-state').default({
|
||||||
|
// defaultWidth: 1320,
|
||||||
|
// defaultHeight: 860,
|
||||||
|
// });
|
||||||
|
// const focusedWindow = electron_1.BrowserWindow.getFocusedWindow();
|
||||||
|
// const rect = getRectFromFocusedWindow(windowState);
|
||||||
|
// const windowCreationArgs = Object.assign(Object.assign({}, rect), {
|
||||||
|
// show: false,
|
||||||
|
// backgroundColor: '#ffffff',
|
||||||
|
// titleBarStyle: 'hiddenInset',
|
||||||
|
// autoHideMenuBar: true,
|
||||||
|
// webPreferences: {
|
||||||
|
// preload: path_1.default.resolve(__dirname, '../renderer/index.js'),
|
||||||
|
// webviewTag: true,
|
||||||
|
// session: electron_1.session.fromPartition(constants_1.electronSessionPartition),
|
||||||
|
// enableRemoteModule: true,
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
// const { window, warmed } = getNextWindow(windowCreationArgs);
|
||||||
|
// window.setMenuBarVisibility(false);
|
||||||
|
// warmWindowState.warmedWindow = undefined;
|
||||||
|
// window.once('ready-to-show', () => {
|
||||||
|
// if (args && args.isLocalhost) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// if (!warmed) {
|
||||||
|
// window.show();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// if (warmed) {
|
||||||
|
// if (warmWindowState.warmedLoaded) {
|
||||||
|
// notionIpc.sendMainToNotionWindow(window, 'notion:navigate-to-url', relativeUrl);
|
||||||
|
// } else {
|
||||||
|
// void window.loadURL(urlHelpers_1.getIndexUrl(relativeUrl));
|
||||||
|
// }
|
||||||
|
// window.setBounds(getRectFromFocusedWindow(windowState));
|
||||||
|
// window.show();
|
||||||
|
// } else {
|
||||||
|
// void window.loadURL(urlHelpers_1.getIndexUrl(relativeUrl));
|
||||||
|
// }
|
||||||
|
// if (focusedWindow) {
|
||||||
|
// if (focusedWindow.isFullScreen()) {
|
||||||
|
// window.setFullScreen(true);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (windowState.isFullScreen) {
|
||||||
|
// window.setFullScreen(true);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// window.on('close', () => {
|
||||||
|
// windowState.saveState(window);
|
||||||
|
// if (process.platform === 'win32') {
|
||||||
|
// const currentWindows = electron_1.BrowserWindow.getAllWindows();
|
||||||
|
// const hasNoOtherOpenWindows = currentWindows.every((currentWindow) =>
|
||||||
|
// Boolean(
|
||||||
|
// currentWindow.id === window.id ||
|
||||||
|
// (warmWindowState.warmedWindow &&
|
||||||
|
// currentWindow.id === warmWindowState.warmedWindow.id)
|
||||||
|
// )
|
||||||
|
// );
|
||||||
|
// if (hasNoOtherOpenWindows) {
|
||||||
|
// electron_2.app.quit();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// setImmediate(() => {
|
||||||
|
// warmWindowState.warmedLoaded = false;
|
||||||
|
// });
|
||||||
|
// return window;
|
||||||
|
// };
|
||||||
|
};
|
11
repo/integrated-titlebar/menu.mjs
Normal file
11
repo/integrated-titlebar/menu.mjs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* notion-enhancer: integrated titlebar
|
||||||
|
* (c) 2021 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
||||||
|
* (https://notion-enhancer.github.io/) under the MIT license
|
||||||
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
export default async function (api, db) {
|
||||||
|
//
|
||||||
|
}
|
34
repo/integrated-titlebar/mod.json
Normal file
34
repo/integrated-titlebar/mod.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"name": "integrated titlebar",
|
||||||
|
"id": "a5658d03-21c6-4088-bade-fa4780459133",
|
||||||
|
"environments": ["linux", "win32"],
|
||||||
|
"version": "0.11.0",
|
||||||
|
"description": "replaces the native window titlebar with buttons inset into the app.",
|
||||||
|
"tags": ["extension", "layout"],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "dragonwocky",
|
||||||
|
"email": "thedragonring.bod@gmail.com",
|
||||||
|
"homepage": "https://dragonwocky.me/",
|
||||||
|
"avatar": "https://dragonwocky.me/avatar.jpg"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"css": {
|
||||||
|
"client": ["buttons.css"],
|
||||||
|
"menu": ["buttons.css"]
|
||||||
|
},
|
||||||
|
"js": {
|
||||||
|
"client": ["client.mjs"],
|
||||||
|
"menu": ["menu.mjs"],
|
||||||
|
"electron": [{ "source": "createWindow.cjs", "target": "main/createWindow.js" }]
|
||||||
|
},
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"type": "toggle",
|
||||||
|
"key": "tiling",
|
||||||
|
"label": "tiling window manager mode",
|
||||||
|
"tooltip": "**completely remove the close/minimise/maximise buttons** (only for advanced use, not recommended)",
|
||||||
|
"value": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { fmt, web, registry, components } from '../../api/_.mjs';
|
import { fmt, web, registry, components } from '../../api/index.mjs';
|
||||||
import { notifications } from './notifications.mjs';
|
import { notifications } from './notifications.mjs';
|
||||||
|
|
||||||
export const modComponents = {
|
export const modComponents = {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as api from '../../api/_.mjs';
|
import * as api from '../../api/index.mjs';
|
||||||
import { notifications, $changelogModal } from './notifications.mjs';
|
import { notifications, $changelogModal } from './notifications.mjs';
|
||||||
import { modComponents, options } from './components.mjs';
|
import { modComponents, options } from './components.mjs';
|
||||||
import * as router from './router.mjs';
|
import * as router from './router.mjs';
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* (https://notion-enhancer.github.io/) under the MIT license
|
* (https://notion-enhancer.github.io/) under the MIT license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { env, fs, storage, fmt, web, components } from '../../api/_.mjs';
|
import { env, fs, storage, fmt, web, components } from '../../api/index.mjs';
|
||||||
import { tw } from './styles.mjs';
|
import { tw } from './styles.mjs';
|
||||||
|
|
||||||
const notificationsURL = 'https://notion-enhancer.github.io/notifications.json';
|
const notificationsURL = 'https://notion-enhancer.github.io/notifications.json';
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { web } from '../../api/_.mjs';
|
import { web } from '../../api/index.mjs';
|
||||||
|
|
||||||
const _queryListeners = new Set();
|
const _queryListeners = new Set();
|
||||||
|
|
||||||
|
@ -10,21 +10,21 @@
|
|||||||
|
|
||||||
import { tw, apply, setup } from '../../dep/twind.mjs';
|
import { tw, apply, setup } from '../../dep/twind.mjs';
|
||||||
import { content } from '../../dep/twind-content.mjs';
|
import { content } from '../../dep/twind-content.mjs';
|
||||||
const pseudoContent = content('""');
|
|
||||||
|
|
||||||
const mapColorVariables = (color) => ({
|
const pseudoContent = content('""'),
|
||||||
'text': `var(--theme--text_${color})`,
|
mapColorVariables = (color) => ({
|
||||||
'highlight': `var(--theme--highlight_${color})`,
|
'text': `var(--theme--text_${color})`,
|
||||||
'highlight-text': `var(--theme--highlight_${color}-text)`,
|
'highlight': `var(--theme--highlight_${color})`,
|
||||||
'callout': `var(--theme--callout_${color})`,
|
'highlight-text': `var(--theme--highlight_${color}-text)`,
|
||||||
'callout-text': `var(--theme--callout_${color}-text)`,
|
'callout': `var(--theme--callout_${color})`,
|
||||||
'tag': `var(--theme--tag_${color})`,
|
'callout-text': `var(--theme--callout_${color}-text)`,
|
||||||
'tag-text': `var(--theme--tag_${color}-text)`,
|
'tag': `var(--theme--tag_${color})`,
|
||||||
'board': `var(--theme--board_${color})`,
|
'tag-text': `var(--theme--tag_${color}-text)`,
|
||||||
'board-text': `var(--theme--board_${color}-text)`,
|
'board': `var(--theme--board_${color})`,
|
||||||
'board-card': `var(--theme--board_${color}-card)`,
|
'board-text': `var(--theme--board_${color}-text)`,
|
||||||
'board-card_text': `var(--theme--board_${color}-card_text)`,
|
'board-card': `var(--theme--board_${color}-card)`,
|
||||||
});
|
'board-card_text': `var(--theme--board_${color}-card_text)`,
|
||||||
|
});
|
||||||
|
|
||||||
const customClasses = {
|
const customClasses = {
|
||||||
'notifications-container': apply`absolute bottom-0 right-0 px-4 py-3 max-w-full w-96 z-10`,
|
'notifications-container': apply`absolute bottom-0 right-0 px-4 py-3 max-w-full w-96 z-10`,
|
||||||
|
@ -2,21 +2,9 @@
|
|||||||
"menu",
|
"menu",
|
||||||
"theming",
|
"theming",
|
||||||
"components",
|
"components",
|
||||||
|
|
||||||
|
"integrated-titlebar",
|
||||||
"tweaks",
|
"tweaks",
|
||||||
|
|
||||||
"material-ocean",
|
|
||||||
"cherry-cola",
|
|
||||||
"dark+",
|
|
||||||
"light+",
|
|
||||||
"dracula",
|
|
||||||
"pastel-dark",
|
|
||||||
"neutral",
|
|
||||||
"nord",
|
|
||||||
"gruvbox-dark",
|
|
||||||
"gruvbox-light",
|
|
||||||
"playful-purple",
|
|
||||||
"pinky-boom",
|
|
||||||
|
|
||||||
"font-chooser",
|
"font-chooser",
|
||||||
"outliner",
|
"outliner",
|
||||||
"scroll-to-top",
|
"scroll-to-top",
|
||||||
@ -37,5 +25,18 @@
|
|||||||
"global-block-links",
|
"global-block-links",
|
||||||
|
|
||||||
"icon-sets",
|
"icon-sets",
|
||||||
"quick-note"
|
"quick-note",
|
||||||
|
|
||||||
|
"material-ocean",
|
||||||
|
"cherry-cola",
|
||||||
|
"dark+",
|
||||||
|
"light+",
|
||||||
|
"dracula",
|
||||||
|
"pastel-dark",
|
||||||
|
"neutral",
|
||||||
|
"nord",
|
||||||
|
"gruvbox-dark",
|
||||||
|
"gruvbox-light",
|
||||||
|
"playful-purple",
|
||||||
|
"pinky-boom"
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user