diff --git a/.changeset/fast-candles-beam.md b/.changeset/fast-candles-beam.md new file mode 100644 index 0000000..4d8945b --- /dev/null +++ b/.changeset/fast-candles-beam.md @@ -0,0 +1,5 @@ +--- +'@api-viewer/docs': patch +--- + +Show method params and return type diff --git a/docs/assets/custom-elements.json b/docs/assets/custom-elements.json index 3ebd7f4..d3b4be3 100644 --- a/docs/assets/custom-elements.json +++ b/docs/assets/custom-elements.json @@ -690,6 +690,32 @@ "attribute": "indeterminate", "reflects": true }, + { + "kind": "method", + "name": "setBounds", + "return": { + "type": { + "text": "void" + } + }, + "parameters": [ + { + "name": "min", + "type": { + "text": "number" + }, + "description": "minimum value" + }, + { + "name": "max", + "type": { + "text": "number" + }, + "description": "maximum value" + } + ], + "description": "Set both minimum and maximum value." + }, { "kind": "method", "name": "_normalizedValueChanged", diff --git a/docs/docs/api/styling.md b/docs/docs/api/styling.md index ebdd9c3..91c9f16 100644 --- a/docs/docs/api/styling.md +++ b/docs/docs/api/styling.md @@ -6,7 +6,7 @@ The following custom CSS properties are available: | Property | Description | | -------------------------------- | ----------------------------------------------- | -| `--ave-accent-color` | Accent color, used for property names | +| `--ave-accent-color` | Accent color, used for property / method names | | `--ave-border-color` | Color used for borders and dividers | | `--ave-border-radius` | Border radius used for the outer border | | `--ave-button-active-background` | Color of the `:focus` and `:hover` button | @@ -20,6 +20,7 @@ The following custom CSS properties are available: | `--ave-link-hover-color` | API description links hover color | | `--ave-monospace-font` | Monospace font stack for the API items | | `--ave-primary-color` | Primary color, used for header and active tab | +| `--ave-secondary-color` | Color used for method types in API docs | | `--ave-tab-color` | Inactive tabs color | | `--ave-tab-selected-color` | Selected tab color | | `--ave-tab-indicator-size` | Size of the selected tab indicator | @@ -47,9 +48,15 @@ The following CSS shadow parts are available: | `docs-column` | Column, child of a `docs-row` part | | `docs-item` | Item representing a single entry (property, event etc) | | `docs-label` | Label (name, attribute, type, description) | -| `docs-markdown` | Iem description with parsed markdown content | +| `docs-markdown` | Item description with parsed markdown content | +| `docs-method` | Method name with its params and return type | +| `docs-method-params` | Comma-separated list of method params their types | +| `docs-method-type` | Return type of a method, or "void" if not specified | +| `docs-param-name` | Name of a method parameter | +| `docs-param-type` | Type of a method parameter | | `docs-row` | Row containing columns. Child of a `docs-item` part | | `docs-value` | Sibling of a `docs-label` part (name, attribute, type) | +| `docs-value` | Sibling of a `docs-label` part (name, attribute, type) | | `md-h1` | Markdown `