forked from HEL/rivet-typst
fixed raw decode warning + updated doc
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/// Creates a dictionary of all configuration parameters
|
||||
///
|
||||
/// - default-font-family (str): The default font family
|
||||
/// - default font-size (length): The absolute default font size
|
||||
/// - default-font-size (length): The absolute default font size
|
||||
/// - italic-font-family (str): The italic font family (for value descriptions)
|
||||
/// - italic-font-size (length): The absolute italic font size
|
||||
/// - background (color): The diagram background color
|
||||
@ -15,7 +15,7 @@
|
||||
/// - dash-length (float): The length of individual dashes (for dashed lines)
|
||||
/// - dash-space (float): The space between two dashes (for dashed lines)
|
||||
/// - arrow-size (float): The size of arrow heads
|
||||
/// - margins (tuple[float]): TODO -> remove
|
||||
/// - margins (tuple): TODO -> remove
|
||||
/// - arrow-margin (float): The margin between arrows and the structures they link
|
||||
/// - values-gap (float): The gap between individual values
|
||||
/// - arrow-label-distance (float): The distance between arrows and their labels
|
||||
@ -55,9 +55,9 @@
|
||||
) = {}
|
||||
|
||||
/// Dark theme config
|
||||
/// - ..args (any): see #doc-ref("config.config")
|
||||
/// - ..args (any): see @@config()
|
||||
#let dark(..args) = {}
|
||||
|
||||
/// Blueprint theme config
|
||||
/// - ..args (any): see #doc-ref("config.config")
|
||||
/// - ..args (any): see @@config()
|
||||
#let blueprint(..args) = {}
|
@ -13,7 +13,7 @@
|
||||
box(
|
||||
stroke: black + 1pt,
|
||||
radius: .5em,
|
||||
fill: if fill {yellow.lighten(80%)} else {none},
|
||||
fill: if fill {orange.lighten(95%)} else {none},
|
||||
if show-src {
|
||||
let src-block = align(left, raw(src, lang: "typc"))
|
||||
table(
|
||||
|
@ -2,15 +2,18 @@
|
||||
/// This function returns a dictionary of structures
|
||||
///
|
||||
/// Supported formats: #schema.valid-extensions.map(e => raw("." + e)).join(", ")
|
||||
/// - path-or-schema (str, raw, dictionary): If it is a string, defines the path to load. \
|
||||
/// If it is a raw block, its content is directly parsed (the block's language will define the format to use) \
|
||||
/// If it is a dictionary, it directly defines the schema structure
|
||||
/// - path-or-schema (str, raw, dictionary):
|
||||
/// #list(
|
||||
/// [If it is a string, defines the path to load.\ #emoji.warning Warning: this will only work if this package is part of your project, as packages installed in the `@local` or `@preview` namespace cannot access project files],
|
||||
/// [If it is a raw block, its content is directly parsed (the block's language will define the format to use)],
|
||||
/// [If it is a dictionary, it directly defines the schema structure]
|
||||
/// )
|
||||
/// -> dictionary
|
||||
#let load(path-or-schema) = {}
|
||||
|
||||
/// Renders the given schema
|
||||
/// This functions
|
||||
/// - schema (dictionary): A schema dictionary, as returned by #doc-ref("schema.load")
|
||||
/// - schema (dictionary): A schema dictionary, as returned by @@load()
|
||||
/// - config (auto, dictionary): The configuration parameters, as returned by #doc-ref("config.config")
|
||||
/// - width (ratio, length): The width of the generated figure
|
||||
#let render(schema, config: auto, width: 100%) = {}
|
Reference in New Issue
Block a user