@atlaskit/adf-utils 19.33.8 → 20.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.
- package/CHANGELOG.md +32 -0
- package/alignment/package.json +1 -8
- package/background-color/package.json +1 -8
- package/block-card/package.json +1 -8
- package/block-task-item/package.json +1 -8
- package/blockquote/package.json +1 -8
- package/bodied-extension/package.json +1 -8
- package/bodied-sync-block/package.json +1 -8
- package/border/package.json +1 -8
- package/breakout/package.json +1 -8
- package/builders/package.json +1 -8
- package/bullet-list/package.json +1 -8
- package/code/package.json +1 -8
- package/code-block/package.json +1 -8
- package/data-consumer/package.json +1 -8
- package/date/package.json +1 -8
- package/decision-item/package.json +1 -8
- package/decision-list/package.json +1 -8
- package/dedupe-marks-transform/package.json +1 -8
- package/doc/package.json +1 -8
- package/em/package.json +1 -8
- package/embed-card/package.json +1 -8
- package/emoji/package.json +1 -8
- package/empty-adf/package.json +1 -8
- package/errors/package.json +1 -8
- package/expand/package.json +1 -8
- package/extension/package.json +1 -8
- package/filter/package.json +1 -8
- package/fragment/package.json +1 -8
- package/hard-break/package.json +1 -8
- package/heading/package.json +1 -8
- package/helpers/package.json +1 -8
- package/indentation/package.json +1 -8
- package/indentation-marks-transform/package.json +1 -8
- package/inline-card/package.json +1 -8
- package/inline-extension/package.json +1 -8
- package/invalid-media-content-transform/package.json +1 -8
- package/layout-column/package.json +1 -8
- package/layout-section/package.json +1 -8
- package/link/package.json +1 -8
- package/list-item/package.json +1 -8
- package/map/package.json +1 -8
- package/media/package.json +1 -8
- package/media-group/package.json +1 -8
- package/media-link-transform/package.json +1 -8
- package/media-single/package.json +1 -8
- package/mention/package.json +1 -8
- package/native-embeds-fallback-transform/package.json +1 -8
- package/nested-expand/package.json +1 -8
- package/nested-table-transform/package.json +1 -8
- package/nodes-missing-content-transform/package.json +1 -8
- package/ordered-list/package.json +1 -8
- package/package.json +4 -12
- package/panel/package.json +1 -8
- package/paragraph/package.json +1 -8
- package/placeholder/package.json +1 -8
- package/reduce/package.json +1 -8
- package/rule/package.json +1 -8
- package/scrub/package.json +1 -8
- package/scrub-adf/package.json +1 -8
- package/scrub-content/package.json +1 -8
- package/status/package.json +1 -8
- package/strike/package.json +1 -8
- package/strong/package.json +1 -8
- package/subsup/package.json +1 -8
- package/sync-block/package.json +1 -8
- package/sync-block-fallback-transform/package.json +1 -8
- package/table/package.json +1 -8
- package/table-cell/package.json +1 -8
- package/table-header/package.json +1 -8
- package/table-row/package.json +1 -8
- package/task-item/package.json +1 -8
- package/task-list/package.json +1 -8
- package/text/package.json +1 -8
- package/text-color/package.json +1 -8
- package/text-link-code-transform/package.json +1 -8
- package/transform-media-single-width/package.json +1 -8
- package/transforms/package.json +1 -8
- package/traverse/main/package.json +1 -8
- package/traverse/package.json +1 -8
- package/types/package.json +1 -8
- package/underline/package.json +1 -8
- package/validator/main/package.json +1 -8
- package/validator/package.json +1 -8
- package/validatorTypes/package.json +1 -8
- package/dist/types-ts4.5/builders/marks/alignment.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/annotation.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/background-color.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/border.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/breakout.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/code.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/data-consumer.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/em.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/font-size.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/fragment.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/indentation.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/link.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/strike.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/strong.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/subsup.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/text-color.d.ts +0 -3
- package/dist/types-ts4.5/builders/marks/underline.d.ts +0 -3
- package/dist/types-ts4.5/builders/nodes/block-card.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/block-task-item.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/blockquote.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/bodied-extension.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/bodied-sync-block.d.ts +0 -4
- package/dist/types-ts4.5/builders/nodes/bullet-list.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/caption.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/code-block.d.ts +0 -3
- package/dist/types-ts4.5/builders/nodes/date.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/decision-item.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/decision-list.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/doc.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/embed-card.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/emoji.d.ts +0 -4
- package/dist/types-ts4.5/builders/nodes/expand.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/extension.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/hard-break.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/heading.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/inline-card.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/inline-extension.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/layout-column.d.ts +0 -4
- package/dist/types-ts4.5/builders/nodes/layout-section.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/list-item.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/media-group.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/media-inline.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/media-single.d.ts +0 -7
- package/dist/types-ts4.5/builders/nodes/media.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/mention.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/multi-bodied-extension.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/nested-expand.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/ordered-list.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/panel.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/paragraph.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/placeholder.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/rule.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/status.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/sync-block.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/table-cell.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/table-header.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/table-row.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/table.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/task-item.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/task-list.d.ts +0 -2
- package/dist/types-ts4.5/builders/nodes/text.d.ts +0 -2
- package/dist/types-ts4.5/builders/types.d.ts +0 -8
- package/dist/types-ts4.5/builders/utils/apply-mark.d.ts +0 -5
- package/dist/types-ts4.5/builders/utils/create-text-nodes.d.ts +0 -3
- package/dist/types-ts4.5/builders/utils/is-duplicate-mark.d.ts +0 -6
- package/dist/types-ts4.5/builders.d.ts +0 -68
- package/dist/types-ts4.5/empty-adf.d.ts +0 -3
- package/dist/types-ts4.5/index.d.ts +0 -1
- package/dist/types-ts4.5/scrub/default-node-replacements.d.ts +0 -10
- package/dist/types-ts4.5/scrub/default-value-replacements.d.ts +0 -6
- package/dist/types-ts4.5/scrub/hash.d.ts +0 -1
- package/dist/types-ts4.5/scrub/scrub-adf.d.ts +0 -9
- package/dist/types-ts4.5/scrub/scrub-content.d.ts +0 -11
- package/dist/types-ts4.5/scrub.d.ts +0 -2
- package/dist/types-ts4.5/transforms/dedupe-marks-transform.d.ts +0 -8
- package/dist/types-ts4.5/transforms/depth-limited-nesting-container-nodes-transform.d.ts +0 -10
- package/dist/types-ts4.5/transforms/errors.d.ts +0 -7
- package/dist/types-ts4.5/transforms/helpers.d.ts +0 -2
- package/dist/types-ts4.5/transforms/indentation-marks-transform.d.ts +0 -7
- package/dist/types-ts4.5/transforms/invalid-media-content-transform.d.ts +0 -5
- package/dist/types-ts4.5/transforms/media-link-transform.d.ts +0 -5
- package/dist/types-ts4.5/transforms/native-embeds-fallback-transform.d.ts +0 -13
- package/dist/types-ts4.5/transforms/nested-table-transform.d.ts +0 -7
- package/dist/types-ts4.5/transforms/nodes-missing-content-transform.d.ts +0 -7
- package/dist/types-ts4.5/transforms/sync-block-fallback-transform.d.ts +0 -6
- package/dist/types-ts4.5/transforms/text-link-code-transform.d.ts +0 -5
- package/dist/types-ts4.5/transforms/transform-media-single-width.d.ts +0 -5
- package/dist/types-ts4.5/transforms.d.ts +0 -13
- package/dist/types-ts4.5/traverse/filter.d.ts +0 -2
- package/dist/types-ts4.5/traverse/map.d.ts +0 -2
- package/dist/types-ts4.5/traverse/reduce.d.ts +0 -2
- package/dist/types-ts4.5/traverse/traverse.d.ts +0 -12
- package/dist/types-ts4.5/traverse.d.ts +0 -4
- package/dist/types-ts4.5/types/index.d.ts +0 -24
- package/dist/types-ts4.5/types/validatorTypes.d.ts +0 -150
- package/dist/types-ts4.5/validator/extractAllowedContent.d.ts +0 -3
- package/dist/types-ts4.5/validator/rules.d.ts +0 -3
- package/dist/types-ts4.5/validator/specs/index.d.ts +0 -1
- package/dist/types-ts4.5/validator/utils.d.ts +0 -8
- package/dist/types-ts4.5/validator/validator.d.ts +0 -15
- package/dist/types-ts4.5/validator.d.ts +0 -1
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { transformMediaLinkMarks } from './transforms/media-link-transform';
|
|
2
|
-
export { transformTextLinkCodeMarks } from './transforms/text-link-code-transform';
|
|
3
|
-
export { transformMediaSingleWidth } from './transforms/transform-media-single-width';
|
|
4
|
-
export { transformDedupeMarks } from './transforms/dedupe-marks-transform';
|
|
5
|
-
export { transformNodesMissingContent } from './transforms/nodes-missing-content-transform';
|
|
6
|
-
export { transformIndentationMarks } from './transforms/indentation-marks-transform';
|
|
7
|
-
export { transformInvalidMediaContent } from './transforms/invalid-media-content-transform';
|
|
8
|
-
export { transformNestedTablesIncomingDocument, isNestedTableExtension, } from './transforms/nested-table-transform';
|
|
9
|
-
export { transformNestedTableNodeOutgoingDocument } from './transforms/nested-table-transform';
|
|
10
|
-
export { NodeNestingTransformError } from './transforms/errors';
|
|
11
|
-
export { syncBlockFallbackTransform } from './transforms/sync-block-fallback-transform';
|
|
12
|
-
export { nativeEmbedsFallbackTransform } from './transforms/native-embeds-fallback-transform';
|
|
13
|
-
export { transformContainerNodes } from './transforms/depth-limited-nesting-container-nodes-transform';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ADFEntity, VisitorCollection } from '../types';
|
|
2
|
-
export declare function validateVisitors(_visitors: VisitorCollection): boolean;
|
|
3
|
-
/**
|
|
4
|
-
* Provides recursive, depth-first search document traversal. Use visitors collection to define nodes of interest.
|
|
5
|
-
* If no visitor for given node is defined, no-op happens.
|
|
6
|
-
* If visitor returns new node, the old node is replaced.
|
|
7
|
-
* If visitor returns false, node is dropped from the document.
|
|
8
|
-
* If visitor returns null/undefined/void, original node is used.
|
|
9
|
-
* @param adf Document to traverse.
|
|
10
|
-
* @param visitors Collection of visitors.
|
|
11
|
-
*/
|
|
12
|
-
export declare function traverse(adf: ADFEntity, visitors: VisitorCollection): false | ADFEntity;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface ADFEntityMark {
|
|
2
|
-
attrs?: {
|
|
3
|
-
[name: string]: any;
|
|
4
|
-
};
|
|
5
|
-
type: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ADFEntity {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
attrs?: {
|
|
10
|
-
[name: string]: any;
|
|
11
|
-
};
|
|
12
|
-
content?: Array<ADFEntity | undefined>;
|
|
13
|
-
marks?: Array<ADFEntityMark>;
|
|
14
|
-
text?: string;
|
|
15
|
-
type: string;
|
|
16
|
-
}
|
|
17
|
-
export type Visitor = (node: ADFEntity, parent: EntityParent, index: number, depth: number) => ADFEntity | false | undefined | void;
|
|
18
|
-
export type VisitorCollection = {
|
|
19
|
-
[nodeType: string]: Visitor;
|
|
20
|
-
};
|
|
21
|
-
export type EntityParent = {
|
|
22
|
-
node?: ADFEntity;
|
|
23
|
-
parent?: EntityParent;
|
|
24
|
-
};
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import type { ADFEntity, ADFEntityMark } from '../types';
|
|
2
|
-
export interface MarkValidationResult {
|
|
3
|
-
errorCode?: ValidationError['code'];
|
|
4
|
-
message?: string;
|
|
5
|
-
newMark?: ADFEntityMark;
|
|
6
|
-
originalMark: ADFEntityMark;
|
|
7
|
-
valid: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface Output {
|
|
10
|
-
entity?: ADFEntity;
|
|
11
|
-
valid: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface NodeValidationResult {
|
|
14
|
-
entity?: ADFEntity;
|
|
15
|
-
marksValidationOutput?: MarkValidationResult[];
|
|
16
|
-
valid: boolean;
|
|
17
|
-
}
|
|
18
|
-
export interface ValidatorContent {
|
|
19
|
-
allowUnsupportedBlock: boolean;
|
|
20
|
-
allowUnsupportedInline: boolean;
|
|
21
|
-
isTupleLike?: boolean;
|
|
22
|
-
items: Array<string | Array<string>>;
|
|
23
|
-
maxItems?: number;
|
|
24
|
-
minItems?: number;
|
|
25
|
-
optional?: boolean;
|
|
26
|
-
type: 'array';
|
|
27
|
-
}
|
|
28
|
-
export type AttributesSpec = {
|
|
29
|
-
maximum: number;
|
|
30
|
-
minimum: number;
|
|
31
|
-
optional?: boolean;
|
|
32
|
-
type: 'number';
|
|
33
|
-
} | {
|
|
34
|
-
maximum: number;
|
|
35
|
-
minimum: number;
|
|
36
|
-
optional?: boolean;
|
|
37
|
-
type: 'integer';
|
|
38
|
-
} | {
|
|
39
|
-
optional?: boolean;
|
|
40
|
-
type: 'boolean';
|
|
41
|
-
} | {
|
|
42
|
-
minLength?: number;
|
|
43
|
-
optional?: boolean;
|
|
44
|
-
pattern?: RegExp;
|
|
45
|
-
type: 'string';
|
|
46
|
-
validatorFn?: string;
|
|
47
|
-
} | {
|
|
48
|
-
optional?: boolean;
|
|
49
|
-
type: 'enum';
|
|
50
|
-
values: Array<string>;
|
|
51
|
-
} | {
|
|
52
|
-
optional?: boolean;
|
|
53
|
-
type: 'object';
|
|
54
|
-
} | {
|
|
55
|
-
isTupleLike?: boolean;
|
|
56
|
-
items: Array<AttributesSpec>;
|
|
57
|
-
maxItems?: number;
|
|
58
|
-
minItems?: number;
|
|
59
|
-
optional?: boolean;
|
|
60
|
-
type: 'array';
|
|
61
|
-
} | ValidatorSpecAttrs;
|
|
62
|
-
export interface ValidatorSpecAttrs {
|
|
63
|
-
optional?: boolean;
|
|
64
|
-
props: {
|
|
65
|
-
[key: string]: AttributesSpec;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export interface ValidatorSpec {
|
|
69
|
-
maxItems?: number;
|
|
70
|
-
minItems?: number;
|
|
71
|
-
props?: {
|
|
72
|
-
attrs?: ValidatorSpecAttrs;
|
|
73
|
-
content?: ValidatorContent;
|
|
74
|
-
marks?: {
|
|
75
|
-
items: Array<Array<string>>;
|
|
76
|
-
maxItems?: number;
|
|
77
|
-
optional?: boolean;
|
|
78
|
-
type: 'array';
|
|
79
|
-
};
|
|
80
|
-
text?: AttributesSpec;
|
|
81
|
-
type?: {
|
|
82
|
-
type: 'enum';
|
|
83
|
-
values: Array<string>;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
required?: Array<string>;
|
|
87
|
-
}
|
|
88
|
-
export interface ValidationErrorMap {
|
|
89
|
-
DEPRECATED: never;
|
|
90
|
-
INVALID_ATTRIBUTES: {
|
|
91
|
-
attrs: Array<string>;
|
|
92
|
-
};
|
|
93
|
-
INVALID_CONTENT: {
|
|
94
|
-
parentType?: string;
|
|
95
|
-
};
|
|
96
|
-
INVALID_CONTENT_LENGTH: {
|
|
97
|
-
length: number;
|
|
98
|
-
requiredLength: number;
|
|
99
|
-
type: RequiredContentLength;
|
|
100
|
-
};
|
|
101
|
-
INVALID_TEXT: never;
|
|
102
|
-
INVALID_TYPE: never;
|
|
103
|
-
MISSING_PROPERTIES: {
|
|
104
|
-
props: Array<string>;
|
|
105
|
-
};
|
|
106
|
-
REDUNDANT_ATTRIBUTES: {
|
|
107
|
-
attrs: Array<string>;
|
|
108
|
-
};
|
|
109
|
-
REDUNDANT_MARKS: {
|
|
110
|
-
marks: Array<string>;
|
|
111
|
-
};
|
|
112
|
-
REDUNDANT_PROPERTIES: {
|
|
113
|
-
props: Array<string>;
|
|
114
|
-
};
|
|
115
|
-
UNSUPPORTED_ATTRIBUTES: {
|
|
116
|
-
attrs: Array<string>;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
export type RequiredContentLength = 'minimum' | 'maximum';
|
|
120
|
-
export type Content = Array<string | [
|
|
121
|
-
string,
|
|
122
|
-
object
|
|
123
|
-
] | Array<string>>;
|
|
124
|
-
export type ValidationErrorType = keyof ValidationErrorMap;
|
|
125
|
-
export interface ValidationError {
|
|
126
|
-
code: ValidationErrorType;
|
|
127
|
-
message: string;
|
|
128
|
-
meta?: object;
|
|
129
|
-
}
|
|
130
|
-
export type ErrorCallback = (entity: ADFEntity, error: ValidationError, options: ErrorCallbackOptions) => ADFEntity | undefined;
|
|
131
|
-
export type ValidationMode = 'strict' | 'loose';
|
|
132
|
-
export interface ValidationOptions {
|
|
133
|
-
allowPrivateAttributes?: boolean;
|
|
134
|
-
mode?: ValidationMode;
|
|
135
|
-
}
|
|
136
|
-
export interface SpecValidatorResult {
|
|
137
|
-
hasValidated: boolean;
|
|
138
|
-
result?: NodeValidationResult;
|
|
139
|
-
}
|
|
140
|
-
export type Err = <T extends ValidationErrorType>(code: T, msg: string, meta?: T extends keyof ValidationErrorMap ? ValidationErrorMap[T] : never) => NodeValidationResult;
|
|
141
|
-
export interface ErrorCallbackOptions {
|
|
142
|
-
allowNestedTables?: boolean;
|
|
143
|
-
allowTableInPanel?: boolean;
|
|
144
|
-
allowUnsupportedBlock?: boolean;
|
|
145
|
-
allowUnsupportedInline?: boolean;
|
|
146
|
-
isMark?: any;
|
|
147
|
-
isNodeAttribute?: boolean;
|
|
148
|
-
}
|
|
149
|
-
export type Validate = (entity: ADFEntity, errorCallback?: ErrorCallback, allowed?: Content, parentSpec?: ValidatorSpec) => Output;
|
|
150
|
-
export type CreateSpecReturn = Record<string, ValidatorSpec | Record<string, ValidatorSpec | string>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock, } from '@atlaskit/adf-schema/schema-validator';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const isDefined: <T>(x: T) => x is NonNullable<T>;
|
|
2
|
-
export declare const isNumber: (x: unknown) => x is number;
|
|
3
|
-
export declare const isInteger: (x: unknown) => x is number;
|
|
4
|
-
export declare const isBoolean: (x: unknown) => x is boolean;
|
|
5
|
-
export declare const isString: (s: unknown) => s is string;
|
|
6
|
-
export declare const isPlainObject: (x: unknown) => boolean;
|
|
7
|
-
export declare const copy: <T extends Record<string | number, any> = Record<string | number, any>>(source: Record<string | number, any>, dest: T, key: string | number) => T;
|
|
8
|
-
export declare const makeArray: <T>(maybeArray: T | Array<T>) => T[];
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { AttributesSpec, CreateSpecReturn, Validate, ValidationOptions } from '../types/validatorTypes';
|
|
2
|
-
/**
|
|
3
|
-
* Normalizes the structure of files imported from './specs'.
|
|
4
|
-
* We denormalised the spec to save bundle size.
|
|
5
|
-
*/
|
|
6
|
-
export declare function createSpec(nodes?: Array<string>, marks?: Array<string>): CreateSpecReturn;
|
|
7
|
-
/**
|
|
8
|
-
* Validates attributes against the provided attribute specification.
|
|
9
|
-
*/
|
|
10
|
-
export declare function validateAttrs<T>(spec: AttributesSpec, value: T): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Creates a validator function for ADF documents.
|
|
13
|
-
* Validates document structure against the ADF specification.
|
|
14
|
-
*/
|
|
15
|
-
export declare function validator(nodes?: Array<string>, marks?: Array<string>, options?: ValidationOptions): Validate;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { validateAttrs, validator } from './validator/validator';
|