Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dab78312a5 | ||
|
|
04a7f76271 | ||
|
|
ca6fd3df66 | ||
|
|
337b1d77d0 | ||
|
|
17e9ce7513 | ||
|
|
6436e82990 | ||
|
|
7642adf32c | ||
|
|
2df7a7cf6d | ||
|
|
4a8a23a4c4 | ||
|
|
e71c167e8a | ||
|
|
9d6ed9305b | ||
|
|
3f1d52da8c | ||
|
|
d5da921e1c | ||
|
|
f19ec2a93f | ||
|
|
7da899e29f | ||
|
|
b4b8eb08a6 | ||
|
|
b6e2e8cba4 | ||
|
|
495aee584e | ||
|
|
6924d9978d | ||
|
|
5829eaf77b | ||
|
|
6acae424d7 | ||
|
|
e6e29a8521 | ||
|
|
4c2ae2338a | ||
|
|
6f9bcd1bb1 | ||
|
|
6bbe930425 | ||
|
|
37dceb4df8 | ||
|
|
fc284f466f | ||
|
|
428d79607e | ||
|
|
be6b02304b | ||
|
|
7ae96e86f1 | ||
|
|
00e9ee556a | ||
|
|
27cd7d4edd | ||
|
|
ff2dfe1a2f | ||
|
|
024f053af8 | ||
|
|
b970b723a5 | ||
|
|
18606c7329 | ||
|
|
ea8b8d142b | ||
|
|
dd20d8896f | ||
|
|
9078c3b61b | ||
|
|
d01c337a2c | ||
|
|
d1442b306a | ||
|
|
a2794a120a | ||
|
|
65e37feb17 | ||
|
|
ca88de162a | ||
|
|
edd6b8d62c | ||
|
|
6f8a7bb151 | ||
|
|
1b348943be | ||
|
|
7f960f9be5 | ||
|
|
54e347eaea | ||
|
|
5ceca3201d | ||
|
|
b532966e85 | ||
|
|
272e8e80d8 |
@@ -50,13 +50,6 @@ status-im2.config/rpc-networks-only?
|
||||
status-im2.config/waku-enabled?
|
||||
status-im.utils.pairing/has-paired-installations?
|
||||
status-im.tribute-to-talk.core-test/user-cofx
|
||||
quo.gesture-handler/tap-gesture-handler
|
||||
quo.gesture-handler/pan-gesture-handler
|
||||
quo.gesture-handler/long-press-gesture-handler
|
||||
quo.gesture-handler/pure-native-button
|
||||
quo.gesture-handler/createNativeWrapper
|
||||
quo.gesture-handler/animated-raw-button
|
||||
quo.gesture-handler/states
|
||||
mocks.js-dependencies/action-button
|
||||
mocks.js-dependencies/camera
|
||||
mocks.js-dependencies/dismiss-keyboard
|
||||
@@ -100,46 +93,13 @@ react-native.fs/read-dir
|
||||
react-native.fs/mkdir
|
||||
react-native.fs/unlink
|
||||
react-native.fs/file-exists?
|
||||
quo.animated/code
|
||||
quo.animated/eq
|
||||
quo.animated/neq
|
||||
quo.animated/greater-or-eq
|
||||
quo.animated/not*
|
||||
quo.animated/or*
|
||||
quo.animated/and*
|
||||
quo.animated/add
|
||||
quo.animated/sub
|
||||
quo.animated/multiply
|
||||
quo.animated/abs
|
||||
quo.animated/min*
|
||||
quo.animated/max*
|
||||
quo.animated/set
|
||||
quo.animated/start-clock
|
||||
quo.animated/stop-clock
|
||||
quo.animated/bezier
|
||||
quo.animated/linear
|
||||
quo.animated/set-value
|
||||
quo.animated/clock
|
||||
quo.animated/debug
|
||||
quo.animated/log
|
||||
quo.animated/event
|
||||
quo.animated/on-change
|
||||
quo.animated/cond*
|
||||
quo.animated/block
|
||||
quo.animated/call*
|
||||
quo.animated/timing
|
||||
quo.animated/spring
|
||||
quo.animated/clamp
|
||||
quo.animated/with-spring
|
||||
quo.animated/with-timing
|
||||
quo.animated/re-timing
|
||||
quo.design-system.colors/white
|
||||
quo.design-system.colors/black
|
||||
status-im.ui.components.colors/white
|
||||
status-im.ui.components.colors/black
|
||||
status-im.transport.core-test/messages
|
||||
quo.core/animated-header
|
||||
quo.core/safe-area-provider
|
||||
quo.core/safe-area-consumer
|
||||
quo.core/safe-area-view
|
||||
status-im.ui.components.core/animated-header
|
||||
status-im.ui.components.core/safe-area-provider
|
||||
status-im.ui.components.core/safe-area-consumer
|
||||
status-im.ui.components.core/safe-area-view
|
||||
status-im.utils.universal-links.core/open!
|
||||
status-im.transport.filters.core-test/member-2
|
||||
status-im.ui.screens.chat.ttt/one-to-one-chat-description-container
|
||||
@@ -189,7 +149,7 @@ status-im.utils.async/async-periodic-run!
|
||||
status-im.desktop.core/app-root
|
||||
status-im.desktop.core/init
|
||||
status-im.chat.models-test/test-db
|
||||
quo.design-system.spacing/padding-vertical
|
||||
status-im.ui.components.spacing/padding-vertical
|
||||
status-im.utils.money/percent-change
|
||||
utils.debounce/clear-all
|
||||
status-im.transport.db/create-chat
|
||||
@@ -206,7 +166,6 @@ status-im.ui.components.animation/add
|
||||
status-im.ui.components.animation/subtract
|
||||
status-im.ui.components.animation/get-layout
|
||||
status-im.wallet.transactions-test/uri-query-data
|
||||
quo.react-native/touchable-highlight
|
||||
status-im.utils.name/shortened-name
|
||||
status-im.ui.components.button.haptic/trigger
|
||||
status-im.contact.db/filter-dapps
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{:lint-as {babashka.fs/with-temp-dir clojure.core/let}}
|
||||
@@ -0,0 +1 @@
|
||||
{:hooks {:macroexpand {sci.core/copy-ns sci.core/copy-ns}}}
|
||||
@@ -0,0 +1,9 @@
|
||||
(ns sci.core)
|
||||
|
||||
(defmacro copy-ns
|
||||
([ns-sym sci-ns]
|
||||
`(copy-ns ~ns-sym ~sci-ns nil))
|
||||
([ns-sym sci-ns opts]
|
||||
`[(quote ~ns-sym)
|
||||
~sci-ns
|
||||
(quote ~opts)]))
|
||||
@@ -1,4 +1,5 @@
|
||||
{:lint-as {status-im.utils.views/defview clojure.core/defn
|
||||
{:config-paths ["status-im"]
|
||||
:lint-as {status-im.utils.views/defview clojure.core/defn
|
||||
status-im.utils.views/letsubs clojure.core/let
|
||||
reagent.core/with-let clojure.core/let
|
||||
status-im.utils.fx/defn clj-kondo.lint-as/def-catch-all
|
||||
@@ -45,6 +46,7 @@
|
||||
:single-operand-comparison {:level :error}
|
||||
:syntax {:level :error}
|
||||
:unbound-destructuring-default {:level :error}
|
||||
:uninitialized-var {:level :error}
|
||||
:unknown-require-option {:level :error}
|
||||
:unreachable-code {:level :error}
|
||||
:unresolved-namespace {:level :error}
|
||||
@@ -54,7 +56,7 @@
|
||||
number
|
||||
status-im.test-helpers/restore-app-db]}
|
||||
:unresolved-var {:level :error}
|
||||
:uninitialized-var {:level :error}
|
||||
:unsorted-required-namespaces {:level :error}
|
||||
:unused-alias {:level :warning}
|
||||
:unused-binding {:level :error}
|
||||
:unused-import {:level :error}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
{:hooks {:analyze-call {utils.i18n/label hooks.core/i18n-label}}
|
||||
:linters {:status-im.linter/invalid-translation-keyword {:level :error}}}
|
||||
@@ -0,0 +1,19 @@
|
||||
(ns hooks.core
|
||||
(:require [clj-kondo.hooks-api :as api]))
|
||||
|
||||
(defn i18n-label
|
||||
"Verify call to `i18n/label` pass the translation keyword qualified with `t`."
|
||||
[{:keys [node]}]
|
||||
(let [[_ translation-key-node & _] (:children node)]
|
||||
(when (and (api/keyword-node? translation-key-node)
|
||||
(not= "t" (-> translation-key-node api/sexpr namespace)))
|
||||
(api/reg-finding! (assoc (meta translation-key-node)
|
||||
:message "Translation keyword should be qualified with \"t\""
|
||||
:type :status-im.linter/invalid-translation-keyword)))))
|
||||
|
||||
(comment
|
||||
;; Valid
|
||||
(i18n-label {:node (api/parse-string "(i18n/label :t/foo)")})
|
||||
|
||||
;; Invalid
|
||||
(i18n-label {:node (api/parse-string "(i18n/label :foo)")}))
|
||||
@@ -0,0 +1 @@
|
||||
{:clean {:ns-inner-blocks-indentation :keep}}
|
||||
@@ -108,7 +108,7 @@ nix-update-clojure: export TARGET := clojure
|
||||
nix-update-clojure: ##@nix Update maven Nix expressions based on current clojure setup
|
||||
nix/deps/clojure/generate.sh
|
||||
|
||||
nix-update-gems: export TARGET := default
|
||||
nix-update-gems: export TARGET := fastlane
|
||||
nix-update-gems: ##@nix Update Ruby gems in fastlane/Gemfile.lock and fastlane/gemset.nix
|
||||
fastlane/update.sh
|
||||
|
||||
@@ -312,12 +312,11 @@ lint: export TARGET := clojure
|
||||
lint: export CLJ_LINTER_PRINT_WARNINGS ?= false
|
||||
lint: ##@test Run code style checks
|
||||
@sh scripts/lint-re-frame-in-quo-components.sh && \
|
||||
sh scripts/lint-old-quo-usage.sh && \
|
||||
clj-kondo --config .clj-kondo/config.edn --cache false --fail-level error --lint src $(if $(filter $(CLJ_LINTER_PRINT_WARNINGS),true),,| grep -v ': warning: ') && \
|
||||
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
|
||||
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \
|
||||
sh scripts/lint-trailing-newline.sh && \
|
||||
yarn prettier
|
||||
node_modules/.bin/prettier --write .
|
||||
|
||||
# NOTE: We run the linter twice because of https://github.com/kkinnear/zprint/issues/271
|
||||
lint-fix: export TARGET := clojure
|
||||
@@ -325,8 +324,9 @@ lint-fix: ##@test Run code style checks and fix issues
|
||||
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
|
||||
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
|
||||
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
|
||||
clojure-lsp --ns-exclude-regex ".*/src/status_im2/core\.cljs$$" clean-ns && \
|
||||
sh scripts/lint-trailing-newline.sh --fix && \
|
||||
yarn prettier
|
||||
node_modules/.bin/prettier --write .
|
||||
|
||||
shadow-server: export TARGET := clojure
|
||||
shadow-server:##@ Start shadow-cljs in server mode for watching
|
||||
|
||||
@@ -40,7 +40,7 @@ Check out our [coding guidelines](doc/new-guidelines.md).
|
||||
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and long lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.im/about)
|
||||
|
||||
- **Specification / Documentation**
|
||||
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers & Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our [docs](doc/) and see how you can improve what we have.
|
||||
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers and Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our [docs](doc/) and see how you can improve what we have.
|
||||
|
||||
- **Blog Writing**
|
||||
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
### Redesign
|
||||
|
||||
* Quo2, Switcher Navigation by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13167
|
||||
* quo, Switcher Navigation by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13167
|
||||
* Switcher and Bottom Tabs Animations and UI Performance Improvements by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13470
|
||||
* feat: add token tag component (#13599) by @J-Son89 in https://github.com/status-im/status-mobile/pull/13644
|
||||
* [13565] icon-avatar component by @ibrkhalil in https://github.com/status-im/status-mobile/pull/13692
|
||||
|
||||
@@ -62,14 +62,14 @@
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="http" android:host="join.status.im" />
|
||||
<data android:scheme="https" android:host="join.status.im" />
|
||||
<data android:scheme="http" android:host="status.app" />
|
||||
<data android:scheme="https" android:host="status.app" />
|
||||
</intent-filter>
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="status-im" />
|
||||
<data android:scheme="status-app" />
|
||||
<data android:scheme="ethereum" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
|
||||
[re-frame usage (recorded meeting)](https://drive.google.com/file/d/1qv_E0CEGzQpu_zGXD0gCTU5EvhC2k8Jy/view)
|
||||
|
||||
[status app functionality demo](https://drive.google.com/file/u/0/d/1PmwsMLTLDNNIdv5_6wvMOwoj2PfT50c6/view)
|
||||
|
||||
## Misc
|
||||
|
||||
[Importing icons from Figma into project](export-icons.md)
|
||||
|
||||
@@ -12,6 +12,15 @@ production = ENV["PRODUCTION"] == "1"
|
||||
# TODO: remove this flag once you upgrade react-native above version 0.70
|
||||
ENV['USE_CODEGEN_DISCOVERY'] = "1"
|
||||
|
||||
# If inside a Nix shell, allow pod install
|
||||
inside_nix_shell = ENV['IN_NIX_SHELL']
|
||||
allow_pod_install = !inside_nix_shell.nil?
|
||||
|
||||
unless allow_pod_install
|
||||
puts "ERROR: 'pod install' must be run inside a Nix shell. Please ensure you're inside a nix shell and try again."
|
||||
exit 1
|
||||
end
|
||||
|
||||
abstract_target 'Status' do
|
||||
# Pods for StatusQuo
|
||||
config = use_native_modules!
|
||||
@@ -33,7 +42,6 @@ abstract_target 'Status' do
|
||||
pod 'react-native-image-resizer', :path => '../node_modules/react-native-image-resizer'
|
||||
pod 'react-native-config', :path => '../node_modules/react-native-config'
|
||||
|
||||
pod 'SQLCipher', '~>3.0'
|
||||
pod 'SSZipArchive', '2.4.3'
|
||||
|
||||
permissions_path = '../node_modules/react-native-permissions/ios'
|
||||
|
||||
@@ -434,11 +434,6 @@ PODS:
|
||||
- libwebp (~> 1.0)
|
||||
- SDWebImage/Core (~> 5.10)
|
||||
- secp256k1 (0.1.6)
|
||||
- SQLCipher (3.4.2):
|
||||
- SQLCipher/standard (= 3.4.2)
|
||||
- SQLCipher/common (3.4.2)
|
||||
- SQLCipher/standard (3.4.2):
|
||||
- SQLCipher/common
|
||||
- SSZipArchive (2.4.3)
|
||||
- TOCropViewController (2.6.1)
|
||||
- TouchID (4.4.1):
|
||||
@@ -520,7 +515,6 @@ DEPENDENCIES:
|
||||
- RNStaticSafeAreaInsets (from `../node_modules/react-native-static-safe-area-insets`)
|
||||
- RNSVG (from `../node_modules/react-native-svg`)
|
||||
- secp256k1 (from `https://github.com/status-im/secp256k1.swift.git`)
|
||||
- SQLCipher (~> 3.0)
|
||||
- SSZipArchive (= 2.4.3)
|
||||
- TouchID (from `../node_modules/react-native-touch-id`)
|
||||
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
|
||||
@@ -533,7 +527,6 @@ SPEC REPOS:
|
||||
- libwebp
|
||||
- SDWebImage
|
||||
- SDWebImageWebPCoder
|
||||
- SQLCipher
|
||||
- SSZipArchive
|
||||
- TOCropViewController
|
||||
|
||||
@@ -707,7 +700,7 @@ SPEC CHECKSUMS:
|
||||
FBLazyVector: a8af91c2b5a0029d12ff6b32e428863d63c48991
|
||||
FBReactNativeSpec: 1b2309b096448a1dc9d0c43999216f8fda809ae8
|
||||
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
|
||||
glog: 166d178815c300e8126de9a7900101814eb16253
|
||||
glog: d93527a855523adb8c113837db4be68fb00e230d
|
||||
HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352
|
||||
Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8
|
||||
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
|
||||
@@ -772,19 +765,18 @@ SPEC CHECKSUMS:
|
||||
RNLanguages: 962e562af0d34ab1958d89bcfdb64fafc37c513e
|
||||
RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467
|
||||
RNReactNativeHapticFeedback: 2566b468cc8d0e7bb2f84b23adc0f4614594d071
|
||||
RNReanimated: 43adb0307a62c1ce9694f36f124ca3b51a15272a
|
||||
RNReanimated: cf1259a8cf8dfb1d7fa586ce02565fd0610da1d7
|
||||
RNShare: d82e10f6b7677f4b0048c23709bd04098d5aee6c
|
||||
RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8
|
||||
RNSVG: 80584470ff1ffc7994923ea135a3e5ad825546b9
|
||||
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
|
||||
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
|
||||
secp256k1: f61d67e6fdcb85fd727acf1bf35ace6036db540c
|
||||
SQLCipher: f9fcf29b2e59ced7defc2a2bdd0ebe79b40d4990
|
||||
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
|
||||
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
|
||||
TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4
|
||||
Yoga: d24d6184b6b85f742536bd93bd07d69d7b9bb4c1
|
||||
|
||||
PODFILE CHECKSUM: ac30a0172ff0126b6f307c20f34c47ce0ebf278f
|
||||
PODFILE CHECKSUM: 4d710b4207b0fb0f6ecef4aa92bb79b716a7d13c
|
||||
|
||||
COCOAPODS: 1.12.0
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<string>im.status.ethereum.applink</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>status-im</string>
|
||||
<string>status-app</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<string>development</string>
|
||||
<key>com.apple.developer.associated-domains</key>
|
||||
<array>
|
||||
<string>applinks:join.status.im</string>
|
||||
<string>applinks:status.app</string>
|
||||
</array>
|
||||
<key>keychain-access-groups</key>
|
||||
<array>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<string>im.status.ethereum.applink</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>status-im</string>
|
||||
<string>status-app</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<string>development</string>
|
||||
<key>com.apple.developer.associated-domains</key>
|
||||
<array>
|
||||
<string>applinks:join.status.im</string>
|
||||
<string>applinks:status.app</string>
|
||||
</array>
|
||||
<key>keychain-access-groups</key>
|
||||
<array>
|
||||
|
||||
@@ -12,12 +12,13 @@ By using the following command:
|
||||
```sh
|
||||
shadow-cljs classpath --force-spawn
|
||||
```
|
||||
We both download the necessary JARs and POMs into `~/.m2` folder, but also get the classpath printed into standard output.
|
||||
We download the necessary JARs into `~/.m2` folder, but also get the classpath printed into standard output.
|
||||
We skip POM files since they are not necessary, and add edge cases we don't want to handle.
|
||||
|
||||
We then use the classpath in combination with contents of `~/.m2` folder to generate the following files:
|
||||
|
||||
* `deps.list` - List of JARs relative to the `~/.m2` cache folder.
|
||||
* `deps.json` - Full list of JARs and POMs including their SHAs.
|
||||
* `deps.json` - Full list of JARs including their SHAs.
|
||||
|
||||
The `deps.list` file is just intermediate and for debugging purposes.
|
||||
The `deps.json` is loaded by the derivation in [`default.nix`](./default.nix) and used to produce a derivation that contains all the necessary dependencies:
|
||||
|
||||
@@ -8,9 +8,6 @@ let
|
||||
# load dependencies
|
||||
deps = importJSON ./deps.json;
|
||||
|
||||
# some .jar files have an `-aot` suffix that doesn't work for .pom files
|
||||
getPOM = jarUrl: "${removeSuffix "-aot" jarUrl}.pom";
|
||||
|
||||
script = writeShellScriptBin "create-local-maven-repo" (''
|
||||
mkdir -p $out
|
||||
cd $out
|
||||
@@ -18,18 +15,11 @@ let
|
||||
(concatMapStrings (dep:
|
||||
let
|
||||
url = "${dep.host}/${dep.path}";
|
||||
pom = {
|
||||
sha1 = attrByPath [ "pom" "sha1" ] "" dep;
|
||||
sha256 = attrByPath [ "pom" "sha256" ] "" dep;
|
||||
};
|
||||
pom-download = optionalString (pom.sha256 != "") (
|
||||
fetchurl { url = getPOM url; inherit (pom) sha256; }
|
||||
);
|
||||
jar = {
|
||||
sha1 = attrByPath [ "jar" "sha1" ] "" dep;
|
||||
sha256 = attrByPath [ "jar" "sha256" ] "" dep;
|
||||
};
|
||||
jar-download = optionalString (jar.sha256 != "") (
|
||||
jarFile = optionalString (jar.sha256 != "") (
|
||||
fetchurl { url = "${url}.jar"; inherit (jar) sha256; }
|
||||
);
|
||||
fileName = last (splitString "/" dep.path);
|
||||
@@ -38,14 +28,8 @@ let
|
||||
''
|
||||
mkdir -p ${directory}
|
||||
|
||||
${optionalString (pom-download != "") ''
|
||||
ln -s "${pom-download}" "${getPOM dep.path}"
|
||||
''}
|
||||
${optionalString (pom.sha1 != "") ''
|
||||
echo "${pom.sha1}" > "${getPOM dep.path}.sha1"
|
||||
''}
|
||||
${optionalString (jar-download != "") ''
|
||||
ln -s "${jar-download}" "${dep.path}.jar"
|
||||
${optionalString (jarFile != "") ''
|
||||
ln -s "${jarFile}" "${dep.path}.jar"
|
||||
''}
|
||||
${optionalString (jar.sha1 != "") ''
|
||||
echo "${jar.sha1}" > "${dep.path}.jar.sha1"
|
||||
|
||||
@@ -1,89 +1,102 @@
|
||||
args4j/args4j/2.33/args4j-2.33.jar
|
||||
babashka/fs/0.2.16/fs-0.2.16.jar
|
||||
bidi/bidi/2.1.6/bidi-2.1.6.jar
|
||||
binaryage/env-config/0.2.2/env-config-0.2.2.jar
|
||||
binaryage/oops/0.7.2/oops-0.7.2.jar
|
||||
borkdude/edamame/1.1.17/edamame-1.1.17.jar
|
||||
borkdude/sci.impl.reflector/0.0.1/sci.impl.reflector-0.0.1.jar
|
||||
camel-snake-kebab/camel-snake-kebab/0.4.3/camel-snake-kebab-0.4.3.jar
|
||||
cheshire/cheshire/5.11.0/cheshire-5.11.0.jar
|
||||
cider/cider-nrepl/0.29.0/cider-nrepl-0.29.0.jar
|
||||
cider/piggieback/0.5.2/piggieback-0.5.2.jar
|
||||
cljs-bean/cljs-bean/1.3.0/cljs-bean-1.3.0.jar
|
||||
clj-kondo/clj-kondo/2023.09.07/clj-kondo-2023.09.07.jar
|
||||
cljs-bean/cljs-bean/1.9.0/cljs-bean-1.9.0.jar
|
||||
clout/clout/2.1.2/clout-2.1.2.jar
|
||||
com/andrewmcveigh/cljs-time/0.5.2/cljs-time-0.5.2.jar
|
||||
com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar
|
||||
com/cognitect/transit-clj/1.0.324/transit-clj-1.0.324.jar
|
||||
com/cognitect/transit-cljs/0.8.248/transit-cljs-0.8.248.jar
|
||||
com/cognitect/transit-java/1.0.343/transit-java-1.0.343.jar
|
||||
com/cognitect/transit-js/0.8.846/transit-js-0.8.846.jar
|
||||
com/fasterxml/jackson/core/jackson-core/2.8.7/jackson-core-2.8.7.jar
|
||||
com/cognitect/transit-clj/1.0.329/transit-clj-1.0.329.jar
|
||||
com/cognitect/transit-cljs/0.8.280/transit-cljs-0.8.280.jar
|
||||
com/cognitect/transit-java/1.0.362/transit-java-1.0.362.jar
|
||||
com/cognitect/transit-js/0.8.874/transit-js-0.8.874.jar
|
||||
com/fasterxml/jackson/core/jackson-core/2.13.3/jackson-core-2.13.3.jar
|
||||
com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.13.3/jackson-dataformat-cbor-2.13.3.jar
|
||||
com/fasterxml/jackson/dataformat/jackson-dataformat-smile/2.13.3/jackson-dataformat-smile-2.13.3.jar
|
||||
com/github/javaparser/javaparser-core/3.25.3/javaparser-core-3.25.3.jar
|
||||
com/google/auto/value/auto-value-annotations/1.6/auto-value-annotations-1.6.jar
|
||||
com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar
|
||||
com/google/code/gson/gson/2.9.1/gson-2.9.1.jar
|
||||
com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar
|
||||
com/google/javascript/closure-compiler-unshaded/v20210302/closure-compiler-unshaded-v20210302.jar
|
||||
com/ibm/icu/icu4j/66.1/icu4j-66.1.jar
|
||||
commons-codec/commons-codec/1.10/commons-codec-1.10.jar
|
||||
com/google/errorprone/error_prone_annotations/2.15.0/error_prone_annotations-2.15.0.jar
|
||||
com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
|
||||
com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar
|
||||
com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
|
||||
com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar
|
||||
com/google/javascript/closure-compiler-unshaded/v20230411/closure-compiler-unshaded-v20230411.jar
|
||||
com/google/protobuf/protobuf-java/3.21.12/protobuf-java-3.21.12.jar
|
||||
com/google/re2j/re2j/1.3/re2j-1.3.jar
|
||||
commons-codec/commons-codec/1.15/commons-codec-1.15.jar
|
||||
commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar
|
||||
commons-io/commons-io/2.6/commons-io-2.6.jar
|
||||
commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
|
||||
compojure/compojure/1.5.2/compojure-1.5.2.jar
|
||||
com/taoensso/encore/2.105.0/encore-2.105.0.jar
|
||||
com/taoensso/timbre/4.10.0/timbre-4.10.0.jar
|
||||
com/taoensso/truss/1.5.0/truss-1.5.0.jar
|
||||
com/taoensso/tufte/2.1.0/tufte-2.1.0.jar
|
||||
com/wsscode/pathom/2.2.31/pathom-2.2.31.jar
|
||||
com/wsscode/spec-inspec/1.0.0-alpha2/spec-inspec-1.0.0-alpha2.jar
|
||||
crypto-equality/crypto-equality/1.0.0/crypto-equality-1.0.0.jar
|
||||
crypto-random/crypto-random/1.2.0/crypto-random-1.2.0.jar
|
||||
com/taoensso/encore/3.68.0/encore-3.68.0.jar
|
||||
com/taoensso/timbre/6.3.1/timbre-6.3.1.jar
|
||||
com/taoensso/truss/1.11.0/truss-1.11.0.jar
|
||||
com/taoensso/tufte/2.6.3/tufte-2.6.3.jar
|
||||
crypto-equality/crypto-equality/1.0.1/crypto-equality-1.0.1.jar
|
||||
crypto-random/crypto-random/1.2.1/crypto-random-1.2.1.jar
|
||||
day8/re-frame/test/0.1.5/test-0.1.5.jar
|
||||
edn-query-language/eql/0.0.9/eql-0.0.9.jar
|
||||
expound/expound/0.8.5/expound-0.8.5.jar
|
||||
fipp/fipp/0.6.23/fipp-0.6.23.jar
|
||||
expound/expound/0.9.0/expound-0.9.0.jar
|
||||
fipp/fipp/0.6.26/fipp-0.6.26.jar
|
||||
hiccup/hiccup/1.0.5/hiccup-1.0.5.jar
|
||||
hickory/hickory/0.7.1/hickory-0.7.1.jar
|
||||
http-kit/http-kit/2.2.0/http-kit-2.2.0.jar
|
||||
instaparse/instaparse/1.4.0/instaparse-1.4.0.jar
|
||||
io/aviso/pretty/0.1.33/pretty-0.1.33.jar
|
||||
io/aviso/pretty/1.4.4/pretty-1.4.4.jar
|
||||
io/methvin/directory-watcher/0.17.1/directory-watcher-0.17.1.jar
|
||||
io/replikativ/datalog-parser/0.2.25/datalog-parser-0.2.25.jar
|
||||
io/undertow/undertow-core/2.2.4.Final/undertow-core-2.2.4.Final.jar
|
||||
javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
|
||||
javax/servlet/servlet-api/2.5/servlet-api-2.5.jar
|
||||
javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar
|
||||
medley/medley/0.8.2/medley-0.8.2.jar
|
||||
mvxcvi/alphabase/1.0.0/alphabase-1.0.0.jar
|
||||
net/cgrand/macrovich/0.2.1/macrovich-0.2.1.jar
|
||||
net/java/dev/jna/jna/5.12.1/jna-5.12.1.jar
|
||||
nrepl/bencode/1.1.0/bencode-1.1.0.jar
|
||||
nrepl/nrepl/1.0.0/nrepl-1.0.0.jar
|
||||
org/clojure/clojure/1.10.1/clojure-1.10.1.jar
|
||||
org/clojure/clojurescript/1.10.844/clojurescript-1.10.844.jar
|
||||
org/clojure/core.async/1.3.610/core.async-1.3.610.jar
|
||||
org/clojure/core.cache/1.0.207/core.cache-1.0.207.jar
|
||||
org/clojure/core.memoize/1.0.236/core.memoize-1.0.236.jar
|
||||
org/clojure/core.rrb-vector/0.1.1/core.rrb-vector-0.1.1.jar
|
||||
org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar
|
||||
org/clojure/data.json/1.0.0/data.json-1.0.0.jar
|
||||
org/clojure/data.priority-map/1.0.0/data.priority-map-1.0.0.jar
|
||||
org/clojure/google-closure-library/0.0-20201211-3e6c510d/google-closure-library-0.0-20201211-3e6c510d.jar
|
||||
org/clojure/google-closure-library-third-party/0.0-20201211-3e6c510d/google-closure-library-third-party-0.0-20201211-3e6c510d.jar
|
||||
org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar
|
||||
org/clojure/test.check/1.1.0/test.check-1.1.0.jar
|
||||
org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0.jar
|
||||
org/clojure/tools.analyzer.jvm/1.1.0/tools.analyzer.jvm-1.1.0.jar
|
||||
org/clojure/tools.cli/1.0.194/tools.cli-1.0.194.jar
|
||||
org/apache/ant/ant/1.10.11/ant-1.10.11.jar
|
||||
org/apache/ant/ant-launcher/1.10.11/ant-launcher-1.10.11.jar
|
||||
org/babashka/sci/0.7.38/sci-0.7.38.jar
|
||||
org/babashka/sci.impl.types/0.0.2/sci.impl.types-0.0.2.jar
|
||||
org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0.jar
|
||||
org/clojure/clojure/1.11.1/clojure-1.11.1.jar
|
||||
org/clojure/clojurescript/1.11.60/clojurescript-1.11.60.jar
|
||||
org/clojure/core.async/1.5.648/core.async-1.5.648.jar
|
||||
org/clojure/core.cache/1.0.225/core.cache-1.0.225.jar
|
||||
org/clojure/core.memoize/1.0.253/core.memoize-1.0.253.jar
|
||||
org/clojure/core.rrb-vector/0.1.2/core.rrb-vector-0.1.2.jar
|
||||
org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar
|
||||
org/clojure/data.json/2.4.0/data.json-2.4.0.jar
|
||||
org/clojure/data.priority-map/1.1.0/data.priority-map-1.1.0.jar
|
||||
org/clojure/google-closure-library/0.0-20230227-c7c0a541/google-closure-library-0.0-20230227-c7c0a541.jar
|
||||
org/clojure/google-closure-library-third-party/0.0-20230227-c7c0a541/google-closure-library-third-party-0.0-20230227-c7c0a541.jar
|
||||
org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar
|
||||
org/clojure/tools.analyzer/1.1.0/tools.analyzer-1.1.0.jar
|
||||
org/clojure/tools.analyzer.jvm/1.2.2/tools.analyzer.jvm-1.2.2.jar
|
||||
org/clojure/tools.cli/1.0.206/tools.cli-1.0.206.jar
|
||||
org/clojure/tools.logging/1.1.0/tools.logging-1.1.0.jar
|
||||
org/clojure/tools.macro/0.1.5/tools.macro-0.1.5.jar
|
||||
org/clojure/tools.reader/1.3.3/tools.reader-1.3.3.jar
|
||||
org/graalvm/js/js/20.1.0/js-20.1.0.jar
|
||||
org/graalvm/js/js-scriptengine/20.1.0/js-scriptengine-20.1.0.jar
|
||||
org/graalvm/regex/regex/20.1.0/regex-20.1.0.jar
|
||||
org/graalvm/sdk/graal-sdk/20.1.0/graal-sdk-20.1.0.jar
|
||||
org/graalvm/truffle/truffle-api/20.1.0/truffle-api-20.1.0.jar
|
||||
org/clojure/tools.reader/1.3.6/tools.reader-1.3.6.jar
|
||||
org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar
|
||||
org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar
|
||||
org/jboss/threads/jboss-threads/3.1.0.Final/jboss-threads-3.1.0.Final.jar
|
||||
org/jboss/xnio/xnio-api/3.8.0.Final/xnio-api-3.8.0.Final.jar
|
||||
org/jboss/xnio/xnio-nio/3.8.0.Final/xnio-nio-3.8.0.Final.jar
|
||||
org/jsoup/jsoup/1.9.2/jsoup-1.9.2.jar
|
||||
org/jspecify/jspecify/0.2.0/jspecify-0.2.0.jar
|
||||
org/msgpack/msgpack/0.6.12/msgpack-0.6.12.jar
|
||||
org/ow2/asm/asm/7.1/asm-7.1.jar
|
||||
org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1.jar
|
||||
org/ow2/asm/asm-commons/7.1/asm-commons-7.1.jar
|
||||
org/ow2/asm/asm-tree/7.1/asm-tree-7.1.jar
|
||||
org/ow2/asm/asm-util/7.1/asm-util-7.1.jar
|
||||
org/ow2/asm/asm/9.4/asm-9.4.jar
|
||||
org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar
|
||||
org/wildfly/client/wildfly-client-config/1.0.1.Final/wildfly-client-config-1.0.1.Final.jar
|
||||
org/wildfly/common/wildfly-common/1.5.2.Final/wildfly-common-1.5.2.Final.jar
|
||||
prismatic/schema/1.1.7/schema-1.1.7.jar
|
||||
quoin/quoin/0.1.2/quoin-0.1.2.jar
|
||||
reagent/reagent/1.2.0/reagent-1.2.0.jar
|
||||
re-com/re-com/2.8.0/re-com-2.8.0.jar
|
||||
refactor-nrepl/refactor-nrepl/3.6.0/refactor-nrepl-3.6.0.jar
|
||||
@@ -91,13 +104,11 @@ re-frame/re-frame/1.3.0/re-frame-1.3.0.jar
|
||||
re-frisk-remote/re-frisk-remote/1.6.0/re-frisk-remote-1.6.0.jar
|
||||
re-frisk/sente/1.15.0/sente-1.15.0.jar
|
||||
ring-cors/ring-cors/0.1.8/ring-cors-0.1.8.jar
|
||||
ring/ring-codec/1.1.2/ring-codec-1.1.2.jar
|
||||
ring/ring-core/1.8.1/ring-core-1.8.1.jar
|
||||
spec-coerce/spec-coerce/1.0.0-alpha6/spec-coerce-1.0.0-alpha6.jar
|
||||
status-im/timbre/4.10.0-2-status/timbre-4.10.0-2-status.jar
|
||||
ring/ring-codec/1.2.0/ring-codec-1.2.0.jar
|
||||
ring/ring-core/1.9.6/ring-core-1.9.6.jar
|
||||
thheller/shadow-client/1.3.3/shadow-client-1.3.3.jar
|
||||
thheller/shadow-cljs/2.12.0/shadow-cljs-2.12.0-aot.jar
|
||||
thheller/shadow-cljsjs/0.0.21/shadow-cljsjs-0.0.21.jar
|
||||
thheller/shadow-undertow/0.1.0/shadow-undertow-0.1.0.jar
|
||||
thheller/shadow-cljs/2.25.0/shadow-cljs-2.25.0-aot.jar
|
||||
thheller/shadow-cljsjs/0.0.22/shadow-cljsjs-0.0.22.jar
|
||||
thheller/shadow-undertow/0.3.1/shadow-undertow-0.3.1.jar
|
||||
thheller/shadow-util/0.7.0/shadow-util-0.7.0.jar
|
||||
viebel/codox-klipse-theme/0.0.1/codox-klipse-theme-0.0.1.jar
|
||||
tigris/tigris/0.1.2/tigris-0.1.2.jar
|
||||
|
||||
@@ -53,8 +53,6 @@ function nix_entry_from_jar() {
|
||||
JAR_PATH="${MAVEN_CACHE_PATH}/${JAR_REL_PATH}"
|
||||
JAR_NAME=$(basename "${JAR_PATH}")
|
||||
JAR_DIR=$(dirname "${JAR_PATH}")
|
||||
# POM might have a slightly different name
|
||||
POM_PATH=$(echo ${JAR_DIR}/*.pom)
|
||||
|
||||
REPO_NAME=$(get_repo_for_dir "${JAR_DIR}")
|
||||
REPO_URL=${REPOS[${REPO_NAME}]}
|
||||
@@ -62,18 +60,11 @@ function nix_entry_from_jar() {
|
||||
JAR_SHA1=$(cat "${JAR_PATH}.sha1")
|
||||
JAR_SHA256=$(get_nix_sha "${JAR_PATH}")
|
||||
|
||||
POM_SHA1=$(cat "${POM_PATH}.sha1")
|
||||
POM_SHA256=$(get_nix_sha "${POM_PATH}")
|
||||
|
||||
# Format into a Nix attrset entry
|
||||
echo -n "
|
||||
{
|
||||
\"path\": \"${JAR_REL_NAME}\",
|
||||
\"host\": \"${REPO_URL}\",
|
||||
\"pom\": {
|
||||
\"sha1\": \"${POM_SHA1}\",
|
||||
\"sha256\": \"${POM_SHA256}\"
|
||||
},
|
||||
\"jar\": {
|
||||
\"sha1\": \"${JAR_SHA1}\",
|
||||
\"sha256\": \"${JAR_SHA256}\"
|
||||
|
||||
@@ -715,11 +715,13 @@ org.jdom:jdom2:2.0.6
|
||||
org.jetbrains.dokka:dokka-core:1.4.32
|
||||
org.jetbrains.intellij.deps:trove4j:1.0.20181211
|
||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330
|
||||
org.jetbrains.kotlinx:atomicfu:0.16.3
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.1
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
|
||||
org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-android-extensions:1.6.20
|
||||
org.jetbrains.kotlin:kotlin-annotations-jvm:1.3.72
|
||||
@@ -823,5 +825,6 @@ org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2
|
||||
xerces:xercesImpl:2.12.0
|
||||
xml-apis:xml-apis:1.4.01
|
||||
org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.10
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
|
||||
com.android.tools.lint:lint-gradle:30.2.2
|
||||
com.android.tools.build:gradle:7.0.4
|
||||
com.android.tools.build:gradle:7.0.4
|
||||
@@ -593,22 +593,22 @@ https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.10.1/soloa
|
||||
https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.10.3/soloader-0.10.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/facebook/yoga/proguard-annotations/1.19.0/proguard-annotations-1.19.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.11.1/jackson-annotations-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.15.2/jackson-annotations-2.15.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.15.3/jackson-annotations-2.15.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.11.1/jackson-core-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.15.2/jackson-core-2.15.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.15.3/jackson-core-2.15.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.11.1/jackson-databind-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.15.2/jackson-databind-2.15.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.15.3/jackson-databind-2.15.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.11.1/jackson-dataformat-xml-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.11.1/jackson-base-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.15.2/jackson-base-2.15.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.15.3/jackson-base-2.15.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.11.1/jackson-bom-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.15.2/jackson-bom-2.15.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.15.3/jackson-bom-2.15.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-parent/2.11/jackson-parent-2.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-parent/2.15/jackson-parent-2.15.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.11.1/jackson-modules-base-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.15.2/jackson-modules-base-2.15.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.15.3/jackson-modules-base-2.15.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.11.1/jackson-module-jaxb-annotations-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.15.2/jackson-module-jaxb-annotations-2.15.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.15.3/jackson-module-jaxb-annotations-2.15.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-kotlin/2.11.1/jackson-module-kotlin-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/oss-parent/38/oss-parent-38.pom
|
||||
https://repo.maven.apache.org/maven2/com/fasterxml/oss-parent/50/oss-parent-50.pom
|
||||
@@ -634,10 +634,10 @@ https://repo.maven.apache.org/maven2/com/google/auto/auto-parent/6/auto-parent-6
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-parent/7/auto-parent-7.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-annotations/1.6.2/auto-value-annotations-1.6.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-annotations/1.10.3/auto-value-annotations-1.10.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-annotations/1.10.4/auto-value-annotations-1.10.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-parent/1.6.2/auto-value-parent-1.6.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-parent/1.6.3/auto-value-parent-1.6.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-parent/1.10.3/auto-value-parent-1.10.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-parent/1.10.4/auto-value-parent-1.10.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value/1.5.2/auto-value-1.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/3.0.1/jsr305-3.0.1.pom
|
||||
@@ -665,7 +665,7 @@ https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotatio
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.4.0/error_prone_annotations-2.4.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.23.0/error_prone_annotations-2.23.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.0.18/error_prone_parent-2.0.18.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.2.0/error_prone_parent-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.3.1/error_prone_parent-2.3.1.pom
|
||||
@@ -673,7 +673,7 @@ https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.3.4/error_prone_parent-2.3.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.4.0/error_prone_parent-2.4.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.7.1/error_prone_parent-2.7.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.21.1/error_prone_parent-2.21.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.23.0/error_prone_parent-2.23.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/flatbuffers/flatbuffers-java/1.12.0/flatbuffers-java-1.12.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/google/1/google-1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.pom
|
||||
@@ -688,8 +688,8 @@ https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/29.0-jre/guav
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/30.1-android/guava-parent-30.1-android.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/30.1-jre/guava-parent-30.1-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/31.0.1-jre/guava-parent-31.0.1-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/32.1.2-jre/guava-parent-32.1.2-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-testlib/32.1.2-jre/guava-testlib-32.1.2-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/32.1.3-jre/guava-parent-32.1.3-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-testlib/32.1.3-jre/guava-testlib-32.1.3-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/17.0/guava-17.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/22.0/guava-22.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/23.0/guava-23.0.pom
|
||||
@@ -701,7 +701,7 @@ https://repo.maven.apache.org/maven2/com/google/guava/guava/29.0-jre/guava-29.0-
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/30.1-android/guava-30.1-android.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/30.1-jre/guava-30.1-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/32.1.2-jre/guava-32.1.2-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/32.1.3-jre/guava-32.1.3-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/listenablefuture/1.0/listenablefuture-1.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.pom
|
||||
@@ -750,12 +750,12 @@ https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/4.9.2/okhttp-4.9.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.9.1/parent-3.9.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.12.1/parent-3.12.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-jvm/3.5.0/okio-jvm-3.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-jvm/3.6.0/okio-jvm-3.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-parent/1.17.4/okio-parent-1.17.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.17.4/okio-1.17.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.8.0/okio-2.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.9.0/okio-2.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/3.5.0/okio-3.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/3.6.0/okio-3.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.0/all-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.1/all-1.2.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.2/all-1.2.2.pom
|
||||
@@ -855,9 +855,9 @@ https://repo.maven.apache.org/maven2/jakarta/activation/jakarta.activation-api/1
|
||||
https://repo.maven.apache.org/maven2/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/activation/jakarta.activation-api/2.1.2/jakarta.activation-api-2.1.2.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api-parent/2.3.2/jakarta.xml.bind-api-parent-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api-parent/4.0.0/jakarta.xml.bind-api-parent-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api-parent/4.0.1/jakarta.xml.bind-api-parent-4.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api/2.3.2/jakarta.xml.bind-api-2.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api/4.0.0/jakarta.xml.bind-api-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api/4.0.1/jakarta.xml.bind-api-4.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/javax/activation/activation/1.1/activation-1.1.pom
|
||||
https://repo.maven.apache.org/maven2/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.pom
|
||||
@@ -872,11 +872,11 @@ https://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.pom
|
||||
https://repo.maven.apache.org/maven2/junit/junit/4.13.2/junit-4.13.2.pom
|
||||
https://repo.maven.apache.org/maven2/me/zhanghai/android/materialprogressbar/library/1.4.2/library-1.4.2.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.11.13/byte-buddy-agent-1.11.13.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.14.6/byte-buddy-agent-1.14.6.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.14.8/byte-buddy-agent-1.14.8.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.11.13/byte-buddy-parent-1.11.13.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.14.6/byte-buddy-parent-1.14.6.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.14.8/byte-buddy-parent-1.14.8.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.11.13/byte-buddy-1.11.13.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.14.6/byte-buddy-1.14.6.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.14.8/byte-buddy-1.14.8.pom
|
||||
https://repo.maven.apache.org/maven2/net/java/dev/jna/jna-platform/5.6.0/jna-platform-5.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/net/java/dev/jna/jna/5.6.0/jna-5.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/net/java/jvnet-parent/1/jvnet-parent-1.pom
|
||||
@@ -991,7 +991,7 @@ https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.8.1/che
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.38.0/checker-qual-3.38.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.39.0/checker-qual-3.39.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/codehaus-parent/4/codehaus-parent-4.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-xml/3.0.10/groovy-xml-3.0.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/3.0.9/groovy-3.0.9.pom
|
||||
@@ -1046,27 +1046,30 @@ https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/2.2/hamcrest-cor
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest/2.2/hamcrest-2.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.agent/0.8.11/org.jacoco.agent-0.8.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.ant/0.8.7/org.jacoco.ant-0.8.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.build/0.7.4.201502262128/org.jacoco.build-0.7.4.201502262128.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.build/0.8.7/org.jacoco.build-0.8.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.build/0.8.10/org.jacoco.build-0.8.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.build/0.8.11/org.jacoco.build-0.8.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.core/0.7.4.201502262128/org.jacoco.core-0.7.4.201502262128.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.core/0.8.7/org.jacoco.core-0.8.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.core/0.8.10/org.jacoco.core-0.8.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.core/0.8.11/org.jacoco.core-0.8.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.report/0.7.4.201502262128/org.jacoco.report-0.7.4.201502262128.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.report/0.8.7/org.jacoco.report-0.8.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.report/0.8.10/org.jacoco.report-0.8.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.report/0.8.11/org.jacoco.report-0.8.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/jdom/jdom2/2.0.6/jdom2-2.0.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/dokka/dokka-core/1.4.32/dokka-core-1.4.32.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/intellij/deps/trove4j/1.0.20181211/trove4j-1.0.20181211.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/intellij/deps/trove4j/1.0.20200330/trove4j-1.0.20200330.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/atomicfu-jvm/0.16.3/atomicfu-jvm-0.16.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/atomicfu/0.16.3/atomicfu-0.16.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-android/1.5.2/kotlinx-coroutines-android-1.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/1.4.1/kotlinx-coroutines-core-jvm-1.4.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/1.5.0/kotlinx-coroutines-core-jvm-1.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/1.5.2/kotlinx-coroutines-core-jvm-1.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.4.1/kotlinx-coroutines-core-1.4.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.5.2/kotlinx-coroutines-core-1.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.1.0/kotlinx-metadata-jvm-0.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.6.20/kotlin-android-extensions-runtime-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-android-extensions/1.6.10/kotlin-android-extensions-1.6.10.pom
|
||||
@@ -1106,7 +1109,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.4.32/
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.5.31/kotlin-reflect-1.5.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.6.10/kotlin-reflect-1.6.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.6.20/kotlin-reflect-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.9.10/kotlin-reflect-1.9.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.9.20-RC/kotlin-reflect-1.9.20-RC.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.6.10/kotlin-scripting-common-1.6.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-common/1.6.20/kotlin-scripting-common-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-scripting-compiler-embeddable/1.6.10/kotlin-scripting-compiler-embeddable-1.6.10.pom
|
||||
@@ -1135,7 +1138,6 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.10/kotlin-stdlib-common-1.6.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.20/kotlin-stdlib-common-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21/kotlin-stdlib-common-1.6.21.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.9.0/kotlin-stdlib-common-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.9.10/kotlin-stdlib-common-1.9.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.20/kotlin-stdlib-jdk7-1.3.20.pom
|
||||
@@ -1148,7 +1150,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.5
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.5.31/kotlin-stdlib-jdk7-1.5.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.10/kotlin-stdlib-jdk7-1.6.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.20/kotlin-stdlib-jdk7-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.9.0/kotlin-stdlib-jdk7-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.9.10/kotlin-stdlib-jdk7-1.9.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.2.71/kotlin-stdlib-jdk8-1.2.71.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.20/kotlin-stdlib-jdk8-1.3.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.50/kotlin-stdlib-jdk8-1.3.50.pom
|
||||
@@ -1160,7 +1162,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.31/kotlin-stdlib-jdk8-1.5.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.6.10/kotlin-stdlib-jdk8-1.6.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.6.20/kotlin-stdlib-jdk8-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.9.0/kotlin-stdlib-jdk8-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.9.10/kotlin-stdlib-jdk8-1.9.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.0/kotlin-stdlib-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.2.20/kotlin-stdlib-1.2.20.pom
|
||||
@@ -1182,8 +1184,8 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.5.31/k
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.10/kotlin-stdlib-1.6.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.20/kotlin-stdlib-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.21/kotlin-stdlib-1.6.21.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.0/kotlin-stdlib-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.10/kotlin-stdlib-1.9.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.20-RC/kotlin-stdlib-1.9.20-RC.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-metadata/1.6.10/kotlin-tooling-metadata-1.6.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-tooling-metadata/1.6.20/kotlin-tooling-metadata-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.6.10/kotlin-util-io-1.6.10.pom
|
||||
@@ -1194,7 +1196,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/markdown-jvm/0.2.1/markdown-j
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/markdown/0.2.1/markdown-0.2.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
|
||||
https://repo.maven.apache.org/maven2/org/json/json/20180813/json-20180813.pom
|
||||
https://repo.maven.apache.org/maven2/org/json/json/20230618/json-20230618.pom
|
||||
https://repo.maven.apache.org/maven2/org/json/json/20231013/json-20231013.pom
|
||||
https://repo.maven.apache.org/maven2/org/jsoup/jsoup/1.13.1/jsoup-1.13.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.9.2/junit-bom-5.9.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.10.0/junit-bom-5.10.0.pom
|
||||
@@ -1203,7 +1205,7 @@ https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.8.1/stax-ex-1.8.
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.8/stax-ex-1.8.pom
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/2.1.0/stax-ex-2.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/mockito/mockito-core/3.12.4/mockito-core-3.12.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/mockito/mockito-core/5.5.0/mockito-core-5.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/mockito/mockito-core/5.6.0/mockito-core-5.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.2/objenesis-parent-3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.3/objenesis-parent-3.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.2/objenesis-3.2.pom
|
||||
@@ -1214,13 +1216,13 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/6.0/asm-analysis-6
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/7.0/asm-analysis-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/8.0.1/asm-analysis-8.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/9.1/asm-analysis-9.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-bom/9.5/asm-bom-9.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-bom/9.6/asm-bom-9.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/5.1/asm-commons-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/6.0/asm-commons-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/8.0.1/asm-commons-8.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/9.1/asm-commons-9.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/9.6/asm-commons-9.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-debug-all/6.0_BETA/asm-debug-all-6.0_BETA.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-parent/5.0.1/asm-parent-5.0.1.pom
|
||||
@@ -1234,7 +1236,7 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/6.0/asm-tree-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/7.0/asm-tree-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/8.0.1/asm-tree-8.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/9.1/asm-tree-9.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/9.6/asm-tree-9.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/5.1/asm-util-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/6.0/asm-util-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/7.0/asm-util-7.0.pom
|
||||
@@ -1246,7 +1248,7 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm/6.0/asm-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/7.0/asm-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/8.0.1/asm-8.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.1/asm-9.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.5/asm-9.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.6/asm-9.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.5.1/ow2-1.5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.5/ow2-1.5.pom
|
||||
|
||||
@@ -38,6 +38,17 @@ function gen_deps_list() {
|
||||
echo -e "${CLR}Found ${GRN}$(wc -l < "${DEPS_LIST}")${RST} direct dependencies..."
|
||||
}
|
||||
|
||||
# FIXME: Temporary fix for missing packages.
|
||||
# https://github.com/status-im/status-mobile/issues/15447
|
||||
function add_deps_hack() {
|
||||
echo -n \
|
||||
'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.10
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
|
||||
com.android.tools.lint:lint-gradle:30.2.2
|
||||
com.android.tools.build:gradle:7.0.4' \
|
||||
>> "${DEPS_LIST}"
|
||||
}
|
||||
|
||||
# Find download URLs for each dependency.
|
||||
function gen_deps_urls() {
|
||||
go-maven-resolver < "${DEPS_LIST}" | sort -uV -o "${DEPS_URLS}"
|
||||
@@ -82,10 +93,7 @@ fi
|
||||
# Run each stage in order
|
||||
gen_proj_list
|
||||
gen_deps_list
|
||||
# FIXME: Temporary fix for missing package.
|
||||
echo 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.10' >> "${DEPS_LIST}"
|
||||
echo 'com.android.tools.lint:lint-gradle:30.2.2' >> "${DEPS_LIST}"
|
||||
echo 'com.android.tools.build:gradle:7.0.4' >> "${DEPS_LIST}"
|
||||
add_deps_hack
|
||||
gen_deps_urls
|
||||
gen_deps_json
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ declare -a REPOS=(
|
||||
|
||||
# These files are not necessary for the build process.
|
||||
FILENAMES_BLACKLIST='-(javadoc|runtime|gwt|headers|sources|src|tests|adapters|modular|site|bin)\.'
|
||||
FILETYPES_BLACKLIST='(pom|json|zip|module|xml|md5|sha1|sha256|sha512)$'
|
||||
FILETYPES_BLACKLIST='(pom|json|zip|xml|md5|sha1|sha256|sha512)$'
|
||||
SIGNATURE_BLACKLIST='(pom|jar|json|zip|module|xml|md5|asc).asc$'
|
||||
|
||||
function nix_prefetch() {
|
||||
|
||||
@@ -65,6 +65,7 @@ in {
|
||||
# Package version adjustments
|
||||
gradle = super.gradle_7;
|
||||
nodejs = super.nodejs-18_x;
|
||||
ruby = super.ruby_3_1;
|
||||
yarn = super.yarn.override { nodejs = super.nodejs-18_x; };
|
||||
openjdk = super.openjdk11_headless;
|
||||
xcodeWrapper = super.xcodeenv.composeXcodeWrapper {
|
||||
|
||||
@@ -22,8 +22,6 @@ in mkShell {
|
||||
lsof # used in start-react-native.sh
|
||||
# build specific utilities
|
||||
clojure maven watchman
|
||||
# lint specific utilities
|
||||
clj-kondo zprint
|
||||
# other nice to have stuff
|
||||
yarn nodejs python310
|
||||
] # and some special cases
|
||||
|
||||
@@ -18,7 +18,11 @@ let
|
||||
|
||||
# for calling clojure targets in CI or Makefile
|
||||
clojure = mkShell {
|
||||
buildInputs = with pkgs; [ clojure flock maven openjdk ];
|
||||
buildInputs = with pkgs; [
|
||||
clojure flock maven openjdk
|
||||
# lint specific utilities
|
||||
clj-kondo zprint clojure-lsp
|
||||
];
|
||||
# CLASSPATH from clojure deps with 'src' appended to find local sources.
|
||||
shellHook = with pkgs; ''
|
||||
export CLASS_PATH="$(find ${deps.clojure} -iname '*.jar' | tr '\n' ':')src"
|
||||
|
||||
@@ -4,14 +4,8 @@
|
||||
"main": "modules/react-native-status/nodejs/bindings.js",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "react-native start",
|
||||
"ios": "react-native run-ios",
|
||||
"preinstall": "make status-go-library",
|
||||
"app:compile:android": "shadow-cljs compile android",
|
||||
"app:watch": "shadow-cljs watch android",
|
||||
"app:packager": "react-native start --host 0.0.0.0 --port 8081",
|
||||
"app:android": "react-native run-android",
|
||||
"prettier": "node_modules/.bin/prettier --write ."
|
||||
"_comment": "This also prevents 'yarn install' from running outside of nix.",
|
||||
"preinstall": "scripts/check-nix-shell.sh && make status-go-library"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/preset-typescript": "^7.17.12",
|
||||
|
||||
|
After Width: | Height: | Size: 645 B |
|
After Width: | Height: | Size: 976 B |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Check if inside Nix shell
|
||||
if [[ -z "${IN_NIX_SHELL}" ]]; then
|
||||
echo "ERROR: This command must be run inside a Nix shell. Please ensure you're inside a nix shell and try again."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
QUO_USAGES=$(grep -r -E '\[quo\.[^ ]* :(?:as|refer)|\[quo\.[^ ]*\]' --include '*.cljs' --include '*.clj' './src/status_im2' --exclude='./src/status_im2/common/theme/core.cljs' || true)
|
||||
|
||||
echo -e "\nChecking 'status_im2' namespace for 'quo' namespace usage."
|
||||
|
||||
if [ -n "$QUO_USAGES" ]; then
|
||||
echo -e "\033[0;31mERROR: Usage of the old 'quo' namespace detected in 'status_im2' code. Please update to 'quo2'. \n"
|
||||
echo -e "$QUO_USAGES \033[0m"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
INVALID_CHANGES=$(grep -E -r '(re-frame/dispatch|rf/dispatch|re-frame/subscribe|rf/subscribe|rf/sub|<sub|>evt|status-im\.|status-im2\.)' --include '*.cljs' --include '*.clj' './src/quo2')
|
||||
INVALID_CHANGES=$(grep -E -r '(re-frame/dispatch|rf/dispatch|re-frame/subscribe|rf/subscribe|rf/sub|<sub|>evt|status-im\.|status-im2\.)' --include '*.cljs' --include '*.clj' './src/quo')
|
||||
|
||||
if test -n "$INVALID_CHANGES"; then
|
||||
echo "WARNING: re-frame, status-im are not allowed in quo2 components"
|
||||
echo "WARNING: re-frame, status-im are not allowed in quo components"
|
||||
echo ''
|
||||
echo "$INVALID_CHANGES"
|
||||
exit 1
|
||||
|
||||
@@ -14,4 +14,4 @@ if [ ! -z "$METRO_PID" ]; then
|
||||
[[ $term == 'y' ]] && kill $METRO_PID
|
||||
fi
|
||||
|
||||
yarn start
|
||||
react-native start
|
||||
|
||||
@@ -5,27 +5,25 @@
|
||||
[re-frame "1.3.0"]
|
||||
[binaryage/oops "0.7.2"]
|
||||
[com.andrewmcveigh/cljs-time "0.5.2"]
|
||||
[status-im/timbre "4.10.0-2-status"]
|
||||
[hickory "0.7.1"]
|
||||
[cljs-bean "1.3.0"]
|
||||
[com.cognitect/transit-cljs "0.8.248"]
|
||||
[mvxcvi/alphabase "1.0.0"]
|
||||
[com.taoensso/timbre "6.3.1"]
|
||||
[cljs-bean "1.9.0"]
|
||||
[com.cognitect/transit-cljs "0.8.280"]
|
||||
[camel-snake-kebab "0.4.3"]
|
||||
|
||||
;; Dev dependencies
|
||||
[refactor-nrepl "2.5.0"]
|
||||
[cider/cider-nrepl "0.25.3"]
|
||||
[cider/piggieback "0.4.1"]
|
||||
[re-frisk-remote "1.6.0"]
|
||||
;; We don't use the encore library, but re-frisk requires re-frisk/sente (fork of
|
||||
;; com.taoensso/sente), which in turn requires encore. We need to bump encore to
|
||||
;; 3.21.0+ to remove a warning displayed while shadow-cljs starts (commit
|
||||
;; https://github.com/ptaoussanis/encore/commit/f7a21567b9611a63999609ca183c7fb175034bd6).
|
||||
[com.taoensso/encore "3.21.0"]
|
||||
|
||||
;; Use the same version specified in the Nix dependency.
|
||||
[clj-kondo/clj-kondo "2023.09.07"]
|
||||
|
||||
;; Routing
|
||||
[bidi "2.1.6"]
|
||||
;; Test dependencies
|
||||
[day8.re-frame/test "0.1.5"]
|
||||
[com.taoensso/tufte "2.1.0"]]
|
||||
[com.taoensso/tufte "2.6.3"]]
|
||||
|
||||
;; port and middleware for repl in development
|
||||
:nrepl {:port 7888
|
||||
@@ -107,7 +105,7 @@
|
||||
:optimizations :simple
|
||||
:target :node-test
|
||||
;; Uncomment line below to `make test-watch` a specific file
|
||||
;; :ns-regexp "status-im2.subs.chat.messages-test$"
|
||||
;; :ns-regexp "status-im2.subs.messages-test$"
|
||||
:main
|
||||
status-im.test-runner/main
|
||||
;; set :ui-driven to true to let shadow-cljs inject node-repl
|
||||
@@ -143,7 +141,7 @@
|
||||
:compiler-options {:optimizations :simple
|
||||
:source-map false}}
|
||||
:component-test {:target :npm-module
|
||||
:entries [quo2.core-spec status-im2.core-spec]
|
||||
:entries [quo.core-spec status-im2.core-spec]
|
||||
:ns-regexp "component-spec$"
|
||||
:output-dir "component-spec"
|
||||
:compiler-options {:warnings-as-errors false
|
||||
|
||||
@@ -9,10 +9,12 @@ export const OPEN_WITH_ANIMATION = 3;
|
||||
// Floating Screen States
|
||||
export const CLOSE_SCREEN_WITHOUT_ANIMATION = 0;
|
||||
export const OPEN_SCREEN_WITHOUT_ANIMATION = 1;
|
||||
export const CLOSE_SCREEN_WITH_SLIDE_ANIMATION = 2;
|
||||
export const OPEN_SCREEN_WITH_SLIDE_ANIMATION = 3;
|
||||
export const CLOSE_SCREEN_WITH_SHELL_ANIMATION = 4;
|
||||
export const OPEN_SCREEN_WITH_SHELL_ANIMATION = 5;
|
||||
export const CLOSE_SCREEN_WITH_SHELL_ANIMATION = 2;
|
||||
export const OPEN_SCREEN_WITH_SHELL_ANIMATION = 3;
|
||||
export const CLOSE_SCREEN_WITH_SLIDE_TO_RIGHT_ANIMATION = 4;
|
||||
export const OPEN_SCREEN_WITH_SLIDE_FROM_RIGHT_ANIMATION = 5;
|
||||
export const CLOSE_SCREEN_WITH_SLIDE_TO_BOTTOM_ANIMATION = 6;
|
||||
export const OPEN_SCREEN_WITH_SLIDE_FROM_BOTTOM_ANIMATION = 7;
|
||||
|
||||
export const SHELL_ANIMATION_TIME = 200;
|
||||
|
||||
|
||||
@@ -6,10 +6,6 @@ export function screenLeft(screenState, screenWidth, switcherCardLeftPosition) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (screenState.value) {
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_ANIMATION:
|
||||
return withTiming(screenWidth, constants.EASE_OUT_EASING);
|
||||
case constants.OPEN_SCREEN_WITH_SLIDE_ANIMATION:
|
||||
return withTiming(0, constants.EASE_OUT_EASING);
|
||||
case constants.CLOSE_SCREEN_WITHOUT_ANIMATION:
|
||||
return screenWidth;
|
||||
case constants.OPEN_SCREEN_WITHOUT_ANIMATION:
|
||||
@@ -17,25 +13,51 @@ export function screenLeft(screenState, screenWidth, switcherCardLeftPosition) {
|
||||
// https://github.com/software-mansion/react-native-reanimated/issues/3296#issuecomment-1573900172
|
||||
return withSequence(withTiming(-1, { duration: 0 }), withTiming(0, { duration: 0 }));
|
||||
case constants.CLOSE_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withTiming(switcherCardLeftPosition, constants.EASE_OUT_EASING);
|
||||
return withSequence(
|
||||
withTiming(switcherCardLeftPosition, constants.EASE_OUT_EASING),
|
||||
withTiming(screenWidth, { duration: 0 }),
|
||||
);
|
||||
case constants.OPEN_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withTiming(0, constants.EASE_OUT_EASING);
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_TO_RIGHT_ANIMATION:
|
||||
return withTiming(screenWidth, constants.EASE_OUT_EASING);
|
||||
case constants.OPEN_SCREEN_WITH_SLIDE_FROM_RIGHT_ANIMATION:
|
||||
return withTiming(0, constants.EASE_OUT_EASING);
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_TO_BOTTOM_ANIMATION:
|
||||
return withDelay(constants.SHELL_ANIMATION_TIME, withTiming(screenWidth, { duration: 0 }));
|
||||
case constants.OPEN_SCREEN_WITH_SLIDE_FROM_BOTTOM_ANIMATION:
|
||||
return 0;
|
||||
default:
|
||||
return screenWidth;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function screenTop(screenState, switcherCardTopPosition) {
|
||||
export function screenTop(screenState, screenHeight, switcherCardTopPosition) {
|
||||
return useDerivedValue(function () {
|
||||
'worklet';
|
||||
switch (screenState.value) {
|
||||
case constants.CLOSE_SCREEN_WITHOUT_ANIMATION:
|
||||
return screenHeight;
|
||||
case constants.OPEN_SCREEN_WITHOUT_ANIMATION:
|
||||
return withSequence(withTiming(-1, { duration: 0 }), withTiming(0, { duration: 0 }));
|
||||
case constants.CLOSE_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withTiming(switcherCardTopPosition, constants.EASE_OUT_EASING);
|
||||
return withSequence(
|
||||
withTiming(switcherCardTopPosition, constants.EASE_OUT_EASING),
|
||||
withTiming(screenHeight, { duration: 0 }),
|
||||
);
|
||||
case constants.OPEN_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withTiming(0, constants.EASE_OUT_EASING);
|
||||
default:
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_TO_RIGHT_ANIMATION:
|
||||
return withDelay(constants.SHELL_ANIMATION_TIME, withTiming(screenHeight, { duration: 0 }));
|
||||
case constants.OPEN_SCREEN_WITH_SLIDE_FROM_RIGHT_ANIMATION:
|
||||
return 0;
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_TO_BOTTOM_ANIMATION:
|
||||
return withTiming(screenHeight, constants.EASE_OUT_EASING);
|
||||
case constants.OPEN_SCREEN_WITH_SLIDE_FROM_BOTTOM_ANIMATION:
|
||||
return withTiming(0, constants.EASE_OUT_EASING);
|
||||
default:
|
||||
return screenHeight;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -79,7 +101,8 @@ export function screenZIndex(screenState) {
|
||||
'worklet';
|
||||
switch (screenState.value) {
|
||||
case constants.CLOSE_SCREEN_WITH_SHELL_ANIMATION:
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_ANIMATION:
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_TO_RIGHT_ANIMATION:
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_TO_BOTTOM_ANIMATION:
|
||||
return withDelay(constants.SHELL_ANIMATION_TIME, withTiming(-1, { duration: 0 }));
|
||||
case constants.CLOSE_SCREEN_WITHOUT_ANIMATION:
|
||||
return -1;
|
||||
@@ -95,10 +118,12 @@ export function screenBorderRadius(screenState) {
|
||||
switch (screenState.value) {
|
||||
case constants.OPEN_SCREEN_WITH_SHELL_ANIMATION:
|
||||
return withDelay(constants.SHELL_ANIMATION_TIME, withTiming(0, { duration: 0 }));
|
||||
case constants.OPEN_SCREEN_WITH_SLIDE_ANIMATION:
|
||||
case constants.OPEN_SCREEN_WITH_SLIDE_FROM_RIGHT_ANIMATION:
|
||||
case constants.OPEN_SCREEN_WITH_SLIDE_FROM_BOTTOM_ANIMATION:
|
||||
case constants.OPEN_SCREEN_WITHOUT_ANIMATION:
|
||||
return 0;
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_ANIMATION:
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_TO_RIGHT_ANIMATION:
|
||||
case constants.CLOSE_SCREEN_WITH_SLIDE_TO_BOTTOM_ANIMATION:
|
||||
return withDelay(constants.SHELL_ANIMATION_TIME, withTiming(20, { duration: 0 }));
|
||||
case constants.CLOSE_SCREEN_WITHOUT_ANIMATION:
|
||||
case constants.CLOSE_SCREEN_WITH_SHELL_ANIMATION:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns mocks.js-dependencies
|
||||
(:require-macros [status-im.utils.slurp :refer [slurp]])
|
||||
(:require [status-im.fleet.default-fleet :refer (default-fleets)])
|
||||
(:require
|
||||
[status-im.fleet.default-fleet :refer (default-fleets)])
|
||||
(:require [status-im.utils.test :as utils.test]))
|
||||
|
||||
;; to generate a js Proxy at js/__STATUS_MOBILE_JS_IDENTITY_PROXY__ that accept any (.xxx) call and
|
||||
@@ -323,7 +324,11 @@
|
||||
|
||||
(def react-native-permissions #js {:default #js {}})
|
||||
|
||||
(def push-notification-ios #js {:default #js {:abandonPermissions identity}})
|
||||
(def push-notification-ios
|
||||
#js
|
||||
{:default #js
|
||||
{:abandonPermissions identity
|
||||
:removeAllDeliveredNotifications identity}})
|
||||
|
||||
(def rn-emoji-keyboard
|
||||
#js {:EmojiKeyboard #js {}})
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
(ns native-module.core
|
||||
(:require ["react-native" :as react-native]
|
||||
[utils.validators :as validators]
|
||||
[taoensso.timbre :as log]
|
||||
[react-native.platform :as platform]
|
||||
[react-native.core :as rn]
|
||||
[utils.transforms :as types]
|
||||
[clojure.string :as string]))
|
||||
(:require
|
||||
["react-native" :as react-native]
|
||||
[clojure.string :as string]
|
||||
[react-native.platform :as platform]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.transforms :as types]
|
||||
[utils.validators :as validators]))
|
||||
|
||||
(defn status
|
||||
[]
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
(defn init
|
||||
[handler]
|
||||
(.addListener ^js rn/device-event-emitter "gethEvent" #(handler (.-jsonEvent ^js %))))
|
||||
(.addListener ^js (.-DeviceEventEmitter ^js react-native) "gethEvent" #(handler (.-jsonEvent ^js %))))
|
||||
|
||||
(defn clear-web-data
|
||||
[]
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
(ns native-module.push-notifications
|
||||
(:require
|
||||
["react-native" :as react-native]
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
(defn push-notification
|
||||
[]
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
(.-PushNotification ^js (.-NativeModules react-native))))
|
||||
|
||||
(defn present-local-notification
|
||||
[opts]
|
||||
(.presentLocalNotification ^js (push-notification) (clj->js opts)))
|
||||
|
||||
(defn clear-message-notifications
|
||||
[chat-id]
|
||||
(.clearMessageNotifications ^js (push-notification) chat-id))
|
||||
|
||||
(defn clear-all-message-notifications
|
||||
[]
|
||||
(.clearAllMessageNotifications ^js (push-notification)))
|
||||
|
||||
(defn create-channel
|
||||
[{:keys [channel-id channel-name]}]
|
||||
(.createChannel ^js (push-notification)
|
||||
#js {:channelId channel-id :channelName channel-name}
|
||||
#(log/info "Notifications create channel:" %)))
|
||||
|
||||
(defn enable-notifications
|
||||
[]
|
||||
(.enableNotifications ^js (push-notification)))
|
||||
|
||||
(defn disable-notifications
|
||||
[]
|
||||
(.disableNotifications ^js (push-notification)))
|
||||
|
||||
(defn add-listener
|
||||
[event callback]
|
||||
(.addListener ^js (.-DeviceEventEmitter ^js react-native)
|
||||
event
|
||||
(fn [^js data]
|
||||
(when (and data (.-dataJSON data) callback)
|
||||
(callback (.-dataJSON data))))))
|
||||
@@ -1,49 +1,215 @@
|
||||
# Status Quo Components
|
||||
All components in **Quo** should be independent of the app state. They should be _pure_
|
||||
and _easy to reason about_. Avoiding the app state is also required to make the library
|
||||
independent and easy to be pulled off as a separate repository when needed.
|
||||
To avoid high coupling and direct use of internal styling, the components should be
|
||||
exported via namespace `quo.core` and used by the Status app only from there. This will
|
||||
allow a more flexible way to update components without possible breakages into the
|
||||
app style.
|
||||
# Quo Library
|
||||
|
||||
**Quo** components should not have any dependency on the Status app, this
|
||||
will avoid circular dependency and also benefit the independence of the components.
|
||||
Quo is the name of our mobile *component library* that implements the [Status
|
||||
Design System for Mobile](https://www.figma.com/file/WQZcp6S0EnzxdTL4taoKDv/Design-System-for-Mobile).
|
||||
|
||||
All components are stored inside `components` namespaces. They are stateless and do
|
||||
not dispatch and subscribe to re-frame database. All state should be passed by props
|
||||
and all events can be passed as functions. Avoiding direct connection with re-frame
|
||||
will allow components to grow and be reused in different places without the
|
||||
conditionals hell.
|
||||
The overarching goals of having this component library are:
|
||||
|
||||
All style system constants are stored inside `design-system` namespaces. They are used
|
||||
to build components and can be directly required by the status app. Avoid
|
||||
duplication of these vars and do not use them in code directly as a value.
|
||||
- Achieve the highest possible fidelity between code and the design system in
|
||||
Figma.
|
||||
- Decouple components from ever-changing business requirements.
|
||||
|
||||
For each component introduced, add previews of all possible states.
|
||||
> [!NOTE]
|
||||
> This document captures our current practices and guidelines for implementing
|
||||
> the design system. For guidelines that apply across the entire project, take
|
||||
> a look at [new-guidelines](/doc/new-guidelines.md).
|
||||
|
||||
Do not introduce components for slightly modified existing components, if they are
|
||||
not a part of the design system. In case they are required in one place in the app,
|
||||
use style override.
|
||||
## Directory structure and file names
|
||||
|
||||
# Code style
|
||||
Ensure that your changes match the style of the rest of the code.
|
||||
This library uses Clojure Community code style [The Clojure Style Guide](https://github.com/bbatsov/clojure-style-guide).
|
||||
To ensure consistency, run `make lint`, which uses the [clj-kondo linter](https://github.com/borkdude/clj-kondo).
|
||||
We follow one basic rule: mirror Figma *pages* and their *component names* in
|
||||
the directory structure.
|
||||
|
||||
# Best practices
|
||||
For example, in the screenshot below we see the Figma page is `Banners`
|
||||
and the component name is `Banner`.
|
||||
|
||||
- Design components atomically and compose them into bigger components.
|
||||
- Do not export individual atoms, only components. This way we can limit design
|
||||
system to be used in too many way which can creating disjointed experiences.
|
||||
- Avoid external margins for atom components, it can be added on the wrapper
|
||||
where they are used but can't be removed without overriding.
|
||||
[Max Stoiber article on margins](https://mxstbr.com/thoughts/margin)
|
||||
- Design reusable components into [Layout Isolated Components](https://visly.app/blogposts/layout-isolated-components)
|
||||
(Article more relates to web, but ideas fits also to mobile development)
|
||||
- Explicit is better than implicit, do not rely on platform default, if you expect
|
||||
a specific value, then override it
|
||||
<img src="/doc/images/quo-component.png" width="600" />
|
||||
|
||||
**TBD:**
|
||||
- Components documentation
|
||||
- Check props using spec in pre conditions.
|
||||
Therefore, the structure should look like:
|
||||
|
||||
```
|
||||
quo/
|
||||
└── components/
|
||||
└── banners/
|
||||
└── banner/
|
||||
├── component_spec.cljs
|
||||
├── style.cljs
|
||||
└── view.cljs
|
||||
```
|
||||
|
||||
Files `view.cljs`, `style.cljs`, and `component_spec.cljs` should always have
|
||||
the same name, regardless of component.
|
||||
|
||||
## Component API
|
||||
|
||||
Adhere to the **same component properties and values** used in a Figma component
|
||||
when translating it to Clojure. This means using the same names for props and
|
||||
the same values. If the Figma property is a boolean, use a question mark suffix
|
||||
to make the name more idiomatic in Clojure.
|
||||
|
||||
We have found over time that the less we drift from the design system the
|
||||
better. Some key benefits:
|
||||
|
||||
- It helps developers quickly check for issues when comparing the code with the
|
||||
source of truth in Figma.
|
||||
- It is easier for pull-request reviewers to double-check components for
|
||||
correctness.
|
||||
- It helps developers create preview screens that are identical or very similar
|
||||
to Figma, which aids in spotting bugs more easily.
|
||||
- It helps designers review all component variations in preview screens.
|
||||
|
||||
<img src="/doc/images/figma-properties.png" width="600" />
|
||||
|
||||
In the image above we can see the properties are `Type`, `State`, `Size`,
|
||||
`Icon`, `Theme`, and `Background`. Translated to Clojure:
|
||||
|
||||
```clojure
|
||||
;; ns quo.components.buttons.button.view
|
||||
(def view
|
||||
[{:keys [type state size icon theme background]}]
|
||||
...)
|
||||
```
|
||||
|
||||
### Handling Sizes
|
||||
In the designs, sizes are referred to as integers. To avoid having the codebase littered with magic numbers we instead have a keyword convention to use in components to map these keywords with their sizes.
|
||||
|
||||
The convention is `:size-<number>`, e.g size `20` is `:size-20`
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(defn button
|
||||
[{:keys [size]}]
|
||||
[rn/view
|
||||
{:style {:height (case size
|
||||
20 20
|
||||
40 40
|
||||
0)}}]
|
||||
...)
|
||||
```
|
||||
|
||||
```clojure
|
||||
;; good
|
||||
(defn button
|
||||
[{:keys [size]}]
|
||||
[rn/view
|
||||
{:style {:height (case size
|
||||
:size-20 20
|
||||
:size-40 40
|
||||
0)}}]
|
||||
...)
|
||||
```
|
||||
|
||||
## Clojure var conventions
|
||||
|
||||
- Due to the fact that every `view` namespace should export only one component
|
||||
and to avoid the redundancy of `[some-component/some-component ...]`, name the
|
||||
public var `view` as well.
|
||||
- Try to make all other vars private because they should almost never be used
|
||||
directly.
|
||||
|
||||
## Component tests
|
||||
|
||||
We don't attempt to write component tests verifying how components look on the
|
||||
screen. Instead, we have found a middle ground, where the focus is on verifying
|
||||
if events are triggered as intended and that all component variations are
|
||||
rendered. We use [React Native Testing Library](https://callstack.github.io/react-native-testing-library/).
|
||||
|
||||
There are dozens of examples in the repository, so use them as a reference. A
|
||||
good and complete example is [quo.components.avatars.user-avatar.component-spec](/src/quo/components/avatars/user_avatar/component_spec.cljs)
|
||||
|
||||
## Do not couple the library with re-frame
|
||||
|
||||
Don't use re-frame inside this library (e.g. dispatch & subscribe). If a
|
||||
component needs to be stateful, the state should be local to its rendering
|
||||
lifecycle (using `reagent.core/atom`). Additionally, if the component requires
|
||||
any other data, it should be passed as arguments.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(defn view []
|
||||
(let [window-width (rf/sub [:dimensions/window-width])]
|
||||
[rn/pressable {:on-press #(rf/dispatch [:do-xyz])}
|
||||
(do-something window-width)]))
|
||||
|
||||
;; good
|
||||
(defn view [{:keys [window-width on-press]}]
|
||||
[rn/pressable {:on-press on-press}
|
||||
(do-something window-width)])
|
||||
```
|
||||
|
||||
## Themes
|
||||
|
||||
Our goal is to make all design system components *themeable*, which means they
|
||||
should not use, nor fallback to the OS theme, because themes are *contextual*
|
||||
and can be overridden in specific parts of the app.
|
||||
|
||||
To achieve this, use the higher-order function `quo.theme/with-theme` to
|
||||
automatically inject the current theme context (based on the [React Context
|
||||
API](https://react.dev/learn/passing-data-deeply-with-context)).
|
||||
|
||||
Use the following pattern:
|
||||
|
||||
```clojure
|
||||
(ns quo.components.<figma page>.<component name>.view
|
||||
(:require [quo.theme :as quo.theme]))
|
||||
|
||||
(defn- view-internal [{:keys [theme]}]
|
||||
...)
|
||||
|
||||
(def view (quo.theme/with-theme view-internal))
|
||||
```
|
||||
|
||||
Then pass the `theme` value down to all functions that may rely on the OS theme,
|
||||
like `quo.foundations.colors/theme-colors` or `quo.foundations.shadows/get`.
|
||||
|
||||
## Avoid using quo's version number in namespace aliases
|
||||
|
||||
When requiring quo namespaces, don't use the version number in the
|
||||
[alias](https://clojure.org/guides/learn/namespaces#_require), unless for a
|
||||
special reason you need to require both the old and new namespaces in the same
|
||||
file.
|
||||
|
||||
> [!NOTE]
|
||||
> Keep in mind that, at the moment, we need to keep both `src/quo/` and
|
||||
> `src/quo/` directories in the repository, but eventually the old one will go
|
||||
> away and the version number will lose its meaning.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
(ns ...
|
||||
(require [quo.theme :as quo.theme]
|
||||
[quo.core :as quo]))
|
||||
|
||||
;; good
|
||||
(ns ...
|
||||
(require [quo.theme :as quo.theme]
|
||||
[quo.core :as quo]))
|
||||
```
|
||||
|
||||
## Preview screens
|
||||
|
||||
Every component should be accompanied by a preview screen in
|
||||
`src/status_im2/contexts/quo_preview/`. Ideally, **all possible variations in
|
||||
Figma should be achievable in the preview screen** by changing the input values
|
||||
without resorting to code changes. Designers will also use this capability to
|
||||
review components in PR builds.
|
||||
|
||||
## Allow outermost containers to have their styles overridden
|
||||
|
||||
If a component needs to be wrapped in a `rn/view` instance to force it to be
|
||||
styled differently, consider changing the component to accept a
|
||||
`container-style` argument. This will help reduce the number of nodes to be
|
||||
rendered.
|
||||
|
||||
```clojure
|
||||
;; bad
|
||||
[rn/view {:style {:margin-right 12}}
|
||||
[quo/button
|
||||
{:size 32}
|
||||
:i/info]]
|
||||
|
||||
;; good
|
||||
[quo/button
|
||||
{:size 32
|
||||
:container-style {:margin-right 12}}
|
||||
:i/info]
|
||||
```
|
||||
|
||||
@@ -1,272 +0,0 @@
|
||||
(ns quo.animated
|
||||
(:refer-clojure :exclude [abs set delay divide])
|
||||
(:require ["react-native-reanimated" :default animated :refer (clockRunning EasingNode)]
|
||||
["react-native-redash/lib/module/v1" :as redash]
|
||||
[oops.core :refer [ocall oget]]
|
||||
[quo.gesture-handler :as gh]
|
||||
quo.react
|
||||
[quo.react-native :as rn]
|
||||
[reagent.core :as reagent])
|
||||
(:require-macros [quo.react :refer [maybe-js-deps]]))
|
||||
|
||||
(def create-animated-component (comp reagent/adapt-react-class (.-createAnimatedComponent animated)))
|
||||
|
||||
(def view (reagent/adapt-react-class (.-View animated)))
|
||||
(def text (reagent/adapt-react-class (.-Text animated)))
|
||||
(def scroll-view (reagent/adapt-react-class (.-ScrollView animated)))
|
||||
(def code (reagent/adapt-react-class (.-Code animated)))
|
||||
(def animated-flat-list (create-animated-component gh/flat-list-raw))
|
||||
|
||||
(defn flat-list
|
||||
[props]
|
||||
[animated-flat-list (rn/base-list-props props)])
|
||||
|
||||
(def useCode (.-useCode animated))
|
||||
|
||||
(defn code!
|
||||
([setup-fn]
|
||||
(useCode
|
||||
(fn [] (setup-fn))))
|
||||
([setup-fn deps]
|
||||
(useCode
|
||||
(fn [] (setup-fn))
|
||||
(maybe-js-deps deps))))
|
||||
|
||||
(def eq (oget animated "eq"))
|
||||
(def neq (oget animated "neq"))
|
||||
(def greater (oget animated "greaterThan"))
|
||||
(def greater-or-eq (oget animated "greaterOrEq"))
|
||||
(def less (oget animated "lessThan"))
|
||||
(def less-or-eq (oget animated "lessOrEq"))
|
||||
(def not* (oget animated "not"))
|
||||
(def or* (oget animated "or"))
|
||||
(def and* (oget animated "and"))
|
||||
|
||||
(def diff (oget animated "diff"))
|
||||
(def add (oget animated "add"))
|
||||
(def sub (oget animated "sub"))
|
||||
(def multiply (oget animated "multiply"))
|
||||
(def divide (oget animated "divide"))
|
||||
(def abs (oget animated "abs"))
|
||||
|
||||
(def min* (oget animated "min"))
|
||||
(def max* (oget animated "max"))
|
||||
|
||||
(def set (oget animated "set"))
|
||||
(def start-clock (oget animated "startClock"))
|
||||
(def stop-clock (oget animated "stopClock"))
|
||||
(def clock-running clockRunning)
|
||||
(def bezier (.-bezier ^js EasingNode))
|
||||
(def linear (.-linear ^js EasingNode))
|
||||
|
||||
(def easings
|
||||
{:linear linear
|
||||
:ease-in (bezier 0.42 0 1 1)
|
||||
:ease-out (bezier 0 0 0.58 1)
|
||||
:ease-in-out (bezier 0.42 0 0.58 1)
|
||||
:cubic (bezier 0.55 0.055 0.675 0.19)
|
||||
:keyboard (bezier 0.17 0.59 0.4 0.77)})
|
||||
|
||||
(def springs
|
||||
{:lazy {:damping 50
|
||||
:mass 0.3
|
||||
:stiffness 120
|
||||
:overshootClamping true
|
||||
:bouncyFactor 1}
|
||||
:jump {:damping 13
|
||||
:mass 0.5
|
||||
:stiffness 170
|
||||
:overshootClamping false
|
||||
:bouncyFactor 1
|
||||
:restSpeedThreshold 0.001
|
||||
:restDisplacementThreshold 0.001}})
|
||||
|
||||
(defn set-value
|
||||
[anim v]
|
||||
(ocall anim "setValue" v))
|
||||
|
||||
(def Value (oget animated "Value"))
|
||||
|
||||
(defn value
|
||||
[x]
|
||||
(new Value x))
|
||||
|
||||
(def Clock (oget animated "Clock"))
|
||||
|
||||
(defn clock
|
||||
[]
|
||||
(new Clock))
|
||||
|
||||
(def debug (oget animated "debug"))
|
||||
(def log (oget animated "log"))
|
||||
|
||||
(defn event
|
||||
([config]
|
||||
(event config {}))
|
||||
([config options]
|
||||
(ocall animated "event" (clj->js config) (clj->js options))))
|
||||
|
||||
(defn on-change
|
||||
[state node]
|
||||
(ocall animated
|
||||
"onChange"
|
||||
state
|
||||
(if (vector? node)
|
||||
(clj->js node)
|
||||
node)))
|
||||
|
||||
(defn cond*
|
||||
([condition node]
|
||||
(.cond ^js animated
|
||||
condition
|
||||
(if (vector? node)
|
||||
(clj->js node)
|
||||
node)))
|
||||
([condition if-node else-node]
|
||||
(.cond ^js animated
|
||||
condition
|
||||
(if (vector? if-node)
|
||||
(clj->js if-node)
|
||||
if-node)
|
||||
(if (vector? else-node)
|
||||
(clj->js else-node)
|
||||
else-node))))
|
||||
|
||||
(defn block
|
||||
[opts]
|
||||
(.block ^js animated (to-array opts)))
|
||||
|
||||
(defn interpolate
|
||||
[anim-value config]
|
||||
(.interpolateNode ^js animated anim-value (clj->js config)))
|
||||
|
||||
(defn call*
|
||||
[args callback]
|
||||
(.call ^js animated (to-array args) callback))
|
||||
|
||||
(defn timing
|
||||
[clock-value opts config]
|
||||
(.timing ^js animated
|
||||
clock-value
|
||||
(clj->js opts)
|
||||
(clj->js config)))
|
||||
|
||||
(defn spring
|
||||
[clock-value opts config]
|
||||
(.spring ^js animated
|
||||
clock-value
|
||||
(clj->js opts)
|
||||
(clj->js config)))
|
||||
|
||||
(def extrapolate {:clamp (oget animated "Extrapolate" "CLAMP")})
|
||||
|
||||
;; utilities
|
||||
|
||||
(def clamp (oget redash "clamp"))
|
||||
(def diff-clamp (.-diffClamp ^js redash))
|
||||
|
||||
(defn with-spring
|
||||
[config]
|
||||
(ocall redash "withSpring" (clj->js config)))
|
||||
|
||||
(defn with-decay
|
||||
[config]
|
||||
(.withDecay ^js redash (clj->js config)))
|
||||
|
||||
(defn with-offset
|
||||
[config]
|
||||
(.withOffset ^js redash (clj->js config)))
|
||||
|
||||
(defn with-spring-transition
|
||||
[v config]
|
||||
(.withSpringTransition ^js redash v (clj->js config)))
|
||||
|
||||
(defn with-timing-transition
|
||||
[v config]
|
||||
(.withTimingTransition ^js redash v (clj->js config)))
|
||||
|
||||
(defn use-spring-transition
|
||||
[v config]
|
||||
(.useSpringTransition ^js redash v (clj->js config)))
|
||||
|
||||
(defn use-timing-transition
|
||||
[v config]
|
||||
(.useTimingTransition ^js redash v (clj->js config)))
|
||||
|
||||
(defn re-timing
|
||||
[config]
|
||||
(.timing ^js redash (clj->js config)))
|
||||
|
||||
(defn re-spring
|
||||
[config]
|
||||
(.spring ^js redash (clj->js config)))
|
||||
|
||||
(defn on-scroll
|
||||
[opts]
|
||||
(ocall redash "onScrollEvent" (clj->js opts)))
|
||||
|
||||
(defn on-gesture
|
||||
[opts]
|
||||
(let [gesture-event (event #js [#js {:nativeEvent (clj->js opts)}])]
|
||||
{:onHandlerStateChange gesture-event
|
||||
:onGestureEvent gesture-event}))
|
||||
|
||||
(def mix (.-mix ^js redash))
|
||||
|
||||
(def mix-color (.-mixColor ^js redash))
|
||||
|
||||
(def delay (.-delay ^js redash))
|
||||
|
||||
(defn loop*
|
||||
[opts]
|
||||
(ocall redash "loop" (clj->js opts)))
|
||||
|
||||
(def use-value (.-useValue ^js redash))
|
||||
|
||||
(def use-clock (.-useClock ^js redash))
|
||||
|
||||
(defn use-gesture
|
||||
[opts]
|
||||
(let [gesture (.useGestureHandler ^js redash (clj->js opts))]
|
||||
{:onHandlerStateChange (.-onHandlerStateChange ^js gesture)
|
||||
:onGestureEvent (.-onGestureEvent ^js gesture)}))
|
||||
|
||||
(defn snap-point
|
||||
[v velocity snap-points]
|
||||
(.snapPoint ^js redash v velocity (to-array snap-points)))
|
||||
|
||||
(defn with-easing
|
||||
[{v :value
|
||||
:keys [snap-points velocity offset state easing duration
|
||||
animation-over]
|
||||
:or {duration 250
|
||||
animation-over (value 1)
|
||||
easing (:ease-out easings)}}]
|
||||
(let [position (value 0)
|
||||
c (clock)
|
||||
interrupted (and* (eq state (:began gh/states))
|
||||
(clock-running c))
|
||||
vel (multiply velocity 1.5)
|
||||
to (snap-point position vel snap-points)
|
||||
finish-animation [(set offset position)
|
||||
(stop-clock c)
|
||||
(set animation-over 1)]]
|
||||
(block
|
||||
[(cond* interrupted finish-animation)
|
||||
(cond* animation-over
|
||||
(set position offset))
|
||||
(cond* (neq state (:end gh/states))
|
||||
[(set animation-over 0)
|
||||
(set position (add offset v))])
|
||||
(cond* (and* (eq state (:end gh/states))
|
||||
(not* animation-over))
|
||||
[(set position
|
||||
(re-timing
|
||||
{:clock c
|
||||
:easing easing
|
||||
:duration duration
|
||||
:from position
|
||||
:to to}))
|
||||
(cond* (not* (clock-running c))
|
||||
finish-animation)])
|
||||
position])))
|
||||
@@ -1,136 +0,0 @@
|
||||
(ns quo.components.animated.pressable
|
||||
(:require [cljs-bean.core :as bean]
|
||||
[quo.animated :as animated]
|
||||
[quo.gesture-handler :as gesture-handler]
|
||||
[quo.react :as react]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(def long-press-duration 500)
|
||||
(def scale-down-small 0.95)
|
||||
(def scale-down-large 0.9)
|
||||
(def opactiy 0.75)
|
||||
(def time-in 100)
|
||||
(def time-out 200)
|
||||
|
||||
(defmulti type->animation :type)
|
||||
|
||||
(defmethod type->animation :primary
|
||||
[{:keys [animation]}]
|
||||
{:background {:transform [{:scale (animated/mix animation 1 scale-down-small)}]
|
||||
:opacity (animated/mix animation 1 opactiy)}
|
||||
:foreground {:transform [{:scale (animated/mix animation 1 scale-down-small)}]
|
||||
:opacity (animated/mix animation 1 opactiy)}})
|
||||
|
||||
(defmethod type->animation :secondary
|
||||
[{:keys [animation]}]
|
||||
{:background {:transform [{:scale (animated/mix animation scale-down-small 1)}]
|
||||
:opacity (animated/mix animation 0 opactiy)}
|
||||
:foreground {:transform [{:scale (animated/mix animation 1 scale-down-small)}]
|
||||
:opacity (animated/mix animation 1 opactiy)}})
|
||||
|
||||
(defmethod type->animation :icon
|
||||
[{:keys [animation]}]
|
||||
{:background {:transform [{:scale (animated/mix animation scale-down-large 1)}]
|
||||
:opacity (animated/mix animation 0 opactiy)}
|
||||
:foreground {:transform [{:scale (animated/mix animation 1 scale-down-large)}]
|
||||
:opacity (animated/mix animation 1 opactiy)}})
|
||||
|
||||
(defmethod type->animation :list-item
|
||||
[{:keys [animation]}]
|
||||
{:background {:opacity (animated/mix animation 0 opactiy)}
|
||||
:foreground {:transform [{:scale (animated/mix animation 1 scale-down-small)}]
|
||||
:opacity (animated/mix animation 1 opactiy)}})
|
||||
|
||||
(defmethod type->animation :scale
|
||||
[{:keys [animation]}]
|
||||
{:background {:opacity 0}
|
||||
:foreground {:transform [{:scale (animated/mix animation 1 scale-down-small)}]
|
||||
:opacity (animated/mix animation 1 opactiy)}})
|
||||
|
||||
(def absolute-fill
|
||||
{:top 0
|
||||
:bottom 0
|
||||
:left 0
|
||||
:right 0
|
||||
:position :absolute})
|
||||
|
||||
(defn pressable-hooks
|
||||
[props]
|
||||
(let [{background-color :bgColor
|
||||
border-radius :borderRadius
|
||||
border-color :borderColor
|
||||
border-width :borderWidth
|
||||
type :type
|
||||
disabled :disabled
|
||||
on-press :onPress
|
||||
on-long-press :onLongPress
|
||||
on-press-start :onPressStart
|
||||
accessibility-label :accessibilityLabel
|
||||
children :children
|
||||
:or {border-radius 0
|
||||
type "primary"}}
|
||||
(bean/bean props)
|
||||
long-press-ref (react/create-ref)
|
||||
state (animated/use-value (:undetermined gesture-handler/states))
|
||||
active (animated/eq state (:began gesture-handler/states))
|
||||
gesture-handler (animated/use-gesture {:state state})
|
||||
animation (react/use-memo
|
||||
(fn []
|
||||
(animated/with-timing-transition active
|
||||
{:duration (animated/cond* active time-in time-out)
|
||||
:easing (:ease-in animated/easings)}))
|
||||
[])
|
||||
{:keys [background
|
||||
foreground]}
|
||||
(react/use-memo
|
||||
(fn []
|
||||
(type->animation {:type (keyword type)
|
||||
:animation animation}))
|
||||
[type])
|
||||
handle-press (fn [] (when on-press (on-press)))
|
||||
long-gesture-handler (react/callback
|
||||
(fn [^js evt]
|
||||
(let [gesture-state (-> evt .-nativeEvent .-state)]
|
||||
(when (and on-press-start
|
||||
(= gesture-state (:began gesture-handler/states)))
|
||||
(on-press-start))
|
||||
(when (and on-long-press
|
||||
(= gesture-state (:active gesture-handler/states)))
|
||||
(on-long-press)
|
||||
(animated/set-value state (:undetermined gesture-handler/states)))))
|
||||
[on-long-press on-press-start])]
|
||||
(animated/code!
|
||||
(fn []
|
||||
(when on-press
|
||||
(animated/cond* (animated/eq state (:end gesture-handler/states))
|
||||
[(animated/set state (:undetermined gesture-handler/states))
|
||||
(animated/call* [] handle-press)])))
|
||||
[on-press])
|
||||
(reagent/as-element
|
||||
[gesture-handler/long-press-gesture-handler
|
||||
{:enabled (boolean (and on-long-press (not disabled)))
|
||||
:on-handler-state-change long-gesture-handler
|
||||
:min-duration-ms long-press-duration
|
||||
:max-dist 22
|
||||
:ref long-press-ref}
|
||||
[animated/view
|
||||
{:accessible true
|
||||
:accessibility-label accessibility-label}
|
||||
[gesture-handler/tap-gesture-handler
|
||||
(merge gesture-handler
|
||||
{:shouldCancelWhenOutside true
|
||||
:wait-for long-press-ref
|
||||
:enabled (boolean (and (or on-press on-long-press on-press-start)
|
||||
(not disabled)))})
|
||||
[animated/view
|
||||
[animated/view
|
||||
{:style (merge absolute-fill
|
||||
background
|
||||
{:background-color background-color
|
||||
:border-radius border-radius
|
||||
:border-color border-color
|
||||
:border-width border-width})}]
|
||||
(into [animated/view {:style foreground}]
|
||||
(react/get-children children))]]]])))
|
||||
|
||||
(def pressable (reagent/adapt-react-class (react/memo pressable-hooks)))
|
||||
@@ -1,103 +0,0 @@
|
||||
(ns quo.components.animated-header
|
||||
(:require [oops.core :refer [oget]]
|
||||
[quo.animated :as animated]
|
||||
[quo.components.header :as header]
|
||||
[quo.design-system.colors :as colors]
|
||||
[quo.platform :as platform]
|
||||
[reagent.core :as reagent]
|
||||
[react-native.safe-area :as safe-area]))
|
||||
|
||||
(defn header-wrapper-style
|
||||
[{:keys [value offset]}]
|
||||
(merge
|
||||
{:background-color (:ui-background @colors/theme)}
|
||||
(when (and offset platform/android?)
|
||||
{:elevation (animated/interpolate
|
||||
value
|
||||
{:inputRange [0 offset]
|
||||
:outputRange [0 4]
|
||||
:extrapolate (:clamp animated/extrapolate)})})
|
||||
(when (and offset platform/ios?)
|
||||
{:z-index 2
|
||||
:shadow-opacity (animated/interpolate
|
||||
value
|
||||
{:inputRange [0 offset]
|
||||
:outputRange [0 1]
|
||||
:extrapolate (:clamp animated/extrapolate)})
|
||||
:shadow-radius 16
|
||||
:shadow-color (:shadow-01 @colors/theme)
|
||||
:shadow-offset {:width 0 :height 4}})))
|
||||
|
||||
(defn title-style
|
||||
[layout]
|
||||
{:flex 1
|
||||
:justify-content :center
|
||||
:padding-right (get-in layout [:right :width])})
|
||||
|
||||
(defn header-container
|
||||
[]
|
||||
(let [y (animated/value 0)
|
||||
animation-value (animated/value 0)
|
||||
animation (animated/with-timing-transition
|
||||
animation-value
|
||||
{:duration 250
|
||||
:easing (:ease-in animated/easings)})
|
||||
on-scroll (animated/on-scroll {:y y})
|
||||
layout (reagent/atom {})
|
||||
offset (reagent/atom 0)
|
||||
on-layout (fn [evt]
|
||||
(reset! offset (oget evt "nativeEvent" "layout" "height")))]
|
||||
(fn [{:keys [extended-header refresh-control refreshing-sub refreshing-counter] :as props} children]
|
||||
[animated/view
|
||||
{:flex 1
|
||||
:pointer-events :box-none}
|
||||
[animated/code
|
||||
{:key (str @offset)
|
||||
:exec (animated/cond*
|
||||
(animated/and* (animated/greater-or-eq y @offset)
|
||||
(animated/greater-or-eq y 1))
|
||||
(animated/set animation-value 1)
|
||||
(animated/set animation-value 0))}]
|
||||
[animated/view
|
||||
{:pointer-events :box-none
|
||||
:style (header-wrapper-style {:value y
|
||||
:offset @offset})}
|
||||
[header/header
|
||||
(merge
|
||||
{:get-layout (fn [el l] (swap! layout assoc el l))
|
||||
:border-bottom false
|
||||
:title-component [animated/view {:style (title-style @layout)}
|
||||
[extended-header
|
||||
{:value y
|
||||
:animation animation
|
||||
:minimized true
|
||||
:offset @offset}]]
|
||||
:title-align :left}
|
||||
(dissoc props :extended-header))]]
|
||||
(into [animated/scroll-view
|
||||
{:on-scroll on-scroll
|
||||
:refreshControl (when refresh-control
|
||||
(refresh-control
|
||||
(and @refreshing-sub
|
||||
@refreshing-counter)))
|
||||
:style {:z-index 1}
|
||||
:scrollEventThrottle 16}
|
||||
[animated/view {:pointer-events :box-none}
|
||||
[animated/view
|
||||
{:pointer-events :box-none
|
||||
:on-layout on-layout}
|
||||
[extended-header
|
||||
{:value y
|
||||
:animation animation
|
||||
:offset @offset}]]]]
|
||||
children)])))
|
||||
|
||||
(defn header
|
||||
[{:keys [use-insets] :as props} & children]
|
||||
(if use-insets
|
||||
[header-container
|
||||
(-> props
|
||||
(dissoc :use-insets)
|
||||
(assoc :insets (safe-area/get-insets)))
|
||||
children]
|
||||
[header-container props children]))
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns quo2.components.animated-header-flatlist.style
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[react-native.reanimated :as reanimated]))
|
||||
(ns quo.components.animated-header-flatlist.style
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]
|
||||
[react-native.reanimated :as reanimated]))
|
||||
|
||||
(defn container-view
|
||||
[view-height]
|
||||
@@ -1,16 +1,16 @@
|
||||
(ns quo2.components.animated-header-flatlist.view
|
||||
(ns quo.components.animated-header-flatlist.view
|
||||
(:require
|
||||
[quo2.core :as quo]
|
||||
[oops.core :as oops]
|
||||
[quo.components.animated-header-flatlist.style :as style]
|
||||
[quo.core :as quo]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[react-native.fast-image :as fast-image]
|
||||
[react-native.platform :as platform]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[react-native.safe-area :as safe-area]
|
||||
[react-native.fast-image :as fast-image]
|
||||
[reagent.core :as reagent]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[quo2.components.animated-header-flatlist.style :as style]
|
||||
[oops.core :as oops]
|
||||
[quo2.theme :as quo.theme]))
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(def header-height 234)
|
||||
(def cover-height 192)
|
||||
@@ -1,8 +1,9 @@
|
||||
(ns quo2.components.avatars.account-avatar.component-spec
|
||||
(:require [quo2.components.avatars.account-avatar.view :as account-avatar]
|
||||
[quo2.components.avatars.account-avatar.style :as style]
|
||||
[test-helpers.component :as h]
|
||||
[quo2.foundations.colors :as colors]))
|
||||
(ns quo.components.avatars.account-avatar.component-spec
|
||||
(:require
|
||||
[quo.components.avatars.account-avatar.style :as style]
|
||||
[quo.components.avatars.account-avatar.view :as account-avatar]
|
||||
[quo.foundations.colors :as colors]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "Account Avatar"
|
||||
(h/test "default render"
|
||||
@@ -28,7 +29,7 @@
|
||||
{:height (:size opts)
|
||||
:width (:size opts)
|
||||
:borderRadius (style/get-border-radius (:size opts))
|
||||
:backgroundColor (colors/custom-color-by-theme (:customization-color opts) 50 60)})
|
||||
:backgroundColor (colors/resolve-color (:customization-color opts) :dark)})
|
||||
(h/is-truthy (h/query-by-label-text :account-emoji))
|
||||
(h/has-style (h/query-by-label-text :account-emoji)
|
||||
{:fontSize (style/get-emoji-size (:size opts))})
|
||||
@@ -47,7 +48,7 @@
|
||||
:width (:size opts)
|
||||
:borderRadius (style/get-border-radius (:size opts))
|
||||
:borderWidth 1
|
||||
:backgroundColor (colors/custom-color-by-theme (:customization-color opts) 50 50 10 10)})
|
||||
:backgroundColor (colors/resolve-color (:customization-color opts) :light 10)})
|
||||
(h/is-truthy (h/query-by-label-text :account-emoji))
|
||||
(h/has-style (h/query-by-label-text :account-emoji)
|
||||
{:fontSize (style/get-emoji-size (:size opts))})
|
||||
@@ -64,7 +65,7 @@
|
||||
{:height (:size opts)
|
||||
:width (:size opts)
|
||||
:borderRadius (style/get-border-radius (:size opts))
|
||||
:backgroundColor (colors/custom-color-by-theme (:customization-color opts) 50 60)})
|
||||
:backgroundColor (colors/resolve-color (:customization-color opts) :dark)})
|
||||
(h/is-truthy (h/query-by-label-text :account-emoji))
|
||||
(h/has-style (h/query-by-label-text :account-emoji)
|
||||
{:fontSize (style/get-emoji-size (:size opts))})
|
||||
@@ -83,7 +84,7 @@
|
||||
:width (:size opts)
|
||||
:borderRadius (style/get-border-radius (:size opts))
|
||||
:borderWidth 0.8
|
||||
:backgroundColor (colors/custom-color-by-theme (:customization-color opts) 50 50 10 10)})
|
||||
:backgroundColor (colors/resolve-color (:customization-color opts) :light 10)})
|
||||
(h/is-truthy (h/query-by-label-text :account-emoji))
|
||||
(h/has-style (h/query-by-label-text :account-emoji)
|
||||
{:fontSize (style/get-emoji-size (:size opts))})
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns quo2.components.avatars.account-avatar.style
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
(ns quo.components.avatars.account-avatar.style
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]))
|
||||
|
||||
(def default-size 80)
|
||||
(def default-border-radius 16)
|
||||
@@ -63,14 +64,14 @@
|
||||
(keyword? size) (container-size size))]
|
||||
(cond-> {:width width
|
||||
:height width
|
||||
:background-color (colors/custom-color-by-theme customization-color 50 60 nil nil theme)
|
||||
:background-color (colors/resolve-color customization-color theme)
|
||||
:border-radius (get-border-radius size)
|
||||
:border-color (if (= theme :light) colors/neutral-80-opa-5 colors/white-opa-5)
|
||||
:border-color (colors/theme-colors colors/neutral-80-opa-5 colors/white-opa-5 theme)
|
||||
:padding (get-padding size)
|
||||
:align-items :center
|
||||
:justify-content :center}
|
||||
|
||||
watch-only?
|
||||
(assoc :border-width (get-border-width size)
|
||||
:background-color (colors/custom-color-by-theme customization-color 50 50 10 10 theme)))))
|
||||
:background-color (colors/resolve-color customization-color theme 10)))))
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
(ns quo2.components.avatars.account-avatar.view
|
||||
(:require [clojure.string :as string]
|
||||
[quo2.components.avatars.account-avatar.style :as style]
|
||||
[quo2.theme :as quo.theme]
|
||||
[react-native.core :as rn]))
|
||||
(ns quo.components.avatars.account-avatar.view
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[quo.components.avatars.account-avatar.style :as style]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]))
|
||||
|
||||
(defn- view-internal
|
||||
"Opts:
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns quo2.components.avatars.channel-avatar.component-spec
|
||||
(:require [quo2.components.avatars.channel-avatar.view :as component]
|
||||
[test-helpers.component :as h]))
|
||||
(ns quo.components.avatars.channel-avatar.component-spec
|
||||
(:require
|
||||
[quo.components.avatars.channel-avatar.view :as component]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "Channel Avatar"
|
||||
(h/test "default render"
|
||||
@@ -1,10 +1,11 @@
|
||||
(ns quo2.components.avatars.channel-avatar.style
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
(ns quo.components.avatars.channel-avatar.style
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]))
|
||||
|
||||
(def lock-icon-size 12)
|
||||
|
||||
(defn outer-container
|
||||
[{:keys [size color]}]
|
||||
[{:keys [size customization-color theme]}]
|
||||
(let [container-size (case size
|
||||
:size-64 64
|
||||
:size-32 32
|
||||
@@ -14,7 +15,7 @@
|
||||
:border-radius container-size
|
||||
:justify-content :center
|
||||
:align-items :center
|
||||
:background-color (colors/theme-alpha color 0.1 0.1)}))
|
||||
:background-color (colors/resolve-color customization-color theme 10)}))
|
||||
|
||||
(defn emoji-size
|
||||
[size]
|
||||
@@ -24,12 +25,12 @@
|
||||
11)})
|
||||
|
||||
(defn lock-container
|
||||
[size]
|
||||
[size theme]
|
||||
(let [distance (if (= size :size-32) 20 12)]
|
||||
{:position :absolute
|
||||
:left distance
|
||||
:top distance
|
||||
:background-color (colors/theme-colors colors/white colors/neutral-95)
|
||||
:background-color (colors/theme-colors colors/white colors/neutral-95 theme)
|
||||
:border-radius (* 2 lock-icon-size)
|
||||
:padding 2}))
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
(ns quo2.components.avatars.channel-avatar.view
|
||||
(:require [clojure.string :as string]
|
||||
[quo2.components.avatars.channel-avatar.style :as style]
|
||||
[quo2.components.icon :as icons]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[utils.string]))
|
||||
(ns quo.components.avatars.channel-avatar.view
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[quo.components.avatars.channel-avatar.style :as style]
|
||||
[quo.components.icon :as icons]
|
||||
[quo.components.markdown.text :as text]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[utils.string]))
|
||||
|
||||
(defn- initials
|
||||
[full-name size color]
|
||||
[{:keys [full-name size customization-color theme]}]
|
||||
(let [amount-initials (if (#{:size-32 :size-64} size) 2 1)
|
||||
channel-name (string/replace full-name "#" "")]
|
||||
[text/text
|
||||
(cond-> {:accessibility-label :initials
|
||||
:style {:color color}
|
||||
:style {:color (colors/resolve-color customization-color theme)}
|
||||
:size :paragraph-2
|
||||
:weight :semi-bold}
|
||||
(= size :size-64) (assoc :size :heading-1
|
||||
@@ -21,18 +23,18 @@
|
||||
(utils.string/get-initials channel-name amount-initials)]))
|
||||
|
||||
(defn- lock
|
||||
[locked? size]
|
||||
[locked? size theme]
|
||||
;; When `locked?` is nil, we must not display the unlocked icon.
|
||||
(when (boolean? locked?)
|
||||
[rn/view
|
||||
{:accessibility-label :lock
|
||||
:style (style/lock-container size)}
|
||||
:style (style/lock-container size theme)}
|
||||
[icons/icon (if locked? :i/locked :i/unlocked)
|
||||
{:color (colors/theme-colors colors/neutral-50 colors/neutral-40)
|
||||
{:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)
|
||||
:container-style style/lock-icon
|
||||
:size 12}]]))
|
||||
|
||||
(defn view
|
||||
(defn- view-internal
|
||||
"Options:
|
||||
|
||||
:size - keyword (default nil) - Container size, for the moment,
|
||||
@@ -50,14 +52,22 @@
|
||||
:full-name - string (default nil) - When :emoji is blank, this value will be
|
||||
used to extract the initials.
|
||||
"
|
||||
[{:keys [size emoji customization-color locked? full-name]}]
|
||||
[{:keys [size emoji customization-color locked? full-name theme]}]
|
||||
[rn/view
|
||||
{:accessibility-label :channel-avatar
|
||||
:style (style/outer-container {:size size :color customization-color})}
|
||||
:style (style/outer-container {:theme theme
|
||||
:size size
|
||||
:customization-color customization-color})}
|
||||
(if (string/blank? emoji)
|
||||
[initials full-name size customization-color]
|
||||
[initials
|
||||
{:full-name full-name
|
||||
:size size
|
||||
:customization-color customization-color
|
||||
:theme theme}]
|
||||
[rn/text
|
||||
{:style (style/emoji-size size)
|
||||
:accessibility-label :emoji}
|
||||
(string/trim emoji)])
|
||||
[lock locked? size]])
|
||||
[lock locked? size theme]])
|
||||
|
||||
(def view (quo.theme/with-theme view-internal))
|
||||
@@ -1,7 +1,8 @@
|
||||
(ns quo2.components.avatars.collection-avatar.component-spec
|
||||
(:require [quo2.components.avatars.collection-avatar.view :as collection-avatar]
|
||||
[quo2.foundations.resources :as resources]
|
||||
[test-helpers.component :as h]))
|
||||
(ns quo.components.avatars.collection-avatar.component-spec
|
||||
(:require
|
||||
[quo.components.avatars.collection-avatar.view :as collection-avatar]
|
||||
[quo.foundations.resources :as resources]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "collection avatar"
|
||||
(h/describe "Profile picture"
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns quo2.components.avatars.collection-avatar.style
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
(ns quo.components.avatars.collection-avatar.style
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]))
|
||||
|
||||
(defn collection-avatar
|
||||
[theme]
|
||||
@@ -1,7 +1,8 @@
|
||||
(ns quo2.components.avatars.collection-avatar.view
|
||||
(:require [quo2.components.avatars.collection-avatar.style :as style]
|
||||
[quo2.theme :as quo.theme]
|
||||
[react-native.fast-image :as fast-image]))
|
||||
(ns quo.components.avatars.collection-avatar.view
|
||||
(:require
|
||||
[quo.components.avatars.collection-avatar.style :as style]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.fast-image :as fast-image]))
|
||||
|
||||
(defn- view-internal
|
||||
"Opts:
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns quo2.components.avatars.group-avatar.style
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
(ns quo.components.avatars.group-avatar.style
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]))
|
||||
|
||||
(defn container
|
||||
[{:keys [container-size customization-color theme]}]
|
||||
@@ -1,10 +1,11 @@
|
||||
(ns quo2.components.avatars.group-avatar.view
|
||||
(:require [quo2.components.icon :as icon]
|
||||
[quo2.theme :as quo.theme]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[react-native.fast-image :as fast-image]
|
||||
[quo2.components.avatars.group-avatar.style :as style]))
|
||||
(ns quo.components.avatars.group-avatar.view
|
||||
(:require
|
||||
[quo.components.avatars.group-avatar.style :as style]
|
||||
[quo.components.icon :as icon]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[react-native.fast-image :as fast-image]))
|
||||
|
||||
(def sizes
|
||||
{:size-20 {:icon 12
|
||||
@@ -0,0 +1,42 @@
|
||||
(ns quo.components.avatars.icon-avatar
|
||||
(:require
|
||||
[quo.components.icon :as icons]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]))
|
||||
|
||||
(def ^:private sizes
|
||||
{:size-48 {:component 48
|
||||
:icon 20}
|
||||
:size-32 {:component 32
|
||||
:icon 20}
|
||||
:size-24 {:component 24
|
||||
:icon 16}
|
||||
:size-20 {:component 20
|
||||
:icon 12}})
|
||||
|
||||
(defn icon-avatar-internal
|
||||
[{:keys [size icon color opacity border? theme]
|
||||
:or {opacity 20
|
||||
size :size-32}}]
|
||||
(let [{component-size :component icon-size :icon} (get sizes size)
|
||||
circle-color (colors/resolve-color color theme opacity)
|
||||
icon-color (colors/resolve-color color theme)]
|
||||
(if (keyword? icon)
|
||||
[rn/view
|
||||
{:style {:width component-size
|
||||
:height component-size
|
||||
:border-radius component-size
|
||||
:border-width (when border? 1)
|
||||
:border-color (colors/theme-colors colors/neutral-20 colors/neutral-80 theme)
|
||||
:background-color circle-color
|
||||
:justify-content :center
|
||||
:align-items :center}}
|
||||
[icons/icon icon
|
||||
{:size icon-size
|
||||
:color icon-color}]]
|
||||
[rn/image
|
||||
{:source icon
|
||||
:style {:width 32 :height 32}}])))
|
||||
|
||||
(def icon-avatar (quo.theme/with-theme icon-avatar-internal))
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns quo2.components.avatars.user-avatar.component-spec
|
||||
(:require [quo2.components.avatars.user-avatar.view :as user-avatar]
|
||||
[test-helpers.component :as h]))
|
||||
(ns quo.components.avatars.user-avatar.component-spec
|
||||
(:require
|
||||
[quo.components.avatars.user-avatar.view :as user-avatar]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(defonce mock-picture {:uri (js/require "../resources/images/mock2/user_picture_male4.png")})
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns quo2.components.avatars.user-avatar.style
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
(ns quo.components.avatars.user-avatar.style
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]))
|
||||
|
||||
(def sizes
|
||||
{:big {:dimensions 80
|
||||
@@ -62,7 +63,7 @@
|
||||
:border-radius dimensions
|
||||
:justify-content :center
|
||||
:align-items :center
|
||||
:background-color (colors/custom-color-by-theme customization-color 50 60 nil nil theme)}))
|
||||
:background-color (colors/resolve-color customization-color theme)}))
|
||||
|
||||
(def indicator-color
|
||||
{:online colors/success-50
|
||||
@@ -80,7 +81,7 @@
|
||||
|
||||
(defn customization-color
|
||||
[color-id theme]
|
||||
(colors/custom-color-by-theme color-id 50 60 nil nil theme))
|
||||
(colors/resolve-color color-id theme))
|
||||
|
||||
(def initials-avatar-text
|
||||
{:color colors/white-opa-70})
|
||||
@@ -1,9 +1,9 @@
|
||||
(ns quo2.components.avatars.user-avatar.view
|
||||
(ns quo.components.avatars.user-avatar.view
|
||||
(:require
|
||||
[quo2.components.avatars.user-avatar.style :as style]
|
||||
[quo2.components.common.no-flicker-image :as no-flicker-image]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[quo2.theme]
|
||||
[quo.components.avatars.user-avatar.style :as style]
|
||||
[quo.components.common.no-flicker-image :as no-flicker-image]
|
||||
[quo.components.markdown.text :as text]
|
||||
[quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[react-native.fast-image :as fast-image]
|
||||
utils.string))
|
||||
@@ -108,4 +108,4 @@
|
||||
|
||||
:else {:uri profile-picture})}])]))
|
||||
|
||||
(def user-avatar (quo2.theme/with-theme user-avatar-internal))
|
||||
(def user-avatar (quo.theme/with-theme user-avatar-internal))
|
||||
@@ -0,0 +1,68 @@
|
||||
(ns quo.components.avatars.wallet-user-avatar
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[quo.components.markdown.text :as text]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]))
|
||||
|
||||
(def circle-sizes
|
||||
{:small 20
|
||||
:medium 32
|
||||
:large 48
|
||||
:size-64 64
|
||||
:x-large 80})
|
||||
|
||||
(def font-sizes
|
||||
{:small :label
|
||||
:medium :paragraph-2
|
||||
:large :paragraph-1
|
||||
:size-64 :heading-1
|
||||
:x-large :heading-1})
|
||||
|
||||
(def font-weights
|
||||
{:small :medium
|
||||
:medium :semi-bold
|
||||
:large :semi-bold
|
||||
:size-64 :medium
|
||||
:x-large :medium})
|
||||
|
||||
(defn- view-internal
|
||||
"params, first name, last name, customization-color, size
|
||||
and if it's dark or not!"
|
||||
[{:keys [f-name l-name customization-color size theme monospace? uppercase?]
|
||||
:or {f-name "John"
|
||||
l-name "Doe"
|
||||
size :x-large
|
||||
uppercase? true}}]
|
||||
(let [circle-size (size circle-sizes)
|
||||
small? (= size :small)
|
||||
f-name-initial (-> f-name
|
||||
(#(if uppercase? (string/upper-case %) %))
|
||||
(subs 0 1))
|
||||
l-name-initial (-> l-name
|
||||
(#(if uppercase? (string/upper-case %) %))
|
||||
(subs 0 1))
|
||||
circle-color (if customization-color
|
||||
(colors/resolve-color customization-color theme 20)
|
||||
(colors/theme-colors colors/neutral-80-opa-5 colors/white-opa-5 theme))
|
||||
text-color (if customization-color
|
||||
(colors/resolve-color customization-color theme)
|
||||
(colors/theme-colors colors/neutral-80-opa-70 colors/white-opa-70 theme))]
|
||||
[rn/view
|
||||
{:style {:width circle-size
|
||||
:height circle-size
|
||||
:border-radius circle-size
|
||||
:text-align :center
|
||||
:justify-content :center
|
||||
:align-items :center
|
||||
:background-color circle-color}}
|
||||
[text/text
|
||||
{:size (size font-sizes)
|
||||
:weight (if monospace? :monospace (size font-weights))
|
||||
:style {:color text-color}}
|
||||
(if small?
|
||||
(str f-name-initial)
|
||||
(str f-name-initial l-name-initial))]]))
|
||||
|
||||
(def wallet-user-avatar (quo.theme/with-theme view-internal))
|
||||
@@ -1,7 +1,8 @@
|
||||
(ns quo2.components.banners.banner.component-spec
|
||||
(:require ["@testing-library/react-native" :as rtl]
|
||||
[quo2.components.banners.banner.view :as banner]
|
||||
[reagent.core :as reagent]))
|
||||
(ns quo.components.banners.banner.component-spec
|
||||
(:require
|
||||
["@testing-library/react-native" :as rtl]
|
||||
[quo.components.banners.banner.view :as banner]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(defn render-banner
|
||||
[opts]
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns quo2.components.banners.banner.style
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
(ns quo.components.banners.banner.style
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]))
|
||||
|
||||
|
||||
(def container
|
||||
@@ -1,11 +1,12 @@
|
||||
(ns quo2.components.banners.banner.view
|
||||
(:require [quo2.components.banners.banner.style :as style]
|
||||
[quo2.components.counter.counter.view :as counter]
|
||||
[quo2.components.icon :as icons]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[quo2.theme :as quo.theme]))
|
||||
(ns quo.components.banners.banner.view
|
||||
(:require
|
||||
[quo.components.banners.banner.style :as style]
|
||||
[quo.components.counter.counter.view :as counter]
|
||||
[quo.components.icon :as icons]
|
||||
[quo.components.markdown.text :as text]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]))
|
||||
|
||||
(defn- view-internal
|
||||
[{:keys [hide-pin? latest-pin-text pins-count on-press theme]}]
|
||||
@@ -1,45 +0,0 @@
|
||||
(ns quo.components.bottom-sheet.style
|
||||
(:require [quo.design-system.colors :as colors]
|
||||
[quo.design-system.spacing :as spacing]))
|
||||
|
||||
(def border-radius 16)
|
||||
(def vertical-padding (:tiny spacing/spacing))
|
||||
(def margin-top 56)
|
||||
|
||||
(def container
|
||||
{:position :absolute
|
||||
:left 0
|
||||
:top 0
|
||||
:right 0
|
||||
:bottom 0
|
||||
:flex 1
|
||||
:justify-content :flex-end})
|
||||
|
||||
(defn backdrop
|
||||
[]
|
||||
{:flex 1
|
||||
:position :absolute
|
||||
:left 0
|
||||
:top 0
|
||||
:right 0
|
||||
:bottom 0})
|
||||
|
||||
(defn content-container
|
||||
[window-height]
|
||||
{:background-color (:ui-background @colors/theme)
|
||||
:border-top-left-radius border-radius
|
||||
:border-top-right-radius border-radius
|
||||
:height (* window-height 2)})
|
||||
|
||||
(def content-header
|
||||
{:height border-radius
|
||||
:align-self :stretch
|
||||
:justify-content :center
|
||||
:align-items :center})
|
||||
|
||||
(def handle
|
||||
{:width 31
|
||||
:height 4
|
||||
:background-color (:icon-02 @colors/theme)
|
||||
:opacity 0.4
|
||||
:border-radius 2})
|
||||
@@ -1,233 +0,0 @@
|
||||
(ns quo.components.bottom-sheet.view
|
||||
(:require [cljs-bean.core :as bean]
|
||||
[quo.animated :as animated]
|
||||
[quo.components.bottom-sheet.style :as styles]
|
||||
[quo.design-system.colors :as colors]
|
||||
[quo.gesture-handler :as gesture-handler]
|
||||
[quo.platform :as platform]
|
||||
[quo.react :as react]
|
||||
[quo.react-native :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[react-native.safe-area :as safe-area]))
|
||||
|
||||
(def opacity-coeff 0.8)
|
||||
(def close-duration 150)
|
||||
(def spring-config
|
||||
{:damping 15
|
||||
:mass 0.7
|
||||
:stiffness 150
|
||||
:overshootClamping false
|
||||
:restSpeedThreshold 0.1
|
||||
:restDisplacementThreshold 0.1})
|
||||
|
||||
(defn bottom-sheet-hooks
|
||||
[props]
|
||||
(let [{on-cancel :onCancel
|
||||
disable-drag? :disableDrag?
|
||||
show-handle? :showHandle?
|
||||
visible? :visible?
|
||||
backdrop-dismiss? :backdropDismiss?
|
||||
back-button-cancel :backButtonCancel
|
||||
children :children
|
||||
:or {show-handle? true
|
||||
backdrop-dismiss? true
|
||||
back-button-cancel true}}
|
||||
(bean/bean props)
|
||||
body-ref (react/create-ref)
|
||||
master-ref (react/create-ref)
|
||||
|
||||
height (react/state 0)
|
||||
{window-height :height} (rn/use-window-dimensions)
|
||||
{:keys [keyboard-shown
|
||||
keyboard-height]}
|
||||
(rn/use-keyboard)
|
||||
keyboard-height-android-delta
|
||||
(if (and platform/android? keyboard-shown) (+ keyboard-height 20) 0)
|
||||
safe-area (safe-area/get-insets)
|
||||
window-height (- window-height
|
||||
(if platform/android?
|
||||
(+ 50 keyboard-height-android-delta) ;; TODO : remove 50 when
|
||||
;; react-native-navigation v8 will be
|
||||
;; implemented
|
||||
;; https://github.com/wix/react-native-navigation/issues/7225
|
||||
0))
|
||||
min-height (+ (* styles/vertical-padding 2) (:bottom safe-area))
|
||||
max-height (- window-height (:top safe-area))
|
||||
visible (react/state false)
|
||||
|
||||
master-translation-y (animated/use-value 0)
|
||||
master-velocity-y (animated/use-value (:undetermined gesture-handler/states))
|
||||
master-state (animated/use-value (:undetermined gesture-handler/states))
|
||||
tap-state (animated/use-value 0)
|
||||
manual-open (animated/use-value 0)
|
||||
manual-close (animated/use-value 0)
|
||||
offset (animated/use-value 0)
|
||||
drag-over (animated/use-value 1)
|
||||
clock (animated/use-clock)
|
||||
tap-gesture-handler (animated/use-gesture {:state tap-state})
|
||||
on-master-event (animated/use-gesture
|
||||
{:translationY master-translation-y
|
||||
:state master-state
|
||||
:velocityY master-velocity-y})
|
||||
on-body-event on-master-event
|
||||
sheet-height (min max-height
|
||||
(+ styles/border-radius @height))
|
||||
|
||||
open-snap-point (animated/use-value 0)
|
||||
close-snap-point 0
|
||||
on-close (fn []
|
||||
(when @visible
|
||||
(reset! visible false)
|
||||
(reset! height 0)
|
||||
(when on-cancel
|
||||
(on-cancel))))
|
||||
close-sheet (fn []
|
||||
(animated/set-value manual-close 1))
|
||||
on-snap (fn [pos]
|
||||
(when (= close-snap-point (aget pos 0))
|
||||
(on-close)))
|
||||
interrupted (animated/and* (animated/eq master-state (:began gesture-handler/states))
|
||||
(animated/clock-running clock))
|
||||
translate-y (react/use-memo
|
||||
(fn []
|
||||
(animated/with-easing
|
||||
{:value (animated/cond* (animated/less-or-eq master-translation-y 0)
|
||||
(animated/divide master-translation-y 2)
|
||||
master-translation-y)
|
||||
:velocity master-velocity-y
|
||||
:offset offset
|
||||
:state master-state
|
||||
:animation-over drag-over
|
||||
:snap-points [open-snap-point close-snap-point]}))
|
||||
[])
|
||||
opacity (react/use-memo
|
||||
(fn []
|
||||
(animated/cond*
|
||||
open-snap-point
|
||||
(animated/interpolate
|
||||
translate-y
|
||||
{:inputRange [(animated/multiply open-snap-point opacity-coeff) 0]
|
||||
:outputRange [1 0]
|
||||
:extrapolate (:clamp animated/extrapolate)})))
|
||||
[])]
|
||||
(animated/code!
|
||||
(fn []
|
||||
(animated/cond* (animated/and* (animated/eq master-state (:end gesture-handler/states))
|
||||
(animated/not* drag-over))
|
||||
(animated/call* [translate-y] on-snap)))
|
||||
[on-snap])
|
||||
(animated/code!
|
||||
(fn []
|
||||
(animated/block
|
||||
[(animated/cond* (animated/and* interrupted manual-open)
|
||||
[(animated/set manual-open 0)
|
||||
(animated/set offset open-snap-point)
|
||||
(animated/stop-clock clock)])
|
||||
(animated/cond* (animated/and* manual-open
|
||||
(animated/not* manual-close))
|
||||
[(animated/set offset
|
||||
(animated/re-spring {:from offset
|
||||
:to open-snap-point
|
||||
:clock clock
|
||||
:config spring-config}))
|
||||
(animated/cond* (animated/not* (animated/clock-running clock))
|
||||
(animated/set manual-open 0))])]))
|
||||
[])
|
||||
(animated/code!
|
||||
(fn []
|
||||
(animated/block
|
||||
[(animated/cond* (animated/and* interrupted manual-close)
|
||||
[(animated/set manual-close 0)
|
||||
(animated/set offset close-snap-point)
|
||||
(animated/call* [] on-close)
|
||||
(animated/stop-clock clock)])
|
||||
(animated/cond* (animated/eq tap-state (:end gesture-handler/states))
|
||||
[(animated/cond* (animated/and* (animated/not* manual-close))
|
||||
[(animated/stop-clock clock)
|
||||
(animated/set manual-close 1)])
|
||||
(animated/set tap-state (:undetermined gesture-handler/states))])
|
||||
(animated/cond* manual-close
|
||||
[(animated/set offset
|
||||
(animated/re-timing {:from offset
|
||||
:to close-snap-point
|
||||
:clock clock
|
||||
:easing (:ease-out animated/easings)
|
||||
:duration close-duration}))
|
||||
(animated/cond* (animated/not* (animated/clock-running clock))
|
||||
[(animated/set manual-close 0)
|
||||
(animated/set manual-open 0)
|
||||
(animated/call* [] on-close)])])]))
|
||||
[on-cancel])
|
||||
(animated/code!
|
||||
(fn []
|
||||
(animated/cond* (animated/and* (animated/not* manual-close)
|
||||
(if @visible 1 0)
|
||||
(if (> @height min-height) 1 0))
|
||||
[(animated/stop-clock clock)
|
||||
(animated/set open-snap-point (* -1 sheet-height))
|
||||
(animated/set manual-open 1)]))
|
||||
[@height @visible])
|
||||
;; NOTE(Ferossgp): Remove me when RNGH will suport modal
|
||||
(rn/use-back-handler
|
||||
(fn []
|
||||
(when back-button-cancel
|
||||
(close-sheet))
|
||||
@visible))
|
||||
(react/effect!
|
||||
(fn []
|
||||
(cond
|
||||
visible?
|
||||
(do
|
||||
(rn/dismiss-keyboard!)
|
||||
(reset! visible visible?))
|
||||
|
||||
@visible
|
||||
(close-sheet)))
|
||||
[visible?])
|
||||
(reagent/as-element
|
||||
[rn/view
|
||||
{:style styles/container
|
||||
:pointer-events :box-none}
|
||||
[gesture-handler/tap-gesture-handler
|
||||
(merge {:enabled backdrop-dismiss?}
|
||||
tap-gesture-handler)
|
||||
[animated/view
|
||||
{:style (merge (styles/backdrop)
|
||||
(when platform/ios?
|
||||
{:opacity opacity
|
||||
:background-color (:backdrop @colors/theme)}))}]]
|
||||
[animated/view
|
||||
{:style (merge (styles/content-container window-height)
|
||||
{:transform [{:translateY (if (= sheet-height max-height)
|
||||
(animated/add translate-y
|
||||
keyboard-height-android-delta)
|
||||
translate-y)}
|
||||
{:translateY (* window-height 2)}]})}
|
||||
[gesture-handler/pan-gesture-handler
|
||||
(merge on-master-event
|
||||
{:ref master-ref
|
||||
:wait-for body-ref
|
||||
:enabled (not disable-drag?)})
|
||||
[animated/view {:style styles/content-header}
|
||||
(when show-handle?
|
||||
[rn/view {:style styles/handle}])]]
|
||||
[gesture-handler/pan-gesture-handler
|
||||
(merge on-body-event
|
||||
{:ref body-ref
|
||||
:wait-for master-ref
|
||||
:enabled (and (not disable-drag?)
|
||||
(not= sheet-height max-height))})
|
||||
[animated/view
|
||||
{:height sheet-height
|
||||
:flex 1}
|
||||
[animated/view
|
||||
{:style {:padding-top styles/vertical-padding
|
||||
:padding-bottom (+ styles/vertical-padding
|
||||
(if (and platform/ios? keyboard-shown)
|
||||
keyboard-height
|
||||
(:bottom safe-area)))}
|
||||
:on-layout #(reset! height (.-nativeEvent.layout.height ^js %))}
|
||||
(into [:<>]
|
||||
(react/get-children children))]]]]])))
|
||||
|
||||
(def bottom-sheet (reagent/adapt-react-class (react/memo bottom-sheet-hooks)))
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns quo2.components.browser.browser-input.component-spec
|
||||
(:require [quo2.components.browser.browser-input.view :as browser-input]
|
||||
[test-helpers.component :as h]))
|
||||
(ns quo.components.browser.browser-input.component-spec
|
||||
(:require
|
||||
[quo.components.browser.browser-input.view :as browser-input]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "Browser input"
|
||||
(h/test "Renders empty in default state"
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns quo2.components.browser.browser-input.style
|
||||
(:require [quo2.components.markdown.text :as text]
|
||||
[quo2.foundations.colors :as colors]))
|
||||
(ns quo.components.browser.browser-input.style
|
||||
(:require
|
||||
[quo.components.markdown.text :as text]
|
||||
[quo.foundations.colors :as colors]))
|
||||
|
||||
(def clear-icon-container
|
||||
{:align-items :center
|
||||
@@ -1,12 +1,13 @@
|
||||
(ns quo2.components.browser.browser-input.view
|
||||
(:require [quo2.components.icon :as icon]
|
||||
[quo2.components.browser.browser-input.style :as style]
|
||||
[react-native.core :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[quo2.theme :as quo2.theme]
|
||||
[clojure.string :as string]
|
||||
[react-native.platform :as platform]))
|
||||
(ns quo.components.browser.browser-input.view
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[quo.components.browser.browser-input.style :as style]
|
||||
[quo.components.icon :as icon]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[react-native.platform :as platform]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(defn remove-http-https-www
|
||||
[value]
|
||||
@@ -141,4 +142,4 @@
|
||||
(when on-clear (on-clear)))
|
||||
:theme theme}])]]))))
|
||||
|
||||
(def view (quo2.theme/with-theme view-internal))
|
||||
(def view (quo.theme/with-theme view-internal))
|
||||
@@ -1,125 +0,0 @@
|
||||
(ns quo.components.button.view
|
||||
(:require [quo.components.animated.pressable :as animation]
|
||||
[quo.components.text :as text] ;; FIXME:
|
||||
[quo.design-system.colors :as colors]
|
||||
[quo.design-system.spacing :as spacing]
|
||||
[quo.haptic :as haptic]
|
||||
[quo.react-native :as rn]
|
||||
[status-im.ui.components.icons.icons :as icons]))
|
||||
|
||||
(defn style-container
|
||||
[type]
|
||||
(merge {:height 44
|
||||
:align-items :center
|
||||
:justify-content :center
|
||||
:flex-direction :row}
|
||||
(case type
|
||||
:primary (:base spacing/padding-horizontal)
|
||||
:secondary (:x-tiny spacing/padding-horizontal)
|
||||
:icon {}
|
||||
nil)))
|
||||
|
||||
(defn content-style
|
||||
[type]
|
||||
(case type
|
||||
:primary (:base spacing/padding-horizontal)
|
||||
:secondary (:x-tiny spacing/padding-horizontal)
|
||||
:icon (:tiny spacing/padding-horizontal)
|
||||
nil))
|
||||
|
||||
(defn themes
|
||||
[theme]
|
||||
(case theme
|
||||
:main {:icon-color (:icon-04 @colors/theme)
|
||||
:background-color (:interactive-02 @colors/theme)
|
||||
:text-color (:text-04 @colors/theme)}
|
||||
:icon {:icon-color (:icon-01 @colors/theme)
|
||||
:background-color (:interactive-02 @colors/theme)
|
||||
:text-color (:text-01 @colors/theme)}
|
||||
:negative {:icon-color (:negative-01 @colors/theme)
|
||||
:background-color (:negative-02 @colors/theme)
|
||||
:text-color (:negative-01 @colors/theme)}
|
||||
:positive {:icon-color (:positive-01 @colors/theme)
|
||||
:background-color (:positive-02 @colors/theme)
|
||||
:text-color (:positive-01 @colors/theme)}
|
||||
:accent {:icon-color (:icon-05 @colors/theme)
|
||||
:background-color (:interactive-01 @colors/theme)
|
||||
:text-color (:text-05 @colors/theme)}
|
||||
:secondary {:icon-color (:icon-02 @colors/theme)
|
||||
:background-color (:interactive-02 @colors/theme)
|
||||
:text-color (:text-02 @colors/theme)}
|
||||
:disabled {:icon-color (:icon-02 @colors/theme)
|
||||
:background-color (:ui-01 @colors/theme)
|
||||
:text-color (:text-02 @colors/theme)}
|
||||
:monocromatic {:icon-color (:icon-01 @colors/theme)
|
||||
:background-color (:ui-background @colors/theme)
|
||||
:text-color (:text-01 @colors/theme)
|
||||
:border-color (:ui-01 @colors/theme)}))
|
||||
|
||||
(defn button
|
||||
[{:keys [on-press disabled type theme before after
|
||||
haptic-feedback haptic-type on-long-press on-press-start
|
||||
accessibility-label loading border-radius style test-ID]
|
||||
:or {theme :main
|
||||
type :primary
|
||||
haptic-feedback true
|
||||
border-radius 8
|
||||
haptic-type :selection}}
|
||||
children]
|
||||
(let [theme' (cond
|
||||
disabled :disabled
|
||||
:else theme)
|
||||
{:keys [icon-color background-color text-color border-color]}
|
||||
(themes theme')
|
||||
|
||||
optional-haptic (fn []
|
||||
(when haptic-feedback
|
||||
(haptic/trigger haptic-type)))]
|
||||
[animation/pressable
|
||||
(merge {:bg-color background-color
|
||||
:border-radius border-radius
|
||||
:type type
|
||||
:disabled disabled
|
||||
:accessibility-label accessibility-label}
|
||||
(when border-color
|
||||
{:border-color border-color
|
||||
:border-width 1})
|
||||
(when on-press
|
||||
{:on-press (fn []
|
||||
(optional-haptic)
|
||||
(on-press))})
|
||||
(when on-long-press
|
||||
{:on-long-press (fn []
|
||||
(optional-haptic)
|
||||
(on-long-press))})
|
||||
(when on-press-start
|
||||
{:on-press-start (fn []
|
||||
(optional-haptic)
|
||||
(on-press-start))}))
|
||||
[rn/view {:test-ID test-ID :style (merge (style-container type) style)}
|
||||
(when before
|
||||
[rn/view
|
||||
[icons/icon before {:color icon-color}]])
|
||||
(when loading
|
||||
[rn/view {:style {:position :absolute}}
|
||||
[rn/activity-indicator]])
|
||||
[rn/view
|
||||
{:style (merge (content-style type)
|
||||
(when loading
|
||||
{:opacity 0}))}
|
||||
(cond
|
||||
(= type :icon)
|
||||
[icons/icon children {:color icon-color}]
|
||||
|
||||
(string? children)
|
||||
[text/text
|
||||
{:weight :medium
|
||||
:number-of-lines 1
|
||||
:style {:color text-color}}
|
||||
children]
|
||||
|
||||
(vector? children)
|
||||
children)]
|
||||
(when after
|
||||
[rn/view
|
||||
[icons/icon after {:color icon-color}]])]]))
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns quo2.components.buttons.button.component-spec
|
||||
(:require [quo2.components.buttons.button.view :as button]
|
||||
[test-helpers.component :as h]))
|
||||
(ns quo.components.buttons.button.component-spec
|
||||
(:require
|
||||
[quo.components.buttons.button.view :as button]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "button tests"
|
||||
(h/test "default render of button component"
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns quo2.components.buttons.button.properties
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
(ns quo.components.buttons.button.properties
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]))
|
||||
|
||||
(def backgrounds #{:photo :blur})
|
||||
|
||||
@@ -45,7 +46,9 @@
|
||||
:label-color (colors/theme-colors colors/neutral-100 colors/white theme)
|
||||
:background-color (if pressed?
|
||||
(colors/theme-colors colors/neutral-20 colors/neutral-60 theme)
|
||||
(colors/theme-colors colors/neutral-10 colors/neutral-80 theme))})
|
||||
(colors/theme-colors colors/neutral-10
|
||||
colors/neutral-90
|
||||
theme))})
|
||||
|
||||
(defn dark-grey
|
||||
[theme pressed?]
|
||||
@@ -1,4 +1,4 @@
|
||||
(ns quo2.components.buttons.button.style)
|
||||
(ns quo.components.buttons.button.style)
|
||||
|
||||
(def blur-view
|
||||
{:position :absolute
|
||||
@@ -1,13 +1,14 @@
|
||||
(ns quo2.components.buttons.button.view
|
||||
(:require [quo2.components.icon :as quo2.icons]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[quo2.theme :as theme]
|
||||
[react-native.core :as rn]
|
||||
[react-native.blur :as blur]
|
||||
[reagent.core :as reagent]
|
||||
[quo2.components.buttons.button.style :as style]
|
||||
[quo2.components.buttons.button.properties :as button-properties]
|
||||
[quo2.foundations.customization-colors :as customization-colors]))
|
||||
(ns quo.components.buttons.button.view
|
||||
(:require
|
||||
[quo.components.buttons.button.properties :as button-properties]
|
||||
[quo.components.buttons.button.style :as style]
|
||||
[quo.components.icon :as quo.icons]
|
||||
[quo.components.markdown.text :as text]
|
||||
[quo.foundations.customization-colors :as customization-colors]
|
||||
[quo.theme :as theme]
|
||||
[react-native.blur :as blur]
|
||||
[react-native.core :as rn]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(defn- button-internal
|
||||
"with label
|
||||
@@ -90,7 +91,7 @@
|
||||
:style style/blur-view}])
|
||||
(when icon-top
|
||||
[rn/view
|
||||
[quo2.icons/icon icon-top
|
||||
[quo.icons/icon icon-top
|
||||
{:container-style {:margin-bottom 2}
|
||||
:color icon-color
|
||||
:size icon-size}]])
|
||||
@@ -99,13 +100,13 @@
|
||||
{:style (style/icon-left-icon-style
|
||||
{:size size
|
||||
:icon-size icon-size})}
|
||||
[quo2.icons/icon icon-left
|
||||
[quo.icons/icon icon-left
|
||||
{:color icon-color
|
||||
:size icon-size}]])
|
||||
[rn/view
|
||||
(cond
|
||||
icon-only?
|
||||
[quo2.icons/icon children
|
||||
[quo.icons/icon children
|
||||
{:color label-color
|
||||
:size icon-size}]
|
||||
|
||||
@@ -124,7 +125,7 @@
|
||||
{:style (style/icon-right-icon-style
|
||||
{:size size
|
||||
:icon-size icon-size})}
|
||||
[quo2.icons/icon icon-right
|
||||
[quo.icons/icon icon-right
|
||||
{:color icon-color
|
||||
:size icon-size}]])]]]))))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns quo2.components.buttons.composer-button.component-spec
|
||||
(:require [quo2.components.buttons.composer-button.view :as composer-button]
|
||||
[test-helpers.component :as h]))
|
||||
(ns quo.components.buttons.composer-button.component-spec
|
||||
(:require
|
||||
[quo.components.buttons.composer-button.view :as composer-button]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "button tests"
|
||||
(h/test "default render of composer button component"
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns quo2.components.buttons.composer-button.style
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
(ns quo.components.buttons.composer-button.style
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]))
|
||||
|
||||
(defn get-border-color
|
||||
[{:keys [pressed? blur? theme]}]
|
||||
@@ -1,9 +1,10 @@
|
||||
(ns quo2.components.buttons.composer-button.view
|
||||
(:require [quo2.components.icon :as quo2.icons]
|
||||
[quo2.theme :as theme]
|
||||
[react-native.core :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[quo2.components.buttons.composer-button.style :as style]))
|
||||
(ns quo.components.buttons.composer-button.view
|
||||
(:require
|
||||
[quo.components.buttons.composer-button.style :as style]
|
||||
[quo.components.icon :as quo.icons]
|
||||
[quo.theme :as theme]
|
||||
[react-native.core :as rn]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(defn- view-internal
|
||||
[_ _]
|
||||
@@ -22,7 +23,7 @@
|
||||
:theme theme
|
||||
:disabled? disabled?})
|
||||
container-style)}
|
||||
[quo2.icons/icon icon
|
||||
[quo.icons/icon icon
|
||||
{:color (style/get-label-color {:blur? blur?
|
||||
:theme theme})}]])))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
(ns quo2.components.buttons.dynamic-button.style)
|
||||
(ns quo.components.buttons.dynamic-button.style)
|
||||
|
||||
(defn container
|
||||
[type]
|
||||
@@ -1,11 +1,12 @@
|
||||
(ns quo2.components.buttons.dynamic-button.view
|
||||
(:require [quo2.components.icon :as icon]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[quo2.theme :as quo.theme]
|
||||
[quo2.components.buttons.dynamic-button.style :as style]))
|
||||
(ns quo.components.buttons.dynamic-button.view
|
||||
(:require
|
||||
[quo.components.buttons.dynamic-button.style :as style]
|
||||
[quo.components.icon :as icon]
|
||||
[quo.components.markdown.text :as text]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(defn- get-button-color
|
||||
[{:keys [type pressed? customization-color theme]}]
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns quo2.components.buttons.predictive-keyboard.component-spec
|
||||
(:require [quo2.components.buttons.predictive-keyboard.view :as predictive-keyboard]
|
||||
[test-helpers.component :as h]))
|
||||
(ns quo.components.buttons.predictive-keyboard.component-spec
|
||||
(:require
|
||||
[quo.components.buttons.predictive-keyboard.view :as predictive-keyboard]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "predictive-keyboard"
|
||||
(h/test "basic render"
|
||||
@@ -1,4 +1,4 @@
|
||||
(ns quo2.components.buttons.predictive-keyboard.style)
|
||||
(ns quo.components.buttons.predictive-keyboard.style)
|
||||
|
||||
(defn wrapper
|
||||
[type]
|
||||
@@ -1,11 +1,12 @@
|
||||
(ns quo2.components.buttons.predictive-keyboard.view
|
||||
(:require [react-native.core :as rn]
|
||||
[quo2.components.buttons.predictive-keyboard.style :as style]
|
||||
[quo2.components.info.info-message :as info-message]
|
||||
[quo2.theme :as theme]
|
||||
[react-native.linear-gradient :as linear-gradient]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[quo2.components.buttons.button.view :as button]))
|
||||
(ns quo.components.buttons.predictive-keyboard.view
|
||||
(:require
|
||||
[quo.components.buttons.button.view :as button]
|
||||
[quo.components.buttons.predictive-keyboard.style :as style]
|
||||
[quo.components.info.info-message :as info-message]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme :as theme]
|
||||
[react-native.core :as rn]
|
||||
[react-native.linear-gradient :as linear-gradient]))
|
||||
|
||||
(def ^:private gradients
|
||||
{:light [(colors/alpha colors/neutral-40 0.05) (colors/alpha colors/neutral-40 0)]
|
||||
@@ -1,8 +1,8 @@
|
||||
(ns quo2.components.buttons.slide-button.animations
|
||||
(ns quo.components.buttons.slide-button.animations
|
||||
(:require
|
||||
[react-native.gesture :as gesture]
|
||||
[quo2.components.buttons.slide-button.utils :as utils]
|
||||
[oops.core :as oops]
|
||||
[quo.components.buttons.slide-button.utils :as utils]
|
||||
[react-native.gesture :as gesture]
|
||||
[react-native.reanimated :as reanimated]))
|
||||
|
||||
(def ^:private extrapolation
|
||||
@@ -22,7 +22,7 @@
|
||||
(defn- track-cover-interpolation
|
||||
[track-width thumb-size]
|
||||
{:in [0 1]
|
||||
:out [(/ thumb-size 2) track-width]})
|
||||
:out [thumb-size (+ track-width thumb-size)]})
|
||||
|
||||
(defn- arrow-icon-position-interpolation
|
||||
[thumb-size]
|
||||
@@ -1,10 +1,11 @@
|
||||
(ns quo2.components.buttons.slide-button.component-spec
|
||||
(:require [quo2.components.buttons.slide-button.view :as slide-button]
|
||||
[quo2.components.buttons.slide-button.constants :as constants]
|
||||
["@testing-library/react-native" :as rtl]
|
||||
["react-native-gesture-handler/jest-utils" :as gestures-jest]
|
||||
[reagent.core :as r]
|
||||
[test-helpers.component :as h]))
|
||||
(ns quo.components.buttons.slide-button.component-spec
|
||||
(:require
|
||||
["@testing-library/react-native" :as rtl]
|
||||
["react-native-gesture-handler/jest-utils" :as gestures-jest]
|
||||
[quo.components.buttons.slide-button.constants :as constants]
|
||||
[quo.components.buttons.slide-button.view :as slide-button]
|
||||
[reagent.core :as r]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
;; NOTE stolen from
|
||||
;; (https://github.com/reagent-project/reagent/blob/a14faba55e373000f8f93edfcfce0d1222f7e71a/test/reagenttest/utils.cljs#LL104C7-L104C10),
|
||||
@@ -81,7 +82,7 @@
|
||||
(h/has-style track-mock {:opacity constants/disable-opacity})))
|
||||
|
||||
(h/test "render the small button"
|
||||
(h/render [slide-button/view (assoc default-props :size :size/s-40)])
|
||||
(h/render [slide-button/view (assoc default-props :size :size-40)])
|
||||
(let [mock (h/get-by-test-id :slide-button-track)
|
||||
small-height (:track-height constants/small-dimensions)]
|
||||
(h/has-style mock {:height small-height})))
|
||||
@@ -1,4 +1,4 @@
|
||||
(ns quo2.components.buttons.slide-button.constants)
|
||||
(ns quo.components.buttons.slide-button.constants)
|
||||
|
||||
(def track-padding 4)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
(ns quo2.components.buttons.slide-button.style
|
||||
(ns quo.components.buttons.slide-button.style
|
||||
(:require
|
||||
[quo2.components.buttons.slide-button.constants :as constants]
|
||||
[quo2.components.buttons.slide-button.utils :as utils]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[quo2.foundations.typography :as typography]))
|
||||
[quo.components.buttons.slide-button.constants :as constants]
|
||||
[quo.components.buttons.slide-button.utils :as utils]
|
||||
[react-native.reanimated :as reanimated]))
|
||||
|
||||
(def absolute-fill
|
||||
{:position :absolute
|
||||
@@ -16,7 +15,7 @@
|
||||
[{:keys [interpolate-track thumb-size customization-color theme]}]
|
||||
(reanimated/apply-animations-to-style
|
||||
{:transform [{:translate-x (interpolate-track :track-clamp)}]}
|
||||
{:background-color (utils/slider-color :main customization-color theme)
|
||||
{:background-color (utils/main-color customization-color theme)
|
||||
:border-radius 12
|
||||
:height thumb-size
|
||||
:width thumb-size
|
||||
@@ -46,7 +45,7 @@
|
||||
:justify-content :space-around}))
|
||||
|
||||
(defn track
|
||||
[{:keys [disabled? customization-color height theme]}]
|
||||
[{:keys [disabled? customization-color height blur?]}]
|
||||
{:align-items :flex-start
|
||||
:justify-content :center
|
||||
:border-radius 14
|
||||
@@ -54,7 +53,7 @@
|
||||
:align-self :stretch
|
||||
:padding constants/track-padding
|
||||
:opacity (if disabled? 0.3 1)
|
||||
:background-color (utils/slider-color :track customization-color theme)})
|
||||
:background-color (utils/track-color customization-color blur?)})
|
||||
|
||||
(defn track-cover
|
||||
[interpolate-track]
|
||||
@@ -74,7 +73,5 @@
|
||||
:width track-width})
|
||||
|
||||
(defn track-text
|
||||
[customization-color theme]
|
||||
(-> typography/paragraph-1
|
||||
(merge typography/font-medium)
|
||||
(assoc :color (utils/slider-color :main customization-color theme))))
|
||||
[customization-color theme blur?]
|
||||
{:color (utils/text-color customization-color theme blur?)})
|
||||
@@ -0,0 +1,55 @@
|
||||
(ns quo.components.buttons.slide-button.utils
|
||||
(:require
|
||||
[quo.components.buttons.slide-button.constants :as constants]
|
||||
[quo.foundations.colors :as colors]))
|
||||
|
||||
(defn main-color
|
||||
"`customization-color` Customization color"
|
||||
[customization-color theme]
|
||||
(colors/theme-colors
|
||||
(colors/custom-color customization-color 50)
|
||||
(colors/custom-color customization-color 60)
|
||||
theme))
|
||||
|
||||
(defn track-color
|
||||
"`customization-color` Customization color"
|
||||
([customization-color blur?]
|
||||
(if blur?
|
||||
colors/white-opa-5
|
||||
(colors/custom-color customization-color 50 10))))
|
||||
|
||||
(defn text-color
|
||||
"`customization-color` Customization color"
|
||||
[customization-color theme blur?]
|
||||
(if blur?
|
||||
colors/white-opa-40
|
||||
(colors/theme-colors
|
||||
(colors/custom-color customization-color 50)
|
||||
(colors/custom-color customization-color 60)
|
||||
theme)))
|
||||
|
||||
(defn clamp-value
|
||||
[value min-value max-value]
|
||||
(cond
|
||||
(< value min-value) min-value
|
||||
(> value max-value) max-value
|
||||
:else value))
|
||||
|
||||
(defn calc-usable-track
|
||||
"Calculate the track section in which the
|
||||
thumb can move in. Mostly used for interpolations."
|
||||
[track-width thumb-size]
|
||||
(let [double-padding (* constants/track-padding 2)]
|
||||
(- track-width double-padding thumb-size)))
|
||||
|
||||
(defn get-dimensions
|
||||
[track-width size dimension-key]
|
||||
(let [default-dimensions (case size
|
||||
:size-40 constants/small-dimensions
|
||||
:size-48 constants/large-dimensions
|
||||
constants/large-dimensions)]
|
||||
(-> default-dimensions
|
||||
(merge {:usable-track (calc-usable-track
|
||||
track-width
|
||||
(:thumb default-dimensions))})
|
||||
(get dimension-key))))
|
||||