From d6302cefe1b591a80e7701a4f2a6618390219398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Wed, 12 Mar 2025 10:53:43 +0100 Subject: [PATCH 1/3] docs: add expected schema for brand typography "files" field Fixes #12267 --- src/resources/editor/tools/vs-code.mjs | 31 +++++++++++++++---- src/resources/editor/tools/yaml/web-worker.js | 31 +++++++++++++++---- .../yaml/yaml-intelligence-resources.json | 18 ++++++++--- src/resources/schema/definitions.yml | 2 +- src/resources/types/schema-types.ts | 2 +- 5 files changed, 65 insertions(+), 19 deletions(-) diff --git a/src/resources/editor/tools/vs-code.mjs b/src/resources/editor/tools/vs-code.mjs index f16c739e7a7..d2710158562 100644 --- a/src/resources/editor/tools/vs-code.mjs +++ b/src/resources/editor/tools/vs-code.mjs @@ -12499,7 +12499,7 @@ var require_yaml_intelligence_resources = __commonJS({ } ] }, - description: "The font files to include. These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" + description: "The font files to include as an array (*i.e.*, `- path: `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" } }, required: [ @@ -19887,6 +19887,13 @@ var require_yaml_intelligence_resources = __commonJS({ }, errorMessage: "type key not supported at project type-level. Use `project: type: ...` instead.", description: "internal-schema-hack" + }, + { + name: "engines", + schema: { + arrayOf: "string" + }, + description: "List execution engines you want to give priority when determining which engine should render a notebook. If two engines have support for a notebook, the one listed earlier will be chosen. Quarto's default order is 'knitr', 'jupyter', 'markdown', 'julia'." } ], "schema/schema.yml": [ @@ -23967,7 +23974,8 @@ var require_yaml_intelligence_resources = __commonJS({ }, "Disambiguating year suffix in author-date styles (e.g. \u201Ca\u201D in \u201CDoe,\n1999a\u201D).", "Manuscript configuration", - "internal-schema-hack" + "internal-schema-hack", + "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto\u2019s default order\nis \u2018knitr\u2019, \u2018jupyter\u2019, \u2018markdown\u2019, \u2018julia\u2019." ], "schema/external-schemas.yml": [ { @@ -24196,12 +24204,12 @@ var require_yaml_intelligence_resources = __commonJS({ mermaid: "%%" }, "handlers/mermaid/schema.yml": { - _internalId: 194269, + _internalId: 194322, type: "object", description: "be an object", properties: { "mermaid-format": { - _internalId: 194261, + _internalId: 194314, type: "enum", enum: [ "png", @@ -24217,7 +24225,7 @@ var require_yaml_intelligence_resources = __commonJS({ exhaustiveCompletions: true }, theme: { - _internalId: 194268, + _internalId: 194321, type: "anyOf", anyOf: [ { @@ -33253,11 +33261,22 @@ var jupyterEngineSchema = defineCached( }, "engine-jupyter" ); +var juliaEnginesSchema = defineCached( + // deno-lint-ignore require-await + async () => { + return { + schema: makeEngineSchema("julia"), + errorHandlers: [] + }; + }, + "engine-julia" +); async function getEngineOptionsSchema() { const obj = { markdown: await markdownEngineSchema(), knitr: await knitrEngineSchema(), - jupyter: await jupyterEngineSchema() + jupyter: await jupyterEngineSchema(), + julia: await juliaEnginesSchema() }; return obj; } diff --git a/src/resources/editor/tools/yaml/web-worker.js b/src/resources/editor/tools/yaml/web-worker.js index 66a0100644f..628583e3273 100644 --- a/src/resources/editor/tools/yaml/web-worker.js +++ b/src/resources/editor/tools/yaml/web-worker.js @@ -12500,7 +12500,7 @@ try { } ] }, - description: "The font files to include. These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" + description: "The font files to include as an array (*i.e.*, `- path: `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" } }, required: [ @@ -19888,6 +19888,13 @@ try { }, errorMessage: "type key not supported at project type-level. Use `project: type: ...` instead.", description: "internal-schema-hack" + }, + { + name: "engines", + schema: { + arrayOf: "string" + }, + description: "List execution engines you want to give priority when determining which engine should render a notebook. If two engines have support for a notebook, the one listed earlier will be chosen. Quarto's default order is 'knitr', 'jupyter', 'markdown', 'julia'." } ], "schema/schema.yml": [ @@ -23968,7 +23975,8 @@ try { }, "Disambiguating year suffix in author-date styles (e.g. \u201Ca\u201D in \u201CDoe,\n1999a\u201D).", "Manuscript configuration", - "internal-schema-hack" + "internal-schema-hack", + "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto\u2019s default order\nis \u2018knitr\u2019, \u2018jupyter\u2019, \u2018markdown\u2019, \u2018julia\u2019." ], "schema/external-schemas.yml": [ { @@ -24197,12 +24205,12 @@ try { mermaid: "%%" }, "handlers/mermaid/schema.yml": { - _internalId: 194269, + _internalId: 194322, type: "object", description: "be an object", properties: { "mermaid-format": { - _internalId: 194261, + _internalId: 194314, type: "enum", enum: [ "png", @@ -24218,7 +24226,7 @@ try { exhaustiveCompletions: true }, theme: { - _internalId: 194268, + _internalId: 194321, type: "anyOf", anyOf: [ { @@ -33267,11 +33275,22 @@ ${tidyverseInfo( }, "engine-jupyter" ); + var juliaEnginesSchema = defineCached( + // deno-lint-ignore require-await + async () => { + return { + schema: makeEngineSchema("julia"), + errorHandlers: [] + }; + }, + "engine-julia" + ); async function getEngineOptionsSchema() { const obj = { markdown: await markdownEngineSchema(), knitr: await knitrEngineSchema(), - jupyter: await jupyterEngineSchema() + jupyter: await jupyterEngineSchema(), + julia: await juliaEnginesSchema() }; return obj; } diff --git a/src/resources/editor/tools/yaml/yaml-intelligence-resources.json b/src/resources/editor/tools/yaml/yaml-intelligence-resources.json index 11528adcab4..8dc7bca7626 100644 --- a/src/resources/editor/tools/yaml/yaml-intelligence-resources.json +++ b/src/resources/editor/tools/yaml/yaml-intelligence-resources.json @@ -5471,7 +5471,7 @@ } ] }, - "description": "The font files to include. These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" + "description": "The font files to include as an array (*i.e.*, `- path: `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" } }, "required": [ @@ -12859,6 +12859,13 @@ }, "errorMessage": "type key not supported at project type-level. Use `project: type: ...` instead.", "description": "internal-schema-hack" + }, + { + "name": "engines", + "schema": { + "arrayOf": "string" + }, + "description": "List execution engines you want to give priority when determining which engine should render a notebook. If two engines have support for a notebook, the one listed earlier will be chosen. Quarto's default order is 'knitr', 'jupyter', 'markdown', 'julia'." } ], "schema/schema.yml": [ @@ -16939,7 +16946,8 @@ }, "Disambiguating year suffix in author-date styles (e.g. “a” in “Doe,\n1999a”).", "Manuscript configuration", - "internal-schema-hack" + "internal-schema-hack", + "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto’s default order\nis ‘knitr’, ‘jupyter’, ‘markdown’, ‘julia’." ], "schema/external-schemas.yml": [ { @@ -17168,12 +17176,12 @@ "mermaid": "%%" }, "handlers/mermaid/schema.yml": { - "_internalId": 194269, + "_internalId": 194322, "type": "object", "description": "be an object", "properties": { "mermaid-format": { - "_internalId": 194261, + "_internalId": 194314, "type": "enum", "enum": [ "png", @@ -17189,7 +17197,7 @@ "exhaustiveCompletions": true }, "theme": { - "_internalId": 194268, + "_internalId": 194321, "type": "anyOf", "anyOf": [ { diff --git a/src/resources/schema/definitions.yml b/src/resources/schema/definitions.yml index 69615106c34..33c3d70fdec 100644 --- a/src/resources/schema/definitions.yml +++ b/src/resources/schema/definitions.yml @@ -2954,7 +2954,7 @@ # string: # pattern: '^U\+[0-9A-F]{4}(?:-[0-9A-F]{4})?(?:,U\+[0-9A-F]{4}(?:-[0-9A-F]{4})?)*$' description: > - The font files to include. These can be local or online. + The font files to include as an array (*i.e.*, `- path: `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs. required: [files, family, source] diff --git a/src/resources/types/schema-types.ts b/src/resources/types/schema-types.ts index c755cbb615d..5b19b5b5ab8 100644 --- a/src/resources/types/schema-types.ts +++ b/src/resources/types/schema-types.ts @@ -1469,7 +1469,7 @@ export type BrandFontFile = { path: string; style?: BrandFontStyle; weight?: BrandFontWeight; - }))[] /* The font files to include. These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs. */; + }))[] /* The font files to include as an array (*i.e.*, `- path: `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs. */; source: "file"; }; /* A method for providing font files directly, either locally or from an online location. */ From 43f93e13c7c21e06f318c527d31538f909a086c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Wed, 12 Mar 2025 15:21:41 +0100 Subject: [PATCH 2/3] fix: use "`- path: ` or `- `" Fixes #12267 --- src/resources/editor/tools/vs-code.mjs | 11 ++++++----- src/resources/editor/tools/yaml/web-worker.js | 11 ++++++----- .../tools/yaml/yaml-intelligence-resources.json | 11 ++++++----- src/resources/schema/definitions.yml | 3 ++- src/resources/types/schema-types.ts | 2 +- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/resources/editor/tools/vs-code.mjs b/src/resources/editor/tools/vs-code.mjs index d2710158562..18e96252cb7 100644 --- a/src/resources/editor/tools/vs-code.mjs +++ b/src/resources/editor/tools/vs-code.mjs @@ -12499,7 +12499,7 @@ var require_yaml_intelligence_resources = __commonJS({ } ] }, - description: "The font files to include as an array (*i.e.*, `- path: `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" + description: "The font files to include as an array (`- path: ` or `- `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" } }, required: [ @@ -21900,7 +21900,7 @@ var require_yaml_intelligence_resources = __commonJS({ "The font display method, determines how a font face is font face is\nshown depending on its download status and readiness for use.", "A method for providing font files directly, either locally or from an\nonline location.", "The font family name.", - "The font files to include. These can be local or online. Local file\npaths should be relative to the brand.yml file. Online\npaths should be complete URLs.", + "The font files to include as an array (i.e.,\n- path: <path>). These can be local or online. Local\nfile paths should be relative to the brand.yml file. Online\npaths should be complete URLs.", "The path to the font file. This can be a local path or a URL.", "A locally-installed font family name. When used, the end-user is\nresponsible for ensuring that the font is installed on their system.", { @@ -23623,6 +23623,7 @@ var require_yaml_intelligence_resources = __commonJS({ "Disambiguating year suffix in author-date styles (e.g. \u201Ca\u201D in \u201CDoe,\n1999a\u201D).", "Manuscript configuration", "internal-schema-hack", + "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto\u2019s default order\nis \u2018knitr\u2019, \u2018jupyter\u2019, \u2018markdown\u2019, \u2018julia\u2019.", { short: "Include an automatically generated table of contents", long: "" @@ -24204,12 +24205,12 @@ var require_yaml_intelligence_resources = __commonJS({ mermaid: "%%" }, "handlers/mermaid/schema.yml": { - _internalId: 194322, + _internalId: 194332, type: "object", description: "be an object", properties: { "mermaid-format": { - _internalId: 194314, + _internalId: 194324, type: "enum", enum: [ "png", @@ -24225,7 +24226,7 @@ var require_yaml_intelligence_resources = __commonJS({ exhaustiveCompletions: true }, theme: { - _internalId: 194321, + _internalId: 194331, type: "anyOf", anyOf: [ { diff --git a/src/resources/editor/tools/yaml/web-worker.js b/src/resources/editor/tools/yaml/web-worker.js index 628583e3273..f0e4c606271 100644 --- a/src/resources/editor/tools/yaml/web-worker.js +++ b/src/resources/editor/tools/yaml/web-worker.js @@ -12500,7 +12500,7 @@ try { } ] }, - description: "The font files to include as an array (*i.e.*, `- path: `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" + description: "The font files to include as an array (`- path: ` or `- `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" } }, required: [ @@ -21901,7 +21901,7 @@ try { "The font display method, determines how a font face is font face is\nshown depending on its download status and readiness for use.", "A method for providing font files directly, either locally or from an\nonline location.", "The font family name.", - "The font files to include. These can be local or online. Local file\npaths should be relative to the brand.yml file. Online\npaths should be complete URLs.", + "The font files to include as an array (i.e.,\n- path: <path>). These can be local or online. Local\nfile paths should be relative to the brand.yml file. Online\npaths should be complete URLs.", "The path to the font file. This can be a local path or a URL.", "A locally-installed font family name. When used, the end-user is\nresponsible for ensuring that the font is installed on their system.", { @@ -23624,6 +23624,7 @@ try { "Disambiguating year suffix in author-date styles (e.g. \u201Ca\u201D in \u201CDoe,\n1999a\u201D).", "Manuscript configuration", "internal-schema-hack", + "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto\u2019s default order\nis \u2018knitr\u2019, \u2018jupyter\u2019, \u2018markdown\u2019, \u2018julia\u2019.", { short: "Include an automatically generated table of contents", long: "" @@ -24205,12 +24206,12 @@ try { mermaid: "%%" }, "handlers/mermaid/schema.yml": { - _internalId: 194322, + _internalId: 194332, type: "object", description: "be an object", properties: { "mermaid-format": { - _internalId: 194314, + _internalId: 194324, type: "enum", enum: [ "png", @@ -24226,7 +24227,7 @@ try { exhaustiveCompletions: true }, theme: { - _internalId: 194321, + _internalId: 194331, type: "anyOf", anyOf: [ { diff --git a/src/resources/editor/tools/yaml/yaml-intelligence-resources.json b/src/resources/editor/tools/yaml/yaml-intelligence-resources.json index 8dc7bca7626..188c6b7d216 100644 --- a/src/resources/editor/tools/yaml/yaml-intelligence-resources.json +++ b/src/resources/editor/tools/yaml/yaml-intelligence-resources.json @@ -5471,7 +5471,7 @@ } ] }, - "description": "The font files to include as an array (*i.e.*, `- path: `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" + "description": "The font files to include as an array (`- path: ` or `- `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" } }, "required": [ @@ -14872,7 +14872,7 @@ "The font display method, determines how a font face is font face is\nshown depending on its download status and readiness for use.", "A method for providing font files directly, either locally or from an\nonline location.", "The font family name.", - "The font files to include. These can be local or online. Local file\npaths should be relative to the brand.yml file. Online\npaths should be complete URLs.", + "The font files to include as an array (i.e.,\n- path: <path>). These can be local or online. Local\nfile paths should be relative to the brand.yml file. Online\npaths should be complete URLs.", "The path to the font file. This can be a local path or a URL.", "A locally-installed font family name. When used, the end-user is\nresponsible for ensuring that the font is installed on their system.", { @@ -16595,6 +16595,7 @@ "Disambiguating year suffix in author-date styles (e.g. “a” in “Doe,\n1999a”).", "Manuscript configuration", "internal-schema-hack", + "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto’s default order\nis ‘knitr’, ‘jupyter’, ‘markdown’, ‘julia’.", { "short": "Include an automatically generated table of contents", "long": "" @@ -17176,12 +17177,12 @@ "mermaid": "%%" }, "handlers/mermaid/schema.yml": { - "_internalId": 194322, + "_internalId": 194332, "type": "object", "description": "be an object", "properties": { "mermaid-format": { - "_internalId": 194314, + "_internalId": 194324, "type": "enum", "enum": [ "png", @@ -17197,7 +17198,7 @@ "exhaustiveCompletions": true }, "theme": { - "_internalId": 194321, + "_internalId": 194331, "type": "anyOf", "anyOf": [ { diff --git a/src/resources/schema/definitions.yml b/src/resources/schema/definitions.yml index 33c3d70fdec..5b51141ec3c 100644 --- a/src/resources/schema/definitions.yml +++ b/src/resources/schema/definitions.yml @@ -2954,7 +2954,8 @@ # string: # pattern: '^U\+[0-9A-F]{4}(?:-[0-9A-F]{4})?(?:,U\+[0-9A-F]{4}(?:-[0-9A-F]{4})?)*$' description: > - The font files to include as an array (*i.e.*, `- path: `). These can be local or online. + The font files to include as an array (`- path: ` or `- `). + These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs. required: [files, family, source] diff --git a/src/resources/types/schema-types.ts b/src/resources/types/schema-types.ts index 5b19b5b5ab8..77dfd3c8f05 100644 --- a/src/resources/types/schema-types.ts +++ b/src/resources/types/schema-types.ts @@ -1469,7 +1469,7 @@ export type BrandFontFile = { path: string; style?: BrandFontStyle; weight?: BrandFontWeight; - }))[] /* The font files to include as an array (*i.e.*, `- path: `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs. */; + }))[] /* The font files to include as an array (`- path: ` or `- `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs. */; source: "file"; }; /* A method for providing font files directly, either locally or from an online location. */ From c71f998f3031cfd5febcadfd3e17b3f094a0cff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Tue, 8 Apr 2025 00:31:33 +0200 Subject: [PATCH 3/3] revert: quarto build-js --- src/resources/editor/tools/vs-code.mjs | 179 ++++++++++++++++-- src/resources/editor/tools/yaml/web-worker.js | 179 ++++++++++++++++-- .../yaml/yaml-intelligence-resources.json | 131 +++++++++++-- 3 files changed, 432 insertions(+), 57 deletions(-) diff --git a/src/resources/editor/tools/vs-code.mjs b/src/resources/editor/tools/vs-code.mjs index 18e96252cb7..3301bab381f 100644 --- a/src/resources/editor/tools/vs-code.mjs +++ b/src/resources/editor/tools/vs-code.mjs @@ -7041,6 +7041,13 @@ var require_yaml_intelligence_resources = __commonJS({ schema: "string", description: "Classes to apply to cell container" }, + { + name: "renderings", + schema: { + arrayOf: "string" + }, + description: "Array of rendering names, e.g. `[light, dark]`" + }, { name: "tags", tags: { @@ -9567,6 +9574,11 @@ var require_yaml_intelligence_resources = __commonJS({ schema: "boolean", description: "Provide button for copying search link" }, + "merge-navbar-crumbs": { + schema: "boolean", + default: true, + description: "When false, do not merge navbar crumbs into the crumbs in `search.json`." + }, "keyboard-shortcut": { maybeArrayOf: { string: { @@ -12499,7 +12511,7 @@ var require_yaml_intelligence_resources = __commonJS({ } ] }, - description: "The font files to include as an array (`- path: ` or `- `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" + description: "The font files to include. These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" } }, required: [ @@ -12537,6 +12549,42 @@ var require_yaml_intelligence_resources = __commonJS({ } } }, + { + id: "brand-path-bool-light-dark", + anyOf: [ + "string", + "boolean", + { + object: { + closed: true, + properties: { + light: { + anyOf: [ + "string", + { + ref: "brand" + } + ], + description: "The path to a light brand file or an inline light brand definition.\n" + }, + dark: { + anyOf: [ + "string", + { + ref: "brand" + } + ], + description: "The path to a dark brand file or an inline dark brand definition.\n" + } + } + } + }, + { + ref: "brand" + } + ], + description: "Branding information to use for this document. If a string, the path to a brand file.\nIf false, don't use branding on this document. If an object, an inline brand\ndefinition, or an object with light and dark brand paths or definitions.\n" + }, { id: "brand-defaults", object: { @@ -15573,6 +15621,22 @@ var require_yaml_intelligence_resources = __commonJS({ }, description: "The paper size for the document.\n" }, + { + name: "brand-mode", + schema: { + enum: [ + "light", + "dark" + ] + }, + default: "light", + tags: { + formats: [ + "typst" + ] + }, + description: "The brand mode to use for rendering the Typst document, `light` or `dark`.\n" + }, { name: "layout", schema: { @@ -16059,7 +16123,7 @@ var require_yaml_intelligence_resources = __commonJS({ schema: "string", description: { short: "A regular expression that can be used to determine whether a link is an internal link.", - long: "A regular expression that can be used to determine whether a link is an internal link. For example, \nthe following will treat links that start with http://www.quarto.org as internal links (and others\nwill be considered external):\n\n```\n^(?:http:|https:)\\/\\/www\\.quarto\\.org\\/custom\n```\n" + long: "A regular expression that can be used to determine whether a link is an internal link. For example, \nthe following will treat links that start with `http://www.quarto.org/custom` or `https://www.quarto.org/custom`\nas internal links (and others will be considered external):\n\n```\n^(?:http:|https:)\\/\\/www\\.quarto\\.org\\/custom\n```\n" } }, { @@ -16682,15 +16746,9 @@ var require_yaml_intelligence_resources = __commonJS({ { name: "brand", schema: { - anyOf: [ - "string", - "boolean", - { - ref: "brand" - } - ] + ref: "brand-path-bool-light-dark" }, - description: "Branding information to use for this document. If a string, the path to a brand file.\nIf false, don't use branding on this document. If an object, an inline brand\ndefinition.\n" + description: "Branding information to use for this document. If a string, the path to a brand file.\nIf false, don't use branding on this document. If an object, an inline brand\ndefinition, or an object with light and dark brand paths or definitions.\n" }, { name: "theme", @@ -16733,6 +16791,13 @@ var require_yaml_intelligence_resources = __commonJS({ }, description: "Theme name, theme scss file, or a mix of both." }, + { + name: "renderings", + schema: { + arrayOf: "string" + }, + description: "Array of rendering names, e.g. `[light, dark]`" + }, { name: "body-classes", tags: { @@ -16811,6 +16876,20 @@ var require_yaml_intelligence_resources = __commonJS({ }, description: "Enables smooth scrolling within the page." }, + { + name: "respect-user-color-scheme", + schema: "boolean", + default: false, + tags: { + formats: [ + "$html-doc" + ] + }, + description: { + short: "Enables setting dark mode based on the `prefers-color-scheme` media query.", + long: "If set, Quarto reads the `prefers-color-scheme` media query to determine whether to show\nthe user a dark or light page. Otherwise the author-preferred color scheme is shown.\n" + } + }, { name: "html-math-method", tags: { @@ -19346,7 +19425,7 @@ var require_yaml_intelligence_resources = __commonJS({ "$html-doc" ] }, - description: "Setting this to false prevents the `repo-actions` from appearing on this page." + description: "Setting this to false prevents the `repo-actions` from appearing on this page.\nOther possible values are `none` or one or more of `edit`, `source`, and `issue`, *e.g.* `[edit, source, issue]`.\n" }, { name: "aliases", @@ -20893,6 +20972,7 @@ var require_yaml_intelligence_resources = __commonJS({ "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -21053,6 +21133,7 @@ var require_yaml_intelligence_resources = __commonJS({ "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -21900,14 +21981,18 @@ var require_yaml_intelligence_resources = __commonJS({ "The font display method, determines how a font face is font face is\nshown depending on its download status and readiness for use.", "A method for providing font files directly, either locally or from an\nonline location.", "The font family name.", - "The font files to include as an array (i.e.,\n- path: <path>). These can be local or online. Local\nfile paths should be relative to the brand.yml file. Online\npaths should be complete URLs.", + "The font files to include. These can be local or online. Local file\npaths should be relative to the brand.yml file. Online\npaths should be complete URLs.", "The path to the font file. This can be a local path or a URL.", "A locally-installed font family name. When used, the end-user is\nresponsible for ensuring that the font is installed on their system.", + "Branding information to use for this document. If a string, the path\nto a brand file. If false, don\u2019t use branding on this document. If an\nobject, an inline brand definition, or an object with light and dark\nbrand paths or definitions.", + "The path to a light brand file or an inline light brand\ndefinition.", + "The path to a dark brand file or an inline dark brand definition.", { short: "Unique label for code cell", long: "Unique label for code cell. Used when other code needs to refer to\nthe cell (e.g. for cross references fig-samples or\ntbl-summary)" }, "Classes to apply to cell container", + "Array of rendering names, e.g. [light, dark]", "Array of tags for notebook cell", { short: "Notebook cell identifier", @@ -22687,6 +22772,7 @@ var require_yaml_intelligence_resources = __commonJS({ }, "Control the \\pagestyle{} for the document.", "The paper size for the document.", + "The brand mode to use for rendering the Typst document,\nlight or dark.", { short: "The options for margins and text layout for this document.", long: 'The options for margins and text layout for this document.\nSee ConTeXt\nLayout for additional information.' @@ -22779,7 +22865,7 @@ var require_yaml_intelligence_resources = __commonJS({ "Open external links in a new browser window or tab (rather than\nnavigating the current tab).", { short: "A regular expression that can be used to determine whether a link is\nan internal link.", - long: "A regular expression that can be used to determine whether a link is\nan internal link. For example, the following will treat links that start\nwith http://www.quarto.org as internal links (and others will be\nconsidered external):" + long: "A regular expression that can be used to determine whether a link is\nan internal link. For example, the following will treat links that start\nwith http://www.quarto.org/custom or\nhttps://www.quarto.org/custom as internal links (and others\nwill be considered external):" }, { short: "Controls whether links to other rendered formats are displayed in\nHTML output.", @@ -22872,7 +22958,7 @@ var require_yaml_intelligence_resources = __commonJS({ }, "If true, force the presence of the OJS runtime. If\nfalse, force the absence instead. If unset, the OJS runtime\nis included only if OJS cells are present in the document.", "Use the specified file as a style reference in producing a docx,\npptx, or odt file.", - "Branding information to use for this document. If a string, the path\nto a brand file. If false, don\u2019t use branding on this document. If an\nobject, an inline brand definition.", + "Branding information to use for this document. If a string, the path\nto a brand file. If false, don\u2019t use branding on this document. If an\nobject, an inline brand definition, or an object with light and dark\nbrand paths or definitions.", "Theme name, theme scss file, or a mix of both.", "The light theme name, theme scss file, or a mix of both.", "The light theme name, theme scss file, or a mix of both.", @@ -22885,6 +22971,10 @@ var require_yaml_intelligence_resources = __commonJS({ "Enables hover over a section title to see an anchor link.", "Enables tabsets to present content.", "Enables smooth scrolling within the page.", + { + short: "Enables setting dark mode based on the\nprefers-color-scheme media query.", + long: "If set, Quarto reads the prefers-color-scheme media\nquery to determine whether to show the user a dark or light page.\nOtherwise the author-preferred color scheme is shown." + }, { short: "Method use to render math in HTML output", long: 'Method use to render math in HTML output (plain,\nwebtex, gladtex, mathml,\nmathjax, katex).\nSee the Pandoc documentation on Math\nRendering in HTML for additional details.' @@ -23258,7 +23348,7 @@ var require_yaml_intelligence_resources = __commonJS({ "Print a list of figures in the document.", "Print a list of tables in the document.", "Setting this to false prevents this document from being included in\nsearches.", - "Setting this to false prevents the repo-actions from\nappearing on this page.", + "Setting this to false prevents the repo-actions from\nappearing on this page. Other possible values are none or\none or more of edit, source, and\nissue, e.g.\n[edit, source, issue].", { short: "Links to source repository actions", long: "Links to source repository actions (none or one or more\nof edit, source, issue)" @@ -23373,6 +23463,7 @@ var require_yaml_intelligence_resources = __commonJS({ "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -23726,6 +23817,7 @@ var require_yaml_intelligence_resources = __commonJS({ "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -23976,7 +24068,8 @@ var require_yaml_intelligence_resources = __commonJS({ "Disambiguating year suffix in author-date styles (e.g. \u201Ca\u201D in \u201CDoe,\n1999a\u201D).", "Manuscript configuration", "internal-schema-hack", - "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto\u2019s default order\nis \u2018knitr\u2019, \u2018jupyter\u2019, \u2018markdown\u2019, \u2018julia\u2019." + "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto\u2019s default order\nis \u2018knitr\u2019, \u2018jupyter\u2019, \u2018markdown\u2019, \u2018julia\u2019.", + "Array of rendering names, e.g. [light, dark]" ], "schema/external-schemas.yml": [ { @@ -24205,12 +24298,12 @@ var require_yaml_intelligence_resources = __commonJS({ mermaid: "%%" }, "handlers/mermaid/schema.yml": { - _internalId: 194332, + _internalId: 194632, type: "object", description: "be an object", properties: { "mermaid-format": { - _internalId: 194324, + _internalId: 194624, type: "enum", enum: [ "png", @@ -24226,7 +24319,7 @@ var require_yaml_intelligence_resources = __commonJS({ exhaustiveCompletions: true }, theme: { - _internalId: 194331, + _internalId: 194631, type: "anyOf", anyOf: [ { @@ -31356,6 +31449,51 @@ function guessChunkOptionsFormat(options) { } // ../yaml-validation/validator.ts +function createNiceError(obj) { + const { + violatingObject, + source, + message + } = obj; + const locF = mappedIndexToLineCol(source); + let location; + try { + location = { + start: locF(violatingObject.start), + end: locF(violatingObject.end) + }; + } catch (_e) { + location = { + start: { line: 0, column: 0 }, + end: { line: 0, column: 0 } + }; + } + const mapResult = source.map(violatingObject.start); + const fileName = mapResult ? mapResult.originalString.fileName : void 0; + return { + heading: message, + error: [], + info: {}, + fileName, + location, + sourceContext: createSourceContext(violatingObject.source, { + start: violatingObject.start, + end: violatingObject.end + }) + }; +} +var NoExprTag = class extends Error { + constructor(violatingObject, source) { + super(`Unexpected !expr tag`); + this.name = "NoExprTag"; + this.niceError = createNiceError({ + violatingObject, + source, + message: "!expr tags are not allowed in Quarto outside of knitr code cells." + }); + } + niceError; +}; var ValidationContext = class { instancePath; root; @@ -31747,6 +31885,9 @@ function validateObject(value, schema2, context) { } } } + if (value.result && typeof value.result === "object" && !Array.isArray(value.result) && value.result.tag === "!expr") { + throw new NoExprTag(value, value.source); + } throw new InternalError(`Couldn't locate key ${key}`); }; const inspectedProps = /* @__PURE__ */ new Set(); diff --git a/src/resources/editor/tools/yaml/web-worker.js b/src/resources/editor/tools/yaml/web-worker.js index f0e4c606271..49cb572456d 100644 --- a/src/resources/editor/tools/yaml/web-worker.js +++ b/src/resources/editor/tools/yaml/web-worker.js @@ -7042,6 +7042,13 @@ try { schema: "string", description: "Classes to apply to cell container" }, + { + name: "renderings", + schema: { + arrayOf: "string" + }, + description: "Array of rendering names, e.g. `[light, dark]`" + }, { name: "tags", tags: { @@ -9568,6 +9575,11 @@ try { schema: "boolean", description: "Provide button for copying search link" }, + "merge-navbar-crumbs": { + schema: "boolean", + default: true, + description: "When false, do not merge navbar crumbs into the crumbs in `search.json`." + }, "keyboard-shortcut": { maybeArrayOf: { string: { @@ -12500,7 +12512,7 @@ try { } ] }, - description: "The font files to include as an array (`- path: ` or `- `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" + description: "The font files to include. These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" } }, required: [ @@ -12538,6 +12550,42 @@ try { } } }, + { + id: "brand-path-bool-light-dark", + anyOf: [ + "string", + "boolean", + { + object: { + closed: true, + properties: { + light: { + anyOf: [ + "string", + { + ref: "brand" + } + ], + description: "The path to a light brand file or an inline light brand definition.\n" + }, + dark: { + anyOf: [ + "string", + { + ref: "brand" + } + ], + description: "The path to a dark brand file or an inline dark brand definition.\n" + } + } + } + }, + { + ref: "brand" + } + ], + description: "Branding information to use for this document. If a string, the path to a brand file.\nIf false, don't use branding on this document. If an object, an inline brand\ndefinition, or an object with light and dark brand paths or definitions.\n" + }, { id: "brand-defaults", object: { @@ -15574,6 +15622,22 @@ try { }, description: "The paper size for the document.\n" }, + { + name: "brand-mode", + schema: { + enum: [ + "light", + "dark" + ] + }, + default: "light", + tags: { + formats: [ + "typst" + ] + }, + description: "The brand mode to use for rendering the Typst document, `light` or `dark`.\n" + }, { name: "layout", schema: { @@ -16060,7 +16124,7 @@ try { schema: "string", description: { short: "A regular expression that can be used to determine whether a link is an internal link.", - long: "A regular expression that can be used to determine whether a link is an internal link. For example, \nthe following will treat links that start with http://www.quarto.org as internal links (and others\nwill be considered external):\n\n```\n^(?:http:|https:)\\/\\/www\\.quarto\\.org\\/custom\n```\n" + long: "A regular expression that can be used to determine whether a link is an internal link. For example, \nthe following will treat links that start with `http://www.quarto.org/custom` or `https://www.quarto.org/custom`\nas internal links (and others will be considered external):\n\n```\n^(?:http:|https:)\\/\\/www\\.quarto\\.org\\/custom\n```\n" } }, { @@ -16683,15 +16747,9 @@ try { { name: "brand", schema: { - anyOf: [ - "string", - "boolean", - { - ref: "brand" - } - ] + ref: "brand-path-bool-light-dark" }, - description: "Branding information to use for this document. If a string, the path to a brand file.\nIf false, don't use branding on this document. If an object, an inline brand\ndefinition.\n" + description: "Branding information to use for this document. If a string, the path to a brand file.\nIf false, don't use branding on this document. If an object, an inline brand\ndefinition, or an object with light and dark brand paths or definitions.\n" }, { name: "theme", @@ -16734,6 +16792,13 @@ try { }, description: "Theme name, theme scss file, or a mix of both." }, + { + name: "renderings", + schema: { + arrayOf: "string" + }, + description: "Array of rendering names, e.g. `[light, dark]`" + }, { name: "body-classes", tags: { @@ -16812,6 +16877,20 @@ try { }, description: "Enables smooth scrolling within the page." }, + { + name: "respect-user-color-scheme", + schema: "boolean", + default: false, + tags: { + formats: [ + "$html-doc" + ] + }, + description: { + short: "Enables setting dark mode based on the `prefers-color-scheme` media query.", + long: "If set, Quarto reads the `prefers-color-scheme` media query to determine whether to show\nthe user a dark or light page. Otherwise the author-preferred color scheme is shown.\n" + } + }, { name: "html-math-method", tags: { @@ -19347,7 +19426,7 @@ try { "$html-doc" ] }, - description: "Setting this to false prevents the `repo-actions` from appearing on this page." + description: "Setting this to false prevents the `repo-actions` from appearing on this page.\nOther possible values are `none` or one or more of `edit`, `source`, and `issue`, *e.g.* `[edit, source, issue]`.\n" }, { name: "aliases", @@ -20894,6 +20973,7 @@ try { "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -21054,6 +21134,7 @@ try { "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -21901,14 +21982,18 @@ try { "The font display method, determines how a font face is font face is\nshown depending on its download status and readiness for use.", "A method for providing font files directly, either locally or from an\nonline location.", "The font family name.", - "The font files to include as an array (i.e.,\n- path: <path>). These can be local or online. Local\nfile paths should be relative to the brand.yml file. Online\npaths should be complete URLs.", + "The font files to include. These can be local or online. Local file\npaths should be relative to the brand.yml file. Online\npaths should be complete URLs.", "The path to the font file. This can be a local path or a URL.", "A locally-installed font family name. When used, the end-user is\nresponsible for ensuring that the font is installed on their system.", + "Branding information to use for this document. If a string, the path\nto a brand file. If false, don\u2019t use branding on this document. If an\nobject, an inline brand definition, or an object with light and dark\nbrand paths or definitions.", + "The path to a light brand file or an inline light brand\ndefinition.", + "The path to a dark brand file or an inline dark brand definition.", { short: "Unique label for code cell", long: "Unique label for code cell. Used when other code needs to refer to\nthe cell (e.g. for cross references fig-samples or\ntbl-summary)" }, "Classes to apply to cell container", + "Array of rendering names, e.g. [light, dark]", "Array of tags for notebook cell", { short: "Notebook cell identifier", @@ -22688,6 +22773,7 @@ try { }, "Control the \\pagestyle{} for the document.", "The paper size for the document.", + "The brand mode to use for rendering the Typst document,\nlight or dark.", { short: "The options for margins and text layout for this document.", long: 'The options for margins and text layout for this document.\nSee ConTeXt\nLayout for additional information.' @@ -22780,7 +22866,7 @@ try { "Open external links in a new browser window or tab (rather than\nnavigating the current tab).", { short: "A regular expression that can be used to determine whether a link is\nan internal link.", - long: "A regular expression that can be used to determine whether a link is\nan internal link. For example, the following will treat links that start\nwith http://www.quarto.org as internal links (and others will be\nconsidered external):" + long: "A regular expression that can be used to determine whether a link is\nan internal link. For example, the following will treat links that start\nwith http://www.quarto.org/custom or\nhttps://www.quarto.org/custom as internal links (and others\nwill be considered external):" }, { short: "Controls whether links to other rendered formats are displayed in\nHTML output.", @@ -22873,7 +22959,7 @@ try { }, "If true, force the presence of the OJS runtime. If\nfalse, force the absence instead. If unset, the OJS runtime\nis included only if OJS cells are present in the document.", "Use the specified file as a style reference in producing a docx,\npptx, or odt file.", - "Branding information to use for this document. If a string, the path\nto a brand file. If false, don\u2019t use branding on this document. If an\nobject, an inline brand definition.", + "Branding information to use for this document. If a string, the path\nto a brand file. If false, don\u2019t use branding on this document. If an\nobject, an inline brand definition, or an object with light and dark\nbrand paths or definitions.", "Theme name, theme scss file, or a mix of both.", "The light theme name, theme scss file, or a mix of both.", "The light theme name, theme scss file, or a mix of both.", @@ -22886,6 +22972,10 @@ try { "Enables hover over a section title to see an anchor link.", "Enables tabsets to present content.", "Enables smooth scrolling within the page.", + { + short: "Enables setting dark mode based on the\nprefers-color-scheme media query.", + long: "If set, Quarto reads the prefers-color-scheme media\nquery to determine whether to show the user a dark or light page.\nOtherwise the author-preferred color scheme is shown." + }, { short: "Method use to render math in HTML output", long: 'Method use to render math in HTML output (plain,\nwebtex, gladtex, mathml,\nmathjax, katex).\nSee the Pandoc documentation on Math\nRendering in HTML for additional details.' @@ -23259,7 +23349,7 @@ try { "Print a list of figures in the document.", "Print a list of tables in the document.", "Setting this to false prevents this document from being included in\nsearches.", - "Setting this to false prevents the repo-actions from\nappearing on this page.", + "Setting this to false prevents the repo-actions from\nappearing on this page. Other possible values are none or\none or more of edit, source, and\nissue, e.g.\n[edit, source, issue].", { short: "Links to source repository actions", long: "Links to source repository actions (none or one or more\nof edit, source, issue)" @@ -23374,6 +23464,7 @@ try { "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -23727,6 +23818,7 @@ try { "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -23977,7 +24069,8 @@ try { "Disambiguating year suffix in author-date styles (e.g. \u201Ca\u201D in \u201CDoe,\n1999a\u201D).", "Manuscript configuration", "internal-schema-hack", - "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto\u2019s default order\nis \u2018knitr\u2019, \u2018jupyter\u2019, \u2018markdown\u2019, \u2018julia\u2019." + "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto\u2019s default order\nis \u2018knitr\u2019, \u2018jupyter\u2019, \u2018markdown\u2019, \u2018julia\u2019.", + "Array of rendering names, e.g. [light, dark]" ], "schema/external-schemas.yml": [ { @@ -24206,12 +24299,12 @@ try { mermaid: "%%" }, "handlers/mermaid/schema.yml": { - _internalId: 194332, + _internalId: 194632, type: "object", description: "be an object", properties: { "mermaid-format": { - _internalId: 194324, + _internalId: 194624, type: "enum", enum: [ "png", @@ -24227,7 +24320,7 @@ try { exhaustiveCompletions: true }, theme: { - _internalId: 194331, + _internalId: 194631, type: "anyOf", anyOf: [ { @@ -31370,6 +31463,51 @@ ${tidyverseInfo( } // ../yaml-validation/validator.ts + function createNiceError(obj) { + const { + violatingObject, + source, + message + } = obj; + const locF = mappedIndexToLineCol(source); + let location; + try { + location = { + start: locF(violatingObject.start), + end: locF(violatingObject.end) + }; + } catch (_e) { + location = { + start: { line: 0, column: 0 }, + end: { line: 0, column: 0 } + }; + } + const mapResult = source.map(violatingObject.start); + const fileName = mapResult ? mapResult.originalString.fileName : void 0; + return { + heading: message, + error: [], + info: {}, + fileName, + location, + sourceContext: createSourceContext(violatingObject.source, { + start: violatingObject.start, + end: violatingObject.end + }) + }; + } + var NoExprTag = class extends Error { + constructor(violatingObject, source) { + super(`Unexpected !expr tag`); + this.name = "NoExprTag"; + this.niceError = createNiceError({ + violatingObject, + source, + message: "!expr tags are not allowed in Quarto outside of knitr code cells." + }); + } + niceError; + }; var ValidationContext = class { instancePath; root; @@ -31761,6 +31899,9 @@ ${tidyverseInfo( } } } + if (value.result && typeof value.result === "object" && !Array.isArray(value.result) && value.result.tag === "!expr") { + throw new NoExprTag(value, value.source); + } throw new InternalError(`Couldn't locate key ${key}`); }; const inspectedProps = /* @__PURE__ */ new Set(); diff --git a/src/resources/editor/tools/yaml/yaml-intelligence-resources.json b/src/resources/editor/tools/yaml/yaml-intelligence-resources.json index 188c6b7d216..d2b33eb5bf7 100644 --- a/src/resources/editor/tools/yaml/yaml-intelligence-resources.json +++ b/src/resources/editor/tools/yaml/yaml-intelligence-resources.json @@ -13,6 +13,13 @@ "schema": "string", "description": "Classes to apply to cell container" }, + { + "name": "renderings", + "schema": { + "arrayOf": "string" + }, + "description": "Array of rendering names, e.g. `[light, dark]`" + }, { "name": "tags", "tags": { @@ -2539,6 +2546,11 @@ "schema": "boolean", "description": "Provide button for copying search link" }, + "merge-navbar-crumbs": { + "schema": "boolean", + "default": true, + "description": "When false, do not merge navbar crumbs into the crumbs in `search.json`." + }, "keyboard-shortcut": { "maybeArrayOf": { "string": { @@ -5471,7 +5483,7 @@ } ] }, - "description": "The font files to include as an array (`- path: ` or `- `). These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" + "description": "The font files to include. These can be local or online. Local file paths should be relative to the `brand.yml` file. Online paths should be complete URLs.\n" } }, "required": [ @@ -5509,6 +5521,42 @@ } } }, + { + "id": "brand-path-bool-light-dark", + "anyOf": [ + "string", + "boolean", + { + "object": { + "closed": true, + "properties": { + "light": { + "anyOf": [ + "string", + { + "ref": "brand" + } + ], + "description": "The path to a light brand file or an inline light brand definition.\n" + }, + "dark": { + "anyOf": [ + "string", + { + "ref": "brand" + } + ], + "description": "The path to a dark brand file or an inline dark brand definition.\n" + } + } + } + }, + { + "ref": "brand" + } + ], + "description": "Branding information to use for this document. If a string, the path to a brand file.\nIf false, don't use branding on this document. If an object, an inline brand\ndefinition, or an object with light and dark brand paths or definitions.\n" + }, { "id": "brand-defaults", "object": { @@ -8545,6 +8593,22 @@ }, "description": "The paper size for the document.\n" }, + { + "name": "brand-mode", + "schema": { + "enum": [ + "light", + "dark" + ] + }, + "default": "light", + "tags": { + "formats": [ + "typst" + ] + }, + "description": "The brand mode to use for rendering the Typst document, `light` or `dark`.\n" + }, { "name": "layout", "schema": { @@ -9031,7 +9095,7 @@ "schema": "string", "description": { "short": "A regular expression that can be used to determine whether a link is an internal link.", - "long": "A regular expression that can be used to determine whether a link is an internal link. For example, \nthe following will treat links that start with http://www.quarto.org as internal links (and others\nwill be considered external):\n\n```\n^(?:http:|https:)\\/\\/www\\.quarto\\.org\\/custom\n```\n" + "long": "A regular expression that can be used to determine whether a link is an internal link. For example, \nthe following will treat links that start with `http://www.quarto.org/custom` or `https://www.quarto.org/custom`\nas internal links (and others will be considered external):\n\n```\n^(?:http:|https:)\\/\\/www\\.quarto\\.org\\/custom\n```\n" } }, { @@ -9654,15 +9718,9 @@ { "name": "brand", "schema": { - "anyOf": [ - "string", - "boolean", - { - "ref": "brand" - } - ] + "ref": "brand-path-bool-light-dark" }, - "description": "Branding information to use for this document. If a string, the path to a brand file.\nIf false, don't use branding on this document. If an object, an inline brand\ndefinition.\n" + "description": "Branding information to use for this document. If a string, the path to a brand file.\nIf false, don't use branding on this document. If an object, an inline brand\ndefinition, or an object with light and dark brand paths or definitions.\n" }, { "name": "theme", @@ -9705,6 +9763,13 @@ }, "description": "Theme name, theme scss file, or a mix of both." }, + { + "name": "renderings", + "schema": { + "arrayOf": "string" + }, + "description": "Array of rendering names, e.g. `[light, dark]`" + }, { "name": "body-classes", "tags": { @@ -9783,6 +9848,20 @@ }, "description": "Enables smooth scrolling within the page." }, + { + "name": "respect-user-color-scheme", + "schema": "boolean", + "default": false, + "tags": { + "formats": [ + "$html-doc" + ] + }, + "description": { + "short": "Enables setting dark mode based on the `prefers-color-scheme` media query.", + "long": "If set, Quarto reads the `prefers-color-scheme` media query to determine whether to show\nthe user a dark or light page. Otherwise the author-preferred color scheme is shown.\n" + } + }, { "name": "html-math-method", "tags": { @@ -12318,7 +12397,7 @@ "$html-doc" ] }, - "description": "Setting this to false prevents the `repo-actions` from appearing on this page." + "description": "Setting this to false prevents the `repo-actions` from appearing on this page.\nOther possible values are `none` or one or more of `edit`, `source`, and `issue`, *e.g.* `[edit, source, issue]`.\n" }, { "name": "aliases", @@ -13865,6 +13944,7 @@ "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -14025,6 +14105,7 @@ "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -14872,14 +14953,18 @@ "The font display method, determines how a font face is font face is\nshown depending on its download status and readiness for use.", "A method for providing font files directly, either locally or from an\nonline location.", "The font family name.", - "The font files to include as an array (i.e.,\n- path: <path>). These can be local or online. Local\nfile paths should be relative to the brand.yml file. Online\npaths should be complete URLs.", + "The font files to include. These can be local or online. Local file\npaths should be relative to the brand.yml file. Online\npaths should be complete URLs.", "The path to the font file. This can be a local path or a URL.", "A locally-installed font family name. When used, the end-user is\nresponsible for ensuring that the font is installed on their system.", + "Branding information to use for this document. If a string, the path\nto a brand file. If false, don’t use branding on this document. If an\nobject, an inline brand definition, or an object with light and dark\nbrand paths or definitions.", + "The path to a light brand file or an inline light brand\ndefinition.", + "The path to a dark brand file or an inline dark brand definition.", { "short": "Unique label for code cell", "long": "Unique label for code cell. Used when other code needs to refer to\nthe cell (e.g. for cross references fig-samples or\ntbl-summary)" }, "Classes to apply to cell container", + "Array of rendering names, e.g. [light, dark]", "Array of tags for notebook cell", { "short": "Notebook cell identifier", @@ -15659,6 +15744,7 @@ }, "Control the \\pagestyle{} for the document.", "The paper size for the document.", + "The brand mode to use for rendering the Typst document,\nlight or dark.", { "short": "The options for margins and text layout for this document.", "long": "The options for margins and text layout for this document.\nSee ConTeXt\nLayout for additional information." @@ -15751,7 +15837,7 @@ "Open external links in a new browser window or tab (rather than\nnavigating the current tab).", { "short": "A regular expression that can be used to determine whether a link is\nan internal link.", - "long": "A regular expression that can be used to determine whether a link is\nan internal link. For example, the following will treat links that start\nwith http://www.quarto.org as internal links (and others will be\nconsidered external):" + "long": "A regular expression that can be used to determine whether a link is\nan internal link. For example, the following will treat links that start\nwith http://www.quarto.org/custom or\nhttps://www.quarto.org/custom as internal links (and others\nwill be considered external):" }, { "short": "Controls whether links to other rendered formats are displayed in\nHTML output.", @@ -15844,7 +15930,7 @@ }, "If true, force the presence of the OJS runtime. If\nfalse, force the absence instead. If unset, the OJS runtime\nis included only if OJS cells are present in the document.", "Use the specified file as a style reference in producing a docx,\npptx, or odt file.", - "Branding information to use for this document. If a string, the path\nto a brand file. If false, don’t use branding on this document. If an\nobject, an inline brand definition.", + "Branding information to use for this document. If a string, the path\nto a brand file. If false, don’t use branding on this document. If an\nobject, an inline brand definition, or an object with light and dark\nbrand paths or definitions.", "Theme name, theme scss file, or a mix of both.", "The light theme name, theme scss file, or a mix of both.", "The light theme name, theme scss file, or a mix of both.", @@ -15857,6 +15943,10 @@ "Enables hover over a section title to see an anchor link.", "Enables tabsets to present content.", "Enables smooth scrolling within the page.", + { + "short": "Enables setting dark mode based on the\nprefers-color-scheme media query.", + "long": "If set, Quarto reads the prefers-color-scheme media\nquery to determine whether to show the user a dark or light page.\nOtherwise the author-preferred color scheme is shown." + }, { "short": "Method use to render math in HTML output", "long": "Method use to render math in HTML output (plain,\nwebtex, gladtex, mathml,\nmathjax, katex).\nSee the Pandoc documentation on Math\nRendering in HTML for additional details." @@ -16230,7 +16320,7 @@ "Print a list of figures in the document.", "Print a list of tables in the document.", "Setting this to false prevents this document from being included in\nsearches.", - "Setting this to false prevents the repo-actions from\nappearing on this page.", + "Setting this to false prevents the repo-actions from\nappearing on this page. Other possible values are none or\none or more of edit, source, and\nissue, e.g.\n[edit, source, issue].", { "short": "Links to source repository actions", "long": "Links to source repository actions (none or one or more\nof edit, source, issue)" @@ -16345,6 +16435,7 @@ "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -16698,6 +16789,7 @@ "Number of matches to display (defaults to 20)", "Matches after which to collapse additional results", "Provide button for copying search link", + "When false, do not merge navbar crumbs into the crumbs in\nsearch.json.", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "One or more keys that will act as a shortcut to launch search (single\ncharacters)", "Whether to include search result parents when displaying items in\nsearch results (when possible).", @@ -16948,7 +17040,8 @@ "Disambiguating year suffix in author-date styles (e.g. “a” in “Doe,\n1999a”).", "Manuscript configuration", "internal-schema-hack", - "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto’s default order\nis ‘knitr’, ‘jupyter’, ‘markdown’, ‘julia’." + "List execution engines you want to give priority when determining\nwhich engine should render a notebook. If two engines have support for a\nnotebook, the one listed earlier will be chosen. Quarto’s default order\nis ‘knitr’, ‘jupyter’, ‘markdown’, ‘julia’.", + "Array of rendering names, e.g. [light, dark]" ], "schema/external-schemas.yml": [ { @@ -17177,12 +17270,12 @@ "mermaid": "%%" }, "handlers/mermaid/schema.yml": { - "_internalId": 194332, + "_internalId": 194632, "type": "object", "description": "be an object", "properties": { "mermaid-format": { - "_internalId": 194324, + "_internalId": 194624, "type": "enum", "enum": [ "png", @@ -17198,7 +17291,7 @@ "exhaustiveCompletions": true }, "theme": { - "_internalId": 194331, + "_internalId": 194631, "type": "anyOf", "anyOf": [ {