@doenet/standalone 0.6.1 → 0.6.2

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/package.json CHANGED
@@ -2,46 +2,14 @@
2
2
  "name": "@doenet/standalone",
3
3
  "type": "module",
4
4
  "description": "Standalone renderer for DoenetML suitable for being included in a web page",
5
- "version": "0.6.1",
5
+ "version": "0.6.2",
6
6
  "license": "AGPL-3.0-or-later",
7
7
  "homepage": "https://github.com/Doenet/DoenetML#readme",
8
8
  "private": false,
9
9
  "repository": "github:Doenet/DoenetML",
10
10
  "files": [
11
- "/dist"
11
+ "/"
12
12
  ],
13
- "main": "dist/doenet-standalone.js",
14
- "scripts": {
15
- "dev": "vite",
16
- "build": "wireit",
17
- "test": "echo \"No tests \"",
18
- "preview": "vite preview"
19
- },
20
- "wireit": {
21
- "build": {
22
- "command": "vite build",
23
- "files": [
24
- "src/**/*.ts",
25
- "src/**/*.tsx",
26
- "tsconfig.json"
27
- ],
28
- "output": [
29
- "dist/**/*.js",
30
- "dist/**/*.d.ts",
31
- "dist/**/*.json"
32
- ],
33
- "dependencies": [
34
- "../doenetml:build"
35
- ]
36
- }
37
- },
38
- "peerDependencies": {
39
- "react": "^18.2.0",
40
- "react-dom": "^18.2.0",
41
- "styled-components": "^5.3.11"
42
- },
43
- "dependencies": {},
44
- "devDependencies": {
45
- "vite": "^4.5.0"
46
- }
13
+ "main": "doenet-standalone.js",
14
+ "dependencies": {}
47
15
  }
package/README.md DELETED
@@ -1,62 +0,0 @@
1
- # Standalone DoenetML Renderer
2
-
3
- This workspace contains a standalone DoenetML renderer.
4
-
5
- ## Usage
6
-
7
- Include
8
-
9
- ```html
10
- <script type="module" src="doenet-standalone.js"></script>
11
- ```
12
-
13
- in your webpage. Then you can call the globally-exported function `renderDoenetToContainer`, which expects
14
- a `<div>` element containing a `<source type="text/doenetml"></source>` as a child.
15
-
16
- For example
17
-
18
- ```html
19
- <script type="module">
20
- renderDoenetToContainer(document.querySelector(".doenetml-applet"));
21
- </script>
22
-
23
- <div class="doenetml-applet">
24
- <script type="text/doenetml">
25
- <p>Use this to test DoenetML</p>
26
- <graph showNavigation="false">
27
-
28
- <line through="(-8,8) (9,6)" />
29
- <line through="(0,4)" slope="1/2" styleNumber="2" />
30
-
31
- <line equation="y=2x-8" styleNumber="3" />
32
- <line equation="x=-6" styleNumber="4" />
33
-
34
- </graph>
35
- </script>
36
- </div>
37
- ```
38
-
39
- To pass attributes to the DoenetML react component, you may write them in kebob-case prefixed with `data-doenet`.
40
- For example,
41
-
42
- ```html
43
- <div class="doenetml-applet">
44
- <script type="text/doenetml" data-doenet-read-only="true">
45
- <graph showNavigation="false">
46
- <line equation="x=-6" styleNumber="4" />
47
- </graph>
48
- </script>
49
- </div>
50
- ```
51
-
52
- ## Development
53
-
54
- Run
55
-
56
- ```bash
57
- npm run dev
58
- ```
59
-
60
- to start a `vite` dev server that serves the test viewer and navigate to the indicated URL. By default
61
- `index.html` is served. You can instead navigate to `index-inline-worker.html` to view the same page but
62
- with the inlined version of the DoenetML web worker.
File without changes