@dotit/core 1.0.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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +229 -0
  3. package/dist/aliases.d.ts +1 -0
  4. package/dist/aliases.js +8 -0
  5. package/dist/ask.d.ts +7 -0
  6. package/dist/ask.js +55 -0
  7. package/dist/browser.d.ts +12 -0
  8. package/dist/browser.js +32 -0
  9. package/dist/diff.d.ts +17 -0
  10. package/dist/diff.js +179 -0
  11. package/dist/document-css.d.ts +1 -0
  12. package/dist/document-css.js +290 -0
  13. package/dist/executor.d.ts +40 -0
  14. package/dist/executor.js +501 -0
  15. package/dist/history.d.ts +10 -0
  16. package/dist/history.js +297 -0
  17. package/dist/html-to-it.d.ts +1 -0
  18. package/dist/html-to-it.js +288 -0
  19. package/dist/index-builder.d.ts +62 -0
  20. package/dist/index-builder.js +228 -0
  21. package/dist/index.d.ts +39 -0
  22. package/dist/index.js +94 -0
  23. package/dist/language-registry.d.ts +39 -0
  24. package/dist/language-registry.js +530 -0
  25. package/dist/markdown.d.ts +1 -0
  26. package/dist/markdown.js +123 -0
  27. package/dist/merge.d.ts +6 -0
  28. package/dist/merge.js +255 -0
  29. package/dist/parser.d.ts +29 -0
  30. package/dist/parser.js +1562 -0
  31. package/dist/query.d.ts +32 -0
  32. package/dist/query.js +293 -0
  33. package/dist/renderer.d.ts +16 -0
  34. package/dist/renderer.js +1286 -0
  35. package/dist/schema.d.ts +47 -0
  36. package/dist/schema.js +574 -0
  37. package/dist/source.d.ts +3 -0
  38. package/dist/source.js +223 -0
  39. package/dist/theme.d.ts +49 -0
  40. package/dist/theme.js +113 -0
  41. package/dist/themes/corporate.json +86 -0
  42. package/dist/themes/dark.json +64 -0
  43. package/dist/themes/editorial.json +54 -0
  44. package/dist/themes/legal.json +57 -0
  45. package/dist/themes/minimal.json +50 -0
  46. package/dist/themes/print.json +54 -0
  47. package/dist/themes/technical.json +59 -0
  48. package/dist/themes/warm.json +53 -0
  49. package/dist/trust.d.ts +66 -0
  50. package/dist/trust.js +200 -0
  51. package/dist/types.d.ts +234 -0
  52. package/dist/types.js +19 -0
  53. package/dist/utils.d.ts +2 -0
  54. package/dist/utils.js +13 -0
  55. package/dist/validate.d.ts +13 -0
  56. package/dist/validate.js +711 -0
  57. package/dist/workflow.d.ts +18 -0
  58. package/dist/workflow.js +160 -0
  59. package/package.json +51 -0
package/dist/source.js ADDED
@@ -0,0 +1,223 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.documentToSource = documentToSource;
4
+ exports.blockToSource = blockToSource;
5
+ function escapeIntentText(text) {
6
+ return text.replace(/\\/g, "\\\\").replace(/\|/g, "\\|");
7
+ }
8
+ const PROPERTY_ORDER = {
9
+ step: ["tool", "input", "output", "depends", "id", "status", "timeout"],
10
+ task: ["owner", "due", "priority", "status"],
11
+ done: ["owner", "time"],
12
+ decision: ["if", "then", "else"],
13
+ trigger: ["event", "condition"],
14
+ loop: ["over", "do", "max"],
15
+ wait: ["timeout", "fallback"],
16
+ parallel: ["steps", "join"],
17
+ retry: ["max", "delay", "backoff"],
18
+ gate: ["approver", "timeout"],
19
+ call: ["to", "input", "output"],
20
+ handoff: ["from", "to"],
21
+ signal: ["event", "data"],
22
+ policy: [
23
+ "if",
24
+ "always",
25
+ "never",
26
+ "action",
27
+ "requires",
28
+ "notify",
29
+ "priority",
30
+ "scope",
31
+ "after",
32
+ "id",
33
+ ],
34
+ image: ["src", "at", "caption", "width", "height"],
35
+ link: ["to"],
36
+ ref: ["to"],
37
+ embed: ["to"],
38
+ quote: ["by"],
39
+ font: ["size", "family", "weight", "color"],
40
+ page: ["size", "margin", "orientation"],
41
+ sign: ["role", "at", "hash"],
42
+ approve: ["by", "role", "at", "ref"],
43
+ freeze: ["at", "hash", "status"],
44
+ track: ["version", "by"],
45
+ meta: [],
46
+ header: ["left", "center", "right", "skip-first"],
47
+ footer: ["left", "center", "right", "skip-first"],
48
+ watermark: ["color", "angle", "size"],
49
+ };
50
+ const SKIP_INTERNAL = new Set(["id", "x-type", "x-ns"]);
51
+ const HEADER_TYPES = new Set([
52
+ "agent",
53
+ "context",
54
+ "font",
55
+ "page",
56
+ "meta",
57
+ "header",
58
+ "footer",
59
+ "watermark",
60
+ ]);
61
+ function documentToSource(doc) {
62
+ if (!doc || !Array.isArray(doc.blocks))
63
+ return "";
64
+ const lines = [];
65
+ const headerBlocks = [];
66
+ const contentBlocks = [];
67
+ for (const block of doc.blocks) {
68
+ if (HEADER_TYPES.has(block.type)) {
69
+ headerBlocks.push(block);
70
+ }
71
+ else {
72
+ contentBlocks.push(block);
73
+ }
74
+ }
75
+ const headerOrder = [
76
+ "agent",
77
+ "context",
78
+ "font",
79
+ "page",
80
+ "header",
81
+ "footer",
82
+ "watermark",
83
+ "meta",
84
+ ];
85
+ for (const hType of headerOrder) {
86
+ for (const block of headerBlocks) {
87
+ if (block.type === hType) {
88
+ lines.push(serializeBlock(block));
89
+ }
90
+ }
91
+ }
92
+ if (headerBlocks.length > 0 && contentBlocks.length > 0) {
93
+ lines.push("");
94
+ }
95
+ for (const block of contentBlocks) {
96
+ emitBlock(block, lines);
97
+ }
98
+ return lines.join("\n");
99
+ }
100
+ function emitBlock(block, lines) {
101
+ lines.push(serializeBlock(block));
102
+ if (block.children &&
103
+ block.children.length > 0 &&
104
+ block.type !== "list-item" &&
105
+ block.type !== "step-item") {
106
+ for (const child of block.children) {
107
+ emitBlock(child, lines);
108
+ }
109
+ }
110
+ }
111
+ function blockToSource(block) {
112
+ return serializeBlock(block);
113
+ }
114
+ function serializeBlock(block) {
115
+ const type = block.type;
116
+ if (type === "divider") {
117
+ const props = serializeProperties(block);
118
+ return props ? `divider: ${props}` : "---";
119
+ }
120
+ if (type === "break") {
121
+ const props = serializeProperties(block);
122
+ return props ? `break: | ${props}` : "break:";
123
+ }
124
+ if (type === "toc") {
125
+ const props = serializeProperties(block);
126
+ return props ? `toc: ${props}` : "toc:";
127
+ }
128
+ if (type === "code") {
129
+ const lang = block.properties?.lang ? String(block.properties.lang) : "";
130
+ return "```" + lang + "\n" + block.content + "\n```";
131
+ }
132
+ if (type === "custom") {
133
+ const keyword = block.properties?.keyword
134
+ ? String(block.properties.keyword)
135
+ : "";
136
+ const content = escapeIntentText(block.content ?? "");
137
+ const propStr = serializeProperties(block, ["keyword"]);
138
+ const head = keyword ? `${keyword}: ${content}` : content;
139
+ return propStr ? `${head} | ${propStr}` : head;
140
+ }
141
+ if (type === "list-item") {
142
+ const child = block.children?.[0];
143
+ return `- ${child ? serializeBulletInner(child) : block.originalContent ?? block.content ?? ""}`;
144
+ }
145
+ if (type === "step-item") {
146
+ const child = block.children?.[0];
147
+ return `1. ${child ? serializeBulletInner(child) : block.originalContent ?? block.content ?? ""}`;
148
+ }
149
+ if (type === "table" && block.table) {
150
+ return serializeTable(block);
151
+ }
152
+ const content = block.originalContent ?? block.content ?? "";
153
+ const kw = block.keywordAlias ?? type;
154
+ const exclude = block.keywordAlias &&
155
+ type === "info" &&
156
+ block.properties?.type != null &&
157
+ block.keywordAlias.toLowerCase() === String(block.properties.type)
158
+ ? ["type"]
159
+ : [];
160
+ const escContent = escapeIntentText(content);
161
+ const propStr = serializeProperties(block, exclude);
162
+ if (propStr) {
163
+ return escContent
164
+ ? `${kw}: ${escContent} | ${propStr}`
165
+ : `${kw}: | ${propStr}`;
166
+ }
167
+ return escContent ? `${kw}: ${escContent}` : `${kw}:`;
168
+ }
169
+ function serializeBulletInner(child) {
170
+ if (child.type === "text") {
171
+ const content = child.originalContent ?? child.content ?? "";
172
+ const propStr = serializeProperties(child);
173
+ return propStr ? `${content} | ${propStr}` : content;
174
+ }
175
+ return serializeBlock(child);
176
+ }
177
+ function serializeProperties(block, exclude = []) {
178
+ const props = block.properties;
179
+ if (!props)
180
+ return "";
181
+ const excludeSet = new Set(exclude);
182
+ const keys = Object.keys(props).filter((k) => {
183
+ if (SKIP_INTERNAL.has(k))
184
+ return false;
185
+ if (excludeSet.has(k))
186
+ return false;
187
+ if (k === "status" && props[k] === "pending")
188
+ return false;
189
+ return true;
190
+ });
191
+ if (keys.length === 0)
192
+ return "";
193
+ const order = PROPERTY_ORDER[block.type];
194
+ if (order) {
195
+ const orderMap = new Map(order.map((k, i) => [k, i]));
196
+ keys.sort((a, b) => {
197
+ const ia = orderMap.get(a) ?? 999;
198
+ const ib = orderMap.get(b) ?? 999;
199
+ if (ia !== ib)
200
+ return ia - ib;
201
+ return a.localeCompare(b);
202
+ });
203
+ }
204
+ else {
205
+ keys.sort();
206
+ }
207
+ return keys
208
+ .map((k) => `${k}: ${escapeIntentText(String(props[k]))}`)
209
+ .join(" | ");
210
+ }
211
+ function serializeTable(block) {
212
+ const lines = [];
213
+ const table = block.table;
214
+ const hk = table.headersKeyword ?? "headers";
215
+ const rk = table.rowKeyword ?? "row";
216
+ if (table.headers && table.headers.length > 0) {
217
+ lines.push(`${hk}: ${table.headers.join(" | ")}`);
218
+ }
219
+ for (const row of table.rows) {
220
+ lines.push(`${rk}: ${row.join(" | ")}`);
221
+ }
222
+ return lines.join("\n");
223
+ }
@@ -0,0 +1,49 @@
1
+ export interface ThemeFonts {
2
+ body: string;
3
+ heading: string;
4
+ mono: string;
5
+ size: string;
6
+ leading: string;
7
+ }
8
+ export interface ThemeColors {
9
+ text: string;
10
+ heading: string;
11
+ muted: string;
12
+ accent: string;
13
+ border: string;
14
+ background: string;
15
+ "code-bg": string;
16
+ "trust-approved"?: string;
17
+ "trust-signed"?: string;
18
+ "trust-frozen"?: string;
19
+ "trust-warning"?: string;
20
+ watermark?: string;
21
+ [key: string]: string | undefined;
22
+ }
23
+ export interface ThemeSpacing {
24
+ "page-margin": string;
25
+ "section-gap": string;
26
+ "block-gap": string;
27
+ indent: string;
28
+ }
29
+ export interface ThemePrint {
30
+ "header-font-size"?: string;
31
+ "footer-font-size"?: string;
32
+ "header-color"?: string;
33
+ "footer-color"?: string;
34
+ }
35
+ export interface IntentTheme {
36
+ name: string;
37
+ version: string;
38
+ description?: string;
39
+ author?: string;
40
+ fonts: ThemeFonts;
41
+ colors: ThemeColors;
42
+ spacing: ThemeSpacing;
43
+ blocks?: Record<string, Record<string, string | boolean>>;
44
+ print?: ThemePrint;
45
+ }
46
+ export declare function registerBuiltinTheme(theme: IntentTheme): void;
47
+ export declare function getBuiltinTheme(name: string): IntentTheme | undefined;
48
+ export declare function listBuiltinThemes(): string[];
49
+ export declare function generateThemeCSS(theme: IntentTheme, mode?: "web" | "print"): string;
package/dist/theme.js ADDED
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.registerBuiltinTheme = registerBuiltinTheme;
7
+ exports.getBuiltinTheme = getBuiltinTheme;
8
+ exports.listBuiltinThemes = listBuiltinThemes;
9
+ exports.generateThemeCSS = generateThemeCSS;
10
+ const corporate_json_1 = __importDefault(require("./themes/corporate.json"));
11
+ const minimal_json_1 = __importDefault(require("./themes/minimal.json"));
12
+ const warm_json_1 = __importDefault(require("./themes/warm.json"));
13
+ const technical_json_1 = __importDefault(require("./themes/technical.json"));
14
+ const print_json_1 = __importDefault(require("./themes/print.json"));
15
+ const legal_json_1 = __importDefault(require("./themes/legal.json"));
16
+ const editorial_json_1 = __importDefault(require("./themes/editorial.json"));
17
+ const dark_json_1 = __importDefault(require("./themes/dark.json"));
18
+ const BUILTIN_THEMES = {};
19
+ function registerBuiltinTheme(theme) {
20
+ BUILTIN_THEMES[theme.name] = theme;
21
+ }
22
+ function getBuiltinTheme(name) {
23
+ return BUILTIN_THEMES[name];
24
+ }
25
+ function listBuiltinThemes() {
26
+ return Object.keys(BUILTIN_THEMES);
27
+ }
28
+ function resolveColor(value, colors) {
29
+ if (value in colors)
30
+ return colors[value] ?? value;
31
+ return value;
32
+ }
33
+ function fontStack(font, type) {
34
+ if (type === "mono")
35
+ return `'${font}', monospace`;
36
+ return `${font}, system-ui, sans-serif`;
37
+ }
38
+ function generateThemeCSS(theme, mode = "web") {
39
+ const c = theme.colors;
40
+ const f = theme.fonts;
41
+ const s = theme.spacing;
42
+ const p = theme.print;
43
+ let css = `:root{`;
44
+ css += `--it-font-body:${fontStack(f.body, "body")};`;
45
+ css += `--it-font-heading:${fontStack(f.heading, "heading")};`;
46
+ css += `--it-font-mono:${fontStack(f.mono, "mono")};`;
47
+ css += `--it-font-size:${f.size};`;
48
+ css += `--it-leading:${f.leading};`;
49
+ for (const [key, val] of Object.entries(c)) {
50
+ if (val !== undefined)
51
+ css += `--it-color-${key}:${val};`;
52
+ }
53
+ css += `--it-spacing-page-margin:${s["page-margin"]};`;
54
+ css += `--it-spacing-section-gap:${s["section-gap"]};`;
55
+ css += `--it-spacing-block-gap:${s["block-gap"]};`;
56
+ css += `--it-spacing-indent:${s.indent};`;
57
+ css += `}\n`;
58
+ css += `.intent-document{font-family:var(--it-font-body);font-size:var(--it-font-size);line-height:var(--it-leading);color:var(--it-color-text);background:var(--it-color-background);}\n`;
59
+ css += `.intent-title,.intent-section,.intent-sub{font-family:var(--it-font-heading);color:var(--it-color-heading);}\n`;
60
+ css += `.intent-section{margin-top:var(--it-spacing-section-gap);}\n`;
61
+ css += `.intent-note,.intent-prose{margin-bottom:var(--it-spacing-block-gap);}\n`;
62
+ css += `code,.intent-code{font-family:var(--it-font-mono);background:var(--it-color-code-bg);}\n`;
63
+ css += `.intent-summary{border-left-color:var(--it-color-muted);color:var(--it-color-muted);}\n`;
64
+ css += `.intent-divider-line{border-color:var(--it-color-border);}\n`;
65
+ if (theme.blocks) {
66
+ for (const [blockType, styles] of Object.entries(theme.blocks)) {
67
+ const selector = `.intent-${blockType}`;
68
+ const declarations = [];
69
+ for (const [prop, val] of Object.entries(styles)) {
70
+ if (typeof val === "boolean") {
71
+ if (val && prop === "border-bottom")
72
+ declarations.push(`border-bottom:1px solid var(--it-color-border)`);
73
+ }
74
+ else {
75
+ const resolved = resolveColor(val, c);
76
+ declarations.push(`${prop}:${resolved}`);
77
+ }
78
+ }
79
+ if (declarations.length > 0) {
80
+ css += `${selector}{${declarations.join(";")}}\n`;
81
+ }
82
+ }
83
+ }
84
+ if (mode === "print" && p) {
85
+ const hColor = p["header-color"] ? resolveColor(p["header-color"], c) : "";
86
+ const fColor = p["footer-color"] ? resolveColor(p["footer-color"], c) : "";
87
+ if (p["header-font-size"] || hColor) {
88
+ let decl = "";
89
+ if (p["header-font-size"])
90
+ decl += `font-size:${p["header-font-size"]};`;
91
+ if (hColor)
92
+ decl += `color:${hColor};`;
93
+ css += `@page{@top-left{${decl}}@top-center{${decl}}@top-right{${decl}}}\n`;
94
+ }
95
+ if (p["footer-font-size"] || fColor) {
96
+ let decl = "";
97
+ if (p["footer-font-size"])
98
+ decl += `font-size:${p["footer-font-size"]};`;
99
+ if (fColor)
100
+ decl += `color:${fColor};`;
101
+ css += `@page{@bottom-left{${decl}}@bottom-center{${decl}}@bottom-right{${decl}}}\n`;
102
+ }
103
+ }
104
+ return css;
105
+ }
106
+ registerBuiltinTheme(corporate_json_1.default);
107
+ registerBuiltinTheme(minimal_json_1.default);
108
+ registerBuiltinTheme(warm_json_1.default);
109
+ registerBuiltinTheme(technical_json_1.default);
110
+ registerBuiltinTheme(print_json_1.default);
111
+ registerBuiltinTheme(legal_json_1.default);
112
+ registerBuiltinTheme(editorial_json_1.default);
113
+ registerBuiltinTheme(dark_json_1.default);
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "corporate",
3
+ "version": "1.0.0",
4
+ "description": "Clean, professional — contracts, reports, and business documents",
5
+ "author": "IntentText",
6
+ "fonts": {
7
+ "body": "Inter",
8
+ "heading": "Inter",
9
+ "mono": "JetBrains Mono",
10
+ "size": "11pt",
11
+ "leading": "1.6"
12
+ },
13
+ "colors": {
14
+ "text": "#1a1a2e",
15
+ "heading": "#0f0f23",
16
+ "muted": "#6b7280",
17
+ "accent": "#2563eb",
18
+ "border": "#e5e7eb",
19
+ "background": "#ffffff",
20
+ "code-bg": "#f8fafc",
21
+ "trust-approved": "#16a34a",
22
+ "trust-signed": "#2563eb",
23
+ "trust-frozen": "#7c3aed",
24
+ "trust-warning": "#dc2626",
25
+ "watermark": "#00000010"
26
+ },
27
+ "spacing": {
28
+ "page-margin": "25mm",
29
+ "section-gap": "2em",
30
+ "block-gap": "0.75em",
31
+ "indent": "1.5em"
32
+ },
33
+ "blocks": {
34
+ "section": {
35
+ "border-bottom": true,
36
+ "font-weight": "600",
37
+ "margin-top": "2em"
38
+ },
39
+ "warning": {
40
+ "border-left": "4px solid",
41
+ "border-color": "trust-warning",
42
+ "padding-left": "1em",
43
+ "background": "#fef2f2"
44
+ },
45
+ "quote": {
46
+ "border-left": "3px solid",
47
+ "border-color": "accent",
48
+ "padding-left": "1em",
49
+ "font-style": "italic",
50
+ "color": "muted"
51
+ },
52
+ "code": {
53
+ "background": "code-bg",
54
+ "font-family": "mono",
55
+ "padding": "0.2em 0.4em",
56
+ "border-radius": "3px"
57
+ },
58
+ "sign": {
59
+ "border": "1px solid",
60
+ "border-color": "trust-signed",
61
+ "padding": "0.75em",
62
+ "border-radius": "4px"
63
+ },
64
+ "approve": {
65
+ "background": "#f0fdf4",
66
+ "border": "1px solid",
67
+ "border-color": "trust-approved",
68
+ "padding": "0.5em 0.75em",
69
+ "border-radius": "4px"
70
+ },
71
+ "freeze": {
72
+ "background": "#f5f3ff",
73
+ "border": "2px solid",
74
+ "border-color": "trust-frozen",
75
+ "padding": "1em",
76
+ "border-radius": "4px",
77
+ "text-align": "center"
78
+ }
79
+ },
80
+ "print": {
81
+ "header-font-size": "8pt",
82
+ "footer-font-size": "8pt",
83
+ "header-color": "muted",
84
+ "footer-color": "muted"
85
+ }
86
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "dark",
3
+ "version": "1.0.0",
4
+ "description": "Dark background, light text — screen-only documents, agent outputs, dashboards",
5
+ "author": "IntentText",
6
+ "fonts": {
7
+ "body": "Inter",
8
+ "heading": "Inter",
9
+ "mono": "JetBrains Mono",
10
+ "size": "11pt",
11
+ "leading": "1.6"
12
+ },
13
+ "colors": {
14
+ "text": "#e8e8e8",
15
+ "heading": "#f0f0f0",
16
+ "muted": "#9ca3af",
17
+ "accent": "#60a5fa",
18
+ "border": "#374151",
19
+ "background": "#0f0f0f",
20
+ "code-bg": "#1a1a2e",
21
+ "trust-approved": "#4ade80",
22
+ "trust-signed": "#60a5fa",
23
+ "trust-frozen": "#a78bfa",
24
+ "trust-warning": "#f87171",
25
+ "watermark": "#ffffff08"
26
+ },
27
+ "spacing": {
28
+ "page-margin": "20mm",
29
+ "section-gap": "2em",
30
+ "block-gap": "0.75em",
31
+ "indent": "1.5em"
32
+ },
33
+ "blocks": {
34
+ "section": {
35
+ "font-weight": "600",
36
+ "margin-top": "2em",
37
+ "border-bottom": true
38
+ },
39
+ "code": {
40
+ "background": "code-bg",
41
+ "padding": "0.3em 0.5em",
42
+ "border-radius": "4px"
43
+ },
44
+ "warning": {
45
+ "border-left": "4px solid",
46
+ "border-color": "trust-warning",
47
+ "padding-left": "1em",
48
+ "background": "#1f1010"
49
+ },
50
+ "quote": {
51
+ "border-left": "3px solid",
52
+ "border-color": "accent",
53
+ "padding-left": "1em",
54
+ "font-style": "italic",
55
+ "color": "muted"
56
+ }
57
+ },
58
+ "print": {
59
+ "header-font-size": "8pt",
60
+ "footer-font-size": "8pt",
61
+ "header-color": "#9ca3af",
62
+ "footer-color": "#9ca3af"
63
+ }
64
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "editorial",
3
+ "version": "1.0.0",
4
+ "description": "Newspaper / magazine feel — journalism, press releases, newsletters",
5
+ "author": "IntentText",
6
+ "fonts": {
7
+ "body": "Georgia",
8
+ "heading": "Playfair Display",
9
+ "mono": "Menlo",
10
+ "size": "11pt",
11
+ "leading": "1.65"
12
+ },
13
+ "colors": {
14
+ "text": "#222222",
15
+ "heading": "#111111",
16
+ "muted": "#666666",
17
+ "accent": "#c0392b",
18
+ "border": "#cccccc",
19
+ "background": "#ffffff",
20
+ "code-bg": "#f8f8f8",
21
+ "trust-approved": "#27ae60",
22
+ "trust-signed": "#2980b9",
23
+ "trust-frozen": "#8e44ad",
24
+ "trust-warning": "#c0392b",
25
+ "watermark": "#00000008"
26
+ },
27
+ "spacing": {
28
+ "page-margin": "25mm",
29
+ "section-gap": "2em",
30
+ "block-gap": "0.75em",
31
+ "indent": "1.5em"
32
+ },
33
+ "blocks": {
34
+ "section": {
35
+ "font-weight": "700",
36
+ "margin-top": "2em",
37
+ "font-size": "1.3em",
38
+ "border-bottom": true
39
+ },
40
+ "quote": {
41
+ "border-left": "4px solid",
42
+ "border-color": "accent",
43
+ "padding-left": "1em",
44
+ "font-size": "1.15em",
45
+ "font-style": "italic"
46
+ }
47
+ },
48
+ "print": {
49
+ "header-font-size": "7pt",
50
+ "footer-font-size": "7pt",
51
+ "header-color": "muted",
52
+ "footer-color": "muted"
53
+ }
54
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "legal",
3
+ "version": "1.0.0",
4
+ "description": "Formal and dense — contracts, NDAs, legal briefs, compliance documents",
5
+ "author": "IntentText",
6
+ "fonts": {
7
+ "body": "Times New Roman",
8
+ "heading": "Times New Roman",
9
+ "mono": "Courier New",
10
+ "size": "12pt",
11
+ "leading": "1.4"
12
+ },
13
+ "colors": {
14
+ "text": "#1a1a1a",
15
+ "heading": "#000000",
16
+ "muted": "#555555",
17
+ "accent": "#1a1a1a",
18
+ "border": "#999999",
19
+ "background": "#ffffff",
20
+ "code-bg": "#f5f5f5",
21
+ "trust-approved": "#1a6b1a",
22
+ "trust-signed": "#1a4a6b",
23
+ "trust-frozen": "#4a1a6b",
24
+ "trust-warning": "#8b0000",
25
+ "watermark": "#00000008"
26
+ },
27
+ "spacing": {
28
+ "page-margin": "25mm",
29
+ "section-gap": "1.5em",
30
+ "block-gap": "0.5em",
31
+ "indent": "2em"
32
+ },
33
+ "blocks": {
34
+ "section": {
35
+ "font-weight": "bold",
36
+ "margin-top": "1.5em",
37
+ "text-transform": "uppercase"
38
+ },
39
+ "sign": {
40
+ "border": "1px solid #000",
41
+ "padding": "0.75em",
42
+ "margin-top": "2em"
43
+ },
44
+ "freeze": {
45
+ "border": "2px solid #000",
46
+ "padding": "1em",
47
+ "text-align": "center",
48
+ "font-weight": "bold"
49
+ }
50
+ },
51
+ "print": {
52
+ "header-font-size": "8pt",
53
+ "footer-font-size": "8pt",
54
+ "header-color": "#555",
55
+ "footer-color": "#555"
56
+ }
57
+ }