Skip to content

Commit c71f998

Browse files
committed
revert: quarto build-js
1 parent 43f93e1 commit c71f998

File tree

3 files changed

+432
-57
lines changed

3 files changed

+432
-57
lines changed

src/resources/editor/tools/vs-code.mjs

Lines changed: 160 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7041,6 +7041,13 @@ var require_yaml_intelligence_resources = __commonJS({
70417041
schema: "string",
70427042
description: "Classes to apply to cell container"
70437043
},
7044+
{
7045+
name: "renderings",
7046+
schema: {
7047+
arrayOf: "string"
7048+
},
7049+
description: "Array of rendering names, e.g. `[light, dark]`"
7050+
},
70447051
{
70457052
name: "tags",
70467053
tags: {
@@ -9567,6 +9574,11 @@ var require_yaml_intelligence_resources = __commonJS({
95679574
schema: "boolean",
95689575
description: "Provide button for copying search link"
95699576
},
9577+
"merge-navbar-crumbs": {
9578+
schema: "boolean",
9579+
default: true,
9580+
description: "When false, do not merge navbar crumbs into the crumbs in `search.json`."
9581+
},
95709582
"keyboard-shortcut": {
95719583
maybeArrayOf: {
95729584
string: {
@@ -12499,7 +12511,7 @@ var require_yaml_intelligence_resources = __commonJS({
1249912511
}
1250012512
]
1250112513
},
12502-
description: "The font files to include as an array (`- path: <path>` or `- <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"
12514+
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"
1250312515
}
1250412516
},
1250512517
required: [
@@ -12537,6 +12549,42 @@ var require_yaml_intelligence_resources = __commonJS({
1253712549
}
1253812550
}
1253912551
},
12552+
{
12553+
id: "brand-path-bool-light-dark",
12554+
anyOf: [
12555+
"string",
12556+
"boolean",
12557+
{
12558+
object: {
12559+
closed: true,
12560+
properties: {
12561+
light: {
12562+
anyOf: [
12563+
"string",
12564+
{
12565+
ref: "brand"
12566+
}
12567+
],
12568+
description: "The path to a light brand file or an inline light brand definition.\n"
12569+
},
12570+
dark: {
12571+
anyOf: [
12572+
"string",
12573+
{
12574+
ref: "brand"
12575+
}
12576+
],
12577+
description: "The path to a dark brand file or an inline dark brand definition.\n"
12578+
}
12579+
}
12580+
}
12581+
},
12582+
{
12583+
ref: "brand"
12584+
}
12585+
],
12586+
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"
12587+
},
1254012588
{
1254112589
id: "brand-defaults",
1254212590
object: {
@@ -15573,6 +15621,22 @@ var require_yaml_intelligence_resources = __commonJS({
1557315621
},
1557415622
description: "The paper size for the document.\n"
1557515623
},
15624+
{
15625+
name: "brand-mode",
15626+
schema: {
15627+
enum: [
15628+
"light",
15629+
"dark"
15630+
]
15631+
},
15632+
default: "light",
15633+
tags: {
15634+
formats: [
15635+
"typst"
15636+
]
15637+
},
15638+
description: "The brand mode to use for rendering the Typst document, `light` or `dark`.\n"
15639+
},
1557615640
{
1557715641
name: "layout",
1557815642
schema: {
@@ -16059,7 +16123,7 @@ var require_yaml_intelligence_resources = __commonJS({
1605916123
schema: "string",
1606016124
description: {
1606116125
short: "A regular expression that can be used to determine whether a link is an internal link.",
16062-
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"
16126+
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"
1606316127
}
1606416128
},
1606516129
{
@@ -16682,15 +16746,9 @@ var require_yaml_intelligence_resources = __commonJS({
1668216746
{
1668316747
name: "brand",
1668416748
schema: {
16685-
anyOf: [
16686-
"string",
16687-
"boolean",
16688-
{
16689-
ref: "brand"
16690-
}
16691-
]
16749+
ref: "brand-path-bool-light-dark"
1669216750
},
16693-
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"
16751+
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"
1669416752
},
1669516753
{
1669616754
name: "theme",
@@ -16733,6 +16791,13 @@ var require_yaml_intelligence_resources = __commonJS({
1673316791
},
1673416792
description: "Theme name, theme scss file, or a mix of both."
1673516793
},
16794+
{
16795+
name: "renderings",
16796+
schema: {
16797+
arrayOf: "string"
16798+
},
16799+
description: "Array of rendering names, e.g. `[light, dark]`"
16800+
},
1673616801
{
1673716802
name: "body-classes",
1673816803
tags: {
@@ -16811,6 +16876,20 @@ var require_yaml_intelligence_resources = __commonJS({
1681116876
},
1681216877
description: "Enables smooth scrolling within the page."
1681316878
},
16879+
{
16880+
name: "respect-user-color-scheme",
16881+
schema: "boolean",
16882+
default: false,
16883+
tags: {
16884+
formats: [
16885+
"$html-doc"
16886+
]
16887+
},
16888+
description: {
16889+
short: "Enables setting dark mode based on the `prefers-color-scheme` media query.",
16890+
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"
16891+
}
16892+
},
1681416893
{
1681516894
name: "html-math-method",
1681616895
tags: {
@@ -19346,7 +19425,7 @@ var require_yaml_intelligence_resources = __commonJS({
1934619425
"$html-doc"
1934719426
]
1934819427
},
19349-
description: "Setting this to false prevents the `repo-actions` from appearing on this page."
19428+
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"
1935019429
},
1935119430
{
1935219431
name: "aliases",
@@ -20893,6 +20972,7 @@ var require_yaml_intelligence_resources = __commonJS({
2089320972
"Number of matches to display (defaults to 20)",
2089420973
"Matches after which to collapse additional results",
2089520974
"Provide button for copying search link",
20975+
"When false, do not merge navbar crumbs into the crumbs in\n<code>search.json</code>.",
2089620976
"One or more keys that will act as a shortcut to launch search (single\ncharacters)",
2089720977
"One or more keys that will act as a shortcut to launch search (single\ncharacters)",
2089820978
"Whether to include search result parents when displaying items in\nsearch results (when possible).",
@@ -21053,6 +21133,7 @@ var require_yaml_intelligence_resources = __commonJS({
2105321133
"Number of matches to display (defaults to 20)",
2105421134
"Matches after which to collapse additional results",
2105521135
"Provide button for copying search link",
21136+
"When false, do not merge navbar crumbs into the crumbs in\n<code>search.json</code>.",
2105621137
"One or more keys that will act as a shortcut to launch search (single\ncharacters)",
2105721138
"One or more keys that will act as a shortcut to launch search (single\ncharacters)",
2105821139
"Whether to include search result parents when displaying items in\nsearch results (when possible).",
@@ -21900,14 +21981,18 @@ var require_yaml_intelligence_resources = __commonJS({
2190021981
"The font display method, determines how a font face is font face is\nshown depending on its download status and readiness for use.",
2190121982
"A method for providing font files directly, either locally or from an\nonline location.",
2190221983
"The font family name.",
21903-
"The font files to include as an array (<em>i.e.</em>,\n<code>- path: &lt;path&gt;</code>). These can be local or online. Local\nfile paths should be relative to the <code>brand.yml</code> file. Online\npaths should be complete URLs.",
21984+
"The font files to include. These can be local or online. Local file\npaths should be relative to the <code>brand.yml</code> file. Online\npaths should be complete URLs.",
2190421985
"The path to the font file. This can be a local path or a URL.",
2190521986
"A locally-installed font family name. When used, the end-user is\nresponsible for ensuring that the font is installed on their system.",
21987+
"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.",
21988+
"The path to a light brand file or an inline light brand\ndefinition.",
21989+
"The path to a dark brand file or an inline dark brand definition.",
2190621990
{
2190721991
short: "Unique label for code cell",
2190821992
long: "Unique label for code cell. Used when other code needs to refer to\nthe cell (e.g.&nbsp;for cross references <code>fig-samples</code> or\n<code>tbl-summary</code>)"
2190921993
},
2191021994
"Classes to apply to cell container",
21995+
"Array of rendering names, e.g.&nbsp;<code>[light, dark]</code>",
2191121996
"Array of tags for notebook cell",
2191221997
{
2191321998
short: "Notebook cell identifier",
@@ -22687,6 +22772,7 @@ var require_yaml_intelligence_resources = __commonJS({
2268722772
},
2268822773
"Control the <code>\\pagestyle{}</code> for the document.",
2268922774
"The paper size for the document.",
22775+
"The brand mode to use for rendering the Typst document,\n<code>light</code> or <code>dark</code>.",
2269022776
{
2269122777
short: "The options for margins and text layout for this document.",
2269222778
long: 'The options for margins and text layout for this document.\nSee <a href="https://wiki.contextgarden.net/Layout">ConTeXt\nLayout</a> for additional information.'
@@ -22779,7 +22865,7 @@ var require_yaml_intelligence_resources = __commonJS({
2277922865
"Open external links in a new browser window or tab (rather than\nnavigating the current tab).",
2278022866
{
2278122867
short: "A regular expression that can be used to determine whether a link is\nan internal link.",
22782-
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):"
22868+
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 <code>http://www.quarto.org/custom</code> or\n<code>https://www.quarto.org/custom</code> as internal links (and others\nwill be considered external):"
2278322869
},
2278422870
{
2278522871
short: "Controls whether links to other rendered formats are displayed in\nHTML output.",
@@ -22872,7 +22958,7 @@ var require_yaml_intelligence_resources = __commonJS({
2287222958
},
2287322959
"If <code>true</code>, force the presence of the OJS runtime. If\n<code>false</code>, force the absence instead. If unset, the OJS runtime\nis included only if OJS cells are present in the document.",
2287422960
"Use the specified file as a style reference in producing a docx,\npptx, or odt file.",
22875-
"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.",
22961+
"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.",
2287622962
"Theme name, theme scss file, or a mix of both.",
2287722963
"The light theme name, theme scss file, or a mix of both.",
2287822964
"The light theme name, theme scss file, or a mix of both.",
@@ -22885,6 +22971,10 @@ var require_yaml_intelligence_resources = __commonJS({
2288522971
"Enables hover over a section title to see an anchor link.",
2288622972
"Enables tabsets to present content.",
2288722973
"Enables smooth scrolling within the page.",
22974+
{
22975+
short: "Enables setting dark mode based on the\n<code>prefers-color-scheme</code> media query.",
22976+
long: "If set, Quarto reads the <code>prefers-color-scheme</code> media\nquery to determine whether to show the user a dark or light page.\nOtherwise the author-preferred color scheme is shown."
22977+
},
2288822978
{
2288922979
short: "Method use to render math in HTML output",
2289022980
long: 'Method use to render math in HTML output (<code>plain</code>,\n<code>webtex</code>, <code>gladtex</code>, <code>mathml</code>,\n<code>mathjax</code>, <code>katex</code>).\nSee the Pandoc documentation on <a href="https://pandoc.org/MANUAL.html#math-rendering-in-html">Math\nRendering in HTML</a> for additional details.'
@@ -23258,7 +23348,7 @@ var require_yaml_intelligence_resources = __commonJS({
2325823348
"Print a list of figures in the document.",
2325923349
"Print a list of tables in the document.",
2326023350
"Setting this to false prevents this document from being included in\nsearches.",
23261-
"Setting this to false prevents the <code>repo-actions</code> from\nappearing on this page.",
23351+
"Setting this to false prevents the <code>repo-actions</code> from\nappearing on this page. Other possible values are <code>none</code> or\none or more of <code>edit</code>, <code>source</code>, and\n<code>issue</code>, <em>e.g.</em>\n<code>[edit, source, issue]</code>.",
2326223352
{
2326323353
short: "Links to source repository actions",
2326423354
long: "Links to source repository actions (<code>none</code> or one or more\nof <code>edit</code>, <code>source</code>, <code>issue</code>)"
@@ -23373,6 +23463,7 @@ var require_yaml_intelligence_resources = __commonJS({
2337323463
"Number of matches to display (defaults to 20)",
2337423464
"Matches after which to collapse additional results",
2337523465
"Provide button for copying search link",
23466+
"When false, do not merge navbar crumbs into the crumbs in\n<code>search.json</code>.",
2337623467
"One or more keys that will act as a shortcut to launch search (single\ncharacters)",
2337723468
"One or more keys that will act as a shortcut to launch search (single\ncharacters)",
2337823469
"Whether to include search result parents when displaying items in\nsearch results (when possible).",
@@ -23726,6 +23817,7 @@ var require_yaml_intelligence_resources = __commonJS({
2372623817
"Number of matches to display (defaults to 20)",
2372723818
"Matches after which to collapse additional results",
2372823819
"Provide button for copying search link",
23820+
"When false, do not merge navbar crumbs into the crumbs in\n<code>search.json</code>.",
2372923821
"One or more keys that will act as a shortcut to launch search (single\ncharacters)",
2373023822
"One or more keys that will act as a shortcut to launch search (single\ncharacters)",
2373123823
"Whether to include search result parents when displaying items in\nsearch results (when possible).",
@@ -23976,7 +24068,8 @@ var require_yaml_intelligence_resources = __commonJS({
2397624068
"Disambiguating year suffix in author-date styles (e.g.&nbsp;\u201Ca\u201D in \u201CDoe,\n1999a\u201D).",
2397724069
"Manuscript configuration",
2397824070
"internal-schema-hack",
23979-
"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."
24071+
"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.",
24072+
"Array of rendering names, e.g.&nbsp;<code>[light, dark]</code>"
2398024073
],
2398124074
"schema/external-schemas.yml": [
2398224075
{
@@ -24205,12 +24298,12 @@ var require_yaml_intelligence_resources = __commonJS({
2420524298
mermaid: "%%"
2420624299
},
2420724300
"handlers/mermaid/schema.yml": {
24208-
_internalId: 194332,
24301+
_internalId: 194632,
2420924302
type: "object",
2421024303
description: "be an object",
2421124304
properties: {
2421224305
"mermaid-format": {
24213-
_internalId: 194324,
24306+
_internalId: 194624,
2421424307
type: "enum",
2421524308
enum: [
2421624309
"png",
@@ -24226,7 +24319,7 @@ var require_yaml_intelligence_resources = __commonJS({
2422624319
exhaustiveCompletions: true
2422724320
},
2422824321
theme: {
24229-
_internalId: 194331,
24322+
_internalId: 194631,
2423024323
type: "anyOf",
2423124324
anyOf: [
2423224325
{
@@ -31356,6 +31449,51 @@ function guessChunkOptionsFormat(options) {
3135631449
}
3135731450

3135831451
// ../yaml-validation/validator.ts
31452+
function createNiceError(obj) {
31453+
const {
31454+
violatingObject,
31455+
source,
31456+
message
31457+
} = obj;
31458+
const locF = mappedIndexToLineCol(source);
31459+
let location;
31460+
try {
31461+
location = {
31462+
start: locF(violatingObject.start),
31463+
end: locF(violatingObject.end)
31464+
};
31465+
} catch (_e) {
31466+
location = {
31467+
start: { line: 0, column: 0 },
31468+
end: { line: 0, column: 0 }
31469+
};
31470+
}
31471+
const mapResult = source.map(violatingObject.start);
31472+
const fileName = mapResult ? mapResult.originalString.fileName : void 0;
31473+
return {
31474+
heading: message,
31475+
error: [],
31476+
info: {},
31477+
fileName,
31478+
location,
31479+
sourceContext: createSourceContext(violatingObject.source, {
31480+
start: violatingObject.start,
31481+
end: violatingObject.end
31482+
})
31483+
};
31484+
}
31485+
var NoExprTag = class extends Error {
31486+
constructor(violatingObject, source) {
31487+
super(`Unexpected !expr tag`);
31488+
this.name = "NoExprTag";
31489+
this.niceError = createNiceError({
31490+
violatingObject,
31491+
source,
31492+
message: "!expr tags are not allowed in Quarto outside of knitr code cells."
31493+
});
31494+
}
31495+
niceError;
31496+
};
3135931497
var ValidationContext = class {
3136031498
instancePath;
3136131499
root;
@@ -31747,6 +31885,9 @@ function validateObject(value, schema2, context) {
3174731885
}
3174831886
}
3174931887
}
31888+
if (value.result && typeof value.result === "object" && !Array.isArray(value.result) && value.result.tag === "!expr") {
31889+
throw new NoExprTag(value, value.source);
31890+
}
3175031891
throw new InternalError(`Couldn't locate key ${key}`);
3175131892
};
3175231893
const inspectedProps = /* @__PURE__ */ new Set();

0 commit comments

Comments
 (0)