Skip to content

Commit dedc823

Browse files
committed
deploy: dfc3d5c
1 parent 01145e2 commit dedc823

File tree

280 files changed

+22141
-20386
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

280 files changed

+22141
-20386
lines changed

CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ssg-site.servicestack.netssg-site.servicestack.netssg-site.servicestack.netssg-site.servicestack.netssg-site.servicestack.netssg-site.servicestack.netssg-site.servicestack.net
1+
ssg-site.servicestack.netssg-site.servicestack.netssg-site.servicestack.netssg-site.servicestack.netssg-site.servicestack.netssg-site.servicestack.netssg-site.servicestack.netssg-site.servicestack.net

auto-ui.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"vue": "./lib/mjs/vue.min.mjs",
3030
"@servicestack/client": "./lib/mjs/servicestack-client.min.mjs",
3131
"@servicestack/vue": "./lib/mjs/servicestack-vue.min.mjs",
32-
"highlight.mjs": "./lib/mjs/highlight.mjs"
32+
"highlight.mjs": "./lib/mjs/highlight.mjs",
33+
"core": "./js/core.mjs"
3334
}
3435
}
3536
</script>

autoquery.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"vue": "./lib/mjs/vue.min.mjs",
3030
"@servicestack/client": "./lib/mjs/servicestack-client.min.mjs",
3131
"@servicestack/vue": "./lib/mjs/servicestack-vue.min.mjs",
32-
"highlight.mjs": "./lib/mjs/highlight.mjs"
32+
"highlight.mjs": "./lib/mjs/highlight.mjs",
33+
"core": "./js/core.mjs"
3334
}
3435
}
3536
</script>

blazor.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"vue": "./lib/mjs/vue.min.mjs",
3030
"@servicestack/client": "./lib/mjs/servicestack-client.min.mjs",
3131
"@servicestack/vue": "./lib/mjs/servicestack-vue.min.mjs",
32-
"highlight.mjs": "./lib/mjs/highlight.mjs"
32+
"highlight.mjs": "./lib/mjs/highlight.mjs",
33+
"core": "./js/core.mjs"
3334
}
3435
}
3536
</script>

blog.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"vue": "./lib/mjs/vue.min.mjs",
3030
"@servicestack/client": "./lib/mjs/servicestack-client.min.mjs",
3131
"@servicestack/vue": "./lib/mjs/servicestack-vue.min.mjs",
32-
"highlight.mjs": "./lib/mjs/highlight.mjs"
32+
"highlight.mjs": "./lib/mjs/highlight.mjs",
33+
"core": "./js/core.mjs"
3334
}
3435
}
3536
</script>

codemirror/addon/mode/loadmode.js

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
2+
// Distributed under an MIT license: https://codemirror.net/LICENSE
3+
4+
(function(mod) {
5+
if (typeof exports == "object" && typeof module == "object") // CommonJS
6+
mod(require("../../lib/codemirror"), "cjs");
7+
else if (typeof define == "function" && define.amd) // AMD
8+
define(["../../lib/codemirror"], function(CM) { mod(CM, "amd"); });
9+
else // Plain browser env
10+
mod(CodeMirror, "plain");
11+
})(function(CodeMirror, env) {
12+
if (!CodeMirror.modeURL) CodeMirror.modeURL = "../mode/%N/%N.js";
13+
14+
var loading = {};
15+
function splitCallback(cont, n) {
16+
var countDown = n;
17+
return function() { if (--countDown == 0) cont(); };
18+
}
19+
function ensureDeps(mode, cont, options) {
20+
var modeObj = CodeMirror.modes[mode], deps = modeObj && modeObj.dependencies;
21+
if (!deps) return cont();
22+
var missing = [];
23+
for (var i = 0; i < deps.length; ++i) {
24+
if (!CodeMirror.modes.hasOwnProperty(deps[i]))
25+
missing.push(deps[i]);
26+
}
27+
if (!missing.length) return cont();
28+
var split = splitCallback(cont, missing.length);
29+
for (var i = 0; i < missing.length; ++i)
30+
CodeMirror.requireMode(missing[i], split, options);
31+
}
32+
33+
CodeMirror.requireMode = function(mode, cont, options) {
34+
if (typeof mode != "string") mode = mode.name;
35+
if (CodeMirror.modes.hasOwnProperty(mode)) return ensureDeps(mode, cont, options);
36+
if (loading.hasOwnProperty(mode)) return loading[mode].push(cont);
37+
38+
var file = options && options.path ? options.path(mode) : CodeMirror.modeURL.replace(/%N/g, mode);
39+
if (options && options.loadMode) {
40+
options.loadMode(file, function() { ensureDeps(mode, cont, options) })
41+
} else if (env == "plain") {
42+
var script = document.createElement("script");
43+
script.src = file;
44+
var others = document.getElementsByTagName("script")[0];
45+
var list = loading[mode] = [cont];
46+
CodeMirror.on(script, "load", function() {
47+
ensureDeps(mode, function() {
48+
for (var i = 0; i < list.length; ++i) list[i]();
49+
}, options);
50+
});
51+
others.parentNode.insertBefore(script, others);
52+
} else if (env == "cjs") {
53+
require(file);
54+
cont();
55+
} else if (env == "amd") {
56+
requirejs([file], cont);
57+
}
58+
};
59+
60+
CodeMirror.autoLoadMode = function(instance, mode, options) {
61+
if (!CodeMirror.modes.hasOwnProperty(mode))
62+
CodeMirror.requireMode(mode, function() {
63+
instance.setOption("mode", instance.getOption("mode"));
64+
}, options);
65+
};
66+
});

codemirror/addon/mode/multiplex.js

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
2+
// Distributed under an MIT license: https://codemirror.net/LICENSE
3+
4+
(function(mod) {
5+
if (typeof exports == "object" && typeof module == "object") // CommonJS
6+
mod(require("../../lib/codemirror"));
7+
else if (typeof define == "function" && define.amd) // AMD
8+
define(["../../lib/codemirror"], mod);
9+
else // Plain browser env
10+
mod(CodeMirror);
11+
})(function(CodeMirror) {
12+
"use strict";
13+
14+
CodeMirror.multiplexingMode = function(outer /*, others */) {
15+
// Others should be {open, close, mode [, delimStyle] [, innerStyle]} objects
16+
var others = Array.prototype.slice.call(arguments, 1);
17+
18+
function indexOf(string, pattern, from, returnEnd) {
19+
if (typeof pattern == "string") {
20+
var found = string.indexOf(pattern, from);
21+
return returnEnd && found > -1 ? found + pattern.length : found;
22+
}
23+
var m = pattern.exec(from ? string.slice(from) : string);
24+
return m ? m.index + from + (returnEnd ? m[0].length : 0) : -1;
25+
}
26+
27+
return {
28+
startState: function() {
29+
return {
30+
outer: CodeMirror.startState(outer),
31+
innerActive: null,
32+
inner: null
33+
};
34+
},
35+
36+
copyState: function(state) {
37+
return {
38+
outer: CodeMirror.copyState(outer, state.outer),
39+
innerActive: state.innerActive,
40+
inner: state.innerActive && CodeMirror.copyState(state.innerActive.mode, state.inner)
41+
};
42+
},
43+
44+
token: function(stream, state) {
45+
if (!state.innerActive) {
46+
var cutOff = Infinity, oldContent = stream.string;
47+
for (var i = 0; i < others.length; ++i) {
48+
var other = others[i];
49+
var found = indexOf(oldContent, other.open, stream.pos);
50+
if (found == stream.pos) {
51+
if (!other.parseDelimiters) stream.match(other.open);
52+
state.innerActive = other;
53+
54+
// Get the outer indent, making sure to handle CodeMirror.Pass
55+
var outerIndent = 0;
56+
if (outer.indent) {
57+
var possibleOuterIndent = outer.indent(state.outer, "", "");
58+
if (possibleOuterIndent !== CodeMirror.Pass) outerIndent = possibleOuterIndent;
59+
}
60+
61+
state.inner = CodeMirror.startState(other.mode, outerIndent);
62+
return other.delimStyle && (other.delimStyle + " " + other.delimStyle + "-open");
63+
} else if (found != -1 && found < cutOff) {
64+
cutOff = found;
65+
}
66+
}
67+
if (cutOff != Infinity) stream.string = oldContent.slice(0, cutOff);
68+
var outerToken = outer.token(stream, state.outer);
69+
if (cutOff != Infinity) stream.string = oldContent;
70+
return outerToken;
71+
} else {
72+
var curInner = state.innerActive, oldContent = stream.string;
73+
if (!curInner.close && stream.sol()) {
74+
state.innerActive = state.inner = null;
75+
return this.token(stream, state);
76+
}
77+
var found = curInner.close ? indexOf(oldContent, curInner.close, stream.pos, curInner.parseDelimiters) : -1;
78+
if (found == stream.pos && !curInner.parseDelimiters) {
79+
stream.match(curInner.close);
80+
state.innerActive = state.inner = null;
81+
return curInner.delimStyle && (curInner.delimStyle + " " + curInner.delimStyle + "-close");
82+
}
83+
if (found > -1) stream.string = oldContent.slice(0, found);
84+
var innerToken = curInner.mode.token(stream, state.inner);
85+
if (found > -1) stream.string = oldContent;
86+
87+
if (found == stream.pos && curInner.parseDelimiters)
88+
state.innerActive = state.inner = null;
89+
90+
if (curInner.innerStyle) {
91+
if (innerToken) innerToken = innerToken + " " + curInner.innerStyle;
92+
else innerToken = curInner.innerStyle;
93+
}
94+
95+
return innerToken;
96+
}
97+
},
98+
99+
indent: function(state, textAfter, line) {
100+
var mode = state.innerActive ? state.innerActive.mode : outer;
101+
if (!mode.indent) return CodeMirror.Pass;
102+
return mode.indent(state.innerActive ? state.inner : state.outer, textAfter, line);
103+
},
104+
105+
blankLine: function(state) {
106+
var mode = state.innerActive ? state.innerActive.mode : outer;
107+
if (mode.blankLine) {
108+
mode.blankLine(state.innerActive ? state.inner : state.outer);
109+
}
110+
if (!state.innerActive) {
111+
for (var i = 0; i < others.length; ++i) {
112+
var other = others[i];
113+
if (other.open === "\n") {
114+
state.innerActive = other;
115+
state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, "", "") : 0);
116+
}
117+
}
118+
} else if (state.innerActive.close === "\n") {
119+
state.innerActive = state.inner = null;
120+
}
121+
},
122+
123+
electricChars: outer.electricChars,
124+
125+
innerMode: function(state) {
126+
return state.inner ? {state: state.inner, mode: state.innerActive.mode} : {state: state.outer, mode: outer};
127+
}
128+
};
129+
};
130+
131+
});
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
2+
// Distributed under an MIT license: https://codemirror.net/LICENSE
3+
4+
(function() {
5+
CodeMirror.defineMode("markdown_with_stex", function(){
6+
var inner = CodeMirror.getMode({}, "stex");
7+
var outer = CodeMirror.getMode({}, "markdown");
8+
9+
var innerOptions = {
10+
open: '$',
11+
close: '$',
12+
mode: inner,
13+
delimStyle: 'delim',
14+
innerStyle: 'inner'
15+
};
16+
17+
return CodeMirror.multiplexingMode(outer, innerOptions);
18+
});
19+
20+
var mode = CodeMirror.getMode({}, "markdown_with_stex");
21+
22+
function MT(name) {
23+
test.mode(
24+
name,
25+
mode,
26+
Array.prototype.slice.call(arguments, 1),
27+
'multiplexing');
28+
}
29+
30+
MT(
31+
"stexInsideMarkdown",
32+
"[strong **Equation:**] [delim&delim-open $][inner&tag \\pi][delim&delim-close $]");
33+
})();

codemirror/addon/mode/overlay.js

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
2+
// Distributed under an MIT license: https://codemirror.net/LICENSE
3+
4+
// Utility function that allows modes to be combined. The mode given
5+
// as the base argument takes care of most of the normal mode
6+
// functionality, but a second (typically simple) mode is used, which
7+
// can override the style of text. Both modes get to parse all of the
8+
// text, but when both assign a non-null style to a piece of code, the
9+
// overlay wins, unless the combine argument was true and not overridden,
10+
// or state.overlay.combineTokens was true, in which case the styles are
11+
// combined.
12+
13+
(function(mod) {
14+
if (typeof exports == "object" && typeof module == "object") // CommonJS
15+
mod(require("../../lib/codemirror"));
16+
else if (typeof define == "function" && define.amd) // AMD
17+
define(["../../lib/codemirror"], mod);
18+
else // Plain browser env
19+
mod(CodeMirror);
20+
})(function(CodeMirror) {
21+
"use strict";
22+
23+
CodeMirror.overlayMode = function(base, overlay, combine) {
24+
return {
25+
startState: function() {
26+
return {
27+
base: CodeMirror.startState(base),
28+
overlay: CodeMirror.startState(overlay),
29+
basePos: 0, baseCur: null,
30+
overlayPos: 0, overlayCur: null,
31+
streamSeen: null
32+
};
33+
},
34+
copyState: function(state) {
35+
return {
36+
base: CodeMirror.copyState(base, state.base),
37+
overlay: CodeMirror.copyState(overlay, state.overlay),
38+
basePos: state.basePos, baseCur: null,
39+
overlayPos: state.overlayPos, overlayCur: null
40+
};
41+
},
42+
43+
token: function(stream, state) {
44+
if (stream != state.streamSeen ||
45+
Math.min(state.basePos, state.overlayPos) < stream.start) {
46+
state.streamSeen = stream;
47+
state.basePos = state.overlayPos = stream.start;
48+
}
49+
50+
if (stream.start == state.basePos) {
51+
state.baseCur = base.token(stream, state.base);
52+
state.basePos = stream.pos;
53+
}
54+
if (stream.start == state.overlayPos) {
55+
stream.pos = stream.start;
56+
state.overlayCur = overlay.token(stream, state.overlay);
57+
state.overlayPos = stream.pos;
58+
}
59+
stream.pos = Math.min(state.basePos, state.overlayPos);
60+
61+
// state.overlay.combineTokens always takes precedence over combine,
62+
// unless set to null
63+
if (state.overlayCur == null) return state.baseCur;
64+
else if (state.baseCur != null &&
65+
state.overlay.combineTokens ||
66+
combine && state.overlay.combineTokens == null)
67+
return state.baseCur + " " + state.overlayCur;
68+
else return state.overlayCur;
69+
},
70+
71+
indent: base.indent && function(state, textAfter, line) {
72+
return base.indent(state.base, textAfter, line);
73+
},
74+
electricChars: base.electricChars,
75+
76+
innerMode: function(state) { return {state: state.base, mode: base}; },
77+
78+
blankLine: function(state) {
79+
var baseToken, overlayToken;
80+
if (base.blankLine) baseToken = base.blankLine(state.base);
81+
if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay);
82+
83+
return overlayToken == null ?
84+
baseToken :
85+
(combine && baseToken != null ? baseToken + " " + overlayToken : overlayToken);
86+
}
87+
};
88+
};
89+
90+
});

0 commit comments

Comments
 (0)