@grove-dev/astro 0.2.2 → 0.2.6
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/LICENSE +21 -0
- package/package.json +4 -4
- package/src/components/ItemCard.astro +35 -18
- package/src/components/{AppSection.astro → RecordSection.astro} +11 -6
- package/templates/default/src/data/records.ts +61 -29
- package/templates/default/src/pages/index.astro +23 -18
- package/templates/default/.astro/content.d.ts +0 -155
- package/templates/default/.astro/settings.json +0 -5
- package/templates/default/.astro/types.d.ts +0 -2
- package/templates/default/dist/_astro/BaseLayout.DfpwR3jc.css +0 -1
- package/templates/default/dist/about/index.html +0 -165
- package/templates/default/dist/icons/platforms/android.svg +0 -1
- package/templates/default/dist/icons/platforms/apple-dark.svg +0 -1
- package/templates/default/dist/icons/platforms/apple-light.svg +0 -1
- package/templates/default/dist/icons/platforms/chrome.svg +0 -1
- package/templates/default/dist/icons/platforms/chromeos.svg +0 -5
- package/templates/default/dist/icons/platforms/desktop.svg +0 -4
- package/templates/default/dist/icons/platforms/embedded.svg +0 -5
- package/templates/default/dist/icons/platforms/ios.svg +0 -1
- package/templates/default/dist/icons/platforms/linux.svg +0 -1
- package/templates/default/dist/icons/platforms/macos.svg +0 -1
- package/templates/default/dist/icons/platforms/ubuntu.svg +0 -1
- package/templates/default/dist/icons/platforms/web.svg +0 -5
- package/templates/default/dist/icons/platforms/windows.svg +0 -6
- package/templates/default/dist/icons/stacks/android.svg +0 -1
- package/templates/default/dist/icons/stacks/apple-dark.svg +0 -1
- package/templates/default/dist/icons/stacks/apple-light.svg +0 -1
- package/templates/default/dist/icons/stacks/capacitor.svg +0 -14
- package/templates/default/dist/icons/stacks/dart.svg +0 -1
- package/templates/default/dist/icons/stacks/firebase.svg +0 -1
- package/templates/default/dist/icons/stacks/flutter.svg +0 -1
- package/templates/default/dist/icons/stacks/graphql.svg +0 -1
- package/templates/default/dist/icons/stacks/ionic.svg +0 -4
- package/templates/default/dist/icons/stacks/java.svg +0 -1
- package/templates/default/dist/icons/stacks/javascript.svg +0 -1
- package/templates/default/dist/icons/stacks/kotlin.svg +0 -1
- package/templates/default/dist/icons/stacks/mongodb.svg +0 -1
- package/templates/default/dist/icons/stacks/nodejs.svg +0 -1
- package/templates/default/dist/icons/stacks/python.svg +0 -1
- package/templates/default/dist/icons/stacks/react-native.svg +0 -1
- package/templates/default/dist/icons/stacks/react.svg +0 -1
- package/templates/default/dist/icons/stacks/rust.svg +0 -1
- package/templates/default/dist/icons/stacks/solidity.svg +0 -1
- package/templates/default/dist/icons/stacks/swift.svg +0 -1
- package/templates/default/dist/icons/stacks/tensorflow.svg +0 -1
- package/templates/default/dist/icons/stacks/typescript.svg +0 -1
- package/templates/default/dist/index.html +0 -55
- package/templates/default/dist/llms-full.txt +0 -14
- package/templates/default/dist/llms.txt +0 -11
- package/templates/default/dist/og-image.svg +0 -48
- package/templates/default/dist/projects/index.html +0 -61
- package/templates/default/dist/robots.txt +0 -53
- package/templates/default/dist/sitemap.xml +0 -21
- package/templates/default/dist/submit/index.html +0 -69
- package/templates/default/node_modules/.bin/astro +0 -21
- package/templates/default/node_modules/.bin/astro-check +0 -21
- package/templates/default/node_modules/.bin/grove +0 -21
- package/templates/default/node_modules/.bin/jiti +0 -21
- package/templates/default/node_modules/.bin/prettier +0 -21
- package/templates/default/node_modules/.bin/rollup +0 -21
- package/templates/default/node_modules/.bin/tsc +0 -21
- package/templates/default/node_modules/.bin/tsserver +0 -21
- package/templates/default/node_modules/.bin/tsx +0 -21
- package/templates/default/node_modules/.bin/vite +0 -21
- package/templates/default/node_modules/.bin/yaml +0 -21
- package/templates/default/node_modules/.vite/deps/_metadata.json +0 -79
- package/templates/default/node_modules/.vite/deps/astro-KRVZHBC5.js +0 -433
- package/templates/default/node_modules/.vite/deps/astro-KRVZHBC5.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/astro___aria-query.js +0 -5
- package/templates/default/node_modules/.vite/deps/astro___aria-query.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/astro___axobject-query.js +0 -5
- package/templates/default/node_modules/.vite/deps/astro___axobject-query.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/astro___html-escaper.js +0 -9
- package/templates/default/node_modules/.vite/deps/astro___html-escaper.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js +0 -241
- package/templates/default/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/audit-GYHQ3ITH.js +0 -1592
- package/templates/default/node_modules/.vite/deps/audit-GYHQ3ITH.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/chunk-5WRI5ZAA.js +0 -30
- package/templates/default/node_modules/.vite/deps/chunk-5WRI5ZAA.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/chunk-7P4KIK53.js +0 -186
- package/templates/default/node_modules/.vite/deps/chunk-7P4KIK53.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/chunk-BQGHFQJH.js +0 -48
- package/templates/default/node_modules/.vite/deps/chunk-BQGHFQJH.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/chunk-CJCDKWP2.js +0 -6779
- package/templates/default/node_modules/.vite/deps/chunk-CJCDKWP2.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/chunk-FHJ3XBDE.js +0 -33
- package/templates/default/node_modules/.vite/deps/chunk-FHJ3XBDE.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/chunk-FQEMNIUQ.js +0 -88
- package/templates/default/node_modules/.vite/deps/chunk-FQEMNIUQ.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/chunk-HBSVDAQD.js +0 -72
- package/templates/default/node_modules/.vite/deps/chunk-HBSVDAQD.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/chunk-HDOQ2U3U.js +0 -3757
- package/templates/default/node_modules/.vite/deps/chunk-HDOQ2U3U.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/chunk-XEBKRCNE.js +0 -54
- package/templates/default/node_modules/.vite/deps/chunk-XEBKRCNE.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/package.json +0 -3
- package/templates/default/node_modules/.vite/deps/settings-C5H4VHXU.js +0 -213
- package/templates/default/node_modules/.vite/deps/settings-C5H4VHXU.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/toolbar-H5DB6HVP.js +0 -525
- package/templates/default/node_modules/.vite/deps/toolbar-H5DB6HVP.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/ui-library-JGHU6JE2.js +0 -1020
- package/templates/default/node_modules/.vite/deps/ui-library-JGHU6JE2.js.map +0 -7
- package/templates/default/node_modules/.vite/deps/xray-EFCQOW4E.js +0 -147
- package/templates/default/node_modules/.vite/deps/xray-EFCQOW4E.js.map +0 -7
|
@@ -1,525 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
serverHelpers
|
|
3
|
-
} from "./chunk-FQEMNIUQ.js";
|
|
4
|
-
import {
|
|
5
|
-
getIconElement,
|
|
6
|
-
isDefinedIcon
|
|
7
|
-
} from "./chunk-BQGHFQJH.js";
|
|
8
|
-
import {
|
|
9
|
-
settings
|
|
10
|
-
} from "./chunk-7P4KIK53.js";
|
|
11
|
-
import "./chunk-5WRI5ZAA.js";
|
|
12
|
-
|
|
13
|
-
// ../../../../node_modules/.pnpm/astro@6.4.5_@types+node@25.9.2_jiti@2.7.0_lightningcss@1.32.0_rollup@4.61.1_tsx@4.22.4_yaml@2.9.0/node_modules/astro/dist/runtime/client/dev-toolbar/toolbar.js
|
|
14
|
-
var WS_EVENT_NAME = "astro-dev-toolbar";
|
|
15
|
-
var HOVER_DELAY = 2 * 1e3;
|
|
16
|
-
var DEVBAR_HITBOX_ABOVE = 42;
|
|
17
|
-
var AstroDevToolbar = class extends HTMLElement {
|
|
18
|
-
shadowRoot;
|
|
19
|
-
delayedHideTimeout;
|
|
20
|
-
devToolbarContainer;
|
|
21
|
-
apps = [];
|
|
22
|
-
hasBeenInitialized = false;
|
|
23
|
-
// TODO: This should be dynamic based on the screen size or at least configurable, erika - 2023-11-29
|
|
24
|
-
customAppsToShow = 3;
|
|
25
|
-
constructor() {
|
|
26
|
-
super();
|
|
27
|
-
this.shadowRoot = this.attachShadow({ mode: "open" });
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* All one-time DOM setup runs through here. Only ever call this once,
|
|
31
|
-
* in connectedCallback(), and protect it from being called again.
|
|
32
|
-
*/
|
|
33
|
-
init() {
|
|
34
|
-
this.shadowRoot.innerHTML = `
|
|
35
|
-
<style>
|
|
36
|
-
:host {
|
|
37
|
-
/* Important! Reset all inherited styles to initial */
|
|
38
|
-
all: initial;
|
|
39
|
-
z-index: 999999;
|
|
40
|
-
view-transition-name: astro-dev-toolbar;
|
|
41
|
-
display: contents;
|
|
42
|
-
|
|
43
|
-
/* Hide the dev toolbar on window.print() (CTRL + P) */
|
|
44
|
-
@media print {
|
|
45
|
-
display: none;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
::view-transition-old(astro-dev-toolbar),
|
|
50
|
-
::view-transition-new(astro-dev-toolbar) {
|
|
51
|
-
animation: none;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
#dev-toolbar-root {
|
|
55
|
-
position: fixed;
|
|
56
|
-
bottom: 0px;
|
|
57
|
-
z-index: 2000000010;
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-direction: column;
|
|
60
|
-
align-items: center;
|
|
61
|
-
transition: bottom 0.35s cubic-bezier(0.485, -0.050, 0.285, 1.505);
|
|
62
|
-
pointer-events: none;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
#dev-toolbar-root[data-hidden] {
|
|
66
|
-
bottom: -40px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
#dev-toolbar-root[data-hidden] #dev-bar .item {
|
|
70
|
-
opacity: 0.2;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
#dev-toolbar-root[data-placement="bottom-left"] {
|
|
74
|
-
left: 16px;
|
|
75
|
-
}
|
|
76
|
-
#dev-toolbar-root[data-placement="bottom-center"] {
|
|
77
|
-
left: 50%;
|
|
78
|
-
transform: translateX(-50%);
|
|
79
|
-
}
|
|
80
|
-
#dev-toolbar-root[data-placement="bottom-right"] {
|
|
81
|
-
right: 16px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
#dev-bar-hitbox-above,
|
|
85
|
-
#dev-bar-hitbox-below {
|
|
86
|
-
width: 100%;
|
|
87
|
-
pointer-events: auto;
|
|
88
|
-
}
|
|
89
|
-
#dev-bar-hitbox-above {
|
|
90
|
-
height: ${DEVBAR_HITBOX_ABOVE}px;
|
|
91
|
-
}
|
|
92
|
-
#dev-bar-hitbox-below {
|
|
93
|
-
height: 16px;
|
|
94
|
-
}
|
|
95
|
-
#dev-bar {
|
|
96
|
-
height: 40px;
|
|
97
|
-
overflow: hidden;
|
|
98
|
-
pointer-events: auto;
|
|
99
|
-
background: linear-gradient(180deg, #13151A 0%, rgba(19, 21, 26, 0.88) 100%);
|
|
100
|
-
border: 1px solid #343841;
|
|
101
|
-
border-radius: 9999px;
|
|
102
|
-
box-shadow: 0px 0px 0px 0px rgba(19, 21, 26, 0.30), 0px 1px 2px 0px rgba(19, 21, 26, 0.29), 0px 4px 4px 0px rgba(19, 21, 26, 0.26), 0px 10px 6px 0px rgba(19, 21, 26, 0.15), 0px 17px 7px 0px rgba(19, 21, 26, 0.04), 0px 26px 7px 0px rgba(19, 21, 26, 0.01);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@media (forced-colors: active) {
|
|
106
|
-
#dev-bar {
|
|
107
|
-
background: white;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
#dev-bar .item {
|
|
112
|
-
display: flex;
|
|
113
|
-
justify-content: center;
|
|
114
|
-
align-items: center;
|
|
115
|
-
width: 44px;
|
|
116
|
-
border: 0;
|
|
117
|
-
background: transparent;
|
|
118
|
-
color: white;
|
|
119
|
-
font-family: system-ui, sans-serif;
|
|
120
|
-
font-size: 1rem;
|
|
121
|
-
line-height: 1.2;
|
|
122
|
-
white-space: nowrap;
|
|
123
|
-
text-decoration: none;
|
|
124
|
-
padding: 0;
|
|
125
|
-
margin: 0;
|
|
126
|
-
overflow: hidden;
|
|
127
|
-
transition: opacity 0.2s ease-out 0s;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
#dev-bar #bar-container .item:hover, #dev-bar #bar-container .item:focus-visible {
|
|
131
|
-
background: #FFFFFF20;
|
|
132
|
-
cursor: pointer;
|
|
133
|
-
outline-offset: -3px;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
#dev-bar #bar-container .item[data-app-error]:hover, #dev-bar #bar-container .item[data-app-error]:focus-visible {
|
|
137
|
-
cursor: not-allowed;
|
|
138
|
-
background: #ff252520;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
#dev-bar .item:first-of-type {
|
|
142
|
-
border-top-left-radius: 9999px;
|
|
143
|
-
border-bottom-left-radius: 9999px;
|
|
144
|
-
width: 42px;
|
|
145
|
-
padding-left: 4px;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
#dev-bar .item:last-of-type {
|
|
149
|
-
border-top-right-radius: 9999px;
|
|
150
|
-
border-bottom-right-radius: 9999px;
|
|
151
|
-
width: 42px;
|
|
152
|
-
padding-right: 4px;
|
|
153
|
-
}
|
|
154
|
-
#dev-bar #bar-container .item.active {
|
|
155
|
-
background: rgba(71, 78, 94, 1);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
#dev-bar .item-tooltip {
|
|
159
|
-
background: linear-gradient(0deg, #13151A, #13151A), linear-gradient(0deg, #343841, #343841);
|
|
160
|
-
border: 1px solid rgba(52, 56, 65, 1);
|
|
161
|
-
border-radius: 4px;
|
|
162
|
-
padding: 4px 8px;
|
|
163
|
-
position: absolute;
|
|
164
|
-
top: ${4 - DEVBAR_HITBOX_ABOVE}px;
|
|
165
|
-
font-size: 14px;
|
|
166
|
-
opacity: 0;
|
|
167
|
-
transition: opacity 0.2s ease-in-out 0s;
|
|
168
|
-
pointer-events: none;
|
|
169
|
-
user-select: none;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
#dev-bar .item-tooltip::after{
|
|
173
|
-
content: '';
|
|
174
|
-
position: absolute;
|
|
175
|
-
left: calc(50% - 5px);
|
|
176
|
-
bottom: -6px;
|
|
177
|
-
border-left: 5px solid transparent;
|
|
178
|
-
border-right: 5px solid transparent;
|
|
179
|
-
border-top: 5px solid #343841;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
#dev-bar .item[data-app-error] .icon {
|
|
183
|
-
opacity: 0.35;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
#dev-bar .item:hover .item-tooltip, #dev-bar .item:not(.active):focus-visible .item-tooltip {
|
|
187
|
-
transition: opacity 0.2s ease-in-out 200ms;
|
|
188
|
-
opacity: 1;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
@media (forced-colors: active) {
|
|
192
|
-
#dev-bar .item:hover .item-tooltip,
|
|
193
|
-
#dev-bar .item:not(.active):focus-visible .item-tooltip {
|
|
194
|
-
background: white;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
#dev-bar #bar-container .item:hover .notification rect, #dev-bar #bar-container .item:hover .notification path {
|
|
199
|
-
stroke: #38393D;
|
|
200
|
-
--fill: var(--fill-hover);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
#dev-bar #bar-container .item.active .notification rect, #dev-bar #bar-container .item.active .notification path {
|
|
204
|
-
stroke: #454C5C;
|
|
205
|
-
--fill: var(--fill-hover);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
#dev-bar .item .icon {
|
|
209
|
-
position: relative;
|
|
210
|
-
max-width: 20px;
|
|
211
|
-
max-height: 20px;
|
|
212
|
-
user-select: none;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
#dev-bar .item .icon>svg {
|
|
216
|
-
width: 20px;
|
|
217
|
-
height: 20px;
|
|
218
|
-
display: block;
|
|
219
|
-
margin: auto;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
@media (forced-colors: active) {
|
|
223
|
-
#dev-bar .item svg path[fill="#fff"] {
|
|
224
|
-
fill: black;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
#dev-bar .item .notification {
|
|
229
|
-
display: none;
|
|
230
|
-
position: absolute;
|
|
231
|
-
top: -4px;
|
|
232
|
-
right: -6px;
|
|
233
|
-
width: 10px;
|
|
234
|
-
height: 10px;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
#dev-bar .item .notification svg {
|
|
238
|
-
display: block;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
#dev-toolbar-root:not([data-no-notification]) #dev-bar .item .notification[data-active] {
|
|
242
|
-
display: block;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
#dev-bar #bar-container {
|
|
246
|
-
height: 100%;
|
|
247
|
-
display: flex;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
#dev-bar .separator {
|
|
251
|
-
background: rgba(52, 56, 65, 1);
|
|
252
|
-
width: 1px;
|
|
253
|
-
}
|
|
254
|
-
</style>
|
|
255
|
-
<div id="dev-toolbar-root" data-hidden ${settings.config.disableAppNotification ? "data-no-notification" : ""} data-placement="${settings.config.placement}">
|
|
256
|
-
<div id="dev-bar-hitbox-above"></div>
|
|
257
|
-
<div id="dev-bar">
|
|
258
|
-
<div id="bar-container">
|
|
259
|
-
${this.apps.filter((app) => app.builtIn && !["astro:settings", "astro:more"].includes(app.id)).map((app) => this.getAppTemplate(app)).join("")}
|
|
260
|
-
${this.apps.filter((app) => !app.builtIn).length > 0 ? `<div class="separator"></div>${this.apps.filter((app) => !app.builtIn).slice(0, this.customAppsToShow).map((app) => this.getAppTemplate(app)).join("")}` : ""}
|
|
261
|
-
${this.apps.filter((app) => !app.builtIn).length > this.customAppsToShow ? this.getAppTemplate(
|
|
262
|
-
this.apps.find((app) => app.builtIn && app.id === "astro:more")
|
|
263
|
-
) : ""}
|
|
264
|
-
<div class="separator"></div>
|
|
265
|
-
${this.getAppTemplate(
|
|
266
|
-
this.apps.find((app) => app.builtIn && app.id === "astro:settings")
|
|
267
|
-
)}
|
|
268
|
-
</div>
|
|
269
|
-
</div>
|
|
270
|
-
<div id="dev-bar-hitbox-below"></div>
|
|
271
|
-
</div>`;
|
|
272
|
-
this.devToolbarContainer = this.shadowRoot.querySelector("#dev-toolbar-root");
|
|
273
|
-
this.attachEvents();
|
|
274
|
-
this.apps.forEach(async (app) => {
|
|
275
|
-
settings.logger.verboseLog(`Creating app canvas for ${app.id}`);
|
|
276
|
-
const appCanvas = document.createElement("astro-dev-toolbar-app-canvas");
|
|
277
|
-
appCanvas.dataset.appId = app.id;
|
|
278
|
-
this.shadowRoot?.append(appCanvas);
|
|
279
|
-
});
|
|
280
|
-
if ("requestIdleCallback" in window) {
|
|
281
|
-
window.requestIdleCallback(
|
|
282
|
-
async () => {
|
|
283
|
-
this.apps.map((app) => this.initApp(app));
|
|
284
|
-
},
|
|
285
|
-
{ timeout: 300 }
|
|
286
|
-
);
|
|
287
|
-
} else {
|
|
288
|
-
setTimeout(async () => {
|
|
289
|
-
this.apps.map((app) => this.initApp(app));
|
|
290
|
-
}, 300);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
// This is called whenever the component is connected to the DOM.
|
|
294
|
-
// This happens on first page load, and on each page change when
|
|
295
|
-
// view transitions are used.
|
|
296
|
-
connectedCallback() {
|
|
297
|
-
if (!this.hasBeenInitialized) {
|
|
298
|
-
this.init();
|
|
299
|
-
this.hasBeenInitialized = true;
|
|
300
|
-
}
|
|
301
|
-
this.apps.forEach(async (app) => {
|
|
302
|
-
await this.setAppStatus(app, app.active);
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
attachEvents() {
|
|
306
|
-
const items = this.shadowRoot.querySelectorAll(".item");
|
|
307
|
-
items.forEach((item) => {
|
|
308
|
-
item.addEventListener("click", async (event) => {
|
|
309
|
-
const target = event.currentTarget;
|
|
310
|
-
if (!target || !(target instanceof HTMLElement)) return;
|
|
311
|
-
const id = target.dataset.appId;
|
|
312
|
-
if (!id) return;
|
|
313
|
-
const app = this.getAppById(id);
|
|
314
|
-
if (!app) return;
|
|
315
|
-
event.stopPropagation();
|
|
316
|
-
await this.toggleAppStatus(app);
|
|
317
|
-
});
|
|
318
|
-
});
|
|
319
|
-
["mouseenter", "focusin"].forEach((event) => {
|
|
320
|
-
this.devToolbarContainer.addEventListener(event, () => {
|
|
321
|
-
this.clearDelayedHide();
|
|
322
|
-
if (this.isHidden()) {
|
|
323
|
-
this.setToolbarVisible(true);
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
});
|
|
327
|
-
["mouseleave", "focusout"].forEach((event) => {
|
|
328
|
-
this.devToolbarContainer.addEventListener(event, () => {
|
|
329
|
-
this.clearDelayedHide();
|
|
330
|
-
if (this.getActiveApp() || this.isHidden()) {
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
this.triggerDelayedHide();
|
|
334
|
-
});
|
|
335
|
-
});
|
|
336
|
-
document.addEventListener("keyup", (event) => {
|
|
337
|
-
if (event.key !== "Escape") return;
|
|
338
|
-
if (this.isHidden()) return;
|
|
339
|
-
const activeApp = this.getActiveApp();
|
|
340
|
-
if (activeApp) {
|
|
341
|
-
this.toggleAppStatus(activeApp);
|
|
342
|
-
} else {
|
|
343
|
-
this.setToolbarVisible(false);
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
async initApp(app) {
|
|
348
|
-
const shadowRoot = this.getAppCanvasById(app.id).shadowRoot;
|
|
349
|
-
app.status = "loading";
|
|
350
|
-
try {
|
|
351
|
-
settings.logger.verboseLog(`Initializing app ${app.id}`);
|
|
352
|
-
await app.init?.(shadowRoot, app.eventTarget, serverHelpers);
|
|
353
|
-
app.status = "ready";
|
|
354
|
-
if (import.meta.hot) {
|
|
355
|
-
import.meta.hot.send(`${WS_EVENT_NAME}:${app.id}:initialized`);
|
|
356
|
-
}
|
|
357
|
-
} catch (e) {
|
|
358
|
-
console.error(`Failed to init app ${app.id}, error: ${e}`);
|
|
359
|
-
app.status = "error";
|
|
360
|
-
if (import.meta.hot) {
|
|
361
|
-
import.meta.hot.send("astro:devtoolbar:error:init", {
|
|
362
|
-
app,
|
|
363
|
-
error: e instanceof Error ? e.stack : e
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
const appButton = this.getAppButtonById(app.id);
|
|
367
|
-
const appTooltip = appButton?.querySelector(".item-tooltip");
|
|
368
|
-
if (appButton && appTooltip) {
|
|
369
|
-
appButton.toggleAttribute("data-app-error", true);
|
|
370
|
-
appTooltip.innerText = `Error initializing ${app.name}`;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
getAppTemplate(app) {
|
|
375
|
-
return `<button class="item" data-app-id="${app.id}">
|
|
376
|
-
<div class="icon">${app.icon ? getAppIcon(app.icon) : "?"}<div class="notification"></div></div>
|
|
377
|
-
<span class="item-tooltip">${app.name}</span>
|
|
378
|
-
</button>`;
|
|
379
|
-
}
|
|
380
|
-
getAppById(id) {
|
|
381
|
-
return this.apps.find((app) => app.id === id);
|
|
382
|
-
}
|
|
383
|
-
getAppCanvasById(id) {
|
|
384
|
-
return this.shadowRoot.querySelector(
|
|
385
|
-
`astro-dev-toolbar-app-canvas[data-app-id="${id}"]`
|
|
386
|
-
);
|
|
387
|
-
}
|
|
388
|
-
getAppButtonById(id) {
|
|
389
|
-
return this.shadowRoot.querySelector(`[data-app-id="${id}"]`);
|
|
390
|
-
}
|
|
391
|
-
async toggleAppStatus(app) {
|
|
392
|
-
const activeApp = this.getActiveApp();
|
|
393
|
-
if (activeApp) {
|
|
394
|
-
const closeApp = await this.setAppStatus(activeApp, false);
|
|
395
|
-
if (!closeApp) return;
|
|
396
|
-
}
|
|
397
|
-
if (app.status !== "ready") return;
|
|
398
|
-
if (app !== activeApp) {
|
|
399
|
-
await this.setAppStatus(app, true);
|
|
400
|
-
if (import.meta.hot && app.id !== "astro:more") {
|
|
401
|
-
import.meta.hot.send("astro:devtoolbar:app:toggled", {
|
|
402
|
-
app
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
async setAppStatus(app, newStatus) {
|
|
408
|
-
const appCanvas = this.getAppCanvasById(app.id);
|
|
409
|
-
if (!appCanvas) return false;
|
|
410
|
-
if (app.active && !newStatus && app.beforeTogglingOff) {
|
|
411
|
-
const shouldToggleOff = await app.beforeTogglingOff(appCanvas.shadowRoot);
|
|
412
|
-
if (!shouldToggleOff) return false;
|
|
413
|
-
}
|
|
414
|
-
app.active = newStatus ?? !app.active;
|
|
415
|
-
const mainBarButton = this.getAppButtonById(app.id);
|
|
416
|
-
const moreBarButton = this.getAppCanvasById("astro:more")?.shadowRoot?.querySelector(
|
|
417
|
-
`[data-app-id="${app.id}"]`
|
|
418
|
-
);
|
|
419
|
-
if (mainBarButton) {
|
|
420
|
-
mainBarButton.classList.toggle("active", app.active);
|
|
421
|
-
}
|
|
422
|
-
if (moreBarButton) {
|
|
423
|
-
moreBarButton.classList.toggle("active", app.active);
|
|
424
|
-
}
|
|
425
|
-
if (app.active) {
|
|
426
|
-
appCanvas.style.display = "block";
|
|
427
|
-
appCanvas.setAttribute("data-active", "");
|
|
428
|
-
} else {
|
|
429
|
-
appCanvas.style.display = "none";
|
|
430
|
-
appCanvas.removeAttribute("data-active");
|
|
431
|
-
}
|
|
432
|
-
app.eventTarget.dispatchEvent(
|
|
433
|
-
new CustomEvent("app-toggled", {
|
|
434
|
-
detail: {
|
|
435
|
-
state: app.active,
|
|
436
|
-
app
|
|
437
|
-
}
|
|
438
|
-
})
|
|
439
|
-
);
|
|
440
|
-
import.meta.hot?.send(`${WS_EVENT_NAME}:${app.id}:toggled`, { state: app.active });
|
|
441
|
-
return true;
|
|
442
|
-
}
|
|
443
|
-
isHidden() {
|
|
444
|
-
return this.devToolbarContainer?.hasAttribute("data-hidden") ?? true;
|
|
445
|
-
}
|
|
446
|
-
getActiveApp() {
|
|
447
|
-
return this.apps.find((app) => app.active);
|
|
448
|
-
}
|
|
449
|
-
clearDelayedHide() {
|
|
450
|
-
window.clearTimeout(this.delayedHideTimeout);
|
|
451
|
-
this.delayedHideTimeout = void 0;
|
|
452
|
-
}
|
|
453
|
-
triggerDelayedHide() {
|
|
454
|
-
this.clearDelayedHide();
|
|
455
|
-
this.delayedHideTimeout = window.setTimeout(() => {
|
|
456
|
-
this.setToolbarVisible(false);
|
|
457
|
-
this.delayedHideTimeout = void 0;
|
|
458
|
-
}, HOVER_DELAY);
|
|
459
|
-
}
|
|
460
|
-
setToolbarVisible(newStatus) {
|
|
461
|
-
const barContainer = this.shadowRoot.querySelector("#bar-container");
|
|
462
|
-
const devBar = this.shadowRoot.querySelector("#dev-bar");
|
|
463
|
-
const devBarHitboxAbove = this.shadowRoot.querySelector("#dev-bar-hitbox-above");
|
|
464
|
-
if (newStatus === true) {
|
|
465
|
-
this.devToolbarContainer?.removeAttribute("data-hidden");
|
|
466
|
-
barContainer?.removeAttribute("inert");
|
|
467
|
-
devBar?.removeAttribute("tabindex");
|
|
468
|
-
if (devBarHitboxAbove) devBarHitboxAbove.style.height = "0";
|
|
469
|
-
return;
|
|
470
|
-
}
|
|
471
|
-
if (newStatus === false) {
|
|
472
|
-
this.devToolbarContainer?.setAttribute("data-hidden", "");
|
|
473
|
-
barContainer?.setAttribute("inert", "");
|
|
474
|
-
devBar?.setAttribute("tabindex", "0");
|
|
475
|
-
if (devBarHitboxAbove) devBarHitboxAbove.style.height = `${DEVBAR_HITBOX_ABOVE}px`;
|
|
476
|
-
return;
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
setNotificationVisible(newStatus) {
|
|
480
|
-
this.devToolbarContainer?.toggleAttribute("data-no-notification", !newStatus);
|
|
481
|
-
const moreCanvas = this.getAppCanvasById("astro:more");
|
|
482
|
-
moreCanvas?.shadowRoot?.querySelector("#dropdown")?.toggleAttribute("data-no-notification", !newStatus);
|
|
483
|
-
}
|
|
484
|
-
setToolbarPlacement(newPlacement) {
|
|
485
|
-
this.devToolbarContainer?.setAttribute("data-placement", newPlacement);
|
|
486
|
-
this.apps.forEach((app) => {
|
|
487
|
-
app.eventTarget.dispatchEvent(
|
|
488
|
-
new CustomEvent("placement-updated", {
|
|
489
|
-
detail: {
|
|
490
|
-
placement: newPlacement
|
|
491
|
-
}
|
|
492
|
-
})
|
|
493
|
-
);
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
var DevToolbarCanvas = class extends HTMLElement {
|
|
498
|
-
shadowRoot;
|
|
499
|
-
constructor() {
|
|
500
|
-
super();
|
|
501
|
-
this.shadowRoot = this.attachShadow({ mode: "open" });
|
|
502
|
-
}
|
|
503
|
-
connectedCallback() {
|
|
504
|
-
this.shadowRoot.innerHTML = `
|
|
505
|
-
<style>
|
|
506
|
-
:host {
|
|
507
|
-
position: absolute;
|
|
508
|
-
top: 0;
|
|
509
|
-
left: 0;
|
|
510
|
-
}
|
|
511
|
-
</style>`;
|
|
512
|
-
}
|
|
513
|
-
};
|
|
514
|
-
function getAppIcon(icon) {
|
|
515
|
-
if (isDefinedIcon(icon)) {
|
|
516
|
-
return getIconElement(icon).outerHTML;
|
|
517
|
-
}
|
|
518
|
-
return icon;
|
|
519
|
-
}
|
|
520
|
-
export {
|
|
521
|
-
AstroDevToolbar,
|
|
522
|
-
DevToolbarCanvas,
|
|
523
|
-
getAppIcon
|
|
524
|
-
};
|
|
525
|
-
//# sourceMappingURL=toolbar-H5DB6HVP.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../node_modules/.pnpm/astro@6.4.5_@types+node@25.9.2_jiti@2.7.0_lightningcss@1.32.0_rollup@4.61.1_tsx@4.22.4_yaml@2.9.0/node_modules/astro/dist/runtime/client/dev-toolbar/toolbar.js"],
|
|
4
|
-
"sourcesContent": ["import { serverHelpers } from \"./helpers.js\";\nimport { settings } from \"./settings.js\";\nimport { getIconElement, isDefinedIcon } from \"./ui-library/icons.js\";\nconst WS_EVENT_NAME = \"astro-dev-toolbar\";\nconst HOVER_DELAY = 2 * 1e3;\nconst DEVBAR_HITBOX_ABOVE = 42;\nclass AstroDevToolbar extends HTMLElement {\n shadowRoot;\n delayedHideTimeout;\n devToolbarContainer;\n apps = [];\n hasBeenInitialized = false;\n // TODO: This should be dynamic based on the screen size or at least configurable, erika - 2023-11-29\n customAppsToShow = 3;\n constructor() {\n super();\n this.shadowRoot = this.attachShadow({ mode: \"open\" });\n }\n /**\n * All one-time DOM setup runs through here. Only ever call this once,\n * in connectedCallback(), and protect it from being called again.\n */\n init() {\n this.shadowRoot.innerHTML = `\n\t\t<style>\n\t\t\t:host {\n\t\t\t\t/* Important! Reset all inherited styles to initial */\n\t\t\t\tall: initial;\n\t\t\t\tz-index: 999999;\n\t\t\t\tview-transition-name: astro-dev-toolbar;\n\t\t\t\tdisplay: contents;\n\n\t\t\t\t/* Hide the dev toolbar on window.print() (CTRL + P) */\n\t\t\t\t@media print {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t::view-transition-old(astro-dev-toolbar),\n\t\t\t::view-transition-new(astro-dev-toolbar) {\n\t\t\t\tanimation: none;\n\t\t\t}\n\n\t\t\t#dev-toolbar-root {\n\t\t\t\tposition: fixed;\n\t\t\t\tbottom: 0px;\n\t\t\t\tz-index: 2000000010;\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\ttransition: bottom 0.35s cubic-bezier(0.485, -0.050, 0.285, 1.505);\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\n\t\t\t#dev-toolbar-root[data-hidden] {\n\t\t\t\tbottom: -40px;\n\t\t\t}\n\n\t\t\t#dev-toolbar-root[data-hidden] #dev-bar .item {\n\t\t\t\topacity: 0.2;\n\t\t\t}\n\n\t\t\t#dev-toolbar-root[data-placement=\"bottom-left\"] {\n\t\t\t\tleft: 16px;\n\t\t\t}\n\t\t\t#dev-toolbar-root[data-placement=\"bottom-center\"] {\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t}\n\t\t\t#dev-toolbar-root[data-placement=\"bottom-right\"] {\n\t\t\t\tright: 16px;\n\t\t\t}\n\n\t\t\t#dev-bar-hitbox-above,\n\t\t\t#dev-bar-hitbox-below {\n\t\t\t\twidth: 100%;\n\t\t\t\tpointer-events: auto;\n\t\t\t}\n\t\t\t#dev-bar-hitbox-above {\n\t\t\t\theight: ${DEVBAR_HITBOX_ABOVE}px;\n\t\t\t}\n\t\t\t#dev-bar-hitbox-below {\n\t\t\t\theight: 16px;\n\t\t\t}\n\t\t\t#dev-bar {\n\t\t\t\theight: 40px;\n\t\t\t\toverflow: hidden;\n\t\t\t\tpointer-events: auto;\n\t\t\t\tbackground: linear-gradient(180deg, #13151A 0%, rgba(19, 21, 26, 0.88) 100%);\n\t\t\t\tborder: 1px solid #343841;\n\t\t\t\tborder-radius: 9999px;\n\t\t\t\tbox-shadow: 0px 0px 0px 0px rgba(19, 21, 26, 0.30), 0px 1px 2px 0px rgba(19, 21, 26, 0.29), 0px 4px 4px 0px rgba(19, 21, 26, 0.26), 0px 10px 6px 0px rgba(19, 21, 26, 0.15), 0px 17px 7px 0px rgba(19, 21, 26, 0.04), 0px 26px 7px 0px rgba(19, 21, 26, 0.01);\n\t\t\t}\n\n\t\t\t@media (forced-colors: active) {\n\t\t\t\t#dev-bar {\n\t\t\t\t\tbackground: white;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t#dev-bar .item {\n\t\t\t\tdisplay: flex;\n\t\t\t\tjustify-content: center;\n\t\t\t\talign-items: center;\n\t\t\t\twidth: 44px;\n\t\t\t\tborder: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\tcolor: white;\n\t\t\t\tfont-family: system-ui, sans-serif;\n\t\t\t\tfont-size: 1rem;\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\tpadding: 0;\n\t\t\t\tmargin: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\ttransition: opacity 0.2s ease-out 0s;\n\t\t\t}\n\n\t\t\t#dev-bar #bar-container .item:hover, #dev-bar #bar-container .item:focus-visible {\n\t\t\t\tbackground: #FFFFFF20;\n\t\t\t\tcursor: pointer;\n\t\t\t\toutline-offset: -3px;\n\t\t\t}\n\n\t\t\t#dev-bar #bar-container .item[data-app-error]:hover, #dev-bar #bar-container .item[data-app-error]:focus-visible {\n\t\t\t\tcursor: not-allowed;\n\t\t\t\tbackground: #ff252520;\n\t\t\t}\n\n\t\t\t#dev-bar .item:first-of-type {\n\t\t\t\tborder-top-left-radius: 9999px;\n\t\t\t\tborder-bottom-left-radius: 9999px;\n\t\t\t\twidth: 42px;\n\t\t\t\tpadding-left: 4px;\n\t\t\t}\n\n\t\t\t#dev-bar .item:last-of-type {\n\t\t\t\tborder-top-right-radius: 9999px;\n\t\t\t\tborder-bottom-right-radius: 9999px;\n\t\t\t\twidth: 42px;\n\t\t\t\tpadding-right: 4px;\n\t\t\t}\n\t\t\t#dev-bar #bar-container .item.active {\n\t\t\t\tbackground: rgba(71, 78, 94, 1);\n\t\t\t}\n\n\t\t\t#dev-bar .item-tooltip {\n\t\t\t\tbackground: linear-gradient(0deg, #13151A, #13151A), linear-gradient(0deg, #343841, #343841);\n\t\t\t\tborder: 1px solid rgba(52, 56, 65, 1);\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: 4px 8px;\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ${4 - DEVBAR_HITBOX_ABOVE}px;\n\t\t\t\tfont-size: 14px;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition: opacity 0.2s ease-in-out 0s;\n\t\t\t\tpointer-events: none;\n\t\t\t\tuser-select: none;\n\t\t\t}\n\n\t\t\t#dev-bar .item-tooltip::after{\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: calc(50% - 5px);\n\t\t\t\tbottom: -6px;\n\t\t\t\tborder-left: 5px solid transparent;\n\t\t\t\tborder-right: 5px solid transparent;\n\t\t\t\tborder-top: 5px solid #343841;\n\t\t\t}\n\n\t\t\t#dev-bar .item[data-app-error] .icon {\n\t\t\t\topacity: 0.35;\n\t\t\t}\n\n\t\t\t#dev-bar .item:hover .item-tooltip, #dev-bar .item:not(.active):focus-visible .item-tooltip {\n\t\t\t\ttransition: opacity 0.2s ease-in-out 200ms;\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\t@media (forced-colors: active) {\n\t\t\t\t#dev-bar .item:hover .item-tooltip,\n\t\t\t\t#dev-bar .item:not(.active):focus-visible .item-tooltip {\n\t\t\t\t\tbackground: white;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t#dev-bar #bar-container .item:hover .notification rect, #dev-bar #bar-container .item:hover .notification path {\n\t\t\t\tstroke: #38393D;\n\t\t\t\t--fill: var(--fill-hover);\n\t\t\t}\n\n\t\t\t#dev-bar #bar-container .item.active .notification rect, #dev-bar #bar-container .item.active .notification path {\n\t\t\t\tstroke: #454C5C;\n\t\t\t\t--fill: var(--fill-hover);\n\t\t\t}\n\n\t\t\t#dev-bar .item .icon {\n\t\t\t\tposition: relative;\n\t\t\t\tmax-width: 20px;\n\t\t\t\tmax-height: 20px;\n\t\t\t\tuser-select: none;\n\t\t\t}\n\n\t\t\t#dev-bar .item .icon>svg {\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t\tdisplay: block;\n\t\t\t\tmargin: auto;\n\t\t\t}\n\n\t\t\t@media (forced-colors: active) {\n\t\t\t\t#dev-bar .item svg path[fill=\"#fff\"] {\n\t\t\t\t\tfill: black;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t#dev-bar .item .notification {\n\t\t\t\tdisplay: none;\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: -4px;\n\t\t\t\tright: -6px;\n\t\t\t\twidth: 10px;\n\t\t\t\theight: 10px;\n\t\t\t}\n\n\t\t\t#dev-bar .item .notification svg {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t#dev-toolbar-root:not([data-no-notification]) #dev-bar .item .notification[data-active] {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t#dev-bar #bar-container {\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\n\t\t\t#dev-bar .separator {\n\t\t\t\tbackground: rgba(52, 56, 65, 1);\n\t\t\t\twidth: 1px;\n\t\t\t}\n\t\t</style>\n\t\t<div id=\"dev-toolbar-root\" data-hidden ${settings.config.disableAppNotification ? \"data-no-notification\" : \"\"} data-placement=\"${settings.config.placement}\">\n\t\t\t<div id=\"dev-bar-hitbox-above\"></div>\n\t\t\t<div id=\"dev-bar\">\n\t\t\t\t<div id=\"bar-container\">\n\t\t\t\t\t${this.apps.filter((app) => app.builtIn && ![\"astro:settings\", \"astro:more\"].includes(app.id)).map((app) => this.getAppTemplate(app)).join(\"\")}\n\t\t\t\t\t${this.apps.filter((app) => !app.builtIn).length > 0 ? `<div class=\"separator\"></div>${this.apps.filter((app) => !app.builtIn).slice(0, this.customAppsToShow).map((app) => this.getAppTemplate(app)).join(\"\")}` : \"\"}\n\t\t\t\t\t${this.apps.filter((app) => !app.builtIn).length > this.customAppsToShow ? this.getAppTemplate(\n this.apps.find((app) => app.builtIn && app.id === \"astro:more\")\n ) : \"\"}\n\t\t\t\t\t<div class=\"separator\"></div>\n\t\t\t\t\t${this.getAppTemplate(\n this.apps.find((app) => app.builtIn && app.id === \"astro:settings\")\n )}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id=\"dev-bar-hitbox-below\"></div>\n\t\t</div>`;\n this.devToolbarContainer = this.shadowRoot.querySelector(\"#dev-toolbar-root\");\n this.attachEvents();\n this.apps.forEach(async (app) => {\n settings.logger.verboseLog(`Creating app canvas for ${app.id}`);\n const appCanvas = document.createElement(\"astro-dev-toolbar-app-canvas\");\n appCanvas.dataset.appId = app.id;\n this.shadowRoot?.append(appCanvas);\n });\n if (\"requestIdleCallback\" in window) {\n window.requestIdleCallback(\n async () => {\n this.apps.map((app) => this.initApp(app));\n },\n { timeout: 300 }\n );\n } else {\n setTimeout(async () => {\n this.apps.map((app) => this.initApp(app));\n }, 300);\n }\n }\n // This is called whenever the component is connected to the DOM.\n // This happens on first page load, and on each page change when\n // view transitions are used.\n connectedCallback() {\n if (!this.hasBeenInitialized) {\n this.init();\n this.hasBeenInitialized = true;\n }\n this.apps.forEach(async (app) => {\n await this.setAppStatus(app, app.active);\n });\n }\n attachEvents() {\n const items = this.shadowRoot.querySelectorAll(\".item\");\n items.forEach((item) => {\n item.addEventListener(\"click\", async (event) => {\n const target = event.currentTarget;\n if (!target || !(target instanceof HTMLElement)) return;\n const id = target.dataset.appId;\n if (!id) return;\n const app = this.getAppById(id);\n if (!app) return;\n event.stopPropagation();\n await this.toggleAppStatus(app);\n });\n });\n [\"mouseenter\", \"focusin\"].forEach((event) => {\n this.devToolbarContainer.addEventListener(event, () => {\n this.clearDelayedHide();\n if (this.isHidden()) {\n this.setToolbarVisible(true);\n }\n });\n });\n [\"mouseleave\", \"focusout\"].forEach((event) => {\n this.devToolbarContainer.addEventListener(event, () => {\n this.clearDelayedHide();\n if (this.getActiveApp() || this.isHidden()) {\n return;\n }\n this.triggerDelayedHide();\n });\n });\n document.addEventListener(\"keyup\", (event) => {\n if (event.key !== \"Escape\") return;\n if (this.isHidden()) return;\n const activeApp = this.getActiveApp();\n if (activeApp) {\n this.toggleAppStatus(activeApp);\n } else {\n this.setToolbarVisible(false);\n }\n });\n }\n async initApp(app) {\n const shadowRoot = this.getAppCanvasById(app.id).shadowRoot;\n app.status = \"loading\";\n try {\n settings.logger.verboseLog(`Initializing app ${app.id}`);\n await app.init?.(shadowRoot, app.eventTarget, serverHelpers);\n app.status = \"ready\";\n if (import.meta.hot) {\n import.meta.hot.send(`${WS_EVENT_NAME}:${app.id}:initialized`);\n }\n } catch (e) {\n console.error(`Failed to init app ${app.id}, error: ${e}`);\n app.status = \"error\";\n if (import.meta.hot) {\n import.meta.hot.send(\"astro:devtoolbar:error:init\", {\n app,\n error: e instanceof Error ? e.stack : e\n });\n }\n const appButton = this.getAppButtonById(app.id);\n const appTooltip = appButton?.querySelector(\".item-tooltip\");\n if (appButton && appTooltip) {\n appButton.toggleAttribute(\"data-app-error\", true);\n appTooltip.innerText = `Error initializing ${app.name}`;\n }\n }\n }\n getAppTemplate(app) {\n return `<button class=\"item\" data-app-id=\"${app.id}\">\n\t\t\t\t<div class=\"icon\">${app.icon ? getAppIcon(app.icon) : \"?\"}<div class=\"notification\"></div></div>\n\t\t\t\t<span class=\"item-tooltip\">${app.name}</span>\n\t\t\t</button>`;\n }\n getAppById(id) {\n return this.apps.find((app) => app.id === id);\n }\n getAppCanvasById(id) {\n return this.shadowRoot.querySelector(\n `astro-dev-toolbar-app-canvas[data-app-id=\"${id}\"]`\n );\n }\n getAppButtonById(id) {\n return this.shadowRoot.querySelector(`[data-app-id=\"${id}\"]`);\n }\n async toggleAppStatus(app) {\n const activeApp = this.getActiveApp();\n if (activeApp) {\n const closeApp = await this.setAppStatus(activeApp, false);\n if (!closeApp) return;\n }\n if (app.status !== \"ready\") return;\n if (app !== activeApp) {\n await this.setAppStatus(app, true);\n if (import.meta.hot && app.id !== \"astro:more\") {\n import.meta.hot.send(\"astro:devtoolbar:app:toggled\", {\n app\n });\n }\n }\n }\n async setAppStatus(app, newStatus) {\n const appCanvas = this.getAppCanvasById(app.id);\n if (!appCanvas) return false;\n if (app.active && !newStatus && app.beforeTogglingOff) {\n const shouldToggleOff = await app.beforeTogglingOff(appCanvas.shadowRoot);\n if (!shouldToggleOff) return false;\n }\n app.active = newStatus ?? !app.active;\n const mainBarButton = this.getAppButtonById(app.id);\n const moreBarButton = this.getAppCanvasById(\"astro:more\")?.shadowRoot?.querySelector(\n `[data-app-id=\"${app.id}\"]`\n );\n if (mainBarButton) {\n mainBarButton.classList.toggle(\"active\", app.active);\n }\n if (moreBarButton) {\n moreBarButton.classList.toggle(\"active\", app.active);\n }\n if (app.active) {\n appCanvas.style.display = \"block\";\n appCanvas.setAttribute(\"data-active\", \"\");\n } else {\n appCanvas.style.display = \"none\";\n appCanvas.removeAttribute(\"data-active\");\n }\n app.eventTarget.dispatchEvent(\n new CustomEvent(\"app-toggled\", {\n detail: {\n state: app.active,\n app\n }\n })\n );\n import.meta.hot?.send(`${WS_EVENT_NAME}:${app.id}:toggled`, { state: app.active });\n return true;\n }\n isHidden() {\n return this.devToolbarContainer?.hasAttribute(\"data-hidden\") ?? true;\n }\n getActiveApp() {\n return this.apps.find((app) => app.active);\n }\n clearDelayedHide() {\n window.clearTimeout(this.delayedHideTimeout);\n this.delayedHideTimeout = void 0;\n }\n triggerDelayedHide() {\n this.clearDelayedHide();\n this.delayedHideTimeout = window.setTimeout(() => {\n this.setToolbarVisible(false);\n this.delayedHideTimeout = void 0;\n }, HOVER_DELAY);\n }\n setToolbarVisible(newStatus) {\n const barContainer = this.shadowRoot.querySelector(\"#bar-container\");\n const devBar = this.shadowRoot.querySelector(\"#dev-bar\");\n const devBarHitboxAbove = this.shadowRoot.querySelector(\"#dev-bar-hitbox-above\");\n if (newStatus === true) {\n this.devToolbarContainer?.removeAttribute(\"data-hidden\");\n barContainer?.removeAttribute(\"inert\");\n devBar?.removeAttribute(\"tabindex\");\n if (devBarHitboxAbove) devBarHitboxAbove.style.height = \"0\";\n return;\n }\n if (newStatus === false) {\n this.devToolbarContainer?.setAttribute(\"data-hidden\", \"\");\n barContainer?.setAttribute(\"inert\", \"\");\n devBar?.setAttribute(\"tabindex\", \"0\");\n if (devBarHitboxAbove) devBarHitboxAbove.style.height = `${DEVBAR_HITBOX_ABOVE}px`;\n return;\n }\n }\n setNotificationVisible(newStatus) {\n this.devToolbarContainer?.toggleAttribute(\"data-no-notification\", !newStatus);\n const moreCanvas = this.getAppCanvasById(\"astro:more\");\n moreCanvas?.shadowRoot?.querySelector(\"#dropdown\")?.toggleAttribute(\"data-no-notification\", !newStatus);\n }\n setToolbarPlacement(newPlacement) {\n this.devToolbarContainer?.setAttribute(\"data-placement\", newPlacement);\n this.apps.forEach((app) => {\n app.eventTarget.dispatchEvent(\n new CustomEvent(\"placement-updated\", {\n detail: {\n placement: newPlacement\n }\n })\n );\n });\n }\n}\nclass DevToolbarCanvas extends HTMLElement {\n shadowRoot;\n constructor() {\n super();\n this.shadowRoot = this.attachShadow({ mode: \"open\" });\n }\n connectedCallback() {\n this.shadowRoot.innerHTML = `\n\t\t<style>\n\t\t\t:host {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t</style>`;\n }\n}\nfunction getAppIcon(icon) {\n if (isDefinedIcon(icon)) {\n return getIconElement(icon).outerHTML;\n }\n return icon;\n}\nexport {\n AstroDevToolbar,\n DevToolbarCanvas,\n getAppIcon\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;AAGA,IAAM,gBAAgB;AACtB,IAAM,cAAc,IAAI;AACxB,IAAM,sBAAsB;AAC5B,IAAM,kBAAN,cAA8B,YAAY;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AAAA,EACR,qBAAqB;AAAA;AAAA,EAErB,mBAAmB;AAAA,EACnB,cAAc;AACZ,UAAM;AACN,SAAK,aAAa,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAAA,EACtD;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO;AACL,SAAK,WAAW,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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