fix: icons package
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
node_modules
|
||||
packages/*/coverage
|
||||
packages/*/coverage
|
||||
webpack.config.js
|
||||
2
.github/workflows/mobile.build-dev.yml
vendored
2
.github/workflows/mobile.build-dev.yml
vendored
@@ -65,7 +65,7 @@ jobs:
|
||||
- name: Ruby Setup for Fastlane
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Install dependencies
|
||||
run: yarn install && yarn run init
|
||||
run: yarn install
|
||||
- name: Set ssh connection to Github
|
||||
uses: webfactory/ssh-agent@v0.4.1
|
||||
with:
|
||||
|
||||
2
.github/workflows/mobile.build-prod.yml
vendored
2
.github/workflows/mobile.build-prod.yml
vendored
@@ -60,7 +60,7 @@ jobs:
|
||||
run:
|
||||
echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)" >> $GITHUB_ENV
|
||||
- name: Install dependencies
|
||||
run: yarn install && yarn run init
|
||||
run: yarn install
|
||||
- name: Set ssh connection to Github
|
||||
uses: webfactory/ssh-agent@v0.4.1
|
||||
with:
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
14.17.3
|
||||
@@ -6,7 +6,7 @@ module.exports = function (api) {
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
electron: 9,
|
||||
electron: 17,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
"@svgr/webpack": "^6.2.1",
|
||||
"babel-loader": "^8.2.5",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"prettier": "*",
|
||||
"react": "^18.1.0",
|
||||
"react-dom": "^18.1.0",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
const path = require('path')
|
||||
module.exports = () => {
|
||||
return {
|
||||
entry: './src/index.ts',
|
||||
@@ -9,6 +8,8 @@ module.exports = () => {
|
||||
},
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
libraryTarget: 'umd',
|
||||
umdNamedDefine: true,
|
||||
},
|
||||
resolve: {
|
||||
fallback: {
|
||||
@@ -31,16 +32,5 @@ module.exports = () => {
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new (require('copy-webpack-plugin'))({
|
||||
patterns: [
|
||||
{
|
||||
from: '**/*.svg',
|
||||
to: 'mobile-exports',
|
||||
context: path.resolve(__dirname, 'src', 'Icons'),
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = {
|
||||
tsconfigRootDir: __dirname,
|
||||
},
|
||||
plugins: ['@typescript-eslint', 'prettier'],
|
||||
ignorePatterns: ['.eslintrc.js'],
|
||||
ignorePatterns: ['.eslintrc.js', 'metro.config.js'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts', '*.tsx'],
|
||||
|
||||
@@ -31,7 +31,7 @@ This is a React Native implementation of Standard Notes. React Native allows us
|
||||
4. Install project dependencies via:
|
||||
|
||||
```shell
|
||||
yarn run init
|
||||
yarn install
|
||||
```
|
||||
|
||||
We have two flavors of the app:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "StandardNotes",
|
||||
"displayName": "StandardNotes"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ PODS:
|
||||
- React-RCTImage
|
||||
- RNSearchBar (3.5.1):
|
||||
- React-Core
|
||||
- RNShare (7.6.0):
|
||||
- RNShare (7.6.1):
|
||||
- React-Core
|
||||
- RNStoreReview (0.2.1):
|
||||
- React-Core
|
||||
@@ -744,7 +744,7 @@ SPEC CHECKSUMS:
|
||||
RNReanimated: 46cdb89ca59ab7181334f4ed05a70e82ddb36751
|
||||
RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19
|
||||
RNSearchBar: 5ed8e13ba8a6c701fbd2afdfe4164493d24b2aee
|
||||
RNShare: 5972e774cd69eec879131b5283f883c1b93fc91c
|
||||
RNShare: d0257bcf7aaf75d9502cea73496661c8d68f3cfc
|
||||
RNStoreReview: e05edbbf426563070524cec384ac0b8df69be801
|
||||
RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8
|
||||
RNVectorIcons: 7923e585eaeb139b9f4531d25a125a1500162a0b
|
||||
|
||||
@@ -6,13 +6,24 @@
|
||||
* https://stackoverflow.com/a/65231261/2504429
|
||||
* @format
|
||||
*/
|
||||
const { getDefaultConfig } = require('metro-config');
|
||||
const path = require('path')
|
||||
const { getDefaultConfig } = require('metro-config')
|
||||
|
||||
const extraNodeModules = {
|
||||
common: path.resolve(__dirname + '../..'),
|
||||
}
|
||||
|
||||
module.exports = (async () => {
|
||||
const {
|
||||
resolver: { sourceExts, assetExts },
|
||||
} = await getDefaultConfig();
|
||||
} = await getDefaultConfig()
|
||||
|
||||
return {
|
||||
watchFolders: [
|
||||
__dirname,
|
||||
path.resolve(__dirname, '../icons'),
|
||||
path.resolve(__dirname, '../styles'),
|
||||
],
|
||||
transformer: {
|
||||
getTransformOptions: async () => ({
|
||||
transform: {
|
||||
@@ -25,6 +36,12 @@ module.exports = (async () => {
|
||||
resolver: {
|
||||
assetExts: assetExts.filter(ext => ext !== 'svg'),
|
||||
sourceExts: [...sourceExts, 'svg'],
|
||||
extraNodeModules: new Proxy(extraNodeModules, {
|
||||
get: (target, name) => {
|
||||
const result = name in target ? target[name] : path.join(process.cwd(), `node_modules/${name}`)
|
||||
return result
|
||||
},
|
||||
}),
|
||||
},
|
||||
};
|
||||
})();
|
||||
}
|
||||
})()
|
||||
|
||||
@@ -11,13 +11,12 @@
|
||||
"ios-dev": "react-native run-ios --scheme StandardNotesDev",
|
||||
"ios-prod": "react-native run-ios --scheme StandardNotes",
|
||||
"clear-cache": "watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-*",
|
||||
"init": "pod-install ios",
|
||||
"lint": "yarn lint:eslint && yarn lint:prettier",
|
||||
"lint:eslint": "yarn eslint . --ext .ts,.tsx --fix --quiet",
|
||||
"lint:prettier": "prettier ./src --write",
|
||||
"tsc": "tsc --noEmit",
|
||||
"start": "react-native start",
|
||||
"postinstall": "patch-package",
|
||||
"postinstall": "patch-package && yarn pod-install ios",
|
||||
"android:bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/",
|
||||
"upgrade:snjs": "ncu -u '@standardnotes/*' && yarn"
|
||||
},
|
||||
@@ -83,7 +82,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.17.9",
|
||||
"@babel/preset-typescript": "^7.16.7",
|
||||
"@babel/runtime": "^7.17.9",
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@react-native-community/eslint-config": "^3.0.1",
|
||||
"@standardnotes/config": "^2.4.3",
|
||||
"@types/detox": "^18.1.0",
|
||||
@@ -103,17 +102,18 @@
|
||||
"eslint-plugin-flowtype": "^8.0.3",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"faker": "^6.6.6",
|
||||
"get-yarn-workspaces": "^1.0.2",
|
||||
"jest": "^27.5.1",
|
||||
"jest-circus": "^27.5.1",
|
||||
"metro-react-native-babel-preset": "^0.70.1",
|
||||
"npm-check-updates": "^12.5.9",
|
||||
"patch-package": "^6.4.7",
|
||||
"pod-install": "^0.1.33",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"prettier": "^2.6.0",
|
||||
"prettier-plugin-organize-imports": "^2.3.4",
|
||||
"react-devtools": "^4.24.6",
|
||||
"react-devtools-core": "^4.24.6",
|
||||
"react-native-monorepo-tools": "^1.1.4",
|
||||
"react-native-pager-view": "^5.4.15",
|
||||
"react-test-renderer": "17.0.2",
|
||||
"replace-in-file": "^6.3.2",
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
import ArchiveIcon from '@standardnotes/icons/dist/mobile-exports/ic-archive.svg'
|
||||
import AttachmentFileIcon from '@standardnotes/icons/dist/mobile-exports/ic-attachment-file.svg'
|
||||
import AuthenticatorIcon from '@standardnotes/icons/dist/mobile-exports/ic-authenticator.svg'
|
||||
import ClearCircleFilledIcon from '@standardnotes/icons/dist/mobile-exports/ic-clear-circle-filled.svg'
|
||||
import CodeIcon from '@standardnotes/icons/dist/mobile-exports/ic-code.svg'
|
||||
import FileDocIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-doc.svg'
|
||||
import FileImageIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-image.svg'
|
||||
import FileMovIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-mov.svg'
|
||||
import FileMusicIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-music.svg'
|
||||
import FileOtherIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-other.svg'
|
||||
import FilePdfIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-pdf.svg'
|
||||
import FilePptIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-ppt.svg'
|
||||
import FileXlsIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-xls.svg'
|
||||
import FileZipIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-zip.svg'
|
||||
import LockFilledIcon from '@standardnotes/icons/dist/mobile-exports/ic-lock-filled.svg'
|
||||
import MarkdownIcon from '@standardnotes/icons/dist/mobile-exports/ic-markdown.svg'
|
||||
import NotesIcon from '@standardnotes/icons/dist/mobile-exports/ic-notes.svg'
|
||||
import OpenInIcon from '@standardnotes/icons/dist/mobile-exports/ic-open-in.svg'
|
||||
import PencilOffIcon from '@standardnotes/icons/dist/mobile-exports/ic-pencil-off.svg'
|
||||
import PinFilledIcon from '@standardnotes/icons/dist/mobile-exports/ic-pin-filled.svg'
|
||||
import SpreadsheetsIcon from '@standardnotes/icons/dist/mobile-exports/ic-spreadsheets.svg'
|
||||
import TasksIcon from '@standardnotes/icons/dist/mobile-exports/ic-tasks.svg'
|
||||
import PlainTextIcon from '@standardnotes/icons/dist/mobile-exports/ic-text-paragraph.svg'
|
||||
import RichTextIcon from '@standardnotes/icons/dist/mobile-exports/ic-text-rich.svg'
|
||||
import TrashFilledIcon from '@standardnotes/icons/dist/mobile-exports/ic-trash-filled.svg'
|
||||
import UserAddIcon from '@standardnotes/icons/dist/mobile-exports/ic-user-add.svg'
|
||||
import FilesIllustration from '@standardnotes/icons/dist/mobile-exports/il-files.svg'
|
||||
import ArchiveIcon from '@standardnotes/icons/src/Icons/ic-archive.svg'
|
||||
import AttachmentFileIcon from '@standardnotes/icons/src/Icons/ic-attachment-file.svg'
|
||||
import AuthenticatorIcon from '@standardnotes/icons/src/Icons/ic-authenticator.svg'
|
||||
import ClearCircleFilledIcon from '@standardnotes/icons/src/Icons/ic-clear-circle-filled.svg'
|
||||
import CodeIcon from '@standardnotes/icons/src/Icons/ic-code.svg'
|
||||
import FileDocIcon from '@standardnotes/icons/src/Icons/ic-file-doc.svg'
|
||||
import FileImageIcon from '@standardnotes/icons/src/Icons/ic-file-image.svg'
|
||||
import FileMovIcon from '@standardnotes/icons/src/Icons/ic-file-mov.svg'
|
||||
import FileMusicIcon from '@standardnotes/icons/src/Icons/ic-file-music.svg'
|
||||
import FileOtherIcon from '@standardnotes/icons/src/Icons/ic-file-other.svg'
|
||||
import FilePdfIcon from '@standardnotes/icons/src/Icons/ic-file-pdf.svg'
|
||||
import FilePptIcon from '@standardnotes/icons/src/Icons/ic-file-ppt.svg'
|
||||
import FileXlsIcon from '@standardnotes/icons/src/Icons/ic-file-xls.svg'
|
||||
import FileZipIcon from '@standardnotes/icons/src/Icons/ic-file-zip.svg'
|
||||
import LockFilledIcon from '@standardnotes/icons/src/Icons/ic-lock-filled.svg'
|
||||
import MarkdownIcon from '@standardnotes/icons/src/Icons/ic-markdown.svg'
|
||||
import NotesIcon from '@standardnotes/icons/src/Icons/ic-notes.svg'
|
||||
import OpenInIcon from '@standardnotes/icons/src/Icons/ic-open-in.svg'
|
||||
import PencilOffIcon from '@standardnotes/icons/src/Icons/ic-pencil-off.svg'
|
||||
import PinFilledIcon from '@standardnotes/icons/src/Icons/ic-pin-filled.svg'
|
||||
import SpreadsheetsIcon from '@standardnotes/icons/src/Icons/ic-spreadsheets.svg'
|
||||
import TasksIcon from '@standardnotes/icons/src/Icons/ic-tasks.svg'
|
||||
import PlainTextIcon from '@standardnotes/icons/src/Icons/ic-text-paragraph.svg'
|
||||
import RichTextIcon from '@standardnotes/icons/src/Icons/ic-text-rich.svg'
|
||||
import TrashFilledIcon from '@standardnotes/icons/src/Icons/ic-trash-filled.svg'
|
||||
import UserAddIcon from '@standardnotes/icons/src/Icons/ic-user-add.svg'
|
||||
import FilesIllustration from '@standardnotes/icons/src/Icons/il-files.svg'
|
||||
|
||||
import { IconType } from '@standardnotes/snjs'
|
||||
import React, { FC, useContext } from 'react'
|
||||
import { SvgProps } from 'react-native-svg'
|
||||
|
||||
51
yarn.lock
51
yarn.lock
@@ -1471,7 +1471,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.17.9, @babel/runtime@npm:^7.18.2, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2":
|
||||
"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.18.2, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2":
|
||||
version: 7.18.3
|
||||
resolution: "@babel/runtime@npm:7.18.3"
|
||||
dependencies:
|
||||
@@ -4446,7 +4446,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@babel/core": ^7.17.9
|
||||
"@babel/preset-typescript": ^7.16.7
|
||||
"@babel/runtime": ^7.17.9
|
||||
"@babel/runtime": ^7.18.3
|
||||
"@expo/react-native-action-sheet": ^3.13.0
|
||||
"@react-native-community/async-storage": 1.12.1
|
||||
"@react-native-community/eslint-config": ^3.0.1
|
||||
@@ -4483,6 +4483,7 @@ __metadata:
|
||||
eslint-plugin-flowtype: ^8.0.3
|
||||
eslint-plugin-prettier: ^4.0.0
|
||||
faker: ^6.6.6
|
||||
get-yarn-workspaces: ^1.0.2
|
||||
jest: ^27.5.1
|
||||
jest-circus: ^27.5.1
|
||||
js-base64: ^3.7.2
|
||||
@@ -4491,7 +4492,6 @@ __metadata:
|
||||
npm-check-updates: ^12.5.9
|
||||
patch-package: ^6.4.7
|
||||
pod-install: ^0.1.33
|
||||
postinstall-postinstall: ^2.1.0
|
||||
prettier: ^2.6.0
|
||||
prettier-plugin-organize-imports: ^2.3.4
|
||||
react: 17.0.2
|
||||
@@ -4510,6 +4510,7 @@ __metadata:
|
||||
react-native-image-picker: ^4.7.3
|
||||
react-native-keychain: ^8.0.0
|
||||
react-native-mail: "standardnotes/react-native-mail#fd26119e67a2ffc5eaa95a9c17049743e39ce2d3"
|
||||
react-native-monorepo-tools: ^1.1.4
|
||||
react-native-pager-view: ^5.4.15
|
||||
react-native-privacy-snapshot: "standardnotes/react-native-privacy-snapshot#653e904c90fc6f2b578da59138f2bfe5d7f942fe"
|
||||
react-native-reanimated: ^2.8.0
|
||||
@@ -11074,6 +11075,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"find-root@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "find-root@npm:1.1.0"
|
||||
checksum: b2a59fe4b6c932eef36c45a048ae8f93c85640212ebe8363164814990ee20f154197505965f3f4f102efc33bfb1cbc26fd17c4a2fc739ebc51b886b137cbefaf
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"find-up@npm:5.0.0, find-up@npm:^5.0.0":
|
||||
version: 5.0.0
|
||||
resolution: "find-up@npm:5.0.0"
|
||||
@@ -11157,6 +11165,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"flatten@npm:^1.0.2":
|
||||
version: 1.0.3
|
||||
resolution: "flatten@npm:1.0.3"
|
||||
checksum: 5c57379816f1692aaa79fbc6390e0a0644e5e8442c5783ed57c6d315468eddbc53a659eaa03c9bb1e771b0f4a9bd8dd8a2620286bf21fd6538a7857321fdfb20
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"flow-parser@npm:0.*":
|
||||
version: 0.180.0
|
||||
resolution: "flow-parser@npm:0.180.0"
|
||||
@@ -11604,6 +11619,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"get-yarn-workspaces@npm:^1.0.2":
|
||||
version: 1.0.2
|
||||
resolution: "get-yarn-workspaces@npm:1.0.2"
|
||||
dependencies:
|
||||
find-root: ^1.1.0
|
||||
flatten: ^1.0.2
|
||||
glob: ^7.1.2
|
||||
checksum: 884a6fcb141b1a68fb0d93fdd5cbae3ef552156c1a9d35cde11bd9c706a153e1cb3b5f88314554c802c528bd2e1c69cc48fa542891db286e47ae89c85dc091ae
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"getpass@npm:^0.1.1":
|
||||
version: 0.1.7
|
||||
resolution: "getpass@npm:0.1.7"
|
||||
@@ -11723,7 +11749,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"glob@npm:^7.0.0, glob@npm:^7.0.3, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0":
|
||||
"glob@npm:^7.0.0, glob@npm:^7.0.3, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.1.7, glob@npm:^7.2.0":
|
||||
version: 7.2.3
|
||||
resolution: "glob@npm:7.2.3"
|
||||
dependencies:
|
||||
@@ -17647,13 +17673,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"postinstall-postinstall@npm:^2.1.0":
|
||||
version: 2.1.0
|
||||
resolution: "postinstall-postinstall@npm:2.1.0"
|
||||
checksum: e1d34252cf8d2c5641c7d2db7426ec96e3d7a975f01c174c68f09ef5b8327bc8d5a9aa2001a45e693db2cdbf69577094d3fe6597b564ad2d2202b65fba76134b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pre-push@npm:^0.1.2":
|
||||
version: 0.1.2
|
||||
resolution: "pre-push@npm:0.1.2"
|
||||
@@ -18391,6 +18410,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-native-monorepo-tools@npm:^1.1.4":
|
||||
version: 1.1.4
|
||||
resolution: "react-native-monorepo-tools@npm:1.1.4"
|
||||
dependencies:
|
||||
find-root: ^1.1.0
|
||||
glob: ^7.1.7
|
||||
checksum: 474ec7e5aaa4e28dac0ea96fd81d47acc5371b3e268b84ef9bd356b9db244f91d11dcf4b39616f527fa2e95fa6c94e4857b01a433357bd062761a4e90ba1f980
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-native-pager-view@npm:^5.4.15":
|
||||
version: 5.4.24
|
||||
resolution: "react-native-pager-view@npm:5.4.24"
|
||||
|
||||
Reference in New Issue
Block a user