core_namespace: 5.18 update

This commit is contained in:
Van
2026-11-07 19:01:51 +03:00
parent c89e3402a2
commit 03b97bc546
4 changed files with 326 additions and 389 deletions

View File

@@ -1,22 +1,33 @@
--- @meta
---Version: 5.18
---@meta
--- Colors ---
--- A ColorString is a string that represents a color. It can be one of the following:
--- * a named color, e.g. `"red"`, `"blue"`, `"green"`, etc.
--- (see [CSS Color Module Level 4](https://www.w3.org/TR/css-color-4/#named-colors) for a full list of named colors)
--- * a named color with alpha, e.g. `"red#08"`, `"blue#FF"`, `"green#F"`, etc.
--- * an RGB or RGBA hex color code, e.g. `"#RRGGBB"` or `"#RRGGBBAA"`, where `RR`, `GG`, `BB`, and `AA` are two-digit hexadecimal numbers representing the red, green, blue, and alpha (opacity) components of the color.
--- * e.g. `"#FF0000"` for red, `"#00FF00"` for green, `"#0000FF"` for blue, etc.
--- * a shorthand hex color code, e.g. `"#RGB"` or `"#RGBA"`, where `R`, `G`, `B`, and `A` are single-digit hexadecimal numbers representing the red, green, blue, and alpha (opacity) components of the color.
--- @alias ColorString string
--- * `"#RGB"` defines a color in hexadecimal format, fully opaque.
--- * `"#RGBA"` defines a color in hexadecimal format, with an alpha channel.
--- * `"#RRGGBB"` defines a color in hexadecimal format, fully opaque.
--- * `"#RRGGBBAA"` defines a color in hexadecimal format, with an alpha channel.
---
---Named colors are also supported and are equivalent to
---[CSS Color Module Level 4](https://www.w3.org/TR/css-color-4/#named-color).
---To specify the value of the alpha channel,
---append `#A` or `#AA` to the end of the color name (e.g. `"darkgreen#08"`).
---@alias ColorString string
---@class ColorTable
---@field r integer
---@field g integer
---@field b integer
---@field a integer
--- A ColorSpec specifies a 32-bit color. It can be written in any of the following forms:
--- * table form: Each element ranging from 0..255 (a, if absent, defaults to 255):
--- `colorspec = {a=255, r=0, g=255, b=0}`
--- * numerical form: The raw integer value of an ARGB8 quad:
--- `colorspec = 0xFF00FF00`
--- * string form: A ColorString (defined above):
--- `colorspec = "green"`
--- @alias ColorSpec {r:number, g:number, b:number, a:number}|ColorString|number
---A ColorSpec specifies a 32-bit color. It can be written in any of the following forms:
--- * table form: Each element ranging from 0..255 (a, if absent, defaults to 255):
---
--- `colorspec = {a=255, r=0, g=255, b=0}`
--- * numerical form: The raw integer value of an ARGB8 quad:
---
--- `colorspec = 0xFF00FF00`
--- * string form: A ColorString (defined above):
---
--- `colorspec = "green"`
---@alias ColorSpec ColorTable|ColorString|integer