1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[902],{32098:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>t,metadata:()=>c,toc:()=>d});var i=s(85893),r=s(11151);const t={sidebar_position:42,description:"Uncover content in some subslides.",toc_max_heading_level:2},o="uncover",c={id:"reference/utils/uncover",title:"uncover",description:"Uncover content in some subslides.",source:"@site/docs/reference/utils/uncover.mdx",sourceDirName:"reference/utils",slug:"/reference/utils/uncover",permalink:"/docs/reference/utils/uncover",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:42,frontMatter:{sidebar_position:42,description:"Uncover content in some subslides.",toc_max_heading_level:2},sidebar:"tutorialSidebar",previous:{title:"effect",permalink:"/docs/reference/utils/effect"},next:{title:"only",permalink:"/docs/reference/utils/only"}},l={},d=[{value:"visible-subslides : <TypeLink></TypeLink> | <TypeLink></TypeLink> | <TypeLink></TypeLink>",id:"visible-subslides",level:3},{value:"uncover-cont : <TypeLink></TypeLink>",id:"uncover-cont",level:3},{value:"cover-fn : <TypeLink></TypeLink> | <TypeLink></TypeLink> <Default><code>auto</code></Default>",id:"cover-fn",level:3}];function a(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,r.a)(),...e.components},{Default:s,Param:t,Parameters:o,Signature:c,SignatureName:l,SignatureParam:d,SourceLink:a,TypeLink:u}=n;return s||h("Default",!0),t||h("Param",!0),o||h("Parameters",!0),c||h("Signature",!0),l||h("SignatureName",!0),d||h("SignatureParam",!0),a||h("SourceLink",!0),u||h("TypeLink",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"uncover",children:"uncover"}),"\n",(0,i.jsx)(c,{children:(0,i.jsxs)("code",{children:[(0,i.jsx)(l,{children:"uncover"}),"(",(0,i.jsxs)(d,{children:[(0,i.jsx)(n.a,{href:"#self",children:"self: none"}),", "]}),(0,i.jsxs)(d,{children:[(0,i.jsx)(n.a,{href:"#visible-subslides",children:"visible-subslides"}),", "]}),(0,i.jsxs)(d,{children:[(0,i.jsx)(n.a,{href:"#uncover-cont",children:"uncover-cont"}),", "]}),(0,i.jsxs)(d,{children:[(0,i.jsx)(n.a,{href:"#cover-fn",children:"cover-fn: auto"}),", "]}),(0,i.jsx)(d,{children:(0,i.jsx)(n.a,{href:"#resolved-subslides",children:"resolved-subslides: none"})}),")",(0,i.jsx)(a,{href:"https://github.com/touying-typ/touying/blob/main/src/utils.typ#L2175"})]})}),"\n",(0,i.jsxs)(n.p,{children:["Uncover content in some subslides. Reserved space when hidden (like ",(0,i.jsx)(n.code,{children:"#hide()"}),")."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Example:"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typst",children:'#show: simple-theme.with(aspect-ratio: "16-9")\n= Slide\n#uncover("2-")[Only visible from subslide 2]\n'})}),"\n",(0,i.jsxs)(o,{children:[(0,i.jsxs)(n.h3,{id:"visible-subslides",children:["visible-subslides : ",(0,i.jsx)(u,{type:"int"})," | ",(0,i.jsx)(u,{type:"array"})," | ",(0,i.jsx)(u,{type:"str"})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["A single integer, an array of integers, or a string specifying the visible subslides. Supported formats: - A single integer, e.g. ",(0,i.jsx)(n.code,{children:"3"})," \u2014 only subslide 3. - An array, e.g. ",(0,i.jsx)(n.code,{children:"(1, 2, 4)"})," \u2014 equivalent to ",(0,i.jsx)(n.code,{children:'"1, 2, 4"'}),". - A string with ranges, e.g. ",(0,i.jsx)(n.code,{children:'"-2, 4, 6-8, 10-"'})," \u2014 subslides 1, 2, 4, 6, 7, 8, 10, and all after 10."]})}),(0,i.jsxs)(n.h3,{id:"uncover-cont",children:["uncover-cont : ",(0,i.jsx)(u,{type:"content"})]}),(0,i.jsx)(t,{children:(0,i.jsx)(n.p,{children:"The content to display when visible."})}),(0,i.jsxs)(n.h3,{id:"cover-fn",children:["cover-fn : ",(0,i.jsx)(u,{type:"function"})," | ",(0,i.jsx)(u,{type:"auto"})," ",(0,i.jsx)(s,{children:(0,i.jsx)(n.code,{children:"auto"})})]}),(0,i.jsx)(t,{children:(0,i.jsxs)(n.p,{children:["An optional cover function to use instead of the default cover method from the theme. Useful when using ",(0,i.jsx)(n.code,{children:"uncover"})," inside external package integrations (e.g. ",(0,i.jsx)(n.code,{children:"fletcher.hide"})," for fletcher diagrams)."]})})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns:"})," ",(0,i.jsx)(u,{type:"content"})]})]})}function u(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}function h(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},11151:(e,n,s)=>{s.d(n,{Z:()=>c,a:()=>o});var i=s(67294);const r={},t=i.createContext(r);function o(e){const n=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(t.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.