08-27-周三_17-09-29

This commit is contained in:
2025-08-27 17:10:05 +08:00
commit 86df397d8f
12735 changed files with 1145479 additions and 0 deletions

2
node_modules/gitbook-plugin-mermaid-gb3/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,2 @@
bower_components/
node_modules/

31
node_modules/gitbook-plugin-mermaid-gb3/README.md generated vendored Normal file
View File

@@ -0,0 +1,31 @@
## Mermaid plugin for GitBook
Plugin for [GitBook](https://github.com/GitbookIO/gitbook) 3 which renders [Mermaid](https://github.com/knsv/mermaid) diagrams and flow charts detected in the book markdown.
### How to install it?
You can use install via **NPM**:
```
$ npm install gitbook-plugin-mermaid-gb3
```
And use it for your book with in the book.json:
```
{
"plugins": ["mermaid-gb3"]
}
```
### How to use it?
Just put the code into fenced code block and tag it **mermaid** key word like this:
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```

View File

@@ -0,0 +1,16 @@
{% extends template.self %}
{% block style %}
{{ super() }}
{% if config.pluginsConfig['mermaid-gb3'].theme %}
{% set mermaidAsset = 'gitbook-plugin-mermaid-gb3/mermaid/mermaid.' %}
{% set mermaidTheme = mermaidAsset + config.pluginsConfig['mermaid-gb3'].theme + '.css' %}
<link rel="stylesheet" href="{{ mermaidTheme|resolveAsset }}" />
{% endif %}
{% endblock %}
{% block javascript %}
{{ super() }}
<script src="{{ "gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"|resolveAsset }}"></script>
{% endblock %}

View File

@@ -0,0 +1,7 @@
require([
'gitbook'
], function (gitbook) {
gitbook.events.bind('page.change', function () {
mermaid.init();
});
});

View File

@@ -0,0 +1,7 @@
require([
'gitbook'
], function (gitbook) {
gitbook.events.bind('page.change', function () {
mermaid.init();
});
});

View File

@@ -0,0 +1,351 @@
/* Flowchart variables */
/* Sequence Diagram variables */
/* Gantt chart variables */
.mermaid .label {
color: #333;
}
.node rect,
.node circle,
.node ellipse,
.node polygon {
fill: #ECECFF;
stroke: #CCCCFF;
stroke-width: 1px;
}
.arrowheadPath {
fill: #333333;
}
.edgePath .path {
stroke: #333333;
}
.edgeLabel {
background-color: #e8e8e8;
}
.cluster rect {
fill: #ffffde !important;
rx: 4 !important;
stroke: #aaaa33 !important;
stroke-width: 1px !important;
}
.cluster text {
fill: #333;
}
.actor {
stroke: #CCCCFF;
fill: #ECECFF;
}
text.actor {
fill: black;
stroke: none;
}
.actor-line {
stroke: grey;
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: "2 2";
marker-end: "url(#arrowhead)";
stroke: #333;
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: "2 2";
stroke: #333;
}
#arrowhead {
fill: #333;
}
#crosshead path {
fill: #333 !important;
stroke: #333 !important;
}
.messageText {
fill: #333;
stroke: none;
}
.labelBox {
stroke: #CCCCFF;
fill: #ECECFF;
}
.labelText {
fill: black;
stroke: none;
}
.loopText {
fill: black;
stroke: none;
}
.loopLine {
stroke-width: 2;
stroke-dasharray: "2 2";
marker-end: "url(#arrowhead)";
stroke: #CCCCFF;
}
.note {
stroke: #aaaa33;
fill: #fff5ad;
}
.noteText {
fill: black;
stroke: none;
font-family: 'trebuchet ms', verdana, arial;
font-size: 14px;
}
/** Section styling */
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: rgba(102, 102, 255, 0.49);
}
.section2 {
fill: #fff400;
}
.section1,
.section3 {
fill: white;
opacity: 0.2;
}
.sectionTitle0 {
fill: #333;
}
.sectionTitle1 {
fill: #333;
}
.sectionTitle2 {
fill: #333;
}
.sectionTitle3 {
fill: #333;
}
.sectionTitle {
text-anchor: start;
font-size: 11px;
text-height: 14px;
}
/* Grid and axis */
.grid .tick {
stroke: lightgrey;
opacity: 0.3;
shape-rendering: crispEdges;
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: red;
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-size: 11px;
}
.taskTextOutsideRight {
fill: black;
text-anchor: start;
font-size: 11px;
}
.taskTextOutsideLeft {
fill: black;
text-anchor: end;
font-size: 11px;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: white;
}
.task0,
.task1,
.task2,
.task3 {
fill: #8a90dd;
stroke: #534fbc;
}
.taskTextOutside0,
.taskTextOutside2 {
fill: black;
}
.taskTextOutside1,
.taskTextOutside3 {
fill: black;
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: #bfc7ff;
stroke: #534fbc;
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: black !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: grey;
fill: lightgrey;
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: black !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: #ff8888;
fill: red;
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: #ff8888;
fill: #bfc7ff;
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: #ff8888;
fill: lightgrey;
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: black !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: black !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: black;
}
g.classGroup text {
fill: #9370DB;
stroke: none;
font-family: 'trebuchet ms', verdana, arial;
font-size: 10px;
}
g.classGroup rect {
fill: #ECECFF;
stroke: #9370DB;
}
g.classGroup line {
stroke: #9370DB;
stroke-width: 1;
}
svg .classLabel .box {
stroke: none;
stroke-width: 0;
fill: #ECECFF;
opacity: 0.5;
}
svg .classLabel .label {
fill: #9370DB;
font-size: 10px;
}
.relation {
stroke: #9370DB;
stroke-width: 1;
fill: none;
}
.composition {
fill: #9370DB;
stroke: #9370DB;
stroke-width: 1;
}
#compositionStart {
fill: #9370DB;
stroke: #9370DB;
stroke-width: 1;
}
#compositionEnd {
fill: #9370DB;
stroke: #9370DB;
stroke-width: 1;
}
.aggregation {
fill: #ECECFF;
stroke: #9370DB;
stroke-width: 1;
}
#aggregationStart {
fill: #ECECFF;
stroke: #9370DB;
stroke-width: 1;
}
#aggregationEnd {
fill: #ECECFF;
stroke: #9370DB;
stroke-width: 1;
}
#dependencyStart {
fill: #9370DB;
stroke: #9370DB;
stroke-width: 1;
}
#dependencyEnd {
fill: #9370DB;
stroke: #9370DB;
stroke-width: 1;
}
#extensionStart {
fill: #9370DB;
stroke: #9370DB;
stroke-width: 1;
}
#extensionEnd {
fill: #9370DB;
stroke: #9370DB;
stroke-width: 1;
}
.node text {
font-family: 'trebuchet ms', verdana, arial;
font-size: 14px;
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial;
font-size: 12px;
background: #ffffde;
border: 1px solid #aaaa33;
border-radius: 2px;
pointer-events: none;
z-index: 100;
}

View File

@@ -0,0 +1,353 @@
/* Flowchart variables */
/* Sequence Diagram variables */
/* Gantt chart variables */
.mermaid .label {
font-family: 'trebuchet ms', verdana, arial;
color: #333;
}
.node rect,
.node circle,
.node ellipse,
.node polygon {
fill: #cde498;
stroke: #13540c;
stroke-width: 1px;
}
.arrowheadPath {
fill: green;
}
.edgePath .path {
stroke: green;
stroke-width: 1.5px;
}
.edgeLabel {
background-color: #e8e8e8;
}
.cluster rect {
fill: #cdffb2 !important;
rx: 4 !important;
stroke: #6eaa49 !important;
stroke-width: 1px !important;
}
.cluster text {
fill: #333;
}
.actor {
stroke: #13540c;
fill: #cde498;
}
text.actor {
fill: black;
stroke: none;
}
.actor-line {
stroke: grey;
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: "2 2";
marker-end: "url(#arrowhead)";
stroke: #333;
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: "2 2";
stroke: #333;
}
#arrowhead {
fill: #333;
}
#crosshead path {
fill: #333 !important;
stroke: #333 !important;
}
.messageText {
fill: #333;
stroke: none;
}
.labelBox {
stroke: #326932;
fill: #cde498;
}
.labelText {
fill: black;
stroke: none;
}
.loopText {
fill: black;
stroke: none;
}
.loopLine {
stroke-width: 2;
stroke-dasharray: "2 2";
marker-end: "url(#arrowhead)";
stroke: #326932;
}
.note {
stroke: #6eaa49;
fill: #fff5ad;
}
.noteText {
fill: black;
stroke: none;
font-family: 'trebuchet ms', verdana, arial;
font-size: 14px;
}
/** Section styling */
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: #6eaa49;
}
.section2 {
fill: #6eaa49;
}
.section1,
.section3 {
fill: white;
opacity: 0.2;
}
.sectionTitle0 {
fill: #333;
}
.sectionTitle1 {
fill: #333;
}
.sectionTitle2 {
fill: #333;
}
.sectionTitle3 {
fill: #333;
}
.sectionTitle {
text-anchor: start;
font-size: 11px;
text-height: 14px;
}
/* Grid and axis */
.grid .tick {
stroke: lightgrey;
opacity: 0.3;
shape-rendering: crispEdges;
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: red;
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-size: 11px;
}
.taskTextOutsideRight {
fill: black;
text-anchor: start;
font-size: 11px;
}
.taskTextOutsideLeft {
fill: black;
text-anchor: end;
font-size: 11px;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: white;
}
.task0,
.task1,
.task2,
.task3 {
fill: #487e3a;
stroke: #13540c;
}
.taskTextOutside0,
.taskTextOutside2 {
fill: black;
}
.taskTextOutside1,
.taskTextOutside3 {
fill: black;
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: #cde498;
stroke: #13540c;
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: black !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: grey;
fill: lightgrey;
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: black !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: #ff8888;
fill: red;
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: #ff8888;
fill: #cde498;
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: #ff8888;
fill: lightgrey;
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: black !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: black !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: black;
}
g.classGroup text {
fill: #13540c;
stroke: none;
font-family: 'trebuchet ms', verdana, arial;
font-size: 10px;
}
g.classGroup rect {
fill: #cde498;
stroke: #13540c;
}
g.classGroup line {
stroke: #13540c;
stroke-width: 1;
}
svg .classLabel .box {
stroke: none;
stroke-width: 0;
fill: #cde498;
opacity: 0.5;
}
svg .classLabel .label {
fill: #13540c;
font-size: 10px;
}
.relation {
stroke: #13540c;
stroke-width: 1;
fill: none;
}
.composition {
fill: #13540c;
stroke: #13540c;
stroke-width: 1;
}
#compositionStart {
fill: #13540c;
stroke: #13540c;
stroke-width: 1;
}
#compositionEnd {
fill: #13540c;
stroke: #13540c;
stroke-width: 1;
}
.aggregation {
fill: #cde498;
stroke: #13540c;
stroke-width: 1;
}
#aggregationStart {
fill: #cde498;
stroke: #13540c;
stroke-width: 1;
}
#aggregationEnd {
fill: #cde498;
stroke: #13540c;
stroke-width: 1;
}
#dependencyStart {
fill: #13540c;
stroke: #13540c;
stroke-width: 1;
}
#dependencyEnd {
fill: #13540c;
stroke: #13540c;
stroke-width: 1;
}
#extensionStart {
fill: #13540c;
stroke: #13540c;
stroke-width: 1;
}
#extensionEnd {
fill: #13540c;
stroke: #13540c;
stroke-width: 1;
}
.node text {
font-family: 'trebuchet ms', verdana, arial;
font-size: 14px;
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial;
font-size: 12px;
background: #cdffb2;
border: 1px solid #6eaa49;
border-radius: 2px;
pointer-events: none;
z-index: 100;
}

File diff suppressed because one or more lines are too long

30
node_modules/gitbook-plugin-mermaid-gb3/index.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
var mermaidRegex = /^```mermaid((.*[\r\n]+)+?)?```$/im;
function processMermaidBlockList(page) {
var match;
while ((match = mermaidRegex.exec(page.content))) {
var rawBlock = match[0];
var mermaidContent = match[1];
page.content = page.content.replace(rawBlock, '<div class="mermaid">' +
mermaidContent + '</div>');
}
return page;
}
module.exports = {
website: {
assets: './dist',
css: [
'mermaid/mermaid.css'
],
js: [
'book/plugin.js'
]
},
hooks: {
'page:before': processMermaidBlockList
}
};

96
node_modules/gitbook-plugin-mermaid-gb3/package.json generated vendored Normal file
View File

@@ -0,0 +1,96 @@
{
"_args": [
[
{
"name": "gitbook-plugin-mermaid-gb3",
"raw": "gitbook-plugin-mermaid-gb3@2.1.0",
"rawSpec": "2.1.0",
"scope": null,
"spec": "2.1.0",
"type": "version"
},
"/root/gitbook"
]
],
"_from": "gitbook-plugin-mermaid-gb3@2.1.0",
"_id": "gitbook-plugin-mermaid-gb3@2.1.0",
"_inCache": true,
"_installable": true,
"_location": "/gitbook-plugin-mermaid-gb3",
"_nodeVersion": "8.2.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/gitbook-plugin-mermaid-gb3-2.1.0.tgz_1504389094337_0.2758769760839641"
},
"_npmUser": {
"email": "undefined.za@gmail.com",
"name": "chriswessels"
},
"_npmVersion": "5.3.0",
"_phantomChildren": {},
"_requested": {
"name": "gitbook-plugin-mermaid-gb3",
"raw": "gitbook-plugin-mermaid-gb3@2.1.0",
"rawSpec": "2.1.0",
"scope": null,
"spec": "2.1.0",
"type": "version"
},
"_requiredBy": [
"#USER"
],
"_resolved": "https://registry.npmjs.org/gitbook-plugin-mermaid-gb3/-/gitbook-plugin-mermaid-gb3-2.1.0.tgz",
"_shasum": "f2efc846021e527295d5fb723093e5db25f796a0",
"_shrinkwrap": null,
"_spec": "gitbook-plugin-mermaid-gb3@2.1.0",
"_where": "/root/gitbook",
"author": "",
"bugs": {
"url": "https://github.com/chriswessels/gitbook-plugin-mermaid-gb3/issues"
},
"dependencies": {
"mermaid": "^7.0.7"
},
"description": "Plugin for GitBook 3 which renders Mermaid flow from markdown. Tries to work cross platform (windows/unix)",
"devDependencies": {
"rimraf": "^2.5.2"
},
"dist": {
"integrity": "sha512-xCvOWNqkrVrWcBMDGT0ANWlut4GKVzzHh834zy8Ti4Bv7kvGtqA72ykuxBRcJUS+eSVDJNkaQ5D1wF6CNZH9rw==",
"shasum": "f2efc846021e527295d5fb723093e5db25f796a0",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQDGPPkbdqz7uTDfJgNkwBw0Sp2q0uWyW5O17GXSlOkjrQIhAIPPey1oZMXrujetp5kpH/QD2xVMsZv+EIPzAoQxgfcA"
}
],
"tarball": "https://registry.npmjs.org/gitbook-plugin-mermaid-gb3/-/gitbook-plugin-mermaid-gb3-2.1.0.tgz"
},
"engines": {
"gitbook": "*"
},
"gitHead": "53820cbb16fd30dd44c682e466effeec857af4a9",
"homepage": "https://github.com/chriswessels/gitbook-plugin-mermaid-gb3#readme",
"license": "ISC",
"main": "index.js",
"maintainers": [
{
"email": "undefined.za@gmail.com",
"name": "chriswessels"
}
],
"name": "gitbook-plugin-mermaid-gb3",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/chriswessels/gitbook-plugin-mermaid-gb3.git"
},
"scripts": {
"build": "npm run clean && npm run copy:assets && npm run copy:book",
"clean": "rimraf dist",
"copy:assets": "mkdir -p dist/mermaid && cp ./node_modules/mermaid/dist/{mermaid.min.js,mermaid*.css} dist/mermaid",
"copy:book": "mkdir -p dist/book && cp -R book/ dist/book"
},
"version": "2.1.0"
}