turbo-html2pdf-template 0.1.0
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.
- package/LICENSE +21 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.js +113 -0
- package/dist/index.js.map +1 -0
- package/package.json +31 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 turbo-pdf contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** Anything that can be a child: a literal string or a nested builder result. */
|
|
2
|
+
type Node = string | Node[];
|
|
3
|
+
/** `{% if COND %} … {% endif %}` (§2.5). */
|
|
4
|
+
declare function ifBlock(cond: string, ...children: Node[]): string;
|
|
5
|
+
/** `{% elif COND %} …` — place inside an `ifBlock` body (§2.5). */
|
|
6
|
+
declare function elseIf(cond: string, ...children: Node[]): string;
|
|
7
|
+
/** `{% else %} …` — place inside an `ifBlock`/`each` body (§2.5/2.7). */
|
|
8
|
+
declare function elseBlock(...children: Node[]): string;
|
|
9
|
+
/** `{% for AS in OF %} … {% endfor %}` (§2.7). */
|
|
10
|
+
declare function each(of: string, as: string, ...children: Node[]): string;
|
|
11
|
+
/** `{% switch ON %} … {% endswitch %}` (§2.6). */
|
|
12
|
+
declare function switchBlock(on: string, ...children: Node[]): string;
|
|
13
|
+
/** `{% case V1, V2, … %} …` — inside a `switchBlock` (§2.6). */
|
|
14
|
+
declare function caseBlock(value: string, ...children: Node[]): string;
|
|
15
|
+
/** `{% default %} …` — last child of a `switchBlock` (§2.6). */
|
|
16
|
+
declare function defaultBlock(...children: Node[]): string;
|
|
17
|
+
/** `{% include SRC %}` / `{% include SRC with CTX %}` (§2.8). */
|
|
18
|
+
declare function include(src: string, withCtx?: string): string;
|
|
19
|
+
/** `{{ EXPR }}` interpolation (§2.4). */
|
|
20
|
+
declare function expr(value: string): string;
|
|
21
|
+
/** `<t:running-header>` (§3.0). */
|
|
22
|
+
declare function runningHeader(opts: {
|
|
23
|
+
extent?: string;
|
|
24
|
+
}, ...children: Node[]): string;
|
|
25
|
+
/** `<t:running-footer>` (§3.0). */
|
|
26
|
+
declare function runningFooter(opts: {
|
|
27
|
+
extent?: string;
|
|
28
|
+
}, ...children: Node[]): string;
|
|
29
|
+
/** `<t:page-master>` (§3.1). */
|
|
30
|
+
declare function pageMaster(opts: {
|
|
31
|
+
name: string;
|
|
32
|
+
size?: string;
|
|
33
|
+
orientation?: string;
|
|
34
|
+
margin?: string;
|
|
35
|
+
}, ...children: Node[]): string;
|
|
36
|
+
/** `<t:region slot extent>` (§3.1). */
|
|
37
|
+
declare function region(opts: {
|
|
38
|
+
slot: string;
|
|
39
|
+
extent?: string;
|
|
40
|
+
}, ...children: Node[]): string;
|
|
41
|
+
/** `<t:variant kind>` (§3.2). */
|
|
42
|
+
declare function variant(kind: string, ...children: Node[]): string;
|
|
43
|
+
/** `<t:use-master name/>` (§3.4). */
|
|
44
|
+
declare function useMaster(name: string): string;
|
|
45
|
+
/** `<t:footnote>` (§3.6). */
|
|
46
|
+
declare function footnote(opts: {
|
|
47
|
+
mark?: string;
|
|
48
|
+
reset?: string;
|
|
49
|
+
}, ...children: Node[]): string;
|
|
50
|
+
/** `<t:counter name action step start/>` (§3.8). */
|
|
51
|
+
declare function counter(opts: {
|
|
52
|
+
name: string;
|
|
53
|
+
action?: string;
|
|
54
|
+
step?: string;
|
|
55
|
+
start?: string;
|
|
56
|
+
}): string;
|
|
57
|
+
/** `<t:leader/>` (§3.10). */
|
|
58
|
+
declare function leader(): string;
|
|
59
|
+
/** A named running element via the `t:running` attribute on a host element (§3.5). */
|
|
60
|
+
declare function running(opts: {
|
|
61
|
+
name: string;
|
|
62
|
+
tag?: string;
|
|
63
|
+
policy?: string;
|
|
64
|
+
}, ...children: Node[]): string;
|
|
65
|
+
/** `<t:page/>` (§3.3). */
|
|
66
|
+
declare function page(): string;
|
|
67
|
+
/** `<t:pages/>` (§3.3). */
|
|
68
|
+
declare function pages(): string;
|
|
69
|
+
/** Final assembly: concatenate top-level nodes and trim outer whitespace. */
|
|
70
|
+
declare function compileTemplate(...children: Node[]): string;
|
|
71
|
+
|
|
72
|
+
export { type Node, caseBlock, compileTemplate, counter, defaultBlock, each, elseBlock, elseIf, expr, footnote, ifBlock, include, leader, page, pageMaster, pages, region, running, runningFooter, runningHeader, switchBlock, useMaster, variant };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
function render(child) {
|
|
3
|
+
return Array.isArray(child) ? child.map(render).join("") : child;
|
|
4
|
+
}
|
|
5
|
+
function join(children) {
|
|
6
|
+
return children.map(render).join("");
|
|
7
|
+
}
|
|
8
|
+
function ifBlock(cond, ...children) {
|
|
9
|
+
return `{% if ${cond} %}${join(children)}{% endif %}`;
|
|
10
|
+
}
|
|
11
|
+
function elseIf(cond, ...children) {
|
|
12
|
+
return `{% elif ${cond} %}${join(children)}`;
|
|
13
|
+
}
|
|
14
|
+
function elseBlock(...children) {
|
|
15
|
+
return `{% else %}${join(children)}`;
|
|
16
|
+
}
|
|
17
|
+
function each(of, as, ...children) {
|
|
18
|
+
return `{% for ${as} in ${of} %}${join(children)}{% endfor %}`;
|
|
19
|
+
}
|
|
20
|
+
function switchBlock(on, ...children) {
|
|
21
|
+
return `{% switch ${on} %}${join(children)}{% endswitch %}`;
|
|
22
|
+
}
|
|
23
|
+
function caseBlock(value, ...children) {
|
|
24
|
+
return `{% case ${value} %}${join(children)}`;
|
|
25
|
+
}
|
|
26
|
+
function defaultBlock(...children) {
|
|
27
|
+
return `{% default %}${join(children)}`;
|
|
28
|
+
}
|
|
29
|
+
function include(src, withCtx) {
|
|
30
|
+
return withCtx ? `{% include ${src} with ${withCtx} %}` : `{% include ${src} %}`;
|
|
31
|
+
}
|
|
32
|
+
function expr(value) {
|
|
33
|
+
return `{{ ${value} }}`;
|
|
34
|
+
}
|
|
35
|
+
function attrs(map) {
|
|
36
|
+
let out = "";
|
|
37
|
+
for (const [key, value] of Object.entries(map)) {
|
|
38
|
+
if (value !== void 0) {
|
|
39
|
+
out += ` ${key}="${value}"`;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return out;
|
|
43
|
+
}
|
|
44
|
+
function directive(name, attrMap, children) {
|
|
45
|
+
const open = `t:${name}${attrs(attrMap)}`;
|
|
46
|
+
return `<${open}>${children === void 0 ? "" : join(children)}</t:${name}>`;
|
|
47
|
+
}
|
|
48
|
+
function runningHeader(opts, ...children) {
|
|
49
|
+
return directive("running-header", { extent: opts.extent }, children);
|
|
50
|
+
}
|
|
51
|
+
function runningFooter(opts, ...children) {
|
|
52
|
+
return directive("running-footer", { extent: opts.extent }, children);
|
|
53
|
+
}
|
|
54
|
+
function pageMaster(opts, ...children) {
|
|
55
|
+
return directive("page-master", opts, children);
|
|
56
|
+
}
|
|
57
|
+
function region(opts, ...children) {
|
|
58
|
+
return directive("region", opts, children);
|
|
59
|
+
}
|
|
60
|
+
function variant(kind, ...children) {
|
|
61
|
+
return directive("variant", { kind }, children);
|
|
62
|
+
}
|
|
63
|
+
function useMaster(name) {
|
|
64
|
+
return directive("use-master", { name });
|
|
65
|
+
}
|
|
66
|
+
function footnote(opts, ...children) {
|
|
67
|
+
return directive("footnote", { mark: opts.mark, "t:footnote-reset": opts.reset }, children);
|
|
68
|
+
}
|
|
69
|
+
function counter(opts) {
|
|
70
|
+
return directive("counter", opts);
|
|
71
|
+
}
|
|
72
|
+
function leader() {
|
|
73
|
+
return directive("leader", {});
|
|
74
|
+
}
|
|
75
|
+
function running(opts, ...children) {
|
|
76
|
+
const tag = opts.tag ?? "span";
|
|
77
|
+
const map = attrs({ "t:running": opts.name, "t:running-policy": opts.policy });
|
|
78
|
+
return `<${tag}${map}>${join(children)}</${tag}>`;
|
|
79
|
+
}
|
|
80
|
+
function page() {
|
|
81
|
+
return directive("page", {});
|
|
82
|
+
}
|
|
83
|
+
function pages() {
|
|
84
|
+
return directive("pages", {});
|
|
85
|
+
}
|
|
86
|
+
function compileTemplate(...children) {
|
|
87
|
+
return join(children).trim();
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
caseBlock,
|
|
91
|
+
compileTemplate,
|
|
92
|
+
counter,
|
|
93
|
+
defaultBlock,
|
|
94
|
+
each,
|
|
95
|
+
elseBlock,
|
|
96
|
+
elseIf,
|
|
97
|
+
expr,
|
|
98
|
+
footnote,
|
|
99
|
+
ifBlock,
|
|
100
|
+
include,
|
|
101
|
+
leader,
|
|
102
|
+
page,
|
|
103
|
+
pageMaster,
|
|
104
|
+
pages,
|
|
105
|
+
region,
|
|
106
|
+
running,
|
|
107
|
+
runningFooter,
|
|
108
|
+
runningHeader,
|
|
109
|
+
switchBlock,
|
|
110
|
+
useMaster,
|
|
111
|
+
variant
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// `turbo-html2pdf-template` — a deliberately tiny *second* authoring frontend.\n//\n// It exists to prove the core is frontend-agnostic (AC-8.9): a different tool, with\n// no shared code, emits the *same* turbo-pdf template source string (Jinja control\n// flow + `t:` directives + plain HTML) through the unchanged core. This one is a\n// framework-free tagged-template / builder helper — no React, no JSX, ~one file.\n//\n// Unlike React, nothing here HTML-escapes, so there is no sentinel machinery: the\n// helpers concatenate literal strings directly. The author is responsible for\n// escaping plain text where needed (mirroring hand-authored HTML).\n\n/** Anything that can be a child: a literal string or a nested builder result. */\nexport type Node = string | Node[];\n\n/** Flatten a child (string or nested array) into a single source string. */\nfunction render(child: Node): string {\n return Array.isArray(child) ? child.map(render).join(\"\") : child;\n}\n\n/** Join a rest-args child list into one source string. */\nfunction join(children: Node[]): string {\n return children.map(render).join(\"\");\n}\n\n// ---------------------------------------------------------------------------\n// Control flow -> Jinja statements\n// ---------------------------------------------------------------------------\n\n/** `{% if COND %} … {% endif %}` (§2.5). */\nexport function ifBlock(cond: string, ...children: Node[]): string {\n return `{% if ${cond} %}${join(children)}{% endif %}`;\n}\n\n/** `{% elif COND %} …` — place inside an `ifBlock` body (§2.5). */\nexport function elseIf(cond: string, ...children: Node[]): string {\n return `{% elif ${cond} %}${join(children)}`;\n}\n\n/** `{% else %} …` — place inside an `ifBlock`/`each` body (§2.5/2.7). */\nexport function elseBlock(...children: Node[]): string {\n return `{% else %}${join(children)}`;\n}\n\n/** `{% for AS in OF %} … {% endfor %}` (§2.7). */\nexport function each(of: string, as: string, ...children: Node[]): string {\n return `{% for ${as} in ${of} %}${join(children)}{% endfor %}`;\n}\n\n/** `{% switch ON %} … {% endswitch %}` (§2.6). */\nexport function switchBlock(on: string, ...children: Node[]): string {\n return `{% switch ${on} %}${join(children)}{% endswitch %}`;\n}\n\n/** `{% case V1, V2, … %} …` — inside a `switchBlock` (§2.6). */\nexport function caseBlock(value: string, ...children: Node[]): string {\n return `{% case ${value} %}${join(children)}`;\n}\n\n/** `{% default %} …` — last child of a `switchBlock` (§2.6). */\nexport function defaultBlock(...children: Node[]): string {\n return `{% default %}${join(children)}`;\n}\n\n/** `{% include SRC %}` / `{% include SRC with CTX %}` (§2.8). */\nexport function include(src: string, withCtx?: string): string {\n return withCtx ? `{% include ${src} with ${withCtx} %}` : `{% include ${src} %}`;\n}\n\n/** `{{ EXPR }}` interpolation (§2.4). */\nexport function expr(value: string): string {\n return `{{ ${value} }}`;\n}\n\n// ---------------------------------------------------------------------------\n// Paged media -> `t:` directive elements (names per core's t_kind table)\n// ---------------------------------------------------------------------------\n\n/** Serialize an attribute map (skipping `undefined`) to ` name=\"value\"` pairs. */\nfunction attrs(map: Record<string, string | undefined>): string {\n let out = \"\";\n for (const [key, value] of Object.entries(map)) {\n if (value !== undefined) {\n out += ` ${key}=\"${value}\"`;\n }\n }\n return out;\n}\n\n/**\n * Build a `t:`-prefixed directive element with attrs and optional children.\n *\n * Note the open/close pair even when empty (`<t:page></t:page>`): this matches the\n * exact bytes React's `renderToStaticMarkup` emits for custom elements, so the two\n * frontends are byte-identical (AC-8.9). html5ever parses this and the self-closing\n * `<t:page/>` form to the same node, so the choice is purely about string equality.\n */\nfunction directive(\n name: string,\n attrMap: Record<string, string | undefined>,\n children?: Node[],\n): string {\n const open = `t:${name}${attrs(attrMap)}`;\n return `<${open}>${children === undefined ? \"\" : join(children)}</t:${name}>`;\n}\n\n/** `<t:running-header>` (§3.0). */\nexport function runningHeader(opts: { extent?: string }, ...children: Node[]): string {\n return directive(\"running-header\", { extent: opts.extent }, children);\n}\n\n/** `<t:running-footer>` (§3.0). */\nexport function runningFooter(opts: { extent?: string }, ...children: Node[]): string {\n return directive(\"running-footer\", { extent: opts.extent }, children);\n}\n\n/** `<t:page-master>` (§3.1). */\nexport function pageMaster(\n opts: { name: string; size?: string; orientation?: string; margin?: string },\n ...children: Node[]\n): string {\n return directive(\"page-master\", opts, children);\n}\n\n/** `<t:region slot extent>` (§3.1). */\nexport function region(opts: { slot: string; extent?: string }, ...children: Node[]): string {\n return directive(\"region\", opts, children);\n}\n\n/** `<t:variant kind>` (§3.2). */\nexport function variant(kind: string, ...children: Node[]): string {\n return directive(\"variant\", { kind }, children);\n}\n\n/** `<t:use-master name/>` (§3.4). */\nexport function useMaster(name: string): string {\n return directive(\"use-master\", { name });\n}\n\n/** `<t:footnote>` (§3.6). */\nexport function footnote(opts: { mark?: string; reset?: string }, ...children: Node[]): string {\n return directive(\"footnote\", { mark: opts.mark, \"t:footnote-reset\": opts.reset }, children);\n}\n\n/** `<t:counter name action step start/>` (§3.8). */\nexport function counter(opts: {\n name: string;\n action?: string;\n step?: string;\n start?: string;\n}): string {\n return directive(\"counter\", opts);\n}\n\n/** `<t:leader/>` (§3.10). */\nexport function leader(): string {\n return directive(\"leader\", {});\n}\n\n/** A named running element via the `t:running` attribute on a host element (§3.5). */\nexport function running(\n opts: { name: string; tag?: string; policy?: string },\n ...children: Node[]\n): string {\n const tag = opts.tag ?? \"span\";\n const map = attrs({ \"t:running\": opts.name, \"t:running-policy\": opts.policy });\n return `<${tag}${map}>${join(children)}</${tag}>`;\n}\n\n/** `<t:page/>` (§3.3). */\nexport function page(): string {\n return directive(\"page\", {});\n}\n\n/** `<t:pages/>` (§3.3). */\nexport function pages(): string {\n return directive(\"pages\", {});\n}\n\n/** Final assembly: concatenate top-level nodes and trim outer whitespace. */\nexport function compileTemplate(...children: Node[]): string {\n return join(children).trim();\n}\n"],"mappings":";AAeA,SAAS,OAAO,OAAqB;AACnC,SAAO,MAAM,QAAQ,KAAK,IAAI,MAAM,IAAI,MAAM,EAAE,KAAK,EAAE,IAAI;AAC7D;AAGA,SAAS,KAAK,UAA0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",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Minimal framework-free template-string authoring frontend for turbo-pdf (proves the core is frontend-agnostic).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "^20.0.0",
|
|
23
|
+
"tsup": "^8.0.0",
|
|
24
|
+
"vitest": "^2.0.0"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsup",
|
|
28
|
+
"test": "vitest run",
|
|
29
|
+
"typecheck": "tsgo --noEmit"
|
|
30
|
+
}
|
|
31
|
+
}
|