mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Prebuilt module for commit ab481a497b
This commit is contained in:
parent
3ef570e9d0
commit
5edb0ef911
6 changed files with 73 additions and 43 deletions
47
dist/docs/assets/js/paper.js
vendored
47
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat May 23 16:24:30 2020 +0200
|
||||
* Date: Sat May 23 20:53:04 2020 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -17054,20 +17054,7 @@ Base.exports.PaperScript = function() {
|
|||
code = code.substring(0, start) + str + code.substring(end);
|
||||
}
|
||||
|
||||
function walkAST(node, parent) {
|
||||
if (!node)
|
||||
return;
|
||||
for (var key in node) {
|
||||
if (key === 'range' || key === 'loc')
|
||||
continue;
|
||||
var value = node[key];
|
||||
if (Array.isArray(value)) {
|
||||
for (var i = 0, l = value.length; i < l; i++)
|
||||
walkAST(value[i], node);
|
||||
} else if (value && typeof value === 'object') {
|
||||
walkAST(value, node);
|
||||
}
|
||||
}
|
||||
function handleOverloading(node, parent) {
|
||||
switch (node.type) {
|
||||
case 'UnaryExpression':
|
||||
if (node.operator in unaryOperators
|
||||
|
@ -17129,6 +17116,11 @@ Base.exports.PaperScript = function() {
|
|||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function handleExports(node) {
|
||||
switch (node.type) {
|
||||
case 'ExportDefaultDeclaration':
|
||||
replaceCode({
|
||||
range: [node.start, node.declaration.start]
|
||||
|
@ -17163,6 +17155,29 @@ Base.exports.PaperScript = function() {
|
|||
}
|
||||
}
|
||||
|
||||
function walkAST(node, parent, paperFeatures) {
|
||||
if (node) {
|
||||
for (var key in node) {
|
||||
if (key !== 'range' && key !== 'loc') {
|
||||
var value = node[key];
|
||||
if (Array.isArray(value)) {
|
||||
for (var i = 0, l = value.length; i < l; i++) {
|
||||
walkAST(value[i], node, paperFeatures);
|
||||
}
|
||||
} else if (value && typeof value === 'object') {
|
||||
walkAST(value, node, paperFeatures);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (paperFeatures.operatorOverloading !== false) {
|
||||
handleOverloading(node, parent);
|
||||
}
|
||||
if (paperFeatures.moduleExports !== false) {
|
||||
handleExports(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function encodeVLQ(value) {
|
||||
var res = '',
|
||||
base64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||||
|
@ -17221,7 +17236,7 @@ Base.exports.PaperScript = function() {
|
|||
ranges: true,
|
||||
preserveParens: true,
|
||||
sourceType: 'module'
|
||||
}));
|
||||
}), null, paperFeatures);
|
||||
}
|
||||
if (map) {
|
||||
if (offsetCode) {
|
||||
|
|
2
dist/paper-core.js
vendored
2
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat May 23 16:24:30 2020 +0200
|
||||
* Date: Sat May 23 20:53:04 2020 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
|
2
dist/paper-core.min.js
vendored
2
dist/paper-core.min.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat May 23 16:24:30 2020 +0200
|
||||
* Date: Sat May 23 20:53:04 2020 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
|
47
dist/paper-full.js
vendored
47
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat May 23 16:24:30 2020 +0200
|
||||
* Date: Sat May 23 20:53:04 2020 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -17054,20 +17054,7 @@ Base.exports.PaperScript = function() {
|
|||
code = code.substring(0, start) + str + code.substring(end);
|
||||
}
|
||||
|
||||
function walkAST(node, parent) {
|
||||
if (!node)
|
||||
return;
|
||||
for (var key in node) {
|
||||
if (key === 'range' || key === 'loc')
|
||||
continue;
|
||||
var value = node[key];
|
||||
if (Array.isArray(value)) {
|
||||
for (var i = 0, l = value.length; i < l; i++)
|
||||
walkAST(value[i], node);
|
||||
} else if (value && typeof value === 'object') {
|
||||
walkAST(value, node);
|
||||
}
|
||||
}
|
||||
function handleOverloading(node, parent) {
|
||||
switch (node.type) {
|
||||
case 'UnaryExpression':
|
||||
if (node.operator in unaryOperators
|
||||
|
@ -17129,6 +17116,11 @@ Base.exports.PaperScript = function() {
|
|||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function handleExports(node) {
|
||||
switch (node.type) {
|
||||
case 'ExportDefaultDeclaration':
|
||||
replaceCode({
|
||||
range: [node.start, node.declaration.start]
|
||||
|
@ -17163,6 +17155,29 @@ Base.exports.PaperScript = function() {
|
|||
}
|
||||
}
|
||||
|
||||
function walkAST(node, parent, paperFeatures) {
|
||||
if (node) {
|
||||
for (var key in node) {
|
||||
if (key !== 'range' && key !== 'loc') {
|
||||
var value = node[key];
|
||||
if (Array.isArray(value)) {
|
||||
for (var i = 0, l = value.length; i < l; i++) {
|
||||
walkAST(value[i], node, paperFeatures);
|
||||
}
|
||||
} else if (value && typeof value === 'object') {
|
||||
walkAST(value, node, paperFeatures);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (paperFeatures.operatorOverloading !== false) {
|
||||
handleOverloading(node, parent);
|
||||
}
|
||||
if (paperFeatures.moduleExports !== false) {
|
||||
handleExports(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function encodeVLQ(value) {
|
||||
var res = '',
|
||||
base64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||||
|
@ -17221,7 +17236,7 @@ Base.exports.PaperScript = function() {
|
|||
ranges: true,
|
||||
preserveParens: true,
|
||||
sourceType: 'module'
|
||||
}));
|
||||
}), null, paperFeatures);
|
||||
}
|
||||
if (map) {
|
||||
if (offsetCode) {
|
||||
|
|
16
dist/paper-full.min.js
vendored
16
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/paper.d.ts
vendored
2
dist/paper.d.ts
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat May 23 16:24:30 2020 +0200
|
||||
* Date: Sat May 23 20:53:04 2020 +0200
|
||||
*
|
||||
* This is an auto-generated type definition.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue