From 521de7ed063d9eb9839a7f07ae546cc3c5ba1c78 Mon Sep 17 00:00:00 2001 From: Kirill Date: Thu, 19 Dec 2024 19:45:02 +0200 Subject: [PATCH] Fix array signature --- src/Configuration/Colors.md | 10 +++++----- src/Configuration/Configuration.md | 19 ++++++++++--------- src/Configuration/Display.md | 26 +++++++++++++------------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/Configuration/Colors.md b/src/Configuration/Colors.md index 549cf82..6edbf58 100644 --- a/src/Configuration/Colors.md +++ b/src/Configuration/Colors.md @@ -16,11 +16,11 @@ border = "#BEBEBEAA" When defining gradients, use the same property as you would for a single color, but provide a table value instead. All gradient configurations share these common properties: -| Key | Type | Default value | Short description | -| :----- | :-------- | :-----------: | :--------------------------------------- | -| mode | `String` | - | Specifies the gradient type | -| degree | `u16` | - | Angle of the gradient in degrees | -| colors | `Color[]` | - | An array of color values (in hex format) | +| Key | Type | Default value | Short description | +| :----- | :------------- | :-----------: | :--------------------------------------- | +| mode | `String` | - | Specifies the gradient type | +| degree | `u16` | - | Angle of the gradient in degrees | +| colors | `[Color; 2..]` | - | An array of color values (in hex format) | ### Supported gradient types diff --git a/src/Configuration/Configuration.md b/src/Configuration/Configuration.md index f59a84c..b16c7ff 100644 --- a/src/Configuration/Configuration.md +++ b/src/Configuration/Configuration.md @@ -15,15 +15,16 @@ Noti supports hot-reloading most configuration changes. Simply save your config Before of all properties, need to understand a few primitive types. The complex types like array or table will be explained in place. -| Type | Description | -| ---------------------- | ------------------------------------------------- | -| `bool` | A boolean value | -| `u8` | An unsigned integer of 8 bit | -| `u16` | An unsigned integer of 16 bit | -| `String` | A string,typically used as an enumeration variant | -| `[..]` | Array containing various type. Used as tuple | -| [`Color`](./Colors.md) | A color value. Either string or table | -| `Path` | The path to particular file or directory | +| Type | Description | +| ---------------------- | ------------------------------------------------------------------------------------------------------------- | +| `bool` | A boolean value | +| `u8` | An unsigned integer of 8 bit | +| `u16` | An unsigned integer of 16 bit | +| `String` | A string,typically used as an enumeration variant | +| `[...]` | An array containing various type. Used as tuple | +| `[T; from..to]` | An array with elements of type `T`, where the number of elements can vary between `from` and `to` (inclusive) | +| [`Color`](./Colors.md) | A color value. Either string or table | +| `Path` | The path to particular file or directory | ### Configuration Structure diff --git a/src/Configuration/Display.md b/src/Configuration/Display.md index 4422374..7fa6a0c 100644 --- a/src/Configuration/Display.md +++ b/src/Configuration/Display.md @@ -2,19 +2,19 @@ The `display` section allows you to customize the visual aspects of notifications. -| Property name | Description | Type | Default value | -| :---------------------------------- | :---------------------------------------------- | :---------------------------------------------------------------------- | :-----------: | -| [padding](#padding-margin) | Spacing from the banner's edge to inner content | `u8` or `[u8, u8]` or `[u8, u8, u8]` or `[u8, u8, u8, u8]` or `Spacing` | 0 | -| [margin](#padding-margin) | Spacing from the banner's edge to inner content | `u8` or `[u8, u8]` or `[u8, u8, u8]` or `[u8, u8, u8, u8]` or `Spacing` | 0 | -| [image](#image) | Image properties | `Image` | - | -| [border](#border) | Border properties | `Border` | - | -| [text](#text) | Text properties (alias for `title` and `body`) | `Text` | - | -| [title](#text) | Title text properties | `Text` | - | -| [body](#text) | Body text properties | `Text` | - | -| [markup](#markup) | Enables HTML markup | `bool` | true | -| [timeout](#timeout) | Banner timeout | `u16` or `Timeout` | 0 | -| [layout](../Layout/CustomLayout.md) | Custom layout path | `Path` | "default" | -| [theme](./themes) | Theme name | `String` | - | +| Property name | Description | Type | Default value | +| :---------------------------------- | :---------------------------------------------- | :-------------------------------- | :-----------: | +| [padding](#padding-margin) | Spacing from the banner's edge to inner content | `u8` or `[u8; 1..4]` or `Spacing` | 0 | +| [margin](#padding-margin) | Spacing from the banner's edge to inner content | `u8` or `[u8; 1..4]` or `Spacing` | 0 | +| [image](#image) | Image properties | `Image` | - | +| [border](#border) | Border properties | `Border` | - | +| [text](#text) | Text properties (alias for `title` and `body`) | `Text` | - | +| [title](#text) | Title text properties | `Text` | - | +| [body](#text) | Body text properties | `Text` | - | +| [markup](#markup) | Enables HTML markup | `bool` | true | +| [timeout](#timeout) | Banner timeout | `u16` or `Timeout` | 0 | +| [layout](../Layout/CustomLayout.md) | Custom layout path | `Path` | "default" | +| [theme](./themes) | Theme name | `String` | - | ## Padding & Margin