@histoire/app 0.11.5 → 0.11.7
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/app/style/{floating-vue.pcss → floating.pcss} +0 -0
- package/dist/app/style/main.pcss +46 -44
- package/dist/app/style/sandbox.css +5 -1
- package/dist/bundle-main-dev.js +4 -0
- package/dist/bundle-sandbox-dev.js +2 -0
- package/dist/bundled/App.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/HomeView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/app/AppHeader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/app/AppLogo.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/app/Breadcrumb.js +2 -2
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_script_setup_true_lang.js +10 -9
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_style_index_0_scoped_36846ccf_lang.js +4 -0
- package/dist/bundled/components/app/InitialLoading.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/app/MobileOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/base/BaseCheckbox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/base/BaseEmpty.js +4 -4
- package/dist/bundled/components/base/BaseEmpty.vue_vue_type_style_index_0_scoped_c5ecfead_lang.js +4 -0
- package/dist/bundled/components/base/BaseListItemLink.js +1 -1
- package/dist/bundled/components/base/BaseOverflowMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/base/BaseOverflowTab.js +1 -1
- package/dist/bundled/components/base/BaseSelect.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/bundled/components/base/BaseSplitPane.js +2 -2
- package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_style_index_0_scoped_ed925107_lang.js +4 -0
- package/dist/bundled/components/base/BaseTab.js +1 -1
- package/dist/bundled/components/base/BaseTag.js +13 -0
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/panel/ControlsComponentProps.vue_vue_type_script_setup_true_lang.js +8 -7
- package/dist/bundled/components/panel/PaneTabs.vue_vue_type_script_setup_true_lang.js +15 -12
- package/dist/bundled/components/panel/StatePresets.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/panel/StoryControls.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/panel/StoryDocs.vue_vue_type_script_setup_true_lang.js +17 -2
- package/dist/bundled/components/panel/StoryEvent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/panel/StoryEvents.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/bundled/components/panel/StorySidePanel.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/bundled/components/panel/StorySourceCode.js +2 -2
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_style_index_0_scoped_36810e45_lang.js +4 -0
- package/dist/bundled/components/search/SearchItem.js +2 -2
- package/dist/bundled/components/search/SearchItem.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/bundled/components/search/SearchItem.vue_vue_type_style_index_0_scoped_d95fcb03_lang.js +4 -0
- package/dist/bundled/components/search/SearchLoading.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/search/SearchModal.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/search/SearchPane.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/story/GenericMountStory.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/story/GenericRenderStory.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/story/StoryResponsivePreview.js +2 -2
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js +41 -12
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_style_index_0_scoped_a83b1911_lang.js +4 -0
- package/dist/bundled/components/story/StoryVariantGrid.vue_vue_type_script_setup_true_lang.js +37 -29
- package/dist/bundled/components/story/StoryVariantGridItem.js +2 -2
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js +21 -9
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_style_index_0_scoped_f7c98176_lang.js +4 -0
- package/dist/bundled/components/story/StoryVariantListItem.js +2 -2
- package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_style_index_0_scoped_ab890d9c_lang.js +4 -0
- package/dist/bundled/components/story/StoryVariantSingle.js +2 -2
- package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_style_index_0_scoped_ddfc5b4f_lang.js +4 -0
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue_vue_type_script_setup_true_lang.js +19 -7
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/bundled/components/story/StoryVariantSingleView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/story/StoryView.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/bundled/components/story/StoryViewer.js +2 -2
- package/dist/bundled/components/story/StoryViewer.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/story/StoryViewer.vue_vue_type_style_index_0_scoped_6046525f_lang.js +4 -0
- package/dist/bundled/components/toolbar/ToolbarBackground.js +2 -2
- package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_script_setup_true_lang.js +32 -18
- package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_style_index_0_scoped_c48fb2b2_lang.js +4 -0
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarTitle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/tree/StoryGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/tree/StoryList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/tree/StoryListFolder.js +2 -2
- package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_script_setup_true_lang.js +6 -3
- package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_style_index_0_scoped_2fedbe45_lang.js +4 -0
- package/dist/bundled/components/tree/StoryListItem.js +2 -2
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_style_index_0_scoped_19810958_lang.js +4 -0
- package/dist/bundled/style.css +46 -45
- package/dist/bundled/util/preview-settings.js +11 -0
- package/dist/style.css +77 -64
- package/package.json +4 -4
- package/src/app/App.vue +1 -1
- package/src/app/components/HomeView.vue +1 -1
- package/src/app/components/app/AppHeader.vue +1 -1
- package/src/app/components/app/AppLogo.vue +1 -0
- package/src/app/components/app/Breadcrumb.vue +1 -1
- package/src/app/components/app/InitialLoading.vue +1 -1
- package/src/app/components/app/MobileOverlay.vue +1 -1
- package/src/app/components/base/BaseCheckbox.vue +1 -1
- package/src/app/components/base/BaseCopyIcon.vue +1 -1
- package/src/app/components/base/BaseEmpty.vue +1 -1
- package/src/app/components/base/BaseListItemLink.vue +1 -0
- package/src/app/components/base/BaseOverflowMenu.vue +1 -1
- package/src/app/components/base/BaseOverflowTab.vue +1 -0
- package/src/app/components/base/BaseSelect.vue +1 -0
- package/src/app/components/base/BaseSplitPane.vue +1 -1
- package/src/app/components/base/BaseTab.vue +1 -0
- package/src/app/components/base/BaseTag.vue +5 -0
- package/src/app/components/panel/ControlsComponentPropItem.vue +1 -0
- package/src/app/components/panel/ControlsComponentProps.vue +1 -1
- package/src/app/components/panel/PaneTabs.vue +7 -12
- package/src/app/components/panel/StatePresets.vue +1 -1
- package/src/app/components/panel/StoryControls.vue +1 -1
- package/src/app/components/panel/StoryDocs.vue +30 -1
- package/src/app/components/panel/StoryEvent.vue +1 -1
- package/src/app/components/panel/StoryEvents.vue +4 -1
- package/src/app/components/panel/StorySidePanel.vue +9 -3
- package/src/app/components/panel/StorySourceCode.vue +1 -1
- package/src/app/components/search/SearchItem.vue +1 -0
- package/src/app/components/search/SearchLoading.vue +1 -1
- package/src/app/components/search/SearchModal.vue +1 -1
- package/src/app/components/search/SearchPane.vue +1 -1
- package/src/app/components/story/GenericMountStory.vue +1 -0
- package/src/app/components/story/GenericRenderStory.vue +1 -0
- package/src/app/components/story/StoryResponsivePreview.vue +11 -2
- package/src/app/components/story/StoryVariantGrid.vue +32 -24
- package/src/app/components/story/StoryVariantGridItem.vue +18 -4
- package/src/app/components/story/StoryVariantListItem.vue +1 -0
- package/src/app/components/story/StoryVariantSingle.vue +1 -1
- package/src/app/components/story/StoryVariantSinglePreviewNative.vue +17 -5
- package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +1 -0
- package/src/app/components/story/StoryVariantSingleView.vue +1 -1
- package/src/app/components/story/StoryView.vue +5 -2
- package/src/app/components/story/StoryViewer.vue +1 -1
- package/src/app/components/toolbar/ToolbarBackground.vue +21 -7
- package/src/app/components/toolbar/ToolbarNewTab.vue +1 -1
- package/src/app/components/toolbar/ToolbarResponsiveSize.vue +3 -3
- package/src/app/components/toolbar/ToolbarTextDirection.vue +1 -1
- package/src/app/components/toolbar/ToolbarTitle.vue +1 -1
- package/src/app/components/tree/StoryGroup.vue +1 -1
- package/src/app/components/tree/StoryList.vue +1 -1
- package/src/app/components/tree/StoryListFolder.vue +4 -1
- package/src/app/components/tree/StoryListItem.vue +1 -0
- package/src/app/style/{floating-vue.pcss → floating.pcss} +0 -0
- package/src/app/style/main.pcss +46 -44
- package/src/app/style/sandbox.css +5 -1
- package/src/app/util/preview-settings.ts +13 -0
- package/src/bundle-main-dev.js +4 -0
- package/src/bundle-sandbox-dev.js +2 -0
- package/tailwind.config.cjs +1 -1
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_style_index_0_scoped_3c779b73_lang.js +0 -4
- package/dist/bundled/components/base/BaseEmpty.vue_vue_type_style_index_0_scoped_af3328a6_lang.js +0 -4
- package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_style_index_0_scoped_bb6c600c_lang.js +0 -4
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_style_index_0_scoped_0d096b10_lang.js +0 -4
- package/dist/bundled/components/search/SearchItem.vue_vue_type_style_index_0_scoped_b819ed97_lang.js +0 -4
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_style_index_0_scoped_1375d05a_lang.js +0 -4
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_style_index_0_scoped_601cc357_lang.js +0 -4
- package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_style_index_0_scoped_02816158_lang.js +0 -4
- package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_style_index_0_scoped_89489ae4_lang.js +0 -4
- package/dist/bundled/components/story/StoryViewer.vue_vue_type_style_index_0_scoped_54d5a557_lang.js +0 -4
- package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_style_index_0_scoped_8d0cb17e_lang.js +0 -4
- package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_style_index_0_scoped_41fb5f7e_lang.js +0 -4
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_style_index_0_scoped_d1a05247_lang.js +0 -4
package/dist/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css2?family=
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Display&display=swap');
|
|
2
2
|
|
|
3
3
|
.resize-observer[data-v-b329ee4c]{
|
|
4
4
|
position:absolute;
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
grid-template-columns:repeat(auto-fill,minmax(var(--histoire-col-size),1fr))
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
.__histoire-json-code[data-v-
|
|
300
|
+
.__histoire-json-code[data-v-7e04a5c8] .cm-editor{
|
|
301
301
|
height:100%;
|
|
302
302
|
min-width:280px
|
|
303
303
|
}
|
|
@@ -414,6 +414,59 @@ button {
|
|
|
414
414
|
user-select: none;
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
+
body,
|
|
418
|
+
pre {
|
|
419
|
+
margin: 0;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
html,
|
|
423
|
+
body,
|
|
424
|
+
#app {
|
|
425
|
+
height: 100%;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
html {
|
|
429
|
+
font-family: 'Noto Sans Display', system-ui, sans-serif;
|
|
430
|
+
font-size: 1rem;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
body {
|
|
434
|
+
font-size: 1.125rem;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
@media (min-width: 640px) {
|
|
438
|
+
body {
|
|
439
|
+
font-size: .875rem;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.htw-sandbox-contain {
|
|
444
|
+
contain: content;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.__histoire-code .shiki {
|
|
448
|
+
background: transparent !important;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.htw-prose h1:not(:hover) .header-anchor[aria-hidden="true"], .htw-prose h2:not(:hover) .header-anchor[aria-hidden="true"], .htw-prose h3:not(:hover) .header-anchor[aria-hidden="true"], .htw-prose h4:not(:hover) .header-anchor[aria-hidden="true"] {
|
|
452
|
+
visibility: hidden;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.htw-prose hr {
|
|
456
|
+
margin: 1rem 0;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.__histoire-pane-shadow-from-right {
|
|
460
|
+
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0));
|
|
461
|
+
background-size: 24px;
|
|
462
|
+
background-repeat: no-repeat;
|
|
463
|
+
background-position: right;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.htw-dark .__histoire-pane-shadow-from-right {
|
|
467
|
+
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
|
|
468
|
+
}
|
|
469
|
+
|
|
417
470
|
*, ::before, ::after{
|
|
418
471
|
--tw-border-spacing-x:0;
|
|
419
472
|
--tw-border-spacing-y:0;
|
|
@@ -1249,14 +1302,14 @@ button {
|
|
|
1249
1302
|
margin:auto
|
|
1250
1303
|
}
|
|
1251
1304
|
|
|
1252
|
-
.htw-m-4{
|
|
1253
|
-
margin:1rem
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
1305
|
.htw-m-1{
|
|
1257
1306
|
margin:0.25rem
|
|
1258
1307
|
}
|
|
1259
1308
|
|
|
1309
|
+
.htw-m-4{
|
|
1310
|
+
margin:1rem
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1260
1313
|
.-htw-my-1{
|
|
1261
1314
|
margin-top:-0.25rem;
|
|
1262
1315
|
margin-bottom:-0.25rem
|
|
@@ -1277,6 +1330,16 @@ button {
|
|
|
1277
1330
|
margin-right:0.5rem
|
|
1278
1331
|
}
|
|
1279
1332
|
|
|
1333
|
+
.htw-mx-4{
|
|
1334
|
+
margin-left:1rem;
|
|
1335
|
+
margin-right:1rem
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
.htw-my-4{
|
|
1339
|
+
margin-top:1rem;
|
|
1340
|
+
margin-bottom:1rem
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1280
1343
|
.htw-my-0{
|
|
1281
1344
|
margin-top:0px;
|
|
1282
1345
|
margin-bottom:0px
|
|
@@ -1287,11 +1350,6 @@ button {
|
|
|
1287
1350
|
margin-bottom:2rem
|
|
1288
1351
|
}
|
|
1289
1352
|
|
|
1290
|
-
.htw-mx-4{
|
|
1291
|
-
margin-left:1rem;
|
|
1292
|
-
margin-right:1rem
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
1353
|
.htw-mt-2{
|
|
1296
1354
|
margin-top:0.5rem
|
|
1297
1355
|
}
|
|
@@ -1530,6 +1588,10 @@ button {
|
|
|
1530
1588
|
width:0.5rem
|
|
1531
1589
|
}
|
|
1532
1590
|
|
|
1591
|
+
.htw-w-0{
|
|
1592
|
+
width:0px
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1533
1595
|
.htw-w-max{
|
|
1534
1596
|
width:-moz-max-content;
|
|
1535
1597
|
width:max-content
|
|
@@ -2199,6 +2261,10 @@ button {
|
|
|
2199
2261
|
line-height:1
|
|
2200
2262
|
}
|
|
2201
2263
|
|
|
2264
|
+
.htw-uppercase{
|
|
2265
|
+
text-transform:uppercase
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2202
2268
|
.htw-leading-normal{
|
|
2203
2269
|
line-height:1.5
|
|
2204
2270
|
}
|
|
@@ -2374,59 +2440,6 @@ button {
|
|
|
2374
2440
|
will-change:transform
|
|
2375
2441
|
}
|
|
2376
2442
|
|
|
2377
|
-
body,
|
|
2378
|
-
pre {
|
|
2379
|
-
margin: 0;
|
|
2380
|
-
}
|
|
2381
|
-
|
|
2382
|
-
html,
|
|
2383
|
-
body,
|
|
2384
|
-
#app {
|
|
2385
|
-
height: 100%;
|
|
2386
|
-
}
|
|
2387
|
-
|
|
2388
|
-
html {
|
|
2389
|
-
font-family: 'Lato', sans-serif;
|
|
2390
|
-
font-size: 1rem;
|
|
2391
|
-
}
|
|
2392
|
-
|
|
2393
|
-
body {
|
|
2394
|
-
font-size: 1.125rem;
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
@media (min-width: 640px) {
|
|
2398
|
-
body {
|
|
2399
|
-
font-size: .875rem;
|
|
2400
|
-
}
|
|
2401
|
-
}
|
|
2402
|
-
|
|
2403
|
-
.__histoire-sandbox {
|
|
2404
|
-
contain: content;
|
|
2405
|
-
}
|
|
2406
|
-
|
|
2407
|
-
.__histoire-code .shiki {
|
|
2408
|
-
background: transparent !important;
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
|
-
.htw-prose h1:not(:hover) .header-anchor[aria-hidden="true"], .htw-prose h2:not(:hover) .header-anchor[aria-hidden="true"], .htw-prose h3:not(:hover) .header-anchor[aria-hidden="true"], .htw-prose h4:not(:hover) .header-anchor[aria-hidden="true"] {
|
|
2412
|
-
visibility: hidden;
|
|
2413
|
-
}
|
|
2414
|
-
|
|
2415
|
-
.htw-prose hr {
|
|
2416
|
-
margin: 1rem 0;
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
.__histoire-pane-shadow-from-right {
|
|
2420
|
-
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0));
|
|
2421
|
-
background-size: 24px;
|
|
2422
|
-
background-repeat: no-repeat;
|
|
2423
|
-
background-position: right;
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
.htw-dark .__histoire-pane-shadow-from-right {
|
|
2427
|
-
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
|
|
2428
|
-
}
|
|
2429
|
-
|
|
2430
2443
|
.first\:htw-mt-0:first-child{
|
|
2431
2444
|
margin-top:0px
|
|
2432
2445
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@histoire/app",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.7",
|
|
4
4
|
"description": "Pre-bundled UI for Histoire",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"types": "./src/index.ts",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@histoire/controls": "^0.11.
|
|
28
|
-
"@histoire/shared": "^0.11.
|
|
29
|
-
"@histoire/vendors": "^0.11.
|
|
27
|
+
"@histoire/controls": "^0.11.7",
|
|
28
|
+
"@histoire/shared": "^0.11.7",
|
|
29
|
+
"@histoire/vendors": "^0.11.7",
|
|
30
30
|
"@types/flexsearch": "^0.7.3",
|
|
31
31
|
"flexsearch": "0.7.21",
|
|
32
32
|
"shiki": "0.10.1"
|
package/src/app/App.vue
CHANGED
|
@@ -7,7 +7,7 @@ const logoUrl = computed(() => histoireConfig.theme?.logo?.square ? customLogos.
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<template>
|
|
10
|
-
<div class="htw-flex htw-items-center htw-justify-center htw-h-full">
|
|
10
|
+
<div class="histoire-home-view htw-flex htw-items-center htw-justify-center htw-h-full">
|
|
11
11
|
<img
|
|
12
12
|
:src="logoUrl"
|
|
13
13
|
alt="Logo"
|
|
@@ -23,7 +23,7 @@ onKeyboardShortcut(['ctrl+shift+d', 'meta+shift+d'], (event) => {
|
|
|
23
23
|
|
|
24
24
|
<template>
|
|
25
25
|
<div
|
|
26
|
-
class="htw-px-4 htw-h-16 htw-flex htw-items-center htw-gap-2"
|
|
26
|
+
class="histoire-app-header htw-px-4 htw-h-16 htw-flex htw-items-center htw-gap-2"
|
|
27
27
|
>
|
|
28
28
|
<div class="htw-py-3 sm:htw-py-4 htw-flex-1 htw-h-full htw-flex htw-items-center htw-pr-2">
|
|
29
29
|
<a
|
|
@@ -35,7 +35,7 @@ watch(story, () => {
|
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
37
|
<template>
|
|
38
|
-
<div>
|
|
38
|
+
<div class="histoire-breadcrumb">
|
|
39
39
|
<a
|
|
40
40
|
class="htw-px-6 htw-h-12 hover:htw-text-primary-500 dark:hover:htw-text-primary-400 htw-cursor-pointer htw-flex htw-gap-2 htw-flex-wrap htw-w-full htw-items-center"
|
|
41
41
|
@click="openMenu"
|
|
@@ -17,7 +17,7 @@ if (import.meta.hot) {
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
|
-
<div class="htw-fixed htw-inset-0 htw-bg-white dark:htw-bg-gray-700 htw-flex htw-flex-col htw-gap-6 htw-items-center htw-justify-center">
|
|
20
|
+
<div class="histoire-initial-loading htw-fixed htw-inset-0 htw-bg-white dark:htw-bg-gray-700 htw-flex htw-flex-col htw-gap-6 htw-items-center htw-justify-center">
|
|
21
21
|
<transition name="__histoire-fade">
|
|
22
22
|
<div
|
|
23
23
|
v-if="progress.total > 0"
|
|
@@ -13,7 +13,7 @@ const emits = defineEmits<{(e: 'close'): void}>()
|
|
|
13
13
|
<transition name="__histoire-fade-bottom">
|
|
14
14
|
<div
|
|
15
15
|
v-if="opened"
|
|
16
|
-
class="htw-absolute htw-z-10 htw-bg-white dark:htw-bg-gray-700 htw-w-screen htw-h-screen htw-inset-0 htw-overflow-hidden htw-flex htw-flex-col"
|
|
16
|
+
class="histoire-mobile-overlay htw-absolute htw-z-10 htw-bg-white dark:htw-bg-gray-700 htw-w-screen htw-h-screen htw-inset-0 htw-overflow-hidden htw-flex htw-flex-col"
|
|
17
17
|
>
|
|
18
18
|
<div class="htw-p-4 htw-h-16 htw-flex htw-border-b htw-border-gray-100 dark:htw-border-gray-800 htw-items-center htw-place-content-between">
|
|
19
19
|
<span class="htw-text-gray-500">{{ title }}</span>
|
|
@@ -35,7 +35,7 @@ watch(path, () => {
|
|
|
35
35
|
<div
|
|
36
36
|
role="checkbox"
|
|
37
37
|
tabindex="0"
|
|
38
|
-
class="htw-flex htw-items-center htw-gap-2 htw-select-none htw-px-4 htw-py-3 htw-cursor-pointer hover:htw-bg-primary-100 dark:hover:htw-bg-primary-700"
|
|
38
|
+
class="histoire-base-checkbox htw-flex htw-items-center htw-gap-2 htw-select-none htw-px-4 htw-py-3 htw-cursor-pointer hover:htw-bg-primary-100 dark:hover:htw-bg-primary-700"
|
|
39
39
|
@click="toggle()"
|
|
40
40
|
@keydown.enter.prevent="toggle()"
|
|
41
41
|
@keydown.space.prevent="toggle()"
|
|
@@ -28,7 +28,7 @@ const action = () => copy(props.content)
|
|
|
28
28
|
delay: 0,
|
|
29
29
|
}"
|
|
30
30
|
icon="carbon:copy-file"
|
|
31
|
-
class="htw-w-4 htw-h-4 htw-opacity-50 hover:htw-opacity-100 hover:htw-text-primary-500 htw-cursor-pointer"
|
|
31
|
+
class="histoire-base-copy-icon htw-w-4 htw-h-4 htw-opacity-50 hover:htw-opacity-100 hover:htw-text-primary-500 htw-cursor-pointer"
|
|
32
32
|
@click="action()"
|
|
33
33
|
/>
|
|
34
34
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="htw-base-empty htw-flex htw-flex-col htw-items-center htw-justify-center htw-space-y-4 htw-py-12 htw-h-full htw-text-center htw-text-gray-400 htw-text-lg">
|
|
2
|
+
<div class="histoire-base-empty htw-base-empty htw-flex htw-flex-col htw-items-center htw-justify-center htw-space-y-4 htw-py-12 htw-h-full htw-text-center htw-text-gray-400 htw-text-lg">
|
|
3
3
|
<slot />
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
@@ -161,7 +161,7 @@ onUnmounted(() => {
|
|
|
161
161
|
<template>
|
|
162
162
|
<div
|
|
163
163
|
ref="el"
|
|
164
|
-
class="htw-flex htw-h-full htw-isolate htw-overflow-auto"
|
|
164
|
+
class="histoire-base-split-pane htw-flex htw-h-full htw-isolate htw-overflow-auto"
|
|
165
165
|
:class="{
|
|
166
166
|
'htw-flex-col': orientation === 'portrait',
|
|
167
167
|
'htw-cursor-ew-resize': dragging && orientation === 'landscape',
|
|
@@ -6,6 +6,7 @@ import type { Story, Variant } from '../../types'
|
|
|
6
6
|
import BaseOverflowMenu from '../base/BaseOverflowMenu.vue'
|
|
7
7
|
import BaseOverflowTab from '../base/BaseOverflowTab.vue'
|
|
8
8
|
import { useStoryDoc } from './StoryDocs.vue'
|
|
9
|
+
import BaseTag from '../base/BaseTag.vue'
|
|
9
10
|
|
|
10
11
|
const props = defineProps<{
|
|
11
12
|
story: Story
|
|
@@ -21,7 +22,7 @@ const hasEvents = computed(() => eventsStore.events.length)
|
|
|
21
22
|
</script>
|
|
22
23
|
|
|
23
24
|
<template>
|
|
24
|
-
<BaseOverflowMenu class="htw-h-10 htw-flex-none htw-border-b htw-border-gray-100 dark:htw-border-gray-750">
|
|
25
|
+
<BaseOverflowMenu class="histoire-pane-tabs htw-h-10 htw-flex-none htw-border-b htw-border-gray-100 dark:htw-border-gray-750">
|
|
25
26
|
<BaseTab
|
|
26
27
|
:to="{ ...$route, query: { ...$route.query, tab: '' } }"
|
|
27
28
|
:matched="!$route.query.tab"
|
|
@@ -45,12 +46,9 @@ const hasEvents = computed(() => eventsStore.events.length)
|
|
|
45
46
|
}"
|
|
46
47
|
>
|
|
47
48
|
Events
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
>
|
|
52
|
-
{{ eventsStore.unseen <=99 ? eventsStore.unseen : "99+" }}
|
|
53
|
-
</span>
|
|
49
|
+
<BaseTag v-if="eventsStore.unseen">
|
|
50
|
+
{{ eventsStore.unseen <= 99 ? eventsStore.unseen : "99+" }}
|
|
51
|
+
</BaseTag>
|
|
54
52
|
</BaseTab>
|
|
55
53
|
|
|
56
54
|
<template #overflow>
|
|
@@ -77,12 +75,9 @@ const hasEvents = computed(() => eventsStore.events.length)
|
|
|
77
75
|
}"
|
|
78
76
|
>
|
|
79
77
|
Events
|
|
80
|
-
<
|
|
81
|
-
v-if="eventsStore.unseen"
|
|
82
|
-
class="htw-text-center htw-text-xs htw-mx-1 htw-px-0.5 htw-h-4 htw-min-w-4 htw-rounded-full active htw-bg-primary-500 htw-text-white dark:htw-text-black"
|
|
83
|
-
>
|
|
78
|
+
<BaseTag v-if="eventsStore.unseen">
|
|
84
79
|
{{ eventsStore.unseen <= 99 ? eventsStore.unseen : "99+" }}
|
|
85
|
-
</
|
|
80
|
+
</BaseTag>
|
|
86
81
|
</BaseOverflowTab>
|
|
87
82
|
</template>
|
|
88
83
|
</BaseOverflowMenu>
|
|
@@ -115,7 +115,7 @@ onClickOutside(select, stopEditing)
|
|
|
115
115
|
</script>
|
|
116
116
|
|
|
117
117
|
<template>
|
|
118
|
-
<div class="htw-flex htw-gap-2 htw-w-full htw-items-center">
|
|
118
|
+
<div class="histoire-state-presets htw-flex htw-gap-2 htw-w-full htw-items-center">
|
|
119
119
|
<div
|
|
120
120
|
ref="select"
|
|
121
121
|
class="htw-flex-1 htw-min-w-0"
|
|
@@ -32,7 +32,7 @@ const hasCustomControls = computed(() => props.variant.slots().controls || props
|
|
|
32
32
|
<template>
|
|
33
33
|
<div
|
|
34
34
|
data-test-id="story-controls"
|
|
35
|
-
class="htw-flex htw-flex-col htw-divide-y htw-divide-gray-100 dark:htw-divide-gray-750"
|
|
35
|
+
class="histoire-story-controls htw-flex htw-flex-col htw-divide-y htw-divide-gray-100 dark:htw-divide-gray-750"
|
|
36
36
|
>
|
|
37
37
|
<!-- Toolbar -->
|
|
38
38
|
<div
|
|
@@ -47,6 +47,7 @@ export function useStoryDoc (story: Ref<Story>) {
|
|
|
47
47
|
|
|
48
48
|
<script lang="ts" setup>
|
|
49
49
|
import { Icon } from '@iconify/vue'
|
|
50
|
+
import { useRouter } from '@histoire/vendors/vue-router'
|
|
50
51
|
import BaseEmpty from '../base/BaseEmpty.vue'
|
|
51
52
|
|
|
52
53
|
const props = defineProps({
|
|
@@ -59,10 +60,38 @@ const props = defineProps({
|
|
|
59
60
|
const { story } = toRefs(props)
|
|
60
61
|
|
|
61
62
|
const { renderedDoc } = useStoryDoc(story)
|
|
63
|
+
|
|
64
|
+
// Markdown links to other stories
|
|
65
|
+
const router = useRouter()
|
|
66
|
+
|
|
67
|
+
// we are just using URL to parse the pathname and hash - the base doesn't
|
|
68
|
+
// matter and is only passed to support same-host hrefs.
|
|
69
|
+
const fakeHost = `http://a.com`
|
|
70
|
+
|
|
71
|
+
function onClick (e: MouseEvent) {
|
|
72
|
+
const link = (e.target as Element).closest('a')
|
|
73
|
+
if (
|
|
74
|
+
link &&
|
|
75
|
+
link.getAttribute('data-route') &&
|
|
76
|
+
!e.ctrlKey &&
|
|
77
|
+
!e.shiftKey &&
|
|
78
|
+
!e.altKey &&
|
|
79
|
+
!e.metaKey &&
|
|
80
|
+
link.target !== `_blank`
|
|
81
|
+
) {
|
|
82
|
+
e.preventDefault()
|
|
83
|
+
const url = new URL(link.href, fakeHost)
|
|
84
|
+
const targetHref = url.pathname + url.search + url.hash
|
|
85
|
+
router.push(targetHref)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
62
88
|
</script>
|
|
63
89
|
|
|
64
90
|
<template>
|
|
65
|
-
<div
|
|
91
|
+
<div
|
|
92
|
+
class="histoire-story-docs"
|
|
93
|
+
@click.capture="onClick"
|
|
94
|
+
>
|
|
66
95
|
<BaseEmpty
|
|
67
96
|
v-if="!renderedDoc"
|
|
68
97
|
>
|
|
@@ -28,11 +28,17 @@ const panelContentComponent = computed(() => {
|
|
|
28
28
|
</script>
|
|
29
29
|
|
|
30
30
|
<template>
|
|
31
|
-
<BaseEmpty
|
|
31
|
+
<BaseEmpty
|
|
32
|
+
v-if="!storyStore.currentVariant"
|
|
33
|
+
class="histoire-story-side-panel histoire-selection"
|
|
34
|
+
>
|
|
32
35
|
<span>Select a variant</span>
|
|
33
36
|
</BaseEmpty>
|
|
34
37
|
|
|
35
|
-
<BaseEmpty
|
|
38
|
+
<BaseEmpty
|
|
39
|
+
v-else-if="!storyStore.currentVariant.configReady || !storyStore.currentVariant.previewReady"
|
|
40
|
+
class="histoire-story-side-panel histoire-loading"
|
|
41
|
+
>
|
|
36
42
|
<span>Loading...</span>
|
|
37
43
|
</BaseEmpty>
|
|
38
44
|
|
|
@@ -40,7 +46,7 @@ const panelContentComponent = computed(() => {
|
|
|
40
46
|
v-else
|
|
41
47
|
save-id="story-sidepane"
|
|
42
48
|
orientation="portrait"
|
|
43
|
-
class="htw-h-full"
|
|
49
|
+
class="histoire-story-side-panel histoire-loaded htw-h-full"
|
|
44
50
|
data-test-id="story-side-panel"
|
|
45
51
|
>
|
|
46
52
|
<template #first>
|
|
@@ -131,7 +131,7 @@ watch(sourceHtml, async () => {
|
|
|
131
131
|
|
|
132
132
|
<template>
|
|
133
133
|
<div
|
|
134
|
-
class="htw-bg-gray-50 dark:htw-bg-gray-750 htw-h-full htw-overflow-hidden htw-flex htw-flex-col"
|
|
134
|
+
class="histoire-story-source-code htw-bg-gray-50 dark:htw-bg-gray-750 htw-h-full htw-overflow-hidden htw-flex htw-flex-col"
|
|
135
135
|
>
|
|
136
136
|
<!-- Toolbar -->
|
|
137
137
|
<div
|
|
@@ -4,7 +4,7 @@ import { Icon } from '@iconify/vue'
|
|
|
4
4
|
|
|
5
5
|
<template>
|
|
6
6
|
<div
|
|
7
|
-
class="htw-flex htw-items-center htw-gap-4 htw-pl-6 htw-border htw-border-transparent focus-visible:htw-border-primary-500 htw-h-[51px] htw-opacity-30"
|
|
7
|
+
class="histoire-search-loading htw-flex htw-items-center htw-gap-4 htw-pl-6 htw-border htw-border-transparent focus-visible:htw-border-primary-500 htw-h-[51px] htw-opacity-30"
|
|
8
8
|
>
|
|
9
9
|
<Icon
|
|
10
10
|
icon="carbon:search"
|
|
@@ -26,7 +26,7 @@ function close () {
|
|
|
26
26
|
<template>
|
|
27
27
|
<div
|
|
28
28
|
v-show="shown"
|
|
29
|
-
class="htw-fixed htw-inset-0 htw-bg-white/80 dark:htw-bg-gray-700/80 htw-z-20"
|
|
29
|
+
class="histoire-search-modal htw-fixed htw-inset-0 htw-bg-white/80 dark:htw-bg-gray-700/80 htw-z-20"
|
|
30
30
|
data-test-id="search-modal"
|
|
31
31
|
>
|
|
32
32
|
<div
|
|
@@ -262,7 +262,7 @@ function selectPrevious () {
|
|
|
262
262
|
|
|
263
263
|
<template>
|
|
264
264
|
<div
|
|
265
|
-
class="htw-flex htw-items-center htw-gap-4 htw-pl-6 htw-border htw-border-transparent focus-visible:htw-border-primary-500"
|
|
265
|
+
class="histoire-search-pane htw-flex htw-items-center htw-gap-4 htw-pl-6 htw-border htw-border-transparent focus-visible:htw-border-primary-500"
|
|
266
266
|
@click="focused = true"
|
|
267
267
|
>
|
|
268
268
|
<Icon
|