Skip to content

Commit c0c6d53

Browse files
committed
Fix arnog#448. Move deploy to local.
1 parent 264acf2 commit c0c6d53

21 files changed

+38
-52
lines changed

.travis.yml

+1-14
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ before_install: [npm install -g npm@latest]
44
install: [npm ci]
55
script:
66
- npm run lint
7-
- npm run test
7+
- npm run build development
88
cache:
99
directories:
1010
- node_modules
@@ -14,19 +14,6 @@ branches:
1414
- master
1515
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/ # tagged with version
1616
# - release
17-
before_deploy:
18-
- npm run deploy-ci
19-
deploy:
20-
skip_cleanup: true
21-
provider: npm
22-
on:
23-
tags: true
24-
email: '$NPM_EMAIL'
25-
api_token: '$NPM_API_TOKEN'
26-
access: public
27-
# dry_run: true
28-
edge: true
29-
tag: latest
3017
notifications:
3118
slack:
3219
secure: dctz771vJCv6UdjBz65n8XkKx5q/LF5UIY+qSRAxLpqwFp9Y3i9trUNoSaDya4PH5sfAHbUHxsBvG8njIKDJY1pckcrCt2Ml2+9fRQ01cCMggNnSK5OlcuoL6lrnbMbaLz3XEUKJY8mfJnnHggUFNqT0IhCR4xgcxiyg90AtHhIGQcIpkFrpmwbW+ZXm7PMTP/svGkL3OMs4lDO6V8XzEGKXd+4rkcvINZwOtKDXbIf7Wm5MXQ2lf4o1DviAJeFqlIUPRRonAs2KPUAl86t+M22EWDExy6NOtmbdA68m+pDaBJ0mMN0OwxsoEJh5e7ml1/UAs82hCu+Kl3xW4emDrrF7k6C065NmWeRqLBVJxcfy+rdNsiBfJhPmBBGc0VTYLqnWR5PLxDBHgLyO7zAjG4n4G8WpCEY0j891Xaw3Cktz8tWWo336BxCmsd2zOUdoWr+aQsml25mlpLYuX2t4HR66jJdz8A7X+e5m4V3/BE+afMKhRYgeuwPVq03TBAtHZp5jLr0TCw9t3qyNrUEXGtqoAYdCThCP1zcpxTTYnxoYHgoEfiE8OVMkMf6R3JpCUQMk1+AbpyVIHeCxfaq7jCZjUG4exMGFNFhTSjl3ePoCLdwfP75uEIiQU/LOJGb2JrJWVjTEBs5P/atk71ijomygAU3D6BtYwoZm0Hqy+l8=

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [Unreleased]
2+
3+
- **Fix #448**: Fix an issue where the "^" keyboard shortcut would not work.
4+
15
## 0.50.6 (2020-05-11)
26

37
- Fix date stamping of declaration files

css/mathlive.core.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
.ML__strut,
3939
.ML__strut--bottom {
4040
display: inline-block;
41-
min-height: 1em;
41+
min-height: 0.5em;
4242
}
4343

4444
.ML__caret:after {

css/mathlive.less

+2-2
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ body[theme='dark'] .ML__keystroke-caption {
889889
}
890890

891891
.ML__keyboard {
892-
--keyboard-background: rgba(209, 213, 217, 0.95);
892+
--keyboard-background: rgba(209, 213, 217, 0.97);
893893
--keyboard-text: #000;
894894
--keyboard-text-active: var(--primary);
895895
--keyboard-background-border: #ddd;
@@ -985,7 +985,7 @@ body[theme='dark'] .ML__keystroke-caption {
985985
top: 0; // "
986986
box-sizing: content-box; // "
987987
transform: none; // "
988-
z-index: (@keyboard-zindex + 1);
988+
z-index: (@keyboard-zindex + 1);
989989

990990
display: flex;
991991
flex-direction: row;

dist/commands.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* v0.50.5-1-ga8f346d-dirty */import { Keys } from './types-utils';
1+
/* v0.50.6-1-g264acf2-dirty */import { Keys } from './types-utils';
22
import { ParseMode } from './core';
33
import { Mathfield } from './mathfield';
44
import { Model } from './model';

dist/config.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* v0.50.5-1-ga8f346d-dirty */import { ParserErrorListener, MacroDictionary, ParseMode } from './core';
1+
/* v0.50.6-1-g264acf2-dirty */import { ParserErrorListener, MacroDictionary, ParseMode } from './core';
22
import { InlineShortcutDefinition } from './shortcuts';
33
import type { Mathfield } from './mathfield';
44
export declare type TextToSpeechOptions = {

dist/core.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* v0.50.5-1-ga8f346d-dirty *//**
1+
/* v0.50.6-1-g264acf2-dirty *//**
22
* The mode that indicates how a portion of content is interpreted
33
*
44
* @deprecated The 'command'mode will be dropped in a future release

dist/mathfield.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* v0.50.5-1-ga8f346d-dirty */import { Selector } from './commands';
1+
/* v0.50.6-1-g264acf2-dirty */import { Selector } from './commands';
22
import { MathfieldConfig } from './config';
33
import { ParseMode, MacroDictionary, Style } from './core';
44
/**

dist/mathlive.core.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mathlive.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mathlive.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* v0.50.5-1-ga8f346d-dirty *//**
1+
/* v0.50.6-1-g264acf2-dirty *//**
22
*
33
* Use MathLive to render and edit mathematical formulas in your browser.
44
*
@@ -14,8 +14,8 @@
1414
* console.log(MathLive.latexToAST('e^{i\\pi}+1=0'));
1515
* </script>
1616
*
17-
* @packageDocumentation MathLive SDK Reference v0.50.5-1-ga8f346d-dirty
18-
* @version v0.50.5-1-ga8f346d-dirty
17+
* @packageDocumentation MathLive SDK Reference v0.50.6-1-g264acf2-dirty
18+
* @version v0.50.6-1-g264acf2-dirty
1919
*
2020
*/
2121
import { Mathfield } from './mathfield';
@@ -34,7 +34,7 @@ export { MathfieldConfig };
3434
* - The second number is the **MINOR** version, incremented for new features
3535
* - The third number is the **PATCH** version, incremented for bug fixes
3636
*
37-
* Current version: `v0.50.5-1-ga8f346d-dirty`
37+
* Current version: `v0.50.6-1-g264acf2-dirty`
3838
*
3939
*/
4040
export declare const version: string;

dist/mathlive.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mathlive.mjs

+2-2
Large diffs are not rendered by default.

dist/model.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* v0.50.5-1-ga8f346d-dirty */import { Mathfield } from './mathfield';
1+
/* v0.50.6-1-g264acf2-dirty */import { Mathfield } from './mathfield';
22
export interface Model {
33
mathfield: Mathfield;
44
}

dist/shortcuts.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* v0.50.5-1-ga8f346d-dirty */import { ParseMode } from './core';
1+
/* v0.50.6-1-g264acf2-dirty */import { ParseMode } from './core';
22
/**
33
* An inline shortcut can be specified as a simple string or as
44
* an object literal with additional options:

dist/types-utils.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* v0.50.5-1-ga8f346d-dirty *//**
1+
/* v0.50.6-1-g264acf2-dirty *//**
22
* @internal
33
*/
44
declare type Filter<T, Cond, U extends keyof T = keyof T> = {

dist/vue-mathlive.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/* MathLive v0.50.5-1-ga8f346d-dirty */
1+
/* MathLive v0.50.6-1-g264acf2-dirty */
22
var t={name:"mathlive-mathfield",template:'<div class="mathfield" :id="id"><slot></slot></div>',props:{id:{type:String,default:""},value:{type:String,default:""},config:{type:Object,default:()=>({})},onKeystroke:{type:Function,default:function(t,e){return!0}},onMoveOutOf:{type:Function,default:function(t){return!0}},onTabOutOf:{type:Function,default:function(t){return!0}}},install:function(t,e){Object.defineProperty(t.prototype,"$mathlive",{value:e}),t.component("mathlive-mathfield",this)},watch:{value:function(t,e){t!==e&&this.$el.mathfield.$latex(t,{suppressChangeNotifications:!0})},config:{deep:!0,handler:function(t){this.$el.mathfield.$setConfig(t)}}},mounted:function(){this.$nextTick(()=>{this.$mathlive.makeMathField(this.$el,{...this.config,onContentDidChange:t=>{this.$emit("input",this.$el.mathfield.$text())},onFocus:t=>{this.$emit("focus")},onBlur:t=>{this.$emit("blur")},onContentWillChange:t=>{this.$emit("content-will-change")},onSelectionWillChange:t=>{this.$emit("selection-will-change")},onUndoStateWillChange:(t,e)=>{this.$emit("undo-state-will-change",e)},onUndoStateDidChange:(t,e)=>{this.$emit("undo-state-did-change",e)},onVirtualKeyboardToggle:(t,e,i)=>{this.$emit("virtual-keyboard-toggle",e,i)},onReadAloudStatus:(t,e)=>{this.$emit("read-aloud-status",e)},onKeystroke:function(t,e,i){return this.onKeystroke(e,i)},onMoveOutOf:(t,e)=>this.onMoveOutOf(e),onTabOutOf:(t,e)=>this.onTabOutOf(e)})})},methods:{perform:function(t){this.$el.mathfield.$perform(t)},hasFocus:function(){return this.$el.mathfield.$hasFocus()},focus:function(){this.$el.mathfield.$focus()},blur:function(){this.$el.mathfield.$blur()},text:function(t){return this.$el.mathfield.$text(t)},selectedText:function(t){return this.$el.mathfield.$selectedText(t)},insert:function(t,e){this.$el.mathfield.$insert(t,e)},keystroke:function(t,e){return this.$el.mathfield.$keystroke(t,e)},typedText:function(t){this.$el.mathfield.$keystroke(t)},selectionIsCollapsed:function(){return this.$el.mathfield.$selectionIsCollapsed()},selectionDepth:function(){return this.$el.mathfield.$selectionDepth()},selectionAtStart:function(){return this.$el.mathfield.$selectionAtStart()},selectionAtEnd:function(){return this.$el.mathfield.$selectionAtEnd()},select:function(){this.$el.mathfield.$select()},clearSelection:function(){this.$el.mathfield.$clearSelection()}}};export default t;

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
"scripts": {
1616
"build": "bash ./scripts/build.sh",
1717
"clean": "rimraf build dist coverage",
18-
"deploy-ci": "bash ./scripts/deploy-ci.sh",
1918
"dist": "bash ./scripts/build.sh production",
2019
"lint": "eslint --fix src/",
2120
"start": "bash ./scripts/build.sh watch",
2221
"test": "bash ./scripts/test.sh",
23-
"version": "bash ./scripts/version.sh"
22+
"version": "bash ./scripts/version.sh",
23+
"postversion": "bash ./scripts/github-release.sh"
2424
},
2525
"main": "./dist/mathlive.js",
2626
"module": "./dist/mathlive.mjs",

scripts/deploy-ci.sh scripts/github-release.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,15 @@ set -e # exit immediately on error
55
if [ -z "$GH_PUBLISH_TOKEN" ]
66
then
77
echo "The `\$GH_PUBLISH_TOKEN` env variable is not set. Deploy failed."
8-
echo "Note: the `deploy-ci` command should only be run from the Travis CI environment"
9-
8+
echo "Got to GitHub > [user] > Settings > Developer Settings > Personal Access Tokens to create one and set it as an env variable."
109
exit 1
1110
fi
1211

13-
# Make a production build
14-
## (this is just to check that the build is reproducible
15-
## a production build should have already been pushed by this point)
16-
npm run build production
17-
12+
# Push the tag that was created by npm version to GitHub
13+
git push origin --tags
1814

1915

16+
# Create a GitHub release matching this tag
2017
REPO=$(git config --get remote.origin.url | sed 's/.*:\/\/github.com\///;s/.git$//')
2118

2219
BRANCH=$(git rev-parse --abbrev-ref HEAD)
@@ -27,7 +24,10 @@ RELEASE_NOTE=$(sed -n '1,/^## /p' < CHANGELOG.md | sed '$d' | sed -e 's/$/\\n/'
2724

2825
API_JSON=$(printf '{"tag_name": "%s","target_commitish": "master","name": "%s","body": "%s","draft": false,"prerelease": false}' $VERSION $VERSION "$RELEASE_NOTE" )
2926

27+
echo $API_JSON
3028
echo "Creating GitHub release $VERSION for $BRANCH branch of $REPO"
3129

30+
exit;
31+
3232
curl -H "Authorization: token $GH_PUBLISH_TOKEN" --data "$API_JSON" "https://api.github.com/repos/$REPO/releases"
3333

scripts/version.sh

-6
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,3 @@ sedi -e 's/\[Unreleased\]/'"$PACKAGE_VERSION"' ('"$DATE_STAMP"')/g' CHANGELOG.md
2727

2828
git add CHANGELOG.md
2929
git add dist
30-
git commit -m $PACKAGE_VERSION
31-
32-
# Deploy this tagged release to Github.
33-
# This will trigger a Travis build.
34-
# In turn, the Travis build will publish to npm.
35-
git push origin --tags

src/editor/model-commands.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { Atom } from '../core/atom';
2626
*/
2727
export function moveToSuperscript(model: ModelPrivate): boolean {
2828
collapseSelectionForward(model);
29-
if (getAnchor(model).superscript) {
29+
if (!getAnchor(model).superscript) {
3030
if (getAnchor(model).subscript) {
3131
getAnchor(model).superscript = [new Atom('', 'first')];
3232
} else {
@@ -58,7 +58,6 @@ export function moveToSuperscript(model: ModelPrivate): boolean {
5858
getAnchor(model).superscript = [new Atom('', 'first')];
5959
}
6060
}
61-
return true;
6261
}
6362
model.path.push({ relation: 'superscript', offset: 0 });
6463
selectGroup(model);
@@ -172,6 +171,8 @@ register(
172171
jumpToMathFieldBoundary(model, +1),
173172
moveToSuperscript: (model: ModelPrivate): boolean =>
174173
moveToSuperscript(model),
174+
moveToSubscript: (model: ModelPrivate): boolean =>
175+
moveToSubscript(model),
175176
},
176177
{ target: 'model', category: 'selection-anchor' }
177178
);

0 commit comments

Comments
 (0)