@hgdc/docs 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/build/content.ts +82 -0
- package/src/build/markdown.ts +10 -5
- package/src/components/Accordion.astro +3 -1
- package/src/components/Callout.astro +31 -0
- package/src/components/Card.astro +3 -1
- package/src/components/Check.astro +2 -3
- package/src/components/CodeGroup.astro +9 -1
- package/src/components/Danger.astro +2 -3
- package/src/components/Info.astro +2 -3
- package/src/components/Note.astro +2 -3
- package/src/components/Tip.astro +2 -3
- package/src/components/Warning.astro +2 -3
- package/src/core/feedback-api.ts +17 -7
- package/src/core/theme.ts +6 -3
- package/src/integration.ts +74 -16
- package/src/overrides/Assistant.astro +17 -39
- package/src/overrides/Footer.astro +27 -74
- package/src/overrides/Header.astro +92 -0
- package/src/overrides/Icon.astro +65 -0
- package/src/overrides/PageFrame.astro +55 -8
- package/src/overrides/PageSidebar.astro +7 -0
- package/src/overrides/PageTitle.astro +93 -62
- package/src/overrides/Search.astro +54 -0
- package/src/overrides/Sidebar.astro +89 -44
- package/src/overrides/SidebarList.astro +52 -0
- package/src/overrides/SiteFooter.astro +51 -0
- package/src/overrides/ThemeProvider.astro +23 -0
- package/src/overrides/ThemeToggle.astro +90 -0
- package/src/overrides/TwoColumnContent.astro +45 -0
- package/src/overrides/sections.ts +29 -0
- package/src/styles/theme.css +2137 -511
- package/src/widget/client.ts +51 -19
- package/src/widget/code.ts +218 -0
- package/src/widget/excerpt.ts +5 -0
- package/src/widget/search.ts +226 -0
- package/template/.astro/collections/docs.schema.json +3 -0
- package/template/.astro/content-assets.mjs +1 -4
- package/template/.astro/content-modules.mjs +35 -15
- package/template/.astro/data-store.json +1 -0
- package/template/.astro/settings.json +5 -0
- package/template/.build/.well-known/llms.txt +51 -34
- package/template/.build/404.html +16 -42
- package/template/.build/_astro/Assistant.astro_astro_type_script_index_0_lang.C1pz7yK1.js +4 -0
- package/template/.build/_astro/CodeGroup.astro_astro_type_script_index_0_lang.-eM8maAX.js +1 -0
- package/template/.build/_astro/Footer.astro_astro_type_script_index_0_lang.DzCnn3OT.js +1 -0
- package/template/.build/_astro/Search.astro_astro_type_script_index_0_lang.D7EcezBU.js +1 -0
- package/template/.build/_astro/code.smqv0zhe.js +9 -0
- package/template/.build/_astro/common.Dx3aBIS0.css +3 -0
- package/template/.build/_astro/{ec.8nqtp.css → ec.t9qpe.css} +1 -1
- package/template/.build/_astro/logo.BPu921Tp.svg +1 -0
- package/template/.build/_hgdc/corpus.json +1 -1
- package/template/.build/concepts/confidentialite/index.html +50 -0
- package/template/.build/concepts/confidentialite.md +38 -0
- package/template/.build/concepts/deploiements/index.html +106 -0
- package/template/.build/concepts/deploiements.md +70 -0
- package/template/.build/concepts/organisations-et-roles/index.html +83 -0
- package/template/.build/concepts/organisations-et-roles.md +39 -0
- package/template/.build/concepts/preversion/index.html +49 -0
- package/template/.build/concepts/preversion.md +52 -0
- package/template/.build/concepts/secrets-et-coffre/index.html +70 -0
- package/template/.build/concepts/secrets-et-coffre.md +54 -0
- package/template/.build/demarrer/depuis-github/index.html +34 -0
- package/template/.build/demarrer/depuis-github.md +68 -0
- package/template/.build/demarrer/premier-site/index.html +28 -0
- package/template/.build/demarrer/premier-site.md +94 -0
- package/template/.build/guides/brancher-un-domaine/index.html +91 -0
- package/template/.build/guides/brancher-un-domaine.md +81 -0
- package/template/.build/guides/cle-d-api/index.html +62 -0
- package/template/.build/guides/cle-d-api.md +78 -0
- package/template/.build/guides/depannage/index.html +64 -0
- package/template/.build/guides/depannage.md +69 -0
- package/template/.build/guides/deployer-depuis-github/index.html +45 -0
- package/template/.build/guides/deployer-depuis-github.md +70 -0
- package/template/.build/guides/deployer-un-framework/index.html +81 -0
- package/template/.build/guides/deployer-un-framework.md +74 -0
- package/template/.build/guides/github-actions-sans-application/index.html +53 -0
- package/template/.build/guides/github-actions-sans-application.md +95 -0
- package/template/.build/guides/inviter-une-personne/index.html +28 -0
- package/template/.build/guides/inviter-une-personne.md +38 -0
- package/template/.build/guides/lire-les-logs/index.html +37 -0
- package/template/.build/guides/lire-les-logs.md +48 -0
- package/template/.build/guides/migrer-depuis-vercel/index.html +25 -0
- package/template/.build/guides/migrer-depuis-vercel.md +51 -0
- package/template/.build/guides/monorepo/index.html +40 -0
- package/template/.build/guides/monorepo.md +42 -0
- package/template/.build/guides/revenir-en-arriere/index.html +39 -0
- package/template/.build/guides/revenir-en-arriere.md +50 -0
- package/template/.build/guides/site-statique/index.html +41 -0
- package/template/.build/guides/site-statique.md +59 -0
- package/template/.build/guides/synchroniser-doppler/index.html +46 -0
- package/template/.build/guides/synchroniser-doppler.md +63 -0
- package/template/.build/guides/variables-d-environnement/index.html +73 -0
- package/template/.build/guides/variables-d-environnement.md +92 -0
- package/template/.build/images/famille/account.svg +1 -0
- package/template/.build/images/famille/analytics.svg +1 -0
- package/template/.build/images/famille/docs.svg +1 -0
- package/template/.build/images/famille/host.svg +1 -0
- package/template/.build/images/famille/mail.svg +1 -0
- package/template/.build/images/famille/portal.svg +1 -0
- package/template/.build/images/famille/status.svg +1 -0
- package/template/.build/images/logo.svg +1 -0
- package/template/.build/index.html +30 -85
- package/template/.build/index.md +59 -21
- package/template/.build/llms-full.txt +2330 -514
- package/template/.build/llms.txt +51 -34
- package/template/.build/pagefind/fragment/fr-ch_16987e2.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_2b4c97b.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_3294a5c.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_34858c9.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_39ddba1.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_4ab1899.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_4d3a52a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_506c187.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_5aa255a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_6841c7d.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_6dc7a2d.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_847edff.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_8745af7.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_8aac5e6.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_916b233.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_9fd014a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_a0808f8.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_a4e1f69.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_a80a53d.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_a9e725b.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_ac3f64c.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_af292f1.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_af3e716.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_b0689a4.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_baed996.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_c89e27a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_cd6ca13.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_d09af09.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_d4bcea8.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_dc2a134.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_ded7ddc.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_e2528cb.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_e3cbb4e.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_e7902d9.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_f48ca47.pf_fragment +0 -0
- package/template/.build/pagefind/index/fr-ch_8a5f905.pf_index +0 -0
- package/template/.build/pagefind/index/fr-ch_fbd9c96.pf_index +0 -0
- package/template/.build/pagefind/pagefind-entry.json +1 -1
- package/template/.build/pagefind/pagefind.fr-ch_211aacbfa7f0e.pf_meta +0 -0
- package/template/.build/reference/api/deploiements/index.html +326 -0
- package/template/.build/reference/api/deploiements.md +170 -0
- package/template/.build/reference/api/erreurs/index.html +102 -0
- package/template/.build/reference/api/erreurs.md +50 -0
- package/template/.build/reference/api/fichiers/index.html +82 -0
- package/template/.build/reference/api/fichiers.md +62 -0
- package/template/.build/reference/api/introduction/index.html +126 -0
- package/template/.build/reference/api/introduction.md +84 -0
- package/template/.build/reference/api/projets/index.html +184 -0
- package/template/.build/reference/api/projets.md +102 -0
- package/template/.build/reference/api/utilisateur/index.html +96 -0
- package/template/.build/reference/api/utilisateur.md +89 -0
- package/template/.build/reference/api/variables/index.html +75 -0
- package/template/.build/reference/api/variables.md +58 -0
- package/template/.build/reference/cli/index.html +165 -82
- package/template/.build/reference/cli.md +159 -23
- package/template/.build/reference/compatibilite/index.html +196 -0
- package/template/.build/reference/compatibilite.md +64 -0
- package/template/.build/reference/domaines/index.html +171 -0
- package/template/.build/reference/domaines.md +76 -0
- package/template/.build/reference/limites/index.html +159 -0
- package/template/.build/reference/limites.md +56 -0
- package/template/.build/reference/variables/index.html +164 -0
- package/template/.build/reference/variables.md +63 -0
- package/template/.build/reference/vercel-json/index.html +65 -0
- package/template/.build/reference/vercel-json.md +51 -0
- package/template/node_modules/.vite/deps/_metadata.json +8 -8
- package/template/src/content.config.ts +8 -2
- package/src/overrides/SocialIcons.astro +0 -59
- package/template/.build/_astro/Assistant.astro_astro_type_script_index_0_lang.DWgmlr85.js +0 -4
- package/template/.build/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.C3fM4Kra.js +0 -1
- package/template/.build/_astro/Search.astro_astro_type_script_index_0_lang.g9hoxVJg.js +0 -1
- package/template/.build/_astro/TableOfContents.astro_astro_type_script_index_0_lang.BpJaGz7G.js +0 -1
- package/template/.build/_astro/common.CQYUsl_5.css +0 -3
- package/template/.build/_astro/logo-clair.BqNh6JNi.svg +0 -1
- package/template/.build/_astro/logo-sombre.BkgsFXxh.svg +0 -1
- package/template/.build/_astro/starlight-toc.D4UDIxQL.js +0 -1
- package/template/.build/_astro/ui-core.Clh5jUUO.js +0 -2
- package/template/.build/demarrer/premiere-doc/index.html +0 -84
- package/template/.build/demarrer/premiere-doc.md +0 -65
- package/template/.build/explications/donnees/index.html +0 -114
- package/template/.build/explications/donnees.md +0 -28
- package/template/.build/explications/fonctionnement/index.html +0 -92
- package/template/.build/explications/fonctionnement.md +0 -32
- package/template/.build/guides/agents/index.html +0 -118
- package/template/.build/guides/agents.md +0 -54
- package/template/.build/guides/assistant/index.html +0 -119
- package/template/.build/guides/assistant.md +0 -46
- package/template/.build/guides/composants/index.html +0 -97
- package/template/.build/guides/composants.md +0 -103
- package/template/.build/guides/ecrire/index.html +0 -115
- package/template/.build/guides/ecrire.md +0 -63
- package/template/.build/guides/elements/index.html +0 -1
- package/template/.build/guides/navigation/index.html +0 -89
- package/template/.build/guides/navigation.md +0 -63
- package/template/.build/guides/publier/index.html +0 -86
- package/template/.build/guides/publier.md +0 -65
- package/template/.build/guides/theme/index.html +0 -86
- package/template/.build/guides/theme.md +0 -33
- package/template/.build/images/favicon.svg +0 -1
- package/template/.build/images/logo-clair.svg +0 -1
- package/template/.build/images/logo-sombre.svg +0 -1
- package/template/.build/pagefind/fragment/fr-ch_148313b.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_2a431a9.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_35f556a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_456586a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_48ca71e.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_4f8575c.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_72b91f4.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_8f256dd.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_95a15cc.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_aa80c55.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_ab79738.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_c589c2a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_dab8f5e.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_de60b43.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_e2c46e3.pf_fragment +0 -0
- package/template/.build/pagefind/index/fr-ch_c5ced52.pf_index +0 -0
- package/template/.build/pagefind/pagefind.fr-ch_8a246aa922758.pf_meta +0 -0
- package/template/.build/reference/api-assistant/index.html +0 -161
- package/template/.build/reference/api-assistant.md +0 -60
- package/template/.build/reference/docs-json/index.html +0 -216
- package/template/.build/reference/docs-json.md +0 -47
- package/template/.build/reference/mcp/index.html +0 -151
- package/template/.build/reference/mcp.md +0 -49
package/src/widget/client.ts
CHANGED
|
@@ -91,11 +91,11 @@ class Assistant extends HTMLElement {
|
|
|
91
91
|
private pending = false
|
|
92
92
|
private opener: HTMLElement | null = null
|
|
93
93
|
|
|
94
|
-
private get
|
|
95
|
-
return
|
|
94
|
+
private get askbar() {
|
|
95
|
+
return document.querySelector<HTMLFormElement>("[data-askbar]")
|
|
96
96
|
}
|
|
97
|
-
private get
|
|
98
|
-
return
|
|
97
|
+
private get askbarInput() {
|
|
98
|
+
return document.querySelector<HTMLInputElement>("[data-askbar-input]")
|
|
99
99
|
}
|
|
100
100
|
private get input() {
|
|
101
101
|
return this.querySelector<HTMLTextAreaElement>("[data-input]")!
|
|
@@ -103,13 +103,28 @@ class Assistant extends HTMLElement {
|
|
|
103
103
|
private get log() {
|
|
104
104
|
return this.querySelector<HTMLElement>("[data-log]")!
|
|
105
105
|
}
|
|
106
|
+
private get isOpen() {
|
|
107
|
+
return document.documentElement.hasAttribute("data-hgdc-assistant")
|
|
108
|
+
}
|
|
106
109
|
|
|
107
110
|
connectedCallback(): void {
|
|
108
111
|
const mac = /Mac|iPhone|iPad/.test(navigator.platform)
|
|
109
|
-
const shortcut =
|
|
112
|
+
const shortcut = document.querySelector("[data-askbar] [data-shortcut]")
|
|
110
113
|
if (shortcut) shortcut.textContent = mac ? "⌘ I" : "Ctrl I"
|
|
111
114
|
|
|
112
|
-
|
|
115
|
+
// La barre du bas ouvre le panneau ; une question tapée y part tout de suite.
|
|
116
|
+
this.askbar?.addEventListener("submit", (event) => {
|
|
117
|
+
event.preventDefault()
|
|
118
|
+
const input = this.askbarInput!
|
|
119
|
+
const question = input.value.trim()
|
|
120
|
+
input.value = ""
|
|
121
|
+
this.toggle(true, input)
|
|
122
|
+
if (question) void this.ask(question)
|
|
123
|
+
})
|
|
124
|
+
// Le voile de la feuille (téléphone) est dessiné par cet élément : un clic dessus ferme.
|
|
125
|
+
this.addEventListener("click", (event) => {
|
|
126
|
+
if (event.target === this) this.toggle(false)
|
|
127
|
+
})
|
|
113
128
|
this.querySelector("[data-close]")!.addEventListener("click", () => this.toggle(false))
|
|
114
129
|
this.querySelector("[data-reset]")!.addEventListener("click", () => this.reset())
|
|
115
130
|
this.querySelector("[data-form]")!.addEventListener("submit", (event) => {
|
|
@@ -123,28 +138,45 @@ class Assistant extends HTMLElement {
|
|
|
123
138
|
}
|
|
124
139
|
})
|
|
125
140
|
this.input.addEventListener("input", () => this.autosize())
|
|
126
|
-
document.addEventListener("
|
|
141
|
+
document.addEventListener("click", (event) => {
|
|
142
|
+
const trigger = (event.target as HTMLElement).closest<HTMLElement>("[data-hgdc-ask]")
|
|
143
|
+
if (trigger) this.toggle(!this.isOpen, trigger)
|
|
144
|
+
})
|
|
145
|
+
document.addEventListener("hgdc:assistant-open", (event) => {
|
|
146
|
+
const question = (event as CustomEvent<{ question?: string } | null>).detail?.question?.trim()
|
|
147
|
+
this.toggle(true, document.activeElement as HTMLElement)
|
|
148
|
+
if (question) void this.ask(question)
|
|
149
|
+
})
|
|
127
150
|
document.addEventListener("keydown", (event) => {
|
|
128
151
|
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "i") {
|
|
129
152
|
event.preventDefault()
|
|
130
|
-
this.toggle(
|
|
131
|
-
} else if (event.key === "Escape" &&
|
|
153
|
+
this.toggle(!this.isOpen, document.activeElement as HTMLElement)
|
|
154
|
+
} else if (event.key === "Escape" && this.isOpen && !document.querySelector("dialog[open]")) this.toggle(false)
|
|
155
|
+
})
|
|
156
|
+
// Passage du téléphone à l'ordinateur panneau ouvert : la page redevient lisible ou inerte.
|
|
157
|
+
matchMedia("(max-width: 50em)").addEventListener("change", () => {
|
|
158
|
+
if (this.isOpen) this.toggle(true)
|
|
132
159
|
})
|
|
133
160
|
}
|
|
134
161
|
|
|
135
162
|
private toggle(open: boolean, opener?: HTMLElement | null): void {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
this.launcher.setAttribute("aria-expanded", String(open))
|
|
163
|
+
const panel = this.querySelector<HTMLElement>("[data-panel]")!
|
|
164
|
+
panel.inert = !open
|
|
139
165
|
document.documentElement.toggleAttribute("data-hgdc-assistant", open)
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
166
|
+
// Feuille du bas sur téléphone : modale, le reste de la page inerte. Sur ordinateur, le
|
|
167
|
+
// panneau pousse la page, qui reste lisible et cliquable.
|
|
168
|
+
const sheet = open && matchMedia("(max-width: 50em)").matches
|
|
169
|
+
panel.setAttribute("aria-modal", String(sheet))
|
|
170
|
+
for (const element of document.querySelectorAll<HTMLElement>(".hd-main-frame, .hd-topbar, .hd-sidebar"))
|
|
171
|
+
element.toggleAttribute("inert", sheet)
|
|
144
172
|
if (open) {
|
|
145
|
-
this.opener = opener
|
|
146
|
-
this.input.focus()
|
|
147
|
-
} else
|
|
173
|
+
if (opener && opener !== this.input) this.opener = opener
|
|
174
|
+
this.input.focus({ preventScroll: true })
|
|
175
|
+
} else {
|
|
176
|
+
const back = this.opener?.isConnected ? this.opener : this.askbarInput
|
|
177
|
+
this.opener = null
|
|
178
|
+
back?.focus({ preventScroll: true })
|
|
179
|
+
}
|
|
148
180
|
}
|
|
149
181
|
|
|
150
182
|
private autosize(): void {
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blocs de code : onglets de `<CodeGroup>`, et trois actions sur chaque bloc (signaler un
|
|
3
|
+
* code faux, copier, demander à l'assistant). Les boutons sont ajoutés par script : sans
|
|
4
|
+
* JavaScript, le code reste lisible et sélectionnable.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const ICON = {
|
|
8
|
+
flag: '<path d="M12 8v4.5M12 16h.01M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z"/>',
|
|
9
|
+
copy: '<path d="M9 9h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1Zm-4 6H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"/>',
|
|
10
|
+
check: '<path d="m5 12.5 4.5 4.5L19 7.5"/>',
|
|
11
|
+
sparkles:
|
|
12
|
+
'<path d="M12 3.5 13.6 8a3 3 0 0 0 1.9 1.9L20 11.5l-4.5 1.6a3 3 0 0 0-1.9 1.9L12 19.5 10.4 15a3 3 0 0 0-1.9-1.9L4 11.5 8.5 9.9A3 3 0 0 0 10.4 8ZM19 3v3M20.5 4.5h-3"/>',
|
|
13
|
+
} as const
|
|
14
|
+
|
|
15
|
+
function svg(name: keyof typeof ICON): string {
|
|
16
|
+
return `<svg aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">${ICON[name]}</svg>`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function button(label: string, icon: keyof typeof ICON): HTMLButtonElement {
|
|
20
|
+
const node = document.createElement("button")
|
|
21
|
+
node.type = "button"
|
|
22
|
+
node.className = "hd-code-action"
|
|
23
|
+
node.setAttribute("aria-label", label)
|
|
24
|
+
node.title = label
|
|
25
|
+
node.innerHTML = svg(icon)
|
|
26
|
+
return node
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const codeOf = (frame: Element) =>
|
|
30
|
+
(frame.querySelector("pre") as HTMLElement | null)?.innerText.replace(/\n$/, "") ?? ""
|
|
31
|
+
|
|
32
|
+
type Feedback = { endpoint: string; project: string } | null
|
|
33
|
+
|
|
34
|
+
function feedbackTarget(): Feedback {
|
|
35
|
+
const host = document.querySelector<HTMLElement>("hgdc-feedback")
|
|
36
|
+
return host?.dataset.endpoint && host.dataset.project
|
|
37
|
+
? { endpoint: host.dataset.endpoint, project: host.dataset.project }
|
|
38
|
+
: null
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Boîte « Signaler un code faux » : une seule à la fois, sous le bloc concerné. */
|
|
42
|
+
function openReport(frame: HTMLElement, trigger: HTMLButtonElement, target: NonNullable<Feedback>): void {
|
|
43
|
+
document.querySelector(".hd-report")?.remove()
|
|
44
|
+
document.querySelector(".hd-code-active")?.classList.remove("hd-code-active")
|
|
45
|
+
frame.classList.add("hd-code-active")
|
|
46
|
+
const box = document.createElement("form")
|
|
47
|
+
box.className = "hd-report"
|
|
48
|
+
box.setAttribute("aria-label", "Signaler un code faux")
|
|
49
|
+
box.innerHTML = `
|
|
50
|
+
<p class="hd-report__title">Signaler un code faux</p>
|
|
51
|
+
<p class="hd-report__hint">Dis ce qui ne marche pas : la commande, la valeur, le message d'erreur.</p>
|
|
52
|
+
<label class="sr-only" for="hd-report-text">Ce qui ne va pas dans ce code</label>
|
|
53
|
+
<textarea id="hd-report-text" rows="3" maxlength="1000" required placeholder="Qu'est-ce qui ne va pas ?"></textarea>
|
|
54
|
+
<div class="hd-report__actions">
|
|
55
|
+
<button type="button" class="hd-pill hd-pill--ghost" data-cancel>Annuler</button>
|
|
56
|
+
<button type="submit" class="hd-pill hd-pill--primary">Envoyer</button>
|
|
57
|
+
</div>`
|
|
58
|
+
const close = (focus = true) => {
|
|
59
|
+
box.remove()
|
|
60
|
+
frame.classList.remove("hd-code-active")
|
|
61
|
+
if (focus) trigger.focus()
|
|
62
|
+
}
|
|
63
|
+
box.querySelector("[data-cancel]")!.addEventListener("click", () => close())
|
|
64
|
+
box.addEventListener("keydown", (event) => {
|
|
65
|
+
if (event.key === "Escape") {
|
|
66
|
+
event.stopPropagation()
|
|
67
|
+
close()
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
box.addEventListener("submit", (event) => {
|
|
71
|
+
event.preventDefault()
|
|
72
|
+
const comment = box.querySelector("textarea")!.value.trim()
|
|
73
|
+
if (!comment) return
|
|
74
|
+
void fetch(target.endpoint, {
|
|
75
|
+
method: "POST",
|
|
76
|
+
headers: { "content-type": "application/json" },
|
|
77
|
+
body: JSON.stringify({
|
|
78
|
+
project: target.project,
|
|
79
|
+
page: location.pathname,
|
|
80
|
+
helpful: false,
|
|
81
|
+
kind: "code",
|
|
82
|
+
comment,
|
|
83
|
+
code: codeOf(frame).slice(0, 2000),
|
|
84
|
+
}),
|
|
85
|
+
keepalive: true,
|
|
86
|
+
}).catch(() => undefined)
|
|
87
|
+
box.innerHTML = '<p class="hd-report__title" role="status">Merci, c\'est noté.</p>'
|
|
88
|
+
setTimeout(() => close(false), 1800)
|
|
89
|
+
})
|
|
90
|
+
frame.after(box)
|
|
91
|
+
box.querySelector("textarea")!.focus()
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function decorate(frame: HTMLElement): void {
|
|
95
|
+
if (frame.querySelector(".hd-code-actions")) return
|
|
96
|
+
const bar = document.createElement("div")
|
|
97
|
+
bar.className = "hd-code-actions"
|
|
98
|
+
const target = feedbackTarget()
|
|
99
|
+
if (target) {
|
|
100
|
+
const report = button("Signaler un code faux", "flag")
|
|
101
|
+
report.addEventListener("click", () => openReport(frame, report, target))
|
|
102
|
+
bar.append(report)
|
|
103
|
+
}
|
|
104
|
+
const copy = button("Copier le code", "copy")
|
|
105
|
+
copy.addEventListener("click", () => {
|
|
106
|
+
navigator.clipboard.writeText(codeOf(frame)).then(
|
|
107
|
+
() => {
|
|
108
|
+
copy.innerHTML = svg("check")
|
|
109
|
+
copy.setAttribute("aria-label", "Code copié")
|
|
110
|
+
setTimeout(() => {
|
|
111
|
+
copy.innerHTML = svg("copy")
|
|
112
|
+
copy.setAttribute("aria-label", "Copier le code")
|
|
113
|
+
}, 1600)
|
|
114
|
+
},
|
|
115
|
+
() => copy.setAttribute("aria-label", "Copie impossible"),
|
|
116
|
+
)
|
|
117
|
+
})
|
|
118
|
+
bar.append(copy)
|
|
119
|
+
if (document.querySelector("hgdc-assistant")) {
|
|
120
|
+
const ask = button("Demander à l'assistant", "sparkles")
|
|
121
|
+
ask.addEventListener("click", () => {
|
|
122
|
+
const question = `Explique ce code de la page « ${document.title.split(" | ")[0]} » :\n${codeOf(frame).slice(0, 800)}`
|
|
123
|
+
document.dispatchEvent(new CustomEvent("hgdc:assistant-open", { detail: { question } }))
|
|
124
|
+
})
|
|
125
|
+
bar.append(ask)
|
|
126
|
+
}
|
|
127
|
+
frame.append(bar)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
class CodeGroup extends HTMLElement {
|
|
131
|
+
connectedCallback(): void {
|
|
132
|
+
const blocks = [...this.querySelectorAll<HTMLElement>(":scope > .expressive-code, :scope > * > .expressive-code")]
|
|
133
|
+
if (blocks.length < 2) return
|
|
134
|
+
const list = document.createElement("div")
|
|
135
|
+
list.className = "hd-code-tabs"
|
|
136
|
+
list.setAttribute("role", "tablist")
|
|
137
|
+
const tabs = blocks.map((block, index) => {
|
|
138
|
+
const title =
|
|
139
|
+
block.querySelector(".title")?.textContent?.trim() ||
|
|
140
|
+
block.querySelector("pre")?.dataset.language ||
|
|
141
|
+
`Code ${index + 1}`
|
|
142
|
+
const tab = document.createElement("button")
|
|
143
|
+
tab.type = "button"
|
|
144
|
+
tab.setAttribute("role", "tab")
|
|
145
|
+
tab.textContent = title
|
|
146
|
+
tab.id = `${this.id || "hd-cg"}-${Math.random().toString(36).slice(2, 8)}`
|
|
147
|
+
block.setAttribute("role", "tabpanel")
|
|
148
|
+
block.setAttribute("aria-labelledby", tab.id)
|
|
149
|
+
tab.addEventListener("click", () => select(index))
|
|
150
|
+
return tab
|
|
151
|
+
})
|
|
152
|
+
const select = (index: number, focus = false) => {
|
|
153
|
+
tabs.forEach((tab, i) => {
|
|
154
|
+
tab.setAttribute("aria-selected", String(i === index))
|
|
155
|
+
tab.tabIndex = i === index ? 0 : -1
|
|
156
|
+
blocks[i]!.hidden = i !== index
|
|
157
|
+
})
|
|
158
|
+
if (focus) tabs[index]!.focus()
|
|
159
|
+
}
|
|
160
|
+
list.addEventListener("keydown", (event) => {
|
|
161
|
+
const current = tabs.findIndex((tab) => tab.getAttribute("aria-selected") === "true")
|
|
162
|
+
const step = event.key === "ArrowRight" ? 1 : event.key === "ArrowLeft" ? -1 : 0
|
|
163
|
+
if (!step) return
|
|
164
|
+
event.preventDefault()
|
|
165
|
+
select((current + step + tabs.length) % tabs.length, true)
|
|
166
|
+
})
|
|
167
|
+
list.append(...tabs)
|
|
168
|
+
this.prepend(list)
|
|
169
|
+
this.dataset.ready = ""
|
|
170
|
+
select(0)
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** Zoom des images du contenu : un clic ouvre l'image en grand, Échap ou un clic la referme. */
|
|
175
|
+
function enableZoom(): void {
|
|
176
|
+
const images = document.querySelectorAll<HTMLImageElement>(".sl-markdown-content img:not(a img):not(.hgdc-card img)")
|
|
177
|
+
if (!images.length) return
|
|
178
|
+
let dialog: HTMLDialogElement | null = null
|
|
179
|
+
for (const image of images) {
|
|
180
|
+
if (image.naturalWidth && image.naturalWidth < 120) continue
|
|
181
|
+
image.classList.add("hd-zoomable")
|
|
182
|
+
image.tabIndex = 0
|
|
183
|
+
image.setAttribute("role", "button")
|
|
184
|
+
image.setAttribute("aria-label", image.alt ? `Agrandir : ${image.alt}` : "Agrandir l'image")
|
|
185
|
+
const open = () => {
|
|
186
|
+
if (!dialog) {
|
|
187
|
+
dialog = document.createElement("dialog")
|
|
188
|
+
dialog.className = "hd-zoom"
|
|
189
|
+
dialog.setAttribute("aria-label", "Image agrandie")
|
|
190
|
+
dialog.addEventListener("click", () => dialog!.close())
|
|
191
|
+
document.body.append(dialog)
|
|
192
|
+
}
|
|
193
|
+
const copy = image.cloneNode() as HTMLImageElement
|
|
194
|
+
copy.removeAttribute("role")
|
|
195
|
+
copy.removeAttribute("tabindex")
|
|
196
|
+
copy.className = ""
|
|
197
|
+
dialog.replaceChildren(copy)
|
|
198
|
+
dialog.showModal()
|
|
199
|
+
}
|
|
200
|
+
image.addEventListener("click", open)
|
|
201
|
+
image.addEventListener("keydown", (event) => {
|
|
202
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
203
|
+
event.preventDefault()
|
|
204
|
+
open()
|
|
205
|
+
}
|
|
206
|
+
})
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function defineCodeGroup(): void {
|
|
211
|
+
if (!customElements.get("hd-code-group")) customElements.define("hd-code-group", CodeGroup)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function enhanceContent(): void {
|
|
215
|
+
for (const frame of document.querySelectorAll<HTMLElement>(".sl-markdown-content .expressive-code figure.frame"))
|
|
216
|
+
decorate(frame)
|
|
217
|
+
enableZoom()
|
|
218
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Extrait de Pagefind affiché dans la palette : seul `<mark>` survit, tout le reste est échappé. */
|
|
2
|
+
export function safeExcerpt(html: string): string {
|
|
3
|
+
const escaped = html.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")
|
|
4
|
+
return escaped.replace(/<mark>/g, "<mark>").replace(/<\/mark>/g, "</mark>")
|
|
5
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/** Palette de recherche : Pagefind en lecture seule, chargé à la demande. */
|
|
2
|
+
|
|
3
|
+
import { safeExcerpt } from "./excerpt.ts"
|
|
4
|
+
|
|
5
|
+
type SubResult = { title: string; url: string; excerpt: string }
|
|
6
|
+
type ResultData = {
|
|
7
|
+
url: string
|
|
8
|
+
excerpt: string
|
|
9
|
+
meta: { title?: string; section?: string }
|
|
10
|
+
sub_results?: Array<SubResult>
|
|
11
|
+
}
|
|
12
|
+
type Pagefind = {
|
|
13
|
+
options: (options: Record<string, unknown>) => Promise<void>
|
|
14
|
+
debouncedSearch: (
|
|
15
|
+
query: string,
|
|
16
|
+
options?: unknown,
|
|
17
|
+
ms?: number,
|
|
18
|
+
) => Promise<{ results: Array<{ data: () => Promise<ResultData> }> } | null>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type Option = { href?: string; title: string; context: string; excerpt: string; kind: "page" | "heading" | "ask" }
|
|
22
|
+
|
|
23
|
+
const MAX_PAGES = 8
|
|
24
|
+
|
|
25
|
+
function toOptions(results: Array<ResultData>): Array<Option> {
|
|
26
|
+
return results.flatMap((result) => {
|
|
27
|
+
const title = result.meta.title ?? result.url
|
|
28
|
+
const page: Option = {
|
|
29
|
+
href: result.url,
|
|
30
|
+
title,
|
|
31
|
+
context: result.meta.section ?? "",
|
|
32
|
+
excerpt: result.excerpt,
|
|
33
|
+
kind: "page",
|
|
34
|
+
}
|
|
35
|
+
const headings = (result.sub_results ?? [])
|
|
36
|
+
.filter((sub) => sub.url !== result.url && sub.title !== title)
|
|
37
|
+
.slice(0, 3)
|
|
38
|
+
.map((sub): Option => ({
|
|
39
|
+
href: sub.url,
|
|
40
|
+
title: sub.title,
|
|
41
|
+
context: title,
|
|
42
|
+
excerpt: sub.excerpt,
|
|
43
|
+
kind: "heading",
|
|
44
|
+
}))
|
|
45
|
+
return [page, ...headings]
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
class Search extends HTMLElement {
|
|
50
|
+
private pagefind: Promise<Pagefind | null> | null = null
|
|
51
|
+
private active = 0
|
|
52
|
+
|
|
53
|
+
private get dialog() {
|
|
54
|
+
return this.querySelector("dialog")!
|
|
55
|
+
}
|
|
56
|
+
private get input() {
|
|
57
|
+
return this.querySelector<HTMLInputElement>("[data-input]")!
|
|
58
|
+
}
|
|
59
|
+
private get list() {
|
|
60
|
+
return this.querySelector<HTMLElement>("[data-results]")!
|
|
61
|
+
}
|
|
62
|
+
private get status() {
|
|
63
|
+
return this.querySelector<HTMLElement>("[data-status]")!
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
connectedCallback(): void {
|
|
67
|
+
const mac = /Mac|iPhone|iPad/.test(navigator.platform)
|
|
68
|
+
const shortcut = this.querySelector("[data-shortcut]")
|
|
69
|
+
if (shortcut) shortcut.textContent = mac ? "⌘ K" : "Ctrl K"
|
|
70
|
+
this.querySelector("[data-open]")!.addEventListener("click", () => this.open())
|
|
71
|
+
this.querySelector("[data-close]")!.addEventListener("click", () => this.dialog.close())
|
|
72
|
+
// Un clic sur le voile ferme la palette, un clic dans la boîte non.
|
|
73
|
+
this.dialog.addEventListener("click", (event) => {
|
|
74
|
+
if (event.target === this.dialog) this.dialog.close()
|
|
75
|
+
})
|
|
76
|
+
this.input.addEventListener("input", () => void this.search(this.input.value))
|
|
77
|
+
this.input.addEventListener("keydown", (event) => this.keydown(event))
|
|
78
|
+
document.addEventListener("keydown", (event) => {
|
|
79
|
+
const typing = event.target instanceof HTMLElement && event.target.closest("input, textarea, [contenteditable]")
|
|
80
|
+
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k") {
|
|
81
|
+
event.preventDefault()
|
|
82
|
+
if (this.dialog.open) this.dialog.close()
|
|
83
|
+
else this.open()
|
|
84
|
+
} else if (event.key === "/" && !typing && !this.dialog.open) {
|
|
85
|
+
event.preventDefault()
|
|
86
|
+
this.open()
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private open(): void {
|
|
92
|
+
this.dialog.showModal()
|
|
93
|
+
this.input.select()
|
|
94
|
+
void this.load()
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
private load(): Promise<Pagefind | null> {
|
|
98
|
+
this.pagefind ??= (async () => {
|
|
99
|
+
try {
|
|
100
|
+
const url = `${this.dataset.base ?? ""}/pagefind/pagefind.js`
|
|
101
|
+
const module = (await import(/* @vite-ignore */ url)) as Pagefind
|
|
102
|
+
await module.options({ excerptLength: 18 })
|
|
103
|
+
return module
|
|
104
|
+
} catch {
|
|
105
|
+
return null
|
|
106
|
+
}
|
|
107
|
+
})()
|
|
108
|
+
return this.pagefind
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
private async search(query: string): Promise<void> {
|
|
112
|
+
const text = query.trim()
|
|
113
|
+
if (!text) {
|
|
114
|
+
this.render([], "Tape un mot pour chercher dans les pages.")
|
|
115
|
+
return
|
|
116
|
+
}
|
|
117
|
+
const pagefind = await this.load()
|
|
118
|
+
if (!pagefind) {
|
|
119
|
+
this.render(this.askOption(text), "La recherche fonctionne sur le site publié.")
|
|
120
|
+
return
|
|
121
|
+
}
|
|
122
|
+
const response = await pagefind.debouncedSearch(text, {}, 120)
|
|
123
|
+
// `null` : une frappe plus récente a remplacé celle-ci.
|
|
124
|
+
if (!response || this.input.value.trim() !== text) return
|
|
125
|
+
const data = await Promise.all(response.results.slice(0, MAX_PAGES).map((result) => result.data()))
|
|
126
|
+
const options = [...toOptions(data), ...this.askOption(text)]
|
|
127
|
+
this.render(
|
|
128
|
+
options,
|
|
129
|
+
data.length
|
|
130
|
+
? `${data.length} page${data.length > 1 ? "s" : ""} trouvée${data.length > 1 ? "s" : ""}.`
|
|
131
|
+
: `Aucune page ne parle de « ${text} ».`,
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
private askOption(text: string): Array<Option> {
|
|
136
|
+
return this.dataset.assistant === undefined
|
|
137
|
+
? []
|
|
138
|
+
: [{ title: `Demander à l'assistant : « ${text} »`, context: "", excerpt: "", kind: "ask" }]
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
private render(options: Array<Option>, status: string): void {
|
|
142
|
+
this.active = 0
|
|
143
|
+
this.status.textContent = status
|
|
144
|
+
this.list.replaceChildren(
|
|
145
|
+
...options.map((option, index) => {
|
|
146
|
+
const item = document.createElement(option.href ? "a" : "button")
|
|
147
|
+
item.className = `hd-result hd-result--${option.kind}`
|
|
148
|
+
item.id = `hd-result-${index}`
|
|
149
|
+
item.setAttribute("role", "option")
|
|
150
|
+
item.tabIndex = -1
|
|
151
|
+
if (item instanceof HTMLAnchorElement) item.href = option.href!
|
|
152
|
+
else item.type = "button"
|
|
153
|
+
const icon = document.createElement("span")
|
|
154
|
+
icon.className = "hd-result__icon"
|
|
155
|
+
icon.setAttribute("aria-hidden", "true")
|
|
156
|
+
icon.textContent = option.kind === "heading" ? "#" : option.kind === "ask" ? "✦" : ""
|
|
157
|
+
const body = document.createElement("span")
|
|
158
|
+
body.className = "hd-result__body"
|
|
159
|
+
const title = document.createElement("span")
|
|
160
|
+
title.className = "hd-result__title"
|
|
161
|
+
title.textContent = option.title
|
|
162
|
+
body.append(title)
|
|
163
|
+
if (option.context) {
|
|
164
|
+
const context = document.createElement("span")
|
|
165
|
+
context.className = "hd-result__context"
|
|
166
|
+
context.textContent = option.context
|
|
167
|
+
body.append(context)
|
|
168
|
+
}
|
|
169
|
+
if (option.excerpt) {
|
|
170
|
+
const excerpt = document.createElement("span")
|
|
171
|
+
excerpt.className = "hd-result__excerpt"
|
|
172
|
+
excerpt.innerHTML = safeExcerpt(option.excerpt)
|
|
173
|
+
body.append(excerpt)
|
|
174
|
+
}
|
|
175
|
+
item.append(icon, body)
|
|
176
|
+
item.addEventListener("click", (event) => {
|
|
177
|
+
if (option.kind === "ask") {
|
|
178
|
+
event.preventDefault()
|
|
179
|
+
this.ask()
|
|
180
|
+
} else this.dialog.close()
|
|
181
|
+
})
|
|
182
|
+
item.addEventListener("mousemove", () => this.highlight(index))
|
|
183
|
+
return item
|
|
184
|
+
}),
|
|
185
|
+
)
|
|
186
|
+
this.input.setAttribute("aria-expanded", String(options.length > 0))
|
|
187
|
+
this.highlight(0)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
private highlight(index: number): void {
|
|
191
|
+
const items = [...this.list.children] as Array<HTMLElement>
|
|
192
|
+
this.active = Math.max(0, Math.min(index, items.length - 1))
|
|
193
|
+
items.forEach((item, i) => item.setAttribute("aria-selected", String(i === this.active)))
|
|
194
|
+
const current = items[this.active]
|
|
195
|
+
if (current) {
|
|
196
|
+
this.input.setAttribute("aria-activedescendant", current.id)
|
|
197
|
+
current.scrollIntoView({ block: "nearest" })
|
|
198
|
+
} else this.input.removeAttribute("aria-activedescendant")
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
private keydown(event: KeyboardEvent): void {
|
|
202
|
+
// Échap ferme d'un coup, même avec du texte dans le champ.
|
|
203
|
+
if (event.key === "Escape") {
|
|
204
|
+
event.preventDefault()
|
|
205
|
+
this.dialog.close()
|
|
206
|
+
} else if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
207
|
+
event.preventDefault()
|
|
208
|
+
this.highlight(this.active + (event.key === "ArrowDown" ? 1 : -1))
|
|
209
|
+
} else if (event.key === "Enter") {
|
|
210
|
+
const current = this.list.children[this.active] as HTMLElement | undefined
|
|
211
|
+
if (!current) return
|
|
212
|
+
event.preventDefault()
|
|
213
|
+
current.click()
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
private ask(): void {
|
|
218
|
+
const question = this.input.value.trim()
|
|
219
|
+
this.dialog.close()
|
|
220
|
+
document.dispatchEvent(new CustomEvent("hgdc:assistant-open", { detail: { question } }))
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function defineSearch(): void {
|
|
225
|
+
if (!customElements.get("hd-search")) customElements.define("hd-search", Search)
|
|
226
|
+
}
|
|
@@ -1,18 +1,38 @@
|
|
|
1
1
|
|
|
2
2
|
export default new Map([
|
|
3
|
-
["
|
|
4
|
-
["
|
|
5
|
-
["
|
|
6
|
-
["
|
|
7
|
-
["
|
|
8
|
-
["
|
|
9
|
-
["
|
|
10
|
-
["
|
|
11
|
-
["
|
|
12
|
-
["
|
|
13
|
-
["
|
|
14
|
-
["
|
|
15
|
-
["
|
|
16
|
-
["
|
|
17
|
-
["
|
|
3
|
+
["../../../../wt-aide-ui/host/concepts/confidentialite.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fconcepts%2Fconfidentialite.mdx&astroContentModuleFlag=true")],
|
|
4
|
+
["../../../../wt-aide-ui/host/concepts/deploiements.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fconcepts%2Fdeploiements.mdx&astroContentModuleFlag=true")],
|
|
5
|
+
["../../../../wt-aide-ui/host/concepts/organisations-et-roles.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fconcepts%2Forganisations-et-roles.mdx&astroContentModuleFlag=true")],
|
|
6
|
+
["../../../../wt-aide-ui/host/concepts/preversion.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fconcepts%2Fpreversion.mdx&astroContentModuleFlag=true")],
|
|
7
|
+
["../../../../wt-aide-ui/host/concepts/secrets-et-coffre.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fconcepts%2Fsecrets-et-coffre.mdx&astroContentModuleFlag=true")],
|
|
8
|
+
["../../../../wt-aide-ui/host/demarrer/depuis-github.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fdemarrer%2Fdepuis-github.mdx&astroContentModuleFlag=true")],
|
|
9
|
+
["../../../../wt-aide-ui/host/demarrer/premier-site.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fdemarrer%2Fpremier-site.mdx&astroContentModuleFlag=true")],
|
|
10
|
+
["../../../../wt-aide-ui/host/guides/brancher-un-domaine.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Fbrancher-un-domaine.mdx&astroContentModuleFlag=true")],
|
|
11
|
+
["../../../../wt-aide-ui/host/guides/cle-d-api.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Fcle-d-api.mdx&astroContentModuleFlag=true")],
|
|
12
|
+
["../../../../wt-aide-ui/host/guides/depannage.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Fdepannage.mdx&astroContentModuleFlag=true")],
|
|
13
|
+
["../../../../wt-aide-ui/host/guides/deployer-depuis-github.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Fdeployer-depuis-github.mdx&astroContentModuleFlag=true")],
|
|
14
|
+
["../../../../wt-aide-ui/host/guides/deployer-un-framework.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Fdeployer-un-framework.mdx&astroContentModuleFlag=true")],
|
|
15
|
+
["../../../../wt-aide-ui/host/guides/github-actions-sans-application.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Fgithub-actions-sans-application.mdx&astroContentModuleFlag=true")],
|
|
16
|
+
["../../../../wt-aide-ui/host/guides/inviter-une-personne.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Finviter-une-personne.mdx&astroContentModuleFlag=true")],
|
|
17
|
+
["../../../../wt-aide-ui/host/guides/lire-les-logs.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Flire-les-logs.mdx&astroContentModuleFlag=true")],
|
|
18
|
+
["../../../../wt-aide-ui/host/guides/migrer-depuis-vercel.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Fmigrer-depuis-vercel.mdx&astroContentModuleFlag=true")],
|
|
19
|
+
["../../../../wt-aide-ui/host/guides/monorepo.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Fmonorepo.mdx&astroContentModuleFlag=true")],
|
|
20
|
+
["../../../../wt-aide-ui/host/guides/revenir-en-arriere.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Frevenir-en-arriere.mdx&astroContentModuleFlag=true")],
|
|
21
|
+
["../../../../wt-aide-ui/host/guides/site-statique.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Fsite-statique.mdx&astroContentModuleFlag=true")],
|
|
22
|
+
["../../../../wt-aide-ui/host/guides/synchroniser-doppler.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Fsynchroniser-doppler.mdx&astroContentModuleFlag=true")],
|
|
23
|
+
["../../../../wt-aide-ui/host/guides/variables-d-environnement.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Fguides%2Fvariables-d-environnement.mdx&astroContentModuleFlag=true")],
|
|
24
|
+
["../../../../wt-aide-ui/host/index.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Findex.mdx&astroContentModuleFlag=true")],
|
|
25
|
+
["../../../../wt-aide-ui/host/reference/api/deploiements.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fapi%2Fdeploiements.mdx&astroContentModuleFlag=true")],
|
|
26
|
+
["../../../../wt-aide-ui/host/reference/api/erreurs.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fapi%2Ferreurs.mdx&astroContentModuleFlag=true")],
|
|
27
|
+
["../../../../wt-aide-ui/host/reference/api/fichiers.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fapi%2Ffichiers.mdx&astroContentModuleFlag=true")],
|
|
28
|
+
["../../../../wt-aide-ui/host/reference/api/introduction.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fapi%2Fintroduction.mdx&astroContentModuleFlag=true")],
|
|
29
|
+
["../../../../wt-aide-ui/host/reference/api/projets.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fapi%2Fprojets.mdx&astroContentModuleFlag=true")],
|
|
30
|
+
["../../../../wt-aide-ui/host/reference/api/utilisateur.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fapi%2Futilisateur.mdx&astroContentModuleFlag=true")],
|
|
31
|
+
["../../../../wt-aide-ui/host/reference/api/variables.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fapi%2Fvariables.mdx&astroContentModuleFlag=true")],
|
|
32
|
+
["../../../../wt-aide-ui/host/reference/cli.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fcli.mdx&astroContentModuleFlag=true")],
|
|
33
|
+
["../../../../wt-aide-ui/host/reference/compatibilite.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fcompatibilite.mdx&astroContentModuleFlag=true")],
|
|
34
|
+
["../../../../wt-aide-ui/host/reference/domaines.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fdomaines.mdx&astroContentModuleFlag=true")],
|
|
35
|
+
["../../../../wt-aide-ui/host/reference/limites.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Flimites.mdx&astroContentModuleFlag=true")],
|
|
36
|
+
["../../../../wt-aide-ui/host/reference/variables.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fvariables.mdx&astroContentModuleFlag=true")],
|
|
37
|
+
["../../../../wt-aide-ui/host/reference/vercel-json.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2F..%2Fwt-aide-ui%2Fhost%2Freference%2Fvercel-json.mdx&astroContentModuleFlag=true")]]);
|
|
18
38
|
|