@poveste/app 0.19.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/app.css +174 -1
- package/dist/bundled/components/HomeView.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/app/AppLogo.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/bundled/components/app/TopBarChipItem.js +10 -6
- package/dist/bundled/components/layout/LayoutItem.js +1 -0
- package/dist/bundled/components/layout/LayoutItem.vue_vue_type_script_setup_true_lang.js +20 -23
- package/dist/bundled/components/panel/ComponentDocs.js +7 -0
- package/dist/bundled/components/panel/ComponentDocs.vue_vue_type_script_setup_true_lang.js +132 -0
- package/dist/bundled/components/panel/StoryDocs.vue_vue_type_script_setup_true_lang.js +32 -21
- package/dist/bundled/components/panel/StorySourceCode.js +1 -1
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js +20 -4
- package/dist/bundled/components/story/GenericMountStory.vue_vue_type_script_setup_true_lang.js +3 -7
- package/dist/bundled/components/story/GenericRenderStory.vue_vue_type_script_setup_true_lang.js +3 -10
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/bundled/util/client-plugin.js +22 -0
- package/dist/bundled/util/component-docs-data.js +1 -0
- package/dist/bundled/util/component-docs.js +57 -0
- package/dist/bundled/util/docs.js +1 -1
- package/dist/bundled/util/icons.generated.js +2 -2
- package/dist/bundled/util/mapping.js +1 -5
- package/dist/style.css +5 -46
- package/package.json +15 -15
- package/src/app/components/HomeView.vue +2 -2
- package/src/app/components/app/AppLogo.vue +4 -6
- package/src/app/components/app/TopBarChipItem.vue +55 -6
- package/src/app/components/layout/LayoutItem.vue +56 -6
- package/src/app/components/panel/ComponentDocs.vue +257 -0
- package/src/app/components/panel/StoryDocs.vue +11 -2
- package/src/app/components/panel/StorySourceCode.vue +27 -3
- package/src/app/components/story/GenericMountStory.vue +3 -5
- package/src/app/components/story/GenericRenderStory.vue +4 -12
- package/src/app/components/toolbar/DevOnlyToolbarOpenInEditor.vue +0 -1
- package/src/app/util/client-plugin.ts +33 -0
- package/src/app/util/component-docs-data.ts +3 -0
- package/src/app/util/component-docs.ts +78 -0
- package/src/app/util/icons.generated.ts +2 -2
- package/src/app/util/mapping.ts +1 -5
package/dist/bundled/app.css
CHANGED
|
@@ -1,4 +1,45 @@
|
|
|
1
1
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
2
|
+
.poveste-top-bar-chip-item {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: .25rem;
|
|
6
|
+
padding: .375rem .625rem;
|
|
7
|
+
border: 0;
|
|
8
|
+
font: inherit;
|
|
9
|
+
color: var(--color-gray-900);
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
12
|
+
transition: color .15s ease-out, background-color .15s ease-out;
|
|
13
|
+
}
|
|
14
|
+
&:hover {
|
|
15
|
+
background-color: rgb(255 255 255 / .5);
|
|
16
|
+
color: var(--color-primary-500);
|
|
17
|
+
}
|
|
18
|
+
&:active {
|
|
19
|
+
background-color: rgb(255 255 255 / .7);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Inset: the chip clips its items to its rounded border. */
|
|
23
|
+
&:focus-visible {
|
|
24
|
+
outline: 2px solid var(--color-primary-500);
|
|
25
|
+
outline-offset: -2px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Spelled out on the subject: `.ptw-dark` sits above the `@scope` root, so a
|
|
29
|
+
descendant rule keyed on it never matches from in here (#101). */
|
|
30
|
+
&:where(.ptw-dark, .ptw-dark *) {
|
|
31
|
+
color: var(--color-gray-100);
|
|
32
|
+
&:hover {
|
|
33
|
+
background-color: rgb(255 255 255 / .1);
|
|
34
|
+
color: var(--color-primary-400);
|
|
35
|
+
}
|
|
36
|
+
&:active {
|
|
37
|
+
background-color: rgb(255 255 255 / .15);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
2
43
|
.bind-tree-margin[data-v-83161585] {
|
|
3
44
|
margin-left: var(--v0299061e);
|
|
4
45
|
}
|
|
@@ -94,6 +135,46 @@ from {
|
|
|
94
135
|
}
|
|
95
136
|
}
|
|
96
137
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
138
|
+
.poveste-layout-item {
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
gap: 1rem;
|
|
142
|
+
width: 100%;
|
|
143
|
+
padding: 1rem 1.5rem;
|
|
144
|
+
border: 0;
|
|
145
|
+
font: inherit;
|
|
146
|
+
text-align: start;
|
|
147
|
+
color: var(--color-gray-900);
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
&:hover {
|
|
150
|
+
background-color: var(--color-primary-100);
|
|
151
|
+
}
|
|
152
|
+
&:focus-visible {
|
|
153
|
+
outline: 2px solid var(--color-primary-500);
|
|
154
|
+
outline-offset: -2px;
|
|
155
|
+
}
|
|
156
|
+
&.active {
|
|
157
|
+
background-color: var(--color-primary-500);
|
|
158
|
+
color: var(--color-white);
|
|
159
|
+
&:hover {
|
|
160
|
+
background-color: var(--color-primary-600);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Spelled out on the subject: `.ptw-dark` sits above the `@scope` root, so a
|
|
165
|
+
descendant rule keyed on it never matches from in here (#101). */
|
|
166
|
+
&:where(.ptw-dark, .ptw-dark *) {
|
|
167
|
+
color: var(--color-gray-100);
|
|
168
|
+
&:hover {
|
|
169
|
+
background-color: var(--color-primary-900);
|
|
170
|
+
}
|
|
171
|
+
&.active {
|
|
172
|
+
color: var(--color-black);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
97
178
|
/* Outside the layer — registration is document-global, not cascaded. */
|
|
98
179
|
@property --poveste-count {
|
|
99
180
|
syntax: '<integer>';
|
|
@@ -133,6 +214,98 @@ from {
|
|
|
133
214
|
}
|
|
134
215
|
}
|
|
135
216
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
217
|
+
.poveste-component-docs {
|
|
218
|
+
&[data-v-aa8468d5] {
|
|
219
|
+
padding: 1rem;
|
|
220
|
+
font-size: .875rem;
|
|
221
|
+
color: var(--color-gray-800);
|
|
222
|
+
|
|
223
|
+
/* On the subject, not `.ptw-dark &`: `.ptw-dark` sits above the `@scope` root (#101). */
|
|
224
|
+
}
|
|
225
|
+
&[data-v-aa8468d5]:where(.ptw-dark, .ptw-dark *) {
|
|
226
|
+
color: var(--color-gray-200);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
section + section[data-v-aa8468d5] {
|
|
230
|
+
margin-top: 1.5rem;
|
|
231
|
+
}
|
|
232
|
+
h3[data-v-aa8468d5] {
|
|
233
|
+
font-weight: 600;
|
|
234
|
+
font-size: 1rem;
|
|
235
|
+
margin-bottom: .5rem;
|
|
236
|
+
}
|
|
237
|
+
table[data-v-aa8468d5] {
|
|
238
|
+
width: 100%;
|
|
239
|
+
border-collapse: collapse;
|
|
240
|
+
margin-bottom: 1rem;
|
|
241
|
+
}
|
|
242
|
+
th[data-v-aa8468d5] {
|
|
243
|
+
text-align: start;
|
|
244
|
+
font-weight: 500;
|
|
245
|
+
color: var(--color-gray-500);
|
|
246
|
+
}
|
|
247
|
+
th,
|
|
248
|
+
td {
|
|
249
|
+
&[data-v-aa8468d5] {
|
|
250
|
+
padding: .375rem .5rem;
|
|
251
|
+
border-bottom: 1px solid var(--color-gray-200);
|
|
252
|
+
vertical-align: top;
|
|
253
|
+
}
|
|
254
|
+
&[data-v-aa8468d5]:where(.ptw-dark, .ptw-dark *) {
|
|
255
|
+
border-color: var(--color-gray-750);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
code {
|
|
259
|
+
&[data-v-aa8468d5] {
|
|
260
|
+
font-size: .8125rem;
|
|
261
|
+
background-color: var(--color-gray-100);
|
|
262
|
+
border-radius: .25rem;
|
|
263
|
+
padding: 0 .25rem;
|
|
264
|
+
}
|
|
265
|
+
&[data-v-aa8468d5]:where(.ptw-dark, .ptw-dark *) {
|
|
266
|
+
background-color: var(--color-gray-750);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
pre code[data-v-aa8468d5] {
|
|
270
|
+
display: block;
|
|
271
|
+
padding: .5rem;
|
|
272
|
+
margin-top: .25rem;
|
|
273
|
+
white-space: pre-wrap;
|
|
274
|
+
}
|
|
275
|
+
.deprecated[data-v-aa8468d5] {
|
|
276
|
+
text-decoration: line-through;
|
|
277
|
+
}
|
|
278
|
+
[data-slot='required'][data-v-aa8468d5] {
|
|
279
|
+
color: var(--color-red-500);
|
|
280
|
+
margin-inline-start: .125rem;
|
|
281
|
+
}
|
|
282
|
+
[data-slot='deprecated'],
|
|
283
|
+
[data-slot='default-conflict'] {
|
|
284
|
+
&[data-v-aa8468d5] {
|
|
285
|
+
color: var(--color-amber-600);
|
|
286
|
+
font-weight: 500;
|
|
287
|
+
}
|
|
288
|
+
&[data-v-aa8468d5]:where(.ptw-dark, .ptw-dark *) {
|
|
289
|
+
color: var(--color-amber-400);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
[data-slot='default-conflict'][data-v-aa8468d5] {
|
|
293
|
+
margin-inline-start: .25rem;
|
|
294
|
+
cursor: help;
|
|
295
|
+
}
|
|
296
|
+
[data-slot='see'][data-v-aa8468d5] {
|
|
297
|
+
display: block;
|
|
298
|
+
margin-top: .25rem;
|
|
299
|
+
}
|
|
300
|
+
a[data-slot='see'][data-v-aa8468d5] {
|
|
301
|
+
color: var(--color-primary-500);
|
|
302
|
+
text-decoration: underline;
|
|
303
|
+
}
|
|
304
|
+
[data-slot='error'][data-v-aa8468d5] {
|
|
305
|
+
color: var(--color-gray-500);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
136
309
|
.poveste-base-select-popper {
|
|
137
310
|
/* The trigger's own width, which is what floating-vue's `auto-size` gave. */
|
|
138
311
|
min-width: var(--reka-popper-anchor-width);
|
|
@@ -150,7 +323,7 @@ from {
|
|
|
150
323
|
}
|
|
151
324
|
}
|
|
152
325
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
153
|
-
.__poveste-code-placeholder[data-v-
|
|
326
|
+
.__poveste-code-placeholder[data-v-4b28d655] {
|
|
154
327
|
color: inherit;
|
|
155
328
|
font-size: inherit;
|
|
156
329
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { customLogos
|
|
1
|
+
import { customLogos } from "../util/config.js";
|
|
2
2
|
import { useStoryStore } from "../stores/story.js";
|
|
3
|
-
import
|
|
3
|
+
import "../assets/poveste.js";
|
|
4
4
|
import HomeCounter_default from "./app/HomeCounter.js";
|
|
5
5
|
import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock } from "@poveste/vendors/vue";
|
|
6
6
|
//#region src/app/components/HomeView.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -14,7 +14,7 @@ var _hoisted_3 = {
|
|
|
14
14
|
var HomeView_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
15
15
|
__name: "HomeView",
|
|
16
16
|
setup(__props) {
|
|
17
|
-
const logoUrl = computed(() =>
|
|
17
|
+
const logoUrl = computed(() => customLogos?.square ?? "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%20width='512'%20height='512'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='pv'%20x1='96'%20y1='416'%20x2='416'%20y2='96'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2324C56A'/%3e%3cstop%20offset='1'%20stop-color='%2317A6C6'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='16'%20y='16'%20width='480'%20height='480'%20rx='112'%20fill='url(%23pv)'/%3e%3crect%20x='140'%20y='142'%20width='232'%20height='44'%20rx='16'%20fill='%23fff'/%3e%3crect%20x='151'%20y='217'%20width='88'%20height='146'%20rx='9'%20stroke='%23fff'%20stroke-width='22'/%3e%3crect%20x='172'%20y='244'%20width='30'%20height='92'%20rx='13'%20fill='%23fff'/%3e%3crect%20x='262'%20y='206'%20width='110'%20height='168'%20rx='20'%20fill='%23fff'/%3e%3crect%20x='284'%20y='226'%20width='66'%20height='58'%20rx='13'%20fill='url(%23pv)'/%3e%3c/svg%3e");
|
|
18
18
|
const storyStore = useStoryStore();
|
|
19
19
|
const stats = computed(() => {
|
|
20
20
|
let storyCount = 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { customLogos, povesteConfig } from "../../util/config.js";
|
|
2
2
|
import { isDark } from "../../util/dark.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import "../../assets/poveste-text-dark.js";
|
|
4
|
+
import "../../assets/poveste-text.js";
|
|
5
5
|
import { computed, createElementBlock, defineComponent, openBlock } from "@poveste/vendors/vue";
|
|
6
6
|
//#region src/app/components/app/AppLogo.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _hoisted_1 = ["src", "alt"];
|
|
@@ -9,8 +9,8 @@ var AppLogo_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
9
9
|
__name: "AppLogo",
|
|
10
10
|
setup(__props) {
|
|
11
11
|
const logoUrl = computed(() => {
|
|
12
|
-
if (isDark.value) return
|
|
13
|
-
return
|
|
12
|
+
if (isDark.value) return customLogos?.dark ?? "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxODcwIDUxMiIgZmlsbD0ibm9uZSI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InB2dyIgeDE9Ijk2IiB5MT0iNDE2IiB4Mj0iNDE2IiB5Mj0iOTYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjMjRDNTZBIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE3QTZDNiIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+CiAgPHJlY3QgeD0iMTYiIHk9IjE2IiB3aWR0aD0iNDgwIiBoZWlnaHQ9IjQ4MCIgcng9IjExMiIgZmlsbD0idXJsKCNwdncpIi8+CiAgPHJlY3QgeD0iMTQwIiB5PSIxNDIiIHdpZHRoPSIyMzIiIGhlaWdodD0iNDQiIHJ4PSIxNiIgZmlsbD0iI2ZmZiIvPgogIDxyZWN0IHg9IjE1MSIgeT0iMjE3IiB3aWR0aD0iODgiIGhlaWdodD0iMTQ2IiByeD0iOSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjIyIi8+CiAgPHJlY3QgeD0iMTcyIiB5PSIyNDQiIHdpZHRoPSIzMCIgaGVpZ2h0PSI5MiIgcng9IjEzIiBmaWxsPSIjZmZmIi8+CiAgPHJlY3QgeD0iMjYyIiB5PSIyMDYiIHdpZHRoPSIxMTAiIGhlaWdodD0iMTY4IiByeD0iMjAiIGZpbGw9IiNmZmYiLz4KICA8cmVjdCB4PSIyODQiIHk9IjIyNiIgd2lkdGg9IjY2IiBoZWlnaHQ9IjU4IiByeD0iMTMiIGZpbGw9InVybCgjcHZ3KSIvPgogIDx0ZXh0IHg9IjY3NiIgeT0iMjU2IiBkb21pbmFudC1iYXNlbGluZT0iY2VudHJhbCIgZm9udC1mYW1pbHk9InVpLXNhbnMtc2VyaWYsIHN5c3RlbS11aSwgLWFwcGxlLXN5c3RlbSwgJ1NlZ29lIFVJJywgUm9ib3RvLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjMyMCIgZm9udC13ZWlnaHQ9IjQwMCIgbGV0dGVyLXNwYWNpbmc9Ii00IiBmaWxsPSIjZjhmYWZjIj5Qb3Zlc3RlPC90ZXh0Pgo8L3N2Zz4K";
|
|
13
|
+
return customLogos?.light ?? "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxODcwIDUxMiIgZmlsbD0ibm9uZSI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InB2dyIgeDE9Ijk2IiB5MT0iNDE2IiB4Mj0iNDE2IiB5Mj0iOTYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjMjRDNTZBIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE3QTZDNiIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+CiAgPHJlY3QgeD0iMTYiIHk9IjE2IiB3aWR0aD0iNDgwIiBoZWlnaHQ9IjQ4MCIgcng9IjExMiIgZmlsbD0idXJsKCNwdncpIi8+CiAgPHJlY3QgeD0iMTQwIiB5PSIxNDIiIHdpZHRoPSIyMzIiIGhlaWdodD0iNDQiIHJ4PSIxNiIgZmlsbD0iI2ZmZiIvPgogIDxyZWN0IHg9IjE1MSIgeT0iMjE3IiB3aWR0aD0iODgiIGhlaWdodD0iMTQ2IiByeD0iOSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjIyIi8+CiAgPHJlY3QgeD0iMTcyIiB5PSIyNDQiIHdpZHRoPSIzMCIgaGVpZ2h0PSI5MiIgcng9IjEzIiBmaWxsPSIjZmZmIi8+CiAgPHJlY3QgeD0iMjYyIiB5PSIyMDYiIHdpZHRoPSIxMTAiIGhlaWdodD0iMTY4IiByeD0iMjAiIGZpbGw9IiNmZmYiLz4KICA8cmVjdCB4PSIyODQiIHk9IjIyNiIgd2lkdGg9IjY2IiBoZWlnaHQ9IjU4IiByeD0iMTMiIGZpbGw9InVybCgjcHZ3KSIvPgogIDx0ZXh0IHg9IjY3NiIgeT0iMjU2IiBkb21pbmFudC1iYXNlbGluZT0iY2VudHJhbCIgZm9udC1mYW1pbHk9InVpLXNhbnMtc2VyaWYsIHN5c3RlbS11aSwgLWFwcGxlLXN5c3RlbSwgJ1NlZ29lIFVJJywgUm9ib3RvLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjMyMCIgZm9udC13ZWlnaHQ9IjQwMCIgbGV0dGVyLXNwYWNpbmc9Ii00IiBmaWxsPSIjMWUyOTNiIj5Qb3Zlc3RlPC90ZXh0Pgo8L3N2Zz4K";
|
|
14
14
|
});
|
|
15
15
|
const altText = computed(() => `${povesteConfig.theme.title} logo`);
|
|
16
16
|
return (_ctx, _cache) => {
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
-
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { createBlock, openBlock, renderSlot, resolveDynamicComponent, withCtx } from "@poveste/vendors/vue";
|
|
3
4
|
//#region src/app/components/app/TopBarChipItem.vue
|
|
4
5
|
var _sfc_main = {};
|
|
5
|
-
var _hoisted_1 = ["role"];
|
|
6
6
|
function _sfc_render(_ctx, _cache) {
|
|
7
|
-
return openBlock(),
|
|
8
|
-
|
|
9
|
-
class: "poveste-top-bar-chip-item
|
|
10
|
-
|
|
7
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.$attrs["href"] ? "a" : "button"), {
|
|
8
|
+
type: _ctx.$attrs["href"] ? void 0 : "button",
|
|
9
|
+
class: "poveste-top-bar-chip-item",
|
|
10
|
+
"data-slot": "top-bar-chip-item"
|
|
11
|
+
}, {
|
|
12
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
13
|
+
_: 3
|
|
14
|
+
}, 8, ["type"]);
|
|
11
15
|
}
|
|
12
16
|
var TopBarChipItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
|
|
13
17
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import LayoutItem_vue_vue_type_script_setup_true_lang_default from "./LayoutItem.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
/* empty css */
|
|
2
3
|
//#region src/app/components/layout/LayoutItem.vue
|
|
3
4
|
var LayoutItem_default = LayoutItem_vue_vue_type_script_setup_true_lang_default;
|
|
4
5
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "@poveste/vendors/vue";
|
|
1
|
+
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref } from "@poveste/vendors/vue";
|
|
3
2
|
import { Icon } from "@poveste/vendors/iconify";
|
|
4
3
|
//#region src/app/components/layout/LayoutItem.vue?vue&type=script&setup=true&lang.ts
|
|
5
4
|
var _hoisted_1 = { class: "flex-1" };
|
|
@@ -14,27 +13,25 @@ var LayoutItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
14
13
|
emits: ["click"],
|
|
15
14
|
setup(__props) {
|
|
16
15
|
return (_ctx, _cache) => {
|
|
17
|
-
return openBlock(),
|
|
18
|
-
"
|
|
19
|
-
class: "
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
_: 1
|
|
37
|
-
}, 8, ["is-active"]);
|
|
16
|
+
return openBlock(), createElementBlock("button", {
|
|
17
|
+
type: "button",
|
|
18
|
+
class: normalizeClass(["poveste-layout-item", { active: __props.isActive }]),
|
|
19
|
+
"data-slot": "layout-item",
|
|
20
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
|
|
21
|
+
}, [
|
|
22
|
+
createVNode(unref(Icon), {
|
|
23
|
+
class: "w-4 h-4 flex-none",
|
|
24
|
+
icon: __props.icon,
|
|
25
|
+
"aria-hidden": "true"
|
|
26
|
+
}, null, 8, ["icon"]),
|
|
27
|
+
createElementVNode("span", _hoisted_1, toDisplayString(__props.title), 1),
|
|
28
|
+
__props.stateIcon ? (openBlock(), createBlock(unref(Icon), {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "w-4 h-4 flex-none opacity-70",
|
|
31
|
+
icon: __props.stateIcon,
|
|
32
|
+
"aria-hidden": "true"
|
|
33
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
34
|
+
], 2);
|
|
38
35
|
};
|
|
39
36
|
}
|
|
40
37
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import ComponentDocs_vue_vue_type_script_setup_true_lang_default from "./ComponentDocs.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/app/components/panel/ComponentDocs.vue
|
|
5
|
+
var ComponentDocs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ComponentDocs_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-aa8468d5"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { ComponentDocs_default as default };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { tagHref, tagText } from "../../util/component-docs.js";
|
|
2
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref } from "@poveste/vendors/vue";
|
|
3
|
+
//#region src/app/components/panel/ComponentDocs.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _hoisted_1 = {
|
|
5
|
+
class: "poveste-component-docs",
|
|
6
|
+
"data-testid": "component-docs"
|
|
7
|
+
};
|
|
8
|
+
var _hoisted_2 = ["data-component"];
|
|
9
|
+
var _hoisted_3 = { "data-slot": "component-name" };
|
|
10
|
+
var _hoisted_4 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
"data-slot": "error"
|
|
13
|
+
};
|
|
14
|
+
var _hoisted_5 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
"data-slot": "props"
|
|
17
|
+
};
|
|
18
|
+
var _hoisted_6 = ["data-prop"];
|
|
19
|
+
var _hoisted_7 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
title: "Required",
|
|
22
|
+
"data-slot": "required"
|
|
23
|
+
};
|
|
24
|
+
var _hoisted_8 = { key: 0 };
|
|
25
|
+
var _hoisted_9 = ["title"];
|
|
26
|
+
var _hoisted_10 = {
|
|
27
|
+
key: 0,
|
|
28
|
+
"data-slot": "deprecated"
|
|
29
|
+
};
|
|
30
|
+
var _hoisted_11 = ["href"];
|
|
31
|
+
var _hoisted_12 = {
|
|
32
|
+
key: 1,
|
|
33
|
+
"data-slot": "see"
|
|
34
|
+
};
|
|
35
|
+
var _hoisted_13 = {
|
|
36
|
+
key: 1,
|
|
37
|
+
"data-slot": "example"
|
|
38
|
+
};
|
|
39
|
+
var _hoisted_14 = {
|
|
40
|
+
key: 1,
|
|
41
|
+
"data-slot": "slots"
|
|
42
|
+
};
|
|
43
|
+
var _hoisted_15 = ["data-slot-name"];
|
|
44
|
+
var _hoisted_16 = { key: 0 };
|
|
45
|
+
var _hoisted_17 = {
|
|
46
|
+
key: 2,
|
|
47
|
+
"data-slot": "events"
|
|
48
|
+
};
|
|
49
|
+
var _hoisted_18 = ["data-event"];
|
|
50
|
+
var _hoisted_19 = { key: 0 };
|
|
51
|
+
var ComponentDocs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
52
|
+
__name: "ComponentDocs",
|
|
53
|
+
props: { components: {} },
|
|
54
|
+
setup(__props) {
|
|
55
|
+
function shownDefault(prop) {
|
|
56
|
+
return prop.default ?? prop.defaultTag;
|
|
57
|
+
}
|
|
58
|
+
return (_ctx, _cache) => {
|
|
59
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.components, (component) => {
|
|
60
|
+
return openBlock(), createElementBlock("section", {
|
|
61
|
+
key: component.file,
|
|
62
|
+
"data-slot": "component",
|
|
63
|
+
"data-component": component.name
|
|
64
|
+
}, [createElementVNode("h3", _hoisted_3, toDisplayString(component.name), 1), component.error ? (openBlock(), createElementBlock("p", _hoisted_4, " Could not read this component's types: " + toDisplayString(component.error), 1)) : component.doc ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
65
|
+
component.doc.props.length ? (openBlock(), createElementBlock("table", _hoisted_5, [_cache[1] || (_cache[1] = createElementVNode("thead", null, [createElementVNode("tr", null, [
|
|
66
|
+
createElementVNode("th", null, "Prop"),
|
|
67
|
+
createElementVNode("th", null, "Type"),
|
|
68
|
+
createElementVNode("th", null, "Default"),
|
|
69
|
+
createElementVNode("th", null, "Description")
|
|
70
|
+
])], -1)), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(component.doc.props, (prop) => {
|
|
71
|
+
return openBlock(), createElementBlock("tr", {
|
|
72
|
+
key: prop.name,
|
|
73
|
+
"data-prop": prop.name
|
|
74
|
+
}, [
|
|
75
|
+
createElementVNode("td", null, [createElementVNode("code", { class: normalizeClass({ deprecated: unref(tagText)(prop.tags, "deprecated") !== void 0 }) }, toDisplayString(prop.name), 3), prop.required ? (openBlock(), createElementBlock("span", _hoisted_7, "*")) : createCommentVNode("", true)]),
|
|
76
|
+
createElementVNode("td", null, [createElementVNode("code", null, toDisplayString(prop.type), 1)]),
|
|
77
|
+
createElementVNode("td", null, [shownDefault(prop) !== void 0 ? (openBlock(), createElementBlock("code", _hoisted_8, toDisplayString(shownDefault(prop)), 1)) : createCommentVNode("", true), _ctx.__POVESTE_DEV__ && prop.defaultConflict ? (openBlock(), createElementBlock("span", {
|
|
78
|
+
key: 1,
|
|
79
|
+
title: `The code's default is shown; the @default tag says ${prop.defaultTag}`,
|
|
80
|
+
"data-slot": "default-conflict"
|
|
81
|
+
}, "≠", 8, _hoisted_9)) : createCommentVNode("", true)]),
|
|
82
|
+
createElementVNode("td", null, [
|
|
83
|
+
unref(tagText)(prop.tags, "deprecated") !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_10, [_cache[0] || (_cache[0] = createTextVNode("Deprecated", -1)), unref(tagText)(prop.tags, "deprecated") ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(": " + toDisplayString(unref(tagText)(prop.tags, "deprecated")), 1)], 64)) : createCommentVNode("", true)])) : createCommentVNode("", true),
|
|
84
|
+
createTextVNode(" " + toDisplayString(prop.description) + " ", 1),
|
|
85
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(prop.tags.filter((tag) => tag.name === "see" || tag.name === "link"), (tag) => {
|
|
86
|
+
return openBlock(), createElementBlock(Fragment, { key: tag.text }, [unref(tagHref)(tag.text ?? "") ? (openBlock(), createElementBlock("a", {
|
|
87
|
+
key: 0,
|
|
88
|
+
href: unref(tagHref)(tag.text ?? ""),
|
|
89
|
+
target: "_blank",
|
|
90
|
+
rel: "noopener",
|
|
91
|
+
"data-slot": "see"
|
|
92
|
+
}, toDisplayString(tag.text), 9, _hoisted_11)) : (openBlock(), createElementBlock("span", _hoisted_12, toDisplayString(tag.text), 1))], 64);
|
|
93
|
+
}), 128)),
|
|
94
|
+
unref(tagText)(prop.tags, "example") ? (openBlock(), createElementBlock("pre", _hoisted_13, [createElementVNode("code", null, toDisplayString(unref(tagText)(prop.tags, "example")), 1)])) : createCommentVNode("", true)
|
|
95
|
+
])
|
|
96
|
+
], 8, _hoisted_6);
|
|
97
|
+
}), 128))])])) : createCommentVNode("", true),
|
|
98
|
+
component.doc.slots.length ? (openBlock(), createElementBlock("table", _hoisted_14, [_cache[2] || (_cache[2] = createElementVNode("thead", null, [createElementVNode("tr", null, [
|
|
99
|
+
createElementVNode("th", null, "Slot"),
|
|
100
|
+
createElementVNode("th", null, "Type"),
|
|
101
|
+
createElementVNode("th", null, "Description")
|
|
102
|
+
])], -1)), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(component.doc.slots, (slot) => {
|
|
103
|
+
return openBlock(), createElementBlock("tr", {
|
|
104
|
+
key: slot.name,
|
|
105
|
+
"data-slot-name": slot.name
|
|
106
|
+
}, [
|
|
107
|
+
createElementVNode("td", null, [createElementVNode("code", null, toDisplayString(slot.name), 1)]),
|
|
108
|
+
createElementVNode("td", null, [slot.type ? (openBlock(), createElementBlock("code", _hoisted_16, toDisplayString(slot.type), 1)) : createCommentVNode("", true)]),
|
|
109
|
+
createElementVNode("td", null, toDisplayString(slot.description), 1)
|
|
110
|
+
], 8, _hoisted_15);
|
|
111
|
+
}), 128))])])) : createCommentVNode("", true),
|
|
112
|
+
component.doc.events.length ? (openBlock(), createElementBlock("table", _hoisted_17, [_cache[3] || (_cache[3] = createElementVNode("thead", null, [createElementVNode("tr", null, [
|
|
113
|
+
createElementVNode("th", null, "Event"),
|
|
114
|
+
createElementVNode("th", null, "Payload"),
|
|
115
|
+
createElementVNode("th", null, "Description")
|
|
116
|
+
])], -1)), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(component.doc.events, (event) => {
|
|
117
|
+
return openBlock(), createElementBlock("tr", {
|
|
118
|
+
key: event.name,
|
|
119
|
+
"data-event": event.name
|
|
120
|
+
}, [
|
|
121
|
+
createElementVNode("td", null, [createElementVNode("code", null, toDisplayString(event.name), 1)]),
|
|
122
|
+
createElementVNode("td", null, [event.type ? (openBlock(), createElementBlock("code", _hoisted_19, toDisplayString(event.type), 1)) : createCommentVNode("", true)]),
|
|
123
|
+
createElementVNode("td", null, toDisplayString(event.description), 1)
|
|
124
|
+
], 8, _hoisted_18);
|
|
125
|
+
}), 128))])])) : createCommentVNode("", true)
|
|
126
|
+
], 64)) : createCommentVNode("", true)], 8, _hoisted_2);
|
|
127
|
+
}), 128))]);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
//#endregion
|
|
132
|
+
export { ComponentDocs_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { povesteConfig } from "../../util/config.js";
|
|
2
2
|
import DevOnlyToolbarOpenInEditor_default from "../toolbar/DevOnlyToolbarOpenInEditor.js";
|
|
3
3
|
import BaseEmpty_default from "../base/BaseEmpty.js";
|
|
4
|
+
import { useComponentDocs } from "../../util/component-docs.js";
|
|
5
|
+
import ComponentDocs_default from "./ComponentDocs.js";
|
|
4
6
|
import { computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, nextTick, normalizeClass, openBlock, ref, toRefs, unref, watch, watchEffect, withCtx } from "@poveste/vendors/vue";
|
|
5
7
|
import { Icon } from "@poveste/vendors/iconify";
|
|
6
8
|
import { useRoute, useRouter } from "@poveste/vendors/vue-router";
|
|
@@ -49,6 +51,7 @@ var StoryDocs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
49
51
|
const emit = __emit;
|
|
50
52
|
const { story } = toRefs(props);
|
|
51
53
|
const { renderedDoc } = useStoryDoc(story);
|
|
54
|
+
const { components } = useComponentDocs(computed(() => story.value?.id));
|
|
52
55
|
const router = useRouter();
|
|
53
56
|
const fakeHost = `http://a.com`;
|
|
54
57
|
function onClick(e) {
|
|
@@ -104,27 +107,35 @@ var StoryDocs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
104
107
|
return openBlock(), createElementBlock("div", {
|
|
105
108
|
class: "poveste-story-docs",
|
|
106
109
|
onClickCapture: onClick
|
|
107
|
-
}, [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
110
|
+
}, [
|
|
111
|
+
_ctx.__POVESTE_DEV__ && unref(renderedDoc) && filePath.value ? (openBlock(), createElementBlock("div", {
|
|
112
|
+
key: 0,
|
|
113
|
+
class: normalizeClass(["flex items-center gap-2 p-2", { "pt-4": !__props.standalone }])
|
|
114
|
+
}, [filePath.value ? (openBlock(), createBlock(DevOnlyToolbarOpenInEditor_default, {
|
|
115
|
+
key: 0,
|
|
116
|
+
file: filePath.value,
|
|
117
|
+
tooltip: "Edit docs in editor"
|
|
118
|
+
}, null, 8, ["file"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true),
|
|
119
|
+
!unref(renderedDoc) && !unref(components)?.length ? (openBlock(), createBlock(BaseEmpty_default, { key: 1 }, {
|
|
120
|
+
default: withCtx(() => [createVNode(unref(Icon), {
|
|
121
|
+
icon: "carbon:document-unknown",
|
|
122
|
+
class: "w-8 h-8 opacity-50 mb-6"
|
|
123
|
+
}), _cache[0] || (_cache[0] = createTextVNode(" No documentation available ", -1))]),
|
|
124
|
+
_: 1
|
|
125
|
+
})) : createCommentVNode("", true),
|
|
126
|
+
unref(renderedDoc) ? (openBlock(), createElementBlock("div", {
|
|
127
|
+
key: 2,
|
|
128
|
+
ref_key: "renderedEl",
|
|
129
|
+
ref: renderedEl,
|
|
130
|
+
class: "prose dark:prose-invert p-4 max-w-none",
|
|
131
|
+
"data-testid": "story-docs",
|
|
132
|
+
innerHTML: unref(renderedDoc)
|
|
133
|
+
}, null, 8, _hoisted_1)) : createCommentVNode("", true),
|
|
134
|
+
unref(components)?.length ? (openBlock(), createBlock(ComponentDocs_default, {
|
|
135
|
+
key: 3,
|
|
136
|
+
components: unref(components)
|
|
137
|
+
}, null, 8, ["components"])) : createCommentVNode("", true)
|
|
138
|
+
], 32);
|
|
128
139
|
};
|
|
129
140
|
}
|
|
130
141
|
});
|
|
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import StorySourceCode_vue_vue_type_script_setup_true_lang_default from "./StorySourceCode.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/app/components/panel/StorySourceCode.vue
|
|
5
|
-
var StorySourceCode_default = /*#__PURE__*/ _plugin_vue_export_helper_default(StorySourceCode_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var StorySourceCode_default = /*#__PURE__*/ _plugin_vue_export_helper_default(StorySourceCode_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-4b28d655"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { StorySourceCode_default as default };
|
package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -27,8 +27,15 @@ var StorySourceCode_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
27
27
|
setup(__props) {
|
|
28
28
|
const props = __props;
|
|
29
29
|
const generateSourceCodeFn = shallowRef(null);
|
|
30
|
+
const dynamicSettled = ref(false);
|
|
31
|
+
const staticSettled = ref(false);
|
|
30
32
|
watchEffect(async () => {
|
|
31
|
-
|
|
33
|
+
let generate;
|
|
34
|
+
try {
|
|
35
|
+
generate = await loadGenerateSourceCode(props.story);
|
|
36
|
+
} finally {
|
|
37
|
+
if (!generate) dynamicSettled.value = true;
|
|
38
|
+
}
|
|
32
39
|
if (generate) generateSourceCodeFn.value = markRaw(generate);
|
|
33
40
|
});
|
|
34
41
|
const highlighter = shallowRef();
|
|
@@ -39,12 +46,14 @@ var StorySourceCode_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
39
46
|
if (!generateSourceCodeFn.value) return;
|
|
40
47
|
error.value = null;
|
|
41
48
|
dynamicSourceCode.value = "";
|
|
49
|
+
dynamicSettled.value = false;
|
|
42
50
|
try {
|
|
43
51
|
dynamicSourceCode.value = await getDynamicSourceCode(props.variant, generateSourceCodeFn.value) ?? "";
|
|
44
52
|
} catch (e) {
|
|
45
53
|
console.error(e);
|
|
46
54
|
error.value = e instanceof Error ? e.message : String(e);
|
|
47
55
|
}
|
|
56
|
+
dynamicSettled.value = true;
|
|
48
57
|
if (!dynamicSourceCode.value) displayedSource.value = "static";
|
|
49
58
|
}, {
|
|
50
59
|
deep: true,
|
|
@@ -53,8 +62,14 @@ var StorySourceCode_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
53
62
|
const staticSourceCode = ref("");
|
|
54
63
|
watch(() => [props.story, props.story?.file?.source], async () => {
|
|
55
64
|
staticSourceCode.value = "";
|
|
56
|
-
|
|
65
|
+
staticSettled.value = false;
|
|
66
|
+
try {
|
|
67
|
+
staticSourceCode.value = await getStaticSourceCode(props.story) ?? "";
|
|
68
|
+
} finally {
|
|
69
|
+
staticSettled.value = true;
|
|
70
|
+
}
|
|
57
71
|
}, { immediate: true });
|
|
72
|
+
const loading = computed(() => displayedSource.value === "dynamic" ? !dynamicSettled.value : !staticSettled.value);
|
|
58
73
|
const displayedSourceCode = computed(() => {
|
|
59
74
|
if (displayedSource.value === "dynamic") return dynamicSourceCode.value;
|
|
60
75
|
return staticSourceCode.value;
|
|
@@ -107,13 +122,14 @@ var StorySourceCode_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
107
122
|
}, 8, ["content"])]),
|
|
108
123
|
createVNode(unref(HstCopyIcon), {
|
|
109
124
|
content: displayedSourceCode.value,
|
|
125
|
+
loading: loading.value,
|
|
110
126
|
class: "flex-none"
|
|
111
|
-
}, null, 8, ["content"])
|
|
127
|
+
}, null, 8, ["content", "loading"])
|
|
112
128
|
])) : createCommentVNode("", true), error.value ? (openBlock(), createElementBlock("div", _hoisted_4, " Error: " + toDisplayString(error.value), 1)) : !displayedSourceCode.value ? (openBlock(), createBlock(BaseEmpty_default, { key: 2 }, {
|
|
113
129
|
default: withCtx(() => [createVNode(unref(Icon), {
|
|
114
130
|
icon: "carbon:code-hide",
|
|
115
131
|
class: "w-8 h-8 opacity-50 mb-6"
|
|
116
|
-
}),
|
|
132
|
+
}), createElementVNode("span", null, toDisplayString(loading.value ? "Loading" : "Not available"), 1)]),
|
|
117
133
|
_: 1
|
|
118
134
|
})) : !sourceHtml.value ? (openBlock(), createElementBlock("textarea", {
|
|
119
135
|
key: 3,
|