@canopycanopycanopy/b-ber-templates 3.0.8-next.61 → 3.0.8-next.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/Guide-DtZekBN_.d.ts +19 -0
  2. package/dist/Guide-DtZekBN_.d.ts.map +1 -0
  3. package/dist/Manifest-xzjWoNoJ.d.ts +10 -0
  4. package/dist/Manifest-xzjWoNoJ.d.ts.map +1 -0
  5. package/dist/Metadata-Cv6mesgj.d.ts +11 -0
  6. package/dist/Metadata-Cv6mesgj.d.ts.map +1 -0
  7. package/dist/Ncx/index.d.ts +13 -0
  8. package/dist/Ncx/index.d.ts.map +1 -0
  9. package/dist/Ncx/index.js +83 -0
  10. package/dist/Opf/Guide.d.ts +2 -0
  11. package/dist/Opf/Guide.js +36 -0
  12. package/dist/Opf/Manifest.d.ts +2 -0
  13. package/dist/Opf/Manifest.js +26 -0
  14. package/dist/Opf/Metadata.d.ts +2 -0
  15. package/dist/Opf/Metadata.js +55 -0
  16. package/dist/Opf/Pkg.d.ts +2 -0
  17. package/dist/Opf/Pkg.js +26 -0
  18. package/dist/Opf/Spine.d.ts +2 -0
  19. package/dist/Opf/Spine.js +43 -0
  20. package/dist/Pkg-BAwlpc2n.d.ts +9 -0
  21. package/dist/Pkg-BAwlpc2n.d.ts.map +1 -0
  22. package/dist/Project/index.d.ts +44 -0
  23. package/dist/Project/index.d.ts.map +1 -0
  24. package/dist/Project/index.js +2 -0
  25. package/dist/Project-D0Q1l_Vp.js +430 -0
  26. package/dist/Spine-B4MQP83_.d.ts +19 -0
  27. package/dist/Spine-B4MQP83_.d.ts.map +1 -0
  28. package/dist/Toc/index.d.ts +10 -0
  29. package/dist/Toc/index.d.ts.map +1 -0
  30. package/dist/Toc/index.js +31 -0
  31. package/dist/Xhtml/index.d.ts +23 -0
  32. package/dist/Xhtml/index.d.ts.map +1 -0
  33. package/dist/Xhtml/index.js +59 -0
  34. package/dist/Xml/index.d.ts +7 -0
  35. package/dist/Xml/index.d.ts.map +1 -0
  36. package/dist/Xml/index.js +17 -0
  37. package/dist/chunk-DakpK96I.js +43 -0
  38. package/dist/figures/index.d.ts +4 -0
  39. package/dist/figures/index.d.ts.map +1 -0
  40. package/dist/figures/index.js +342 -0
  41. package/dist/index.d.ts +23 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/index.js +40 -0
  44. package/package.json +28 -33
  45. package/Ncx/index.js +0 -98
  46. package/Opf/Guide.js +0 -47
  47. package/Opf/Manifest.js +0 -36
  48. package/Opf/Metadata.js +0 -84
  49. package/Opf/Pkg.js +0 -30
  50. package/Opf/Spine.js +0 -69
  51. package/Opf/index.js +0 -42
  52. package/Ops/index.js +0 -13
  53. package/Project/README.md.js +0 -6
  54. package/Project/application.js.js +0 -106
  55. package/Project/gitignore.js +0 -17
  56. package/Project/index.js +0 -94
  57. package/Project/metadata.yml.js +0 -125
  58. package/Project/project-name-chapter-01.md.js +0 -15
  59. package/Project/project-name-colophon.md.js +0 -32
  60. package/Project/project-name-title-page.md.js +0 -13
  61. package/Project/toc.yml.js +0 -16
  62. package/Toc/index.js +0 -40
  63. package/Xhtml/index.js +0 -86
  64. package/Xml/index.js +0 -22
  65. package/figures/epub.js +0 -51
  66. package/figures/helpers.js +0 -213
  67. package/figures/index.js +0 -49
  68. package/figures/mobi.js +0 -56
  69. package/figures/reader.js +0 -54
  70. package/figures/web.js +0 -50
  71. package/index.js +0 -56
@@ -0,0 +1,430 @@
1
+ const require_chunk = require("./chunk-DakpK96I.js");
2
+ let _canopycanopycanopy_b_ber_lib = require("@canopycanopycanopy/b-ber-lib");
3
+ let path = require("path");
4
+ path = require_chunk.__toESM(path);
5
+ let crypto = require("crypto");
6
+ crypto = require_chunk.__toESM(crypto);
7
+ //#region src/Project/application.js.ts
8
+ var application_js_default = `// All user defined functions should be wrapped in a 'domReady' call - or by using a third-party lib like jQuery - for compatibility in reader, web, and e-reader versions.
9
+ // Use the global \`window.bber.env\` variable to limit scripts to particular envionments. See example below
10
+ //
11
+ // Examples:
12
+ // domReady(fn)
13
+ // domReady(function() {})
14
+ // domReady(fn, context)
15
+ // domReady(function(context) {}, ctx)
16
+ //
17
+ // https://stackoverflow.com/questions/9899372/pure-javascript-equivalent-of-jquerys-ready-how-to-call-a-function-when-t
18
+ ;(function(funcName, baseObj) {
19
+ // The public function name defaults to window.domReady
20
+ // but you can pass in your own object and own function name and those will be used
21
+ // if you want to put them in a different namespace
22
+ funcName = funcName || 'domReady';
23
+ baseObj = baseObj || window;
24
+ var readyList = [];
25
+ var readyFired = false;
26
+ var readyEventHandlersInstalled = false;
27
+
28
+ // call this when the document is ready
29
+ // this function protects itself against being called more than once
30
+ function ready() {
31
+ if (!readyFired) {
32
+ // this must be set to true before we start calling callbacks
33
+ readyFired = true;
34
+ for (var i = 0; i < readyList.length; i++) {
35
+ // if a callback here happens to add new ready handlers,
36
+ // the domReady() function will see that it already fired
37
+ // and will schedule the callback to run right after
38
+ // this event loop finishes so all handlers will still execute
39
+ // in order and no new ones will be added to the readyList
40
+ // while we are processing the list
41
+ readyList[i].fn.call(window, readyList[i].ctx);
42
+ }
43
+ // allow any closures held by these functions to free
44
+ readyList = [];
45
+ }
46
+ }
47
+
48
+ function readyStateChange() {
49
+ if ( document.readyState === 'complete' ) {
50
+ ready();
51
+ }
52
+ }
53
+
54
+ // This is the one public interface
55
+ // domReady(fn, context);
56
+ // the context argument is optional - if present, it will be passed
57
+ // as an argument to the callback
58
+ baseObj[funcName] = function(callback, context) {
59
+ if (typeof callback !== 'function') {
60
+ throw new TypeError('callback for domReady(fn) must be a function');
61
+ }
62
+ // if ready has already fired, then just schedule the callback
63
+ // to fire asynchronously, but right away
64
+ if (readyFired) {
65
+ setTimeout(function() {callback(context);}, 1);
66
+ return;
67
+ } else {
68
+ // add the function and context to the list
69
+ readyList.push({fn: callback, ctx: context});
70
+ }
71
+ // if document already ready to go, schedule the ready function to run
72
+ if (document.readyState === 'complete') {
73
+ setTimeout(ready, 1);
74
+ } else if (!readyEventHandlersInstalled) {
75
+ // otherwise if we don't have event handlers installed, install them
76
+ if (document.addEventListener) {
77
+ // first choice is DOMContentLoaded event
78
+ document.addEventListener('DOMContentLoaded', ready, false);
79
+ // backup is window load event
80
+ window.addEventListener('load', ready, false);
81
+ } else {
82
+ // must be IE
83
+ document.attachEvent('onreadystatechange', readyStateChange);
84
+ window.attachEvent('onload', ready);
85
+ }
86
+ readyEventHandlersInstalled = true;
87
+ }
88
+ }
89
+ })('domReady', window);
90
+
91
+ function clicked(e) {
92
+ window.location.href = this.getAttribute('href');
93
+ return false;
94
+ }
95
+
96
+ function main() {
97
+ if (window.bber.env === 'reader') return;
98
+ // Normalize link behaviour on iBooks, without interfering with footnotes
99
+ var links = document.getElementsByTagName('a');
100
+ links = Array.prototype.slice.call(links, 0);
101
+ links = links.filter(function(l) {
102
+ return l.classList.contains('footnote-ref') === false;
103
+ });
104
+
105
+ for (var i = 0; i < links.length; i++) {
106
+ links[i].onclick = clicked;
107
+ }
108
+ }
109
+
110
+ domReady(main);
111
+ `;
112
+ //#endregion
113
+ //#region src/Project/gitignore.ts
114
+ var gitignore_default = `.DS_Store
115
+ .tmp
116
+
117
+ *.map
118
+ *.epub
119
+ *.mobi
120
+ *.pdf
121
+ *.xml
122
+
123
+ node_modules
124
+ npm-debug.log*
125
+ bber-debug.log*
126
+
127
+ /project*
128
+ `;
129
+ //#endregion
130
+ //#region src/Project/metadata.yml.ts
131
+ var metadata_yml_default = `# ==============================================================================
132
+ # Project Metadata
133
+ # Please see http://dublincore.org/documents/dcmi-terms/ for information on terms
134
+ # and usage. Additional metadata can be entered and parsed if following the
135
+ # formatting below.
136
+ # ------------------------------------------------------------------------------
137
+
138
+ # ------------------------------------------------------------------------------
139
+ # Title and Description
140
+ # ------------------------------------------------------------------------------
141
+
142
+ - term: title
143
+ value: Project Title
144
+ refines:
145
+ - title-type: main
146
+
147
+ - term: description
148
+ value: Project description.
149
+
150
+ - term: abstract
151
+ value: Abstract.
152
+
153
+ # ------------------------------------------------------------------------------
154
+ # Contributors
155
+ # ------------------------------------------------------------------------------
156
+
157
+ - term: creator
158
+ value: Last Name, First Name
159
+ refines:
160
+ - role: aut
161
+
162
+ - term: contributor
163
+ value: b-ber
164
+ refines:
165
+ - role: mrk
166
+
167
+ # ------------------------------------------------------------------------------
168
+ # Collaborators (editors, developers, designers, researchers, etc.)
169
+ # ------------------------------------------------------------------------------
170
+
171
+ - term: contributor
172
+ value: Last Name, First Name
173
+ refines:
174
+ - role: edt
175
+
176
+ - term: contributor
177
+ value: Last Name, First Name
178
+ refines:
179
+ - role: drt
180
+
181
+ - term: contributor
182
+ value: Last Name, First Name
183
+ refines:
184
+ - role: ard
185
+
186
+ - term: contributor
187
+ value: Last Name, First Name
188
+ refines:
189
+ - role: pmn
190
+
191
+ - term: contributor
192
+ value: Last Name, First Name
193
+ refines:
194
+ - role: prg
195
+
196
+ - term: contributor
197
+ value: Last Name, First Name
198
+ refines:
199
+ - role: dsr
200
+
201
+ - term: contributor
202
+ value: Last Name, First Name
203
+ refines:
204
+ - role: mrk
205
+
206
+ - term: contributor
207
+ value: Last Name, First Name
208
+ refines:
209
+ - role: rtm
210
+
211
+ # ------------------------------------------------------------------------------
212
+ # Publication Information
213
+ # ------------------------------------------------------------------------------
214
+
215
+ - term: language
216
+ value: en-US
217
+
218
+ - term: rights
219
+ value: © YYYY
220
+
221
+ - term: format
222
+ value: epub+zip
223
+
224
+ - term: date
225
+ value: YYYY-MM-DD
226
+
227
+ - term: publisher
228
+ value: Publisher
229
+
230
+ - term: tableOfContents
231
+ value: Chapter One; Chapter Two; etc.
232
+
233
+ # ------------------------------------------------------------------------------
234
+ # Additional Metadata
235
+ # ------------------------------------------------------------------------------
236
+
237
+ - term: temporal
238
+ value: time
239
+
240
+ - term: spatial
241
+ value: Project Title Location
242
+
243
+ - term: subject
244
+ value: Project Title Subject
245
+
246
+ # ------------------------------------------------------------------------------
247
+ # Cover and Book ID (UUID, ISBN, ISSN, ASIN, etc.)
248
+ # ------------------------------------------------------------------------------
249
+
250
+ - term: identifier
251
+ value: %IDENTIFIER%
252
+
253
+ `;
254
+ //#endregion
255
+ //#region src/Project/project-name-chapter-01.md.ts
256
+ var project_name_chapter_01_md_default = `---
257
+ title: Project Name Chapter One
258
+ type: bodymatter
259
+ ---
260
+
261
+ ::: chapter:project-name_chapter-one
262
+
263
+ # Chapter Title
264
+
265
+ Chapter Contents
266
+
267
+ ::: exit:project-name_chapter-one
268
+ `;
269
+ //#endregion
270
+ //#region src/Project/project-name-colophon.md.ts
271
+ var project_name_colophon_md_default = `---
272
+ title: Project Name Colophon
273
+ type: colophon
274
+ ---
275
+
276
+ ::: colophon:project-name-colophon
277
+
278
+ *Project Title* by Author
279
+
280
+ Published by Publisher, 2019
281
+
282
+ ::: subchapter:credits
283
+
284
+ © 2019 *Project Title*, by Author. Texts and images copyright the author, unless otherwise stated.
285
+
286
+ ::: exit:credits
287
+
288
+ ::: logo:publishers-logo source:default-publishers-logo.png
289
+
290
+ Publisher
291
+ 1234 Street
292
+ City, State Zip
293
+ Country
294
+
295
+ ::: logo:b-ber-logo source:b-ber-logo.png
296
+
297
+ *Project Title* is a DRM-free ebook that uses [b-ber](https://github.com/triplecanopy/b-ber), software designed and developed by [Triple Canopy](https://canopycanopycanopy.com).
298
+
299
+ ::: exit:project-name-colophon
300
+ `;
301
+ //#endregion
302
+ //#region src/Project/project-name-title-page.md.ts
303
+ var project_name_title_page_md_default = `---
304
+ title: Project Name Title Page
305
+ type: titlepage
306
+ ---
307
+
308
+ ::: titlepage:project-name-title-page
309
+
310
+ # Project Title by Author
311
+
312
+ ::: exit:project-name-title-page
313
+ `;
314
+ //#endregion
315
+ //#region src/Project/README.md.ts
316
+ var README_md_default = `# %PROJECT_NAME%
317
+
318
+ Created with [b-ber](https://github.com/triplecanopy/b-ber/)
319
+ `;
320
+ //#endregion
321
+ //#region src/Project/toc.yml.ts
322
+ var toc_yml_default = `# Table of Contents
323
+ # "in_toc:false" removes the entry from the built-in navigation of the reader.
324
+ # "linear:false" removes the entry from the project's contents.
325
+ - toc:
326
+ in_toc: false
327
+ linear: false
328
+ # Cover
329
+ - cover:
330
+ in_toc: false
331
+ # Project Contents
332
+ - project-name-title-page
333
+ - project-name-chapter-01
334
+ - project-name-colophon
335
+ `;
336
+ //#endregion
337
+ //#region src/Project/index.ts
338
+ var Project = class Project {
339
+ static directories(src) {
340
+ return [
341
+ `${src}/_images`,
342
+ `${src}/_javascripts`,
343
+ `${src}/_stylesheets`,
344
+ `${src}/_markdown`,
345
+ `${src}/_fonts`,
346
+ `${src}/_media`,
347
+ `${src}/.tmp`
348
+ ];
349
+ }
350
+ static relativePath(src, ...rest) {
351
+ return path.default.join(path.default.basename(src), ...rest);
352
+ }
353
+ static absolutePath(src, ...rest) {
354
+ return path.default.resolve(path.default.dirname(src), path.default.basename(src), ...rest);
355
+ }
356
+ static configYAML(src, config = {}) {
357
+ return {
358
+ relativePath: Project.relativePath(src, "..", "config.yml"),
359
+ absolutePath: Project.absolutePath(src, "..", "config.yml"),
360
+ content: _canopycanopycanopy_b_ber_lib.YamlAdaptor.dump({
361
+ ..._canopycanopycanopy_b_ber_lib.State.config,
362
+ ...config
363
+ })
364
+ };
365
+ }
366
+ static tocYAML(src) {
367
+ return {
368
+ relativePath: Project.relativePath(src, "toc.yml"),
369
+ absolutePath: Project.absolutePath(src, "toc.yml"),
370
+ content: toc_yml_default
371
+ };
372
+ }
373
+ static metadataYAML(src) {
374
+ return {
375
+ relativePath: Project.relativePath(src, "metadata.yml"),
376
+ absolutePath: Project.absolutePath(src, "metadata.yml"),
377
+ content: metadata_yml_default.replace(/%IDENTIFIER%/, crypto.default.randomBytes(20).toString("hex"))
378
+ };
379
+ }
380
+ static javascripts(src) {
381
+ return [{
382
+ relativePath: Project.relativePath(src, "_javascripts", "application.js"),
383
+ absolutePath: Project.absolutePath(src, "_javascripts", "application.js"),
384
+ content: application_js_default
385
+ }];
386
+ }
387
+ static markdown(src) {
388
+ return [
389
+ {
390
+ relativePath: Project.relativePath(src, "_markdown", "project-name-title-page.md"),
391
+ absolutePath: Project.absolutePath(src, "_markdown", "project-name-title-page.md"),
392
+ content: project_name_title_page_md_default
393
+ },
394
+ {
395
+ relativePath: Project.relativePath(src, "_markdown", "project-name-chapter-01.md"),
396
+ absolutePath: Project.absolutePath(src, "_markdown", "project-name-chapter-01.md"),
397
+ content: project_name_chapter_01_md_default
398
+ },
399
+ {
400
+ relativePath: Project.relativePath(src, "_markdown", "project-name-colophon.md"),
401
+ absolutePath: Project.absolutePath(src, "_markdown", "project-name-colophon.md"),
402
+ content: project_name_colophon_md_default
403
+ }
404
+ ];
405
+ }
406
+ static stylesheets() {
407
+ return [];
408
+ }
409
+ static readme(src) {
410
+ return {
411
+ relativePath: Project.relativePath(src, "..", "README.md"),
412
+ absolutePath: Project.absolutePath(src, "..", "README.md"),
413
+ content: README_md_default.replace(/%PROJECT_NAME%/, path.default.basename(process.cwd()))
414
+ };
415
+ }
416
+ static gitignore(src) {
417
+ return {
418
+ relativePath: Project.relativePath(src, "..", ".gitignore"),
419
+ absolutePath: Project.absolutePath(src, "..", ".gitignore"),
420
+ content: gitignore_default
421
+ };
422
+ }
423
+ };
424
+ //#endregion
425
+ Object.defineProperty(exports, "Project", {
426
+ enumerable: true,
427
+ get: function() {
428
+ return Project;
429
+ }
430
+ });
@@ -0,0 +1,19 @@
1
+ import File from "vinyl";
2
+
3
+ //#region src/Opf/Spine.d.ts
4
+ declare class Spine {
5
+ static body(): File.BufferFile;
6
+ static item({
7
+ fileName,
8
+ extension,
9
+ linear
10
+ }: {
11
+ fileName: any;
12
+ extension: any;
13
+ linear: any;
14
+ }): string;
15
+ static items(data: any): any;
16
+ }
17
+ //#endregion
18
+ export { Spine as t };
19
+ //# sourceMappingURL=Spine-B4MQP83_.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spine-B4MQP83_.d.ts","names":[],"sources":["../src/Opf/Spine.ts"],"mappings":";;;cAOM,KAAA;EAAA,OACG,IAAA,IAAI,IAAA,CAAA,UAAA;EAAA,OAOJ,IAAA;IAAO,QAAA;IAAU,SAAA;IAAW;EAAA;;;;;SAK5B,KAAA,CAAM,IAAA;AAAA"}
@@ -0,0 +1,10 @@
1
+ import File from "vinyl";
2
+
3
+ //#region src/Toc/index.d.ts
4
+ declare class Toc {
5
+ static body(): File.BufferFile;
6
+ static item(data: any): string;
7
+ static items(data: any): string;
8
+ }
9
+ export = Toc;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/Toc/index.ts"],"mappings":";;;cAKM,GAAA;EAAA,OACG,IAAA,IAAI,IAAA,CAAA,UAAA;EAAA,OAQJ,IAAA,CAAK,IAAA;EAAA,OAKL,KAAA,CAAM,IAAA;AAAA;AAAA"}
@@ -0,0 +1,31 @@
1
+ const require_chunk = require("../chunk-DakpK96I.js");
2
+ let _canopycanopycanopy_b_ber_lib = require("@canopycanopycanopy/b-ber-lib");
3
+ let vinyl = require("vinyl");
4
+ vinyl = require_chunk.__toESM(vinyl);
5
+ //#region src/Toc/index.ts
6
+ const { getTitle } = _canopycanopycanopy_b_ber_lib.utils;
7
+ var Toc = class Toc {
8
+ static body() {
9
+ return new vinyl.default({ contents: Buffer.from(`<nav id="toc" epub:type="toc"><h2>Table of Contents</h2>{% body %}</nav>`) });
10
+ }
11
+ static item(data) {
12
+ return `<a href="${`${data.relativePath}.xhtml`}">${_canopycanopycanopy_b_ber_lib.Html.escape(getTitle(data))}</a>`;
13
+ }
14
+ static items(data) {
15
+ return `
16
+ <ol>
17
+ ${data.reduce((acc, curr) => {
18
+ if (curr.in_toc === false) return acc;
19
+ return acc.concat(`
20
+ <li>
21
+ ${Toc.item(curr)}
22
+ ${curr.nodes && curr.nodes.length ? Toc.items(curr.nodes) : ""}
23
+ </li>
24
+ `);
25
+ }, "")}
26
+ </ol>
27
+ `;
28
+ }
29
+ };
30
+ //#endregion
31
+ module.exports = Toc;
@@ -0,0 +1,23 @@
1
+ import File from "vinyl";
2
+
3
+ //#region src/Xhtml/index.d.ts
4
+ declare class Xhtml {
5
+ static head(): File.BufferFile;
6
+ static body(): File.BufferFile;
7
+ static tail(): File.BufferFile;
8
+ static cover({
9
+ width,
10
+ height,
11
+ href
12
+ }: {
13
+ width: any;
14
+ height: any;
15
+ href: any;
16
+ }): string;
17
+ static stylesheet(inline?: boolean): File.BufferFile;
18
+ static javascript(inline?: boolean): File.BufferFile;
19
+ static jsonLD(): File.BufferFile;
20
+ static loi(): string;
21
+ }
22
+ export = Xhtml;
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/Xhtml/index.ts"],"mappings":";;;cAGM,KAAA;EAAA,OACG,IAAA,IAAI,IAAA,CAAA,UAAA;EAAA,OAyBJ,IAAA,IAAI,IAAA,CAAA,UAAA;EAAA,OAIJ,IAAA,IAAI,IAAA,CAAA,UAAA;EAAA,OAIJ,KAAA;IAAQ,KAAA;IAAO,MAAA;IAAQ;EAAA;;;;;SAUvB,UAAA,CAAW,MAAA,aAAc,IAAA,CAAA,UAAA;EAAA,OAUzB,UAAA,CAAW,MAAA,aAAc,IAAA,CAAA,UAAA;EAAA,OAczB,MAAA,IAAM,IAAA,CAAA,UAAA;EAAA,OAQN,GAAA;AAAA;AAAA"}
@@ -0,0 +1,59 @@
1
+ const require_chunk = require("../chunk-DakpK96I.js");
2
+ let _canopycanopycanopy_b_ber_lib = require("@canopycanopycanopy/b-ber-lib");
3
+ let vinyl = require("vinyl");
4
+ vinyl = require_chunk.__toESM(vinyl);
5
+ //#region src/Xhtml/index.ts
6
+ var Xhtml = class {
7
+ static head() {
8
+ const prefix = _canopycanopycanopy_b_ber_lib.State.config.private ? "no" : "";
9
+ const robots = `<meta name="robots" content="${prefix}index,${prefix}follow"/>`;
10
+ return new vinyl.default({ contents: Buffer.from(`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
11
+ <html xmlns="http://www.w3.org/1999/xhtml"
12
+ xmlns:epub="http://www.idpf.org/2007/ops"
13
+ xmlns:ibooks="http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0"
14
+ epub:prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0">
15
+ <head>
16
+ <title></title>
17
+ <meta http-equiv="default-style" content="text/html charset=utf-8"/>
18
+ ${robots}
19
+ {% body %}
20
+ </head>
21
+ <body>
22
+ `) });
23
+ }
24
+ static body() {
25
+ return new vinyl.default({ contents: Buffer.from("{% body %}") });
26
+ }
27
+ static tail() {
28
+ return new vinyl.default({ contents: Buffer.from("{% body %}</body></html>") });
29
+ }
30
+ static cover({ width, height, href }) {
31
+ return `
32
+ <section class="cover" style="text-align: center; padding: 0; margin: 0;">
33
+ <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 ${width} ${height}" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
34
+ <image width="${width}" height="${height}" xlink:href="../${href}"/>
35
+ </svg>
36
+ </section>
37
+ `;
38
+ }
39
+ static stylesheet(inline = false) {
40
+ return inline ? new vinyl.default({ contents: Buffer.from("<style>{% body %}</style>") }) : new vinyl.default({ contents: Buffer.from("<link rel=\"stylesheet\" type=\"text/css\" href=\"{% body %}\"/>") });
41
+ }
42
+ static javascript(inline = false) {
43
+ return inline ? new vinyl.default({ contents: Buffer.from("<script type=\"application/javascript\">{% body %}<\/script>") }) : new vinyl.default({ contents: Buffer.from("<script type=\"application/javascript\" src=\"{% body %}\"><\/script>") });
44
+ }
45
+ static jsonLD() {
46
+ return new vinyl.default({ contents: Buffer.from("<script type=\"application/ld+json\">{% body %}<\/script>") });
47
+ }
48
+ static loi() {
49
+ return `
50
+ <section epub:type="loi" class="chapter figures">
51
+ <header>
52
+ <h1>Figures</h1>
53
+ </header>
54
+ </section>
55
+ `;
56
+ }
57
+ };
58
+ //#endregion
59
+ module.exports = Xhtml;
@@ -0,0 +1,7 @@
1
+ //#region src/Xml/index.d.ts
2
+ declare class Xml {
3
+ static container(): string;
4
+ static mimetype(): string;
5
+ }
6
+ export = Xml;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/Xml/index.ts"],"mappings":";cAAM,GAAA;EAAA,OACG,SAAA;EAAA,OASA,QAAQ;AAAA;AAAA"}
@@ -0,0 +1,17 @@
1
+ //#region src/Xml/index.ts
2
+ var Xml = class {
3
+ static container() {
4
+ return `<?xml version="1.0"?>
5
+ <container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
6
+ <rootfiles>
7
+ <rootfile full-path="OPS/content.opf" media-type="application/oebps-package+xml"/>
8
+ </rootfiles>
9
+ </container>
10
+ `;
11
+ }
12
+ static mimetype() {
13
+ return "application/epub+zip";
14
+ }
15
+ };
16
+ //#endregion
17
+ module.exports = Xml;
@@ -0,0 +1,43 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __exportAll = (all, no_symbols) => {
9
+ let target = {};
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
15
+ return target;
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
19
+ key = keys[i];
20
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
21
+ get: ((k) => from[k]).bind(null, key),
22
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
23
+ });
24
+ }
25
+ return to;
26
+ };
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: true
30
+ }) : target, mod));
31
+ //#endregion
32
+ Object.defineProperty(exports, "__exportAll", {
33
+ enumerable: true,
34
+ get: function() {
35
+ return __exportAll;
36
+ }
37
+ });
38
+ Object.defineProperty(exports, "__toESM", {
39
+ enumerable: true,
40
+ get: function() {
41
+ return __toESM;
42
+ }
43
+ });
@@ -0,0 +1,4 @@
1
+ //#region src/figures/index.d.ts
2
+ declare const figure: (data: any, buildType: any) => any;
3
+ export = figure;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/figures/index.ts"],"mappings":";cAiBM,MAAA,GAAU,IAAA,OAAM,SAAS;AAAA"}