@dracor/react 1.0.0-alpha.2 → 1.0.0-beta.5
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/index.d.ts +30 -23
- package/dist/index.es.js +347 -316
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +8 -8
- package/dist/index.umd.js.map +1 -1
- package/package.json +43 -45
- package/src/dracor.css +8 -5
package/dist/index.d.ts
CHANGED
|
@@ -36,19 +36,21 @@ export declare function DebouncedInput({ value: initialValue, onChange, debounce
|
|
|
36
36
|
debounce?: number;
|
|
37
37
|
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>): JSX.Element;
|
|
38
38
|
|
|
39
|
+
export declare function DocPage({ url, match }: Props_4): JSX.Element;
|
|
40
|
+
|
|
39
41
|
/**
|
|
40
42
|
* The download button displays an icon for the supported file types. If the
|
|
41
43
|
* type is omitted the download file name is displayed as link text.
|
|
42
44
|
*/
|
|
43
|
-
export declare function DownloadButton({ href, type, name }:
|
|
45
|
+
export declare function DownloadButton({ href, type, name }: Props_5): JSX.Element;
|
|
44
46
|
|
|
45
47
|
export declare function formatEra(year: string, ceBefore?: number): string;
|
|
46
48
|
|
|
47
49
|
export declare function formatYear(year: number | string, locale?: string): string;
|
|
48
50
|
|
|
49
|
-
export declare function IdCopy({ children, className, uri, prefix, icon, }:
|
|
51
|
+
export declare function IdCopy({ children, className, uri, prefix, icon, }: Props_6): JSX.Element;
|
|
50
52
|
|
|
51
|
-
export declare function IdLink({ showLabel, children, className }:
|
|
53
|
+
export declare function IdLink({ showLabel, children, className }: Props_7): JSX.Element;
|
|
52
54
|
|
|
53
55
|
declare interface Item {
|
|
54
56
|
label: string;
|
|
@@ -56,7 +58,7 @@ declare interface Item {
|
|
|
56
58
|
selected?: boolean;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
export declare function LanguageMenu({ languages, current, onSelect, }:
|
|
61
|
+
export declare function LanguageMenu({ languages, current, onSelect, }: Props_8): JSX.Element;
|
|
60
62
|
|
|
61
63
|
export declare function NavBar({ title, logo, logoClass, version, gitHubUrl, gitHubIcon, gitHubTitle, addItem, navItems, }: NavBarProps): JSX.Element;
|
|
62
64
|
|
|
@@ -68,7 +70,7 @@ declare interface NavBarProps {
|
|
|
68
70
|
gitHubUrl?: string;
|
|
69
71
|
gitHubIcon?: JSX_2.Element;
|
|
70
72
|
gitHubTitle?: string;
|
|
71
|
-
navItems?: (
|
|
73
|
+
navItems?: (Props_9 | Props_10)[];
|
|
72
74
|
addItem?: JSX_2.Element;
|
|
73
75
|
}
|
|
74
76
|
|
|
@@ -83,24 +85,30 @@ declare interface Props {
|
|
|
83
85
|
title?: string;
|
|
84
86
|
}
|
|
85
87
|
|
|
86
|
-
declare interface Props_10
|
|
88
|
+
declare interface Props_10 {
|
|
89
|
+
label: string;
|
|
90
|
+
items: Item[];
|
|
91
|
+
menuClass?: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare interface Props_11<TData = unknown> {
|
|
87
95
|
data: TData[];
|
|
88
96
|
columns: ColumnDef<TData>[];
|
|
89
97
|
defaultSort?: SortingState;
|
|
90
98
|
}
|
|
91
99
|
|
|
92
|
-
declare interface
|
|
100
|
+
declare interface Props_12 {
|
|
93
101
|
data: TabData[];
|
|
94
102
|
}
|
|
95
103
|
|
|
96
|
-
declare interface
|
|
104
|
+
declare interface Props_13 {
|
|
97
105
|
/**
|
|
98
106
|
* URL to a TEI document
|
|
99
107
|
*/
|
|
100
108
|
url: string;
|
|
101
109
|
}
|
|
102
110
|
|
|
103
|
-
declare interface
|
|
111
|
+
declare interface Props_14 {
|
|
104
112
|
written?: number;
|
|
105
113
|
premiere?: number;
|
|
106
114
|
print?: number;
|
|
@@ -123,6 +131,11 @@ declare interface Props_3 {
|
|
|
123
131
|
}
|
|
124
132
|
|
|
125
133
|
declare interface Props_4 {
|
|
134
|
+
url?: string;
|
|
135
|
+
match?: () => string | null;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare interface Props_5 {
|
|
126
139
|
/**
|
|
127
140
|
* URL to download
|
|
128
141
|
*/
|
|
@@ -140,7 +153,7 @@ declare interface Props_4 {
|
|
|
140
153
|
type?: 'bibtex' | 'csv' | 'gexf' | 'graphml' | 'json' | 'rdf' | 'ris' | 'tei' | 'txt';
|
|
141
154
|
}
|
|
142
155
|
|
|
143
|
-
declare interface
|
|
156
|
+
declare interface Props_6 {
|
|
144
157
|
children: string;
|
|
145
158
|
prefix?: string;
|
|
146
159
|
uri?: string;
|
|
@@ -148,41 +161,35 @@ declare interface Props_5 {
|
|
|
148
161
|
icon?: 'ein' | 'dracor';
|
|
149
162
|
}
|
|
150
163
|
|
|
151
|
-
declare interface
|
|
164
|
+
declare interface Props_7 {
|
|
152
165
|
button?: boolean;
|
|
153
166
|
showLabel?: boolean;
|
|
154
167
|
className?: string;
|
|
155
168
|
children: string;
|
|
156
169
|
}
|
|
157
170
|
|
|
158
|
-
declare interface
|
|
171
|
+
declare interface Props_8 {
|
|
159
172
|
languages: string[];
|
|
160
173
|
current?: string;
|
|
161
174
|
onSelect: (lang: string) => void;
|
|
162
175
|
}
|
|
163
176
|
|
|
164
|
-
declare interface
|
|
177
|
+
declare interface Props_9 {
|
|
165
178
|
label: string;
|
|
166
179
|
href: string;
|
|
167
180
|
active?: boolean;
|
|
168
181
|
className?: string;
|
|
169
182
|
}
|
|
170
183
|
|
|
171
|
-
declare interface Props_9 {
|
|
172
|
-
label: string;
|
|
173
|
-
items: Item[];
|
|
174
|
-
menuClass?: string;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
184
|
declare interface TabData {
|
|
178
185
|
label: string;
|
|
179
186
|
href: string;
|
|
180
187
|
active?: boolean;
|
|
181
188
|
}
|
|
182
189
|
|
|
183
|
-
export declare function Table<T>({ columns, data: initialData, defaultSort }:
|
|
190
|
+
export declare function Table<T>({ columns, data: initialData, defaultSort }: Props_11<T>): JSX.Element;
|
|
184
191
|
|
|
185
|
-
export declare function Tabs({ data: tabs }:
|
|
192
|
+
export declare function Tabs({ data: tabs }: Props_12): JSX.Element;
|
|
186
193
|
|
|
187
194
|
/**
|
|
188
195
|
* Component rendering a TEI document using [CETEIcean](https://github.com/TEIC/CETEIcean)
|
|
@@ -190,9 +197,9 @@ export declare function Tabs({ data: tabs }: Props_11): JSX.Element;
|
|
|
190
197
|
* The DraCor Tailwind theme provides some styling for the TEI elements. Import
|
|
191
198
|
* the theme adding `@import "@dracor/react/dracor.css";` to your index.css.
|
|
192
199
|
*/
|
|
193
|
-
export declare function TEIText({ url }:
|
|
200
|
+
export declare function TEIText({ url }: Props_13): JSX.Element;
|
|
194
201
|
|
|
195
|
-
export declare function Years({ written, premiere, print, locale, labelPremiered, labelPrinted, labelWritten, }:
|
|
202
|
+
export declare function Years({ written, premiere, print, locale, labelPremiered, labelPrinted, labelWritten, }: Props_14): JSX.Element;
|
|
196
203
|
|
|
197
204
|
export { }
|
|
198
205
|
|