@doenet/doenetml-iframe 0.7.0-alpha10
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/index.d.ts +81 -0
- package/index.js +25312 -0
- package/index.js.map +1 -0
- package/package.json +22 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { DoenetEditor as DoenetEditor_2 } from '@doenet/doenetml';
|
|
3
|
+
import { DoenetViewer as DoenetViewer_2 } from '@doenet/doenetml';
|
|
4
|
+
import { mathjaxConfig } from '@doenet/utils';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Render Doenet Editor constrained to an iframe. A URL pointing to a version of DoenetML
|
|
8
|
+
* standalone must be provided (along with a URL to the corresponding CSS file).
|
|
9
|
+
*
|
|
10
|
+
* Parameters being passed to the underlying DoenetML component are passed via the `DoenetEditorProps` prop.
|
|
11
|
+
* However, only serializable parameters may be passed. E.g., callbacks **cannot** be passed to the underlying
|
|
12
|
+
* DoenetML component. Instead you must use the message passing interface of `DoenetEditor` to communicate
|
|
13
|
+
* with the underlying DoenetML component.
|
|
14
|
+
*/
|
|
15
|
+
export declare function DoenetEditor({ doenetML, standaloneUrl: specifiedStandaloneUrl, cssUrl: specifiedCssUrl, doenetmlVersion: specifiedDoenetmlVersion, width, height, ...doenetEditorProps }: DoenetEditorIframeProps): default_2.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export declare type DoenetEditorIframeProps = DoenetEditorProps & {
|
|
18
|
+
doenetML: string;
|
|
19
|
+
/**
|
|
20
|
+
* The URL of a standalone DoenetML bundle. This may be from the CDN.
|
|
21
|
+
*/
|
|
22
|
+
standaloneUrl?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The URL of a CSS file that styles the standalone DoenetML bundle.
|
|
25
|
+
*/
|
|
26
|
+
cssUrl?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The version of standalone DoenetML bundle if urls are not provided
|
|
29
|
+
*/
|
|
30
|
+
doenetmlVersion?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The width of the iframe (and the width of the editor-viewer widget)
|
|
33
|
+
*/
|
|
34
|
+
width?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The height of the iframe (and the height of the editor-viewer widget)
|
|
37
|
+
*/
|
|
38
|
+
height?: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
declare type DoenetEditorProps = Omit<default_2.ComponentProps<typeof DoenetEditor_2>, "doenetML" | "width" | "height">;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Render Doenet viewer constrained to an iframe. A URL pointing to a version of DoenetML
|
|
45
|
+
* standalone must be provided (along with a URL to the corresponding CSS file).
|
|
46
|
+
*
|
|
47
|
+
* Parameters being passed to the underlying DoenetML component are passed via the `DoenetViewerProps` prop.
|
|
48
|
+
* However, only serializable parameters may be passed. E.g., callbacks **cannot** be passed to the underlying
|
|
49
|
+
* DoenetML component. Instead you must use the message passing interface of `DoenetViewer` to communicate
|
|
50
|
+
* with the underlying DoenetML component.
|
|
51
|
+
*/
|
|
52
|
+
export declare function DoenetViewer({ doenetML, standaloneUrl: specifiedStandaloneUrl, cssUrl: specifiedCssUrl, doenetmlVersion: specifiedDoenetmlVersion, scrollableContainer: _scrollableContainer, ...doenetViewerProps }: DoenetViewerIframeProps): default_2.JSX.Element;
|
|
53
|
+
|
|
54
|
+
export declare type DoenetViewerIframeProps = DoenetViewerProps & {
|
|
55
|
+
doenetML: string;
|
|
56
|
+
/**
|
|
57
|
+
* The URL of a standalone DoenetML bundle. This may be from the CDN.
|
|
58
|
+
*/
|
|
59
|
+
standaloneUrl?: string;
|
|
60
|
+
/**
|
|
61
|
+
* The URL of a CSS file that styles the standalone DoenetML bundle.
|
|
62
|
+
*/
|
|
63
|
+
cssUrl?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The version of standalone DoenetML bundle if urls are not provided
|
|
66
|
+
*/
|
|
67
|
+
doenetmlVersion?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Added to remove the scrollableContainer attribute from DoenetViewerProps
|
|
70
|
+
* that will be stringified (as it has circular structure)
|
|
71
|
+
*/
|
|
72
|
+
scrollableContainer?: any;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
declare type DoenetViewerProps = Omit<default_2.ComponentProps<typeof DoenetViewer_2>, "doenetML" | "scrollableContainer">;
|
|
76
|
+
|
|
77
|
+
export { mathjaxConfig }
|
|
78
|
+
|
|
79
|
+
export declare const version: string;
|
|
80
|
+
|
|
81
|
+
export { }
|