Skip to content

Commit

Permalink
wip, zotero poc
Browse files Browse the repository at this point in the history
  • Loading branch information
Weihua Lu committed Jul 7, 2021
1 parent c30449e commit ab21d88
Show file tree
Hide file tree
Showing 64 changed files with 1,791 additions and 712 deletions.
1 change: 1 addition & 0 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
:sha "5704fbf48d3478eedcf24d458c8964b3c2fd59a9"}
cljs-drag-n-drop/cljs-drag-n-drop
{:mvn/version "0.1.0"}
cljs-http/cljs-http {:mvn/version "0.1.46"}
borkdude/sci {:mvn/version "0.1.1-alpha.6"}
hickory/hickory {:mvn/version "0.7.1"}
hiccups/hiccups {:mvn/version "0.3.0"}
Expand Down
11 changes: 10 additions & 1 deletion externs.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,16 @@ dummy.transaction = function() {};
dummy.getPath = function() {};
dummy.getDoc = function() {};
dummy.setValue = function() {};

dummy.data = function() {};
dummy.triangle = function() {};
dummy.vee = function() {};
dummy.destroy = function() {};
dummy.changeData = function() {};
dummy.layout = function() {};
dummy.render = function() {};
dummy.get = function() {};
dummy.addItem = function() {};
dummy.removeItem = function() {};

/**
* @typedef {{
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"private": true,
"main": "static/electron.js",
"devDependencies": {
"@tailwindcss/jit": "^0.1.1",
"@tailwindcss/ui": "0.7.2",
"@types/gulp": "^4.0.7",
"cross-env": "^7.0.3",
Expand All @@ -20,10 +19,10 @@
"postcss-import-ext-glob": "^2.0.1",
"postcss-nested": "5.0.5",
"purgecss": "4.0.2",
"shadow-cljs": "^2.12.5",
"shadow-cljs": "2.12.5",
"stylelint": "^13.8.0",
"stylelint-config-standard": "^20.0.0",
"tailwindcss": "2.0.3"
"tailwindcss": "2.2.4"
},
"scripts": {
"watch": "run-p gulp:watch cljs:watch",
Expand All @@ -45,13 +44,13 @@
"gulp:build": "cross-env NODE_ENV=production gulp build",
"css:build": "postcss tailwind.all.css -o static/css/style.css --verbose --env production",
"css:watch": "postcss tailwind.all.css -o static/css/style.css --verbose --watch",
"cljs:watch": "clojure -M:cljs watch app publishing electron",
"cljs:watch": "clojure -M:cljs watch app publishing electron cards",
"cljs:electron-watch": "clojure -M:cljs watch app electron",
"cljs:release": "clojure -M:cljs release app publishing electron",
"cljs:electron-release": "clojure -M:cljs release app publishing electron --config-merge '{:asset-path \"./js\"}'",
"cljs:test": "clojure -M:test compile test",
"cljs:run-test": "node static/tests.js",
"cljs:watch-app": "clojure -M:cljs watch app",
"cljs:watch-app": "clojure -M:cljs watch app cards",
"cljs:release-app": "clojure -M:cljs release app",
"cljs:release-publishing": "clojure -M:cljs release publishing",
"cljs:dev-release-app": "clojure -M:cljs release app --config-merge '{:closure-defines {frontend.config/DEV-RELEASE true}}'",
Expand All @@ -69,19 +68,22 @@
"codemirror": "^5.58.1",
"cypress-clojurescript-preprocessor": "^0.1.4",
"cypress-real-events": "^1.5.0",
"d3-force": "^3.0.0",
"diff": "5.0.0",
"diff-match-patch": "^1.0.5",
"electron": "^13.0.0",
"fs": "^0.0.1-security",
"fs-extra": "^9.1.0",
"fuse.js": "^6.4.6",
"graphology": "^0.20.0",
"gulp-cached": "^1.1.1",
"highlight.js": "^10.4.1",
"ignore": "^5.1.8",
"is-svg": "4.2.2",
"jszip": "^3.5.0",
"mldoc": "0.8.4",
"path": "^0.12.7",
"pixi-graph-fork": "^0.0.9",
"posthog-js": "^1.10.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand All @@ -92,7 +94,6 @@
"react-tippy": "^1.4.0",
"react-transition-group": "^4.3.0",
"reakit": "^0.11.1",
"url": "^0.11.0",
"yargs-parser": "^20.2.4"
}
}
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module.exports = (ctx) => ({
require('postcss-nested')({}),
require('postcss-import-ext-glob')({}),
require('postcss-import')({}),
require('@tailwindcss/jit')('tailwind.config.js'),
require('tailwindcss')('tailwind.config.js'),
],
})
4 changes: 2 additions & 2 deletions resources/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ html[data-theme='dark'] {

.white-theme,
html[data-theme='light'] {
--ls-primary-background-color: white;
--ls-primary-background-color: #f6f6f6;
--ls-secondary-background-color: #f7f6f4;
--ls-tertiary-background-color: #f1eee8;
--ls-quaternary-background-color: #e8e5de;
Expand Down Expand Up @@ -625,7 +625,7 @@ video {
background-color: rgba(91, 33, 182);
}

.bg-purple-900 {
.bg-purple-900 {
background-color: rgba(76, 29, 149);
}

Expand Down
3 changes: 3 additions & 0 deletions resources/electron-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
<div id="root"></div>
<script>window.__LSP__HOST__ = true</script>
<script>window.user = null</script>
<script>
window.EXCALIDRAW_ASSET_PATH = "./js/";
</script>
<script src="./js/magic_portal.js"></script>
<script>let worker = new Worker('./js/worker.js')
const portal = new MagicPortal(worker);
Expand Down
3 changes: 3 additions & 0 deletions resources/electron.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
<div id="root"></div>
<script>window.__LSP__HOST__ = true</script>
<script>window.user = null</script>
<script>
window.EXCALIDRAW_ASSET_PATH = "./js/";
</script>
<script src="./js/magic_portal.js"></script>
<script>let worker = new Worker('./js/worker.js')
const portal = new MagicPortal(worker);
Expand Down
Binary file added resources/img/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/img/tutorial-thumb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions resources/js/excalidraw-assets/vendor-3525c448906ddcdcb701.js

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
{:app
{:target :browser
:module-loader true
;; handle `require(xxx.css)`
:js-options {:ignore-asset-requires true}
:modules {:main {:init-fn frontend.core/init}
;; :graph
;; {:entries [frontend.extensions.graph.force]
;; :depends-on #{:main}}
:code-editor
{:entries [frontend.extensions.code]
:depends-on #{:main}}
Expand All @@ -21,7 +26,7 @@
:asset-path "/static/js"
:release {:asset-path "https://asset.logseq.com/static/js"}
:compiler-options {:infer-externs :auto
:output-feature-set :es-next
:output-feature-set :es-next-in
:source-map true
:externs ["datascript/externs.js"
"externs.js"]
Expand Down Expand Up @@ -62,7 +67,11 @@
:publishing
{:target :browser
:module-loader true
:js-options {:ignore-asset-requires true}
:modules {:main {:init-fn frontend.publishing/init}
;; :graph
;; {:entries [frontend.extensions.graph.force]
;; :depends-on #{:main}}
:code-editor
{:entries [frontend.extensions.code]
:depends-on #{:main}}
Expand Down
2 changes: 1 addition & 1 deletion src/electron/electron/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
:height (.-height win-state)
:frame true
:titleBarStyle "hiddenInset"
:trafficLightPosition {:x 15 :y 15}
:trafficLightPosition {:x 16 :y 16}
:autoHideMenuBar (not mac?)
:webPreferences
{:plugins true ; pdf
Expand Down
Loading

0 comments on commit ab21d88

Please sign in to comment.