@json-to-office/core-docx 2.6.0 → 2.7.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/dist/blocks/cover.d.ts +22 -0
- package/dist/blocks/cover.d.ts.map +1 -0
- package/dist/blocks/index.d.ts +16 -2
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/blocks/keyTakeaways.d.ts.map +1 -1
- package/dist/blocks/recipe.d.ts +31 -0
- package/dist/blocks/recipe.d.ts.map +1 -0
- package/dist/blocks/runningHead.d.ts +69 -0
- package/dist/blocks/runningHead.d.ts.map +1 -0
- package/dist/blocks/sectionOpener.d.ts +26 -0
- package/dist/blocks/sectionOpener.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +476 -25
- package/dist/index.js.map +1 -1
- package/dist/ir/compiler.d.ts.map +1 -1
- package/dist/plugin/example/index.js +470 -25
- package/dist/plugin/example/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `cover` block, lowered to primitives.
|
|
3
|
+
*
|
|
4
|
+
* A logo where the theme's `logoSlot` puts it, the cover rule from the
|
|
5
|
+
* `chrome.cover` recipe a third of the way down the page, the client as an
|
|
6
|
+
* eyebrow, the title in the recipe's type role, the subtitle in the theme's
|
|
7
|
+
* subtitle style, and a meta line — date and confidentiality — under it. The
|
|
8
|
+
* drop to the title is the block's own share of the body height the theme's
|
|
9
|
+
* page leaves — a proportion resolved against the theme, never a coordinate,
|
|
10
|
+
* and not a recipe key. Every colour, weight and role is the recipe's, with
|
|
11
|
+
* fallbacks that hold on a theme that declares no recipe at all.
|
|
12
|
+
*
|
|
13
|
+
* The block does not break the page after itself: a paragraph can only break
|
|
14
|
+
* before, and a break before the first paragraph of a new section is a blank
|
|
15
|
+
* page. Put the cover in a section of its own and the report proper starts
|
|
16
|
+
* on a fresh page with its own running head.
|
|
17
|
+
*/
|
|
18
|
+
import type { CoverProps } from '@json-to-office/shared-docx';
|
|
19
|
+
import type { ThemeConfig } from '../styles';
|
|
20
|
+
import type { BlockCompilation } from './types';
|
|
21
|
+
export declare function compileCover(props: CoverProps, theme: ThemeConfig): BlockCompilation;
|
|
22
|
+
//# sourceMappingURL=cover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cover.d.ts","sourceRoot":"","sources":["../../src/blocks/cover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAS7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAgBhD,wBAAgB,YAAY,CAC1B,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,WAAW,GACjB,gBAAgB,CA4HlB"}
|
package/dist/blocks/index.d.ts
CHANGED
|
@@ -9,11 +9,17 @@
|
|
|
9
9
|
* that can be inspected, validated and rendered as it is. The IR compiler
|
|
10
10
|
* treats an expanded block as a transparent container.
|
|
11
11
|
*
|
|
12
|
+
* A chrome block lowers to page chrome instead of flow: `running-head` fills
|
|
13
|
+
* the `header` and `footer` of its section and of every later section that
|
|
14
|
+
* authors none, and lowers to an empty `children` where it stands. That is
|
|
15
|
+
* still additive — a section gains a `props.header` it did not have; nothing
|
|
16
|
+
* moves — and the source map covers the generated chrome too.
|
|
17
|
+
*
|
|
12
18
|
* Pure: the same document and theme always expand to the same tree, and no
|
|
13
19
|
* authored object is mutated.
|
|
14
20
|
*/
|
|
15
21
|
import type { ThemeConfig } from '../styles';
|
|
16
|
-
export declare const BLOCK_NAMES: readonly ["key-takeaways"];
|
|
22
|
+
export declare const BLOCK_NAMES: readonly ["key-takeaways", "cover", "section-opener", "running-head"];
|
|
17
23
|
export type BlockName = (typeof BLOCK_NAMES)[number];
|
|
18
24
|
/** A text slot's word budget, for the quality rules to check against. */
|
|
19
25
|
export interface BlockSlotBudget {
|
|
@@ -26,7 +32,13 @@ export interface BlockSlotBudget {
|
|
|
26
32
|
}
|
|
27
33
|
export type { BlockCompilation } from './types';
|
|
28
34
|
export { compileKeyTakeaways, KEY_TAKEAWAYS_DEFAULT_LABEL, } from './keyTakeaways';
|
|
35
|
+
export { compileCover } from './cover';
|
|
36
|
+
export { compileSectionOpener, sectionTracker } from './sectionOpener';
|
|
37
|
+
export { compileRunningHead, sectionMeasureTwips, PAGE_OF_TOTAL, } from './runningHead';
|
|
38
|
+
export type { RunningHeadCompilation, RunningHeadScope, SectionPage, } from './runningHead';
|
|
29
39
|
export declare function isBlockName(name: unknown): name is BlockName;
|
|
40
|
+
/** Whether `name` is a block that lowers to page chrome rather than flow. */
|
|
41
|
+
export declare function isChromeBlockName(name: unknown): boolean;
|
|
30
42
|
/** Emitted JSON Pointer (RFC 6901, absolute) → authored pointer. */
|
|
31
43
|
export type BlockSourceMap = Readonly<Record<string, string>>;
|
|
32
44
|
export interface ExpandedBlocks<T> {
|
|
@@ -37,7 +49,9 @@ export interface ExpandedBlocks<T> {
|
|
|
37
49
|
}
|
|
38
50
|
/**
|
|
39
51
|
* Expand every enabled block in `document`. A disabled block is left as it
|
|
40
|
-
* is: it renders nothing, so it has nothing to lower to.
|
|
52
|
+
* is: it renders nothing, so it has nothing to lower to. A chrome block
|
|
53
|
+
* anywhere but directly under a top-level section is left as it is too, so
|
|
54
|
+
* the compiler reports it rather than the page silently losing its chrome.
|
|
41
55
|
*/
|
|
42
56
|
export declare function expandBlocks<T>(document: T, theme: ThemeConfig): ExpandedBlocks<T>;
|
|
43
57
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","s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AAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AA2FD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,QAAQ,EAAE,CAAC,EACX,KAAK,EAAE,WAAW,GACjB,cAAc,CAAC,CAAC,CAAC,CAmHnB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,cAAc,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,CAYR;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,eAAe,EAAE,CAQnB;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyTakeaways.d.ts","sourceRoot":"","sources":["../../src/blocks/keyTakeaways.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"keyTakeaways.d.ts","sourceRoot":"","sources":["../../src/blocks/keyTakeaways.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,2BAA2B,kBAAkB,CAAC;AAU3D,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,EACxB,KAAK,EAAE,WAAW,GACjB,gBAAgB,CA+DlB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What every block reads from the theme, and how it falls back.
|
|
3
|
+
*
|
|
4
|
+
* A block never states a size, a colour or a coordinate of its own: it names a
|
|
5
|
+
* type role and a chrome recipe, and the resolved theme supplies the values.
|
|
6
|
+
* On a theme that declares neither, the block still has to draw — so each
|
|
7
|
+
* helper here carries the plain fallback that holds anywhere: a named style
|
|
8
|
+
* when the theme resolved one, explicit run formatting when it did not.
|
|
9
|
+
*/
|
|
10
|
+
import type { ThemeConfig } from '../styles';
|
|
11
|
+
/** What a block's rule may weigh: the `divider` component's whole range. */
|
|
12
|
+
export declare const MIN_RULE_PT = 0.25;
|
|
13
|
+
export declare const MAX_RULE_PT = 12;
|
|
14
|
+
export declare function clampRule(weightPt: number): number;
|
|
15
|
+
/** The eyebrow a theme without the role gets: small, bold, accent, caps. */
|
|
16
|
+
export declare const FALLBACK_EYEBROW_FONT: {
|
|
17
|
+
readonly size: 9;
|
|
18
|
+
readonly bold: true;
|
|
19
|
+
readonly color: "accent";
|
|
20
|
+
readonly case: "upper";
|
|
21
|
+
};
|
|
22
|
+
/** Whether the resolved theme carries a named style for `role`. */
|
|
23
|
+
export declare function hasStyle(theme: ThemeConfig, role: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The paragraph props that set text in `role`: `themeStyle` when the theme
|
|
26
|
+
* resolved that role, else the explicit `font` the caller falls back to. A
|
|
27
|
+
* recipe colour, when given, is stated either way — it is the theme's own
|
|
28
|
+
* word on the matter.
|
|
29
|
+
*/
|
|
30
|
+
export declare function roleProps(theme: ThemeConfig, role: string, fallbackFont: Record<string, unknown>, color?: string): Record<string, unknown>;
|
|
31
|
+
//# sourceMappingURL=recipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/blocks/recipe.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,4EAA4E;AAC5E,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX,mEAAmE;AACnE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAGlE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrC,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQzB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `running-head` block, lowered to page chrome.
|
|
3
|
+
*
|
|
4
|
+
* Unlike the flow blocks, this one lowers to nothing where it stands: its
|
|
5
|
+
* output is a header and a footer for the section it sits in and every later
|
|
6
|
+
* section that authors no chrome of its own. The header is the document
|
|
7
|
+
* title on the left and the section tracker on the right, set in the
|
|
8
|
+
* `chrome.runningHead` recipe's role with a rule beneath; the footer is a
|
|
9
|
+
* rule, then the confidentiality line, the page as `n / N` and the date, set
|
|
10
|
+
* in the `chrome.confidentialFooter` recipe's role. Two or three parts sit
|
|
11
|
+
* on tab stops at the section's measure, so the tracker is flush with the
|
|
12
|
+
* right margin and the page number centred whatever the text around it. A
|
|
13
|
+
* lone page number stays centred; a lone text part takes the recipe's
|
|
14
|
+
* `alignment`.
|
|
15
|
+
*
|
|
16
|
+
* `{PAGE}` and `{TOTAL_PAGES}` are the pipeline's own placeholders: they
|
|
17
|
+
* lower to Word fields, which is the only way a page can know its number.
|
|
18
|
+
* Word counts from the first page of the document, cover included.
|
|
19
|
+
*/
|
|
20
|
+
import type { RunningHeadProps } from '@json-to-office/shared-docx';
|
|
21
|
+
import type { ThemeConfig } from '../styles';
|
|
22
|
+
import type { BlockCompilation } from './types';
|
|
23
|
+
/** What one section tells the running head about itself. */
|
|
24
|
+
export interface RunningHeadScope {
|
|
25
|
+
/** Authored pointer of the block, where chrome findings land by default. */
|
|
26
|
+
block: string;
|
|
27
|
+
/** The document's `metadata.title`, the header's left text by default. */
|
|
28
|
+
documentTitle?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The section's own tracker, from its `section-opener`, with the absolute
|
|
31
|
+
* authored pointer of the slot it came from.
|
|
32
|
+
*/
|
|
33
|
+
opener?: {
|
|
34
|
+
text: string;
|
|
35
|
+
slot: string;
|
|
36
|
+
};
|
|
37
|
+
/** The section's `props.page` override, if it has one. */
|
|
38
|
+
page?: SectionPage;
|
|
39
|
+
}
|
|
40
|
+
/** The part of a section's `props.page` the measure depends on. */
|
|
41
|
+
export interface SectionPage {
|
|
42
|
+
size?: 'A4' | 'A3' | 'LETTER' | 'LEGAL' | {
|
|
43
|
+
width: number;
|
|
44
|
+
height: number;
|
|
45
|
+
};
|
|
46
|
+
margins?: {
|
|
47
|
+
left?: number;
|
|
48
|
+
right?: number;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/** Header and footer, each as a compilation relative to its own array. */
|
|
52
|
+
export interface RunningHeadCompilation {
|
|
53
|
+
header: BlockCompilation;
|
|
54
|
+
footer: BlockCompilation;
|
|
55
|
+
}
|
|
56
|
+
export declare const PAGE_OF_TOTAL = "{PAGE} / {TOTAL_PAGES}";
|
|
57
|
+
/**
|
|
58
|
+
* The text measure a section's chrome is laid out on: the theme's page,
|
|
59
|
+
* unless the section overrides its size or side margins.
|
|
60
|
+
*/
|
|
61
|
+
export declare function sectionMeasureTwips(theme: ThemeConfig, page?: SectionPage): number;
|
|
62
|
+
/**
|
|
63
|
+
* Lower a running head for one section. Every emitted pointer maps to the
|
|
64
|
+
* slot whose text it carries — the opener's tracker when one set it, else
|
|
65
|
+
* this block's own slot — so a finding on the compiled chrome lands where the
|
|
66
|
+
* author can patch it.
|
|
67
|
+
*/
|
|
68
|
+
export declare function compileRunningHead(props: RunningHeadProps, theme: ThemeConfig, scope: RunningHeadScope): RunningHeadCompilation;
|
|
69
|
+
//# sourceMappingURL=runningHead.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runningHead.d.ts","sourceRoot":"","sources":["../../src/blocks/runningHead.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAK7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,4DAA4D;AAC5D,MAAM,WAAW,gBAAgB;IAC/B,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,0DAA0D;IAC1D,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,mEAAmE;AACnE,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5E,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C;AAED,0EAA0E;AAC1E,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AASD,eAAO,MAAM,aAAa,2BAA2B,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,WAAW,EAClB,IAAI,CAAC,EAAE,WAAW,GACjB,MAAM,CAWR;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,gBAAgB,EACvB,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,gBAAgB,GACtB,sBAAsB,CA2GxB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `section-opener` block, lowered to primitives.
|
|
3
|
+
*
|
|
4
|
+
* The number as an eyebrow in the theme's `eyebrow` role, then the title as
|
|
5
|
+
* a level-1 heading — a real heading, so the table of contents, heading
|
|
6
|
+
* numbering and cross-references all see the section the way Word does. The
|
|
7
|
+
* tracker is not drawn in the flow at all: it is what the running head in
|
|
8
|
+
* force reads for the enclosing section, resolved by {@link sectionTracker}.
|
|
9
|
+
*/
|
|
10
|
+
import type { SectionOpenerProps } from '@json-to-office/shared-docx';
|
|
11
|
+
import type { ThemeConfig } from '../styles';
|
|
12
|
+
import type { BlockCompilation } from './types';
|
|
13
|
+
export declare function compileSectionOpener(props: SectionOpenerProps, theme: ThemeConfig): BlockCompilation;
|
|
14
|
+
/**
|
|
15
|
+
* The tracker a section shows in its running head: the first enabled
|
|
16
|
+
* `section-opener` among its direct children, its `tracker` or, failing that,
|
|
17
|
+
* its `title`. Returns the authored pointer of the slot the text came from,
|
|
18
|
+
* relative to the section, so chrome findings can point at it.
|
|
19
|
+
*/
|
|
20
|
+
export declare function sectionTracker(section: {
|
|
21
|
+
children?: unknown;
|
|
22
|
+
}): {
|
|
23
|
+
text: string;
|
|
24
|
+
slot: string;
|
|
25
|
+
} | undefined;
|
|
26
|
+
//# sourceMappingURL=sectionOpener.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sectionOpener.d.ts","sourceRoot":"","sources":["../../src/blocks/sectionOpener.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,kBAAkB,EACzB,KAAK,EAAE,WAAW,GACjB,gBAAgB,CAiClB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAqB7C"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ export { prepareDocxQualityDocument, type DocxHeadingFact, type DocxQualityFact,
|
|
|
16
16
|
export { DOCX_DEFAULT_QUALITY_PROFILE, DOCX_QUALITY_PROFILES, DOCX_QUALITY_RULES, docxQualityEngine, resolveDocxQualityProfile, } from './quality/rules';
|
|
17
17
|
export { generateWarningsDocument, formatWarningsText, } from './utils/warningsDocument';
|
|
18
18
|
export { themes, minimalTheme, devportalTheme, vermilionTheme, consultingTheme, } from './styles/index';
|
|
19
|
-
export { BLOCK_NAMES, expandBlocks, toAuthoredPointer, blockSlotBudgets, compileKeyTakeaways, } from './blocks';
|
|
20
|
-
export type { BlockName, BlockSourceMap, BlockCompilation, ExpandedBlocks, BlockSlotBudget, } from './blocks';
|
|
19
|
+
export { BLOCK_NAMES, isChromeBlockName, expandBlocks, toAuthoredPointer, blockSlotBudgets, compileKeyTakeaways, compileCover, compileSectionOpener, compileRunningHead, sectionMeasureTwips, sectionTracker, } from './blocks';
|
|
20
|
+
export type { BlockName, BlockSourceMap, BlockCompilation, ExpandedBlocks, BlockSlotBudget, RunningHeadCompilation, RunningHeadScope, SectionPage, } from './blocks';
|
|
21
21
|
export type { ThemeName } from './styles/index';
|
|
22
22
|
export { loadThemeFromJson, loadThemeFromFile, exportThemeToJson, validateThemeJsonString, ThemeValidationError, ThemeParseError, ThemeFileError, createMinimalTheme, } from './themes/json/index';
|
|
23
23
|
export { examples, getExample, getExampleNames, loadJsonExample, } from './templates/documents/index';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAID,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,IAAI,qBAAqB,EAC1C,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAGjE,OAAO,EACL,cAAc,EACd,KAAK,qBAAqB,GAC3B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,kBAAkB,GACxB,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EAEL,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AAGvB,YAAY,EACV,yBAAyB,EACzB,4BAA4B,EAE5B,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,eAA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