Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen Reader #1

Merged
merged 48 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9cece94
cap plugin:generate
imhoffd Jul 8, 2020
90d725c
add to lerna
imhoffd Jul 8, 2020
abfcb7d
rename + podspec whitespace
imhoffd Jul 10, 2020
b3f2679
wip
imhoffd Jul 10, 2020
42170c6
pkg lock
imhoffd Jul 10, 2020
4b4f481
implement prettier
imhoffd Jul 13, 2020
efaf794
implement swiftlint
imhoffd Jul 13, 2020
0c17a0c
3.x wip
imhoffd Jul 21, 2020
0e43960
recreate
imhoffd Jul 21, 2020
ca735ce
recreate
imhoffd Jul 21, 2020
3e6957d
recreate
imhoffd Jul 24, 2020
ee40e75
except these
imhoffd Jul 24, 2020
9ac7fcd
Fixing search paths, swift embed overrides.
ikeith Jul 24, 2020
0fa386d
Fixing tests to refer to the correct class.
ikeith Jul 24, 2020
1a094d5
Adding schemes.
ikeith Jul 24, 2020
213a3be
using recommended settings, other updates
imhoffd Jul 24, 2020
adabe30
recreate
imhoffd Jul 27, 2020
2c65488
Merge branch 'main' into screen-reader
imhoffd Jul 28, 2020
e6b4123
delete xmls
imhoffd Jul 28, 2020
89678a2
wip implementation
imhoffd Jul 28, 2020
84efe87
recreate
imhoffd Jul 28, 2020
4f1b8ef
prettier
imhoffd Jul 28, 2020
46ad94f
Merge branch 'main' into screen-reader
imhoffd Jul 28, 2020
bbed1ed
Merge branch 'main' into screen-reader
imhoffd Jul 28, 2020
b317462
rely on monorepo's linked deps
imhoffd Jul 28, 2020
383ac7e
Merge branch 'main' into screen-reader
imhoffd Jul 29, 2020
20c7695
ios speak method
imhoffd Jul 29, 2020
58acda0
ios implementation
imhoffd Jul 29, 2020
bd7594f
web implementation + documentation
imhoffd Jul 29, 2020
13384de
event rename
imhoffd Jul 29, 2020
ecb2a61
Merge branch 'main' into screen-reader
imhoffd Jul 31, 2020
2fa3145
align behavior with ios
imhoffd Jul 31, 2020
9205ab6
add back deps
imhoffd Jul 31, 2020
51b4d96
update docs
imhoffd Jul 31, 2020
aa3804f
listener cleanup to prevent memory leaks
carlpoole Aug 4, 2020
925ea6b
change iife export
imhoffd Jul 31, 2020
9bfaf6f
renames
imhoffd Aug 4, 2020
4862a19
unsupported browser error
imhoffd Aug 4, 2020
f5ed2c4
switch to resolve
imhoffd Aug 5, 2020
945eb1c
remove observer on deinit
imhoffd Aug 5, 2020
66a271c
Update screen-reader/ios/Plugin/ScreenReaderPlugin.swift
imhoffd Aug 6, 2020
0847ac2
Update screen-reader/ios/PluginTests/PluginTests.swift
imhoffd Aug 6, 2020
b6d823d
Update screen-reader/package.json
imhoffd Aug 6, 2020
d477c07
Merge branch 'main' into screen-reader
imhoffd Aug 10, 2020
d230c3e
Merge branch 'main' into screen-reader
imhoffd Aug 17, 2020
c174edf
use real release for @since
imhoffd Aug 17, 2020
49e26e5
Merge branch 'main' into screen-reader
imhoffd Aug 18, 2020
51dbf7a
rename
imhoffd Aug 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"packages": [
"screen-reader",
"text-zoom"
],
"command": {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"build": "lerna run build",
"watch": "lerna run --parallel --stream watch",
"lint": "lerna run lint",
"fmt": "lerna run fmt",
"toggle-local": "node ./scripts/toggle-local.mjs && lerna bootstrap",
"postinstall": "lerna bootstrap"
},
Expand Down
60 changes: 60 additions & 0 deletions screen-reader/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# node files
dist/
node_modules/

# iOS files
Pods
Build
xcuserdata

# macOS files
.DS_Store



# Based on Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore

# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.idea

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
2 changes: 2 additions & 0 deletions screen-reader/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
dist
17 changes: 17 additions & 0 deletions screen-reader/CapacitorScreenReader.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require 'json'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
s.name = 'CapacitorScreenReader'
s.version = package['version']
s.summary = package['description']
s.license = package['license']
s.homepage = package['repository']['url']
s.author = package['author']
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '11.0'
s.dependency 'Capacitor'
s.swift_version = '5.1'
end
1 change: 1 addition & 0 deletions screen-reader/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
56 changes: 56 additions & 0 deletions screen-reader/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.12'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.1'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.2.0'
}

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 29
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
}

repositories {
google()
jcenter()
mavenCentral()
}


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
}
24 changes: 24 additions & 0 deletions screen-reader/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
183 changes: 183 additions & 0 deletions screen-reader/android/gradlew
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
echo "$*"
}

die () {
echo
echo "$*"
echo
exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option

if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

exec "$JAVACMD" "$@"
Loading