add browser plugin
This commit is contained in:
@@ -74,7 +74,7 @@ class PluginRegistry {
|
||||
}
|
||||
const getDefaultConfig = () => {
|
||||
return {
|
||||
activeAdapter: "supabase",
|
||||
activeAdapter: "browser",
|
||||
theme: "dark"
|
||||
};
|
||||
};
|
||||
|
||||
58
package-lock.json
generated
58
package-lock.json
generated
@@ -12,8 +12,9 @@
|
||||
"@electron-toolkit/preload": "^3.0.2",
|
||||
"@electron-toolkit/utils": "^4.0.0",
|
||||
"@fuzzco/font-loader": "^1.0.2",
|
||||
"@takerofnotes/plugin-filesystem": "^0.2.0",
|
||||
"@takerofnotes/plugin-supabase": "^0.1.0",
|
||||
"@takerofnotes/plugin-browser": "^0.2.0",
|
||||
"@takerofnotes/plugin-filesystem": "^0.3.0",
|
||||
"@takerofnotes/plugin-supabase": "^0.2.0",
|
||||
"@tiptap/extension-code-block-lowlight": "^3.20.0",
|
||||
"@tiptap/extension-document": "^3.19.0",
|
||||
"@tiptap/extension-highlight": "^3.20.0",
|
||||
@@ -2339,41 +2340,54 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@takerofnotes/plugin-filesystem": {
|
||||
"node_modules/@takerofnotes/plugin-browser": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@takerofnotes/plugin-filesystem/-/plugin-filesystem-0.2.0.tgz",
|
||||
"integrity": "sha512-BP7HBN0SKAqBiv5pDtXpyVmkW9UrOnPXpKeThTwQTIShHyN5aPaD8ZEyv8+vfTSs3qnXWGplNdEPVjbQmc27+Q==",
|
||||
"resolved": "https://registry.npmjs.org/@takerofnotes/plugin-browser/-/plugin-browser-0.2.0.tgz",
|
||||
"integrity": "sha512-CexK/RO3EZNKkxx4eptU7CDJJ6EjR0k02DPyUuYsCnjOmjVnP73zNtJbB/hb6MeAEH91aH7UENHqd4r2KxKPeA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@takerofnotes/plugin-sdk": "^0.3.1"
|
||||
"@takerofnotes/plugin-sdk": "^0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@takerofnotes/plugin-filesystem": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@takerofnotes/plugin-filesystem/-/plugin-filesystem-0.3.0.tgz",
|
||||
"integrity": "sha512-c7kXRPfaUpqWGzZJ6Ac9bPUKAKxND6HRRgTpAbBE36254SGS6kwdxmejNtwDOh5+VjK7IQ+25emGVGOyVImq8w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@takerofnotes/plugin-sdk": "^0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@takerofnotes/plugin-sdk": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@takerofnotes/plugin-sdk/-/plugin-sdk-0.3.1.tgz",
|
||||
"integrity": "sha512-9GfPKyu1n52N00zYlLK32wdmGdc2uSd0jTj6UEixauW0TXn/7hD6SLpLRGSXcfZOJGGoi3iQk4MfjNsthe2ucw==",
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@takerofnotes/plugin-sdk/-/plugin-sdk-0.4.0.tgz",
|
||||
"integrity": "sha512-eAutJ1y237VHsqn95tkub37sGtChZzSIXybJKx6+qRS1ymkL9i5pptRq3Gywsi3kDj7uqT8vi7HMDF0rz9yEjg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"semver": "^7.7.4",
|
||||
"zod": "^4.3.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@takerofnotes/plugin-sdk/node_modules/semver": {
|
||||
"version": "7.7.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
|
||||
"integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@takerofnotes/plugin-supabase": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@takerofnotes/plugin-supabase/-/plugin-supabase-0.1.0.tgz",
|
||||
"integrity": "sha512-NXmiyOAjVHXSFyzOPwljngrjwe1KZEzFiQjImI5XbjxtMJiAg6TFSbqLAnZaIZqg2WpAcBdZKy941WmkXJfNXA==",
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@takerofnotes/plugin-supabase/-/plugin-supabase-0.2.0.tgz",
|
||||
"integrity": "sha512-QSHj/yeHzFlt3EXQjkKzE1TyWj+T9FjJVejMZjyK4iXgc//48IXe1UEd+lWOJ683WCpinTRZbLYpbjat6cTo3A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@supabase/supabase-js": "^2.98.0",
|
||||
"@takerofnotes/plugin-sdk": "^0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@takerofnotes/plugin-supabase/node_modules/@takerofnotes/plugin-sdk": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@takerofnotes/plugin-sdk/-/plugin-sdk-0.2.0.tgz",
|
||||
"integrity": "sha512-6Ll+EnO/9B51jf3tKXGkByj9lRTodYJogIuCJ1xh7uTxorJ5tcpBXv49dtXNYmGYEtpVt80G26/kQzm3J54DoA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"zod": "^4.3.6"
|
||||
"@takerofnotes/plugin-sdk": "^0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@tiptap/core": {
|
||||
|
||||
@@ -28,8 +28,9 @@
|
||||
"@electron-toolkit/preload": "^3.0.2",
|
||||
"@electron-toolkit/utils": "^4.0.0",
|
||||
"@fuzzco/font-loader": "^1.0.2",
|
||||
"@takerofnotes/plugin-filesystem": "^0.2.0",
|
||||
"@takerofnotes/plugin-supabase": "^0.1.0",
|
||||
"@takerofnotes/plugin-browser": "^0.2.0",
|
||||
"@takerofnotes/plugin-filesystem": "^0.3.0",
|
||||
"@takerofnotes/plugin-supabase": "^0.2.0",
|
||||
"@tiptap/extension-code-block-lowlight": "^3.20.0",
|
||||
"@tiptap/extension-document": "^3.19.0",
|
||||
"@tiptap/extension-highlight": "^3.20.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const getDefaultConfig = () => {
|
||||
return {
|
||||
activeAdapter: 'supabase',
|
||||
activeAdapter: 'browser',
|
||||
theme: 'dark',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
const USER_DATA_STRING = '__DEFAULT_USER_DATA__'
|
||||
const DB_NAME = 'takerofnotes'
|
||||
const DB_VERSION = 1
|
||||
const STORE_NAME = 'config'
|
||||
|
||||
@@ -28,10 +28,8 @@ const initPluginManager = (runtime, plugins, config) => {
|
||||
}
|
||||
|
||||
const manager = createPluginManager(registry)
|
||||
manager.setActivePlugin(
|
||||
config.activeAdapter,
|
||||
config.adapters[config.activeAdapter],
|
||||
)
|
||||
const activeConfig = config.adapters?.[config.activeAdapter] || {}
|
||||
manager.setActivePlugin(config.activeAdapter, activeConfig)
|
||||
|
||||
return manager
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useEnvironment } from '@/composables/useEnvironment'
|
||||
import { initializeCore } from '@core/index.js'
|
||||
import supabasePlugin from '@takerofnotes/plugin-supabase'
|
||||
import browserPlugin from '@takerofnotes/plugin-browser'
|
||||
|
||||
export const initCore = async (app) => {
|
||||
const environment = useEnvironment()
|
||||
@@ -9,7 +10,7 @@ export const initCore = async (app) => {
|
||||
const runtime = environment === 'electron' ? 'electron-renderer' : 'web'
|
||||
|
||||
// Plugins that are valid for web (electron uses IPC)
|
||||
const plugins = [supabasePlugin]
|
||||
const plugins = [supabasePlugin, browserPlugin]
|
||||
|
||||
const core = await initializeCore(runtime, {
|
||||
plugins,
|
||||
|
||||
Reference in New Issue
Block a user