@histoire/app 0.11.7 → 0.11.9

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.
@@ -64,8 +64,9 @@ button {
64
64
  }
65
65
  }
66
66
 
67
- .htw-sandbox-contain {
68
- contain: content;
67
+ .__histoire-render-story {
68
+ overflow: auto;
69
+ min-height: 100%;
69
70
  }
70
71
 
71
72
  .__histoire-code .shiki {
@@ -18,6 +18,7 @@ html {
18
18
  display: none;
19
19
  }
20
20
 
21
- .htw-sandbox-contain {
22
- contain: content;
21
+ .__histoire-render-story {
22
+ overflow: auto;
23
+ min-height: 100%;
23
24
  }
@@ -29,7 +29,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
29
  return (_ctx, _cache) => {
30
30
  return openBlock(), createBlock(unref(Dropdown), {
31
31
  class: "histoire-base-select",
32
- "auto-size": ""
32
+ "auto-size": "",
33
+ "auto-boundary-max-size": ""
33
34
  }, {
34
35
  popper: withCtx(({ hide }) => [
35
36
  createElementVNode("div", _hoisted_3, [
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./StorySourceCode.vue_vue_type_script_setup_true_lang.js";
2
- import "./StorySourceCode.vue_vue_type_style_index_0_scoped_36810e45_lang.js";
2
+ import "./StorySourceCode.vue_vue_type_style_index_0_scoped_f528bb1b_lang.js";
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const StorySourceCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-36810e45"]]);
4
+ const StorySourceCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f528bb1b"]]);
5
5
  export {
6
6
  StorySourceCode as default
7
7
  };
@@ -1,12 +1,12 @@
1
1
  import { defineComponent, ref, watchEffect, markRaw, shallowRef, watch, computed, onMounted, nextTick, resolveDirective, openBlock, createElementBlock, createElementVNode, withDirectives, normalizeClass, createVNode, unref, createCommentVNode, toDisplayString, createBlock, withCtx, pushScopeId, popScopeId } from "@histoire/vendors/vue";
2
2
  import { Icon } from "@histoire/vendors/iconify";
3
- import { setCDN, getHighlighter } from "shiki";
3
+ import { getHighlighter } from "shiki-es";
4
4
  import { HstCopyIcon } from "@histoire/controls";
5
5
  import { unindent } from "@histoire/shared";
6
6
  import { clientSupportPlugins } from "virtual:$histoire-support-plugins-client";
7
7
  import { isDark } from "../../util/dark.js";
8
8
  import BaseEmpty from "../base/BaseEmpty.js";
9
- const _withScopeId = (n) => (pushScopeId("data-v-36810e45"), n = n(), popScopeId(), n);
9
+ const _withScopeId = (n) => (pushScopeId("data-v-f528bb1b"), n = n(), popScopeId(), n);
10
10
  const _hoisted_1 = { 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" };
11
11
  const _hoisted_2 = {
12
12
  key: 0,
@@ -92,7 +92,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
92
92
  return staticSourceCode.value;
93
93
  });
94
94
  onMounted(async () => {
95
- setCDN("https://unpkg.com/shiki@0.10.1/");
96
95
  highlighter.value = await getHighlighter({
97
96
  langs: [
98
97
  "html",
@@ -0,0 +1,4 @@
1
+ const StorySourceCode_vue_vue_type_style_index_0_scoped_f528bb1b_lang = "";
2
+ export {
3
+ StorySourceCode_vue_vue_type_style_index_0_scoped_f528bb1b_lang as default
4
+ };
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  return (_ctx, _cache) => {
24
24
  return mountComponent.value ? (openBlock(), createBlock(resolveDynamicComponent(mountComponent.value), mergeProps({
25
25
  key: 0,
26
- class: "histoire-generic-render-story htw-sandbox-contain",
26
+ class: "histoire-generic-render-story __histoire-render-story",
27
27
  story: __props.story
28
28
  }, _ctx.$attrs), null, 16, ["story"])) : createCommentVNode("", true);
29
29
  };
@@ -11,7 +11,7 @@ const _hoisted_2 = {
11
11
  key: 0,
12
12
  class: "htw-flex-none htw-flex htw-items-center htw-justify-end htw-h-8 htw-mx-2 htw-mt-1"
13
13
  };
14
- const _hoisted_3 = { class: "htw-overflow-y-auto htw-flex htw-flex-1" };
14
+ const _hoisted_3 = { class: "htw-flex htw-w-0 htw-flex-1 htw-mx-4" };
15
15
  const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  __name: "StoryVariantGrid",
17
17
  setup(__props) {
@@ -99,13 +99,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
99
99
  createVNode(ToolbarBackground),
100
100
  createVNode(_sfc_main$1)
101
101
  ])) : createCommentVNode("", true),
102
- createElementVNode("div", _hoisted_3, [
103
- createElementVNode("div", {
104
- ref_key: "el",
105
- ref: el,
106
- class: "htw-flex htw-w-0 htw-flex-1 htw-mx-4",
107
- onScroll: _cache[0] || (_cache[0] = ($event) => updateMaxCount())
108
- }, [
102
+ createElementVNode("div", {
103
+ ref_key: "el",
104
+ ref: el,
105
+ class: "htw-overflow-y-auto htw-flex htw-flex-1",
106
+ onScroll: _cache[0] || (_cache[0] = ($event) => updateMaxCount())
107
+ }, [
108
+ createElementVNode("div", _hoisted_3, [
109
109
  createElementVNode("div", {
110
110
  class: "htw-m-auto",
111
111
  style: normalizeStyle({
@@ -130,8 +130,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
130
130
  }), 128))
131
131
  ], 4)
132
132
  ], 4)
133
- ], 544)
134
- ])
133
+ ])
134
+ ], 544)
135
135
  ]);
136
136
  };
137
137
  }
@@ -59,17 +59,13 @@
59
59
  color: var(--4d25d048);
60
60
  }
61
61
 
62
- .bind-icon-color[data-v-ab890d9c] {
63
- color: var(--89126aaa);
64
- }
65
-
66
- .__histoire-code-placeholder[data-v-36810e45] {
62
+ .__histoire-code-placeholder[data-v-f528bb1b] {
67
63
  color: inherit;
68
64
  font-size: inherit;
69
65
  }
70
66
 
71
- .bind-icon-color[data-v-d95fcb03] {
72
- color: var(--beebbd52);
67
+ .bind-icon-color[data-v-ab890d9c] {
68
+ color: var(--89126aaa);
73
69
  }
74
70
 
75
71
  .bind-icon-color[data-v-f7c98176] {
@@ -84,6 +80,10 @@
84
80
  color: var(--35068428);
85
81
  }
86
82
 
83
+ .bind-icon-color[data-v-d95fcb03] {
84
+ color: var(--beebbd52);
85
+ }
86
+
87
87
  .bind-preview-bg[data-v-a83b1911] {
88
88
  background-color: var(--03d1950e);
89
89
  }
package/dist/style.css CHANGED
@@ -440,8 +440,9 @@ body {
440
440
  }
441
441
  }
442
442
 
443
- .htw-sandbox-contain {
444
- contain: content;
443
+ .__histoire-render-story {
444
+ overflow: auto;
445
+ min-height: 100%;
445
446
  }
446
447
 
447
448
  .__histoire-code .shiki {
@@ -1054,151 +1055,6 @@ body {
1054
1055
  margin-top:1.25rem
1055
1056
  }
1056
1057
 
1057
- .htw-prose-sm :where(.htw-prose > ul > li p):not(:where([class~="htw-not-prose"] *)){
1058
- margin-top:0.5714286em;
1059
- margin-bottom:0.5714286em
1060
- }
1061
-
1062
- .htw-prose-sm :where(.htw-prose > ul > li > *:first-child):not(:where([class~="htw-not-prose"] *)){
1063
- margin-top:1.1428571em
1064
- }
1065
-
1066
- .htw-prose-sm :where(.htw-prose > ul > li > *:last-child):not(:where([class~="htw-not-prose"] *)){
1067
- margin-bottom:1.1428571em
1068
- }
1069
-
1070
- .htw-prose-sm :where(.htw-prose > ol > li > *:first-child):not(:where([class~="htw-not-prose"] *)){
1071
- margin-top:1.1428571em
1072
- }
1073
-
1074
- .htw-prose-sm :where(.htw-prose > ol > li > *:last-child):not(:where([class~="htw-not-prose"] *)){
1075
- margin-bottom:1.1428571em
1076
- }
1077
-
1078
- .htw-prose-sm :where(.htw-prose > :first-child):not(:where([class~="htw-not-prose"] *)){
1079
- margin-top:0
1080
- }
1081
-
1082
- .htw-prose-sm :where(.htw-prose > :last-child):not(:where([class~="htw-not-prose"] *)){
1083
- margin-bottom:0
1084
- }
1085
-
1086
- .htw-prose-base :where(.htw-prose > ul > li p):not(:where([class~="htw-not-prose"] *)){
1087
- margin-top:0.75em;
1088
- margin-bottom:0.75em
1089
- }
1090
-
1091
- .htw-prose-base :where(.htw-prose > ul > li > *:first-child):not(:where([class~="htw-not-prose"] *)){
1092
- margin-top:1.25em
1093
- }
1094
-
1095
- .htw-prose-base :where(.htw-prose > ul > li > *:last-child):not(:where([class~="htw-not-prose"] *)){
1096
- margin-bottom:1.25em
1097
- }
1098
-
1099
- .htw-prose-base :where(.htw-prose > ol > li > *:first-child):not(:where([class~="htw-not-prose"] *)){
1100
- margin-top:1.25em
1101
- }
1102
-
1103
- .htw-prose-base :where(.htw-prose > ol > li > *:last-child):not(:where([class~="htw-not-prose"] *)){
1104
- margin-bottom:1.25em
1105
- }
1106
-
1107
- .htw-prose-base :where(.htw-prose > :first-child):not(:where([class~="htw-not-prose"] *)){
1108
- margin-top:0
1109
- }
1110
-
1111
- .htw-prose-base :where(.htw-prose > :last-child):not(:where([class~="htw-not-prose"] *)){
1112
- margin-bottom:0
1113
- }
1114
-
1115
- .htw-prose-lg :where(.htw-prose > ul > li p):not(:where([class~="htw-not-prose"] *)){
1116
- margin-top:0.8888889em;
1117
- margin-bottom:0.8888889em
1118
- }
1119
-
1120
- .htw-prose-lg :where(.htw-prose > ul > li > *:first-child):not(:where([class~="htw-not-prose"] *)){
1121
- margin-top:1.3333333em
1122
- }
1123
-
1124
- .htw-prose-lg :where(.htw-prose > ul > li > *:last-child):not(:where([class~="htw-not-prose"] *)){
1125
- margin-bottom:1.3333333em
1126
- }
1127
-
1128
- .htw-prose-lg :where(.htw-prose > ol > li > *:first-child):not(:where([class~="htw-not-prose"] *)){
1129
- margin-top:1.3333333em
1130
- }
1131
-
1132
- .htw-prose-lg :where(.htw-prose > ol > li > *:last-child):not(:where([class~="htw-not-prose"] *)){
1133
- margin-bottom:1.3333333em
1134
- }
1135
-
1136
- .htw-prose-lg :where(.htw-prose > :first-child):not(:where([class~="htw-not-prose"] *)){
1137
- margin-top:0
1138
- }
1139
-
1140
- .htw-prose-lg :where(.htw-prose > :last-child):not(:where([class~="htw-not-prose"] *)){
1141
- margin-bottom:0
1142
- }
1143
-
1144
- .htw-prose-xl :where(.htw-prose > ul > li p):not(:where([class~="htw-not-prose"] *)){
1145
- margin-top:0.8em;
1146
- margin-bottom:0.8em
1147
- }
1148
-
1149
- .htw-prose-xl :where(.htw-prose > ul > li > *:first-child):not(:where([class~="htw-not-prose"] *)){
1150
- margin-top:1.2em
1151
- }
1152
-
1153
- .htw-prose-xl :where(.htw-prose > ul > li > *:last-child):not(:where([class~="htw-not-prose"] *)){
1154
- margin-bottom:1.2em
1155
- }
1156
-
1157
- .htw-prose-xl :where(.htw-prose > ol > li > *:first-child):not(:where([class~="htw-not-prose"] *)){
1158
- margin-top:1.2em
1159
- }
1160
-
1161
- .htw-prose-xl :where(.htw-prose > ol > li > *:last-child):not(:where([class~="htw-not-prose"] *)){
1162
- margin-bottom:1.2em
1163
- }
1164
-
1165
- .htw-prose-xl :where(.htw-prose > :first-child):not(:where([class~="htw-not-prose"] *)){
1166
- margin-top:0
1167
- }
1168
-
1169
- .htw-prose-xl :where(.htw-prose > :last-child):not(:where([class~="htw-not-prose"] *)){
1170
- margin-bottom:0
1171
- }
1172
-
1173
- .htw-prose-2xl :where(.htw-prose > ul > li p):not(:where([class~="htw-not-prose"] *)){
1174
- margin-top:0.8333333em;
1175
- margin-bottom:0.8333333em
1176
- }
1177
-
1178
- .htw-prose-2xl :where(.htw-prose > ul > li > *:first-child):not(:where([class~="htw-not-prose"] *)){
1179
- margin-top:1.3333333em
1180
- }
1181
-
1182
- .htw-prose-2xl :where(.htw-prose > ul > li > *:last-child):not(:where([class~="htw-not-prose"] *)){
1183
- margin-bottom:1.3333333em
1184
- }
1185
-
1186
- .htw-prose-2xl :where(.htw-prose > ol > li > *:first-child):not(:where([class~="htw-not-prose"] *)){
1187
- margin-top:1.3333333em
1188
- }
1189
-
1190
- .htw-prose-2xl :where(.htw-prose > ol > li > *:last-child):not(:where([class~="htw-not-prose"] *)){
1191
- margin-bottom:1.3333333em
1192
- }
1193
-
1194
- .htw-prose-2xl :where(.htw-prose > :first-child):not(:where([class~="htw-not-prose"] *)){
1195
- margin-top:0
1196
- }
1197
-
1198
- .htw-prose-2xl :where(.htw-prose > :last-child):not(:where([class~="htw-not-prose"] *)){
1199
- margin-bottom:0
1200
- }
1201
-
1202
1058
  .htw-pointer-events-none{
1203
1059
  pointer-events:none
1204
1060
  }
@@ -2561,25 +2417,6 @@ body {
2561
2417
  background-color:rgb(var(--_histoire-color-gray-500) / 0.2)
2562
2418
  }
2563
2419
 
2564
- .htw-dark .dark\:htw-prose-invert{
2565
- --tw-prose-body:var(--tw-prose-invert-body);
2566
- --tw-prose-headings:var(--tw-prose-invert-headings);
2567
- --tw-prose-lead:var(--tw-prose-invert-lead);
2568
- --tw-prose-links:var(--tw-prose-invert-links);
2569
- --tw-prose-bold:var(--tw-prose-invert-bold);
2570
- --tw-prose-counters:var(--tw-prose-invert-counters);
2571
- --tw-prose-bullets:var(--tw-prose-invert-bullets);
2572
- --tw-prose-hr:var(--tw-prose-invert-hr);
2573
- --tw-prose-quotes:var(--tw-prose-invert-quotes);
2574
- --tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);
2575
- --tw-prose-captions:var(--tw-prose-invert-captions);
2576
- --tw-prose-code:var(--tw-prose-invert-code);
2577
- --tw-prose-pre-code:var(--tw-prose-invert-pre-code);
2578
- --tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);
2579
- --tw-prose-th-borders:var(--tw-prose-invert-th-borders);
2580
- --tw-prose-td-borders:var(--tw-prose-invert-td-borders)
2581
- }
2582
-
2583
2420
  .htw-dark .dark\:htw-divide-gray-800 > :not([hidden]) ~ :not([hidden]){
2584
2421
  --tw-divide-opacity:1;
2585
2422
  border-color:rgb(var(--_histoire-color-gray-800) / var(--tw-divide-opacity))
@@ -2675,6 +2512,25 @@ body {
2675
2512
  background-color:rgb(var(--_histoire-color-gray-600) / var(--tw-bg-opacity))
2676
2513
  }
2677
2514
 
2515
+ .htw-dark .dark\:htw-prose-invert{
2516
+ --tw-prose-body:var(--tw-prose-invert-body);
2517
+ --tw-prose-headings:var(--tw-prose-invert-headings);
2518
+ --tw-prose-lead:var(--tw-prose-invert-lead);
2519
+ --tw-prose-links:var(--tw-prose-invert-links);
2520
+ --tw-prose-bold:var(--tw-prose-invert-bold);
2521
+ --tw-prose-counters:var(--tw-prose-invert-counters);
2522
+ --tw-prose-bullets:var(--tw-prose-invert-bullets);
2523
+ --tw-prose-hr:var(--tw-prose-invert-hr);
2524
+ --tw-prose-quotes:var(--tw-prose-invert-quotes);
2525
+ --tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);
2526
+ --tw-prose-captions:var(--tw-prose-invert-captions);
2527
+ --tw-prose-code:var(--tw-prose-invert-code);
2528
+ --tw-prose-pre-code:var(--tw-prose-invert-pre-code);
2529
+ --tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);
2530
+ --tw-prose-th-borders:var(--tw-prose-invert-th-borders);
2531
+ --tw-prose-td-borders:var(--tw-prose-invert-td-borders)
2532
+ }
2533
+
2678
2534
  .htw-dark .dark\:htw-text-gray-100{
2679
2535
  --tw-text-opacity:1;
2680
2536
  color:rgb(var(--_histoire-color-gray-100) / var(--tw-text-opacity))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@histoire/app",
3
- "version": "0.11.7",
3
+ "version": "0.11.9",
4
4
  "description": "Pre-bundled UI for Histoire",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -24,12 +24,12 @@
24
24
  },
25
25
  "types": "./src/index.ts",
26
26
  "dependencies": {
27
- "@histoire/controls": "^0.11.7",
28
- "@histoire/shared": "^0.11.7",
29
- "@histoire/vendors": "^0.11.7",
27
+ "@histoire/controls": "^0.11.9",
28
+ "@histoire/shared": "^0.11.9",
29
+ "@histoire/vendors": "^0.11.9",
30
30
  "@types/flexsearch": "^0.7.3",
31
31
  "flexsearch": "0.7.21",
32
- "shiki": "0.10.1"
32
+ "shiki-es": "^0.1.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@tailwindcss/typography": "^0.5.2",
@@ -33,6 +33,7 @@ function selectValue (value: string, hide: () => void) {
33
33
  <VDropdown
34
34
  class="histoire-base-select"
35
35
  auto-size
36
+ auto-boundary-max-size
36
37
  >
37
38
  <div
38
39
  class="htw-cursor-pointer htw-w-full htw-outline-none htw-px-2 htw-h-[27px] -htw-my-1 htw-border htw-border-solid htw-border-black/25 dark:htw-border-white/25 hover:htw-border-primary-500 dark:hover:htw-border-primary-500 htw-rounded-sm htw-flex htw-gap-2 htw-items-center htw-leading-normal"
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import { computed, markRaw, nextTick, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'
3
3
  import { Icon } from '@iconify/vue'
4
- import { getHighlighter, Highlighter, setCDN } from 'shiki'
4
+ import { getHighlighter, Highlighter } from 'shiki-es'
5
5
  import { HstCopyIcon } from '@histoire/controls'
6
6
  import { unindent } from '@histoire/shared'
7
7
  // @ts-expect-error virtual module
@@ -84,7 +84,6 @@ const displayedSourceCode = computed(() => {
84
84
  // HTML render
85
85
 
86
86
  onMounted(async () => {
87
- setCDN('https://unpkg.com/shiki@0.10.1/')
88
87
  highlighter.value = await getHighlighter({
89
88
  langs: [
90
89
  'html',
@@ -29,7 +29,7 @@ watchEffect(async () => {
29
29
  <component
30
30
  :is="mountComponent"
31
31
  v-if="mountComponent"
32
- class="histoire-generic-render-story htw-sandbox-contain"
32
+ class="histoire-generic-render-story __histoire-render-story"
33
33
  :story="story"
34
34
  v-bind="$attrs"
35
35
  />
@@ -127,12 +127,12 @@ const columnCount = computed(() => Math.min(storyStore.currentStory.variants.len
127
127
  <ToolbarTextDirection />
128
128
  </div>
129
129
 
130
- <div class="htw-overflow-y-auto htw-flex htw-flex-1">
131
- <div
132
- ref="el"
133
- class="htw-flex htw-w-0 htw-flex-1 htw-mx-4"
134
- @scroll="updateMaxCount()"
135
- >
130
+ <div
131
+ ref="el"
132
+ class="htw-overflow-y-auto htw-flex htw-flex-1"
133
+ @scroll="updateMaxCount()"
134
+ >
135
+ <div class="htw-flex htw-w-0 htw-flex-1 htw-mx-4">
136
136
  <div
137
137
  class="htw-m-auto"
138
138
  :style="{
@@ -64,8 +64,9 @@ button {
64
64
  }
65
65
  }
66
66
 
67
- .htw-sandbox-contain {
68
- contain: content;
67
+ .__histoire-render-story {
68
+ overflow: auto;
69
+ min-height: 100%;
69
70
  }
70
71
 
71
72
  .__histoire-code .shiki {
@@ -18,6 +18,7 @@ html {
18
18
  display: none;
19
19
  }
20
20
 
21
- .htw-sandbox-contain {
22
- contain: content;
21
+ .__histoire-render-story {
22
+ overflow: auto;
23
+ min-height: 100%;
23
24
  }
@@ -1,4 +0,0 @@
1
- const StorySourceCode_vue_vue_type_style_index_0_scoped_36810e45_lang = "";
2
- export {
3
- StorySourceCode_vue_vue_type_style_index_0_scoped_36810e45_lang as default
4
- };