Skip to content

Commit 87811c6

Browse files
committed
docs: change formating and add missing arguments or type definitions
1 parent 4721f09 commit 87811c6

File tree

7 files changed

+197
-185
lines changed

7 files changed

+197
-185
lines changed

docs/animate.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Handles all the animation process
1313
- [CALLBACK_TRACKER](#callback-tracker) : <code>Object</code>
1414
- [TARGETS_STACK](#targets-stack) : <code>Object</code>
1515
- _Functions_
16-
- [removeCustomCssProperties](#removecustomcssproperties)
17-
- [setCssProperty](#setcssproperty)
16+
- [removeCustomCssProperties(element)](#removecustomcssproperties-element)
17+
- [setCssProperty(element, property, value)](#setcssproperty-element-property-value)
1818
- [updateCssProperties(element, opts)](#updatecssproperties-element-opts)
1919
- [getTargetSelector(eventTarget)](#gettargetselector-eventtarget) ⇒ <code>string</code>
2020
- [getTimeInMs(value)](#gettimeinms-value) ⇒ <code>number</code>
@@ -121,7 +121,7 @@ Gets all elements included in the stack for a given trigger button
121121
| ------- | ------------------- | --------------------------------------------------------- |
122122
| trigger | <code>string</code> | CSS selector for the element that triggered the animation |
123123

124-
## removeCustomCssProperties
124+
## removeCustomCssProperties(element)
125125

126126
Removes the CSS properties customized by the user
127127

@@ -131,7 +131,7 @@ Removes the CSS properties customized by the user
131131
| ------- | ------------------------ | ---------------------------------------------- |
132132
| element | <code>HTMLElement</code> | The DOM element with the custom CSS properties |
133133

134-
## setCssProperty
134+
## setCssProperty(element, property, value)
135135

136136
Sets an inline CSS property
137137

@@ -312,7 +312,7 @@ executed by another element being animated by the same trigger button
312312
Handles all the animation process
313313

314314
**Kind**: static function of [<code>animate</code>](#animate)
315-
**See**
315+
**See**:
316316

317317
- [globals.VISIBILITY_ANIMS_ID](globals.html#globals-visibility-anims-id)
318318
- [globals.MOTION_ANIMS_ID](globals.html#globals-motion-anims-id)
@@ -354,7 +354,7 @@ Generates the handler function to be passed to the event listener
354354

355355
**Kind**: inner method of [<code>animate</code>](#animate)
356356
**Returns**: A function to be passed to the addEventListener() as a handler
357-
**See**
357+
**See**:
358358

359359
- [globals.VISIBILITY_ANIMS_ID](globals.html#globals-visibility-anims-id)
360360
- [globals.MOTION_ANIMS_ID](globals.html#globals-motion-anims-id)
@@ -370,7 +370,7 @@ Generates the handler function to be passed to the event listener
370370
Initiate the event listener with the animation
371371

372372
**Kind**: static function of [<code>animate</code>](#animate)
373-
**See**
373+
**See**:
374374

375375
- [module:globals.VISIBILITY_ANIMS_ID](module:globals.VISIBILITY_ANIMS_ID)
376376
- [module:globals.MOTION_ANIMS_ID](module:globals.MOTION_ANIMS_ID)

docs/globals.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
title: globals
33
---
44

5-
# globals
5+
# Modules
66

77
## globals.js
88

99
Global Constants
1010

11-
- [.VISIBILITY_ANIMS_ID](#globals-visibility-anims-id) : <code>Object.&lt;string, number&gt;</code>
12-
- [.MOTION_ANIMS_ID](#globals-motion-anims-id) : <code>Object.&lt;string, number&gt;</code>
13-
- [.PROPERTY_NAMES](#globals-property-names) : <code>Object.&lt;string, string&gt;</code>
14-
- [.CLASS_NAMES](#globals-class-names) : <code>Object</code>
15-
- [.CUSTOM_CSS_PROPERTIES](#globals-custom-css-properties) : <code>ReadonlyArray.&lt;string&gt;</code>
11+
- _export_
12+
- [VISIBILITY_ANIMS_ID](#visibility-anims-id) : <code>Object.&lt;string, number&gt;</code>
13+
- [MOTION_ANIMS_ID](#motion-anims-id) : <code>Object.&lt;string, number&gt;</code>
14+
- [PROPERTY_NAMES](#property-names) : <code>Object.&lt;string, string&gt;</code>
15+
- [CLASS_NAMES](#class-names) : <code>Object</code>
16+
- [CUSTOM_CSS_PROPERTIES](#custom-css-properties) : <code>ReadonlyArray.&lt;string&gt;</code>
1617

17-
### globals.VISIBILITY_ANIMS_ID : <code>Object.&lt;string, number&gt;</code> {#globals-visibility-anims-id}
18+
## VISIBILITY_ANIMS_ID : <code>Object.&lt;string, number&gt;</code>
1819

1920
Visibility Animations IDs
2021

@@ -23,9 +24,9 @@ and the value is the index of the CSS class name
2324
inside CLASS_NAMES.hide and CLASS_NAMES.show
2425

2526
**Kind**: static constant of [<code>globals</code>](#globals-js)
26-
**See**: [globals.CLASS_NAMES](#globals-class-names)
27+
**See**: [globals.CLASS_NAMES](#class-names)
2728

28-
### globals.MOTION_ANIMS_ID : <code>Object.&lt;string, number&gt;</code>
29+
## MOTION_ANIMS_ID : <code>Object.&lt;string, number&gt;</code>
2930

3031
Motion Animations IDs
3132

@@ -34,9 +35,9 @@ and the value is the index of the CSS class name
3435
inside CLASS_NAMES.move and CLASS_NAMES.moveBack
3536

3637
**Kind**: static constant of [<code>globals</code>](#globals-js)
37-
**See**: [globals.CLASS_NAMES](#globals-class-names)
38+
**See**: [globals.CLASS_NAMES](#class-names)
3839

39-
### globals.PROPERTY_NAMES : <code>Object.&lt;string, string&gt;</code>
40+
## PROPERTY_NAMES : <code>Object.&lt;string, string&gt;</code>
4041

4142
CSS Custom Properties
4243

@@ -45,13 +46,13 @@ and the value is the respective CSS variable
4546

4647
**Kind**: static constant of [<code>globals</code>](#globals-js)
4748

48-
### globals.CLASS_NAMES : <code>Object</code>
49+
## CLASS_NAMES : <code>Object</code>
4950

5051
CSS Class Names
5152

5253
**Kind**: static constant of [<code>globals</code>](#globals-js)
5354

54-
### globals.CUSTOM_CSS_PROPERTIES : <code>ReadonlyArray.&lt;string&gt;</code>
55+
## CUSTOM_CSS_PROPERTIES : <code>ReadonlyArray.&lt;string&gt;</code>
5556

5657
CSS Properties customized by options passed in the animation function
5758

docs/js-css-animations.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
22
title: js-css-animations
33
---
44

5-
# js-css-animations
5+
# Modules
66

77
## js-css-animations.js
88

99
Builds the animation API that will be exported to the final user
1010

11-
- [js-css-animations](#js-css-animations)
11+
- _export_
12+
13+
- [jsCssAnimations](#jscssanimations) : <code>Object.&lt;string, (function()\|object)&gt;</code>
14+
15+
- _inner_
16+
1217
- [animationFunctions](#animationfunctions) : <code>Object</code>
1318
- [eventBoundAnimations](#eventboundanimations) : <code>Object.&lt;string, function()&gt;</code>
1419
- [verifyAnimationName](#verifyanimationname) : <code>ProxyHandler</code>
1520
- [.get(animations, name)](#verifyanimationname-get-animations-name)
16-
- [jsCssAnimations](#jscssanimations) : <code>Object.&lt;string, (function()\|object)&gt;</code>
1721
- [selectElement(selector)](#selectelement-selector) ⇒ <code>HTMLElement</code>
1822
- [selectAllElements(selector)](#selectallelements-selector) ⇒ <code>NodeList.&lt;Element&gt;</code>
1923
- [getTargets(selector)](#gettargets-selector) ⇒ <code>NodeList.&lt;Element&gt;</code> \| <code>Array.&lt;HTMLElement&gt;</code>
@@ -24,7 +28,15 @@ Builds the animation API that will be exported to the final user
2428
- [isVisible(selector)](#isvisible-selector) ⇒ <code>boolean</code>
2529
- [isHidden(selector)](#ishidden-selector) ⇒ <code>boolean</code>
2630

27-
### animationFunctions : <code>Object</code>
31+
## jsCssAnimations : <code>Object.&lt;string, (function()\|Object)&gt;</code>
32+
33+
An API encapsulating all the functions that can be used by the user,
34+
like all the animations functions and auxiliary functions like:
35+
isTransformed(), isVisible() and isHidden()
36+
37+
**Kind**: inner constant of [<code>js-css-animations</code>](#js-css-animations)
38+
39+
## animationFunctions : <code>Object</code>
2840

2941
An object containing all the animations functions.
3042

@@ -33,25 +45,26 @@ animationFunctions.hide and animationFunctions.show
3345

3446
All other keys of animationFunctions are Motion animations functions
3547

36-
**Kind**: inner constant of [<code>js-css-animations</code>](#js-css-animations)
37-
**See**
48+
**Kind**: inner constant of [<code>js-css-animations</code>](#js-css-animations)
49+
50+
**See**:
3851

39-
- [module:globals.VISIBILITY_ANIMS_ID](module:globals.VISIBILITY_ANIMS_ID)
40-
- [module:globals.MOTION_ANIMS_ID](module:globals.MOTION_ANIMS_ID)
52+
- [globals.VISIBILITY_ANIMS_ID](globals.html#globals-visibility-anims-id)
53+
- [globals.MOTION_ANIMS_ID](globals.html#globals-motion-anims-id)
4154

42-
### eventBoundAnimations : <code>Object.&lt;string, function()&gt;</code>
55+
## eventBoundAnimations : <code>Object.&lt;string, function()&gt;</code>
4356

4457
An object containing animations functions wich are triggered by an event (like 'click')
4558

4659
**Kind**: inner constant of [<code>js-css-animations</code>](#js-css-animations)
4760

48-
### verifyAnimationName : <code>ProxyHandler</code>
61+
## verifyAnimationName : <code>ProxyHandler</code>
4962

5063
Will throw an ReferenceError if the animation name does not corresponds to any animation function
5164

5265
**Kind**: inner constant of [<code>js-css-animations</code>](#js-css-animations)
5366

54-
#### verifyAnimationName.get(animations, name)
67+
### verifyAnimationName.get(animations, name)
5568

5669
**Kind**: static method of [<code>verifyAnimationName</code>](#verifyanimationname)
5770

@@ -60,15 +73,7 @@ Will throw an ReferenceError if the animation name does not corresponds to any a
6073
| animations | <code>Object.&lt;string, function()&gt;</code> | Object containing animation functions |
6174
| name | <code>string</code> | Name of the animation |
6275

63-
### jsCssAnimations : <code>Object.&lt;string, (function()\|Object)&gt;</code>
64-
65-
An API encapsulating all the functions that can be used by the user,
66-
like all the animations functions and auxiliary functions like
67-
isTransformed(), isVisible() and isHidden()
68-
69-
**Kind**: inner constant of [<code>js-css-animations</code>](#js-css-animations)
70-
71-
### selectElement(selector) ⇒ <code>HTMLElement</code>
76+
## selectElement(selector) ⇒ <code>HTMLElement</code>
7277

7378
If 'selector' is a string containing a valid CSS selector,
7479
it will be used to perform a querySelector(),
@@ -81,7 +86,7 @@ If 'selector' is already an HTMLElement it will be returned as it is.
8186
| -------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
8287
| selector | <code>Element</code> \| <code>string</code> | If it's an HTMLElement, 'selector' will be returned as it is. If it's a string, it should be a valid CSS selector |
8388

84-
### selectAllElements(selector) ⇒ <code>NodeList.&lt;Element&gt;</code>
89+
## selectAllElements(selector) ⇒ <code>NodeList.&lt;Element&gt;</code>
8590

8691
Returns a NodeList with all elements that match 'selector'
8792

@@ -92,7 +97,7 @@ Returns a NodeList with all elements that match 'selector'
9297
| -------- | ------------------- | ------------------------------------------------------- |
9398
| selector | <code>string</code> | A valid CSS selector to be passed to querySelectorAll() |
9499

95-
### getTargets(selector) ⇒ <code>NodeList.&lt;Element&gt;</code> \| <code>Array.&lt;HTMLElement&gt;</code>
100+
## getTargets(selector) ⇒ <code>NodeList.&lt;Element&gt;</code> \| <code>Array.&lt;HTMLElement&gt;</code>
96101

97102
Gets the element(s) to be animated. The user can pass either an HTMLElement or a CSS selector as a target to the animation
98103

@@ -103,7 +108,7 @@ Gets the element(s) to be animated. The user can pass either an HTMLElement or a
103108
| -------- | ----------------------------------------------- | ------------------------------------------------------------------------- |
104109
| selector | <code>HTMLElement</code> \| <code>string</code> | An HTMLElement or a valid CSS selector to be passed to querySelectorAll() |
105110

106-
### toggle(selector, animA, animB, opts)
111+
## toggle(selector, animA, animB, opts)
107112

108113
Toggles between two animations.
109114

@@ -112,7 +117,7 @@ it will toggle between the 'hide' state and the 'show' state,
112117
although this is only applicable to visibility animations.
113118

114119
**Kind**: inner method of [<code>js-css-animations</code>](#js-css-animations)
115-
**See**: [module:globals.VISIBILITY_ANIMS_ID](module:globals.VISIBILITY_ANIMS_ID)
120+
**See**: [globals.VISIBILITY_ANIMS_ID](globals.html#globals-visibility-anims-id)
116121

117122
| Param | Type | Description |
118123
| -------- | ----------------------------------------------- | -------------------------------------------------------------------------- |
@@ -121,15 +126,15 @@ although this is only applicable to visibility animations.
121126
| animB | <code>string</code> | The next animation name |
122127
| opts | <code>Object</code> \| <code>Object</code> | All options that can be passed by the user to customize the animation |
123128

124-
#### toggle~element
129+
### toggle~element
125130

126131
The current animation attribute will only be set in the first element that
127132
matches the 'selector' passed, but the animation will apply to all elements
128133
matched by 'selector'
129134

130135
**Kind**: inner constant of [<code>toggle</code>](#toggle-selector-anima-animb-opts)
131136

132-
### checkTransform(selector) ⇒ <code>boolean</code>
137+
## checkTransform(selector) ⇒ <code>boolean</code>
133138

134139
Verifies if an element is out of its original orientation or scale.
135140

@@ -144,7 +149,7 @@ out of its original orientation.
144149
| -------- | ----------------------------------------------- | --------------------------------------------------------------- |
145150
| selector | <code>HTMLElement</code> \| <code>string</code> | An element or a valid CSS selector corresponding to the element |
146151

147-
### checkVisibility(selector, mode) ⇒ <code>boolean</code>
152+
## checkVisibility(selector, mode) ⇒ <code>boolean</code>
148153

149154
Verifies if a given element is hidden or visible
150155

@@ -156,7 +161,7 @@ Verifies if a given element is hidden or visible
156161
| selector | <code>Element</code> \| <code>string</code> | An element or a valid CSS selector corresponding to the element |
157162
| mode | <code>string</code> | Either 'visible' or 'hidden' |
158163

159-
### isVisible(selector) ⇒ <code>boolean</code>
164+
## isVisible(selector) ⇒ <code>boolean</code>
160165

161166
**Kind**: inner method of [<code>js-css-animations</code>](#js-css-animations)
162167
**Returns**: True if the element is visible, False otherwise
@@ -165,7 +170,7 @@ Verifies if a given element is hidden or visible
165170
| -------- | ------------------------------------------- | ----------------------------------- |
166171
| selector | <code>Element</code> \| <code>string</code> | Dom element or a valid CSS selector |
167172

168-
### isHidden(selector) ⇒ <code>boolean</code>
173+
## isHidden(selector) ⇒ <code>boolean</code>
169174

170175
**Kind**: inner method of [<code>js-css-animations</code>](#js-css-animations)
171176
**Returns**: True if the element is hidden, False otherwise

0 commit comments

Comments
 (0)