Skip to content

Commit c1a2ea5

Browse files
authored
Fix docs api (#6284)
* Fix autogenerated docs API * Move README * Move LICENSE in core * Create symlinks for README and LICENSE
1 parent e369c03 commit c1a2ea5

File tree

12 files changed

+237
-277
lines changed

12 files changed

+237
-277
lines changed

LICENSE

-25
This file was deleted.

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./packages/core/LICENSE

README.md

-174
This file was deleted.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./packages/core/README.md

docs/api/canvas.md

+5-15
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ canvas.setCoords(...);
3030

3131
* `canvas:dragend` When a drag operation is ended, `DataTransfer` instance passed as an argument.
3232

33-
`canvas:dragdata` On any dataTransfer parse, `DataTransfer` instance and the `result` are passed as arguments.
34-
By changing `result.content` you're able to customize what is dropped.
35-
------------------------------------------------------------------------
33+
* `canvas:dragdata` On any dataTransfer parse, `DataTransfer` instance and the `result` are passed as arguments. By changing `result.content` you're able to customize what is dropped.
3634

3735
* `canvas:drop` Something is dropped in canvas, `DataTransfer` instance and the dropped model are passed as arguments.
3836

@@ -92,39 +90,31 @@ editor.on('canvas:pointer', () => {
9290
});
9391
```
9492

95-
`canvas:refresh` Canvas was refreshed to update elements on top,
96-
like spots/tools (eg. via `editor.Canvas.refresh()` or on frame resize).
97-
--------------------------------------------------------------------------
93+
* `canvas:refresh` Canvas was refreshed to update elements on top, like spots/tools (eg. via `editor.Canvas.refresh()` or on frame resize).
9894

9995
```javascript
10096
editor.on('canvas:refresh', (canvasRefreshOptions) => {
10197
console.log('Canvas refreshed with options:', canvasRefreshOptions);
10298
});
10399
```
104100

105-
`canvas:frame:load` Frame loaded in canvas.
106-
The event is triggered right after iframe's `onload`.
107-
-------------------------------------------------------
101+
* `canvas:frame:load` Frame loaded in canvas. The event is triggered right after iframe's `onload`.
108102

109103
```javascript
110104
editor.on('canvas:frame:load', ({ window }) => {
111105
console.log('Frame loaded', window);
112106
});
113107
```
114108

115-
`canvas:frame:load:head` Frame head loaded in canvas.
116-
The event is triggered right after iframe's finished to load the head elemenets (eg. scripts)
117-
---------------------------------------------------------------------------------------------
109+
* `canvas:frame:load:head` Frame head loaded in canvas. The event is triggered right after iframe's finished to load the head elemenets (eg. scripts)
118110

119111
```javascript
120112
editor.on('canvas:frame:load:head', ({ window }) => {
121113
console.log('Frame head loaded', window);
122114
});
123115
```
124116

125-
`canvas:frame:load:body` Frame body loaded in canvas.
126-
The event is triggered when the body is rendered with components.
127-
-----------------------------------------------------------------
117+
* `canvas:frame:load:body` Frame body loaded in canvas. The event is triggered when the body is rendered with components.
128118

129119
```javascript
130120
editor.on('canvas:frame:load:body', ({ window }) => {

docs/api/commands.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ editor.on('command:run', ({ id, result, options }) => {
3232
});
3333
```
3434

35-
* `command:run:COMMAND\_ID` Triggered on run of a specific command.
35+
* `command:run:COMMAND-ID` Triggered on run of a specific command.
3636

3737
```javascript
3838
editor.on('command:run:my-command', ({ result, options }) => { ... });
3939
```
4040

41-
* `command:run:before:COMMAND\_ID` Triggered before the command is called.
41+
* `command:run:before:COMMAND-ID` Triggered before the command is called.
4242

4343
```javascript
4444
editor.on('command:run:before:my-command', ({ options }) => { ... });
4545
```
4646

47-
* `command:abort:COMMAND\_ID` Triggered when the command execution is aborted.
47+
* `command:abort:COMMAND-ID` Triggered when the command execution is aborted.
4848

4949
```javascript
5050
editor.on('command:abort:my-command', ({ options }) => { ... });
@@ -65,13 +65,13 @@ editor.on('command:stop', ({ id, result, options }) => {
6565
});
6666
```
6767

68-
* `command:stop:COMMAND\_ID` Triggered on stop of a specific command.
68+
* `command:stop:COMMAND-ID` Triggered on stop of a specific command.
6969

7070
```javascript
7171
editor.on('command:run:my-command', ({ result, options }) => { ... });
7272
```
7373

74-
* `command:stop:before:COMMAND\_ID` Triggered before the command is called to stop.
74+
* `command:stop:before:COMMAND-ID` Triggered before the command is called to stop.
7575

7676
```javascript
7777
editor.on('command:stop:before:my-command', ({ options }) => { ... });

docs/api/components.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,14 @@ cmp.addType(...);
4848
## Methods
4949

5050
* [getWrapper][2]
51-
5251
* [getComponents][3]
53-
5452
* [addComponent][4]
55-
5653
* [clear][5]
57-
5854
* [addType][6]
59-
6055
* [getType][7]
61-
6256
* [getTypes][8]
6357

64-
* [Component]: component.html
58+
[Component]: component.html
6559

6660
## getWrapper
6761

docs/api/storage_manager.md

+7-21
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ editor.on('storage:start', (type) => {
3232
});
3333
```
3434

35-
`storage:start:store` Storage store request start.
36-
The project JSON object to store is passed as an argument (which you can edit).
37-
-------------------------------------------------------------------------------
35+
* `storage:start:store` Storage store request start. The project JSON object to store is passed as an argument (which you can edit).
3836

3937
```javascript
4038
editor.on('storage:start:store', (data) => {
@@ -50,59 +48,47 @@ editor.on('storage:start:load', () => {
5048
});
5149
```
5250

53-
`storage:load` Storage loaded the project.
54-
The loaded project is passed as an argument.
55-
--------------------------------------------
51+
* `storage:load` Storage loaded the project. The loaded project is passed as an argument.
5652

5753
```javascript
5854
editor.on('storage:load', (data, res) => {
5955
console.log('Storage loaded the project');
6056
});
6157
```
6258

63-
`storage:store` Storage stored the project.
64-
The stored project is passed as an argument.
65-
--------------------------------------------
59+
* `storage:store` Storage stored the project. The stored project is passed as an argument.
6660

6761
```javascript
6862
editor.on('storage:store', (data, res) => {
6963
console.log('Storage stored the project');
7064
});
7165
```
7266

73-
`storage:after` Storage request completed.
74-
Triggered right after `storage:load`/`storage:store`.
75-
---------------------------------------------------------
67+
* `storage:after` Storage request completed. Triggered right after `storage:load`/`storage:store`.
7668

7769
```javascript
7870
editor.on('storage:after', (type) => {
7971
console.log('Storage request completed');
8072
});
8173
```
8274

83-
`storage:end` Storage request ended.
84-
This event triggers also in case of errors.
85-
-------------------------------------------
75+
* `storage:end` Storage request ended. This event triggers also in case of errors.
8676

8777
```javascript
8878
editor.on('storage:end', (type) => {
8979
console.log('Storage request ended');
9080
});
9181
```
9282

93-
`storage:end:store` Storage store request ended.
94-
This event triggers also in case of errors.
95-
-------------------------------------------
83+
* `storage:end:store` Storage store request ended. This event triggers also in case of errors.
9684

9785
```javascript
9886
editor.on('storage:end:store', () => {
9987
console.log('Storage store request ended');
10088
});
10189
```
10290

103-
`storage:end:load` Storage load request ended.
104-
This event triggers also in case of errors.
105-
-------------------------------------------
91+
* `storage:end:load` Storage load request ended. This event triggers also in case of errors.
10692

10793
```javascript
10894
editor.on('storage:end:load', () => {

0 commit comments

Comments
 (0)