From 0e6455e1eb9c7dfd21f079cd79b31df28e748a2c Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 11 Jan 2023 16:32:28 +0400 Subject: [PATCH] Up docs --- docs/api.js | 2 +- docs/api/style_manager.md | 12 +++++++----- src/style_manager/index.ts | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/api.js b/docs/api.js index cd220e1bd..247749c59 100644 --- a/docs/api.js +++ b/docs/api.js @@ -20,7 +20,7 @@ async function generateDocs () { ['dom_components/index.ts', 'components.md'], ['dom_components/model/Component.js', 'component.md'], ['panels/index.ts', 'panels.md'], - // ['style_manager/index.ts', 'style_manager.md'], + ['style_manager/index.ts', 'style_manager.md'], ['style_manager/model/Sector.ts', 'sector.md'], ['style_manager/model/Property.ts', 'property.md'], ['style_manager/model/PropertyNumber.ts', 'property_number.md'], diff --git a/docs/api/style_manager.md b/docs/api/style_manager.md index b2ad80fe6..1ad9ee478 100644 --- a/docs/api/style_manager.md +++ b/docs/api/style_manager.md @@ -109,7 +109,7 @@ Get sector by id. ### Parameters * `id` **[String][23]** Sector id -* `opts` (optional, default `{}`) +* `opts` **{warn: [boolean][26]?}** (optional, default `{}`) ### Examples @@ -197,7 +197,7 @@ Get the property. const property = styleManager.getProperty('mySector', 'min-height'); ``` -Returns **([Property] | null)** +Returns **([Property] | [undefined][29])** ## getProperties @@ -213,7 +213,7 @@ Get all properties of the sector. const properties = styleManager.getProperties('mySector'); ``` -Returns **(Collection<[Property]> | null)** Collection of properties +Returns **(Collection<[Property]> | [undefined][29])** Collection of properties ## removeProperty @@ -240,7 +240,7 @@ The target could be a Component, CSSRule, or a CSS selector string. ### Parameters * `target` **([Component] | [CSSRule] | [String][23])** -* `opts` (optional, default `{}`) +* `opts` **{stylable: [boolean][26]?, component: Component?}** (optional, default `{}`) ### Examples @@ -386,7 +386,7 @@ Get all types Returns **[Array][27]** -[1]: https://github.com/artf/grapesjs/blob/master/src/style_manager/config/config.js +[1]: https://github.com/artf/grapesjs/blob/master/src/style_manager/config/config.ts [2]: #getconfig @@ -441,3 +441,5 @@ Returns **[Array][27]** [27]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array [28]: property.html#properties + +[29]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined diff --git a/src/style_manager/index.ts b/src/style_manager/index.ts index e4bac2102..c55092e6f 100644 --- a/src/style_manager/index.ts +++ b/src/style_manager/index.ts @@ -60,7 +60,7 @@ * [Component]: component.html * [Property]: property.html * - * @module StyleManager + * @module docsjs.StyleManager */ import { isUndefined, isArray, isString, debounce, bindAll } from 'underscore';