@hgdc/docs 0.0.0-stage → 0.1.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 (175) hide show
  1. package/bin/hgdc-docs.mjs +48 -0
  2. package/docs.schema.json +294 -0
  3. package/package.json +50 -4
  4. package/src/build/auto-import.ts +74 -0
  5. package/src/build/markdown.ts +114 -0
  6. package/src/build/outputs.ts +91 -0
  7. package/src/build/public-files.test.ts +29 -0
  8. package/src/build/public-files.ts +35 -0
  9. package/src/components/Accordion.astro +12 -0
  10. package/src/components/AccordionGroup.astro +4 -0
  11. package/src/components/Card.astro +15 -0
  12. package/src/components/CardGroup.astro +8 -0
  13. package/src/components/Check.astro +10 -0
  14. package/src/components/CodeGroup.astro +4 -0
  15. package/src/components/Columns.astro +8 -0
  16. package/src/components/Danger.astro +10 -0
  17. package/src/components/Frame.astro +11 -0
  18. package/src/components/Info.astro +10 -0
  19. package/src/components/Note.astro +10 -0
  20. package/src/components/Step.astro +11 -0
  21. package/src/components/Steps.astro +4 -0
  22. package/src/components/Tab.astro +9 -0
  23. package/src/components/Tabs.astro +9 -0
  24. package/src/components/Tip.astro +10 -0
  25. package/src/components/Warning.astro +10 -0
  26. package/src/core/answer-markdown.ts +109 -0
  27. package/src/core/assistant-api.ts +65 -0
  28. package/src/core/chunk.ts +134 -0
  29. package/src/core/config.ts +153 -0
  30. package/src/core/core.test.ts +253 -0
  31. package/src/core/corpus.ts +42 -0
  32. package/src/core/json-schema.ts +12 -0
  33. package/src/core/llms.ts +95 -0
  34. package/src/core/navigation.ts +88 -0
  35. package/src/core/theme.ts +111 -0
  36. package/src/integration.ts +229 -0
  37. package/src/locals.d.ts +6 -0
  38. package/src/overrides/Assistant.astro +72 -0
  39. package/src/overrides/Head.astro +12 -0
  40. package/src/overrides/PageFrame.astro +15 -0
  41. package/src/overrides/PageTitle.astro +94 -0
  42. package/src/overrides/Sidebar.astro +60 -0
  43. package/src/overrides/route-data.ts +33 -0
  44. package/src/styles/theme.css +773 -0
  45. package/src/virtual.d.ts +6 -0
  46. package/src/widget/client.ts +252 -0
  47. package/template/.astro/collections/docs.schema.json +651 -0
  48. package/template/.astro/content-assets.mjs +1 -0
  49. package/template/.astro/content-modules.mjs +18 -0
  50. package/template/.astro/content.d.ts +179 -0
  51. package/template/.astro/types.d.ts +2 -0
  52. package/template/.build/.well-known/llms.txt +38 -0
  53. package/template/.build/404.html +42 -0
  54. package/template/.build/_astro/Assistant.astro_astro_type_script_index_0_lang.DWgmlr85.js +4 -0
  55. package/template/.build/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.C3fM4Kra.js +1 -0
  56. package/template/.build/_astro/Search.astro_astro_type_script_index_0_lang.g9hoxVJg.js +1 -0
  57. package/template/.build/_astro/TableOfContents.astro_astro_type_script_index_0_lang.BpJaGz7G.js +1 -0
  58. package/template/.build/_astro/common.8GHCkW7i.css +3 -0
  59. package/template/.build/_astro/ec.0vx5m.js +3 -0
  60. package/template/.build/_astro/ec.8nqtp.css +1 -0
  61. package/template/.build/_astro/geist-cyrillic-ext-wght-normal.DjL33-gN.woff2 +0 -0
  62. package/template/.build/_astro/geist-cyrillic-wght-normal.BEAKL7Jp.woff2 +0 -0
  63. package/template/.build/_astro/geist-latin-ext-wght-normal.DC-KSUi6.woff2 +0 -0
  64. package/template/.build/_astro/geist-latin-wght-normal.BgDaEnEv.woff2 +0 -0
  65. package/template/.build/_astro/geist-vietnamese-wght-normal.6IgcOCM7.woff2 +0 -0
  66. package/template/.build/_astro/inter-cyrillic-ext-wght-normal.BOeWTOD4.woff2 +0 -0
  67. package/template/.build/_astro/inter-cyrillic-wght-normal.DqGufNeO.woff2 +0 -0
  68. package/template/.build/_astro/inter-greek-ext-wght-normal.DlzME5K_.woff2 +0 -0
  69. package/template/.build/_astro/inter-greek-wght-normal.CkhJZR-_.woff2 +0 -0
  70. package/template/.build/_astro/inter-latin-ext-wght-normal.DO1Apj_S.woff2 +0 -0
  71. package/template/.build/_astro/inter-latin-wght-normal.Dx4kXJAl.woff2 +0 -0
  72. package/template/.build/_astro/inter-vietnamese-wght-normal.CBcvBZtf.woff2 +0 -0
  73. package/template/.build/_astro/logo-clair.BqNh6JNi.svg +1 -0
  74. package/template/.build/_astro/logo-sombre.BkgsFXxh.svg +1 -0
  75. package/template/.build/_astro/page.cNngjUgL.js +1 -0
  76. package/template/.build/_astro/print.ehPL0gv-.css +1 -0
  77. package/template/.build/_astro/starlight-toc.D4UDIxQL.js +1 -0
  78. package/template/.build/_astro/ui-core.Clh5jUUO.js +2 -0
  79. package/template/.build/_hgdc/corpus.json +1 -0
  80. package/template/.build/demarrer/premiere-doc/index.html +84 -0
  81. package/template/.build/demarrer/premiere-doc.md +65 -0
  82. package/template/.build/explications/donnees/index.html +114 -0
  83. package/template/.build/explications/donnees.md +28 -0
  84. package/template/.build/explications/fonctionnement/index.html +92 -0
  85. package/template/.build/explications/fonctionnement.md +32 -0
  86. package/template/.build/guides/agents/index.html +113 -0
  87. package/template/.build/guides/agents.md +40 -0
  88. package/template/.build/guides/assistant/index.html +117 -0
  89. package/template/.build/guides/assistant.md +42 -0
  90. package/template/.build/guides/composants/index.html +97 -0
  91. package/template/.build/guides/composants.md +103 -0
  92. package/template/.build/guides/ecrire/index.html +115 -0
  93. package/template/.build/guides/ecrire.md +63 -0
  94. package/template/.build/guides/navigation/index.html +89 -0
  95. package/template/.build/guides/navigation.md +63 -0
  96. package/template/.build/guides/publier/index.html +86 -0
  97. package/template/.build/guides/publier.md +65 -0
  98. package/template/.build/guides/theme/index.html +86 -0
  99. package/template/.build/guides/theme.md +33 -0
  100. package/template/.build/images/favicon.svg +1 -0
  101. package/template/.build/images/logo-clair.svg +1 -0
  102. package/template/.build/images/logo-sombre.svg +1 -0
  103. package/template/.build/index.html +87 -0
  104. package/template/.build/index.md +35 -0
  105. package/template/.build/llms-full.txt +830 -0
  106. package/template/.build/llms.txt +38 -0
  107. package/template/.build/pagefind/fragment/fr-ch_148313b.pf_fragment +0 -0
  108. package/template/.build/pagefind/fragment/fr-ch_424fd16.pf_fragment +0 -0
  109. package/template/.build/pagefind/fragment/fr-ch_4f8575c.pf_fragment +0 -0
  110. package/template/.build/pagefind/fragment/fr-ch_5a4d77d.pf_fragment +0 -0
  111. package/template/.build/pagefind/fragment/fr-ch_6c36edc.pf_fragment +0 -0
  112. package/template/.build/pagefind/fragment/fr-ch_73d7887.pf_fragment +0 -0
  113. package/template/.build/pagefind/fragment/fr-ch_8234ed3.pf_fragment +0 -0
  114. package/template/.build/pagefind/fragment/fr-ch_8f8a19e.pf_fragment +0 -0
  115. package/template/.build/pagefind/fragment/fr-ch_9f1b981.pf_fragment +0 -0
  116. package/template/.build/pagefind/fragment/fr-ch_a19039d.pf_fragment +0 -0
  117. package/template/.build/pagefind/fragment/fr-ch_d72cc1e.pf_fragment +0 -0
  118. package/template/.build/pagefind/fragment/fr-ch_d732215.pf_fragment +0 -0
  119. package/template/.build/pagefind/fragment/fr-ch_e2c46e3.pf_fragment +0 -0
  120. package/template/.build/pagefind/fragment/fr-ch_e78d58b.pf_fragment +0 -0
  121. package/template/.build/pagefind/fragment/fr-ch_e92f972.pf_fragment +0 -0
  122. package/template/.build/pagefind/index/fr-ch_f94c95d.pf_index +0 -0
  123. package/template/.build/pagefind/pagefind-component-ui.css +1509 -0
  124. package/template/.build/pagefind/pagefind-component-ui.js +56 -0
  125. package/template/.build/pagefind/pagefind-entry.json +1 -0
  126. package/template/.build/pagefind/pagefind-highlight.js +1070 -0
  127. package/template/.build/pagefind/pagefind-modular-ui.css +214 -0
  128. package/template/.build/pagefind/pagefind-modular-ui.js +8 -0
  129. package/template/.build/pagefind/pagefind-ui.css +1 -0
  130. package/template/.build/pagefind/pagefind-ui.js +2 -0
  131. package/template/.build/pagefind/pagefind-worker.js +6 -0
  132. package/template/.build/pagefind/pagefind.fr-ch_fb78ab42961f4.pf_meta +0 -0
  133. package/template/.build/pagefind/pagefind.js +6 -0
  134. package/template/.build/pagefind/wasm.fr-ch.pagefind +0 -0
  135. package/template/.build/pagefind/wasm.unknown.pagefind +0 -0
  136. package/template/.build/reference/api-assistant/index.html +161 -0
  137. package/template/.build/reference/api-assistant.md +60 -0
  138. package/template/.build/reference/cli/index.html +153 -0
  139. package/template/.build/reference/cli.md +31 -0
  140. package/template/.build/reference/docs-json/index.html +192 -0
  141. package/template/.build/reference/docs-json.md +43 -0
  142. package/template/.build/reference/mcp/index.html +151 -0
  143. package/template/.build/reference/mcp.md +49 -0
  144. package/template/astro.config.ts +6 -0
  145. package/template/node_modules/.vite/deps/_metadata.json +74 -0
  146. package/template/node_modules/.vite/deps/astro-B3JHJyiv.js +434 -0
  147. package/template/node_modules/.vite/deps/astro-B3JHJyiv.js.map +1 -0
  148. package/template/node_modules/.vite/deps/astro_n_aria-query.js +6390 -0
  149. package/template/node_modules/.vite/deps/astro_n_aria-query.js.map +1 -0
  150. package/template/node_modules/.vite/deps/astro_n_axobject-query.js +2705 -0
  151. package/template/node_modules/.vite/deps/astro_n_axobject-query.js.map +1 -0
  152. package/template/node_modules/.vite/deps/astro_n_html-escaper.js +65 -0
  153. package/template/node_modules/.vite/deps/astro_n_html-escaper.js.map +1 -0
  154. package/template/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js +455 -0
  155. package/template/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js.map +1 -0
  156. package/template/node_modules/.vite/deps/audit-Do8QH17W.js +1543 -0
  157. package/template/node_modules/.vite/deps/audit-Do8QH17W.js.map +1 -0
  158. package/template/node_modules/.vite/deps/highlight-BLtvqtzO.js +48 -0
  159. package/template/node_modules/.vite/deps/highlight-BLtvqtzO.js.map +1 -0
  160. package/template/node_modules/.vite/deps/icons-C92i61-2.js +42 -0
  161. package/template/node_modules/.vite/deps/icons-C92i61-2.js.map +1 -0
  162. package/template/node_modules/.vite/deps/package.json +3 -0
  163. package/template/node_modules/.vite/deps/rolldown-runtime-C3I60J0A.js +4 -0
  164. package/template/node_modules/.vite/deps/settings-BYmTKrLi.js +189 -0
  165. package/template/node_modules/.vite/deps/settings-BYmTKrLi.js.map +1 -0
  166. package/template/node_modules/.vite/deps/toolbar-CEKhukuK.js +461 -0
  167. package/template/node_modules/.vite/deps/toolbar-CEKhukuK.js.map +1 -0
  168. package/template/node_modules/.vite/deps/ui-library-BO4--ANp.js +1015 -0
  169. package/template/node_modules/.vite/deps/ui-library-BO4--ANp.js.map +1 -0
  170. package/template/node_modules/.vite/deps/window-vo3A6TMn.js +32 -0
  171. package/template/node_modules/.vite/deps/window-vo3A6TMn.js.map +1 -0
  172. package/template/node_modules/.vite/deps/xray-Lf9x6g8P.js +112 -0
  173. package/template/node_modules/.vite/deps/xray-Lf9x6g8P.js.map +1 -0
  174. package/template/src/content.config.ts +21 -0
  175. package/README.md +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-library-BO4--ANp.js","names":["sizes","styles","styles","styles","styles","styles","styles"],"sources":["../../../../../../node_modules/astro/dist/runtime/client/dev-toolbar/ui-library/badge.js","../../../../../../node_modules/astro/dist/runtime/client/dev-toolbar/ui-library/button.js","../../../../../../node_modules/astro/dist/runtime/client/dev-toolbar/ui-library/card.js","../../../../../../node_modules/astro/dist/runtime/client/dev-toolbar/ui-library/highlight.js","../../../../../../node_modules/astro/dist/runtime/client/dev-toolbar/ui-library/icon.js","../../../../../../node_modules/astro/dist/runtime/client/dev-toolbar/ui-library/radio-checkbox.js","../../../../../../node_modules/astro/dist/runtime/client/dev-toolbar/ui-library/select.js","../../../../../../node_modules/astro/dist/runtime/client/dev-toolbar/ui-library/toggle.js","../../../../../../node_modules/astro/dist/runtime/client/dev-toolbar/ui-library/tooltip.js"],"sourcesContent":["import { settings } from \"../settings.js\";\nconst sizes = [\"small\", \"large\"];\nconst styles = [\n\t\"purple\",\n\t\"gray\",\n\t\"red\",\n\t\"green\",\n\t\"yellow\",\n\t\"blue\"\n];\nexport class DevToolbarBadge extends HTMLElement {\n\t_size = \"small\";\n\t_badgeStyle = \"purple\";\n\tget size() {\n\t\treturn this._size;\n\t}\n\tset size(value) {\n\t\tif (!sizes.includes(value)) {\n\t\t\tsettings.logger.error(`Invalid size: ${value}, expected one of ${sizes.join(\", \")}, got ${value}.`);\n\t\t\treturn;\n\t\t}\n\t\tthis._size = value;\n\t\tthis.updateStyle();\n\t}\n\tget badgeStyle() {\n\t\treturn this._badgeStyle;\n\t}\n\tset badgeStyle(value) {\n\t\tif (!styles.includes(value)) {\n\t\t\tsettings.logger.error(`Invalid style: ${value}, expected one of ${styles.join(\", \")}, got ${value}.`);\n\t\t\treturn;\n\t\t}\n\t\tthis._badgeStyle = value;\n\t\tthis.updateStyle();\n\t}\n\tshadowRoot;\n\tstatic observedAttributes = [\"badge-style\", \"size\"];\n\tconstructor() {\n\t\tsuper();\n\t\tthis.shadowRoot = this.attachShadow({ mode: \"open\" });\n\t\tthis.shadowRoot.innerHTML = `\n\t\t\t<style>\n\t\t\t\t.badge {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\tborder: 1px solid transparent;\n\t\t\t\t\tpadding: 8px;\n\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\tcolor: var(--text-color);\n\t\t\t\t\theight: var(--size);\n\t\t\t\t\tborder: 1px solid var(--border-color);\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\tfont-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n\n\t\t\t\t\t--purple-text: rgba(224, 204, 250, 1);\n\t\t\t\t\t--purple-border: rgba(113, 24, 226, 1);\n\n\t\t\t\t\t--gray-text: rgba(191, 193, 201, 1);\n\t\t\t\t\t--gray-border:rgba(191, 193, 201, 1);\n\n\t\t\t\t\t--red-text: rgba(249, 196, 215, 1);\n\t\t\t\t\t--red-border: rgba(179, 62, 102, 1);\n\n\t\t\t\t\t--green-text: rgba(213, 249, 196, 1);\n\t\t\t\t\t--green-border: rgba(61, 125, 31, 1);\n\n\t\t\t\t\t--yellow-text: rgba(249, 233, 196, 1);\n\t\t\t\t\t--yellow-border: rgba(181, 138, 45, 1);\n\n\t\t\t\t\t--blue-text: rgba(189, 195, 255, 1);\n\t\t\t\t\t--blue-border: rgba(54, 69, 217, 1);\n\n\t\t\t\t\t--large: 24px;\n\t\t\t\t\t--small: 20px;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<style id=\"selected-style\"></style>\n\n\t\t\t<div class=\"badge\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t\t`;\n\t}\n\tconnectedCallback() {\n\t\tthis.updateStyle();\n\t}\n\tattributeChangedCallback() {\n\t\tif (this.hasAttribute(\"badge-style\")) this.badgeStyle = this.getAttribute(\"badge-style\");\n\t\tif (this.hasAttribute(\"size\")) this.size = this.getAttribute(\"size\");\n\t}\n\tupdateStyle() {\n\t\tconst style = this.shadowRoot.querySelector(\"#selected-style\");\n\t\tif (style) {\n\t\t\tstyle.innerHTML = `\n\t\t\t.badge {\n\t\t\t\t--text-color: var(--${this.badgeStyle}-text);\n\t\t\t\t--border-color: var(--${this.badgeStyle}-border);\n\t\t\t\t--size: var(--${this.size});\n\t\t\t}`;\n\t\t}\n\t}\n}\n","import { settings } from \"../settings.js\";\nconst sizes = [\n\t\"small\",\n\t\"medium\",\n\t\"large\"\n];\nconst styles = [\n\t\"ghost\",\n\t\"outline\",\n\t\"purple\",\n\t\"gray\",\n\t\"red\",\n\t\"green\",\n\t\"yellow\",\n\t\"blue\"\n];\nconst borderRadii = [\"normal\", \"rounded\"];\nexport class DevToolbarButton extends HTMLElement {\n\t_size = \"small\";\n\t_buttonStyle = \"purple\";\n\t_buttonBorderRadius = \"normal\";\n\tget size() {\n\t\treturn this._size;\n\t}\n\tset size(value) {\n\t\tif (!sizes.includes(value)) {\n\t\t\tsettings.logger.error(`Invalid size: ${value}, expected one of ${sizes.join(\", \")}, got ${value}.`);\n\t\t\treturn;\n\t\t}\n\t\tthis._size = value;\n\t\tthis.updateStyle();\n\t}\n\tget buttonStyle() {\n\t\treturn this._buttonStyle;\n\t}\n\tset buttonStyle(value) {\n\t\tif (!styles.includes(value)) {\n\t\t\tsettings.logger.error(`Invalid style: ${value}, expected one of ${styles.join(\", \")}, got ${value}.`);\n\t\t\treturn;\n\t\t}\n\t\tthis._buttonStyle = value;\n\t\tthis.updateStyle();\n\t}\n\tget buttonBorderRadius() {\n\t\treturn this._buttonBorderRadius;\n\t}\n\tset buttonBorderRadius(value) {\n\t\tif (!borderRadii.includes(value)) {\n\t\t\tsettings.logger.error(`Invalid border-radius: ${value}, expected one of ${borderRadii.join(\", \")}, got ${value}.`);\n\t\t\treturn;\n\t\t}\n\t\tthis._buttonBorderRadius = value;\n\t\tthis.updateStyle();\n\t}\n\tstatic observedAttributes = [\n\t\t\"button-style\",\n\t\t\"size\",\n\t\t\"button-border-radius\"\n\t];\n\tshadowRoot;\n\tconstructor() {\n\t\tsuper();\n\t\tthis.shadowRoot = this.attachShadow({ mode: \"open\" });\n\t\tthis.shadowRoot.innerHTML = `\n\t\t\t<style>\n\t\t\t\tbutton {\n\t\t\t\t\t--purple-background: rgba(113, 24, 226, 1);\n\t\t\t\t\t--purple-border: rgba(224, 204, 250, 0.33);\n\t\t\t\t\t--purple-text: #fff;\n\n\t\t\t\t\t--gray-background: rgba(52, 56, 65, 1);\n\t\t\t\t\t--gray-border: rgba(71, 78, 94, 1);\n\t\t\t\t\t--gray-text: #fff;\n\n\t\t\t\t\t--red-background: rgba(179, 62, 102, 1);\n\t\t\t\t\t--red-border: rgba(249, 196, 215, 0.33);\n\t\t\t\t\t--red-text: #fff;\n\n\t\t\t\t\t--green-background: rgba(213, 249, 196, 1);\n\t\t\t\t\t--green-border: rgba(61, 125, 31, 1);\n\t\t\t\t\t--green-text: #000;\n\n\t\t\t\t\t--yellow-background: rgba(255, 236, 179, 1);\n\t\t\t\t\t--yellow-border: rgba(255, 191, 0, 1);\n\t\t\t\t\t--yellow-text: #000;\n\n\t\t\t\t\t--blue-background: rgba(54, 69, 217, 1);\n\t\t\t\t\t--blue-border: rgba(189, 195, 255, 1);\n\t\t\t\t\t--blue-text: #fff;\n\n\t\t\t\t\t--outline-background: transparent;\n\t\t\t\t\t--outline-border: #fff;\n\t\t\t\t\t--outline-text: #fff;\n\n\t\t\t\t\t--ghost-background: transparent;\n\t\t\t\t\t--ghost-border: transparent;\n\t\t\t\t\t--ghost-text: #fff;\n\n\t\t\t\t\t--large-font-size: 16px;\n\t\t\t\t\t--medium-font-size: 14px;\n\t\t\t\t\t--small-font-size: 12px;\n\n\t\t\t\t\t--large-padding: 12px 16px;\n\t\t\t\t\t--large-rounded-padding: 12px 12px;\n\t\t\t\t\t--medium-padding: 8px 12px;\n\t\t\t\t\t--medium-rounded-padding: 8px 8px;\n\t\t\t\t\t--small-padding: 4px 8px;\n\t\t\t\t\t--small-rounded-padding: 4px 4px;\n\n\t\t\t\t\t--normal-border-radius: 4px;\n\t\t\t\t\t--rounded-border-radius: 9999px;\n\n\t\t\t\t\tborder: 1px solid var(--border);\n\t\t\t\t\tpadding: var(--padding);\n\t\t\t\t\tfont-size: var(--font-size);\n\t\t\t\t\tbackground: var(--background);\n\n\t\t\t\t\tcolor: var(--text-color);\n\t\t\t\t\tborder-radius: var(--border-radius);\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\tbutton:hover {\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t}\n\n\t\t\t\t::slotted(astro-dev-toolbar-icon) {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\theight: 1em;\n\t\t\t\t\twidth: 1em;\n\t\t\t\t\tmargin-left: 0.5em;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<style id=\"selected-style\"></style>\n\n\t\t\t<button>\n\t\t\t\t<slot></slot>\n\t\t\t</button>\n\t\t`;\n\t}\n\tconnectedCallback() {\n\t\tthis.updateStyle();\n\t}\n\tupdateStyle() {\n\t\tconst style = this.shadowRoot.querySelector(\"#selected-style\");\n\t\tif (style) {\n\t\t\tstyle.innerHTML = `\n\t\t\tbutton {\n\t\t\t\t--background: var(--${this.buttonStyle}-background);\n\t\t\t\t--border: var(--${this.buttonStyle}-border);\n\t\t\t\t--font-size: var(--${this.size}-font-size);\n\t\t\t\t--text-color: var(--${this.buttonStyle}-text);\n\t\t\t\t${this.buttonBorderRadius === \"normal\" ? \"--padding: var(--\" + this.size + \"-padding);\" : \"--padding: var(--\" + this.size + \"-rounded-padding);\"}\n\t\t\t\t--border-radius: var(--${this.buttonBorderRadius}-border-radius);\n\t\t\t}`;\n\t\t}\n\t}\n\tattributeChangedCallback() {\n\t\tif (this.hasAttribute(\"size\")) this.size = this.getAttribute(\"size\");\n\t\tif (this.hasAttribute(\"button-style\")) this.buttonStyle = this.getAttribute(\"button-style\");\n\t}\n}\n","import { settings } from \"../settings.js\";\nconst styles = [\n\t\"purple\",\n\t\"gray\",\n\t\"red\",\n\t\"green\",\n\t\"yellow\",\n\t\"blue\"\n];\nexport class DevToolbarCard extends HTMLElement {\n\tlink;\n\tclickAction;\n\tshadowRoot;\n\t_cardStyle = \"purple\";\n\tget cardStyle() {\n\t\treturn this._cardStyle;\n\t}\n\tset cardStyle(value) {\n\t\tif (!styles.includes(value)) {\n\t\t\tsettings.logger.error(`Invalid style: ${value}, expected one of ${styles.join(\", \")}, got ${value}.`);\n\t\t\treturn;\n\t\t}\n\t\tthis._cardStyle = value;\n\t\tthis.updateStyle();\n\t}\n\tstatic observedAttributes = [\"card-style\"];\n\tconstructor() {\n\t\tsuper();\n\t\tthis.shadowRoot = this.attachShadow({ mode: \"open\" });\n\t\tthis.link = this.getAttribute(\"link\");\n\t}\n\tattributeChangedCallback() {\n\t\tif (this.hasAttribute(\"card-style\")) this.cardStyle = this.getAttribute(\"card-style\");\n\t\tthis.updateStyle();\n\t}\n\tupdateStyle() {\n\t\tconst style = this.shadowRoot.querySelector(\"#selected-style\");\n\t\tif (style) {\n\t\t\tstyle.innerHTML = `\n\t\t\t\t:host {\n\t\t\t\t\t--hover-background: var(--${this.cardStyle}-hover-background);\n\t\t\t\t\t--hover-border: var(--${this.cardStyle}-hover-border);\n\t\t\t\t}\n\t\t\t`;\n\t\t}\n\t}\n\tconnectedCallback() {\n\t\tconst element = this.link ? \"a\" : this.clickAction ? \"button\" : \"div\";\n\t\tthis.shadowRoot.innerHTML += `\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\t--purple-hover-background: rgba(136, 58, 234, 0.33);\n\t\t\t\t\t--purple-hover-border: 1px solid rgba(113, 24, 226, 1);\n\n\t\t\t\t\t--gray-hover-background: rgba(191, 193, 201, 0.33);\n\t\t\t\t\t--gray-hover-border: 1px solid rgba(191, 193, 201, 1);\n\n\t\t\t\t\t--red-hover-background: rgba(249, 196, 215, 0.33);\n\t\t\t\t\t--red-hover-border: 1px solid rgba(179, 62, 102, 1);\n\n\t\t\t\t\t--green-hover-background: rgba(213, 249, 196, 0.33);\n\t\t\t\t\t--green-hover-border: 1px solid rgba(61, 125, 31, 1);\n\n\t\t\t\t\t--yellow-hover-background: rgba(255, 236, 179, 0.33);\n\t\t\t\t\t--yellow-hover-border: 1px solid rgba(255, 191, 0, 1);\n\n\t\t\t\t\t--blue-hover-background: rgba(189, 195, 255, 0.33);\n\t\t\t\t\t--blue-hover-border: 1px solid rgba(54, 69, 217, 1);\n\t\t\t\t}\n\n\t\t\t\t:host>a, :host>button, :host>div {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t\tpadding: 16px;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\tborder-radius: 8px;\n\t\t\t\t\tborder: 1px solid rgba(35, 38, 45, 1);\n\t\t\t\t\tcolor: rgba(191, 193, 201, 1);\n\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\tbackground-color: #13151A;\n\t\t\t\t\tbox-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.10), 0px 1px 2px 0px rgba(0, 0, 0, 0.10), 0px 4px 4px 0px rgba(0, 0, 0, 0.09), 0px 10px 6px 0px rgba(0, 0, 0, 0.05), 0px 17px 7px 0px rgba(0, 0, 0, 0.01), 0px 26px 7px 0px rgba(0, 0, 0, 0.00);\n\t\t\t\t\twidth: 100%;\n \t\t\theight: 100%;\n\t\t\t\t}\n\n\t\t\t\th1, h2, h3, h4, h5, h6 {\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tfont-weight: 600;\n\t\t\t\t}\n\n\t\t\t\ta:hover, button:hover {\n\t\t\t\t\tbackground: var(--hover-background);\n\t\t\t\t\tborder: var(--hover-border);\n\t\t\t\t}\n\n\t\t\t\tsvg {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t}\n\n\t\t\t\tspan {\n\t\t\t\t\tmargin-top: 8px;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<style id=\"selected-style\"></style>\n\n\t\t\t<${element}${this.link ? ` href=\"${this.link}\" target=\"_blank\"` : ``} id=\"astro-overlay-card\">\n\t\t\t\t<slot />\n\t\t\t</${element}>\n\t\t`;\n\t\tthis.updateStyle();\n\t\tif (this.clickAction) {\n\t\t\tthis.shadowRoot.getElementById(\"astro-overlay-card\")?.addEventListener(\"click\", this.clickAction);\n\t\t}\n\t}\n}\n","import { settings } from \"../settings.js\";\nimport { getIconElement, isDefinedIcon } from \"./icons.js\";\nconst styles = [\n\t\"purple\",\n\t\"gray\",\n\t\"red\",\n\t\"green\",\n\t\"yellow\",\n\t\"blue\"\n];\nexport class DevToolbarHighlight extends HTMLElement {\n\ticon;\n\t_highlightStyle = \"purple\";\n\tget highlightStyle() {\n\t\treturn this._highlightStyle;\n\t}\n\tset highlightStyle(value) {\n\t\tif (!styles.includes(value)) {\n\t\t\tsettings.logger.error(`Invalid style: ${value}, expected one of ${styles.join(\", \")}, got ${value}.`);\n\t\t\treturn;\n\t\t}\n\t\tthis._highlightStyle = value;\n\t\tthis.updateStyle();\n\t}\n\tstatic observedAttributes = [\"highlight-style\"];\n\tshadowRoot;\n\tconstructor() {\n\t\tsuper();\n\t\tthis.shadowRoot = this.attachShadow({ mode: \"open\" });\n\t\tthis.icon = this.hasAttribute(\"icon\") ? this.getAttribute(\"icon\") : undefined;\n\t\tthis.shadowRoot.innerHTML = `\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\t--purple-background: linear-gradient(180deg, rgba(224, 204, 250, 0.33) 0%, rgba(224, 204, 250, 0.0825) 100%);\n\t\t\t\t\t--purple-border: 1px solid rgba(113, 24, 226, 1);\n\n\t\t\t\t\t--gray-background: linear-gradient(180deg, rgba(191, 193, 201, 0.33) 0%, rgba(191, 193, 201, 0.0825) 100%);\n\t\t\t\t\t--gray-border: 1px solid rgba(191, 193, 201, 1);\n\n\t\t\t\t\t--red-background: linear-gradient(180deg, rgba(249, 196, 215, 0.33) 0%, rgba(249, 196, 215, 0.0825) 100%);\n\t\t\t\t\t--red-border: 1px solid rgba(179, 62, 102, 1);\n\n\t\t\t\t\t--green-background: linear-gradient(180deg, rgba(213, 249, 196, 0.33) 0%, rgba(213, 249, 196, 0.0825) 100%);\n\t\t\t\t\t--green-border: 1px solid rgba(61, 125, 31, 1);\n\n\t\t\t\t\t--yellow-background: linear-gradient(180deg, rgba(255, 236, 179, 0.33) 0%, rgba(255, 236, 179, 0.0825) 100%);\n\t\t\t\t\t--yellow-border: 1px solid rgba(181, 138, 45, 1);\n\n\t\t\t\t\t--blue-background: linear-gradient(180deg, rgba(189, 195, 255, 0.33) 0%, rgba(189, 195, 255, 0.0825) 100%);\n\t\t\t\t\t--blue-border: 1px solid rgba(54, 69, 217, 1);\n\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tz-index: 2000000000;\n\n\t\t\t\t\tbackground: var(--background);\n\t\t\t\t\tborder: var(--border);\n\t\t\t\t}\n\n\t\t\t\t.icon {\n\t\t\t\t\twidth: 24px;\n\t\t\t\t\theight: 24px;\n\t\t\t\t\tcolor: white;\n\t\t\t\t\tbackground: linear-gradient(0deg, #B33E66, #B33E66), linear-gradient(0deg, #351722, #351722);\n\t\t\t\t\tborder: 1px solid rgba(53, 23, 34, 1);\n\t\t\t\t\tborder-radius: 9999px;\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: -15px;\n\t\t\t\t\tright: -15px;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<style id=\"selected-style\"></style>\n\t\t`;\n\t}\n\tupdateStyle() {\n\t\tconst style = this.shadowRoot.querySelector(\"#selected-style\");\n\t\tif (style) {\n\t\t\tstyle.innerHTML = `\n\t\t\t:host {\n\t\t\t\t--background: var(--${this.highlightStyle}-background);\n\t\t\t\t--border: var(--${this.highlightStyle}-border);\n\t\t\t}`;\n\t\t}\n\t}\n\tattributeChangedCallback() {\n\t\tif (this.hasAttribute(\"highlight-style\")) this.highlightStyle = this.getAttribute(\"highlight-style\");\n\t}\n\tconnectedCallback() {\n\t\tthis.updateStyle();\n\t\tif (this.icon) {\n\t\t\tlet iconContainer = document.createElement(\"div\");\n\t\t\ticonContainer.classList.add(\"icon\");\n\t\t\tlet iconElement;\n\t\t\tif (isDefinedIcon(this.icon)) {\n\t\t\t\ticonElement = getIconElement(this.icon);\n\t\t\t} else {\n\t\t\t\ticonElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n\t\t\t\ticonElement.setAttribute(\"viewBox\", \"0 0 16 16\");\n\t\t\t\ticonElement.innerHTML = this.icon;\n\t\t\t}\n\t\t\tif (iconElement) {\n\t\t\t\ticonElement?.style.setProperty(\"width\", \"16px\");\n\t\t\t\ticonElement?.style.setProperty(\"height\", \"16px\");\n\t\t\t\ticonContainer.append(iconElement);\n\t\t\t\tthis.shadowRoot.append(iconContainer);\n\t\t\t}\n\t\t}\n\t}\n}\n","import { getIconElement, isDefinedIcon } from \"./icons.js\";\nexport class DevToolbarIcon extends HTMLElement {\n\t_icon = undefined;\n\tshadowRoot;\n\tget icon() {\n\t\treturn this._icon;\n\t}\n\tset icon(name) {\n\t\tthis._icon = name;\n\t\tthis.buildTemplate();\n\t}\n\tconstructor() {\n\t\tsuper();\n\t\tthis.shadowRoot = this.attachShadow({ mode: \"open\" });\n\t\tif (this.hasAttribute(\"icon\")) {\n\t\t\tthis.icon = this.getAttribute(\"icon\");\n\t\t} else {\n\t\t\tthis.buildTemplate();\n\t\t}\n\t}\n\tgetIconHTML(icon) {\n\t\tif (icon && isDefinedIcon(icon)) {\n\t\t\treturn getIconElement(icon)?.outerHTML ?? \"\";\n\t\t}\n\t\t// If the icon that was passed isn't one of the predefined one, assume that they're passing it in as a slot\n\t\treturn \"<slot />\";\n\t}\n\tbuildTemplate() {\n\t\tthis.shadowRoot.innerHTML = `\n\t\t\t<style>\n\t\t\t\tsvg {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t}\n\n\t\t\t\t@media (forced-colors: active) {\n\t\t\t\t\tsvg path[fill=\"#fff\"] {\n\t\t\t\t\t\tfill: black;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</style>\\n${this.getIconHTML(this._icon)}`;\n\t}\n}\n","const styles = [\n\t\"purple\",\n\t\"gray\",\n\t\"red\",\n\t\"green\",\n\t\"yellow\",\n\t\"blue\"\n];\nexport class DevToolbarRadioCheckbox extends HTMLElement {\n\t_radioStyle = \"purple\";\n\tinput;\n\tshadowRoot;\n\tget radioStyle() {\n\t\treturn this._radioStyle;\n\t}\n\tset radioStyle(value) {\n\t\tif (!styles.includes(value)) {\n\t\t\tconsole.error(`Invalid style: ${value}, expected one of ${styles.join(\", \")}.`);\n\t\t\treturn;\n\t\t}\n\t\tthis._radioStyle = value;\n\t\tthis.updateStyle();\n\t}\n\tstatic observedAttributes = [\n\t\t\"radio-style\",\n\t\t\"checked\",\n\t\t\"disabled\",\n\t\t\"name\",\n\t\t\"value\"\n\t];\n\tconstructor() {\n\t\tsuper();\n\t\tthis.shadowRoot = this.attachShadow({ mode: \"open\" });\n\t\tthis.shadowRoot.innerHTML = `\n\t\t<style>\n\t\t\t:host {\n\t\t\t\t--purple-unchecked: rgba(224, 204, 250, 0.33);\n\t\t\t\t--purple-checked: rgba(224, 204, 250, 1);\n\n\t\t\t\t--gray-unchecked: rgba(191, 193, 201, 0.33);\n\t\t\t\t--gray-checked: rgba(191, 193, 201, 1);\n\n\t\t\t\t--red-unchecked: rgba(249, 196, 215, 0.33);\n\t\t\t\t--red-checked: rgba(179, 62, 102, 1);\n\n\t\t\t\t--green-unchecked: rgba(213, 249, 196, 0.33);\n\t\t\t\t--green-checked: rgba(61, 125, 31, 1);\n\n\t\t\t\t--yellow-unchecked: rgba(255, 236, 179, 0.33);\n\t\t\t\t--yellow-checked: rgba(181, 138, 45, 1);\n\n\t\t\t\t--blue-unchecked: rgba(189, 195, 255, 0.33);\n\t\t\t\t--blue-checked: rgba(54, 69, 217, 1);\n\t\t\t}\n\n\t\t\tinput[type=\"radio\"] {\n\t\t\t\tappearance: none;\n\t\t\t\t-webkit-appearance: none;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-content: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\tborder: 2px solid var(--unchecked-color);\n\t\t\t\tborder-radius: 9999px;\n\t\t\t\twidth: 16px;\n\t\t\t\theight: 16px;\n\t\t\t}\n\n\t\t\tinput[type=\"radio\"]::before {\n\t\t\t\tcontent: \"\";\n\t\t\t\tbackground-color: var(--checked-color);\n\t\t\t\twidth: 8px;\n\t\t\t\theight: 8px;\n\t\t\t\tborder-radius: 9999px;\n\t\t\t\tvisibility: hidden;\n\t\t\t\tmargin: 2px;\n\t\t\t}\n\n\t\t\tinput[type=\"radio\"]:checked {\n\t\t\t\tborder-color: var(--checked-color);\n\t\t\t}\n\n\t\t\tinput[type=\"radio\"]:checked::before {\n\t\t\t\tvisibility: visible;\n\t\t\t}\n\t\t</style>\n\t\t<style id=\"selected-style\"></style>\n\t\t`;\n\t\tthis.input = document.createElement(\"input\");\n\t\tthis.input.type = \"radio\";\n\t\tthis.shadowRoot.append(this.input);\n\t}\n\tconnectedCallback() {\n\t\tthis.updateInputState();\n\t\tthis.updateStyle();\n\t}\n\tupdateStyle() {\n\t\tconst styleElement = this.shadowRoot.querySelector(\"#selected-style\");\n\t\tif (styleElement) {\n\t\t\tstyleElement.innerHTML = `\n\t\t\t\t:host {\n\t\t\t\t\t--unchecked-color: var(--${this._radioStyle}-unchecked);\n\t\t\t\t\t--checked-color: var(--${this._radioStyle}-checked);\n\t\t\t\t}\n\t\t\t`;\n\t\t}\n\t}\n\tupdateInputState() {\n\t\tthis.input.checked = this.hasAttribute(\"checked\");\n\t\tthis.input.disabled = this.hasAttribute(\"disabled\");\n\t\tthis.input.name = this.getAttribute(\"name\") || \"\";\n\t\tthis.input.value = this.getAttribute(\"value\") || \"\";\n\t}\n\tattributeChangedCallback() {\n\t\tif (this.hasAttribute(\"radio-style\")) {\n\t\t\tthis.radioStyle = this.getAttribute(\"radio-style\");\n\t\t}\n\t\tthis.updateInputState();\n\t}\n}\n","import { settings } from \"../settings.js\";\nconst styles = [\n\t\"purple\",\n\t\"gray\",\n\t\"red\",\n\t\"green\",\n\t\"yellow\",\n\t\"blue\"\n];\nexport class DevToolbarSelect extends HTMLElement {\n\tshadowRoot;\n\telement;\n\t_selectStyle = \"gray\";\n\tget selectStyle() {\n\t\treturn this._selectStyle;\n\t}\n\tset selectStyle(value) {\n\t\tif (!styles.includes(value)) {\n\t\t\tsettings.logger.error(`Invalid style: ${value}, expected one of ${styles.join(\", \")}.`);\n\t\t\treturn;\n\t\t}\n\t\tthis._selectStyle = value;\n\t\tthis.updateStyle();\n\t}\n\tstatic observedAttributes = [\"select-style\"];\n\tconstructor() {\n\t\tsuper();\n\t\tthis.shadowRoot = this.attachShadow({ mode: \"open\" });\n\t\tthis.shadowRoot.innerHTML = `\n <style>\n :host {\n --purple-text: rgba(224, 204, 250, 1);\n\t\t\t\t\t--purple-border: rgba(113, 24, 226, 1);\n\n --gray-text: rgba(191, 193, 201, 1);\n\t\t\t\t\t--gray-border:rgba(191, 193, 201, 1);\n\n\t\t\t\t\t--red-text: rgba(249, 196, 215, 1);\n\t\t\t\t\t--red-border: rgba(179, 62, 102, 1);\n\n\t\t\t\t\t--green-text: rgba(213, 249, 196, 1);\n\t\t\t\t\t--green-border: rgba(61, 125, 31, 1);\n\n\t\t\t\t\t--yellow-text: rgba(249, 233, 196, 1);\n\t\t\t\t\t--yellow-border: rgba(181, 138, 45, 1);\n\n\t\t\t\t\t--blue-text: rgba(189, 195, 255, 1);\n\t\t\t\t\t--blue-border: rgba(54, 69, 217, 1);\n\n --text-color: var(--gray-text);\n --border-color: var(--gray-border);\n }\n select {\n appearance: none;\n text-align-last: center;\n display: inline-block;\n font-family: system-ui, sans-serif;\n font-size: 14px;\n padding: 4px 24px 4px 8px;\n border: 1px solid var(--border-color);\n border-radius: 4px;\n color: var(--text-color);\n background-color: transparent;\n background-image:\n linear-gradient(45deg, transparent 50%, var(--text-color) 50%),\n linear-gradient(135deg, var(--text-color) 50%, transparent 50%);\n background-position:\n calc(100% - 12px) calc(1em - 2px),\n calc(100% - 8px) calc(1em - 2px);\n background-size: 4px 4px;\n background-repeat: no-repeat;\n }\n </style>\n <style id=\"selected-style\"></style>\n <slot></slot>\n `;\n\t\tthis.element = document.createElement(\"select\");\n\t\tthis.shadowRoot.addEventListener(\"slotchange\", (event) => {\n\t\t\tif (event.target instanceof HTMLSlotElement) {\n\t\t\t\t// Manually add slotted elements to <select> because it only accepts <option> as children and escapes other elements including <slot>\n\t\t\t\tthis.element.append(...event.target.assignedNodes());\n\t\t\t}\n\t\t});\n\t}\n\tconnectedCallback() {\n\t\tthis.element.name = \"dev-toolbar-select\";\n\t\tthis.shadowRoot.append(this.element);\n\t\tthis.updateStyle();\n\t}\n\tattributeChangedCallback() {\n\t\tif (this.hasAttribute(\"select-style\")) {\n\t\t\tthis.selectStyle = this.getAttribute(\"select-style\");\n\t\t}\n\t}\n\tupdateStyle() {\n\t\tconst style = this.shadowRoot.querySelector(\"#selected-style\");\n\t\tif (style) {\n\t\t\tstyle.innerHTML = `\n :host {\n --text-color: var(--${this.selectStyle}-text);\n --border-color: var(--${this.selectStyle}-border);\n }\n `;\n\t\t}\n\t}\n}\n","import { settings } from \"../settings.js\";\nconst styles = [\n\t\"purple\",\n\t\"gray\",\n\t\"red\",\n\t\"green\",\n\t\"yellow\",\n\t\"blue\"\n];\nexport class DevToolbarToggle extends HTMLElement {\n\tshadowRoot;\n\tinput;\n\t_toggleStyle = \"gray\";\n\tget toggleStyle() {\n\t\treturn this._toggleStyle;\n\t}\n\tset toggleStyle(value) {\n\t\tif (!styles.includes(value)) {\n\t\t\tsettings.logger.error(`Invalid style: ${value}, expected one of ${styles.join(\", \")}.`);\n\t\t\treturn;\n\t\t}\n\t\tthis._toggleStyle = value;\n\t\tthis.updateStyle();\n\t}\n\tstatic observedAttributes = [\"toggle-style\"];\n\tconstructor() {\n\t\tsuper();\n\t\tthis.shadowRoot = this.attachShadow({ mode: \"open\" });\n\t\tthis.shadowRoot.innerHTML = `\n\t\t<style>\n\t\t\t:host {\n\t\t\t\t--purple-bg-on: rgba(113, 24, 226, 1);\n\t\t\t\t--purple-border-off: rgba(113, 24, 226, 1);\n\t\t\t\t--purple-border-on: rgba(224, 204, 250, 1);\n\n\t\t\t\t--gray-bg-on: rgba(61, 125, 31, 1);\n\t\t\t\t--gray-border-off: rgba(145, 152, 173, 1);\n\t\t\t\t--gray-border-on: rgba(213, 249, 196, 1);\n\n\t\t\t\t--red-bg-on: rgba(179, 62, 102, 1);\n\t\t\t\t--red-border-off: rgba(179, 62, 102, 1);\n\t\t\t\t--red-border-on: rgba(249, 196, 215, 1);\n\n\t\t\t\t--green-bg-on: rgba(61, 125, 31, 1);\n\t\t\t\t--green-border-off: rgba(61, 125, 31, 1);\n\t\t\t\t--green-border-on: rgba(213, 249, 196, 1);\n\n\t\t\t\t--yellow-bg-on: rgba(181, 138, 45, 1);\n\t\t\t\t--yellow-border-off: rgba(181, 138, 45, 1);\n\t\t\t\t--yellow-border-on: rgba(255, 236, 179, 1);\n\n\t\t\t\t--blue-bg-on: rgba(54, 69, 217, 1);\n\t\t\t\t--blue-border-off: rgba(54, 69, 217, 1);\n\t\t\t\t--blue-border-on: rgba(189, 195, 255, 1);\n\t\t\t}\n\n\t\t\tinput {\n\t\t\t\tappearance: none;\n\t\t\t\twidth: 32px;\n\t\t\t\theight: 20px;\n\t\t\t\tborder: 1px solid var(--border-off);\n\t\t\t\ttransition: background-color 0.2s ease, border-color 0.2s ease;\n\t\t\t\tborder-radius: 9999px;\n\t\t\t}\n\n\t\t\tinput::after {\n\t\t\t\tcontent: '';\n\t\t\t\twidth: 16px;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\theight: 16px;\n\t\t\t\tbackground-color: var(--border-off);\n\t\t\t\tborder-radius: 9999px;\n\t\t\t\ttransition: transform 0.2s ease, background-color 0.2s ease;\n\t\t\t\ttop: 1px;\n\t\t\t\tleft: 1px;\n\t\t\t\tposition: relative;\n\t\t\t}\n\n\t\t\t@media (forced-colors: active) {\n\t\t\t\tinput::after {\n\t\t\t\t\tborder: 1px solid black;\n\t\t\t\t\ttop: 0px;\n\t\t\t\t\tleft: 0px;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tinput:checked {\n\t\t\t\tborder: 1px solid var(--border-on);\n\t\t\t\tbackground-color: var(--bg-on);\n\t\t\t}\n\n\t\t\tinput:checked::after {\n\t\t\t\ttransform: translateX(12px);\n\t\t\t\tbackground: var(--border-on);\n\t\t\t}\n\t\t</style>\n\t\t<style id=\"selected-style\"></style>\n\t\t`;\n\t\tthis.input = document.createElement(\"input\");\n\t}\n\tattributeChangedCallback() {\n\t\tif (this.hasAttribute(\"toggle-style\")) this.toggleStyle = this.getAttribute(\"toggle-style\");\n\t}\n\tupdateStyle() {\n\t\tconst style = this.shadowRoot.querySelector(\"#selected-style\");\n\t\tif (style) {\n\t\t\tstyle.innerHTML = `\n\t\t\t:host {\n\t\t\t\t--bg-on: var(--${this.toggleStyle}-bg-on);\n\t\t\t\t--border-off: var(--${this.toggleStyle}-border-off);\n\t\t\t\t--border-on: var(--${this.toggleStyle}-border-on);\n\t\t\t}\n\t\t`;\n\t\t}\n\t}\n\tconnectedCallback() {\n\t\tthis.input.type = \"checkbox\";\n\t\tthis.input.name = \"dev-toolbar-toggle\";\n\t\tthis.shadowRoot.append(this.input);\n\t\tthis.updateStyle();\n\t}\n\tget value() {\n\t\treturn this.input.value;\n\t}\n\tset value(val) {\n\t\tthis.input.value = val;\n\t}\n}\n","import { getIconElement, isDefinedIcon } from \"./icons.js\";\nexport class DevToolbarTooltip extends HTMLElement {\n\tsections = [];\n\tshadowRoot;\n\tconstructor() {\n\t\tsuper();\n\t\tthis.shadowRoot = this.attachShadow({ mode: \"open\" });\n\t}\n\tconnectedCallback() {\n\t\tthis.shadowRoot.innerHTML = `\n\t\t\t<style>\n\t\t\t:host {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t\tcolor: white;\n\t\t\t\tbackground: linear-gradient(0deg, #310A65, #310A65), linear-gradient(0deg, #7118E2, #7118E2);\n\t\t\t\tborder: 1px solid rgba(113, 24, 226, 1);\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: 0;\n\t\t\t\tfont-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n\t\t\t\tfont-size: 14px;\n\t\t\t\tmargin: 0;\n\t\t\t\tz-index: 2000000001;\n\t\t\t\tmax-width: 45ch;\n\t\t\t\twidth: fit-content;\n\t\t\t\tmin-width: 30ch;\n\t\t\t\tbox-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.30), 0px 1px 2px 0px rgba(0, 0, 0, 0.29), 0px 4px 4px 0px rgba(0, 0, 0, 0.26), 0px 10px 6px 0px rgba(0, 0, 0, 0.15), 0px 17px 7px 0px rgba(0, 0, 0, 0.04), 0px 26px 7px 0px rgba(0, 0, 0, 0.01);\n\t\t\t}\n\n\t\t\t:host([data-show=\"true\"]) {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\tsvg {\n\t\t\t\tvertical-align: bottom;\n\t\t\t\tmargin-inline-end: 4px;\n\t\t\t}\n\n\t\t\thr {\n\t\t\t\tborder: 1px solid rgba(136, 58, 234, 0.33);\n\t\t\t\tpadding: 0;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\tsection {\n\t\t\t\tpadding: 8px;\n\t\t\t}\n\n\t\t\t.section-content {\n\t\t\t\tmax-height: 250px;\n \t\toverflow-y: auto;\n\t\t\t}\n\n\t\t\t.modal-title {\n\t\t\t\tdisplay: flex;\n\t\t\t\tjustify-content: space-between;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.modal-main-title {\n\t\t\t\tfont-weight: bold;\n\t\t\t}\n\n\t\t\t.modal-title + div {\n\t\t\t\tmargin-top: 8px;\n\t\t\t}\n\n\t\t\t.modal-cta {\n\t\t\t\tdisplay: block;\n\t\t\t\tfont-weight: bold;\n\t\t\t\tfont-size: 0.9em;\n\t\t\t}\n\n\t\t\t.clickable-section {\n\t\t\t\tbackground: rgba(113, 24, 226, 1);\n\t\t\t\tpadding: 8px;\n\t\t\t\tborder: 0;\n\t\t\t\tcolor: white;\n\t\t\t\tfont-family: system-ui, sans-serif;\n\t\t\t\ttext-align: left;\n\t\t\t\tline-height: 1.2;\n\t\t\t\twhite-space: nowrap;\n\t\t\t\ttext-decoration: none;\n\t\t\t\tmargin: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.clickable-section:hover {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\tpre, code {\n\t\t\t\tbackground: rgb(78, 27, 145);\n\t\t\t\tfont-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tfont-size: 14px;\n\t\t\t\tpadding: 2px;\n\t\t\t}\n\t\t\tpre {\n\t\t\t\tpadding: 1em;\n\t\t\t\tmargin: 0 0;\n\t\t\t\toverflow: auto;\n\t\t\t}\n\t\t\t`;\n\t\tconst fragment = new DocumentFragment();\n\t\tthis.sections.forEach((section, index) => {\n\t\t\tconst sectionElement = section.clickAction ? document.createElement(\"button\") : document.createElement(\"section\");\n\t\t\tif (section.clickAction) {\n\t\t\t\tsectionElement.classList.add(\"clickable-section\");\n\t\t\t\tsectionElement.addEventListener(\"click\", async () => {\n\t\t\t\t\tawait section.clickAction();\n\t\t\t\t});\n\t\t\t}\n\t\t\tsectionElement.innerHTML = `\n\t\t\t\t${section.title ? `<div class=\"modal-title\"><span class=\"modal-main-title\">\n\t\t\t\t\t\t${section.icon ? this.getElementForIcon(section.icon) : \"\"}${section.title}</span>${section.inlineTitle ?? \"\"}</div>` : \"\"}\n\t\t\t\t${section.content ? `<div class=\"section-content\">${section.content}</div>` : \"\"}\n\t\t\t\t${section.clickDescription ? `<span class=\"modal-cta\">${section.clickDescription}</span>` : \"\"}\n\t\t\t`;\n\t\t\tfragment.append(sectionElement);\n\t\t\tif (index < this.sections.length - 1) {\n\t\t\t\tfragment.append(document.createElement(\"hr\"));\n\t\t\t}\n\t\t});\n\t\tthis.shadowRoot.append(fragment);\n\t}\n\tgetElementForIcon(icon) {\n\t\tlet iconElement;\n\t\tif (isDefinedIcon(icon)) {\n\t\t\ticonElement = getIconElement(icon);\n\t\t} else {\n\t\t\ticonElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n\t\t\ticonElement.setAttribute(\"viewBox\", \"0 0 16 16\");\n\t\t\ticonElement.innerHTML = icon;\n\t\t}\n\t\ticonElement?.style.setProperty(\"width\", \"16px\");\n\t\ticonElement?.style.setProperty(\"height\", \"16px\");\n\t\treturn iconElement?.outerHTML ?? \"\";\n\t}\n}\n"],"ignoreList":[0,1,2,3,4,5,6,7,8],"mappings":";;;AACA,IAAMA,UAAQ,CAAC,SAAS,OAAO;AAC/B,IAAMC,WAAS;CACd;CACA;CACA;CACA;CACA;CACA;AACD;AACA,IAAa,kBAAb,cAAqC,YAAY;CAChD,QAAQ;CACR,cAAc;CACd,IAAI,OAAO;EACV,OAAO,KAAK;CACb;CACA,IAAI,KAAK,OAAO;EACf,IAAI,CAACD,QAAM,SAAS,KAAK,GAAG;GAC3B,SAAS,OAAO,MAAM,iBAAiB,MAAM,oBAAoBA,QAAM,KAAK,IAAI,EAAE,QAAQ,MAAM,EAAE;GAClG;EACD;EACA,KAAK,QAAQ;EACb,KAAK,YAAY;CAClB;CACA,IAAI,aAAa;EAChB,OAAO,KAAK;CACb;CACA,IAAI,WAAW,OAAO;EACrB,IAAI,CAACC,SAAO,SAAS,KAAK,GAAG;GAC5B,SAAS,OAAO,MAAM,kBAAkB,MAAM,oBAAoBA,SAAO,KAAK,IAAI,EAAE,QAAQ,MAAM,EAAE;GACpG;EACD;EACA,KAAK,cAAc;EACnB,KAAK,YAAY;CAClB;CACA;CACA,OAAO,qBAAqB,CAAC,eAAe,MAAM;CAClD,cAAc;EACb,MAAM;EACN,KAAK,aAAa,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;EACpD,KAAK,WAAW,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4C7B;CACA,oBAAoB;EACnB,KAAK,YAAY;CAClB;CACA,2BAA2B;EAC1B,IAAI,KAAK,aAAa,a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Ac,SAAS;GAChH,IAAI,QAAQ,aAAa;IACxB,eAAe,UAAU,IAAI,mBAAmB;IAChD,eAAe,iBAAiB,SAAS,YAAY;KACpD,MAAM,QAAQ,YAAY;IAC3B,CAAC;GACF;GACA,eAAe,YAAY;MACxB,QAAQ,QAAQ;QACd,QAAQ,OAAO,KAAK,kBAAkB,QAAQ,IAAI,IAAI,KAAK,QAAQ,MAAM,SAAS,QAAQ,eAAe,GAAG,UAAU,GAAG;MAC3H,QAAQ,UAAU,gCAAgC,QAAQ,QAAQ,UAAU,GAAG;MAC/E,QAAQ,mBAAmB,2BAA2B,QAAQ,iBAAiB,WAAW,GAAG;;GAEhG,SAAS,OAAO,cAAc;GAC9B,IAAI,QAAQ,KAAK,SAAS,SAAS,GAClC,SAAS,OAAO,SAAS,cAAc,IAAI,CAAC;EAE9C,CAAC;EACD,KAAK,WAAW,OAAO,QAAQ;CAChC;CACA,kBAAkB,MAAM;EACvB,IAAI;EACJ,IAAI,cAAc,IAAI,GACrB,cAAc,eAAe,IAAI;OAC3B;GACN,cAAc,SAAS,gBAAgB,8BAA8B,KAAK;GAC1E,YAAY,aAAa,WAAW,WAAW;GAC/C,YAAY,YAAY;EACzB;EACA,aAAa,MAAM,YAAY,SAAS,MAAM;EAC9C,aAAa,MAAM,YAAY,UAAU,MAAM;EAC/C,OAAO,aAAa,aAAa;CAClC;AACD"}
@@ -0,0 +1,32 @@
1
+ import { t as settings } from "./astro_runtime_client_dev-toolbar_entrypoint__js.js";
2
+ //#region ../../../node_modules/astro/dist/runtime/client/dev-toolbar/apps/utils/window.js
3
+ function createWindowElement(content, placement = settings.config.placement) {
4
+ const windowElement = document.createElement("astro-dev-toolbar-window");
5
+ windowElement.innerHTML = content;
6
+ windowElement.placement = placement;
7
+ return windowElement;
8
+ }
9
+ function closeOnOutsideClick(eventTarget, additionalCheck) {
10
+ function onPageClick(event) {
11
+ const target = event.target;
12
+ if (!target) return;
13
+ if (!target.closest) return;
14
+ if (target.closest("astro-dev-toolbar")) return;
15
+ if (additionalCheck && additionalCheck(target)) return;
16
+ eventTarget.dispatchEvent(new CustomEvent("toggle-app", { detail: { state: false } }));
17
+ }
18
+ eventTarget.addEventListener("app-toggled", (event) => {
19
+ if (event.detail.state === true) document.addEventListener("click", onPageClick, true);
20
+ else document.removeEventListener("click", onPageClick, true);
21
+ });
22
+ }
23
+ function synchronizePlacementOnUpdate(eventTarget, canvas) {
24
+ eventTarget.addEventListener("placement-updated", (evt) => {
25
+ if (!(evt instanceof CustomEvent)) return;
26
+ const windowElement = canvas.querySelector("astro-dev-toolbar-window");
27
+ if (!windowElement) return;
28
+ windowElement.placement = evt.detail.placement;
29
+ });
30
+ }
31
+ //#endregion
32
+ export { createWindowElement as n, synchronizePlacementOnUpdate as r, closeOnOutsideClick as t };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"window-vo3A6TMn.js","names":["event"],"sources":["../../../../../../node_modules/astro/dist/runtime/client/dev-toolbar/apps/utils/window.js"],"sourcesContent":["import { settings } from \"../../settings.js\";\nexport function createWindowElement(content, placement = settings.config.placement) {\n\tconst windowElement = document.createElement(\"astro-dev-toolbar-window\");\n\twindowElement.innerHTML = content;\n\twindowElement.placement = placement;\n\treturn windowElement;\n}\nexport function closeOnOutsideClick(eventTarget, additionalCheck) {\n\tfunction onPageClick(event) {\n\t\tconst target = event.target;\n\t\tif (!target) return;\n\t\tif (!target.closest) return;\n\t\tif (target.closest(\"astro-dev-toolbar\")) return;\n\t\tif (additionalCheck && additionalCheck(target)) return;\n\t\teventTarget.dispatchEvent(new CustomEvent(\"toggle-app\", { detail: { state: false } }));\n\t}\n\teventTarget.addEventListener(\"app-toggled\", (event) => {\n\t\tif (event.detail.state === true) {\n\t\t\tdocument.addEventListener(\"click\", onPageClick, true);\n\t\t} else {\n\t\t\tdocument.removeEventListener(\"click\", onPageClick, true);\n\t\t}\n\t});\n}\nexport function synchronizePlacementOnUpdate(eventTarget, canvas) {\n\teventTarget.addEventListener(\"placement-updated\", (evt) => {\n\t\tif (!(evt instanceof CustomEvent)) {\n\t\t\treturn;\n\t\t}\n\t\tconst windowElement = canvas.querySelector(\"astro-dev-toolbar-window\");\n\t\tif (!windowElement) {\n\t\t\treturn;\n\t\t}\n\t\tconst event = evt;\n\t\twindowElement.placement = event.detail.placement;\n\t});\n}\n"],"ignoreList":[0],"mappings":";;AACA,SAAgB,oBAAoB,SAAS,YAAY,SAAS,OAAO,WAAW;CACnF,MAAM,gBAAgB,SAAS,cAAc,0BAA0B;CACvE,cAAc,YAAY;CAC1B,cAAc,YAAY;CAC1B,OAAO;AACR;AACA,SAAgB,oBAAoB,aAAa,iBAAiB;CACjE,SAAS,YAAY,OAAO;EAC3B,MAAM,SAAS,MAAM;EACrB,IAAI,CAAC,QAAQ;EACb,IAAI,CAAC,OAAO,SAAS;EACrB,IAAI,OAAO,QAAQ,mBAAmB,GAAG;EACzC,IAAI,mBAAmB,gBAAgB,MAAM,GAAG;EAChD,YAAY,cAAc,IAAI,YAAY,cAAc,EAAE,QAAQ,EAAE,OAAO,MAAM,EAAE,CAAC,CAAC;CACtF;CACA,YAAY,iBAAiB,gBAAgB,UAAU;EACtD,IAAI,MAAM,OAAO,UAAU,MAC1B,SAAS,iBAAiB,SAAS,aAAa,IAAI;OAEpD,SAAS,oBAAoB,SAAS,aAAa,IAAI;CAEzD,CAAC;AACF;AACA,SAAgB,6BAA6B,aAAa,QAAQ;CACjE,YAAY,iBAAiB,sBAAsB,QAAQ;EAC1D,IAAI,EAAE,eAAe,cACpB;EAED,MAAM,gBAAgB,OAAO,cAAc,0BAA0B;EACrE,IAAI,CAAC,eACJ;EAGD,cAAc,YAAYA,IAAM,OAAO;CACxC,CAAC;AACF"}
@@ -0,0 +1,112 @@
1
+ import { escape } from "./astro_n_html-escaper.js";
2
+ import { n as createWindowElement, r as synchronizePlacementOnUpdate, t as closeOnOutsideClick } from "./window-vo3A6TMn.js";
3
+ import { i as positionHighlight, n as createHighlight, r as getElementsPositionInDocument, t as attachTooltipToHighlight } from "./highlight-BLtvqtzO.js";
4
+ var xray_default = {
5
+ id: "astro:xray",
6
+ name: "Inspect",
7
+ icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path fill=\"#fff\" d=\"M7.9 1.5v-.4a1.1 1.1 0 0 1 2.2 0v.4a1.1 1.1 0 1 1-2.2 0Zm-6.4 8.6a1.1 1.1 0 1 0 0-2.2h-.4a1.1 1.1 0 0 0 0 2.2h.4ZM12 3.7a1.1 1.1 0 0 0 1.4-.7l.4-1.1a1.1 1.1 0 0 0-2.1-.8l-.4 1.2a1.1 1.1 0 0 0 .7 1.4Zm-9.7 7.6-1.2.4a1.1 1.1 0 1 0 .8 2.1l1-.4a1.1 1.1 0 1 0-.6-2ZM20.8 17a1.9 1.9 0 0 1 0 2.6l-1.2 1.2a1.9 1.9 0 0 1-2.6 0l-4.3-4.2-1.6 3.6a1.9 1.9 0 0 1-1.7 1.2A1.9 1.9 0 0 1 7.5 20L2.7 5a1.9 1.9 0 0 1 2.4-2.4l15 5a1.9 1.9 0 0 1 .2 3.4l-3.7 1.6 4.2 4.3ZM19 18.3 14.6 14a1.9 1.9 0 0 1 .6-3l3.2-1.5L5.1 5.1l4.3 13.3 1.5-3.2a1.9 1.9 0 0 1 3-.6l4.4 4.4.7-.7Z\"/></svg>",
8
+ init(canvas, eventTarget) {
9
+ let islandsOverlays = [];
10
+ addIslandsOverlay();
11
+ document.addEventListener("astro:after-swap", addIslandsOverlay);
12
+ document.addEventListener("astro:page-load", refreshIslandsOverlayPositions);
13
+ closeOnOutsideClick(eventTarget);
14
+ synchronizePlacementOnUpdate(eventTarget, canvas);
15
+ function addIslandsOverlay() {
16
+ islandsOverlays.forEach(({ highlightElement }) => {
17
+ highlightElement.remove();
18
+ });
19
+ islandsOverlays = [];
20
+ const islands = document.querySelectorAll("astro-island");
21
+ if (islands.length === 0) {
22
+ const window = createWindowElement(`<style>
23
+ header {
24
+ display: flex;
25
+ }
26
+
27
+ h1 {
28
+ display: flex;
29
+ align-items: center;
30
+ gap: 8px;
31
+ font-weight: 600;
32
+ color: #fff;
33
+ margin: 0;
34
+ font-size: 22px;
35
+ }
36
+
37
+ astro-dev-toolbar-icon {
38
+ width: 1em;
39
+ height: 1em;
40
+ padding: 8px;
41
+ display: block;
42
+ background: #5f9ea0;
43
+ border-radius: 9999px;
44
+ }
45
+ </style>
46
+ <header>
47
+ <h1><astro-dev-toolbar-icon icon="lightbulb"></astro-dev-toolbar-icon>No islands detected.</h1>
48
+ </header>
49
+ <p>
50
+ It looks like there are no interactive component islands on this page. Did you forget to add a client directive to your interactive UI component?
51
+ </p>
52
+ `);
53
+ canvas.append(window);
54
+ return;
55
+ }
56
+ islands.forEach((island) => {
57
+ const computedStyle = window.getComputedStyle(island);
58
+ const islandElement = island.children[0] || island;
59
+ if (islandElement.offsetParent === null || computedStyle.display === "none") return;
60
+ const rect = islandElement.getBoundingClientRect();
61
+ const highlight = createHighlight(rect);
62
+ const tooltip = buildIslandTooltip(island);
63
+ const { isFixed } = getElementsPositionInDocument(islandElement);
64
+ if (isFixed) tooltip.style.position = highlight.style.position = "fixed";
65
+ attachTooltipToHighlight(highlight, tooltip, islandElement);
66
+ canvas.append(highlight);
67
+ islandsOverlays.push({
68
+ highlightElement: highlight,
69
+ island: islandElement
70
+ });
71
+ });
72
+ ["scroll", "resize"].forEach((event) => {
73
+ window.addEventListener(event, refreshIslandsOverlayPositions);
74
+ });
75
+ }
76
+ function refreshIslandsOverlayPositions() {
77
+ islandsOverlays.forEach(({ highlightElement, island: islandElement }) => {
78
+ const rect = islandElement.getBoundingClientRect();
79
+ positionHighlight(highlightElement, rect);
80
+ });
81
+ }
82
+ function buildIslandTooltip(island) {
83
+ const tooltip = document.createElement("astro-dev-toolbar-tooltip");
84
+ tooltip.sections = [];
85
+ const islandProps = island.getAttribute("props") ? JSON.parse(island.getAttribute("props")) : {};
86
+ const islandClientDirective = island.getAttribute("client");
87
+ if (islandClientDirective) tooltip.sections.push({
88
+ title: "Client directive",
89
+ inlineTitle: `<code>client:${islandClientDirective}</code>`
90
+ });
91
+ const islandPropsEntries = Object.entries(islandProps).filter((prop) => !prop[0].startsWith("data-astro-cid-"));
92
+ if (islandPropsEntries.length > 0) {
93
+ const stringifiedProps = JSON.stringify(Object.fromEntries(islandPropsEntries.map((prop) => [prop[0], prop[1][1]])), void 0, 2);
94
+ tooltip.sections.push({
95
+ title: "Props",
96
+ content: `<pre><code>${escape(stringifiedProps)}</code></pre>`
97
+ });
98
+ }
99
+ const islandComponentPath = island.getAttribute("component-url");
100
+ if (islandComponentPath) tooltip.sections.push({
101
+ content: islandComponentPath,
102
+ clickDescription: "Click to go to file",
103
+ async clickAction() {
104
+ await fetch("/__open-in-editor?file=" + encodeURIComponent(window.__astro_dev_toolbar__.root + islandComponentPath.slice(1)));
105
+ }
106
+ });
107
+ return tooltip;
108
+ }
109
+ }
110
+ };
111
+ //#endregion
112
+ export { xray_default as default };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xray-Lf9x6g8P.js","names":["escapeHTML"],"sources":["../../../../../../node_modules/astro/dist/runtime/client/dev-toolbar/apps/xray.js"],"sourcesContent":["import { escape as escapeHTML } from \"html-escaper\";\nimport { attachTooltipToHighlight, createHighlight, getElementsPositionInDocument, positionHighlight } from \"./utils/highlight.js\";\nimport { closeOnOutsideClick, createWindowElement, synchronizePlacementOnUpdate } from \"./utils/window.js\";\nconst icon = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"none\\\" viewBox=\\\"0 0 24 24\\\" aria-hidden=\\\"true\\\"><path fill=\\\"#fff\\\" d=\\\"M7.9 1.5v-.4a1.1 1.1 0 0 1 2.2 0v.4a1.1 1.1 0 1 1-2.2 0Zm-6.4 8.6a1.1 1.1 0 1 0 0-2.2h-.4a1.1 1.1 0 0 0 0 2.2h.4ZM12 3.7a1.1 1.1 0 0 0 1.4-.7l.4-1.1a1.1 1.1 0 0 0-2.1-.8l-.4 1.2a1.1 1.1 0 0 0 .7 1.4Zm-9.7 7.6-1.2.4a1.1 1.1 0 1 0 .8 2.1l1-.4a1.1 1.1 0 1 0-.6-2ZM20.8 17a1.9 1.9 0 0 1 0 2.6l-1.2 1.2a1.9 1.9 0 0 1-2.6 0l-4.3-4.2-1.6 3.6a1.9 1.9 0 0 1-1.7 1.2A1.9 1.9 0 0 1 7.5 20L2.7 5a1.9 1.9 0 0 1 2.4-2.4l15 5a1.9 1.9 0 0 1 .2 3.4l-3.7 1.6 4.2 4.3ZM19 18.3 14.6 14a1.9 1.9 0 0 1 .6-3l3.2-1.5L5.1 5.1l4.3 13.3 1.5-3.2a1.9 1.9 0 0 1 3-.6l4.4 4.4.7-.7Z\\\"/></svg>\";\nexport default {\n\tid: \"astro:xray\",\n\tname: \"Inspect\",\n\ticon,\n\tinit(canvas, eventTarget) {\n\t\tlet islandsOverlays = [];\n\t\taddIslandsOverlay();\n\t\tdocument.addEventListener(\"astro:after-swap\", addIslandsOverlay);\n\t\tdocument.addEventListener(\"astro:page-load\", refreshIslandsOverlayPositions);\n\t\tcloseOnOutsideClick(eventTarget);\n\t\tsynchronizePlacementOnUpdate(eventTarget, canvas);\n\t\tfunction addIslandsOverlay() {\n\t\t\tislandsOverlays.forEach(({ highlightElement }) => {\n\t\t\t\thighlightElement.remove();\n\t\t\t});\n\t\t\tislandsOverlays = [];\n\t\t\tconst islands = document.querySelectorAll(\"astro-island\");\n\t\t\tif (islands.length === 0) {\n\t\t\t\tconst window = createWindowElement(`<style>\n\t\t\t\t\t\theader {\n\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\th1 {\n\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\t\tgap: 8px;\n\t\t\t\t\t\t\tfont-weight: 600;\n\t\t\t\t\t\t\tcolor: #fff;\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\tfont-size: 22px;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tastro-dev-toolbar-icon {\n\t\t\t\t\t\t\twidth: 1em;\n\t\t\t\t\t\t height: 1em;\n\t\t\t\t\t\t padding: 8px;\n\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\tbackground: #5f9ea0;\n\t\t\t\t\t\t\tborder-radius: 9999px;\n\t\t\t\t\t\t}\n\t\t\t\t\t</style>\n\t\t\t\t\t<header>\n\t\t\t\t\t\t<h1><astro-dev-toolbar-icon icon=\"lightbulb\"></astro-dev-toolbar-icon>No islands detected.</h1>\n\t\t\t\t\t</header>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tIt looks like there are no interactive component islands on this page. Did you forget to add a client directive to your interactive UI component?\n\t\t\t\t\t</p>\n\t\t\t\t\t`);\n\t\t\t\tcanvas.append(window);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tislands.forEach((island) => {\n\t\t\t\tconst computedStyle = window.getComputedStyle(island);\n\t\t\t\tconst islandElement = island.children[0] || island;\n\t\t\t\t// If the island is hidden, don't show an overlay on it\n\t\t\t\t// TODO: For `client:only` islands, it might not have finished loading yet, so we should wait for that\n\t\t\t\tif (islandElement.offsetParent === null || computedStyle.display === \"none\") {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst rect = islandElement.getBoundingClientRect();\n\t\t\t\tconst highlight = createHighlight(rect);\n\t\t\t\tconst tooltip = buildIslandTooltip(island);\n\t\t\t\t// Set the highlight/tooltip as being fixed position the highlighted element\n\t\t\t\t// is fixed. We do this so that we don't mistakenly take scroll position\n\t\t\t\t// into account when setting the tooltip/highlight positioning.\n\t\t\t\t//\n\t\t\t\t// We only do this once due to how expensive computed styles are to calculate,\n\t\t\t\t// and are unlikely to change. If that turns out to be wrong, reconsider this.\n\t\t\t\tconst { isFixed } = getElementsPositionInDocument(islandElement);\n\t\t\t\tif (isFixed) {\n\t\t\t\t\ttooltip.style.position = highlight.style.position = \"fixed\";\n\t\t\t\t}\n\t\t\t\tattachTooltipToHighlight(highlight, tooltip, islandElement);\n\t\t\t\tcanvas.append(highlight);\n\t\t\t\tislandsOverlays.push({\n\t\t\t\t\thighlightElement: highlight,\n\t\t\t\t\tisland: islandElement\n\t\t\t\t});\n\t\t\t});\n\t\t\t[\"scroll\", \"resize\"].forEach((event) => {\n\t\t\t\twindow.addEventListener(event, refreshIslandsOverlayPositions);\n\t\t\t});\n\t\t}\n\t\tfunction refreshIslandsOverlayPositions() {\n\t\t\tislandsOverlays.forEach(({ highlightElement, island: islandElement }) => {\n\t\t\t\tconst rect = islandElement.getBoundingClientRect();\n\t\t\t\tpositionHighlight(highlightElement, rect);\n\t\t\t});\n\t\t}\n\t\tfunction buildIslandTooltip(island) {\n\t\t\tconst tooltip = document.createElement(\"astro-dev-toolbar-tooltip\");\n\t\t\ttooltip.sections = [];\n\t\t\tconst islandProps = island.getAttribute(\"props\") ? JSON.parse(island.getAttribute(\"props\")) : {};\n\t\t\tconst islandClientDirective = island.getAttribute(\"client\");\n\t\t\t// Add the component client's directive if we have one\n\t\t\tif (islandClientDirective) {\n\t\t\t\ttooltip.sections.push({\n\t\t\t\t\ttitle: \"Client directive\",\n\t\t\t\t\tinlineTitle: `<code>client:${islandClientDirective}</code>`\n\t\t\t\t});\n\t\t\t}\n\t\t\t// Display the props if we have any\n\t\t\t// Ignore the \"data-astro-cid-XXXXXX\" prop (internal)\n\t\t\tconst islandPropsEntries = Object.entries(islandProps).filter((prop) => !prop[0].startsWith(\"data-astro-cid-\"));\n\t\t\tif (islandPropsEntries.length > 0) {\n\t\t\t\tconst stringifiedProps = JSON.stringify(Object.fromEntries(islandPropsEntries.map((prop) => [prop[0], prop[1][1]])), undefined, 2);\n\t\t\t\ttooltip.sections.push({\n\t\t\t\t\ttitle: \"Props\",\n\t\t\t\t\tcontent: `<pre><code>${escapeHTML(stringifiedProps)}</code></pre>`\n\t\t\t\t});\n\t\t\t}\n\t\t\t// Add a click action to go to the file\n\t\t\tconst islandComponentPath = island.getAttribute(\"component-url\");\n\t\t\tif (islandComponentPath) {\n\t\t\t\ttooltip.sections.push({\n\t\t\t\t\tcontent: islandComponentPath,\n\t\t\t\t\tclickDescription: \"Click to go to file\",\n\t\t\t\t\tasync clickAction() {\n\t\t\t\t\t\t// NOTE: The path here has to be absolute and without any errors (no double slashes etc)\n\t\t\t\t\t\t// or Vite will silently fail to open the file. Quite annoying.\n\t\t\t\t\t\tawait fetch(\"/__open-in-editor?file=\" + encodeURIComponent(window.__astro_dev_toolbar__.root + islandComponentPath.slice(1)));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn tooltip;\n\t\t}\n\t}\n};\n"],"ignoreList":[0],"mappings":";;;AAIA,IAAA,eAAe;CACd,IAAI;CACJ,MAAM;CACN;CACA,KAAK,QAAQ,aAAa;EACzB,IAAI,kBAAkB,CAAC;EACvB,kBAAkB;EAClB,SAAS,iBAAiB,oBAAoB,iBAAiB;EAC/D,SAAS,iBAAiB,mBAAmB,8BAA8B;EAC3E,oBAAoB,WAAW;EAC/B,6BAA6B,aAAa,MAAM;EAChD,SAAS,oBAAoB;GAC5B,gBAAgB,SAAS,EAAE,uBAAuB;IACjD,iBAAiB,OAAO;GACzB,CAAC;GACD,kBAAkB,CAAC;GACnB,MAAM,UAAU,SAAS,iBAAiB,cAAc;GACxD,IAAI,QAAQ,WAAW,GAAG;IACzB,MAAM,SAAS,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8BjC;IACF,OAAO,OAAO,MAAM;IACpB;GACD;GACA,QAAQ,SAAS,WAAW;IAC3B,MAAM,gBAAgB,OAAO,iBAAiB,MAAM;IACpD,MAAM,gBAAgB,OAAO,SAAS,MAAM;IAG5C,IAAI,cAAc,iBAAiB,QAAQ,cAAc,YAAY,QACpE;IAED,MAAM,OAAO,cAAc,sBAAsB;IACjD,MAAM,YAAY,gBAAgB,IAAI;IACtC,MAAM,UAAU,mBAAmB,MAAM;IAOzC,MAAM,EAA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S;IACT,kBAAkB;IAClB,MAAM,cAAc;KAGnB,MAAM,MAAM,4BAA4B,mBAAmB,OAAO,sBAAsB,OAAO,oBAAoB,MAAM,CAAC,CAAC,CAAC;IAC7H;GACD,CAAC;GAEF,OAAO;EACR;CACD;AACD"}
@@ -0,0 +1,21 @@
1
+ import { docsSchema } from "@astrojs/starlight/schema"
2
+ import { glob } from "astro/loaders"
3
+ import { defineCollection } from "astro:content"
4
+ import { z } from "astro/zod"
5
+ import { pathToFileURL } from "node:url"
6
+
7
+ import { readSiteOptions } from "../../src/integration.ts"
8
+
9
+ // Les pages viennent du dépôt du client (HGDC_DOCS_DIR), pas de src/content/docs.
10
+ const { contentDir } = readSiteOptions()
11
+
12
+ export const collections = {
13
+ docs: defineCollection({
14
+ loader: glob({
15
+ base: pathToFileURL(`${contentDir}/`),
16
+ pattern: ["**/[^_]*.{md,mdx}", "!**/node_modules/**", "!dist/**", "!.*/**", "!README.md", "!CHANGELOG.md"],
17
+ }),
18
+ // `sidebarTitle` et `icon` : champs Mintlify, acceptés pour reprendre une doc existante.
19
+ schema: docsSchema({ extend: z.object({ sidebarTitle: z.string().optional(), icon: z.string().optional() }) }),
20
+ }),
21
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.