Skip to content

Commit 56eba5b

Browse files
authored
Merge pull request #12225 from logseq/enhance/ios-native-navigation
enhance: native navigation && bottom sheet on iOS
2 parents 22dbcfb + 7ebd89a commit 56eba5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+4759
-3271
lines changed

.carve/ignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,7 @@ frontend.rum/use-atom-in
8787
;; missionary utils
8888
frontend.common.missionary/<!
8989
;; only used in deps/common
90-
frontend.common.missionary/background-task-running?
90+
frontend.common.missionary/background-task-running?
91+
;; defonce
92+
mobile.components.popup/native-sheet-listener
93+
mobile.bottom-tabs/add-tab-listeners!

android/app/capacitor.build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dependencies {
1616
implementation project(':capacitor-camera')
1717
implementation project(':capacitor-clipboard')
1818
implementation project(':capacitor-device')
19+
implementation project(':capacitor-dialog')
1920
implementation project(':capacitor-filesystem')
2021
implementation project(':capacitor-haptics')
2122
implementation project(':capacitor-keyboard')

android/app/src/main/assets/capacitor.plugins.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"pkg": "@capacitor/device",
2828
"classpath": "com.capacitorjs.plugins.device.DevicePlugin"
2929
},
30+
{
31+
"pkg": "@capacitor/dialog",
32+
"classpath": "com.capacitorjs.plugins.dialog.DialogPlugin"
33+
},
3034
{
3135
"pkg": "@capacitor/filesystem",
3236
"classpath": "com.capacitorjs.plugins.filesystem.FilesystemPlugin"

android/capacitor.settings.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ project(':capacitor-clipboard').projectDir = new File('../node_modules/@capacito
2323
include ':capacitor-device'
2424
project(':capacitor-device').projectDir = new File('../node_modules/@capacitor/device/android')
2525

26+
include ':capacitor-dialog'
27+
project(':capacitor-dialog').projectDir = new File('../node_modules/@capacitor/dialog/android')
28+
2629
include ':capacitor-filesystem'
2730
project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android')
2831

deps/cli/src/logseq/cli/commands/search.cljs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
highlight-content-query
3737
#(string/replace % search-term (highlight search-term)))]
3838
(println (string/join "\n"
39-
(->> results
40-
(map #(string/replace % "\n" "\\\\n"))
41-
(map highlight-fn)))))))
39+
(->> results
40+
(map #(string/replace % "\n" "\\\\n"))
41+
(map highlight-fn)))))))
4242

4343
(defn- api-search
4444
[search-term {{:keys [api-server-token raw limit]} :opts}]

deps/common/src/logseq/common/config.cljs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
(catch :default _
6060
false)))
6161

62-
6362
(defn remove-asset-protocol
6463
[s]
6564
(if (local-protocol-asset? s)

deps/graph-parser/src/logseq/graph_parser/mldoc.cljc

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88
:default ["mldoc" :refer [Mldoc]])
99
#?(:org.babashka/nbb [logseq.common.log :as log]
1010
:default [lambdaisland.glogi :as log])
11-
[goog.object :as gobj]
11+
#_:clj-kondo/ignore
1212
[cljs-bean.core :as bean]
13-
[logseq.graph-parser.utf8 :as utf8]
1413
[clojure.string :as string]
15-
[logseq.common.util :as common-util]
14+
[goog.object :as gobj]
1615
[logseq.common.config :as common-config]
17-
#_:clj-kondo/ignore
18-
[logseq.graph-parser.schema.mldoc :as mldoc-schema]
19-
[logseq.db.sqlite.util :as sqlite-util]))
16+
[logseq.common.util :as common-util]
17+
[logseq.db.sqlite.util :as sqlite-util]
18+
[logseq.graph-parser.utf8 :as utf8]))
2019

2120
(defonce parseJson (gobj/get Mldoc "parseJson"))
2221
(defonce parseInlineJson (gobj/get Mldoc "parseInlineJson"))
@@ -103,24 +102,24 @@
103102
(common-util/safe-subs line level)
104103
;; Otherwise, trim these invalid spaces
105104
(string/triml line)))
106-
(if remove-first-line? lines r))
105+
(if remove-first-line? lines r))
107106
content (if remove-first-line? body (cons f body))]
108107
(string/join "\n" content)))
109108

110109
(defn- update-src-full-content
111110
[ast content]
112111
(let [content (utf8/encode content)]
113112
(map (fn [[block pos-meta]]
114-
(if (and (vector? block)
115-
(= "Src" (first block)))
116-
(let [{:keys [start_pos end_pos]} pos-meta
117-
content (utf8/substring content start_pos end_pos)
118-
spaces (re-find #"^[\t ]+" (first (string/split-lines content)))
119-
content (if spaces (remove-indentation-spaces content (count spaces) true)
120-
content)
121-
block ["Src" (assoc (second block) :full_content content)]]
122-
[block pos-meta])
123-
[block pos-meta])) ast)))
113+
(if (and (vector? block)
114+
(= "Src" (first block)))
115+
(let [{:keys [start_pos end_pos]} pos-meta
116+
content (utf8/substring content start_pos end_pos)
117+
spaces (re-find #"^[\t ]+" (first (string/split-lines content)))
118+
content (if spaces (remove-indentation-spaces content (count spaces) true)
119+
content)
120+
block ["Src" (assoc (second block) :full_content content)]]
121+
[block pos-meta])
122+
[block pos-meta])) ast)))
124123

125124
(defn collect-page-properties
126125
[ast config]

gulpfile.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,6 @@ const common = {
132132
'packages/ui/dist/ui/ui.js',
133133
'node_modules/@sqlite.org/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.wasm',
134134
]).pipe(gulp.dest(path.join(outputPath, 'mobile', 'js'))),
135-
() => gulp.src([
136-
'packages/ui/dist/silkhq/*.css*',
137-
]).pipe(gulp.dest(path.join(outputPath, 'mobile', 'css'))),
138-
() => gulp.src([
139-
'packages/ui/dist/silkhq/*.js*',
140-
]).pipe(gulp.dest(path.join(outputPath, 'mobile', 'js'))),
141135
() => gulp.src([
142136
'node_modules/inter-ui/inter.css',
143137
]).pipe(gulp.dest(path.join(outputPath, 'mobile', 'css'))),

0 commit comments

Comments
 (0)