@peripheries/core 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/README.md +9 -0
- package/index.css +1 -0
- package/index.d.ts +1 -0
- package/index.js +2213 -0
- package/package.json +24 -0
- package/types/core/Box/Box.d.ts +7 -0
- package/types/core/Center/Center.d.ts +8 -0
- package/types/core/Container/Container.d.ts +8 -0
- package/types/core/Divider/Divider.d.ts +8 -0
- package/types/core/Hide/Hide.d.ts +7 -0
- package/types/core/Inline/Inline.d.ts +12 -0
- package/types/core/Show/Show.d.ts +7 -0
- package/types/core/Spacer/Spacer.d.ts +7 -0
- package/types/core/Stack/Stack.d.ts +10 -0
- package/types/core/_shared/formatters.d.ts +15 -0
- package/types/core/_shared/props.d.ts +8 -0
- package/types/core/_shared/warn-once.d.ts +2 -0
- package/types/core/display/DataTable/DataTable.d.ts +32 -0
- package/types/core/display/DisclaimerBlock/DisclaimerBlock.d.ts +9 -0
- package/types/core/display/Eyebrow/Eyebrow.d.ts +18 -0
- package/types/core/display/HighlightBox/HighlightBox.d.ts +13 -0
- package/types/core/display/KpiCardGrid/KpiCardGrid.d.ts +32 -0
- package/types/core/display/OptionCard/OptionCard.d.ts +29 -0
- package/types/core/display/ProfileCard/ProfileCard.d.ts +23 -0
- package/types/core/display/SectionHeader/SectionHeader.d.ts +11 -0
- package/types/core/display/Stat/Stat.d.ts +26 -0
- package/types/core/display/StatStrip/StatStrip.d.ts +16 -0
- package/types/core/display/_shared/Reveal.d.ts +13 -0
- package/types/core/display/_shared/ValueBadge.d.ts +8 -0
- package/types/core/display/_shared/tone.d.ts +4 -0
- package/types/core/document/AnswerRows/AnswerRows.d.ts +18 -0
- package/types/core/document/Aside/Aside.d.ts +13 -0
- package/types/core/document/ComparisonBars/ComparisonBars.d.ts +19 -0
- package/types/core/document/Contents/Contents.d.ts +19 -0
- package/types/core/document/Definition/Definition.d.ts +16 -0
- package/types/core/document/DocumentBlocks/DocumentBlocks.d.ts +17 -0
- package/types/core/document/DocumentLabel/DocumentLabel.d.ts +12 -0
- package/types/core/document/DocumentSection/DocumentSection.d.ts +28 -0
- package/types/core/document/DocumentShell/DocumentShell.d.ts +11 -0
- package/types/core/document/DocumentTable/DocumentTable.d.ts +17 -0
- package/types/core/document/ExecutionBlock/ExecutionBlock.d.ts +21 -0
- package/types/core/document/Figure/Figure.d.ts +11 -0
- package/types/core/document/Footnote/Footnote.d.ts +5 -0
- package/types/core/document/Masthead/Masthead.d.ts +12 -0
- package/types/core/document/Math/Math.d.ts +7 -0
- package/types/core/document/MetaRail/MetaRail.d.ts +14 -0
- package/types/core/document/NextSteps/NextSteps.d.ts +15 -0
- package/types/core/document/Notes/Notes.d.ts +12 -0
- package/types/core/document/PageBreak/PageBreak.d.ts +5 -0
- package/types/core/document/Prose/Prose.d.ts +11 -0
- package/types/core/document/Quote/Quote.d.ts +8 -0
- package/types/core/document/Reference/Reference.d.ts +18 -0
- package/types/core/document/RowList/RowList.d.ts +19 -0
- package/types/core/document/RunningFooter/RunningFooter.d.ts +12 -0
- package/types/core/document/SkippedSection/SkippedSection.d.ts +11 -0
- package/types/core/document/TalkItThrough/TalkItThrough.d.ts +18 -0
- package/types/core/document/WriteInField/WriteInField.d.ts +13 -0
- package/types/core/document/_shared/block-schemas.d.ts +3 -0
- package/types/core/document/_shared/blocks.d.ts +88 -0
- package/types/core/document/_shared/footnote-context.d.ts +19 -0
- package/types/core/document/_shared/host.d.ts +15 -0
- package/types/core/document/_shared/ordinal-format.d.ts +7 -0
- package/types/core/document/_shared/profile.d.ts +15 -0
- package/types/core/document/_shared/section-anchors.d.ts +1 -0
- package/types/core/document/profiles/builtin.d.ts +5 -0
- package/types/core/document/profiles/profile.d.ts +68 -0
- package/types/core/document/profiles/registry.d.ts +9 -0
- package/types/core/document/profiles/tokens.d.ts +3 -0
- package/types/index.core.d.ts +54 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
import { type DocumentProfile, type ProfileId } from '../_shared/profile';
|
|
3
|
+
export interface MetaField {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export interface MetaRailProps {
|
|
8
|
+
fields: ReadonlyArray<MetaField>;
|
|
9
|
+
profileId?: ProfileId;
|
|
10
|
+
profile?: DocumentProfile;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
export declare function MetaRail({ fields, profileId, profile, className, style }: MetaRailProps): ReactElement | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { type DocumentProfile, type ProfileId } from '../_shared/profile';
|
|
3
|
+
export interface NextStepItem {
|
|
4
|
+
body: ReactNode;
|
|
5
|
+
marker?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface NextStepsProps {
|
|
8
|
+
items: ReadonlyArray<NextStepItem>;
|
|
9
|
+
profileId?: ProfileId;
|
|
10
|
+
profile?: DocumentProfile;
|
|
11
|
+
checkboxes?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
export declare function NextSteps({ items, profileId, profile, checkboxes, className, style }: NextStepsProps): ReactElement | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
import { type DocumentProfile, type ProfileId } from '../_shared/profile';
|
|
3
|
+
export declare const WRITE_LINE_HEIGHT_PX = 38;
|
|
4
|
+
export interface NotesProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
lines?: number;
|
|
7
|
+
profileId?: ProfileId;
|
|
8
|
+
profile?: DocumentProfile;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export declare function Notes({ title, lines, profileId, profile, className, style }: NotesProps): ReactElement | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { type DocumentProfile, type ProfileId } from '../_shared/profile';
|
|
3
|
+
export interface ProseProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
profileId?: ProfileId;
|
|
6
|
+
profile?: DocumentProfile;
|
|
7
|
+
full?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare function Prose({ children, profileId, profile, full, className, style }: ProseProps): ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
+
export interface QuoteProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
citation?: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
export declare function Quote({ children, citation, className, style }: QuoteProps): ReactElement;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
import type { SectionReference } from '../_shared/host';
|
|
3
|
+
import { type ReferenceForm } from '../_shared/ordinal-format';
|
|
4
|
+
import { type DocumentProfile, type ProfileId } from '../_shared/profile';
|
|
5
|
+
export interface ReferenceProps {
|
|
6
|
+
target: string;
|
|
7
|
+
form?: ReferenceForm;
|
|
8
|
+
sectionReferences?: Readonly<Record<string, SectionReference>>;
|
|
9
|
+
sectionNumbers?: Readonly<Record<string, ReadonlyArray<number>>>;
|
|
10
|
+
sectionTitles?: Readonly<Record<string, string>>;
|
|
11
|
+
sectionAnchors?: Readonly<Record<string, string>>;
|
|
12
|
+
profileId?: ProfileId;
|
|
13
|
+
profile?: DocumentProfile;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
export declare function Reference({ target, form, sectionReferences, sectionNumbers, sectionTitles, sectionAnchors, profileId, profile, className, style, }: ReferenceProps): ReactElement;
|
|
18
|
+
export default Reference;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { type DocumentProfile, type ProfileId } from '../_shared/profile';
|
|
3
|
+
export interface RowListItem {
|
|
4
|
+
marker?: string;
|
|
5
|
+
primary: ReactNode;
|
|
6
|
+
secondary?: ReactNode;
|
|
7
|
+
missing?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface RowListProps {
|
|
10
|
+
items: ReadonlyArray<RowListItem>;
|
|
11
|
+
profileId?: ProfileId;
|
|
12
|
+
profile?: DocumentProfile;
|
|
13
|
+
markerWidth?: number;
|
|
14
|
+
secondaryWidth?: number;
|
|
15
|
+
missingLabel?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
export declare function RowList({ items, profileId, profile, markerWidth, secondaryWidth, missingLabel, className, style, }: RowListProps): ReactElement | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { type DocumentProfile, type ProfileId } from '../_shared/profile';
|
|
3
|
+
export interface RunningFooterProps {
|
|
4
|
+
left?: ReactNode;
|
|
5
|
+
centre?: ReactNode;
|
|
6
|
+
right?: ReactNode;
|
|
7
|
+
profileId?: ProfileId;
|
|
8
|
+
profile?: DocumentProfile;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export declare function RunningFooter({ left, centre, right, profileId, profile, className, style }: RunningFooterProps): ReactElement | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
import { type DocumentProfile, type ProfileId } from '../_shared/profile';
|
|
3
|
+
export interface SkippedSectionProps {
|
|
4
|
+
wouldTell: string;
|
|
5
|
+
openingLine?: string;
|
|
6
|
+
profileId?: ProfileId;
|
|
7
|
+
profile?: DocumentProfile;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare function SkippedSection({ wouldTell, openingLine, profileId, profile, className, style }: SkippedSectionProps): ReactElement;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { type DocumentProfile, type ProfileId } from '../_shared/profile';
|
|
3
|
+
export interface TalkItThroughAdvisor {
|
|
4
|
+
name: string;
|
|
5
|
+
role?: string;
|
|
6
|
+
phone?: string;
|
|
7
|
+
email?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TalkItThroughProps {
|
|
10
|
+
advisor: TalkItThroughAdvisor;
|
|
11
|
+
title?: string;
|
|
12
|
+
invitation?: ReactNode;
|
|
13
|
+
profileId?: ProfileId;
|
|
14
|
+
profile?: DocumentProfile;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
export declare function TalkItThrough({ advisor, title, invitation, profileId, profile, className, style, }: TalkItThroughProps): ReactElement | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
import { type DocumentProfile, type ProfileId } from '../_shared/profile';
|
|
3
|
+
export declare const WRITE_HEIGHT_PX = 38;
|
|
4
|
+
export interface WriteInFieldProps {
|
|
5
|
+
question?: string;
|
|
6
|
+
answer?: string;
|
|
7
|
+
lines?: number;
|
|
8
|
+
profileId?: ProfileId;
|
|
9
|
+
profile?: DocumentProfile;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
export declare function WriteInField({ question, answer, lines, profileId, profile, className, style }: WriteInFieldProps): ReactElement;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export interface ProseBlock {
|
|
2
|
+
kind: 'prose';
|
|
3
|
+
text: string;
|
|
4
|
+
full?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ClauseItem {
|
|
7
|
+
marker?: string;
|
|
8
|
+
level?: number;
|
|
9
|
+
id?: string;
|
|
10
|
+
text: string;
|
|
11
|
+
note?: string;
|
|
12
|
+
missing?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ClauseBlock {
|
|
15
|
+
kind: 'clause';
|
|
16
|
+
items: ReadonlyArray<ClauseItem>;
|
|
17
|
+
}
|
|
18
|
+
export interface DefinitionsBlock {
|
|
19
|
+
kind: 'definitions';
|
|
20
|
+
pairs: ReadonlyArray<{
|
|
21
|
+
term: string;
|
|
22
|
+
description: string;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
export interface TableBlock {
|
|
26
|
+
kind: 'table';
|
|
27
|
+
caption?: string;
|
|
28
|
+
columns: ReadonlyArray<{
|
|
29
|
+
header: string;
|
|
30
|
+
align?: 'left' | 'right' | 'center';
|
|
31
|
+
}>;
|
|
32
|
+
rows: ReadonlyArray<ReadonlyArray<string>>;
|
|
33
|
+
}
|
|
34
|
+
export interface NoticeBlock {
|
|
35
|
+
kind: 'notice';
|
|
36
|
+
tone: 'note' | 'warning' | 'important';
|
|
37
|
+
title?: string;
|
|
38
|
+
text: string;
|
|
39
|
+
}
|
|
40
|
+
export interface FigureBlock {
|
|
41
|
+
kind: 'figure';
|
|
42
|
+
caption: string;
|
|
43
|
+
src?: string;
|
|
44
|
+
placeholder?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ExecutionSignatoryInput {
|
|
47
|
+
role: string;
|
|
48
|
+
name?: string;
|
|
49
|
+
detail?: string;
|
|
50
|
+
dated?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface ExecutionBlockInput {
|
|
53
|
+
kind: 'execution';
|
|
54
|
+
label?: string;
|
|
55
|
+
attestation?: string;
|
|
56
|
+
signatories: ReadonlyArray<ExecutionSignatoryInput>;
|
|
57
|
+
columns?: 1 | 2;
|
|
58
|
+
note?: string;
|
|
59
|
+
}
|
|
60
|
+
export type Block = ProseBlock | ClauseBlock | DefinitionsBlock | TableBlock | NoticeBlock | FigureBlock | ExecutionBlockInput;
|
|
61
|
+
export type BlockKind = Block['kind'];
|
|
62
|
+
export declare const BLOCK_KINDS: ReadonlyArray<BlockKind>;
|
|
63
|
+
export declare const REF_TOKEN: RegExp;
|
|
64
|
+
export declare const ELEMENT_ID: RegExp;
|
|
65
|
+
export type ReferenceForm = 'title' | 'full' | 'number';
|
|
66
|
+
export interface ParsedReference {
|
|
67
|
+
key: string;
|
|
68
|
+
doc?: string;
|
|
69
|
+
unit: string;
|
|
70
|
+
element?: string;
|
|
71
|
+
form?: ReferenceForm;
|
|
72
|
+
}
|
|
73
|
+
export declare function parseTarget(raw: string, form?: string): ParsedReference | null;
|
|
74
|
+
export declare function leafOf(unit: string): string;
|
|
75
|
+
export interface ReferenceScan {
|
|
76
|
+
refs: ParsedReference[];
|
|
77
|
+
malformed: string[];
|
|
78
|
+
}
|
|
79
|
+
export declare function scanReferences(text: string): ReferenceScan;
|
|
80
|
+
export type TextSegment = {
|
|
81
|
+
kind: 'text';
|
|
82
|
+
text: string;
|
|
83
|
+
} | ({
|
|
84
|
+
kind: 'ref';
|
|
85
|
+
} & ParsedReference);
|
|
86
|
+
export declare function splitReferences(text: string): TextSegment[];
|
|
87
|
+
export declare function hasReference(text: string): boolean;
|
|
88
|
+
export declare function referencesIn(text: string): string[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface FootnoteEntry {
|
|
3
|
+
id: string;
|
|
4
|
+
number: number;
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface FootnoteState {
|
|
8
|
+
footnotes: FootnoteEntry[];
|
|
9
|
+
}
|
|
10
|
+
export interface FootnoteContextValue {
|
|
11
|
+
state: FootnoteState;
|
|
12
|
+
registerFootnote: (entry: Omit<FootnoteEntry, 'number'>) => number;
|
|
13
|
+
unregisterFootnote: (id: string) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function useFootnoteContext(): FootnoteContextValue | null;
|
|
16
|
+
export declare function FootnoteProvider({ children }: {
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ClauseShape {
|
|
2
|
+
level?: number;
|
|
3
|
+
marker?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SectionReference {
|
|
6
|
+
number?: ReadonlyArray<number>;
|
|
7
|
+
title?: string;
|
|
8
|
+
anchor?: string;
|
|
9
|
+
href?: string;
|
|
10
|
+
openable: boolean;
|
|
11
|
+
element?: {
|
|
12
|
+
index: number;
|
|
13
|
+
shape: ReadonlyArray<ClauseShape>;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { hasReference, leafOf, parseTarget, splitReferences, type ParsedReference, type ReferenceForm, type TextSegment } from './blocks';
|
|
2
|
+
export declare function articleLabel(ordinal: ReadonlyArray<number>): string | null;
|
|
3
|
+
export declare function articleInline(ordinal: ReadonlyArray<number>): string | null;
|
|
4
|
+
export declare function clauseNumbers(sectionOrdinal: ReadonlyArray<number> | undefined, shape: ReadonlyArray<{
|
|
5
|
+
level?: number;
|
|
6
|
+
marker?: string;
|
|
7
|
+
}>, numbering: 'none' | 'ladder' | undefined): Array<string | undefined>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { DEFAULT_PROFILE_ID, profileIds, resolveProfile, resolveProfileOrDefault, safeResolveProfile } from '../profiles/registry';
|
|
2
|
+
export type { DocumentProfile, ProfileId } from '../profiles/profile';
|
|
3
|
+
export { warnOnce } from '../../_shared/warn-once';
|
|
4
|
+
export declare const profileAttr: (profileId: string | undefined) => {
|
|
5
|
+
'data-profile': string;
|
|
6
|
+
} | {
|
|
7
|
+
'data-profile'?: undefined;
|
|
8
|
+
};
|
|
9
|
+
export declare const fillsAttr: (profile: {
|
|
10
|
+
fills?: boolean;
|
|
11
|
+
} | null | undefined) => {
|
|
12
|
+
'data-fills': string;
|
|
13
|
+
} | {
|
|
14
|
+
'data-fills'?: undefined;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveAnchor(anchors: Readonly<Record<string, string>> | undefined, role: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type DocumentProfile, type ProfileDefinition } from './profile';
|
|
2
|
+
export declare const workbookProfile: DocumentProfile;
|
|
3
|
+
export declare const reportProfile: ProfileDefinition;
|
|
4
|
+
export declare const instrumentProfile: ProfileDefinition;
|
|
5
|
+
export declare const BUILTIN_PROFILES: ReadonlyArray<ProfileDefinition>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type ProfileId = string;
|
|
2
|
+
export type DocumentTypeRole = 'display' | 'heading' | 'subhead' | 'title' | 'body' | 'bodySmall' | 'label' | 'note' | 'eyebrow';
|
|
3
|
+
export interface TypeRole {
|
|
4
|
+
size: number;
|
|
5
|
+
lineHeight: number;
|
|
6
|
+
weight: number;
|
|
7
|
+
tracking: string;
|
|
8
|
+
uppercase?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type InkRole = 'full' | 'muted' | 'subtle' | 'border' | 'accent' | 'accentText' | 'sunken';
|
|
11
|
+
export type RuleWeight = 'structural' | 'hairline' | 'head' | 'row';
|
|
12
|
+
export type RegionBinding = 'page-x-of-y' | 'page-number' | 'page-count' | 'member-ref' | 'document-id' | 'document-version' | 'generated-at' | 'execution-state';
|
|
13
|
+
export declare const PAGINATOR_BINDINGS: ReadonlyArray<RegionBinding>;
|
|
14
|
+
export interface PageRegionSlots {
|
|
15
|
+
left?: RegionBinding;
|
|
16
|
+
centre?: RegionBinding;
|
|
17
|
+
right?: RegionBinding;
|
|
18
|
+
}
|
|
19
|
+
export interface PageRegions {
|
|
20
|
+
'page-header'?: PageRegionSlots;
|
|
21
|
+
'page-footer'?: PageRegionSlots;
|
|
22
|
+
}
|
|
23
|
+
export interface DocumentProfile {
|
|
24
|
+
id: ProfileId;
|
|
25
|
+
extends?: ProfileId;
|
|
26
|
+
label: string;
|
|
27
|
+
sheet: {
|
|
28
|
+
width: string;
|
|
29
|
+
height: string;
|
|
30
|
+
};
|
|
31
|
+
margins: {
|
|
32
|
+
top: string;
|
|
33
|
+
right: string;
|
|
34
|
+
bottom: string;
|
|
35
|
+
left: string;
|
|
36
|
+
};
|
|
37
|
+
measure: string;
|
|
38
|
+
bodyMeasureCh?: number;
|
|
39
|
+
rail: {
|
|
40
|
+
placement: 'strip' | 'column' | 'none';
|
|
41
|
+
axis?: string;
|
|
42
|
+
width?: string;
|
|
43
|
+
gutter?: string;
|
|
44
|
+
};
|
|
45
|
+
ink: Record<InkRole, string>;
|
|
46
|
+
rules: Partial<Record<RuleWeight, string>>;
|
|
47
|
+
type: Record<DocumentTypeRole, TypeRole>;
|
|
48
|
+
floorPx: number;
|
|
49
|
+
depth: {
|
|
50
|
+
max: number;
|
|
51
|
+
indent: string[];
|
|
52
|
+
numbering: 'none' | 'ladder';
|
|
53
|
+
};
|
|
54
|
+
fills: boolean;
|
|
55
|
+
regions?: PageRegions;
|
|
56
|
+
requiredBindings?: ReadonlyArray<RegionBinding>;
|
|
57
|
+
sections?: {
|
|
58
|
+
required?: string[];
|
|
59
|
+
known?: string[];
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export type ProfileDefinition = DocumentProfile | (Partial<Omit<DocumentProfile, 'id' | 'extends' | 'label'>> & {
|
|
63
|
+
id: ProfileId;
|
|
64
|
+
extends: ProfileId;
|
|
65
|
+
label: string;
|
|
66
|
+
});
|
|
67
|
+
export declare const DOCUMENT_TYPE_SCALE: Record<DocumentTypeRole, TypeRole>;
|
|
68
|
+
export declare const THEMED_INK: Record<InkRole, string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DocumentProfile, ProfileDefinition, ProfileId } from './profile';
|
|
2
|
+
export declare function registerProfile(profile: ProfileDefinition): void;
|
|
3
|
+
export declare function profileIds(): ProfileId[];
|
|
4
|
+
export declare function resolveProfile(id: ProfileId): DocumentProfile;
|
|
5
|
+
export declare function resolvedProfiles(): Record<ProfileId, DocumentProfile>;
|
|
6
|
+
export declare const documentProfiles: Readonly<Record<ProfileId, DocumentProfile>>;
|
|
7
|
+
export declare const DEFAULT_PROFILE_ID: ProfileId;
|
|
8
|
+
export declare function safeResolveProfile(id: ProfileId, component: string): DocumentProfile | null;
|
|
9
|
+
export declare function resolveProfileOrDefault(id: ProfileId | undefined, component: string): DocumentProfile | null;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export { cx, length, vars } from './core/_shared/props';
|
|
2
|
+
export { Box } from './core/Box/Box';
|
|
3
|
+
export { Center } from './core/Center/Center';
|
|
4
|
+
export { Container } from './core/Container/Container';
|
|
5
|
+
export { Divider } from './core/Divider/Divider';
|
|
6
|
+
export { Hide } from './core/Hide/Hide';
|
|
7
|
+
export { Inline } from './core/Inline/Inline';
|
|
8
|
+
export { Show } from './core/Show/Show';
|
|
9
|
+
export { Spacer } from './core/Spacer/Spacer';
|
|
10
|
+
export { Stack } from './core/Stack/Stack';
|
|
11
|
+
export { DEFAULT_PROFILE_ID, documentProfiles, profileIds, registerProfile, resolveProfile, resolvedProfiles } from './core/document/profiles/registry';
|
|
12
|
+
export { profileCss, profileTokens } from './core/document/profiles/tokens';
|
|
13
|
+
export { PAGINATOR_BINDINGS, type DocumentProfile, type ProfileDefinition, type ProfileId, type RegionBinding } from './core/document/profiles/profile';
|
|
14
|
+
export { BLOCK_KINDS, type Block, type BlockKind } from './core/document/_shared/blocks';
|
|
15
|
+
export { Aside, type AsideProps, type AsideTone } from './core/document/Aside/Aside';
|
|
16
|
+
export { Prose } from './core/document/Prose/Prose';
|
|
17
|
+
export { Quote } from './core/document/Quote/Quote';
|
|
18
|
+
export { Definition } from './core/document/Definition/Definition';
|
|
19
|
+
export { Math } from './core/document/Math/Math';
|
|
20
|
+
export { Footnote } from './core/document/Footnote/Footnote';
|
|
21
|
+
export { Figure } from './core/document/Figure/Figure';
|
|
22
|
+
export { PageBreak } from './core/document/PageBreak/PageBreak';
|
|
23
|
+
export { DocumentLabel } from './core/document/DocumentLabel/DocumentLabel';
|
|
24
|
+
export { Reference } from './core/document/Reference/Reference';
|
|
25
|
+
export { DocumentTable } from './core/document/DocumentTable/DocumentTable';
|
|
26
|
+
export { RowList, type RowListItem, type RowListProps } from './core/document/RowList/RowList';
|
|
27
|
+
export { AnswerRows, ANSWER_COLUMN_PX, type AnswerRowItem, type AnswerRowsProps } from './core/document/AnswerRows/AnswerRows';
|
|
28
|
+
export { ComparisonBars, type ComparisonBar, type ComparisonBarsProps } from './core/document/ComparisonBars/ComparisonBars';
|
|
29
|
+
export { NextSteps, type NextStepItem, type NextStepsProps } from './core/document/NextSteps/NextSteps';
|
|
30
|
+
export { Notes, WRITE_LINE_HEIGHT_PX, type NotesProps } from './core/document/Notes/Notes';
|
|
31
|
+
export { SkippedSection, type SkippedSectionProps } from './core/document/SkippedSection/SkippedSection';
|
|
32
|
+
export { TalkItThrough, type TalkItThroughAdvisor, type TalkItThroughProps } from './core/document/TalkItThrough/TalkItThrough';
|
|
33
|
+
export { WriteInField, WRITE_HEIGHT_PX, type WriteInFieldProps } from './core/document/WriteInField/WriteInField';
|
|
34
|
+
export { Masthead, type MastheadProps } from './core/document/Masthead/Masthead';
|
|
35
|
+
export { MetaRail, type MetaField, type MetaRailProps } from './core/document/MetaRail/MetaRail';
|
|
36
|
+
export { RunningFooter, type RunningFooterProps } from './core/document/RunningFooter/RunningFooter';
|
|
37
|
+
export { DocumentShell, type DocumentShellProps } from './core/document/DocumentShell/DocumentShell';
|
|
38
|
+
export { Contents, type ContentsEntry, type ContentsProps } from './core/document/Contents/Contents';
|
|
39
|
+
export { ExecutionBlock, type ExecutionBlockProps, type ExecutionSignatory } from './core/document/ExecutionBlock/ExecutionBlock';
|
|
40
|
+
export { DocumentBlocks, type DocumentBlocksProps } from './core/document/DocumentBlocks/DocumentBlocks';
|
|
41
|
+
export { DocumentSection, type DocumentSectionProps } from './core/document/DocumentSection/DocumentSection';
|
|
42
|
+
export { BLOCK_SCHEMAS } from './core/document/_shared/block-schemas';
|
|
43
|
+
export { formatValue, renderFormatted, type FormatOpts, type FormattableValue, type FormatterToken, type ValueSpec } from './core/_shared/formatters';
|
|
44
|
+
export { TONES, toneOf, type Tone } from './core/display/_shared/tone';
|
|
45
|
+
export { Eyebrow, inkToneOf, type EyebrowAs, type EyebrowProps, type InkTone } from './core/display/Eyebrow/Eyebrow';
|
|
46
|
+
export { Stat, StatGroup, type StatGroupProps, type StatProps, type StatSize } from './core/display/Stat/Stat';
|
|
47
|
+
export { SectionHeader, type SectionHeaderProps } from './core/display/SectionHeader/SectionHeader';
|
|
48
|
+
export { HighlightBox, type HighlightBoxProps } from './core/display/HighlightBox/HighlightBox';
|
|
49
|
+
export { DisclaimerBlock, type DisclaimerBlockProps } from './core/display/DisclaimerBlock/DisclaimerBlock';
|
|
50
|
+
export { StatStrip, type StatStripProps } from './core/display/StatStrip/StatStrip';
|
|
51
|
+
export { OptionCard, type OptionCardBar, type OptionCardProps } from './core/display/OptionCard/OptionCard';
|
|
52
|
+
export { ProfileCard, type ProfileCardProps, type ProfileRow, type ProfileRowBadge } from './core/display/ProfileCard/ProfileCard';
|
|
53
|
+
export { KpiCardGrid, KpiGrid, type KpiCard, type KpiCardBadge, type KpiCardGridProps } from './core/display/KpiCardGrid/KpiCardGrid';
|
|
54
|
+
export { DataTable, type DataTableAlign, type DataTableCell, type DataTableCellInput, type DataTableColumn, type DataTableProps, type DataTableRow, } from './core/display/DataTable/DataTable';
|