Skip to content

Commit 3c7f507

Browse files
committed
Fix arnog#311
1 parent 7af41f6 commit 3c7f507

28 files changed

+31243
-136
lines changed

.eslintrc.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@
5050

5151
"@typescript-eslint/no-explicit-any": "off",
5252

53-
"prettier/prettier": "error",
53+
"prettier/prettier": [
54+
"error",
55+
{
56+
"endOfLine": "auto"
57+
}
58+
],
5459

5560
// note you must disable the base rule as it can report incorrect errors
5661
"indent": "off",

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ branches:
1515
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/ # tagged with version
1616
# - release
1717
before_deploy:
18-
- npm run dist
1918
- npm run deploy-ci
2019
deploy:
2120
skip_cleanup: true

CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
## 0.50.4 (2020-05-09)
1+
## [Unreleased]
2+
3+
- **Fix #311** Before making a build, check the correct version of node and npm
4+
are installed
5+
- Make the build system work better on Windows
6+
- Do not update /dist on each push
7+
8+
## 0.50.4 (2020-05-09)
29

310
### Bug Fixes
411

CONTRIBUTING.md

+1-29
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,7 @@ Before filing something, [have a look](https://github.com/arnog/mathlive/issues)
2121
at the existing issues. It's better to avoid filing duplicates. You can
2222
add a comment to an existing issue if you'd like.
2323

24-
### What happens after I file an issue?
25-
26-
1. After a bug is filed, it will be _awaiting review_
27-
2. After the bug has been triaged, it will be have one or more labels assigned to it.
28-
3. Once a developer has started working on the bug, the bug will be assigned to someone.
29-
4. Once a bug has been resolve, it is closed. You can still comment on closed bugs, or re-open them if necessary.
30-
31-
In addition, issues can be tagged with the following:
32-
33-
- _high priority_: Catastrophic issue that impacts many users
34-
- _medium priority_: Regression or issues that impact a significant number of users
35-
- _low priority_: Low severity (minor cosmetic issue) or very few users impacted
36-
- _no priority_: No plan to fix the issue, but we will consider a fix if someone offers a pull request
37-
- _good first issue_: This is an issue that would be a good candidate for someone
38-
who has little experience with the code base
39-
- _external_: This is an issue that has a dependency on an external component
40-
(typically, a browser)
41-
- _architecture_: This is an issue that requires a significant architectural
42-
change
43-
- _performance_: This issue affects perceived or measurable performance
44-
- _cleanup_: Resolving this issue would improve the code base maintainability
45-
without adding new functionality
46-
- _unable to reproduce_ the bug, as reported, could not be replicated
47-
by the developer. Additional information is necessary to continue investigating.
48-
- _not a bug_: The behavior described in the issue report is actually
49-
the intended behavior. This may be a usability issue, a documentation issue,
50-
or a disagreement regarding what the behavior should be.
51-
- _fact of life_: The issue cannot be resolved due to constraints of
52-
the browser, the OS, or the laws of physics.
24+
To speed up the resolution of an issue, including a pointer to an executable test case that demonstrates the issue, if applicable.
5325

5426
### Can I help fix a bug?
5527

dist/DEVELOPMENT-BUILD

Whitespace-only changes.

dist/commands.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* v0.50.4-0-g72e4e1b */import { Keys } from './types-utils';
1+
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.4-0-g72e4e1b */import { ParserErrorListener, MacroDictionary, ParseMode } from './core';
1+
import { ParserErrorListener, MacroDictionary, ParseMode } from './core';
22
import { InlineShortcutDefinition } from './shortcuts';
33
export declare class Mathfield {
44
}

dist/core.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* v0.50.4-0-g72e4e1b *//**
1+
/**
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.4-0-g72e4e1b */import { Selector } from './commands';
1+
import { Selector } from './commands';
22
import { MathfieldConfig } from './config';
33
import { ParseMode, MacroDictionary, Style } from './core';
44
/**

dist/mathlive.core.css

+201-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,201 @@
1-
/* v0.50.4-0-g72e4e1b */.ML__mathlive{line-height:0;direction:ltr;text-align:left;text-indent:0;text-rendering:auto;font-style:normal;font-size-adjust:none;letter-spacing:normal;word-wrap:normal;word-spacing:normal;white-space:nowrap;display:inline-block;text-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:-webkit-min-content;width:-moz-min-content;width:min-content;transform:translateZ(0)}.ML__base{display:inline-block;position:relative;cursor:text}.ML__strut,.ML__strut--bottom{display:inline-block;min-height:1em}.ML__caret:after{content:"";border:none;border-radius:2px;border-right:2px solid var(--caret);margin-right:-2px;position:relative;left:-1px;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__text-caret:after{content:"";border:none;border-radius:1px;border-right:1px solid var(--caret);margin-right:-1px;position:relative;left:0;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__command-caret:after{content:"_";border:none;margin-right:-1ex;position:relative;color:var(--caret);-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__text{white-space:pre}.ML__focused .ML__text{background:hsla(var(--hue),40%,50%,.1)}@-webkit-keyframes ML__caret-blink{0%,to{opacity:1}50%{opacity:0}}@keyframes ML__caret-blink{0%,to{opacity:1}50%{opacity:0}}.ML__textarea__textarea{transform:scale(0);resize:none;position:absolute;clip:rect(0 0 0 0);width:1px;height:1px;font-size:16px}.ML__fieldcontainer{display:flex;flex-flow:row;justify-content:space-between;align-items:flex-end;min-height:39px;touch-action:none;width:100%;--hue:212;--highlight:hsl(var(--hue),97%,85%);--caret:hsl(var(--hue),40%,49%);--highlight-inactive:#ccc;--primary:hsl(var(--hue),40%,50%);--secondary:hsl(var(--hue),19%,26%);--on-secondary:hsl(var(--hue),19%,26%)}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}}body[theme=dark] .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}.ML__fieldcontainer:focus{outline:2px solid var(--primary);outline-offset:3px}.ML__fieldcontainer__field{align-self:center;position:relative;overflow:hidden;line-height:0;padding:2px;width:100%}.ML__virtual-keyboard-toggle{display:flex;align-self:center;align-items:center;flex-shrink:0;flex-direction:column;justify-content:center;width:34px;height:34px;padding:0;margin-right:4px;cursor:pointer;box-sizing:border-box;border-radius:50%;border:1px solid transparent;transition:background .2s cubic-bezier(.64,.09,.08,1);color:var(--primary);fill:currentColor;background:transparent}.ML__virtual-keyboard-toggle:hover{background:hsl(var(--hue),25%,35%);color:#fafafa;fill:currentColor;border-radius:50%;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.ML__popover{visibility:hidden;min-width:160px;background-color:rgba(97,97,97,.95);color:#fff;text-align:center;border-radius:6px;position:fixed;z-index:1;display:flex;flex-direction:column;justify-content:center;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22);transition:all .2s cubic-bezier(.64,.09,.08,1)}.ML__popover:after{content:"";position:absolute;top:-5px;left:calc(50% - 3px);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;font-size:1rem;border-bottom:5px solid rgba(97,97,97,.9)}.reverse-direction:after{top:auto;bottom:-5px;border-top:5px solid rgba(97,97,97,.9);border-bottom:0}
1+
.ML__mathlive {
2+
line-height: 0;
3+
direction: ltr;
4+
text-align: left;
5+
text-indent: 0;
6+
text-rendering: auto;
7+
font-style: normal;
8+
font-size-adjust: none;
9+
letter-spacing: normal;
10+
word-wrap: normal;
11+
word-spacing: normal;
12+
white-space: nowrap;
13+
display: inline-block;
14+
text-shadow: none;
15+
user-select: none;
16+
width: min-content;
17+
transform: translateZ(0);
18+
}
19+
.ML__base {
20+
display: inline-block;
21+
position: relative;
22+
cursor: text;
23+
}
24+
.ML__strut,
25+
.ML__strut--bottom {
26+
display: inline-block;
27+
min-height: 1em;
28+
}
29+
.ML__caret:after {
30+
content: '';
31+
border: none;
32+
border-radius: 2px;
33+
border-right: 2px solid var(--caret);
34+
margin-right: -2px;
35+
position: relative;
36+
left: -1px;
37+
animation: ML__caret-blink 1.05s step-end forwards infinite;
38+
}
39+
.ML__text-caret:after {
40+
content: '';
41+
border: none;
42+
border-radius: 1px;
43+
border-right: 1px solid var(--caret);
44+
margin-right: -1px;
45+
position: relative;
46+
left: 0;
47+
animation: ML__caret-blink 1.05s step-end forwards infinite;
48+
}
49+
.ML__command-caret:after {
50+
content: '_';
51+
border: none;
52+
margin-right: 0;
53+
margin-right: -1ex;
54+
position: relative;
55+
color: var(--caret);
56+
animation: ML__caret-blink 1.05s step-end forwards infinite;
57+
}
58+
/* Text mode */
59+
.ML__text {
60+
white-space: pre;
61+
}
62+
.ML__focused .ML__text {
63+
background: hsla(var(--hue), 40%, 50%, 0.1);
64+
}
65+
@keyframes ML__caret-blink {
66+
from,
67+
to {
68+
opacity: 1;
69+
}
70+
50% {
71+
opacity: 0;
72+
}
73+
}
74+
/* Style for the invisible textarea element which is used
75+
to capture keyboard events. We're just trying really hard
76+
to make sure it doesn't show. */
77+
.ML__textarea__textarea {
78+
transform: scale(0);
79+
resize: none;
80+
/* user-select: text; Not sure it's needed */
81+
/* Need these for Microsoft Edge */
82+
position: absolute;
83+
clip: rect(0 0 0 0);
84+
width: 1px;
85+
height: 1px;
86+
/*-ms-transform: scale(0);*/
87+
/* Need this to prevent iOS Safari from auto-zooming */
88+
font-size: 16px;
89+
}
90+
.ML__fieldcontainer {
91+
display: flex;
92+
flex-flow: row;
93+
justify-content: space-between;
94+
align-items: flex-end;
95+
min-height: 39px;
96+
/* Need some room for the virtual keyboard toggle */
97+
/* Prevent the browser from trying to interpret touch gestures in the field */
98+
/* "Disabling double-tap to zoom removes the need for browsers to
99+
delay the generation of click events when the user taps the screen." */
100+
touch-action: none;
101+
width: 100%;
102+
--hue: 212;
103+
--highlight: hsl(var(--hue), 97%, 85%);
104+
--caret: hsl(var(--hue), 40%, 49%);
105+
--highlight-inactive: #ccc;
106+
--primary: hsl(var(--hue), 40%, 50%);
107+
--secondary: hsl(var(--hue), 19%, 26%);
108+
--on-secondary: hsl(var(--hue), 19%, 26%);
109+
}
110+
@media (prefers-color-scheme: dark) {
111+
body:not([theme='light']) .ML__fieldcontainer {
112+
--highlight: hsl(var(--hue), 40%, 49%);
113+
--highlight-inactive: hsl(var(--hue), 10%, 35%);
114+
--caret: hsl(var(--hue), 97%, 85%);
115+
--secondary: hsl(var(--hue), 25%, 35%);
116+
--on-secondary: hsl(0, 0%, 98%);
117+
}
118+
}
119+
body[theme='dark'] .ML__fieldcontainer {
120+
--highlight: hsl(var(--hue), 40%, 49%);
121+
--highlight-inactive: hsl(var(--hue), 10%, 35%);
122+
--caret: hsl(var(--hue), 97%, 85%);
123+
--secondary: hsl(var(--hue), 25%, 35%);
124+
--on-secondary: hsl(0, 0%, 98%);
125+
}
126+
.ML__fieldcontainer:focus {
127+
outline: 2px solid var(--primary);
128+
outline-offset: 3px;
129+
}
130+
/* This is the actual field content (formula) */
131+
.ML__fieldcontainer__field {
132+
align-self: center;
133+
position: relative;
134+
overflow: hidden;
135+
line-height: 0;
136+
padding: 2px;
137+
width: 100%;
138+
}
139+
.ML__virtual-keyboard-toggle {
140+
display: flex;
141+
align-self: center;
142+
align-items: center;
143+
flex-shrink: 0;
144+
flex-direction: column;
145+
justify-content: center;
146+
width: 34px;
147+
height: 34px;
148+
padding: 0;
149+
margin-right: 4px;
150+
cursor: pointer;
151+
box-sizing: border-box;
152+
/* Avoid some weird blinking with :hover */
153+
border-radius: 50%;
154+
border: 1px solid transparent;
155+
transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
156+
color: var(--primary);
157+
fill: currentColor;
158+
background: transparent;
159+
}
160+
.ML__virtual-keyboard-toggle:hover {
161+
background: hsl(var(--hue), 25%, 35%);
162+
color: hsl(0, 0%, 98%);
163+
fill: currentColor;
164+
border-radius: 50%;
165+
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
166+
}
167+
/* The element that display info while in command mode */
168+
.ML__popover {
169+
visibility: hidden;
170+
min-width: 160px;
171+
background-color: rgba(97, 97, 97, 0.95);
172+
color: #fff;
173+
text-align: center;
174+
border-radius: 6px;
175+
position: fixed;
176+
z-index: 1;
177+
display: flex;
178+
flex-direction: column;
179+
justify-content: center;
180+
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
181+
transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
182+
/* The 'tip' of the popover panel */
183+
}
184+
.ML__popover::after {
185+
content: '';
186+
position: absolute;
187+
top: -5px;
188+
left: calc(50% - 3px);
189+
width: 0;
190+
height: 0;
191+
border-left: 5px solid transparent;
192+
border-right: 5px solid transparent;
193+
font-size: 1rem;
194+
border-bottom: 5px solid rgba(97, 97, 97, 0.9);
195+
}
196+
.reverse-direction::after {
197+
top: auto;
198+
bottom: -5px;
199+
border-top: 5px solid rgba(97, 97, 97, 0.9);
200+
border-bottom: 0;
201+
}

dist/mathlive.css

+2,173-1
Large diffs are not rendered by default.

dist/mathlive.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* v0.50.4-0-g72e4e1b *//**
1+
/**
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.4-0-g72e4e1b
18-
* @version v0.50.4-0-g72e4e1b
17+
* @packageDocumentation MathLive SDK Reference {{GIT_VERSION}}
18+
* @version {{GIT_VERSION}}
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.4-0-g72e4e1b`
37+
* Current version: `{{GIT_VERSION}}`
3838
*
3939
*/
4040
export declare const version: string;

dist/mathlive.js

-2
This file was deleted.

dist/mathlive.mjs

+28,693-2
Large diffs are not rendered by default.

dist/mathlive.mjs.map

+1
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.4-0-g72e4e1b */import { Mathfield } from './mathfield';
1+
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.4-0-g72e4e1b */import { ParseMode } from './core';
1+
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.4-0-g72e4e1b *//**
1+
/**
22
* @internal
33
*/
44
declare type Filter<T, Cond, U extends keyof T = keyof T> = {

dist/vue-mathlive.mjs

-2
This file was deleted.

0 commit comments

Comments
 (0)