Skip to content

Commit 4e5fec8

Browse files
add lua-types for brand
1 parent 307bdb5 commit 4e5fec8

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---@meta
2+
3+
quarto.brand = {}
4+
5+
--[[
6+
Determine whether the current document has a brand of the specified `mode`.
7+
]]
8+
---@param mode string Mode string, `light` or `dark`
9+
---@return boolean
10+
function quarto.brand.has_mode(mode) end
11+
12+
--[[
13+
Get a brand color in CSS format, for the brand of the specified `mode`.
14+
]]
15+
---@param mode string Mode string, `light` or `dark`
16+
---@param name string Brand color name
17+
---@return string
18+
function quarto.brand.get_color_css(mode, name) end
19+
20+
--[[
21+
Get a brand color in the output format, for the brand of the specified `mode`.
22+
]]
23+
---@param mode string Mode string, `light` or `dark`
24+
---@param name string Brand color name
25+
---@return string
26+
function quarto.brand.get_color(mode, name) end
27+
28+
--[[
29+
Get typography brand options, for the brand of the specified `mode` and element `name`.
30+
31+
The options table may have `family`, `size`, `weight`, `style`, `line-height`, `color`,
32+
`background-color`, `decoration` entries, depending on the element.
33+
]]
34+
---@param mode string Mode string, `light` or `dark`
35+
---@param name string Typography element name
36+
---@return table
37+
function quarto.brand.get_typography(mode, name) end
38+
39+
--[[
40+
Get a logo resource, for the brand of the specified `mode` and element `name`.
41+
42+
Currently the resulting table contains `light` and/or `dark` entries,
43+
each a table with `path` and `alt`.
44+
45+
In the future, we could resolve fully based on `mode`.
46+
]]
47+
---@param mode string Mode string, `light` or `dark`
48+
---@param name string String to be converted
49+
---@return table
50+
function quarto.brand.get_logo(mode, name) end

0 commit comments

Comments
 (0)