add lisp packages
This commit is contained in:
193
lisp/emacs-application-framework/app/mermaid/node_modules/d3-axis/dist/d3-axis.js
generated
vendored
Normal file
193
lisp/emacs-application-framework/app/mermaid/node_modules/d3-axis/dist/d3-axis.js
generated
vendored
Normal file
@@ -0,0 +1,193 @@
|
||||
// https://d3js.org/d3-axis/ v1.0.12 Copyright 2018 Mike Bostock
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(factory((global.d3 = global.d3 || {})));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
var slice = Array.prototype.slice;
|
||||
|
||||
function identity(x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
var top = 1,
|
||||
right = 2,
|
||||
bottom = 3,
|
||||
left = 4,
|
||||
epsilon = 1e-6;
|
||||
|
||||
function translateX(x) {
|
||||
return "translate(" + (x + 0.5) + ",0)";
|
||||
}
|
||||
|
||||
function translateY(y) {
|
||||
return "translate(0," + (y + 0.5) + ")";
|
||||
}
|
||||
|
||||
function number(scale) {
|
||||
return function(d) {
|
||||
return +scale(d);
|
||||
};
|
||||
}
|
||||
|
||||
function center(scale) {
|
||||
var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset.
|
||||
if (scale.round()) offset = Math.round(offset);
|
||||
return function(d) {
|
||||
return +scale(d) + offset;
|
||||
};
|
||||
}
|
||||
|
||||
function entering() {
|
||||
return !this.__axis;
|
||||
}
|
||||
|
||||
function axis(orient, scale) {
|
||||
var tickArguments = [],
|
||||
tickValues = null,
|
||||
tickFormat = null,
|
||||
tickSizeInner = 6,
|
||||
tickSizeOuter = 6,
|
||||
tickPadding = 3,
|
||||
k = orient === top || orient === left ? -1 : 1,
|
||||
x = orient === left || orient === right ? "x" : "y",
|
||||
transform = orient === top || orient === bottom ? translateX : translateY;
|
||||
|
||||
function axis(context) {
|
||||
var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,
|
||||
format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,
|
||||
spacing = Math.max(tickSizeInner, 0) + tickPadding,
|
||||
range = scale.range(),
|
||||
range0 = +range[0] + 0.5,
|
||||
range1 = +range[range.length - 1] + 0.5,
|
||||
position = (scale.bandwidth ? center : number)(scale.copy()),
|
||||
selection = context.selection ? context.selection() : context,
|
||||
path = selection.selectAll(".domain").data([null]),
|
||||
tick = selection.selectAll(".tick").data(values, scale).order(),
|
||||
tickExit = tick.exit(),
|
||||
tickEnter = tick.enter().append("g").attr("class", "tick"),
|
||||
line = tick.select("line"),
|
||||
text = tick.select("text");
|
||||
|
||||
path = path.merge(path.enter().insert("path", ".tick")
|
||||
.attr("class", "domain")
|
||||
.attr("stroke", "currentColor"));
|
||||
|
||||
tick = tick.merge(tickEnter);
|
||||
|
||||
line = line.merge(tickEnter.append("line")
|
||||
.attr("stroke", "currentColor")
|
||||
.attr(x + "2", k * tickSizeInner));
|
||||
|
||||
text = text.merge(tickEnter.append("text")
|
||||
.attr("fill", "currentColor")
|
||||
.attr(x, k * spacing)
|
||||
.attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em"));
|
||||
|
||||
if (context !== selection) {
|
||||
path = path.transition(context);
|
||||
tick = tick.transition(context);
|
||||
line = line.transition(context);
|
||||
text = text.transition(context);
|
||||
|
||||
tickExit = tickExit.transition(context)
|
||||
.attr("opacity", epsilon)
|
||||
.attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute("transform"); });
|
||||
|
||||
tickEnter
|
||||
.attr("opacity", epsilon)
|
||||
.attr("transform", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); });
|
||||
}
|
||||
|
||||
tickExit.remove();
|
||||
|
||||
path
|
||||
.attr("d", orient === left || orient == right
|
||||
? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter : "M0.5," + range0 + "V" + range1)
|
||||
: (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + ",0.5H" + range1));
|
||||
|
||||
tick
|
||||
.attr("opacity", 1)
|
||||
.attr("transform", function(d) { return transform(position(d)); });
|
||||
|
||||
line
|
||||
.attr(x + "2", k * tickSizeInner);
|
||||
|
||||
text
|
||||
.attr(x, k * spacing)
|
||||
.text(format);
|
||||
|
||||
selection.filter(entering)
|
||||
.attr("fill", "none")
|
||||
.attr("font-size", 10)
|
||||
.attr("font-family", "sans-serif")
|
||||
.attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle");
|
||||
|
||||
selection
|
||||
.each(function() { this.__axis = position; });
|
||||
}
|
||||
|
||||
axis.scale = function(_) {
|
||||
return arguments.length ? (scale = _, axis) : scale;
|
||||
};
|
||||
|
||||
axis.ticks = function() {
|
||||
return tickArguments = slice.call(arguments), axis;
|
||||
};
|
||||
|
||||
axis.tickArguments = function(_) {
|
||||
return arguments.length ? (tickArguments = _ == null ? [] : slice.call(_), axis) : tickArguments.slice();
|
||||
};
|
||||
|
||||
axis.tickValues = function(_) {
|
||||
return arguments.length ? (tickValues = _ == null ? null : slice.call(_), axis) : tickValues && tickValues.slice();
|
||||
};
|
||||
|
||||
axis.tickFormat = function(_) {
|
||||
return arguments.length ? (tickFormat = _, axis) : tickFormat;
|
||||
};
|
||||
|
||||
axis.tickSize = function(_) {
|
||||
return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;
|
||||
};
|
||||
|
||||
axis.tickSizeInner = function(_) {
|
||||
return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;
|
||||
};
|
||||
|
||||
axis.tickSizeOuter = function(_) {
|
||||
return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;
|
||||
};
|
||||
|
||||
axis.tickPadding = function(_) {
|
||||
return arguments.length ? (tickPadding = +_, axis) : tickPadding;
|
||||
};
|
||||
|
||||
return axis;
|
||||
}
|
||||
|
||||
function axisTop(scale) {
|
||||
return axis(top, scale);
|
||||
}
|
||||
|
||||
function axisRight(scale) {
|
||||
return axis(right, scale);
|
||||
}
|
||||
|
||||
function axisBottom(scale) {
|
||||
return axis(bottom, scale);
|
||||
}
|
||||
|
||||
function axisLeft(scale) {
|
||||
return axis(left, scale);
|
||||
}
|
||||
|
||||
exports.axisTop = axisTop;
|
||||
exports.axisRight = axisRight;
|
||||
exports.axisBottom = axisBottom;
|
||||
exports.axisLeft = axisLeft;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
2
lisp/emacs-application-framework/app/mermaid/node_modules/d3-axis/dist/d3-axis.min.js
generated
vendored
Normal file
2
lisp/emacs-application-framework/app/mermaid/node_modules/d3-axis/dist/d3-axis.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
// https://d3js.org/d3-axis/ v1.0.12 Copyright 2018 Mike Bostock
|
||||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,function(t){"use strict";var n=Array.prototype.slice;function r(t){return t}var e=1,i=2,a=3,o=4,u=1e-6;function c(t){return"translate("+(t+.5)+",0)"}function l(t){return"translate(0,"+(t+.5)+")"}function s(){return!this.__axis}function f(t,f){var d=[],m=null,p=null,h=6,g=6,x=3,k=t===e||t===o?-1:1,y=t===o||t===i?"x":"y",v=t===e||t===a?c:l;function M(n){var c=null==m?f.ticks?f.ticks.apply(f,d):f.domain():m,l=null==p?f.tickFormat?f.tickFormat.apply(f,d):r:p,M=Math.max(h,0)+x,_=f.range(),b=+_[0]+.5,A=+_[_.length-1]+.5,F=(f.bandwidth?function(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(r){return+t(r)+n}}:function(t){return function(n){return+t(n)}})(f.copy()),V=n.selection?n.selection():n,z=V.selectAll(".domain").data([null]),H=V.selectAll(".tick").data(c,f).order(),C=H.exit(),S=H.enter().append("g").attr("class","tick"),j=H.select("line"),w=H.select("text");z=z.merge(z.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),H=H.merge(S),j=j.merge(S.append("line").attr("stroke","currentColor").attr(y+"2",k*h)),w=w.merge(S.append("text").attr("fill","currentColor").attr(y,k*M).attr("dy",t===e?"0em":t===a?"0.71em":"0.32em")),n!==V&&(z=z.transition(n),H=H.transition(n),j=j.transition(n),w=w.transition(n),C=C.transition(n).attr("opacity",u).attr("transform",function(t){return isFinite(t=F(t))?v(t):this.getAttribute("transform")}),S.attr("opacity",u).attr("transform",function(t){var n=this.parentNode.__axis;return v(n&&isFinite(n=n(t))?n:F(t))})),C.remove(),z.attr("d",t===o||t==i?g?"M"+k*g+","+b+"H0.5V"+A+"H"+k*g:"M0.5,"+b+"V"+A:g?"M"+b+","+k*g+"V0.5H"+A+"V"+k*g:"M"+b+",0.5H"+A),H.attr("opacity",1).attr("transform",function(t){return v(F(t))}),j.attr(y+"2",k*h),w.attr(y,k*M).text(l),V.filter(s).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===i?"start":t===o?"end":"middle"),V.each(function(){this.__axis=F})}return M.scale=function(t){return arguments.length?(f=t,M):f},M.ticks=function(){return d=n.call(arguments),M},M.tickArguments=function(t){return arguments.length?(d=null==t?[]:n.call(t),M):d.slice()},M.tickValues=function(t){return arguments.length?(m=null==t?null:n.call(t),M):m&&m.slice()},M.tickFormat=function(t){return arguments.length?(p=t,M):p},M.tickSize=function(t){return arguments.length?(h=g=+t,M):h},M.tickSizeInner=function(t){return arguments.length?(h=+t,M):h},M.tickSizeOuter=function(t){return arguments.length?(g=+t,M):g},M.tickPadding=function(t){return arguments.length?(x=+t,M):x},M}t.axisTop=function(t){return f(e,t)},t.axisRight=function(t){return f(i,t)},t.axisBottom=function(t){return f(a,t)},t.axisLeft=function(t){return f(o,t)},Object.defineProperty(t,"__esModule",{value:!0})});
|
||||
Reference in New Issue
Block a user