@pretextbook/import 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/convert-worker.cjs +1 -1
- package/dist/convert-worker.js +1 -1
- package/dist/{engine-routing-5CVs5pr5.cjs → engine-routing-DV5mlLcQ.cjs} +1 -1
- package/dist/{engine-routing-DDxL53jG.js → engine-routing-DdzZ92BA.js} +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.js +1560 -101
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/{upload-COaS_4pG.cjs → upload-C2iB-crt.cjs} +4 -2
- package/dist/{upload-Df7DMau_.js → upload-CQcSMuy_.js} +12 -1
- package/package.json +3 -3
package/dist/react.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),A=require("./upload-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),A=require("./upload-C2iB-crt.cjs"),T=require("./engine-routing-DV5mlLcQ.cjs");var ve={exports:{}},ce={};var Me;function tt(){if(Me)return ce;Me=1;var r=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function m(x,p,d){var w=null;if(d!==void 0&&(w=""+d),p.key!==void 0&&(w=""+p.key),"key"in p){d={};for(var P in p)P!=="key"&&(d[P]=p[P])}else d=p;return p=d.ref,{$$typeof:r,type:x,key:w,ref:p!==void 0?p:null,props:d}}return ce.Fragment=l,ce.jsx=m,ce.jsxs=m,ce}var de={};var Xe;function st(){return Xe||(Xe=1,process.env.NODE_ENV!=="production"&&(function(){function r(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Ne?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case $:return"Fragment";case z:return"Profiler";case I:return"StrictMode";case O:return"Suspense";case oe:return"SuspenseList";case je:return"Activity"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case F:return"Portal";case E:return t.displayName||"Context";case y:return(t._context.displayName||"Context")+".Consumer";case K:var o=t.render;return t=t.displayName,t||(t=o.displayName||o.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ue:return o=t.displayName||null,o!==null?o:r(t.type)||"Memo";case ee:o=t._payload,t=t._init;try{return r(t(o))}catch{}}return null}function l(t){return""+t}function m(t){try{l(t);var o=!1}catch{o=!0}if(o){o=console;var b=o.error,j=typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object";return b.call(o,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",j),l(t)}}function x(t){if(t===$)return"<>";if(typeof t=="object"&&t!==null&&t.$$typeof===ee)return"<...>";try{var o=r(t);return o?"<"+o+">":"<...>"}catch{return"<...>"}}function p(){var t=D.A;return t===null?null:t.getOwner()}function d(){return Error("react-stack-top-frame")}function w(t){if(te.call(t,"key")){var o=Object.getOwnPropertyDescriptor(t,"key").get;if(o&&o.isReactWarning)return!1}return t.key!==void 0}function P(t,o){function b(){V||(V=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",o))}b.isReactWarning=!0,Object.defineProperty(t,"key",{get:b,configurable:!0})}function h(){var t=r(this.type);return ie[t]||(ie[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),t=this.props.ref,t!==void 0?t:null}function R(t,o,b,j,B,G){var g=b.ref;return t={$$typeof:_,type:t,key:o,props:b,_owner:j},(g!==void 0?g:null)!==null?Object.defineProperty(t,"ref",{enumerable:!1,get:h}):Object.defineProperty(t,"ref",{enumerable:!1,value:null}),t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(t,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(t,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:B}),Object.defineProperty(t,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:G}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t}function N(t,o,b,j,B,G){var g=o.children;if(g!==void 0)if(j)if(ye(g)){for(j=0;j<g.length;j++)C(g[j]);Object.freeze&&Object.freeze(g)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else C(g);if(te.call(o,"key")){g=r(t);var L=Object.keys(o).filter(function(J){return J!=="key"});j=0<L.length?"{key: someKey, "+L.join(": ..., ")+": ...}":"{key: someKey}",ne[g+j]||(L=0<L.length?"{"+L.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
package/dist/react.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import at, { useState as p, useRef as de, useEffect as lt, useMemo as Z } from "react";
|
|
2
|
-
import { Z as Ke, a9 as ot, a4 as it, D as ct, n as dt, k as ut, h as mt, j as Ve, N as xt, H as pt } from "./upload-
|
|
3
|
-
import { D as ht, a as ft, b as bt, d as gt, t as Me, m as vt, p as Xe, s as jt, n as Ue, l as Nt, u as yt } from "./engine-routing-
|
|
2
|
+
import { Z as Ke, a9 as ot, a4 as it, D as ct, n as dt, k as ut, h as mt, j as Ve, N as xt, H as pt } from "./upload-CQcSMuy_.js";
|
|
3
|
+
import { D as ht, a as ft, b as bt, d as gt, t as Me, m as vt, p as Xe, s as jt, n as Ue, l as Nt, u as yt } from "./engine-routing-DdzZ92BA.js";
|
|
4
4
|
var ve = { exports: {} }, ie = {};
|
|
5
5
|
var Ye;
|
|
6
6
|
function wt() {
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
\\item[\${1:term}] $0
|
|
7
7
|
`,documentation:"Description list. Converts to `<dl>`; each `\\item[term]` becomes a `<li>` with a `<title>`."},{name:"tabular",aliases:[],requiresStatement:!1,titleArg:!1,kind:"structural",snippet:`{\${1:cc}}
|
|
8
8
|
$0
|
|
9
|
-
`,documentation:"Table body. Converts to a PreTeXt `<tabular>`."},{name:"center",aliases:[],requiresStatement:!1,titleArg:!1,kind:"block",documentation:"Converts to `<blockquote>`."},{name:"quote",aliases:[],requiresStatement:!1,titleArg:!1,kind:"block",documentation:"Converts to `<blockquote>`."},{name:"figure",aliases:[],requiresStatement:!1,titleArg:!1,kind:"structural",documentation:"Converts to `<figure>`. Use `\\caption{}` for the caption."},{name:"table",aliases:[],requiresStatement:!1,titleArg:!1,kind:"structural",documentation:"Converts to `<table>`. Use `\\caption{}` for the title."},{name:"code",aliases:[],requiresStatement:!1,titleArg:!1,kind:"verbatim",documentation:"Raw content emitted inside `<pre>`."},{name:"poem",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural",documentation:"Lines split on `\\\\`, stanzas on blank lines."},{name:"sidebyside",aliases:[],requiresStatement:!1,titleArg:!1,kind:"structural",childEnvironments:["stack"],documentation:"Side-by-side layout container."},{name:"program",aliases:[],requiresStatement:!1,titleArg:!1,kind:"verbatim",documentation:"Raw code inside `<program><input>`; optional `[language]`."},{name:"console",aliases:[],requiresStatement:!1,titleArg:!1,kind:"verbatim",documentation:"Raw content inside `<console>`."},{name:"sage",aliases:[],requiresStatement:!1,titleArg:!1,kind:"verbatim",documentation:"Raw input inside `<sage><input>`."},{name:"webwork",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural",documentation:"WeBWorK problem container."},{name:"slide",aliases:["frame"],requiresStatement:!1,titleArg:!1,kind:"structural",snippet:"{${1:Title}}{${2:Subtitle}}\n $0\n",documentation:"Beamer-style slide (`slide` or `frame`). Converts to `<slide>`; title/subtitle come from the two braced arguments (or `\\frametitle{}`/`\\framesubtitle{}` inside the body)."},{name:"
|
|
9
|
+
`,documentation:"Table body. Converts to a PreTeXt `<tabular>`."},{name:"center",aliases:[],requiresStatement:!1,titleArg:!1,kind:"block",documentation:"Converts to `<blockquote>`."},{name:"quote",aliases:[],requiresStatement:!1,titleArg:!1,kind:"block",documentation:"Converts to `<blockquote>`."},{name:"figure",aliases:[],requiresStatement:!1,titleArg:!1,kind:"structural",documentation:"Converts to `<figure>`. Use `\\caption{}` for the caption."},{name:"table",aliases:[],requiresStatement:!1,titleArg:!1,kind:"structural",documentation:"Converts to `<table>`. Use `\\caption{}` for the title."},{name:"code",aliases:[],requiresStatement:!1,titleArg:!1,kind:"verbatim",documentation:"Raw content emitted inside `<pre>`."},{name:"poem",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural",documentation:"Lines split on `\\\\`, stanzas on blank lines."},{name:"sidebyside",aliases:[],requiresStatement:!1,titleArg:!1,kind:"structural",childEnvironments:["stack"],documentation:"Side-by-side layout container."},{name:"program",aliases:[],requiresStatement:!1,titleArg:!1,kind:"verbatim",documentation:"Raw code inside `<program><input>`; optional `[language]`."},{name:"console",aliases:[],requiresStatement:!1,titleArg:!1,kind:"verbatim",documentation:"Raw content inside `<console>`."},{name:"sage",aliases:[],requiresStatement:!1,titleArg:!1,kind:"verbatim",documentation:"Raw input inside `<sage><input>`."},{name:"webwork",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural",documentation:"WeBWorK problem container."},{name:"slide",aliases:["frame"],requiresStatement:!1,titleArg:!1,kind:"structural",snippet:"{${1:Title}}{${2:Subtitle}}\n $0\n",documentation:"Beamer-style slide (`slide` or `frame`). Converts to `<slide>`; title/subtitle come from the two braced arguments (or `\\frametitle{}`/`\\framesubtitle{}` inside the body)."},{name:"block",aliases:["alertblock"],requiresStatement:!1,titleArg:!1,kind:"block",snippet:`{\${1:Title}}
|
|
10
|
+
$0
|
|
11
|
+
`,documentation:"Beamer-style block (`block` or `alertblock`). Converts to `<assemblage>`; the braced argument becomes its `<title>`. Not PreTeXt's Parsons `<block>`, which has no LaTeX spelling."},{name:"preface",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"biography",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"dedication",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"glossary",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"biblio",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"gi",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"exercises",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"exercisegroup",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural",childEnvironments:["hint","answer","solution"]},{name:"subexercises",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"worksheet",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"handout",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"reading-questions",aliases:["readingquestions"],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"solutions",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"introduction",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"conclusion",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"paragraphs",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"objectives",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"outcomes",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"list",aliases:[],requiresStatement:!1,titleArg:!1,kind:"structural"},{name:"listing",aliases:[],requiresStatement:!1,titleArg:!1,kind:"structural"},{name:"sbsgroup",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"stack",aliases:[],requiresStatement:!1,titleArg:!0,kind:"structural"},{name:"questions",aliases:[],requiresStatement:!1,titleArg:!1,kind:"list",snippet:`
|
|
10
12
|
\\question $0
|
|
11
13
|
`,documentation:"Exam-class list of questions."},{name:"parts",aliases:[],requiresStatement:!1,titleArg:!1,kind:"list",snippet:`
|
|
12
14
|
\\part $0
|
|
@@ -14,7 +16,7 @@
|
|
|
14
16
|
\\subpart $0
|
|
15
17
|
`},{name:"subsubparts",aliases:[],requiresStatement:!1,titleArg:!1,kind:"list",snippet:`
|
|
16
18
|
\\subsubpart $0
|
|
17
|
-
`}],Ki={abstract:{requiresStatement:!1,aliases:["abs","abstr"]},acknowledgement:{requiresStatement:!1,aliases:["ack"]},algorithm:{requiresStatement:!0,aliases:["algo","alg"]},answer:{requiresStatement:!1,aliases:["ans"]},assumption:{requiresStatement:!0,aliases:["assu","ass"]},axiom:{requiresStatement:!0,aliases:["axm"]},claim:{requiresStatement:!0,aliases:["cla"]},conjecture:{requiresStatement:!0,aliases:["con","conj","conjec"]},activity:{requiresStatement:!1,aliases:[]},aside:{requiresStatement:!1,aliases:[]},assemblage:{requiresStatement:!1,aliases:[]},biographical:{requiresStatement:!1,aliases:[]},case:{requiresStatement:!1,aliases:[]},computation:{requiresStatement:!1,aliases:["comp"]},construction:{requiresStatement:!1,aliases:[]},convention:{requiresStatement:!1,aliases:["conv"]},corollary:{requiresStatement:!0,aliases:["cor","corr","coro","corol","corss"]},definition:{requiresStatement:!0,aliases:["def","defn","dfn","defi","defin","de"]},example:{requiresStatement:!0,aliases:["exam","exa","eg","exmp","expl","exm"]},exercise:{requiresStatement:!0,aliases:["exer","exers"]},data:{requiresStatement:!1,aliases:[]},exploration:{requiresStatement:!1,aliases:[]},fact:{requiresStatement:!0,aliases:[]},heuristic:{requiresStatement:!0,aliases:[]},hint:{requiresStatement:!1,aliases:[]},historical:{requiresStatement:!1,aliases:[]},hypothesis:{requiresStatement:!0,aliases:["hyp"]},identity:{requiresStatement:!0,aliases:["idnty"]},insight:{requiresStatement:!1,aliases:[]},investigation:{requiresStatement:!1,aliases:[]},lemma:{requiresStatement:!0,aliases:["lem","lma","lemm","lm"]},notation:{requiresStatement:!1,aliases:["no","nota","ntn","nt","notn","notat"]},note:{requiresStatement:!1,aliases:["notes"]},observation:{requiresStatement:!1,aliases:["obs"]},principle:{requiresStatement:!0,aliases:[]},problem:{requiresStatement:!0,aliases:["prob","prb"]},project:{requiresStatement:!1,aliases:[]},proof:{requiresStatement:!1,aliases:["pf","prf","demo"]},proposition:{requiresStatement:!0,aliases:["prop","pro","prp","props"]},question:{requiresStatement:!0,aliases:["qu","ques","quest","qsn"]},remark:{requiresStatement:!1,aliases:["rem","rmk","rema","bem","subrem"]},task:{requiresStatement:!0,aliases:[]},technology:{requiresStatement:!1,aliases:["tech"]},theorem:{requiresStatement:!0,aliases:["thm","theo","theor","thmss","thrm"]},solution:{requiresStatement:!1,aliases:["sol"]},warning:{requiresStatement:!1,aliases:["warn","wrn"]}},Ji=new Set(["exercise","problem","question","task","activity","exploration","investigation"]);function Qi(t,r){let n;return Ji.has(t)?n=["hint","answer","solution"]:r.requiresStatement&&(n=["proof"]),{name:t,aliases:r.aliases,requiresStatement:r.requiresStatement,titleArg:!0,kind:"block",childEnvironments:n}}const ta=[...Yi,...Object.entries(Ki).map(([t,r])=>Qi(t,r))];(()=>{const t=new Map;for(const r of ta){t.set(r.name,r);for(const n of r.aliases)t.set(n,r)}return t})();function vt(t,r){return t.map(n=>({name:n,signature:r,mode:"text"}))}const ea=vt(["latex","Latex","LaTeX","latexe","today","tex","eg","ie","etc","XeTeX","XeLaTeX","xelatex","LuaTeX","luatex","PreTeXt","pretext","Pretext","PreFigure","webwork","WeBWorK","AD","ad","BC","bc","AM","am","PM","pm","nb","ps","vs","viz","etal","circa","ca","timeofday","mdash","ndash","nbsp","P","S","copyright","registered","trademark","degree","textdegree","dagger","ddagger","ldots","dots","textpm","textregistered","texttrademark","textsection","textpilcrow","textperiodcentered","texttildelow","textperthousand","centering","noindent"],""),na=vt(["emph","textrm","textsf","texttt","textsl","textit","textbf","underline","mbox","phantom","vspace","hspace","textsize","makebox","term","code","lstinline","fn","footnote","q","sq","enquote","enquotestar","abbr","ac","acro","init","foreign","booktitle","pubtitle","articletitle","xmltag","xmlattr","taxon","kbd","icon","sout","insert","stale","ref","eqref","cref","Cref","cite","index","url","appendix","caption"],"m"),Fr=[{name:"href",signature:"m m",mode:"text",snippet:"href{${1:url}}{$2}",documentation:"External link. `\\href{url}{text}` → `<url>`."},{name:"hyperref",signature:"o m",mode:"text",snippet:"hyperref[${1:label}]{$2}",documentation:"Internal link to a `\\label`. `\\hyperref[label]{text}`."},{name:"textcolor",signature:"m m",mode:"text",documentation:"No PreTeXt equivalent; converted to `<em>`."},{name:"includegraphics",signature:"o m",mode:"text",snippet:"includegraphics{${1:source}}",documentation:"Image. Converts to `<image>` with a `source` attribute."},{name:"alert",signature:"d<> m",mode:"text",snippet:"alert{$1}",documentation:"Text that warns or demands attention. Converts to `<alert>`."},{name:"citep",signature:"o m",mode:"text",snippet:"citep{${1:key}}",documentation:"Parenthetical citation (natbib). Converts to `<xref>`, the same as `\\cite`."},{name:"foreignlanguage",signature:"m m",mode:"text",snippet:"foreignlanguage{${1:french}}{$2}",documentation:"Text in another language. `\\foreignlanguage{lang}{text}` → `<foreign>`."},{name:"term",signature:"m",mode:"text",snippet:"term{$1}",documentation:"A defined term. Converts to `<term>`."},{name:"fillin",signature:"",mode:"text",documentation:"A blank to fill in. Converts to `<fillin>`."},{name:"plus",signature:"o m m",mode:"text",snippet:"plus{${1:chapter}}{${2:ref}}",documentation:'PreTeXt Plus modular include. `\\plus{type}{ref}` → `<plus:type ref="ref"/>`, pulling in the division or asset stored under `ref`. An optional `\\plus[width=50,margin=auto]{image}{ref}` argument becomes attributes on the element.'}],qr=[{name:"subtitle",signature:"o m",mode:"text",snippet:"subtitle{$1}",documentation:"The document's subtitle. Converts to `<subtitle>` after the `<title>`."},{name:"institute",signature:"o m",mode:"text",snippet:"institute{$1}",documentation:"Beamer: the authors' institutions. Each `\\and`-separated part becomes an author's `<institution>`, matched by the `\\inst{n}` markers in `\\author`."},{name:"inst",signature:"m",mode:"text",snippet:"inst{$1}",documentation:"Beamer: ties an author to an `\\institute` entry, as in `\\author{A\\inst{1} \\and B\\inst{2}}`."},{name:"titlegraphic",signature:"m",mode:"text",snippet:"titlegraphic{$1}",documentation:"Beamer: a graphic for the title page. PreTeXt's title slide has no place for one, so it moves to the slide after the title slide."},{name:"titlepage",signature:"",mode:"text",documentation:"Beamer: the title page. The frame holding it becomes the slideshow's title slide, generated from `<frontmatter>`."},{name:"note",signature:"d<> o m",mode:"text",snippet:"note{$1}",documentation:"Beamer: a speaker note. PreTeXt slides have no speaker notes, so it is kept as an XML comment."}],ra=vt(["preface","biography","dedication","glossary","handout","exercises","solutions","worksheet","paragraphs","readingquestions"],"s o m").map(t=>({...t,snippet:`${t.name}{$1}`,documentation:`PreTeXt division. \\${t.name}{title} opens a <${t.name==="readingquestions"?"reading-questions":t.name}> that runs to the next division of the same or higher level.`})),ia=vt(["book","article","slideshow","part","chapter","section","subsection","subsubsection","paragraph","subparagraph","bibliography","references"],"m"),aa=[...vt(["email","keywords"],"m"),...vt(["subjclass"],"o m"),...vt(["title","author","date","input","include"],"m"),...vt(["documentclass","usepackage"],"o m"),...vt(["newcommand","renewcommand","providecommand"],"m m"),...vt(["maketitle","tableofcontents","frontmatter","mainmatter","backmatter","item","par","newline"],"")],sa=vt(["bfseries","itshape","rmfamily","scshape","sffamily","slshape","ttfamily","normalfont","color","Huge","huge","LARGE","Large","large","normalsize","small","footnotesize","scriptsize","tiny"],""),oa=vt(["question","subpart","subsubpart"],""),ca=new Set([...Fr,...qr].map(t=>t.name)),la=[...Fr,...qr,...[...ea,...na,...ra,...ia,...aa,...sa,...oa].filter(t=>!ca.has(t.name)).filter((t,r,n)=>n.findIndex(i=>i.name===t.name)===r)],ua=new Map(la.map(t=>[t.name,t])),Br=new Set(["code","program","console","sage","verbatim","lstlisting","minted"]);function Ce(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}function da(t,r,n){return t.startsWith(n,r)?r+n.length:-1}function fa(t,r){if(t[r]!=="{")return null;const n=t.indexOf("}",r+1);return n===-1?null:{content:t.slice(r+1,n),end:n+1}}function Yt(t,r,n){const i=da(t,r,"\\"+n);if(i===-1||Ce(t[i]??""))return null;let e=i;for(;t[e]===" "||t[e]===" ";)e++;const a=fa(t,e);return a?{group:a.content,groupStart:e+1,end:a.end}:null}function ha(t){const r=[],n=[],i=[],e=[],a=[],s=t.length;let o=0,c=null,l=0,f=null;const p=g=>({isMath:Hi.has(g),isVerbatim:Br.has(g)});for(;o<s;){if(f!==null){const d=Yt(t,o,"end");d&&d.group===f?(e.push({name:d.group,type:"end",start:o,end:d.end,...p(d.group)}),f=null,o=d.end):o++;continue}const g=t[o];if(g==="%"){const d=t.indexOf(`
|
|
19
|
+
`}],Ki={abstract:{requiresStatement:!1,aliases:["abs","abstr"]},acknowledgement:{requiresStatement:!1,aliases:["ack"]},algorithm:{requiresStatement:!0,aliases:["algo","alg"]},answer:{requiresStatement:!1,aliases:["ans"]},assumption:{requiresStatement:!0,aliases:["assu","ass"]},axiom:{requiresStatement:!0,aliases:["axm"]},claim:{requiresStatement:!0,aliases:["cla"]},conjecture:{requiresStatement:!0,aliases:["con","conj","conjec"]},activity:{requiresStatement:!1,aliases:[]},aside:{requiresStatement:!1,aliases:[]},assemblage:{requiresStatement:!1,aliases:[]},biographical:{requiresStatement:!1,aliases:[]},case:{requiresStatement:!1,aliases:[]},computation:{requiresStatement:!1,aliases:["comp"]},construction:{requiresStatement:!1,aliases:[]},convention:{requiresStatement:!1,aliases:["conv"]},corollary:{requiresStatement:!0,aliases:["cor","corr","coro","corol","corss"]},definition:{requiresStatement:!0,aliases:["def","defn","dfn","defi","defin","de"]},example:{requiresStatement:!0,aliases:["exam","exa","eg","exmp","expl","exm"]},exercise:{requiresStatement:!0,aliases:["exer","exers"]},data:{requiresStatement:!1,aliases:[]},exploration:{requiresStatement:!1,aliases:[]},fact:{requiresStatement:!0,aliases:[]},heuristic:{requiresStatement:!0,aliases:[]},hint:{requiresStatement:!1,aliases:[]},historical:{requiresStatement:!1,aliases:[]},hypothesis:{requiresStatement:!0,aliases:["hyp"]},identity:{requiresStatement:!0,aliases:["idnty"]},insight:{requiresStatement:!1,aliases:[]},investigation:{requiresStatement:!1,aliases:[]},lemma:{requiresStatement:!0,aliases:["lem","lma","lemm","lm"]},notation:{requiresStatement:!1,aliases:["no","nota","ntn","nt","notn","notat"]},note:{requiresStatement:!1,aliases:["notes"]},observation:{requiresStatement:!1,aliases:["obs"]},principle:{requiresStatement:!0,aliases:[]},problem:{requiresStatement:!0,aliases:["prob","prb"]},project:{requiresStatement:!1,aliases:[]},proof:{requiresStatement:!1,aliases:["pf","prf","demo"]},proposition:{requiresStatement:!0,aliases:["prop","pro","prp","props"]},question:{requiresStatement:!0,aliases:["qu","ques","quest","qsn"]},remark:{requiresStatement:!1,aliases:["rem","rmk","rema","bem","subrem"]},task:{requiresStatement:!0,aliases:[]},technology:{requiresStatement:!1,aliases:["tech"]},theorem:{requiresStatement:!0,aliases:["thm","theo","theor","thmss","thrm"]},solution:{requiresStatement:!1,aliases:["sol"]},warning:{requiresStatement:!1,aliases:["warn","wrn"]}},Ji=new Set(["exercise","problem","question","task","activity","exploration","investigation"]);function Qi(t,r){let n;return Ji.has(t)?n=["hint","answer","solution"]:r.requiresStatement&&(n=["proof"]),{name:t,aliases:r.aliases,requiresStatement:r.requiresStatement,titleArg:!0,kind:"block",childEnvironments:n}}const ta=[...Yi,...Object.entries(Ki).map(([t,r])=>Qi(t,r))];(()=>{const t=new Map;for(const r of ta){t.set(r.name,r);for(const n of r.aliases)t.set(n,r)}return t})();function vt(t,r){return t.map(n=>({name:n,signature:r,mode:"text"}))}const ea=vt(["latex","Latex","LaTeX","latexe","today","tex","eg","ie","etc","XeTeX","XeLaTeX","xelatex","LuaTeX","luatex","PreTeXt","pretext","Pretext","PreFigure","webwork","WeBWorK","AD","ad","BC","bc","AM","am","PM","pm","nb","ps","vs","viz","etal","circa","ca","timeofday","mdash","ndash","nbsp","P","S","copyright","registered","trademark","degree","textdegree","dagger","ddagger","ldots","dots","textpm","textregistered","texttrademark","textsection","textpilcrow","textperiodcentered","texttildelow","textperthousand","centering","noindent"],""),na=vt(["emph","textrm","textsf","texttt","textsl","textit","textbf","underline","mbox","phantom","vspace","hspace","textsize","makebox","term","code","lstinline","fn","footnote","q","sq","enquote","enquotestar","abbr","ac","acro","init","foreign","booktitle","pubtitle","articletitle","xmltag","xmlattr","taxon","kbd","icon","sout","insert","stale","ref","eqref","cref","Cref","cite","index","url","appendix","caption"],"m"),Fr=[{name:"href",signature:"m m",mode:"text",snippet:"href{${1:url}}{$2}",documentation:"External link. `\\href{url}{text}` → `<url>`."},{name:"hyperref",signature:"o m",mode:"text",snippet:"hyperref[${1:label}]{$2}",documentation:"Internal link to a `\\label`. `\\hyperref[label]{text}`."},{name:"textcolor",signature:"m m",mode:"text",documentation:"No PreTeXt equivalent; converted to `<em>`."},{name:"includegraphics",signature:"o m",mode:"text",snippet:"includegraphics{${1:source}}",documentation:"Image. Converts to `<image>` with a `source` attribute."},{name:"alert",signature:"d<> m",mode:"text",snippet:"alert{$1}",documentation:"Text that warns or demands attention. Converts to `<alert>`."},{name:"citep",signature:"o m",mode:"text",snippet:"citep{${1:key}}",documentation:"Parenthetical citation (natbib). Converts to `<xref>`, the same as `\\cite`."},{name:"foreignlanguage",signature:"m m",mode:"text",snippet:"foreignlanguage{${1:french}}{$2}",documentation:"Text in another language. `\\foreignlanguage{lang}{text}` → `<foreign>`."},{name:"term",signature:"m",mode:"text",snippet:"term{$1}",documentation:"A defined term. Converts to `<term>`."},{name:"fillin",signature:"",mode:"text",documentation:"A blank to fill in. Converts to `<fillin>`."},{name:"plus",signature:"o m m",mode:"text",snippet:"plus{${1:chapter}}{${2:ref}}",documentation:'PreTeXt Plus modular include. `\\plus{type}{ref}` → `<plus:type ref="ref"/>`, pulling in the division or asset stored under `ref`. An optional `\\plus[width=50,margin=auto]{image}{ref}` argument becomes attributes on the element.'}],qr=[{name:"subtitle",signature:"o m",mode:"text",snippet:"subtitle{$1}",documentation:"The document's subtitle. Converts to `<subtitle>` after the `<title>`."},{name:"institute",signature:"o m",mode:"text",snippet:"institute{$1}",documentation:"Beamer: the authors' institutions. Each `\\and`-separated part becomes an author's `<institution>`, matched by the `\\inst{n}` markers in `\\author`."},{name:"inst",signature:"m",mode:"text",snippet:"inst{$1}",documentation:"Beamer: ties an author to an `\\institute` entry, as in `\\author{A\\inst{1} \\and B\\inst{2}}`."},{name:"titlegraphic",signature:"m",mode:"text",snippet:"titlegraphic{$1}",documentation:"Beamer: a graphic for the title page. PreTeXt's title slide has no place for one, so it moves to the slide after the title slide."},{name:"titlepage",signature:"",mode:"text",documentation:"Beamer: the title page. The frame holding it becomes the slideshow's title slide, generated from `<frontmatter>`."},{name:"note",signature:"d<> o m",mode:"text",snippet:"note{$1}",documentation:"Beamer: a speaker note. PreTeXt slides have no speaker notes, so it is kept as an XML comment."}],ra=vt(["preface","biography","dedication","glossary","handout","exercises","solutions","worksheet","paragraphs","readingquestions"],"s o m").map(t=>({...t,snippet:`${t.name}{$1}`,documentation:`PreTeXt division. \\${t.name}{title} opens a <${t.name==="readingquestions"?"reading-questions":t.name}> that runs to the next division of the same or higher level.`})),ia=vt(["book","article","slideshow","part","chapter","section","subsection","subsubsection","paragraph","subparagraph","bibliography","references"],"m"),aa=[...vt(["address","email","keywords"],"m"),...vt(["subjclass"],"o m"),...vt(["title","author","date","input","include"],"m"),...vt(["documentclass","usepackage"],"o m"),...vt(["newcommand","renewcommand","providecommand"],"m m"),...vt(["maketitle","tableofcontents","frontmatter","mainmatter","backmatter","item","par","newline"],"")],sa=vt(["bfseries","itshape","rmfamily","scshape","sffamily","slshape","ttfamily","normalfont","color","Huge","huge","LARGE","Large","large","normalsize","small","footnotesize","scriptsize","tiny"],""),oa=vt(["question","subpart","subsubpart"],""),ca=new Set([...Fr,...qr].map(t=>t.name)),la=[...Fr,...qr,...[...ea,...na,...ra,...ia,...aa,...sa,...oa].filter(t=>!ca.has(t.name)).filter((t,r,n)=>n.findIndex(i=>i.name===t.name)===r)],ua=new Map(la.map(t=>[t.name,t])),Br=new Set(["code","program","console","sage","verbatim","lstlisting","minted"]);function Ce(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}function da(t,r,n){return t.startsWith(n,r)?r+n.length:-1}function fa(t,r){if(t[r]!=="{")return null;const n=t.indexOf("}",r+1);return n===-1?null:{content:t.slice(r+1,n),end:n+1}}function Yt(t,r,n){const i=da(t,r,"\\"+n);if(i===-1||Ce(t[i]??""))return null;let e=i;for(;t[e]===" "||t[e]===" ";)e++;const a=fa(t,e);return a?{group:a.content,groupStart:e+1,end:a.end}:null}function ha(t){const r=[],n=[],i=[],e=[],a=[],s=t.length;let o=0,c=null,l=0,f=null;const p=g=>({isMath:Hi.has(g),isVerbatim:Br.has(g)});for(;o<s;){if(f!==null){const d=Yt(t,o,"end");d&&d.group===f?(e.push({name:d.group,type:"end",start:o,end:d.end,...p(d.group)}),f=null,o=d.end):o++;continue}const g=t[o];if(g==="%"){const d=t.indexOf(`
|
|
18
20
|
`,o),v=d===-1?s:d;i.push({start:o,end:v}),o=v;continue}if(g==="\\"){if(t[o+1]==="("){c===null&&(c="\\)",l=o),o+=2;continue}if(t[o+1]==="["){c===null&&(c="\\]",l=o),o+=2;continue}if(t[o+1]===")"||t[o+1]==="]"){const w="\\"+t[o+1];c===w&&(n.push({start:l,end:o+2}),c=null),o+=2;continue}if(t[o+1]==="\\"){o+=2;continue}const d=Yt(t,o,"begin");if(d){const w=p(d.group);e.push({name:d.group,type:"begin",start:o,end:d.end,...w}),w.isVerbatim&&(f=d.group),o=d.end;continue}const v=Yt(t,o,"end");if(v){e.push({name:v.group,type:"end",start:o,end:v.end,...p(v.group)}),o=v.end;continue}const h=Yt(t,o,"label");if(h){r.push({name:h.group,offset:h.groupStart}),o=h.end;continue}if(Ce(t[o+1]??"")){let w=o+1;for(;w<s&&Ce(t[w]);)w++;a.push({name:t.slice(o+1,w),start:o,end:w}),o=w;continue}o+=2;continue}if(g==="$"){const d=t[o+1]==="$",v=d?"$$":"$",h=d?2:1;c===null?(c=v,l=o):c===v&&(n.push({start:l,end:o+h}),c=null),o+=h;continue}o++}return c!==null&&n.push({start:l,end:s}),{labels:r,mathRegions:n,commentRegions:i,environments:e,macros:a}}function Oe(t,r){const n=Math.max(0,Math.min(r,t.length));let i=0,e=0;for(let a=0;a<n;a++)t[a]===`
|
|
19
21
|
`&&(i++,e=a+1);return{line:i,character:n-e}}function ne(t,r,n){return{start:Oe(t,r),end:Oe(t,n)}}var xn;(function(t){function r(n){return typeof n=="string"}t.is=r})(xn||(xn={}));var ze;(function(t){function r(n){return typeof n=="string"}t.is=r})(ze||(ze={}));var kn;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function r(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=r})(kn||(kn={}));var re;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function r(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=r})(re||(re={}));var wt;(function(t){function r(i,e){return i===Number.MAX_VALUE&&(i=re.MAX_VALUE),e===Number.MAX_VALUE&&(e=re.MAX_VALUE),{line:i,character:e}}t.create=r;function n(i){let e=i;return T.objectLiteral(e)&&T.uinteger(e.line)&&T.uinteger(e.character)}t.is=n})(wt||(wt={}));var dt;(function(t){function r(i,e,a,s){if(T.uinteger(i)&&T.uinteger(e)&&T.uinteger(a)&&T.uinteger(s))return{start:wt.create(i,e),end:wt.create(a,s)};if(wt.is(i)&&wt.is(e))return{start:i,end:e};throw new Error(`Range#create called with invalid arguments[${i}, ${e}, ${a}, ${s}]`)}t.create=r;function n(i){let e=i;return T.objectLiteral(e)&&wt.is(e.start)&&wt.is(e.end)}t.is=n})(dt||(dt={}));var ie;(function(t){function r(i,e){return{uri:i,range:e}}t.create=r;function n(i){let e=i;return T.objectLiteral(e)&&dt.is(e.range)&&(T.string(e.uri)||T.undefined(e.uri))}t.is=n})(ie||(ie={}));var Sn;(function(t){function r(i,e,a,s){return{targetUri:i,targetRange:e,targetSelectionRange:a,originSelectionRange:s}}t.create=r;function n(i){let e=i;return T.objectLiteral(e)&&dt.is(e.targetRange)&&T.string(e.targetUri)&&dt.is(e.targetSelectionRange)&&(dt.is(e.originSelectionRange)||T.undefined(e.originSelectionRange))}t.is=n})(Sn||(Sn={}));var Le;(function(t){function r(i,e,a,s){return{red:i,green:e,blue:a,alpha:s}}t.create=r;function n(i){const e=i;return T.objectLiteral(e)&&T.numberRange(e.red,0,1)&&T.numberRange(e.green,0,1)&&T.numberRange(e.blue,0,1)&&T.numberRange(e.alpha,0,1)}t.is=n})(Le||(Le={}));var En;(function(t){function r(i,e){return{range:i,color:e}}t.create=r;function n(i){const e=i;return T.objectLiteral(e)&&dt.is(e.range)&&Le.is(e.color)}t.is=n})(En||(En={}));var An;(function(t){function r(i,e,a){return{label:i,textEdit:e,additionalTextEdits:a}}t.create=r;function n(i){const e=i;return T.objectLiteral(e)&&T.string(e.label)&&(T.undefined(e.textEdit)||Ot.is(e))&&(T.undefined(e.additionalTextEdits)||T.typedArray(e.additionalTextEdits,Ot.is))}t.is=n})(An||(An={}));var In;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(In||(In={}));var Tn;(function(t){function r(i,e,a,s,o,c){const l={startLine:i,endLine:e};return T.defined(a)&&(l.startCharacter=a),T.defined(s)&&(l.endCharacter=s),T.defined(o)&&(l.kind=o),T.defined(c)&&(l.collapsedText=c),l}t.create=r;function n(i){const e=i;return T.objectLiteral(e)&&T.uinteger(e.startLine)&&T.uinteger(e.startLine)&&(T.undefined(e.startCharacter)||T.uinteger(e.startCharacter))&&(T.undefined(e.endCharacter)||T.uinteger(e.endCharacter))&&(T.undefined(e.kind)||T.string(e.kind))}t.is=n})(Tn||(Tn={}));var $e;(function(t){function r(i,e){return{location:i,message:e}}t.create=r;function n(i){let e=i;return T.defined(e)&&ie.is(e.location)&&T.string(e.message)}t.is=n})($e||($e={}));var Mt;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Mt||(Mt={}));var Rn;(function(t){t.Unnecessary=1,t.Deprecated=2})(Rn||(Rn={}));var Cn;(function(t){function r(n){const i=n;return T.objectLiteral(i)&&T.string(i.href)}t.is=r})(Cn||(Cn={}));var ae;(function(t){function r(i,e,a,s,o,c){let l={range:i,message:e};return T.defined(a)&&(l.severity=a),T.defined(s)&&(l.code=s),T.defined(o)&&(l.source=o),T.defined(c)&&(l.relatedInformation=c),l}t.create=r;function n(i){var e;let a=i;return T.defined(a)&&dt.is(a.range)&&T.string(a.message)&&(T.number(a.severity)||T.undefined(a.severity))&&(T.integer(a.code)||T.string(a.code)||T.undefined(a.code))&&(T.undefined(a.codeDescription)||T.string((e=a.codeDescription)===null||e===void 0?void 0:e.href))&&(T.string(a.source)||T.undefined(a.source))&&(T.undefined(a.relatedInformation)||T.typedArray(a.relatedInformation,$e.is))}t.is=n})(ae||(ae={}));var Ct;(function(t){function r(i,e,...a){let s={title:i,command:e};return T.defined(a)&&a.length>0&&(s.arguments=a),s}t.create=r;function n(i){let e=i;return T.defined(e)&&T.string(e.title)&&T.string(e.command)}t.is=n})(Ct||(Ct={}));var Ot;(function(t){function r(a,s){return{range:a,newText:s}}t.replace=r;function n(a,s){return{range:{start:a,end:a},newText:s}}t.insert=n;function i(a){return{range:a,newText:""}}t.del=i;function e(a){const s=a;return T.objectLiteral(s)&&T.string(s.newText)&&dt.is(s.range)}t.is=e})(Ot||(Ot={}));var Pe;(function(t){function r(i,e,a){const s={label:i};return e!==void 0&&(s.needsConfirmation=e),a!==void 0&&(s.description=a),s}t.create=r;function n(i){const e=i;return T.objectLiteral(e)&&T.string(e.label)&&(T.boolean(e.needsConfirmation)||e.needsConfirmation===void 0)&&(T.string(e.description)||e.description===void 0)}t.is=n})(Pe||(Pe={}));var zt;(function(t){function r(n){const i=n;return T.string(i)}t.is=r})(zt||(zt={}));var On;(function(t){function r(a,s,o){return{range:a,newText:s,annotationId:o}}t.replace=r;function n(a,s,o){return{range:{start:a,end:a},newText:s,annotationId:o}}t.insert=n;function i(a,s){return{range:a,newText:"",annotationId:s}}t.del=i;function e(a){const s=a;return Ot.is(s)&&(Pe.is(s.annotationId)||zt.is(s.annotationId))}t.is=e})(On||(On={}));var De;(function(t){function r(i,e){return{textDocument:i,edits:e}}t.create=r;function n(i){let e=i;return T.defined(e)&&Ne.is(e.textDocument)&&Array.isArray(e.edits)}t.is=n})(De||(De={}));var je;(function(t){function r(i,e,a){let s={kind:"create",uri:i};return e!==void 0&&(e.overwrite!==void 0||e.ignoreIfExists!==void 0)&&(s.options=e),a!==void 0&&(s.annotationId=a),s}t.create=r;function n(i){let e=i;return e&&e.kind==="create"&&T.string(e.uri)&&(e.options===void 0||(e.options.overwrite===void 0||T.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||T.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||zt.is(e.annotationId))}t.is=n})(je||(je={}));var Fe;(function(t){function r(i,e,a,s){let o={kind:"rename",oldUri:i,newUri:e};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}t.create=r;function n(i){let e=i;return e&&e.kind==="rename"&&T.string(e.oldUri)&&T.string(e.newUri)&&(e.options===void 0||(e.options.overwrite===void 0||T.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||T.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||zt.is(e.annotationId))}t.is=n})(Fe||(Fe={}));var qe;(function(t){function r(i,e,a){let s={kind:"delete",uri:i};return e!==void 0&&(e.recursive!==void 0||e.ignoreIfNotExists!==void 0)&&(s.options=e),a!==void 0&&(s.annotationId=a),s}t.create=r;function n(i){let e=i;return e&&e.kind==="delete"&&T.string(e.uri)&&(e.options===void 0||(e.options.recursive===void 0||T.boolean(e.options.recursive))&&(e.options.ignoreIfNotExists===void 0||T.boolean(e.options.ignoreIfNotExists)))&&(e.annotationId===void 0||zt.is(e.annotationId))}t.is=n})(qe||(qe={}));var Be;(function(t){function r(n){let i=n;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(e=>T.string(e.kind)?je.is(e)||Fe.is(e)||qe.is(e):De.is(e)))}t.is=r})(Be||(Be={}));var zn;(function(t){function r(i){return{uri:i}}t.create=r;function n(i){let e=i;return T.defined(e)&&T.string(e.uri)}t.is=n})(zn||(zn={}));var Ln;(function(t){function r(i,e){return{uri:i,version:e}}t.create=r;function n(i){let e=i;return T.defined(e)&&T.string(e.uri)&&T.integer(e.version)}t.is=n})(Ln||(Ln={}));var Ne;(function(t){function r(i,e){return{uri:i,version:e}}t.create=r;function n(i){let e=i;return T.defined(e)&&T.string(e.uri)&&(e.version===null||T.integer(e.version))}t.is=n})(Ne||(Ne={}));var $n;(function(t){function r(i,e,a,s){return{uri:i,languageId:e,version:a,text:s}}t.create=r;function n(i){let e=i;return T.defined(e)&&T.string(e.uri)&&T.string(e.languageId)&&T.integer(e.version)&&T.string(e.text)}t.is=n})($n||($n={}));var Me;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function r(n){const i=n;return i===t.PlainText||i===t.Markdown}t.is=r})(Me||(Me={}));var Ut;(function(t){function r(n){const i=n;return T.objectLiteral(n)&&Me.is(i.kind)&&T.string(i.value)}t.is=r})(Ut||(Ut={}));var Pn;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Pn||(Pn={}));var Dn;(function(t){t.PlainText=1,t.Snippet=2})(Dn||(Dn={}));var jn;(function(t){t.Deprecated=1})(jn||(jn={}));var Fn;(function(t){function r(i,e,a){return{newText:i,insert:e,replace:a}}t.create=r;function n(i){const e=i;return e&&T.string(e.newText)&&dt.is(e.insert)&&dt.is(e.replace)}t.is=n})(Fn||(Fn={}));var qn;(function(t){t.asIs=1,t.adjustIndentation=2})(qn||(qn={}));var Bn;(function(t){function r(n){const i=n;return i&&(T.string(i.detail)||i.detail===void 0)&&(T.string(i.description)||i.description===void 0)}t.is=r})(Bn||(Bn={}));var Nn;(function(t){function r(n){return{label:n}}t.create=r})(Nn||(Nn={}));var Mn;(function(t){function r(n,i){return{items:n||[],isIncomplete:!!i}}t.create=r})(Mn||(Mn={}));var se;(function(t){function r(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=r;function n(i){const e=i;return T.string(e)||T.objectLiteral(e)&&T.string(e.language)&&T.string(e.value)}t.is=n})(se||(se={}));var Un;(function(t){function r(n){let i=n;return!!i&&T.objectLiteral(i)&&(Ut.is(i.contents)||se.is(i.contents)||T.typedArray(i.contents,se.is))&&(n.range===void 0||dt.is(n.range))}t.is=r})(Un||(Un={}));var Wn;(function(t){function r(n,i){return i?{label:n,documentation:i}:{label:n}}t.create=r})(Wn||(Wn={}));var Xn;(function(t){function r(n,i,...e){let a={label:n};return T.defined(i)&&(a.documentation=i),T.defined(e)?a.parameters=e:a.parameters=[],a}t.create=r})(Xn||(Xn={}));var Zn;(function(t){t.Text=1,t.Read=2,t.Write=3})(Zn||(Zn={}));var Vn;(function(t){function r(n,i){let e={range:n};return T.number(i)&&(e.kind=i),e}t.create=r})(Vn||(Vn={}));var Gn;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Gn||(Gn={}));var Hn;(function(t){t.Deprecated=1})(Hn||(Hn={}));var Yn;(function(t){function r(n,i,e,a,s){let o={name:n,kind:i,location:{uri:a,range:e}};return s&&(o.containerName=s),o}t.create=r})(Yn||(Yn={}));var Kn;(function(t){function r(n,i,e,a){return a!==void 0?{name:n,kind:i,location:{uri:e,range:a}}:{name:n,kind:i,location:{uri:e}}}t.create=r})(Kn||(Kn={}));var Jn;(function(t){function r(i,e,a,s,o,c){let l={name:i,detail:e,kind:a,range:s,selectionRange:o};return c!==void 0&&(l.children=c),l}t.create=r;function n(i){let e=i;return e&&T.string(e.name)&&T.number(e.kind)&&dt.is(e.range)&&dt.is(e.selectionRange)&&(e.detail===void 0||T.string(e.detail))&&(e.deprecated===void 0||T.boolean(e.deprecated))&&(e.children===void 0||Array.isArray(e.children))&&(e.tags===void 0||Array.isArray(e.tags))}t.is=n})(Jn||(Jn={}));var Lt;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Lt||(Lt={}));var oe;(function(t){t.Invoked=1,t.Automatic=2})(oe||(oe={}));var Qn;(function(t){function r(i,e,a){let s={diagnostics:i};return e!=null&&(s.only=e),a!=null&&(s.triggerKind=a),s}t.create=r;function n(i){let e=i;return T.defined(e)&&T.typedArray(e.diagnostics,ae.is)&&(e.only===void 0||T.typedArray(e.only,T.string))&&(e.triggerKind===void 0||e.triggerKind===oe.Invoked||e.triggerKind===oe.Automatic)}t.is=n})(Qn||(Qn={}));var tr;(function(t){function r(i,e,a){let s={title:i},o=!0;return typeof e=="string"?(o=!1,s.kind=e):Ct.is(e)?s.command=e:s.edit=e,o&&a!==void 0&&(s.kind=a),s}t.create=r;function n(i){let e=i;return e&&T.string(e.title)&&(e.diagnostics===void 0||T.typedArray(e.diagnostics,ae.is))&&(e.kind===void 0||T.string(e.kind))&&(e.edit!==void 0||e.command!==void 0)&&(e.command===void 0||Ct.is(e.command))&&(e.isPreferred===void 0||T.boolean(e.isPreferred))&&(e.edit===void 0||Be.is(e.edit))}t.is=n})(tr||(tr={}));var er;(function(t){function r(i,e){let a={range:i};return T.defined(e)&&(a.data=e),a}t.create=r;function n(i){let e=i;return T.defined(e)&&dt.is(e.range)&&(T.undefined(e.command)||Ct.is(e.command))}t.is=n})(er||(er={}));var nr;(function(t){function r(i,e){return{tabSize:i,insertSpaces:e}}t.create=r;function n(i){let e=i;return T.defined(e)&&T.uinteger(e.tabSize)&&T.boolean(e.insertSpaces)}t.is=n})(nr||(nr={}));var rr;(function(t){function r(i,e,a){return{range:i,target:e,data:a}}t.create=r;function n(i){let e=i;return T.defined(e)&&dt.is(e.range)&&(T.undefined(e.target)||T.string(e.target))}t.is=n})(rr||(rr={}));var ir;(function(t){function r(i,e){return{range:i,parent:e}}t.create=r;function n(i){let e=i;return T.objectLiteral(e)&&dt.is(e.range)&&(e.parent===void 0||t.is(e.parent))}t.is=n})(ir||(ir={}));var ar;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(ar||(ar={}));var sr;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(sr||(sr={}));var or;(function(t){function r(n){const i=n;return T.objectLiteral(i)&&(i.resultId===void 0||typeof i.resultId=="string")&&Array.isArray(i.data)&&(i.data.length===0||typeof i.data[0]=="number")}t.is=r})(or||(or={}));var cr;(function(t){function r(i,e){return{range:i,text:e}}t.create=r;function n(i){const e=i;return e!=null&&dt.is(e.range)&&T.string(e.text)}t.is=n})(cr||(cr={}));var lr;(function(t){function r(i,e,a){return{range:i,variableName:e,caseSensitiveLookup:a}}t.create=r;function n(i){const e=i;return e!=null&&dt.is(e.range)&&T.boolean(e.caseSensitiveLookup)&&(T.string(e.variableName)||e.variableName===void 0)}t.is=n})(lr||(lr={}));var ur;(function(t){function r(i,e){return{range:i,expression:e}}t.create=r;function n(i){const e=i;return e!=null&&dt.is(e.range)&&(T.string(e.expression)||e.expression===void 0)}t.is=n})(ur||(ur={}));var dr;(function(t){function r(i,e){return{frameId:i,stoppedLocation:e}}t.create=r;function n(i){const e=i;return T.defined(e)&&dt.is(i.stoppedLocation)}t.is=n})(dr||(dr={}));var Ue;(function(t){t.Type=1,t.Parameter=2;function r(n){return n===1||n===2}t.is=r})(Ue||(Ue={}));var We;(function(t){function r(i){return{value:i}}t.create=r;function n(i){const e=i;return T.objectLiteral(e)&&(e.tooltip===void 0||T.string(e.tooltip)||Ut.is(e.tooltip))&&(e.location===void 0||ie.is(e.location))&&(e.command===void 0||Ct.is(e.command))}t.is=n})(We||(We={}));var fr;(function(t){function r(i,e,a){const s={position:i,label:e};return a!==void 0&&(s.kind=a),s}t.create=r;function n(i){const e=i;return T.objectLiteral(e)&&wt.is(e.position)&&(T.string(e.label)||T.typedArray(e.label,We.is))&&(e.kind===void 0||Ue.is(e.kind))&&e.textEdits===void 0||T.typedArray(e.textEdits,Ot.is)&&(e.tooltip===void 0||T.string(e.tooltip)||Ut.is(e.tooltip))&&(e.paddingLeft===void 0||T.boolean(e.paddingLeft))&&(e.paddingRight===void 0||T.boolean(e.paddingRight))}t.is=n})(fr||(fr={}));var hr;(function(t){function r(n){return{kind:"snippet",value:n}}t.createSnippet=r})(hr||(hr={}));var pr;(function(t){function r(n,i,e,a){return{insertText:n,filterText:i,range:e,command:a}}t.create=r})(pr||(pr={}));var mr;(function(t){function r(n){return{items:n}}t.create=r})(mr||(mr={}));var gr;(function(t){t.Invoked=0,t.Automatic=1})(gr||(gr={}));var br;(function(t){function r(n,i){return{range:n,text:i}}t.create=r})(br||(br={}));var vr;(function(t){function r(n,i){return{triggerKind:n,selectedCompletionInfo:i}}t.create=r})(vr||(vr={}));var wr;(function(t){function r(n){const i=n;return T.objectLiteral(i)&&ze.is(i.uri)&&T.string(i.name)}t.is=r})(wr||(wr={}));var _r;(function(t){function r(a,s,o,c){return new pa(a,s,o,c)}t.create=r;function n(a){let s=a;return!!(T.defined(s)&&T.string(s.uri)&&(T.undefined(s.languageId)||T.string(s.languageId))&&T.uinteger(s.lineCount)&&T.func(s.getText)&&T.func(s.positionAt)&&T.func(s.offsetAt))}t.is=n;function i(a,s){let o=a.getText(),c=e(s,(f,p)=>{let g=f.range.start.line-p.range.start.line;return g===0?f.range.start.character-p.range.start.character:g}),l=o.length;for(let f=c.length-1;f>=0;f--){let p=c[f],g=a.offsetAt(p.range.start),d=a.offsetAt(p.range.end);if(d<=l)o=o.substring(0,g)+p.newText+o.substring(d,o.length);else throw new Error("Overlapping edit");l=g}return o}t.applyEdits=i;function e(a,s){if(a.length<=1)return a;const o=a.length/2|0,c=a.slice(0,o),l=a.slice(o);e(c,s),e(l,s);let f=0,p=0,g=0;for(;f<c.length&&p<l.length;)s(c[f],l[p])<=0?a[g++]=c[f++]:a[g++]=l[p++];for(;f<c.length;)a[g++]=c[f++];for(;p<l.length;)a[g++]=l[p++];return a}})(_r||(_r={}));class pa{constructor(r,n,i,e){this._uri=r,this._languageId=n,this._version=i,this._content=e,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(r){if(r){let n=this.offsetAt(r.start),i=this.offsetAt(r.end);return this._content.substring(n,i)}return this._content}update(r,n){this._content=r.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let r=[],n=this._content,i=!0;for(let e=0;e<n.length;e++){i&&(r.push(e),i=!1);let a=n.charAt(e);i=a==="\r"||a===`
|
|
20
22
|
`,a==="\r"&&e+1<n.length&&n.charAt(e+1)===`
|
|
@@ -166,6 +166,17 @@ const vi = new Set(
|
|
|
166
166
|
snippet: "{${1:Title}}{${2:Subtitle}}\n $0\n",
|
|
167
167
|
documentation: "Beamer-style slide (`slide` or `frame`). Converts to `<slide>`; title/subtitle come from the two braced arguments (or `\\frametitle{}`/`\\framesubtitle{}` inside the body)."
|
|
168
168
|
},
|
|
169
|
+
{
|
|
170
|
+
name: "block",
|
|
171
|
+
aliases: ["alertblock"],
|
|
172
|
+
requiresStatement: !1,
|
|
173
|
+
titleArg: !1,
|
|
174
|
+
kind: "block",
|
|
175
|
+
snippet: `{\${1:Title}}
|
|
176
|
+
$0
|
|
177
|
+
`,
|
|
178
|
+
documentation: "Beamer-style block (`block` or `alertblock`). Converts to `<assemblage>`; the braced argument becomes its `<title>`. Not PreTeXt's Parsons `<block>`, which has no LaTeX spelling."
|
|
179
|
+
},
|
|
169
180
|
// Frontmatter / structural containers
|
|
170
181
|
{
|
|
171
182
|
name: "preface",
|
|
@@ -744,7 +755,7 @@ const Si = vt(
|
|
|
744
755
|
],
|
|
745
756
|
"m"
|
|
746
757
|
), Ti = [
|
|
747
|
-
...vt(["email", "keywords"], "m"),
|
|
758
|
+
...vt(["address", "email", "keywords"], "m"),
|
|
748
759
|
...vt(["subjclass"], "o m"),
|
|
749
760
|
...vt(["title", "author", "date", "input", "include"], "m"),
|
|
750
761
|
...vt(["documentclass", "usepackage"], "o m"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pretextbook/import",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "Shared import helpers for converting LaTeX/Markdown/PreTeXt into PreTeXt for VS Code and web apps",
|
|
5
5
|
"author": "Oscar Levin",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"test": "vitest run"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@pretextbook/completions": "^0.5.
|
|
57
|
+
"@pretextbook/completions": "^0.5.3",
|
|
58
58
|
"@pretextbook/format": "^0.6.1",
|
|
59
59
|
"@pretextbook/latex-pretext": "^0.4.0",
|
|
60
|
-
"@pretextbook/latex-style-pretext": "^0.5.
|
|
60
|
+
"@pretextbook/latex-style-pretext": "^0.5.3",
|
|
61
61
|
"@pretextbook/remark-pretext": "^0.2.0",
|
|
62
62
|
"@pretextbook/typing-shortcuts": "^0.4.0",
|
|
63
63
|
"@tailwindcss/vite": "^4.0.0",
|