This commit is contained in:
2025-05-12 05:38:44 +09:00
parent dced21c3f8
commit 6d78bfa46e
8120 changed files with 1161564 additions and 0 deletions

View File

@ -0,0 +1,3 @@
declare const _default: any;
export default _default;
//# sourceMappingURL=configDefault.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"configDefault.d.ts","sourceRoot":"","sources":["../../src/constants/configDefault.ts"],"names":[],"mappings":";AAIA,wBAA4D"}

View File

@ -0,0 +1,9 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const configSchema_1 = __importDefault(require("./configSchema"));
const immutable_1 = __importDefault(require("immutable"));
const json_schema_defaults_1 = __importDefault(require("json-schema-defaults"));
exports.default = immutable_1.default.fromJS((0, json_schema_defaults_1.default)(configSchema_1.default));

View File

@ -0,0 +1,3 @@
declare const _default: string[];
export default _default;
//# sourceMappingURL=configFiles.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"configFiles.d.ts","sourceRoot":"","sources":["../../src/constants/configFiles.ts"],"names":[],"mappings":";AAAA,wBAAwC"}

View File

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ["book.js", "book.json"];

View File

@ -0,0 +1,221 @@
declare const _default: {
$schema: string;
id: string;
title: string;
type: string;
properties: {
root: {
type: string;
title: string;
};
title: {
type: string;
title: string;
};
author: {
type: string;
title: string;
};
authorSort: {
type: string;
title: string;
};
producer: {
type: string;
title: string;
};
publisher: {
type: string;
title: string;
};
pubdate: {
type: string;
title: string;
};
series: {
type: string;
title: string;
};
seriesIndex: {
type: string;
title: string;
};
isbn: {
type: string;
title: string;
};
language: {
type: string;
title: string;
};
gitbook: {
type: string;
default: string;
title: string;
};
direction: {
type: string;
enum: string[];
title: string;
};
theme: {
type: string;
default: string;
title: string;
};
variables: {
type: string;
title: string;
};
plugins: {
oneOf: {
$ref: string;
}[];
default: any[];
};
pluginsConfig: {
type: string;
title: string;
};
structure: {
type: string;
properties: {
langs: {
default: string;
type: string;
title: string;
pattern: string;
};
readme: {
default: string;
type: string;
title: string;
pattern: string;
};
glossary: {
default: string;
type: string;
title: string;
pattern: string;
};
summary: {
default: string;
type: string;
title: string;
pattern: string;
};
};
additionalProperties: boolean;
};
pdf: {
type: string;
title: string;
properties: {
pageNumbers: {
type: string;
default: boolean;
title: string;
};
fontSize: {
type: string;
minimum: number;
maximum: number;
default: number;
title: string;
};
fontFamily: {
type: string;
default: string;
title: string;
};
paperSize: {
type: string;
enum: string[];
default: string;
title: string;
};
chapterMark: {
type: string;
enum: string[];
default: string;
title: string;
};
pageBreaksBefore: {
type: string;
default: string;
title: string;
};
margin: {
type: string;
properties: {
right: {
type: string;
title: string;
minimum: number;
maximum: number;
default: number;
};
left: {
type: string;
title: string;
minimum: number;
maximum: number;
default: number;
};
top: {
type: string;
title: string;
minimum: number;
maximum: number;
default: number;
};
bottom: {
type: string;
title: string;
minimum: number;
maximum: number;
default: number;
};
};
};
embedFonts: {
type: string;
default: boolean;
title: string;
};
};
};
};
required: any[];
definitions: {
pluginsArray: {
type: string;
items: {
oneOf: {
$ref: string;
}[];
};
};
pluginsString: {
type: string;
};
pluginString: {
type: string;
};
pluginObject: {
type: string;
properties: {
name: {
type: string;
};
version: {
type: string;
};
};
additionalProperties: boolean;
required: string[];
};
};
};
export default _default;
//# sourceMappingURL=configSchema.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"configSchema.d.ts","sourceRoot":"","sources":["../../src/constants/configSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBAuOE"}

235
book/node_modules/honkit/lib/constants/configSchema.js generated vendored Normal file
View File

@ -0,0 +1,235 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const FILENAME_REGEX = "^[a-zA-Z-._d,s]+$";
exports.default = {
$schema: "http://json-schema.org/schema#",
id: "https://gitbook.com/schemas/book.json",
title: "HonKit Configuration",
type: "object",
properties: {
root: {
type: "string",
title: "Path fro the root folder containing the book's content"
},
title: {
type: "string",
title: "Title of the book, default is extracted from README"
},
author: {
type: "string",
title: "Name of the author"
},
authorSort: {
type: "string",
title: "String to be used to sort the author(s)"
},
producer: {
type: "string",
title: "Name of the producer"
},
publisher: {
type: "string",
title: "Name of the publisher"
},
pubdate: {
type: "string",
title: "Publication date of the book"
},
series: {
type: "string",
title: "Series this book belongs to"
},
seriesIndex: {
type: "string",
title: "Index of the book in this series"
},
isbn: {
type: "string",
title: "ISBN for published book"
},
language: {
type: "string",
title: "Language of the book"
},
gitbook: {
type: "string",
default: "*",
title: "GitBook/HonKit version to match"
},
direction: {
type: "string",
enum: ["ltr", "rtl"],
title: "Direction of texts, default is detected in the pages"
},
theme: {
type: "string",
default: "default",
title: "Name of the theme plugin to use"
},
variables: {
type: "object",
title: "Templating context variables"
},
plugins: {
oneOf: [{ $ref: "#/definitions/pluginsArray" }, { $ref: "#/definitions/pluginsString" }],
default: []
},
pluginsConfig: {
type: "object",
title: "Configuration for plugins"
},
structure: {
type: "object",
properties: {
langs: {
default: "LANGS.md",
type: "string",
title: "File to use as languages index",
pattern: FILENAME_REGEX
},
readme: {
default: "README.md",
type: "string",
title: "File to use as preface",
pattern: FILENAME_REGEX
},
glossary: {
default: "GLOSSARY.md",
type: "string",
title: "File to use as glossary index",
pattern: FILENAME_REGEX
},
summary: {
default: "SUMMARY.md",
type: "string",
title: "File to use as table of contents",
pattern: FILENAME_REGEX
}
},
additionalProperties: false
},
pdf: {
type: "object",
title: "PDF specific configurations",
properties: {
pageNumbers: {
type: "boolean",
default: true,
title: "Add page numbers to the bottom of every page"
},
fontSize: {
type: "integer",
minimum: 8,
maximum: 30,
default: 12,
title: "Font size for the PDF output"
},
fontFamily: {
type: "string",
default: "Arial",
title: "Font family for the PDF output"
},
paperSize: {
type: "string",
enum: [
"a0",
"a1",
"a2",
"a3",
"a4",
"a5",
"a6",
"b0",
"b1",
"b2",
"b3",
"b4",
"b5",
"b6",
"legal",
"letter"
],
default: "a4",
title: "Paper size for the PDF"
},
chapterMark: {
type: "string",
enum: ["pagebreak", "rule", "both", "none"],
default: "pagebreak",
title: "How to mark detected chapters"
},
pageBreaksBefore: {
type: "string",
default: "/",
title: 'An XPath expression. Page breaks are inserted before the specified elements. To disable use the expression: "/"'
},
margin: {
type: "object",
properties: {
right: {
type: "integer",
title: "Right Margin",
minimum: 0,
maximum: 100,
default: 62
},
left: {
type: "integer",
title: "Left Margin",
minimum: 0,
maximum: 100,
default: 62
},
top: {
type: "integer",
title: "Top Margin",
minimum: 0,
maximum: 100,
default: 56
},
bottom: {
type: "integer",
title: "Bottom Margin",
minimum: 0,
maximum: 100,
default: 56
}
}
},
embedFonts: {
type: "boolean",
default: false,
title: "Embed all fonts into the PDF"
}
}
}
},
required: [],
definitions: {
pluginsArray: {
type: "array",
items: {
oneOf: [{ $ref: "#/definitions/pluginObject" }, { $ref: "#/definitions/pluginString" }]
}
},
pluginsString: {
type: "string"
},
pluginString: {
type: "string"
},
pluginObject: {
type: "object",
properties: {
name: {
type: "string"
},
version: {
type: "string"
}
},
additionalProperties: false,
required: ["name"]
}
}
};

View File

@ -0,0 +1,5 @@
import Immutable from "immutable";
import TemplateBlock from "../models/templateBlock";
declare const _default: Immutable.Map<string, TemplateBlock>;
export default _default;
//# sourceMappingURL=defaultBlocks.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"defaultBlocks.d.ts","sourceRoot":"","sources":["../../src/constants/defaultBlocks.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,aAAa,MAAM,yBAAyB,CAAC;;AAEpD,wBA6CG"}

View File

@ -0,0 +1,49 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const immutable_1 = __importDefault(require("immutable"));
const templateBlock_1 = __importDefault(require("../models/templateBlock"));
exports.default = immutable_1.default.Map({
html: new templateBlock_1.default({
name: "html",
process: function (blk) {
return blk;
}
}),
code: new templateBlock_1.default({
name: "code",
process: function (blk) {
return {
html: false,
body: blk.body
};
}
}),
markdown: new templateBlock_1.default({
name: "markdown",
process: function (blk) {
console.log("blk", blk); // TODO::::::
return this.book.renderInline("markdown", blk.body).then((out) => {
return { body: out };
});
}
}),
asciidoc: new templateBlock_1.default({
name: "asciidoc",
process: function (blk) {
return this.book.renderInline("asciidoc", blk.body).then((out) => {
return { body: out };
});
}
}),
markup: new templateBlock_1.default({
name: "markup",
process: function (blk) {
return this.book.renderInline(this.ctx.file.type, blk.body).then((out) => {
return { body: out };
});
}
})
});

View File

@ -0,0 +1,4 @@
import Immutable from "immutable";
declare const _default: Immutable.Map<string, ((time: any, format: any) => string) | ((time: any) => string)>;
export default _default;
//# sourceMappingURL=defaultFilters.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"defaultFilters.d.ts","sourceRoot":"","sources":["../../src/constants/defaultFilters.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;;AAGlC,wBAWG"}

View File

@ -0,0 +1,18 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const immutable_1 = __importDefault(require("immutable"));
const moment_1 = __importDefault(require("moment"));
exports.default = immutable_1.default.Map({
// Format a date
// ex: 'MMMM Do YYYY, h:mm:ss a
date: function (time, format) {
return (0, moment_1.default)(time).format(format);
},
// Relative Time
dateFromNow: function (time) {
return (0, moment_1.default)(time).fromNow();
}
});

View File

@ -0,0 +1,5 @@
import Immutable from "immutable";
import PluginDependency from "../models/pluginDependency";
declare const _default: Immutable.Iterable<number, PluginDependency>;
export default _default;
//# sourceMappingURL=defaultPlugins.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"defaultPlugins.d.ts","sourceRoot":"","sources":["../../src/constants/defaultPlugins.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;;AAe1D,wBAEE"}

View File

@ -0,0 +1,19 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const immutable_1 = __importDefault(require("immutable"));
const pluginDependency_1 = __importDefault(require("../models/pluginDependency"));
const pkg = require("../../package.json");
/**
* Create a PluginDependency from a dependency of gitbook
* @param {string} pluginName
* @return {PluginDependency}
*/
function createFromDependency(pluginName) {
const npmID = "gitbook-plugin-" + pluginName;
const version = pkg.dependencies[npmID];
return pluginDependency_1.default.create(pluginName, version);
}
exports.default = immutable_1.default.List(["highlight", "search", "lunr", "fontsettings", "theme-default"]).map(createFromDependency);

View File

@ -0,0 +1,3 @@
declare const _default: string[];
export default _default;
//# sourceMappingURL=extsAsciidoc.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"extsAsciidoc.d.ts","sourceRoot":"","sources":["../../src/constants/extsAsciidoc.ts"],"names":[],"mappings":";AAAA,wBAAsC"}

View File

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = [".adoc", ".asciidoc"];

View File

@ -0,0 +1,3 @@
declare const _default: string[];
export default _default;
//# sourceMappingURL=extsMarkdown.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"extsMarkdown.d.ts","sourceRoot":"","sources":["../../src/constants/extsMarkdown.ts"],"names":[],"mappings":";AAAA,wBAA8C"}

View File

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = [".md", ".markdown", ".mdown"];

View File

@ -0,0 +1,3 @@
declare const _default: string[];
export default _default;
//# sourceMappingURL=ignoreFiles.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"ignoreFiles.d.ts","sourceRoot":"","sources":["../../src/constants/ignoreFiles.ts"],"names":[],"mappings":";AAAA,wBAAwD"}

View File

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = [".ignore", ".gitignore", ".bookignore"];

View File

@ -0,0 +1,3 @@
declare const _default: "_assets";
export default _default;
//# sourceMappingURL=pluginAssetsFolder.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"pluginAssetsFolder.d.ts","sourceRoot":"","sources":["../../src/constants/pluginAssetsFolder.ts"],"names":[],"mappings":";AAAA,wBAAyB"}

View File

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = "_assets";

View File

@ -0,0 +1,3 @@
declare const _default: string[];
export default _default;
//# sourceMappingURL=pluginHooks.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"pluginHooks.d.ts","sourceRoot":"","sources":["../../src/constants/pluginHooks.ts"],"names":[],"mappings":";AAAA,wBAAoF"}

View File

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ["init", "finish", "finish:before", "config", "page", "page:before"];

View File

@ -0,0 +1,3 @@
declare const _default: "gitbook-plugin-";
export default _default;
//# sourceMappingURL=pluginPrefix.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"pluginPrefix.d.ts","sourceRoot":"","sources":["../../src/constants/pluginPrefix.ts"],"names":[],"mappings":";AAAA,wBAAiC"}

View File

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = "gitbook-plugin-";

View File

@ -0,0 +1,4 @@
import Immutable from "immutable";
declare const _default: Immutable.List<string>;
export default _default;
//# sourceMappingURL=pluginResources.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"pluginResources.d.ts","sourceRoot":"","sources":["../../src/constants/pluginResources.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;;AAElC,wBAA6C"}

View File

@ -0,0 +1,7 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const immutable_1 = __importDefault(require("immutable"));
exports.default = immutable_1.default.List(["js", "css"]);

View File

@ -0,0 +1,3 @@
declare const _default: "_layouts";
export default _default;
//# sourceMappingURL=templatesFolder.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"templatesFolder.d.ts","sourceRoot":"","sources":["../../src/constants/templatesFolder.ts"],"names":[],"mappings":";AAAA,wBAA0B"}

View File

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = "_layouts";

View File

@ -0,0 +1,3 @@
declare const _default: "theme-";
export default _default;
//# sourceMappingURL=themePrefix.d.ts.map

View File

@ -0,0 +1 @@
{"version":3,"file":"themePrefix.d.ts","sourceRoot":"","sources":["../../src/constants/themePrefix.ts"],"names":[],"mappings":";AAAA,wBAAwB"}

View File

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = "theme-";