pulumi-package-docs 0.2.0 → 0.3.0

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.
Files changed (26) hide show
  1. package/dist/client/assets/{MemberDetail-CX9jiyic.js → MemberDetail-BS9DbqEt.js} +1 -1
  2. package/dist/client/assets/{index-CZRUHwIq.js → index-2FzxAhzN.js} +2 -2
  3. package/dist/client/assets/providers._name-FmJEVkdV.js +1 -0
  4. package/dist/client/assets/{providers._name.functions._token-DXrP4mSE.js → providers._name.functions._token-BzjmNHea.js} +1 -1
  5. package/dist/client/assets/{providers._name.functions._token-bvc3vrG2.js → providers._name.functions._token-D768U6I-.js} +1 -1
  6. package/dist/client/assets/{providers._name.index-CtKE1x7S.js → providers._name.index-C42yQ95z.js} +1 -1
  7. package/dist/client/assets/{providers._name.index-tTXQzRr7.js → providers._name.index-Dm0YiZWP.js} +1 -1
  8. package/dist/client/assets/{providers._name.resources._token--BZM8RBv.js → providers._name.resources._token-CIYPoqyA.js} +1 -1
  9. package/dist/client/assets/{providers._name.resources._token-CbZkRkaE.js → providers._name.resources._token-D0OLvgo_.js} +1 -1
  10. package/dist/client/assets/{routes-GAgiQcBX.js → routes-DKNWlgPZ.js} +1 -1
  11. package/dist/client/assets/styles-VChXLU8b.css +1 -0
  12. package/dist/server/assets/{MemberDetail-BiBAI1vw.js → MemberDetail-C5sAHNZW.js} +1 -1
  13. package/dist/server/assets/{_tanstack-start-manifest_v-DHujW1ME.js → _tanstack-start-manifest_v-B0J-S-em.js} +12 -12
  14. package/dist/server/assets/{providers._name.functions._token-C0A7Y90t.js → providers._name.functions._token-Gkw4zt3M.js} +2 -2
  15. package/dist/server/assets/{providers._name.index-BK_ZRd5l.js → providers._name.index-CEXkl-76.js} +1 -1
  16. package/dist/server/assets/{providers._name.resources._token-CbvRkms4.js → providers._name.resources._token-R_i2MmRl.js} +2 -2
  17. package/dist/server/assets/{router-DZSocx9m.js → router-1INob9fh.js} +184 -21
  18. package/dist/server/assets/{routes-B-G_iLTo.js → routes-4jiXnS1p.js} +3 -3
  19. package/dist/server/server.js +2 -2
  20. package/package.json +1 -1
  21. package/src/components/ThemeToggle.tsx +121 -0
  22. package/src/routes/__root.tsx +17 -7
  23. package/src/routes/index.tsx +2 -2
  24. package/src/styles.css +127 -7
  25. package/dist/client/assets/providers._name-DpU324kz.js +0 -1
  26. package/dist/client/assets/styles-CWDprFhI.css +0 -1
@@ -0,0 +1 @@
1
+ import{o as e}from"./useSelector-BIt42tGI.js";import{a as t}from"./index-2FzxAhzN.js";var n=e(),r=()=>(0,n.jsx)(t,{});export{r as component};
@@ -1 +1 @@
1
- import{o as e}from"./useSelector-BIt42tGI.js";import{o as t}from"./index-CZRUHwIq.js";var n=e(),r=()=>(0,n.jsx)(`main`,{children:(0,n.jsxs)(`p`,{children:[`No function with that name was found.`,` `,(0,n.jsx)(t,{to:`/`,children:`Back to all providers.`})]})});export{r as notFoundComponent};
1
+ import{o as e}from"./useSelector-BIt42tGI.js";import{o as t}from"./index-2FzxAhzN.js";var n=e(),r=()=>(0,n.jsx)(`main`,{children:(0,n.jsxs)(`p`,{children:[`No function with that name was found.`,` `,(0,n.jsx)(t,{to:`/`,children:`Back to all providers.`})]})});export{r as notFoundComponent};
@@ -1 +1 @@
1
- import{o as e}from"./useSelector-BIt42tGI.js";import{n as t}from"./index-CZRUHwIq.js";import{t as n}from"./MemberDetail-CX9jiyic.js";import{t as r}from"./token-oQmZfAP3.js";var i=e();function a(){let{providerName:e,token:a,fn:o,runtime:s}=t.useLoaderData();return(0,i.jsx)(n,{providerName:e,kind:`Function`,displayName:r(a),token:a,description:o.description,runtime:s,inputProperties:o.inputs?.properties,requiredInputs:o.inputs?.required,outputProperties:o.outputs?.properties,requiredOutputs:o.outputs?.required})}export{a as component};
1
+ import{o as e}from"./useSelector-BIt42tGI.js";import{n as t}from"./index-2FzxAhzN.js";import{t as n}from"./MemberDetail-BS9DbqEt.js";import{t as r}from"./token-oQmZfAP3.js";var i=e();function a(){let{providerName:e,token:a,fn:o,runtime:s}=t.useLoaderData();return(0,i.jsx)(n,{providerName:e,kind:`Function`,displayName:r(a),token:a,description:o.description,runtime:s,inputProperties:o.inputs?.properties,requiredInputs:o.inputs?.required,outputProperties:o.outputs?.properties,requiredOutputs:o.outputs?.required})}export{a as component};
@@ -1 +1 @@
1
- import{o as e}from"./useSelector-BIt42tGI.js";import{o as t}from"./index-CZRUHwIq.js";var n=e(),r=()=>(0,n.jsx)(`main`,{children:(0,n.jsxs)(`p`,{children:[`No local provider with that name was found.`,` `,(0,n.jsx)(t,{to:`/`,children:`Back to all providers.`})]})});export{r as notFoundComponent};
1
+ import{o as e}from"./useSelector-BIt42tGI.js";import{o as t}from"./index-2FzxAhzN.js";var n=e(),r=()=>(0,n.jsx)(`main`,{children:(0,n.jsxs)(`p`,{children:[`No local provider with that name was found.`,` `,(0,n.jsx)(t,{to:`/`,children:`Back to all providers.`})]})});export{r as notFoundComponent};
@@ -1 +1 @@
1
- import{o as e}from"./useSelector-BIt42tGI.js";import{o as t,r as n}from"./index-CZRUHwIq.js";import{a as r,o as i,t as a}from"./token-oQmZfAP3.js";var o=e();function s({token:e,member:n,runtime:s,to:c,providerName:l}){let u=r(i(n.description,s)),d=`deprecationMessage`in n&&n.deprecationMessage;return(0,o.jsxs)(`li`,{className:`doc-list-item`,children:[(0,o.jsx)(t,{to:c,params:{name:l,token:e},children:(0,o.jsx)(`code`,{children:a(e)})}),d&&(0,o.jsx)(`span`,{className:`badge badge-warning`,children:`Deprecated`}),u&&(0,o.jsx)(`p`,{className:`doc-summary`,children:u})]})}function c(){let{ref:e,schema:r,origin:a,error:c,runtime:l}=n.useLoaderData(),u=Object.entries(r?.resources??{}),d=Object.entries(r?.functions??{});return(0,o.jsxs)(`main`,{className:`provider-detail`,children:[(0,o.jsx)(t,{to:`/`,className:`back-link`,children:`← All providers`}),(0,o.jsx)(`h1`,{children:e.name}),(0,o.jsxs)(`p`,{className:`subtitle`,children:[e.source,e.version?` @ ${e.version}`:``,e.parameters?.length?` (${e.parameters.join(` `)})`:``]}),a===`error`||!r?(0,o.jsxs)(`p`,{className:`banner banner-failure`,children:[`Failed to load schema: `,c??`unknown error`]}):(0,o.jsxs)(o.Fragment,{children:[a===`cache`&&(0,o.jsxs)(`p`,{className:`banner banner-info`,children:[`Showing a cached schema (the `,(0,o.jsx)(`code`,{children:`pulumi`}),` CLI call failed on this load).`]}),r.description&&(0,o.jsx)(`p`,{children:i(r.description,l)}),(0,o.jsx)(`h2`,{children:`Resources`}),u.length===0?(0,o.jsx)(`p`,{className:`empty-state`,children:`No resources.`}):(0,o.jsx)(`ul`,{className:`doc-list`,children:u.map(([t,n])=>(0,o.jsx)(s,{token:t,member:n,runtime:l,to:`/providers/$name/resources/$token`,providerName:e.name},t))}),(0,o.jsx)(`h2`,{children:`Functions`}),d.length===0?(0,o.jsx)(`p`,{className:`empty-state`,children:`No functions.`}):(0,o.jsx)(`ul`,{className:`doc-list`,children:d.map(([t,n])=>(0,o.jsx)(s,{token:t,member:n,runtime:l,to:`/providers/$name/functions/$token`,providerName:e.name},t))})]})]})}export{c as component};
1
+ import{o as e}from"./useSelector-BIt42tGI.js";import{o as t,r as n}from"./index-2FzxAhzN.js";import{a as r,o as i,t as a}from"./token-oQmZfAP3.js";var o=e();function s({token:e,member:n,runtime:s,to:c,providerName:l}){let u=r(i(n.description,s)),d=`deprecationMessage`in n&&n.deprecationMessage;return(0,o.jsxs)(`li`,{className:`doc-list-item`,children:[(0,o.jsx)(t,{to:c,params:{name:l,token:e},children:(0,o.jsx)(`code`,{children:a(e)})}),d&&(0,o.jsx)(`span`,{className:`badge badge-warning`,children:`Deprecated`}),u&&(0,o.jsx)(`p`,{className:`doc-summary`,children:u})]})}function c(){let{ref:e,schema:r,origin:a,error:c,runtime:l}=n.useLoaderData(),u=Object.entries(r?.resources??{}),d=Object.entries(r?.functions??{});return(0,o.jsxs)(`main`,{className:`provider-detail`,children:[(0,o.jsx)(t,{to:`/`,className:`back-link`,children:`← All providers`}),(0,o.jsx)(`h1`,{children:e.name}),(0,o.jsxs)(`p`,{className:`subtitle`,children:[e.source,e.version?` @ ${e.version}`:``,e.parameters?.length?` (${e.parameters.join(` `)})`:``]}),a===`error`||!r?(0,o.jsxs)(`p`,{className:`banner banner-failure`,children:[`Failed to load schema: `,c??`unknown error`]}):(0,o.jsxs)(o.Fragment,{children:[a===`cache`&&(0,o.jsxs)(`p`,{className:`banner banner-info`,children:[`Showing a cached schema (the `,(0,o.jsx)(`code`,{children:`pulumi`}),` CLI call failed on this load).`]}),r.description&&(0,o.jsx)(`p`,{children:i(r.description,l)}),(0,o.jsx)(`h2`,{children:`Resources`}),u.length===0?(0,o.jsx)(`p`,{className:`empty-state`,children:`No resources.`}):(0,o.jsx)(`ul`,{className:`doc-list`,children:u.map(([t,n])=>(0,o.jsx)(s,{token:t,member:n,runtime:l,to:`/providers/$name/resources/$token`,providerName:e.name},t))}),(0,o.jsx)(`h2`,{children:`Functions`}),d.length===0?(0,o.jsx)(`p`,{className:`empty-state`,children:`No functions.`}):(0,o.jsx)(`ul`,{className:`doc-list`,children:d.map(([t,n])=>(0,o.jsx)(s,{token:t,member:n,runtime:l,to:`/providers/$name/functions/$token`,providerName:e.name},t))})]})]})}export{c as component};
@@ -1 +1 @@
1
- import{o as e}from"./useSelector-BIt42tGI.js";import{t}from"./index-CZRUHwIq.js";import{t as n}from"./MemberDetail-CX9jiyic.js";import{t as r}from"./token-oQmZfAP3.js";var i=e();function a(){let{providerName:e,token:a,resource:o,runtime:s}=t.useLoaderData();return(0,i.jsx)(n,{providerName:e,kind:`Resource`,displayName:r(a),token:a,description:o.description,deprecationMessage:o.deprecationMessage,runtime:s,inputProperties:o.inputProperties,requiredInputs:o.requiredInputs,outputProperties:o.properties,requiredOutputs:o.required})}export{a as component};
1
+ import{o as e}from"./useSelector-BIt42tGI.js";import{t}from"./index-2FzxAhzN.js";import{t as n}from"./MemberDetail-BS9DbqEt.js";import{t as r}from"./token-oQmZfAP3.js";var i=e();function a(){let{providerName:e,token:a,resource:o,runtime:s}=t.useLoaderData();return(0,i.jsx)(n,{providerName:e,kind:`Resource`,displayName:r(a),token:a,description:o.description,deprecationMessage:o.deprecationMessage,runtime:s,inputProperties:o.inputProperties,requiredInputs:o.requiredInputs,outputProperties:o.properties,requiredOutputs:o.required})}export{a as component};
@@ -1 +1 @@
1
- import{o as e}from"./useSelector-BIt42tGI.js";import{o as t}from"./index-CZRUHwIq.js";var n=e(),r=()=>(0,n.jsx)(`main`,{children:(0,n.jsxs)(`p`,{children:[`No resource with that name was found.`,` `,(0,n.jsx)(t,{to:`/`,children:`Back to all providers.`})]})});export{r as notFoundComponent};
1
+ import{o as e}from"./useSelector-BIt42tGI.js";import{o as t}from"./index-2FzxAhzN.js";var n=e(),r=()=>(0,n.jsx)(`main`,{children:(0,n.jsxs)(`p`,{children:[`No resource with that name was found.`,` `,(0,n.jsx)(t,{to:`/`,children:`Back to all providers.`})]})});export{r as notFoundComponent};
@@ -1 +1 @@
1
- import{o as e}from"./useSelector-BIt42tGI.js";import{i as t,o as n}from"./index-CZRUHwIq.js";var r=e();function i(){let{targetDir:e,project:i,providers:a}=t.useLoaderData();return i?(0,r.jsxs)(`main`,{children:[(0,r.jsx)(`h1`,{children:`Local Provider Docs`}),(0,r.jsxs)(`p`,{className:`subtitle`,children:[i.name??`Pulumi project`,` · `,(0,r.jsx)(`code`,{children:i.root})]}),a.length===0?(0,r.jsxs)(`p`,{className:`empty-state`,children:[`This project's `,(0,r.jsx)(`code`,{children:`Pulumi.yaml`}),` has no `,(0,r.jsx)(`code`,{children:`packages`}),` `,`section, so there are no local or parameterized providers to show docs for yet. Add one with `,(0,r.jsx)(`code`,{children:`pulumi package add`}),`.`]}):(0,r.jsx)(`ul`,{className:`provider-list`,children:a.map(e=>(0,r.jsxs)(`li`,{className:`provider-card`,children:[(0,r.jsxs)(n,{to:`/providers/$name`,params:{name:e.name},children:[(0,r.jsx)(`span`,{className:`provider-name`,children:e.name}),(0,r.jsxs)(`span`,{className:`provider-source`,children:[e.source,e.version?` @ ${e.version}`:``,e.parameters?.length?` (${e.parameters.join(` `)})`:``]})]}),e.origin===`error`?(0,r.jsxs)(`p`,{className:`banner banner-failure`,children:[`Failed to load schema: `,e.error]}):(0,r.jsxs)(`p`,{className:`provider-stats`,children:[e.resourceCount,` resource`,e.resourceCount===1?``:`s`,` · `,e.functionCount,` function`,e.functionCount===1?``:`s`,e.origin===`cache`&&(0,r.jsxs)(r.Fragment,{children:[` · `,(0,r.jsx)(`span`,{className:`badge badge-info`,children:`from cache`})]})]})]},e.name))})]}):(0,r.jsxs)(`main`,{children:[(0,r.jsx)(`h1`,{children:`Local Provider Docs`}),(0,r.jsxs)(`p`,{className:`empty-state`,children:[`No Pulumi project was found at `,(0,r.jsx)(`code`,{children:e}),` (or any parent directory). Run this from inside a Pulumi project directory, or with`,` `,(0,r.jsx)(`code`,{children:`--dir <path>`}),` pointing at one.`]})]})}export{i as component};
1
+ import{o as e}from"./useSelector-BIt42tGI.js";import{i as t,o as n}from"./index-2FzxAhzN.js";var r=e();function i(){let{targetDir:e,project:i,providers:a}=t.useLoaderData();return i?(0,r.jsxs)(`main`,{children:[(0,r.jsx)(`h1`,{children:`Pulumi Package Docs`}),(0,r.jsxs)(`p`,{className:`subtitle`,children:[i.name??`Pulumi project`,` · `,(0,r.jsx)(`code`,{children:i.root})]}),a.length===0?(0,r.jsxs)(`p`,{className:`empty-state`,children:[`This project's `,(0,r.jsx)(`code`,{children:`Pulumi.yaml`}),` has no `,(0,r.jsx)(`code`,{children:`packages`}),` `,`section, so there are no local or parameterized providers to show docs for yet. Add one with `,(0,r.jsx)(`code`,{children:`pulumi package add`}),`.`]}):(0,r.jsx)(`ul`,{className:`provider-list`,children:a.map(e=>(0,r.jsxs)(`li`,{className:`provider-card`,children:[(0,r.jsxs)(n,{to:`/providers/$name`,params:{name:e.name},children:[(0,r.jsx)(`span`,{className:`provider-name`,children:e.name}),(0,r.jsxs)(`span`,{className:`provider-source`,children:[e.source,e.version?` @ ${e.version}`:``,e.parameters?.length?` (${e.parameters.join(` `)})`:``]})]}),e.origin===`error`?(0,r.jsxs)(`p`,{className:`banner banner-failure`,children:[`Failed to load schema: `,e.error]}):(0,r.jsxs)(`p`,{className:`provider-stats`,children:[e.resourceCount,` resource`,e.resourceCount===1?``:`s`,` · `,e.functionCount,` function`,e.functionCount===1?``:`s`,e.origin===`cache`&&(0,r.jsxs)(r.Fragment,{children:[` · `,(0,r.jsx)(`span`,{className:`badge badge-info`,children:`from cache`})]})]})]},e.name))})]}):(0,r.jsxs)(`main`,{children:[(0,r.jsx)(`h1`,{children:`Pulumi Package Docs`}),(0,r.jsxs)(`p`,{className:`empty-state`,children:[`No Pulumi project was found at `,(0,r.jsx)(`code`,{children:e}),` (or any parent directory). Run this from inside a Pulumi project directory, or with`,` `,(0,r.jsx)(`code`,{children:`--dir <path>`}),` pointing at one.`]})]})}export{i as component};
@@ -0,0 +1 @@
1
+ :root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--font-sans:Inter, "Helvetica Neue", Helvetica, Arial, -apple-system, BlinkMacSystemFont, sans-serif;--font-mono:"Monaspace Neon", Menlo, Consolas, ui-monospace, monospace;--color-bg:#fff;--color-fg:#2e2932;--color-fg-muted:#56535a;--color-fg-subtle:#6a6675;--color-border:#e0dfe2;--color-border-strong:#cbcace;--color-primary:#5a30c5;--color-primary-strong:#492e8e;--color-accent:#9077f3;--color-accent-bg:#f5f5ff;--color-accent-border:#dedbff;--color-code-bg:#f5f5ff8c;--color-code-border:#dedbff;--badge-resource-bg:#ebebff;--badge-resource-fg:#5a30c5;--badge-resource-border:#dedbff;--badge-function-bg:#ccfff5;--badge-function-fg:#00756c;--badge-function-border:#5cffde;--badge-warning-bg:#fef2c7;--badge-warning-fg:#933d0d;--badge-warning-border:#fde38a;--badge-failure-bg:#ffe0e1;--badge-failure-fg:#96171e;--badge-failure-border:#ffc7ca;--badge-info-bg:#e5f1ff;--badge-info-fg:#1e47c2;--badge-info-border:#cce4ff;--radius-sm:6px;--radius-md:10px;--radius-lg:14px}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}:root:not([data-theme=light]){--color-bg:#1f1b21;--color-fg:#fafafa;--color-fg-muted:#e0dfe2;--color-fg-subtle:#cbcace;--color-border:#46434c;--color-border-strong:#56535a;--color-primary:#dedbff;--color-primary-strong:#f5f5ff;--color-accent:#9077f3;--color-accent-bg:#231f33;--color-accent-border:#492e8e;--color-code-bg:#231f338c;--color-code-border:#492e8e;--badge-resource-bg:#392960;--badge-resource-fg:#c3bdff;--badge-resource-border:#492e8e;--badge-function-bg:#114642;--badge-function-fg:#1efad9;--badge-function-border:#075f59;--badge-warning-bg:#723213;--badge-warning-fg:#fde38a;--badge-warning-border:#933d0d;--badge-failure-bg:#611f22;--badge-failure-fg:#ffc7ca;--badge-failure-border:#96171e;--badge-info-bg:#28448a;--badge-info-fg:#cce4ff;--badge-info-border:#1e47c2}}:root[data-theme=dark]{--color-bg:#1f1b21;--color-fg:#fafafa;--color-fg-muted:#e0dfe2;--color-fg-subtle:#cbcace;--color-border:#46434c;--color-border-strong:#56535a;--color-primary:#dedbff;--color-primary-strong:#f5f5ff;--color-accent:#9077f3;--color-accent-bg:#231f33;--color-accent-border:#492e8e;--color-code-bg:#231f338c;--color-code-border:#492e8e;--badge-resource-bg:#392960;--badge-resource-fg:#c3bdff;--badge-resource-border:#492e8e;--badge-function-bg:#114642;--badge-function-fg:#1efad9;--badge-function-border:#075f59;--badge-warning-bg:#723213;--badge-warning-fg:#fde38a;--badge-warning-border:#933d0d;--badge-failure-bg:#611f22;--badge-failure-fg:#ffc7ca;--badge-failure-border:#96171e;--badge-info-bg:#28448a;--badge-info-fg:#cce4ff;--badge-info-border:#1e47c2}*{box-sizing:border-box}html{background:var(--color-bg)}body{font-family:var(--font-sans);font-feature-settings:"liga" 1, "calt" 1, "cv11" 1;color:var(--color-fg);background:var(--color-bg);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;margin:0;line-height:1.3}h1,h2,h3{letter-spacing:-.02em;color:var(--color-fg);font-weight:600;line-height:1.1}h1{margin:0 0 .4rem;font-size:1.9rem}h2{text-transform:uppercase;letter-spacing:.05em;color:var(--color-fg-subtle);border-left:3px solid var(--color-accent);margin:2.5rem 0 1rem;padding-left:.65rem;font-size:.8rem;font-weight:600}p{line-height:1.6}a{color:var(--color-primary)}code{font-family:var(--font-mono);background:var(--color-accent-bg);border:1px solid var(--color-accent-border);border-radius:var(--radius-sm);padding:.1rem .4rem;font-size:.9em;font-weight:500}main{width:min(56rem,100% - 2rem);margin:2.5rem auto 6rem}.site-header{z-index:10;background:color-mix(in srgb, var(--color-bg) 88%, transparent);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--color-border);padding:.85rem 1rem;position:sticky;top:0}.site-header-inner{align-items:center;gap:.5rem;width:min(56rem,100% - 2rem);margin:0 auto;display:flex}.site-brand{color:var(--color-fg);align-items:center;gap:.7rem;text-decoration:none;display:flex}.pulumi-logo{align-items:center;display:inline-flex}.pulumi-logo-mark{width:auto;display:none}@media (prefers-color-scheme:light){:root:not([data-theme=dark]) .pulumi-logo-light{display:block}}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .pulumi-logo-dark{display:block}}:root[data-theme=light] .pulumi-logo-light,:root[data-theme=dark] .pulumi-logo-dark{display:block}.site-brand-divider{background:var(--color-border-strong);width:1px;height:1.1rem}.site-brand-name{letter-spacing:-.01em;font-size:.95rem;font-weight:600}.theme-switch{border:1px solid var(--color-border);border-radius:var(--radius-md);align-items:center;gap:.15rem;padding:.15rem;display:inline-flex}.theme-switch-option{border-radius:var(--radius-sm);width:1.5rem;height:1.5rem;color:var(--color-fg-subtle);cursor:pointer;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;padding:0;transition:background-color .15s,border-color .15s,color .15s;display:inline-flex;position:relative}.theme-switch-option:hover{color:var(--color-primary)}.theme-switch-option[aria-pressed=true]{background:var(--color-accent-bg);border-color:var(--color-accent-border);color:var(--color-primary)}.theme-switch-option:after{content:attr(aria-label);border-radius:var(--radius-sm);background:var(--color-fg);color:var(--color-bg);white-space:nowrap;opacity:0;pointer-events:none;z-index:20;padding:.25rem .5rem;font-size:.7rem;font-weight:500;transition:opacity .15s;position:absolute;top:calc(100% + .45rem);left:50%;transform:translate(-50%)}.theme-switch-option:hover:after,.theme-switch-option:focus-visible:after{opacity:1}.subtitle{color:var(--color-fg-muted);margin-top:-.35rem;font-size:.95rem}.back-link{color:var(--color-fg-muted);align-items:center;gap:.35rem;margin-bottom:1.25rem;font-size:.875rem;font-weight:500;text-decoration:none;display:inline-flex}.back-link:hover{color:var(--color-primary)}.empty-state{color:var(--color-fg-muted)}.badge{font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.05em;white-space:nowrap;border:1px solid #0000;border-radius:999px;align-items:center;padding:.15rem .5rem;font-size:.7rem;font-weight:500;display:inline-flex}.badge-resource{background:var(--badge-resource-bg);color:var(--badge-resource-fg);border-color:var(--badge-resource-border)}.badge-function{background:var(--badge-function-bg);color:var(--badge-function-fg);border-color:var(--badge-function-border)}.badge-warning{background:var(--badge-warning-bg);color:var(--badge-warning-fg);border-color:var(--badge-warning-border)}.badge-failure{background:var(--badge-failure-bg);color:var(--badge-failure-fg);border-color:var(--badge-failure-border)}.badge-info{background:var(--badge-info-bg);color:var(--badge-info-fg);border-color:var(--badge-info-border)}.banner{border-radius:var(--radius-md);border:1px solid #0000;margin:.75rem 0 1.25rem;padding:.7rem .9rem;font-size:.9rem}.banner-failure{background:var(--badge-failure-bg);color:var(--badge-failure-fg);border-color:var(--badge-failure-border)}.banner-warning{background:var(--badge-warning-bg);color:var(--badge-warning-fg);border-color:var(--badge-warning-border)}.banner-info{background:var(--badge-info-bg);color:var(--badge-info-fg);border-color:var(--badge-info-border)}.provider-list{gap:.75rem;padding:0;list-style:none;display:grid}.provider-card{border:1px solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-bg);padding:1.1rem 1.25rem;transition:border-color .15s,background-color .15s,transform .15s}.provider-card:hover{border-color:var(--color-accent-border);background:var(--color-accent-bg)}.provider-card a{color:inherit;justify-content:space-between;align-items:baseline;gap:1rem;text-decoration:none;display:flex}.provider-name{letter-spacing:-.01em;font-size:1.1rem;font-weight:600}.provider-source{color:var(--color-fg-subtle);font-size:.85rem;font-family:var(--font-mono)}.provider-stats{color:var(--color-fg-muted);margin:.6rem 0 0;font-size:.85rem}.doc-list{gap:.6rem;margin-bottom:2rem;padding:0;list-style:none;display:grid}.doc-list-item{border:1px solid var(--color-border);border-radius:var(--radius-md);padding:.75rem 1rem;transition:border-color .15s,background-color .15s}.doc-list-item:hover{border-color:var(--color-accent-border);background:var(--color-accent-bg)}.doc-list-item a{color:var(--color-fg);font-weight:500;text-decoration:none}.doc-list-item a:hover{color:var(--color-primary)}.doc-list-item .badge{margin-top:.4rem}.doc-summary{color:var(--color-fg-muted);margin:.35rem 0 0;font-size:.9rem}.code-example{margin-bottom:1.5rem}.code-example-lang{font-family:var(--font-mono);color:var(--color-fg-subtle);text-transform:uppercase;letter-spacing:.05em;margin-bottom:.4rem;font-size:.7rem;display:inline-block}.code-example pre{background:var(--color-code-bg);border:1px solid var(--color-code-border);border-radius:var(--radius-md);margin:0;padding:1rem 1.1rem;overflow-x:auto}.code-example code{background:0 0;border:none;border-radius:0;padding:0;font-size:.85rem;line-height:1.6}.props-table{border-collapse:collapse;border:1px solid var(--color-border);border-radius:var(--radius-md);width:100%;margin-bottom:1rem;font-size:.875rem;overflow:hidden}.props-table th,.props-table td{text-align:left;border-bottom:1px solid var(--color-border);vertical-align:top;padding:.55rem .75rem}.props-table tr:last-child td{border-bottom:none}.props-table th{color:var(--color-fg-subtle);text-transform:uppercase;letter-spacing:.04em;background:var(--color-accent-bg);font-size:.75rem;font-weight:600}.props-table code{font-size:.85em}
@@ -1,4 +1,4 @@
1
- import { c as extractExamples, f as resolveDescription, l as pickExample, o as formatPropertyName, s as formatType, u as stripExamples } from "./router-DZSocx9m.js";
1
+ import { c as extractExamples, f as resolveDescription, l as pickExample, o as formatPropertyName, s as formatType, u as stripExamples } from "./router-1INob9fh.js";
2
2
  import { Link } from "@tanstack/react-router";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/components/CodeExample.tsx
@@ -7,17 +7,17 @@ var tsrStartManifest = () => ({ routes: {
7
7
  "/mcp",
8
8
  "/providers/$name"
9
9
  ],
10
- preloads: ["/assets/index-CZRUHwIq.js", "/assets/useSelector-BIt42tGI.js"],
10
+ preloads: ["/assets/index-2FzxAhzN.js", "/assets/useSelector-BIt42tGI.js"],
11
11
  scripts: [{ attrs: {
12
12
  type: "module",
13
13
  async: !0,
14
- src: "/assets/index-CZRUHwIq.js"
14
+ src: "/assets/index-2FzxAhzN.js"
15
15
  } }]
16
16
  },
17
17
  "/": {
18
18
  filePath: "/home/runner/work/pulumi-package-docs/pulumi-package-docs/src/routes/index.tsx",
19
19
  children: void 0,
20
- preloads: ["/assets/routes-GAgiQcBX.js"]
20
+ preloads: ["/assets/routes-DKNWlgPZ.js"]
21
21
  },
22
22
  "/providers/$name": {
23
23
  filePath: "/home/runner/work/pulumi-package-docs/pulumi-package-docs/src/routes/providers.$name.tsx",
@@ -26,14 +26,14 @@ var tsrStartManifest = () => ({ routes: {
26
26
  "/providers/$name/functions/$token",
27
27
  "/providers/$name/resources/$token"
28
28
  ],
29
- preloads: ["/assets/providers._name-DpU324kz.js"]
29
+ preloads: ["/assets/providers._name-FmJEVkdV.js"]
30
30
  },
31
31
  "/providers/$name/": {
32
32
  filePath: "/home/runner/work/pulumi-package-docs/pulumi-package-docs/src/routes/providers.$name.index.tsx",
33
33
  children: void 0,
34
34
  preloads: [
35
- "/assets/providers._name.index-CtKE1x7S.js",
36
- "/assets/providers._name.index-tTXQzRr7.js",
35
+ "/assets/providers._name.index-C42yQ95z.js",
36
+ "/assets/providers._name.index-Dm0YiZWP.js",
37
37
  "/assets/token-oQmZfAP3.js"
38
38
  ]
39
39
  },
@@ -41,9 +41,9 @@ var tsrStartManifest = () => ({ routes: {
41
41
  filePath: "/home/runner/work/pulumi-package-docs/pulumi-package-docs/src/routes/providers.$name.functions.$token.tsx",
42
42
  children: void 0,
43
43
  preloads: [
44
- "/assets/providers._name.functions._token-DXrP4mSE.js",
45
- "/assets/providers._name.functions._token-bvc3vrG2.js",
46
- "/assets/MemberDetail-CX9jiyic.js",
44
+ "/assets/providers._name.functions._token-BzjmNHea.js",
45
+ "/assets/providers._name.functions._token-D768U6I-.js",
46
+ "/assets/MemberDetail-BS9DbqEt.js",
47
47
  "/assets/token-oQmZfAP3.js"
48
48
  ]
49
49
  },
@@ -51,10 +51,10 @@ var tsrStartManifest = () => ({ routes: {
51
51
  filePath: "/home/runner/work/pulumi-package-docs/pulumi-package-docs/src/routes/providers.$name.resources.$token.tsx",
52
52
  children: void 0,
53
53
  preloads: [
54
- "/assets/providers._name.resources._token--BZM8RBv.js",
55
- "/assets/MemberDetail-CX9jiyic.js",
54
+ "/assets/providers._name.resources._token-CIYPoqyA.js",
55
+ "/assets/MemberDetail-BS9DbqEt.js",
56
56
  "/assets/token-oQmZfAP3.js",
57
- "/assets/providers._name.resources._token-CbZkRkaE.js"
57
+ "/assets/providers._name.resources._token-D0OLvgo_.js"
58
58
  ]
59
59
  }
60
60
  } });
@@ -1,5 +1,5 @@
1
- import { a as tokenDisplayName, r as Route } from "./router-DZSocx9m.js";
2
- import { t as MemberDetail } from "./MemberDetail-BiBAI1vw.js";
1
+ import { a as tokenDisplayName, r as Route } from "./router-1INob9fh.js";
2
+ import { t as MemberDetail } from "./MemberDetail-C5sAHNZW.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/routes/providers.$name.functions.$token.tsx?tsr-split=component
5
5
  function FunctionDetail() {
@@ -1,4 +1,4 @@
1
- import { a as tokenDisplayName, d as summarizeDescription, f as resolveDescription, i as Route } from "./router-DZSocx9m.js";
1
+ import { a as tokenDisplayName, d as summarizeDescription, f as resolveDescription, i as Route } from "./router-1INob9fh.js";
2
2
  import { Link } from "@tanstack/react-router";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/routes/providers.$name.index.tsx?tsr-split=component
@@ -1,5 +1,5 @@
1
- import { a as tokenDisplayName, n as Route } from "./router-DZSocx9m.js";
2
- import { t as MemberDetail } from "./MemberDetail-BiBAI1vw.js";
1
+ import { a as tokenDisplayName, n as Route } from "./router-1INob9fh.js";
2
+ import { t as MemberDetail } from "./MemberDetail-C5sAHNZW.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/routes/providers.$name.resources.$token.tsx?tsr-split=component
5
5
  function ResourceDetail() {
@@ -1,5 +1,6 @@
1
1
  import { n as getTargetDir, r as loadPulumiProject, t as resolveProviderSchema } from "./schema.server-B-VvU1qb.js";
2
2
  import { n as listProviders, t as getProvider } from "./api-BV6lykkP.js";
3
+ import { useEffect, useState } from "react";
3
4
  import { HeadContent, Link, Scripts, createFileRoute, createRootRoute, createRouter, lazyRouteComponent, notFound } from "@tanstack/react-router";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
6
  import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
@@ -112,10 +113,168 @@ function PulumiLogo({ height = 24 }) {
112
113
  });
113
114
  }
114
115
  //#endregion
116
+ //#region src/components/ThemeToggle.tsx
117
+ var OPTIONS = [
118
+ {
119
+ mode: "system",
120
+ label: "System",
121
+ Icon: MonitorIcon
122
+ },
123
+ {
124
+ mode: "light",
125
+ label: "Light",
126
+ Icon: SunIcon
127
+ },
128
+ {
129
+ mode: "dark",
130
+ label: "Dark",
131
+ Icon: MoonIcon
132
+ }
133
+ ];
134
+ function applyTheme(mode) {
135
+ try {
136
+ if (mode === "system") {
137
+ delete document.documentElement.dataset.theme;
138
+ localStorage.removeItem("theme");
139
+ } else {
140
+ document.documentElement.dataset.theme = mode;
141
+ localStorage.setItem("theme", mode);
142
+ }
143
+ } catch {
144
+ if (mode === "system") delete document.documentElement.dataset.theme;
145
+ else document.documentElement.dataset.theme = mode;
146
+ }
147
+ }
148
+ function ThemeToggle() {
149
+ const [mode, setMode] = useState("system");
150
+ useEffect(() => {
151
+ try {
152
+ const stored = localStorage.getItem("theme");
153
+ if (stored === "light" || stored === "dark") setMode(stored);
154
+ } catch {}
155
+ }, []);
156
+ function choose(next) {
157
+ setMode(next);
158
+ applyTheme(next);
159
+ }
160
+ return /* @__PURE__ */ jsx("div", {
161
+ className: "theme-switch",
162
+ role: "group",
163
+ "aria-label": "Theme",
164
+ children: OPTIONS.map(({ mode: optionMode, label, Icon }) => /* @__PURE__ */ jsx("button", {
165
+ type: "button",
166
+ className: "theme-switch-option",
167
+ "aria-pressed": mode === optionMode,
168
+ onClick: () => choose(optionMode),
169
+ "aria-label": label,
170
+ children: /* @__PURE__ */ jsx(Icon, {})
171
+ }, optionMode))
172
+ });
173
+ }
174
+ function IconSvg({ children }) {
175
+ return /* @__PURE__ */ jsx("svg", {
176
+ width: 16,
177
+ height: 16,
178
+ viewBox: "0 0 24 24",
179
+ fill: "none",
180
+ stroke: "currentColor",
181
+ strokeWidth: 2,
182
+ strokeLinecap: "round",
183
+ strokeLinejoin: "round",
184
+ "aria-hidden": "true",
185
+ children
186
+ });
187
+ }
188
+ function SunIcon() {
189
+ return /* @__PURE__ */ jsxs(IconSvg, { children: [
190
+ /* @__PURE__ */ jsx("circle", {
191
+ cx: "12",
192
+ cy: "12",
193
+ r: "5"
194
+ }),
195
+ /* @__PURE__ */ jsx("line", {
196
+ x1: "12",
197
+ y1: "1",
198
+ x2: "12",
199
+ y2: "3"
200
+ }),
201
+ /* @__PURE__ */ jsx("line", {
202
+ x1: "12",
203
+ y1: "21",
204
+ x2: "12",
205
+ y2: "23"
206
+ }),
207
+ /* @__PURE__ */ jsx("line", {
208
+ x1: "4.22",
209
+ y1: "4.22",
210
+ x2: "5.64",
211
+ y2: "5.64"
212
+ }),
213
+ /* @__PURE__ */ jsx("line", {
214
+ x1: "18.36",
215
+ y1: "18.36",
216
+ x2: "19.78",
217
+ y2: "19.78"
218
+ }),
219
+ /* @__PURE__ */ jsx("line", {
220
+ x1: "1",
221
+ y1: "12",
222
+ x2: "3",
223
+ y2: "12"
224
+ }),
225
+ /* @__PURE__ */ jsx("line", {
226
+ x1: "21",
227
+ y1: "12",
228
+ x2: "23",
229
+ y2: "12"
230
+ }),
231
+ /* @__PURE__ */ jsx("line", {
232
+ x1: "4.22",
233
+ y1: "19.78",
234
+ x2: "5.64",
235
+ y2: "18.36"
236
+ }),
237
+ /* @__PURE__ */ jsx("line", {
238
+ x1: "18.36",
239
+ y1: "5.64",
240
+ x2: "19.78",
241
+ y2: "4.22"
242
+ })
243
+ ] });
244
+ }
245
+ function MoonIcon() {
246
+ return /* @__PURE__ */ jsx(IconSvg, { children: /* @__PURE__ */ jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
247
+ }
248
+ function MonitorIcon() {
249
+ return /* @__PURE__ */ jsxs(IconSvg, { children: [
250
+ /* @__PURE__ */ jsx("rect", {
251
+ x: "2",
252
+ y: "3",
253
+ width: "20",
254
+ height: "14",
255
+ rx: "2",
256
+ ry: "2"
257
+ }),
258
+ /* @__PURE__ */ jsx("line", {
259
+ x1: "8",
260
+ y1: "21",
261
+ x2: "16",
262
+ y2: "21"
263
+ }),
264
+ /* @__PURE__ */ jsx("line", {
265
+ x1: "12",
266
+ y1: "17",
267
+ x2: "12",
268
+ y2: "21"
269
+ })
270
+ ] });
271
+ }
272
+ //#endregion
115
273
  //#region src/styles.css?url
116
- var styles_default = "/assets/styles-CWDprFhI.css";
274
+ var styles_default = "/assets/styles-VChXLU8b.css";
117
275
  //#endregion
118
276
  //#region src/routes/__root.tsx
277
+ var themeInitScript = `try{var t=localStorage.getItem('theme');if(t==='light'||t==='dark'){document.documentElement.dataset.theme=t}}catch(e){}`;
119
278
  var Route$6 = createRootRoute({
120
279
  head: () => ({
121
280
  meta: [
@@ -124,7 +283,7 @@ var Route$6 = createRootRoute({
124
283
  name: "viewport",
125
284
  content: "width=device-width, initial-scale=1"
126
285
  },
127
- { title: "Local Provider Docs" }
286
+ { title: "Pulumi Package Docs" }
128
287
  ],
129
288
  links: [{
130
289
  rel: "stylesheet",
@@ -139,23 +298,27 @@ var Route$6 = createRootRoute({
139
298
  function RootDocument({ children }) {
140
299
  return /* @__PURE__ */ jsxs("html", {
141
300
  lang: "en",
142
- children: [/* @__PURE__ */ jsx("head", { children: /* @__PURE__ */ jsx(HeadContent, {}) }), /* @__PURE__ */ jsxs("body", { children: [
301
+ suppressHydrationWarning: true,
302
+ children: [/* @__PURE__ */ jsxs("head", { children: [/* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: { __html: themeInitScript } }), /* @__PURE__ */ jsx(HeadContent, {})] }), /* @__PURE__ */ jsxs("body", { children: [
143
303
  /* @__PURE__ */ jsx("header", {
144
304
  className: "site-header",
145
- children: /* @__PURE__ */ jsxs(Link, {
146
- to: "/",
147
- className: "site-brand",
148
- children: [
149
- /* @__PURE__ */ jsx(PulumiLogo, { height: 22 }),
150
- /* @__PURE__ */ jsx("span", {
151
- className: "site-brand-divider",
152
- "aria-hidden": "true"
153
- }),
154
- /* @__PURE__ */ jsx("span", {
155
- className: "site-brand-name",
156
- children: "Local Provider Docs"
157
- })
158
- ]
305
+ children: /* @__PURE__ */ jsxs("div", {
306
+ className: "site-header-inner",
307
+ children: [/* @__PURE__ */ jsxs(Link, {
308
+ to: "/",
309
+ className: "site-brand",
310
+ children: [
311
+ /* @__PURE__ */ jsx(PulumiLogo, { height: 22 }),
312
+ /* @__PURE__ */ jsx("span", {
313
+ className: "site-brand-divider",
314
+ "aria-hidden": "true"
315
+ }),
316
+ /* @__PURE__ */ jsx("span", {
317
+ className: "site-brand-name",
318
+ children: "Package Docs"
319
+ })
320
+ ]
321
+ }), /* @__PURE__ */ jsx(ThemeToggle, {})]
159
322
  })
160
323
  }),
161
324
  children,
@@ -165,7 +328,7 @@ function RootDocument({ children }) {
165
328
  }
166
329
  //#endregion
167
330
  //#region src/routes/index.tsx
168
- var $$splitComponentImporter$4 = () => import("./routes-B-G_iLTo.js");
331
+ var $$splitComponentImporter$4 = () => import("./routes-4jiXnS1p.js");
169
332
  var Route$5 = createFileRoute("/")({
170
333
  loader: () => listProviders(),
171
334
  component: lazyRouteComponent($$splitComponentImporter$4, "component")
@@ -459,7 +622,7 @@ var Route$3 = createFileRoute("/providers/$name")({ component: lazyRouteComponen
459
622
  //#endregion
460
623
  //#region src/routes/providers.$name.index.tsx
461
624
  var $$splitNotFoundComponentImporter$2 = () => import("./providers._name.index-BEwt-7U0.js");
462
- var $$splitComponentImporter$2 = () => import("./providers._name.index-BK_ZRd5l.js");
625
+ var $$splitComponentImporter$2 = () => import("./providers._name.index-CEXkl-76.js");
463
626
  var Route$2 = createFileRoute("/providers/$name/")({
464
627
  loader: async ({ params }) => {
465
628
  const entry = await getProvider({ data: params.name });
@@ -472,7 +635,7 @@ var Route$2 = createFileRoute("/providers/$name/")({
472
635
  //#endregion
473
636
  //#region src/routes/providers.$name.functions.$token.tsx
474
637
  var $$splitNotFoundComponentImporter$1 = () => import("./providers._name.functions._token-D8LsoIum.js");
475
- var $$splitComponentImporter$1 = () => import("./providers._name.functions._token-C0A7Y90t.js");
638
+ var $$splitComponentImporter$1 = () => import("./providers._name.functions._token-Gkw4zt3M.js");
476
639
  var Route$1 = createFileRoute("/providers/$name/functions/$token")({
477
640
  loader: async ({ params }) => {
478
641
  const entry = await getProvider({ data: params.name });
@@ -491,7 +654,7 @@ var Route$1 = createFileRoute("/providers/$name/functions/$token")({
491
654
  //#endregion
492
655
  //#region src/routes/providers.$name.resources.$token.tsx
493
656
  var $$splitNotFoundComponentImporter = () => import("./providers._name.resources._token-DJPF8nMg.js");
494
- var $$splitComponentImporter = () => import("./providers._name.resources._token-CbvRkms4.js");
657
+ var $$splitComponentImporter = () => import("./providers._name.resources._token-R_i2MmRl.js");
495
658
  var Route = createFileRoute("/providers/$name/resources/$token")({
496
659
  loader: async ({ params }) => {
497
660
  const entry = await getProvider({ data: params.name });
@@ -1,10 +1,10 @@
1
- import { p as Route } from "./router-DZSocx9m.js";
1
+ import { p as Route } from "./router-1INob9fh.js";
2
2
  import { Link } from "@tanstack/react-router";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/routes/index.tsx?tsr-split=component
5
5
  function Home() {
6
6
  const { targetDir, project, providers } = Route.useLoaderData();
7
- if (!project) return /* @__PURE__ */ jsxs("main", { children: [/* @__PURE__ */ jsx("h1", { children: "Local Provider Docs" }), /* @__PURE__ */ jsxs("p", {
7
+ if (!project) return /* @__PURE__ */ jsxs("main", { children: [/* @__PURE__ */ jsx("h1", { children: "Pulumi Package Docs" }), /* @__PURE__ */ jsxs("p", {
8
8
  className: "empty-state",
9
9
  children: [
10
10
  "No Pulumi project was found at ",
@@ -16,7 +16,7 @@ function Home() {
16
16
  ]
17
17
  })] });
18
18
  return /* @__PURE__ */ jsxs("main", { children: [
19
- /* @__PURE__ */ jsx("h1", { children: "Local Provider Docs" }),
19
+ /* @__PURE__ */ jsx("h1", { children: "Pulumi Package Docs" }),
20
20
  /* @__PURE__ */ jsxs("p", {
21
21
  className: "subtitle",
22
22
  children: [
@@ -91,7 +91,7 @@ var HEADERS = { TSS_SHELL: "X-TSS_SHELL" };
91
91
  * the dev styles URL for route-scoped CSS collection.
92
92
  */
93
93
  async function getStartManifest(matchedRoutes) {
94
- const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-DHujW1ME.js");
94
+ const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-B0J-S-em.js");
95
95
  const startManifest = tsrStartManifest();
96
96
  let routes = startManifest.routes;
97
97
  routes[rootRouteId];
@@ -1547,7 +1547,7 @@ var getBaseManifest = getProdBaseManifest;
1547
1547
  var createEarlyHintsForRequest = createEarlyHintsCollector;
1548
1548
  async function loadEntries() {
1549
1549
  const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
1550
- import("./assets/router-DZSocx9m.js").then((n) => n.t),
1550
+ import("./assets/router-1INob9fh.js").then((n) => n.t),
1551
1551
  import("./assets/start-5Z2QO8AU.js"),
1552
1552
  import("./assets/empty-plugin-adapters-D9UWiqvJ.js")
1553
1553
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pulumi-package-docs",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Local documentation viewer for the parameterized/local Pulumi providers used by a Pulumi project.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -0,0 +1,121 @@
1
+ import { useEffect, useState } from 'react'
2
+
3
+ type ThemeMode = 'system' | 'light' | 'dark'
4
+
5
+ const OPTIONS: {
6
+ mode: ThemeMode
7
+ label: string
8
+ Icon: () => React.JSX.Element
9
+ }[] = [
10
+ { mode: 'system', label: 'System', Icon: MonitorIcon },
11
+ { mode: 'light', label: 'Light', Icon: SunIcon },
12
+ { mode: 'dark', label: 'Dark', Icon: MoonIcon },
13
+ ]
14
+
15
+ function applyTheme(mode: ThemeMode) {
16
+ try {
17
+ if (mode === 'system') {
18
+ delete document.documentElement.dataset.theme
19
+ localStorage.removeItem('theme')
20
+ } else {
21
+ document.documentElement.dataset.theme = mode
22
+ localStorage.setItem('theme', mode)
23
+ }
24
+ } catch {
25
+ // Storage can be unavailable (private browsing, locked-down environments);
26
+ // the toggle still works for the current page load, it just won't persist.
27
+ if (mode === 'system') delete document.documentElement.dataset.theme
28
+ else document.documentElement.dataset.theme = mode
29
+ }
30
+ }
31
+
32
+ export function ThemeToggle() {
33
+ const [mode, setMode] = useState<ThemeMode>('system')
34
+
35
+ useEffect(() => {
36
+ // Deliberately deferred to an effect, not derived during render: the
37
+ // server can't read localStorage, so matching its 'system' default here
38
+ // keeps hydration's first client render consistent with the server's.
39
+ try {
40
+ const stored = localStorage.getItem('theme')
41
+ // eslint-disable-next-line react/set-state-in-effect
42
+ if (stored === 'light' || stored === 'dark') setMode(stored)
43
+ } catch {
44
+ // Ignore: falls back to the system-driven default already applied.
45
+ }
46
+ }, [])
47
+
48
+ function choose(next: ThemeMode) {
49
+ setMode(next)
50
+ applyTheme(next)
51
+ }
52
+
53
+ return (
54
+ <div className="theme-switch" role="group" aria-label="Theme">
55
+ {OPTIONS.map(({ mode: optionMode, label, Icon }) => (
56
+ <button
57
+ key={optionMode}
58
+ type="button"
59
+ className="theme-switch-option"
60
+ aria-pressed={mode === optionMode}
61
+ onClick={() => choose(optionMode)}
62
+ aria-label={label}
63
+ >
64
+ <Icon />
65
+ </button>
66
+ ))}
67
+ </div>
68
+ )
69
+ }
70
+
71
+ function IconSvg({ children }: { children: React.ReactNode }) {
72
+ return (
73
+ <svg
74
+ width={16}
75
+ height={16}
76
+ viewBox="0 0 24 24"
77
+ fill="none"
78
+ stroke="currentColor"
79
+ strokeWidth={2}
80
+ strokeLinecap="round"
81
+ strokeLinejoin="round"
82
+ aria-hidden="true"
83
+ >
84
+ {children}
85
+ </svg>
86
+ )
87
+ }
88
+
89
+ function SunIcon() {
90
+ return (
91
+ <IconSvg>
92
+ <circle cx="12" cy="12" r="5" />
93
+ <line x1="12" y1="1" x2="12" y2="3" />
94
+ <line x1="12" y1="21" x2="12" y2="23" />
95
+ <line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
96
+ <line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
97
+ <line x1="1" y1="12" x2="3" y2="12" />
98
+ <line x1="21" y1="12" x2="23" y2="12" />
99
+ <line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
100
+ <line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
101
+ </IconSvg>
102
+ )
103
+ }
104
+
105
+ function MoonIcon() {
106
+ return (
107
+ <IconSvg>
108
+ <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />
109
+ </IconSvg>
110
+ )
111
+ }
112
+
113
+ function MonitorIcon() {
114
+ return (
115
+ <IconSvg>
116
+ <rect x="2" y="3" width="20" height="14" rx="2" ry="2" />
117
+ <line x1="8" y1="21" x2="16" y2="21" />
118
+ <line x1="12" y1="17" x2="12" y2="21" />
119
+ </IconSvg>
120
+ )
121
+ }