@webwriter/geogebra 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.
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2025 Frederic Salmen <frederic@fsalmen.de>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,417 @@
1
+ import {LitElement, html, css, PropertyValues} from "lit"
2
+ import {LitElementWw, option} from "@webwriter/lit"
3
+ import {customElement, property, query, queryAsync} from "lit/decorators.js"
4
+
5
+ export interface GeogebraAPI {
6
+ evalCommand(cmdString: string): boolean
7
+ evalLaTex(input: string): boolean
8
+ evalCommandGetLabels(cmdString: string): string
9
+ evalCommandCAS(text: string): string
10
+ insertEmbed(type: string, uri: string): void
11
+ deleteObject(objName: string): void
12
+ setAuxiliary(geo: any, status: boolean): void
13
+ setValue(objName: string, value: number): void
14
+ setTextValue(objName: string, value: string): void
15
+ setListValue(objName: string, i: number, value: number): void
16
+ setCoords(objName: string, x: number, y: number, z?: number): void
17
+ setCaption(objName: string, caption: string): void
18
+ setColor(objName: string, red: number, green: number, blue: number): void
19
+ setVisible(objName: string, visible: boolean): void
20
+ setLabelVisible(objName: string, visible: boolean): void
21
+ setLabelStyle(objName: string, style: 0 | 1 | 2 | 3): void
22
+ setFixed(objName: string, fixed: boolean, selectionAllowed: boolean): void
23
+ setTrace(objName: string, flag: boolean): void
24
+ renameObject(oldObjName: string, newObjName: string): boolean
25
+ setLayer(objName: string, layer: number): void
26
+ setLayerVisible(objName: string, visible: boolean): void
27
+ setLineStyle(objName: string, style: 0 | 1 | 2 | 3 | 4): void
28
+ setLineThickness(objName: string, thickness: -1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13): void
29
+ setPointStyle(objName: string, size: -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9): void
30
+ setPointSize(objName: string, size: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9): void
31
+ setDisplayStyle(objName: string, style: string): void
32
+ setFilling(objName: string, filling: number): void
33
+ getPNGBase64(exportScale: number, transparent?: boolean, dpi?: number): string
34
+ exportSVG(filename: string): void
35
+ exportSVG(callback: CallableFunction): void
36
+ exportPDF(scale: number, filename: string, sliderLabel?: string): void
37
+ exportPDF(scale: number, callback: CallableFunction, sliderLabel?: string): void
38
+ getScreenshotBase64(callback: CallableFunction): void
39
+ writePNGtoFile(fileName: string, exportScale?: number, transparent?: boolean, dpi?: number): boolean
40
+ isIndependent(objName: string): boolean
41
+ isMovable(objName: string): boolean
42
+ showAllObjects(): void
43
+ registerEmbedResolver(type: string, callback: CallableFunction): void
44
+ setAnimating(objName: string, animate: boolean): void
45
+ setAnimationSpeed(objName: string, speed: number): void
46
+ startAnimation(): void
47
+ stopAnimation(): void
48
+ isAnimationRunning(): boolean
49
+ getXcoord(objName: string): number
50
+ getYcoord(objName: string): number
51
+ getZcoord(objName: string): number
52
+ getValue(objName: string): number
53
+ getListValue(objName: string, index: number): number
54
+ getColor(objName: string): string
55
+ getVisible(objName: string): boolean
56
+ getValueString(objName: string, useLocalizedInput?: boolean): string
57
+ getDefinitionString(objName: string): string
58
+ getCommandString(objName: string, useLocalizedInput?: boolean): string
59
+ getLaTeXString(objName: string, value: boolean): string
60
+ getObjectType(objName: string): string
61
+ exists(objName: string): boolean
62
+ isDefined(objName: string): boolean
63
+ getAllObjectNames(type?: string): string[]
64
+ getObjectNumber(): number
65
+ getCASObjectNumber(): number
66
+ getObjectName(i: number): string
67
+ getLayer(objName: string): string
68
+ getLineStyle(objName: string): 0 | 1 | 2 | 3 | 4
69
+ getLineThickness(objName: string): -1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13
70
+ getPointStyle(objName: string): -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
71
+ getPointSize(objName: string): 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
72
+ getFilling(objName: string): number
73
+ getCaption(objName: string, substitutePlaceholders?: boolean): string
74
+ getLabelStyle(objName: string): 0 | 1 | 2 | 3
75
+ getLabelVisible(): boolean
76
+ isInteractive(objName: string): boolean
77
+ setMode(mode: number): void
78
+ getMode(): number
79
+ reset(): void
80
+ newConstruction(): void
81
+ refreshViews(): void
82
+ setOnTheFlyPointCreationActive(flag: boolean): void
83
+ setPointCapture(view: -1 | 1 | 2, mode: 0 | 1 | 2 | 3): void
84
+ setRounding(round: string): void
85
+ hideCursorWhenDragging(flag: boolean): void
86
+ setRepaintingActive(flag: boolean): void
87
+ setErrorDialogsActive(flag: boolean): void
88
+ setCoordSystem(xmin: number, xmax: number, ymin: number, ymax: number, zmin?: number, zmax?: number, yVertical?: boolean): void
89
+ setAxesVisible(xAxis: boolean, yAxis: boolean, zAxis?: boolean): void
90
+ setUndoPoint(): void
91
+ setAxisLabels(viewNumber: number, xAxis: string, yAxis: string, zAxis: string): void
92
+ setAxisSteps(viewNumber: number, xAxis: number, yAxis: number, zAxis: number): void
93
+ setAxisUnits(viewNumber: number, xAxis: string, yAxis: string, zAxis: string): void
94
+ setGridVisible(flag: boolean): void
95
+ setGridVisible(viewNumber: number, flag: boolean): void
96
+ getGridVisible(viewNumber: number): boolean
97
+ getPerspectiveXML(): string
98
+ undo(): void
99
+ redo(): void
100
+ showToolBar(show: boolean): void
101
+ setCustomToolBar(toolbar: string): void
102
+ addCustomTool(iconURL: string, name: string, category?: string, callback?: CallableFunction): void
103
+ showMenuBar(show: boolean): void
104
+ showAlgebraInput(show: boolean): void
105
+ showResetIcon(show: boolean): void
106
+ enableRightClick(enable: boolean): void
107
+ enableLabelDrags(enable: boolean): void
108
+ enableShiftDragZoom(enable: boolean): void
109
+ enableCAS(enable: boolean): void
110
+ enable3D(enable: boolean): void
111
+ setPerspective(perspective: string): void
112
+ setWidth(width: number): void
113
+ setHeight(height: number): void
114
+ setSize(width: number, height: number): void
115
+ recalculateEnvironments(): void
116
+ getEditorState(): any
117
+ setEditorState(state: any): void
118
+ getGraphicsOptions(viewId: number): any
119
+ setGraphicsOptions(viewID: number, options: any): void
120
+ setAlgebraOptions(options: any): void
121
+ registerAddListener(func: CallableFunction): void
122
+ unregisterAddListener(func: CallableFunction): void
123
+ registerRemoveListener(func: CallableFunction): void
124
+ unregisterRemoveListener(func: CallableFunction): void
125
+ registerUpdateListener(func: CallableFunction): void
126
+ unregisterUpdateListener(func: CallableFunction): void
127
+ registerClickListener(func: CallableFunction): void
128
+ unregisterClickListener(func: CallableFunction): void
129
+ registerObjectUpdateListener(objName: string, func: CallableFunction): void
130
+ unregisterObjectUpdateListener(objName: string): void
131
+ registerObjectClickListener(objName: string, func: CallableFunction): void
132
+ unregisterObjectClickListener(objName: string): void
133
+ registerRenameListener(func: CallableFunction): void
134
+ unregisterRenameListener(func: CallableFunction): void
135
+ registerClearListener(func: CallableFunction): void
136
+ unregisterClearListener(func: CallableFunction): void
137
+ registerStoreUndoListener(func: CallableFunction): void
138
+ unregisterStoreUndoListener(func: CallableFunction): void
139
+ registerClientListener(func: CallableFunction): void
140
+ unregisterClientListener(func: CallableFunction): void
141
+ evalXML(xmlString: string): void
142
+ setXML(xmlString: string): void
143
+ getXML(objName?: string): string
144
+ getAlgorithmXML(objName: string): string
145
+ getFileJSON(): any
146
+ setFileJSON(content: any): void
147
+ getBase64(callback?: CallableFunction): string
148
+ setBase64(value: string, callback?: CallableFunction): void
149
+ debug(str: string): void
150
+ getVersion(): string
151
+ remove(): void
152
+ }
153
+
154
+ export class GeogebraApp extends LitElementWw {
155
+
156
+ static styles = css`
157
+ iframe {
158
+ border: none;
159
+ width: 100%;
160
+ aspect-ratio: 16/9;
161
+ }
162
+ `
163
+
164
+ @property({type: String})
165
+ ggbStyles: string
166
+
167
+ @property({reflect: true})
168
+ type: "classic" | "geometry" | "3d" | "suite" | "evaluator" | "scientific" | "notes" = "classic"
169
+
170
+ @property({type: Number, reflect: true})
171
+ width: number = 800
172
+
173
+ @property({type: Number, reflect: true})
174
+ height: number = 450
175
+
176
+ @property({type: String, attribute: true, reflect: true}) // base64, material ID, file url
177
+ accessor src: string
178
+
179
+ @property({type: String, reflect: true})
180
+ borderColor: string = "gray"
181
+
182
+ @property({type: Number, reflect: true})
183
+ borderRadius: number = 1
184
+
185
+ @property({type: Boolean, reflect: true})
186
+ enableRightClick = true
187
+
188
+ @property({type: Boolean, reflect: true})
189
+ enableLabelDrags = true
190
+
191
+ @property({type: Boolean, reflect: true})
192
+ enableShiftDragZoom = true
193
+
194
+ @property({type: Boolean, reflect: true})
195
+ showZoomButtons = false
196
+
197
+ @property({type: Boolean, reflect: true})
198
+ errorDialogsActive = true
199
+
200
+ @property({type: Boolean, reflect: true})
201
+ showMenuBar = false
202
+
203
+ @property({type: Boolean, reflect: true})
204
+ showToolBar = false
205
+
206
+ @property({type: Boolean, reflect: true})
207
+ showToolBarHelp = false
208
+
209
+ @property({type: String, reflect: true})
210
+ customToolBar: string
211
+
212
+ @property({type: Boolean, reflect: true})
213
+ showAlgebraInput = true
214
+
215
+ @property({type: Boolean, reflect: true})
216
+ showResetIcon = false
217
+
218
+ @property({type: String, reflect: true})
219
+ language: String
220
+
221
+ @property({type: String, reflect: true})
222
+ country: String
223
+
224
+ @property({type: String, reflect: true})
225
+ appletId: String
226
+
227
+ @property({type: Boolean, reflect: true})
228
+ allowStyleBar = false
229
+
230
+ @property({type: Boolean, reflect: true})
231
+ randomize = true
232
+
233
+ @property({type: Number, reflect: true})
234
+ randomSeed: number
235
+
236
+ @property({type: Boolean, reflect: true})
237
+ useBrowserForJs = false
238
+
239
+ @property({type: Boolean, reflect: true})
240
+ showLogging = false
241
+
242
+ @property({type: Number, reflect: true})
243
+ capturingThreshold = 3
244
+
245
+ @property({type: Boolean, reflect: true})
246
+ enableFileFeatures = true
247
+
248
+ @property({type: Boolean, reflect: true})
249
+ enableUndoRedo = true
250
+
251
+ @property({type: String, reflect: true})
252
+ perspective: String
253
+
254
+ @property({type: Boolean, reflect: true})
255
+ enable3d: boolean
256
+
257
+ @property({type: Boolean, reflect: true})
258
+ enableCAS: boolean
259
+
260
+ @property({type: String, reflect: true})
261
+ algebraInputPosition: "algebra" | "top" | "bottom"
262
+
263
+ @property({type: Boolean, reflect: true})
264
+ preventFocus = false
265
+
266
+ @property({type: String, reflect: true})
267
+ scaleContainerClass: string
268
+
269
+ @property({type: Boolean, reflect: true})
270
+ autoHeight = true
271
+
272
+ @property({type: Boolean, reflect: true})
273
+ allowUpscale = false
274
+
275
+ @property({type: Boolean, reflect: true})
276
+ playButton = false
277
+
278
+ @property({type: Number, reflect: true})
279
+ scale = 1
280
+
281
+ @property({type: Boolean, reflect: true})
282
+ showAnimationButton = false
283
+
284
+ @property({type: Boolean, reflect: true})
285
+ showFullscreenButton = false
286
+
287
+ @property({type: Boolean, reflect: true})
288
+ showSuggestionButtons = false
289
+
290
+ @property({type: Boolean, reflect: true})
291
+ showStartTooltip = false
292
+
293
+ @property({type: String, reflect: true})
294
+ rounding: string
295
+
296
+ @property({type: Boolean, reflect: true})
297
+ buttonShadows = false
298
+
299
+ @property({type: Number, reflect: true})
300
+ buttonRounding: Number = 0.2
301
+
302
+ @property({type: String, reflect: true})
303
+ buttonBorderColor: string
304
+
305
+ @property({type: String, reflect: true})
306
+ editorBackgroundColor: string
307
+
308
+ @property({type: String, reflect: true})
309
+ editorForegroundColor: string
310
+
311
+ @property({type: Boolean, reflect: true})
312
+ textmode = false
313
+
314
+ @property({type: Boolean, reflect: true})
315
+ showKeyboardOnFocus: boolean
316
+
317
+ @property({type: String, reflect: true})
318
+ keyboardType: "scientific" | "normal" | "notes"
319
+
320
+ @property({type: Boolean, reflect: true})
321
+ transparentGraphics = false
322
+
323
+ @property({type: Boolean, reflect: true})
324
+ disabledJavaScript = false
325
+
326
+ @property({type: String, reflect: true})
327
+ detachedKeyboardParent: string
328
+
329
+ private get ggbProperties() {
330
+ const {appletId: id, type: appName, width, height, borderColor, borderRadius, enableLabelDrags, enableShiftDragZoom, showZoomButtons, errorDialogsActive, showMenuBar, showToolBar, showToolBarHelp, customToolBar, showAlgebraInput, showResetIcon, language, country, allowStyleBar, randomize, randomSeed, useBrowserForJs, showLogging, capturingThreshold, enableFileFeatures, perspective, enable3d, enableCAS, algebraInputPosition, preventFocus, scaleContainerClass, autoHeight, allowUpscale, playButton, scale, showAnimationButton, showFullscreenButton, showSuggestionButtons, showStartTooltip, rounding, buttonShadows, buttonRounding, buttonBorderColor, editorBackgroundColor, editorForegroundColor, textmode, showKeyboardOnFocus, keyboardType, transparentGraphics, disabledJavaScript, detachedKeyboardParent} = this
331
+
332
+ let filename: string, material_id: string, ggbBase64: string
333
+ if(this.src && this.src.startsWith("data:")) {
334
+ ggbBase64 = this.src.split(",").at(-1)
335
+ }
336
+ else if(this.src && this.src.startsWith("ggbid:")) {
337
+ material_id = this.src.slice("ggbid:".length)
338
+ }
339
+ else if(this.src) {
340
+ filename = this.src
341
+ }
342
+
343
+ return {id, appName, filename, material_id, ggbBase64, width, height, borderColor, borderRadius, enableLabelDrags, enableShiftDragZoom, showZoomButtons, errorDialogsActive, showMenuBar, showToolBar, showToolBarHelp, customToolBar, showAlgebraInput, showResetIcon, language: language ?? this.lang, country, allowStyleBar, randomize, randomSeed, useBrowserForJs, showLogging, capturingThreshold, enableFileFeatures, perspective, enable3d, enableCAS, algebraInputPosition, preventFocus, scaleContainerClass, autoHeight, allowUpscale, playButton, scale, showAnimationButton, showFullscreenButton, showSuggestionButtons, showStartTooltip, rounding, buttonShadows, buttonRounding, buttonBorderColor, editorBackgroundColor, editorForegroundColor, textmode, showKeyboardOnFocus, keyboardType, transparentGraphics, disabledJavaScript, detachedKeyboardParent}
344
+ }
345
+
346
+ updateSrc = () => {
347
+ if(!this.updatingGgb) {
348
+ this.src = `data:application/vnd.geogebra.file;base64,${this.api.getBase64()}`
349
+ }
350
+ }
351
+
352
+ connectedCallback(): void {
353
+ super.connectedCallback()
354
+ this.apiReady = new Promise(r => {
355
+ this.addEventListener("ggb-load", (e: any) => {
356
+ r(e.detail.api)
357
+ this.api = e.detail.api
358
+ this.api.registerAddListener(this.updateSrc)
359
+ this.api.registerClearListener(this.updateSrc)
360
+ this.api.registerUpdateListener(this.updateSrc)
361
+ this.api.registerRenameListener(this.updateSrc)
362
+ this.api.registerRemoveListener(this.updateSrc)
363
+ })
364
+ })
365
+ }
366
+
367
+ updatingGgb = false
368
+
369
+ protected updated(changed: PropertyValues): void {
370
+
371
+ if(changed.has("src") && this.src && this.src.split(",").at(-1) !== this?.api?.getBase64()) {
372
+ this.updatingGgb = true
373
+ this?.api?.setBase64(this.src.split(",").at(-1), () => this.updatingGgb = false)
374
+ }
375
+ else if(changed.has("src") && !this.src) {
376
+ this.updatingGgb = true
377
+ this?.api?.setBase64("", () => this.updatingGgb = false)
378
+ }
379
+ }
380
+
381
+ apiReady: Promise<GeogebraAPI>
382
+ api?: GeogebraAPI
383
+
384
+ initializeIFrame(e: Event) {
385
+ const iframe = e.target as HTMLIFrameElement
386
+ const doc = iframe.contentDocument
387
+ const win = iframe.contentWindow
388
+ doc.body.style.margin = "0"
389
+ if(this.ggbStyles) {
390
+ const style = doc.createElement("style")
391
+ style.textContent = this.ggbStyles
392
+ doc.head.append(style)
393
+ }
394
+ doc.body.addEventListener("focusin", () => this.dispatchEvent(new FocusEvent("focus", {bubbles: true, composed: true})))
395
+ const ggbEl = doc.createElement("div")
396
+ ggbEl.id = "ggb-element"
397
+ doc.body.append(ggbEl);
398
+ const deployScript = doc.createElement("script")
399
+ deployScript.src = "https://www.geogebra.org/apps/deployggb.js"
400
+ deployScript.addEventListener("load", () => {
401
+ const createScript = doc.createElement("script")
402
+ createScript.textContent = `
403
+ const applet = new GGBApplet({${JSON.stringify(this.ggbProperties).slice(1, -1)}, appletOnLoad: api => document.dispatchEvent(new CustomEvent("ggb-load", {bubbles: true, composed: true, detail: {api}}))})
404
+ applet.inject("ggb-element")
405
+ `
406
+ doc.addEventListener("ggb-load", (e: any) => this.dispatchEvent(new CustomEvent("ggb-load", {bubbles: true, composed: true, detail: e.detail})))
407
+ doc.body.append(createScript)
408
+ })
409
+ doc.body.append(deployScript)
410
+ }
411
+
412
+ render() {
413
+ return html`
414
+ <iframe id="ggb" @load=${this.initializeIFrame}></iframe>
415
+ `
416
+ }
417
+ }
package/custom.d.ts ADDED
@@ -0,0 +1,180 @@
1
+ declare module '*.apng' {
2
+ const content: string;
3
+ export default content;
4
+ }
5
+ declare module '*.jpg' {
6
+ const content: string;
7
+ export default content;
8
+ }
9
+ declare module '*.jpeg' {
10
+ const content: string;
11
+ export default content;
12
+ }
13
+ declare module '*.jfif' {
14
+ const content: string;
15
+ export default content;
16
+ }
17
+ declare module '*.pjpeg' {
18
+ const content: string;
19
+ export default content;
20
+ }
21
+ declare module '*.pjp' {
22
+ const content: string;
23
+ export default content;
24
+ }
25
+ declare module '*.png' {
26
+ const content: string;
27
+ export default content;
28
+ }
29
+ declare module '*.svg' {
30
+ const content: string;
31
+ export default content;
32
+ }
33
+ declare module '*.webp' {
34
+ const content: string;
35
+ export default content;
36
+ }
37
+ declare module '*.bmp' {
38
+ const content: string;
39
+ export default content;
40
+ }
41
+ declare module '*.ico' {
42
+ const content: string;
43
+ export default content;
44
+ }
45
+ declare module '*.cur' {
46
+ const content: string;
47
+ export default content;
48
+ }
49
+ declare module '*.tif' {
50
+ const content: string;
51
+ export default content;
52
+ }
53
+ declare module '*.tiff' {
54
+ const content: string;
55
+ export default content;
56
+ }
57
+ declare module '*.wav' {
58
+ const content: string;
59
+ export default content;
60
+ }
61
+ declare module '*.wave' {
62
+ const content: string;
63
+ export default content;
64
+ }
65
+ declare module '*.mp3' {
66
+ const content: string;
67
+ export default content;
68
+ }
69
+ declare module '*.aac' {
70
+ const content: string;
71
+ export default content;
72
+ }
73
+ declare module '*.aacp' {
74
+ const content: string;
75
+ export default content;
76
+ }
77
+ declare module '*.oga' {
78
+ const content: string;
79
+ export default content;
80
+ }
81
+ declare module '*.flac' {
82
+ const content: string;
83
+ export default content;
84
+ }
85
+ declare module '*.weba' {
86
+ const content: string;
87
+ export default content;
88
+ }
89
+ declare module '*.mp4' {
90
+ const content: string;
91
+ export default content;
92
+ }
93
+ declare module '*.webm' {
94
+ const content: string;
95
+ export default content;
96
+ }
97
+ declare module '*.avif' {
98
+ const content: string;
99
+ export default content;
100
+ }
101
+ declare module '*.gif' {
102
+ const content: string;
103
+ export default content;
104
+ }
105
+ declare module '*.mov' {
106
+ const content: string;
107
+ export default content;
108
+ }
109
+ declare module '*.avi' {
110
+ const content: string;
111
+ export default content;
112
+ }
113
+ declare module '*.ogv' {
114
+ const content: string;
115
+ export default content;
116
+ }
117
+ declare module '*.mkv' {
118
+ const content: string;
119
+ export default content;
120
+ }
121
+ declare module '*.opus' {
122
+ const content: string;
123
+ export default content;
124
+ }
125
+ declare module '*.mpeg' {
126
+ const content: string;
127
+ export default content;
128
+ }
129
+ declare module '*.woff' {
130
+ const content: string;
131
+ export default content;
132
+ }
133
+ declare module '*.woff2' {
134
+ const content: string;
135
+ export default content;
136
+ }
137
+ declare module '*.ttf' {
138
+ const content: string;
139
+ export default content;
140
+ }
141
+ declare module '*.otf' {
142
+ const content: string;
143
+ export default content;
144
+ }
145
+ declare module '*.pdf' {
146
+ const content: string;
147
+ export default content;
148
+ }
149
+ declare module '*.json' {
150
+ const content: {[key: string]: any};
151
+ export default content;
152
+ }
153
+ declare module '*.jsonld' {
154
+ const content: {[key: string]: any};
155
+ export default content;
156
+ }
157
+ declare module '*.txt' {
158
+ const content: string;
159
+ export default content;
160
+ }
161
+ declare module '*.csv' {
162
+ const content: string;
163
+ export default content;
164
+ }
165
+ declare module '*.htm' {
166
+ const content: string;
167
+ export default content;
168
+ }
169
+ declare module '*.html' {
170
+ const content: string;
171
+ export default content;
172
+ }
173
+ declare module '*.xml' {
174
+ const content: string;
175
+ export default content;
176
+ }
177
+ declare module 'inline:*' {
178
+ const content: string;
179
+ export default content;
180
+ }