@histoire/app 0.11.5 → 0.11.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.
Files changed (157) hide show
  1. package/dist/app/style/{floating-vue.pcss → floating.pcss} +0 -0
  2. package/dist/app/style/main.pcss +46 -44
  3. package/dist/app/style/sandbox.css +1 -1
  4. package/dist/bundle-main-dev.js +4 -0
  5. package/dist/bundle-sandbox-dev.js +2 -0
  6. package/dist/bundled/App.vue_vue_type_script_setup_true_lang.js +1 -1
  7. package/dist/bundled/components/HomeView.vue_vue_type_script_setup_true_lang.js +1 -1
  8. package/dist/bundled/components/app/AppHeader.vue_vue_type_script_setup_true_lang.js +1 -1
  9. package/dist/bundled/components/app/AppLogo.vue_vue_type_script_setup_true_lang.js +1 -0
  10. package/dist/bundled/components/app/Breadcrumb.js +2 -2
  11. package/dist/bundled/components/app/Breadcrumb.vue_vue_type_script_setup_true_lang.js +10 -9
  12. package/dist/bundled/components/app/Breadcrumb.vue_vue_type_style_index_0_scoped_36846ccf_lang.js +4 -0
  13. package/dist/bundled/components/app/InitialLoading.vue_vue_type_script_setup_true_lang.js +1 -1
  14. package/dist/bundled/components/app/MobileOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
  15. package/dist/bundled/components/base/BaseCheckbox.vue_vue_type_script_setup_true_lang.js +1 -1
  16. package/dist/bundled/components/base/BaseEmpty.js +4 -4
  17. package/dist/bundled/components/base/BaseEmpty.vue_vue_type_style_index_0_scoped_c5ecfead_lang.js +4 -0
  18. package/dist/bundled/components/base/BaseListItemLink.js +1 -1
  19. package/dist/bundled/components/base/BaseOverflowMenu.vue_vue_type_script_setup_true_lang.js +1 -1
  20. package/dist/bundled/components/base/BaseOverflowTab.js +1 -1
  21. package/dist/bundled/components/base/BaseSelect.vue_vue_type_script_setup_true_lang.js +4 -1
  22. package/dist/bundled/components/base/BaseSplitPane.js +2 -2
  23. package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_script_setup_true_lang.js +2 -2
  24. package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_style_index_0_scoped_ed925107_lang.js +4 -0
  25. package/dist/bundled/components/base/BaseTab.js +1 -1
  26. package/dist/bundled/components/base/BaseTag.js +13 -0
  27. package/dist/bundled/components/panel/ControlsComponentPropItem.vue_vue_type_script_setup_true_lang.js +1 -0
  28. package/dist/bundled/components/panel/ControlsComponentProps.vue_vue_type_script_setup_true_lang.js +8 -7
  29. package/dist/bundled/components/panel/PaneTabs.vue_vue_type_script_setup_true_lang.js +15 -12
  30. package/dist/bundled/components/panel/StatePresets.vue_vue_type_script_setup_true_lang.js +1 -1
  31. package/dist/bundled/components/panel/StoryControls.vue_vue_type_script_setup_true_lang.js +1 -1
  32. package/dist/bundled/components/panel/StoryDocs.vue_vue_type_script_setup_true_lang.js +17 -2
  33. package/dist/bundled/components/panel/StoryEvent.vue_vue_type_script_setup_true_lang.js +1 -1
  34. package/dist/bundled/components/panel/StoryEvents.vue_vue_type_script_setup_true_lang.js +2 -1
  35. package/dist/bundled/components/panel/StorySidePanel.vue_vue_type_script_setup_true_lang.js +9 -3
  36. package/dist/bundled/components/panel/StorySourceCode.js +2 -2
  37. package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js +2 -2
  38. package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_style_index_0_scoped_36810e45_lang.js +4 -0
  39. package/dist/bundled/components/search/SearchItem.js +2 -2
  40. package/dist/bundled/components/search/SearchItem.vue_vue_type_script_setup_true_lang.js +3 -2
  41. package/dist/bundled/components/search/SearchItem.vue_vue_type_style_index_0_scoped_d95fcb03_lang.js +4 -0
  42. package/dist/bundled/components/search/SearchLoading.vue_vue_type_script_setup_true_lang.js +1 -1
  43. package/dist/bundled/components/search/SearchModal.vue_vue_type_script_setup_true_lang.js +1 -1
  44. package/dist/bundled/components/search/SearchPane.vue_vue_type_script_setup_true_lang.js +1 -1
  45. package/dist/bundled/components/story/GenericMountStory.vue_vue_type_script_setup_true_lang.js +1 -0
  46. package/dist/bundled/components/story/GenericRenderStory.vue_vue_type_script_setup_true_lang.js +1 -0
  47. package/dist/bundled/components/story/StoryResponsivePreview.js +2 -2
  48. package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js +41 -12
  49. package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_style_index_0_scoped_a83b1911_lang.js +4 -0
  50. package/dist/bundled/components/story/StoryVariantGrid.vue_vue_type_script_setup_true_lang.js +4 -1
  51. package/dist/bundled/components/story/StoryVariantGridItem.js +2 -2
  52. package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js +21 -9
  53. package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_style_index_0_scoped_f7c98176_lang.js +4 -0
  54. package/dist/bundled/components/story/StoryVariantListItem.js +2 -2
  55. package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_script_setup_true_lang.js +3 -2
  56. package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_style_index_0_scoped_ab890d9c_lang.js +4 -0
  57. package/dist/bundled/components/story/StoryVariantSingle.js +2 -2
  58. package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_script_setup_true_lang.js +3 -3
  59. package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_style_index_0_scoped_ddfc5b4f_lang.js +4 -0
  60. package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue_vue_type_script_setup_true_lang.js +19 -7
  61. package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue_vue_type_script_setup_true_lang.js +4 -1
  62. package/dist/bundled/components/story/StoryVariantSingleView.vue_vue_type_script_setup_true_lang.js +1 -1
  63. package/dist/bundled/components/story/StoryView.vue_vue_type_script_setup_true_lang.js +5 -2
  64. package/dist/bundled/components/story/StoryViewer.js +2 -2
  65. package/dist/bundled/components/story/StoryViewer.vue_vue_type_script_setup_true_lang.js +3 -3
  66. package/dist/bundled/components/story/StoryViewer.vue_vue_type_style_index_0_scoped_6046525f_lang.js +4 -0
  67. package/dist/bundled/components/toolbar/ToolbarBackground.js +2 -2
  68. package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_script_setup_true_lang.js +32 -18
  69. package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_style_index_0_scoped_c48fb2b2_lang.js +4 -0
  70. package/dist/bundled/components/toolbar/ToolbarNewTab.vue_vue_type_script_setup_true_lang.js +1 -1
  71. package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js +3 -3
  72. package/dist/bundled/components/toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js +1 -1
  73. package/dist/bundled/components/toolbar/ToolbarTitle.vue_vue_type_script_setup_true_lang.js +1 -1
  74. package/dist/bundled/components/tree/StoryGroup.vue_vue_type_script_setup_true_lang.js +1 -1
  75. package/dist/bundled/components/tree/StoryList.vue_vue_type_script_setup_true_lang.js +1 -1
  76. package/dist/bundled/components/tree/StoryListFolder.js +2 -2
  77. package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_script_setup_true_lang.js +6 -3
  78. package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_style_index_0_scoped_2fedbe45_lang.js +4 -0
  79. package/dist/bundled/components/tree/StoryListItem.js +2 -2
  80. package/dist/bundled/components/tree/StoryListItem.vue_vue_type_script_setup_true_lang.js +5 -4
  81. package/dist/bundled/components/tree/StoryListItem.vue_vue_type_style_index_0_scoped_19810958_lang.js +4 -0
  82. package/dist/bundled/style.css +48 -47
  83. package/dist/bundled/util/preview-settings.js +11 -0
  84. package/dist/style.css +55 -55
  85. package/package.json +4 -4
  86. package/src/app/App.vue +1 -1
  87. package/src/app/components/HomeView.vue +1 -1
  88. package/src/app/components/app/AppHeader.vue +1 -1
  89. package/src/app/components/app/AppLogo.vue +1 -0
  90. package/src/app/components/app/Breadcrumb.vue +1 -1
  91. package/src/app/components/app/InitialLoading.vue +1 -1
  92. package/src/app/components/app/MobileOverlay.vue +1 -1
  93. package/src/app/components/base/BaseCheckbox.vue +1 -1
  94. package/src/app/components/base/BaseCopyIcon.vue +1 -1
  95. package/src/app/components/base/BaseEmpty.vue +1 -1
  96. package/src/app/components/base/BaseListItemLink.vue +1 -0
  97. package/src/app/components/base/BaseOverflowMenu.vue +1 -1
  98. package/src/app/components/base/BaseOverflowTab.vue +1 -0
  99. package/src/app/components/base/BaseSelect.vue +1 -0
  100. package/src/app/components/base/BaseSplitPane.vue +1 -1
  101. package/src/app/components/base/BaseTab.vue +1 -0
  102. package/src/app/components/base/BaseTag.vue +5 -0
  103. package/src/app/components/panel/ControlsComponentPropItem.vue +1 -0
  104. package/src/app/components/panel/ControlsComponentProps.vue +1 -1
  105. package/src/app/components/panel/PaneTabs.vue +7 -12
  106. package/src/app/components/panel/StatePresets.vue +1 -1
  107. package/src/app/components/panel/StoryControls.vue +1 -1
  108. package/src/app/components/panel/StoryDocs.vue +30 -1
  109. package/src/app/components/panel/StoryEvent.vue +1 -1
  110. package/src/app/components/panel/StoryEvents.vue +4 -1
  111. package/src/app/components/panel/StorySidePanel.vue +9 -3
  112. package/src/app/components/panel/StorySourceCode.vue +1 -1
  113. package/src/app/components/search/SearchItem.vue +1 -0
  114. package/src/app/components/search/SearchLoading.vue +1 -1
  115. package/src/app/components/search/SearchModal.vue +1 -1
  116. package/src/app/components/search/SearchPane.vue +1 -1
  117. package/src/app/components/story/GenericMountStory.vue +1 -0
  118. package/src/app/components/story/GenericRenderStory.vue +1 -0
  119. package/src/app/components/story/StoryResponsivePreview.vue +11 -2
  120. package/src/app/components/story/StoryVariantGrid.vue +5 -1
  121. package/src/app/components/story/StoryVariantGridItem.vue +18 -4
  122. package/src/app/components/story/StoryVariantListItem.vue +1 -0
  123. package/src/app/components/story/StoryVariantSingle.vue +1 -1
  124. package/src/app/components/story/StoryVariantSinglePreviewNative.vue +17 -5
  125. package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +1 -0
  126. package/src/app/components/story/StoryVariantSingleView.vue +1 -1
  127. package/src/app/components/story/StoryView.vue +5 -2
  128. package/src/app/components/story/StoryViewer.vue +1 -1
  129. package/src/app/components/toolbar/ToolbarBackground.vue +21 -7
  130. package/src/app/components/toolbar/ToolbarNewTab.vue +1 -1
  131. package/src/app/components/toolbar/ToolbarResponsiveSize.vue +3 -3
  132. package/src/app/components/toolbar/ToolbarTextDirection.vue +1 -1
  133. package/src/app/components/toolbar/ToolbarTitle.vue +1 -1
  134. package/src/app/components/tree/StoryGroup.vue +1 -1
  135. package/src/app/components/tree/StoryList.vue +1 -1
  136. package/src/app/components/tree/StoryListFolder.vue +4 -1
  137. package/src/app/components/tree/StoryListItem.vue +1 -0
  138. package/src/app/style/{floating-vue.pcss → floating.pcss} +0 -0
  139. package/src/app/style/main.pcss +46 -44
  140. package/src/app/style/sandbox.css +1 -1
  141. package/src/app/util/preview-settings.ts +13 -0
  142. package/src/bundle-main-dev.js +4 -0
  143. package/src/bundle-sandbox-dev.js +2 -0
  144. package/tailwind.config.cjs +1 -1
  145. package/dist/bundled/components/app/Breadcrumb.vue_vue_type_style_index_0_scoped_3c779b73_lang.js +0 -4
  146. package/dist/bundled/components/base/BaseEmpty.vue_vue_type_style_index_0_scoped_af3328a6_lang.js +0 -4
  147. package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_style_index_0_scoped_bb6c600c_lang.js +0 -4
  148. package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_style_index_0_scoped_0d096b10_lang.js +0 -4
  149. package/dist/bundled/components/search/SearchItem.vue_vue_type_style_index_0_scoped_b819ed97_lang.js +0 -4
  150. package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_style_index_0_scoped_1375d05a_lang.js +0 -4
  151. package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_style_index_0_scoped_601cc357_lang.js +0 -4
  152. package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_style_index_0_scoped_02816158_lang.js +0 -4
  153. package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_style_index_0_scoped_89489ae4_lang.js +0 -4
  154. package/dist/bundled/components/story/StoryViewer.vue_vue_type_style_index_0_scoped_54d5a557_lang.js +0 -4
  155. package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_style_index_0_scoped_8d0cb17e_lang.js +0 -4
  156. package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_style_index_0_scoped_41fb5f7e_lang.js +0 -4
  157. package/dist/bundled/components/tree/StoryListItem.vue_vue_type_style_index_0_scoped_d1a05247_lang.js +0 -4
@@ -31,12 +31,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
31
  }
32
32
  });
33
33
  return (_ctx, _cache) => {
34
- return !unref(storyStore).currentVariant ? (openBlock(), createBlock(BaseEmpty, { key: 0 }, {
34
+ return !unref(storyStore).currentVariant ? (openBlock(), createBlock(BaseEmpty, {
35
+ key: 0,
36
+ class: "histoire-story-side-panel histoire-selection"
37
+ }, {
35
38
  default: withCtx(() => [
36
39
  _hoisted_1
37
40
  ]),
38
41
  _: 1
39
- })) : !unref(storyStore).currentVariant.configReady || !unref(storyStore).currentVariant.previewReady ? (openBlock(), createBlock(BaseEmpty, { key: 1 }, {
42
+ })) : !unref(storyStore).currentVariant.configReady || !unref(storyStore).currentVariant.previewReady ? (openBlock(), createBlock(BaseEmpty, {
43
+ key: 1,
44
+ class: "histoire-story-side-panel histoire-loading"
45
+ }, {
40
46
  default: withCtx(() => [
41
47
  _hoisted_2
42
48
  ]),
@@ -45,7 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
51
  key: 2,
46
52
  "save-id": "story-sidepane",
47
53
  orientation: "portrait",
48
- class: "htw-h-full",
54
+ class: "histoire-story-side-panel histoire-loaded htw-h-full",
49
55
  "data-test-id": "story-side-panel"
50
56
  }, {
51
57
  first: withCtx(() => [
@@ -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_0d096b10_lang.js";
2
+ import "./StorySourceCode.vue_vue_type_style_index_0_scoped_36810e45_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-0d096b10"]]);
4
+ const StorySourceCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-36810e45"]]);
5
5
  export {
6
6
  StorySourceCode as default
7
7
  };
@@ -6,8 +6,8 @@ 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-0d096b10"), n = n(), popScopeId(), n);
10
- const _hoisted_1 = { class: "htw-bg-gray-50 dark:htw-bg-gray-750 htw-h-full htw-overflow-hidden htw-flex htw-flex-col" };
9
+ const _withScopeId = (n) => (pushScopeId("data-v-36810e45"), n = n(), popScopeId(), n);
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,
13
13
  class: "htw-h-10 htw-flex-none htw-border-b htw-border-solid htw-border-gray-500/5 htw-px-4 htw-flex htw-items-center htw-gap-2"
@@ -0,0 +1,4 @@
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
+ };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./SearchItem.vue_vue_type_script_setup_true_lang.js";
2
- import "./SearchItem.vue_vue_type_style_index_0_scoped_b819ed97_lang.js";
2
+ import "./SearchItem.vue_vue_type_style_index_0_scoped_d95fcb03_lang.js";
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const SearchItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b819ed97"]]);
4
+ const SearchItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d95fcb03"]]);
5
5
  export {
6
6
  SearchItem as default
7
7
  };
@@ -4,7 +4,7 @@ import { Icon } from "@histoire/vendors/iconify";
4
4
  import { onKeyboardShortcut } from "../../util/keyboard.js";
5
5
  import BaseListItemLink from "../base/BaseListItemLink.js";
6
6
  import { useScrollOnActive } from "../../util/scroll.js";
7
- const _withScopeId = (n) => (pushScopeId("data-v-b819ed97"), n = n(), popScopeId(), n);
7
+ const _withScopeId = (n) => (pushScopeId("data-v-d95fcb03"), n = n(), popScopeId(), n);
8
8
  const _hoisted_1 = ["data-selected"];
9
9
  const _hoisted_2 = { class: "htw-flex-1" };
10
10
  const _hoisted_3 = { class: "htw-flex" };
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
31
  setup(__props, { emit }) {
32
32
  const props = __props;
33
33
  useCssVars((_ctx) => ({
34
- "b88798ec": __props.result.iconColor
34
+ "beebbd52": __props.result.iconColor
35
35
  }));
36
36
  const el = ref();
37
37
  const { selected } = toRefs(props);
@@ -55,6 +55,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
55
  return openBlock(), createElementBlock("div", {
56
56
  ref_key: "el",
57
57
  ref: el,
58
+ class: "histoire-search-item",
58
59
  "data-test-id": "search-item",
59
60
  "data-selected": unref(selected) ? "" : void 0
60
61
  }, [
@@ -0,0 +1,4 @@
1
+ const SearchItem_vue_vue_type_style_index_0_scoped_d95fcb03_lang = "";
2
+ export {
3
+ SearchItem_vue_vue_type_style_index_0_scoped_d95fcb03_lang as default
4
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createVNode, unref, createTextVNode } from "@histoire/vendors/vue";
2
2
  import { Icon } from "@histoire/vendors/iconify";
3
- const _hoisted_1 = { 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" };
3
+ const _hoisted_1 = { 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" };
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "SearchLoading",
6
6
  setup(__props) {
@@ -2,7 +2,7 @@ import { defineComponent, defineAsyncComponent, withDirectives, openBlock, creat
2
2
  import "./SearchLoading.js";
3
3
  import _sfc_main$1 from "./SearchLoading.vue_vue_type_script_setup_true_lang.js";
4
4
  const _hoisted_1 = {
5
- class: "htw-fixed htw-inset-0 htw-bg-white/80 dark:htw-bg-gray-700/80 htw-z-20",
5
+ class: "histoire-search-modal htw-fixed htw-inset-0 htw-bg-white/80 dark:htw-bg-gray-700/80 htw-z-20",
6
6
  "data-test-id": "search-modal"
7
7
  };
8
8
  const _hoisted_2 = { class: "htw-bg-white dark:htw-bg-gray-700 md:htw-mt-16 md:htw-mx-auto htw-w-screen htw-max-w-[512px] htw-shadow-xl htw-border htw-border-gray-200 dark:htw-border-gray-850 htw-rounded-lg htw-relative htw-divide-y htw-divide-gray-200 dark:htw-divide-gray-850" };
@@ -221,7 +221,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
221
221
  return (_ctx, _cache) => {
222
222
  return openBlock(), createElementBlock(Fragment, null, [
223
223
  createElementVNode("div", {
224
- class: "htw-flex htw-items-center htw-gap-4 htw-pl-6 htw-border htw-border-transparent focus-visible:htw-border-primary-500",
224
+ 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",
225
225
  onClick: _cache[4] || (_cache[4] = ($event) => focused.value = true)
226
226
  }, [
227
227
  createVNode(unref(Icon), {
@@ -23,6 +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-mount-story",
26
27
  story: __props.story
27
28
  }, _ctx.$attrs), null, 16, ["story"])) : createCommentVNode("", true);
28
29
  };
@@ -23,6 +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",
26
27
  story: __props.story
27
28
  }, _ctx.$attrs), null, 16, ["story"])) : createCommentVNode("", true);
28
29
  };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js";
2
- import "./StoryResponsivePreview.vue_vue_type_style_index_0_scoped_1375d05a_lang.js";
2
+ import "./StoryResponsivePreview.vue_vue_type_style_index_0_scoped_a83b1911_lang.js";
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const StoryResponsivePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1375d05a"]]);
4
+ const StoryResponsivePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a83b1911"]]);
5
5
  export {
6
6
  StoryResponsivePreview as default
7
7
  };
@@ -1,20 +1,24 @@
1
- import { defineComponent, useCssVars, unref, ref, onUnmounted, computed, openBlock, createElementBlock, createVNode, createCommentVNode, createElementVNode, normalizeClass, createBlock, renderSlot, Fragment, pushScopeId, popScopeId, createStaticVNode } from "@histoire/vendors/vue";
1
+ import { defineComponent, useCssVars, unref, ref, onUnmounted, computed, openBlock, createElementBlock, createVNode, createCommentVNode, createElementVNode, normalizeClass, createBlock, renderSlot, Fragment, withDirectives, pushScopeId, popScopeId, createStaticVNode } from "@histoire/vendors/vue";
2
2
  import { useEventListener } from "@histoire/vendors/vue-use";
3
3
  import { Icon } from "@histoire/vendors/iconify";
4
4
  import HatchedPattern from "../misc/HatchedPattern.js";
5
5
  import CheckerboardPattern from "../misc/CheckerboardPattern.js";
6
6
  import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
7
- const _withScopeId = (n) => (pushScopeId("data-v-1375d05a"), n = n(), popScopeId(), n);
8
- const _hoisted_1 = { class: "htw-w-full htw-h-full htw-flex-1 htw-rounded-lg htw-relative htw-overflow-hidden" };
7
+ import { VTooltip } from "@histoire/vendors/floating-vue";
8
+ const _withScopeId = (n) => (pushScopeId("data-v-a83b1911"), n = n(), popScopeId(), n);
9
+ const _hoisted_1 = { class: "histoire-story-responsive-preview htw-w-full htw-h-full htw-flex-1 htw-rounded-lg htw-relative htw-overflow-hidden" };
9
10
  const _hoisted_2 = {
10
11
  key: 0,
11
12
  class: "htw-absolute htw-inset-0 htw-w-full htw-h-full htw-bg-gray-100 dark:htw-bg-gray-750 htw-rounded-r-lg htw-border-l-2 htw-border-gray-500/10 dark:htw-border-gray-700/30 htw-overflow-hidden"
12
13
  };
13
- const _hoisted_3 = { class: "bind-preview-bg htw-rounded-lg htw-h-full" };
14
+ const _hoisted_3 = {
15
+ class: "bind-preview-bg htw-rounded-lg htw-h-full",
16
+ "data-test-id": "responsive-preview-bg"
17
+ };
14
18
  const _hoisted_4 = { class: "htw-p-8 htw-h-full htw-relative" };
15
19
  const _hoisted_5 = { class: "htw-w-full htw-h-full htw-relative" };
16
20
  const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "htw-absolute htw-inset-0" }, null, -1));
17
- const _hoisted_7 = /* @__PURE__ */ createStaticVNode('<div class="htw-absolute htw-top-5 htw-left-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-1375d05a></div><div class="htw-absolute htw-top-5 htw-right-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-1375d05a></div><div class="htw-absolute htw-bottom-5 htw-left-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-1375d05a></div><div class="htw-absolute htw-bottom-5 htw-right-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-1375d05a></div><div class="htw-absolute htw-left-5 htw-top-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-1375d05a></div><div class="htw-absolute htw-left-5 htw-bottom-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-1375d05a></div><div class="htw-absolute htw-right-5 htw-top-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-1375d05a></div><div class="htw-absolute htw-right-5 htw-bottom-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-1375d05a></div>', 8);
21
+ const _hoisted_7 = /* @__PURE__ */ createStaticVNode('<div class="htw-absolute htw-top-5 htw-left-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-top-5 htw-right-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-bottom-5 htw-left-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-bottom-5 htw-right-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-left-5 htw-top-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-left-5 htw-bottom-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-right-5 htw-top-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-right-5 htw-bottom-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-a83b1911></div>', 8);
18
22
  const _sfc_main = /* @__PURE__ */ defineComponent({
19
23
  __name: "StoryResponsivePreview",
20
24
  props: {
@@ -23,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
27
  setup(__props) {
24
28
  const props = __props;
25
29
  useCssVars((_ctx) => ({
26
- "cfc058d0": unref(settings).backgroundColor
30
+ "03d1950e": unref(settings).backgroundColor
27
31
  }));
28
32
  const settings = usePreviewSettingsStore().currentSettings;
29
33
  const resizing = ref(false);
@@ -111,6 +115,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
111
115
  const finalWidth = computed(() => settings.rotate ? settings.responsiveHeight : settings.responsiveWidth);
112
116
  const finalHeight = computed(() => settings.rotate ? settings.responsiveWidth : settings.responsiveHeight);
113
117
  const isResponsiveEnabled = computed(() => !props.variant.responsiveDisabled);
118
+ const sizeTooltip = computed(() => {
119
+ var _a, _b;
120
+ return ((_a = responsiveWidth.value) != null ? _a : "Auto") + " \xD7 " + ((_b = responsiveHeight.value) != null ? _b : "Auto");
121
+ });
114
122
  return (_ctx, _cache) => {
115
123
  return openBlock(), createElementBlock("div", _hoisted_1, [
116
124
  unref(isResponsiveEnabled) ? (openBlock(), createElementBlock("div", _hoisted_2, [
@@ -145,7 +153,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
145
153
  _hoisted_7
146
154
  ]),
147
155
  unref(isResponsiveEnabled) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
148
- createElementVNode("div", {
156
+ withDirectives((openBlock(), createElementBlock("div", {
149
157
  ref_key: "horizontalDragger",
150
158
  ref: horizontalDragger,
151
159
  class: "htw-absolute htw-w-4 htw-top-0 htw-bottom-4 htw-right-0 hover:htw-bg-primary-500/30 htw-flex htw-items-center htw-justify-center htw-cursor-ew-resize htw-group hover:htw-text-primary-500"
@@ -154,8 +162,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
154
162
  icon: "mdi:drag-vertical-variant",
155
163
  class: "htw-w-4 htw-h-4 htw-opacity-20 group-hover:htw-opacity-90"
156
164
  })
157
- ], 512),
158
- createElementVNode("div", {
165
+ ])), [
166
+ [
167
+ unref(VTooltip),
168
+ unref(sizeTooltip),
169
+ void 0,
170
+ { right: true }
171
+ ]
172
+ ]),
173
+ withDirectives((openBlock(), createElementBlock("div", {
159
174
  ref_key: "verticalDragger",
160
175
  ref: verticalDragger,
161
176
  class: "htw-absolute htw-h-4 htw-left-0 htw-right-4 htw-bottom-0 hover:htw-bg-primary-500/30 htw-flex htw-items-center htw-justify-center htw-cursor-ns-resize htw-group hover:htw-text-primary-500"
@@ -164,12 +179,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
164
179
  icon: "mdi:drag-horizontal-variant",
165
180
  class: "htw-w-4 htw-h-4 htw-opacity-20 group-hover:htw-opacity-90"
166
181
  })
167
- ], 512),
168
- createElementVNode("div", {
182
+ ])), [
183
+ [
184
+ unref(VTooltip),
185
+ unref(sizeTooltip),
186
+ void 0,
187
+ { bottom: true }
188
+ ]
189
+ ]),
190
+ withDirectives(createElementVNode("div", {
169
191
  ref_key: "cornerDragger",
170
192
  ref: cornerDragger,
171
193
  class: "htw-absolute htw-w-4 htw-h-4 htw-right-0 htw-bottom-0 hover:htw-bg-primary-500/30 htw-flex htw-items-center htw-justify-center htw-cursor-nwse-resize htw-group hover:htw-text-primary-500"
172
- }, null, 512)
194
+ }, null, 512), [
195
+ [
196
+ unref(VTooltip),
197
+ unref(sizeTooltip),
198
+ void 0,
199
+ { bottom: true }
200
+ ]
201
+ ])
173
202
  ], 64)) : createCommentVNode("", true)
174
203
  ])
175
204
  ], 2)
@@ -0,0 +1,4 @@
1
+ const StoryResponsivePreview_vue_vue_type_style_index_0_scoped_a83b1911_lang = "";
2
+ export {
3
+ StoryResponsivePreview_vue_vue_type_style_index_0_scoped_a83b1911_lang as default
4
+ };
@@ -6,7 +6,7 @@ import StoryVariantGridItem from "./StoryVariantGridItem.js";
6
6
  import ToolbarBackground from "../toolbar/ToolbarBackground.js";
7
7
  import "../toolbar/ToolbarTextDirection.js";
8
8
  import _sfc_main$1 from "../toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js";
9
- const _hoisted_1 = { class: "htw-flex htw-flex-col htw-items-stretch htw-h-full __histoire-pane-shadow-from-right" };
9
+ const _hoisted_1 = { class: "histoire-story-variant-grid htw-flex htw-flex-col htw-items-stretch htw-h-full __histoire-pane-shadow-from-right" };
10
10
  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"
@@ -86,6 +86,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
86
86
  onMounted(() => {
87
87
  updateSize();
88
88
  });
89
+ useResizeObserver(gridEl, () => {
90
+ updateSize();
91
+ });
89
92
  const columnCount = computed(() => Math.min(storyStore.currentStory.variants.length, Math.floor((viewWidth.value + gap) / (gridColumnWidth.value + gap))));
90
93
  return (_ctx, _cache) => {
91
94
  return openBlock(), createElementBlock("div", _hoisted_1, [
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js";
2
- import "./StoryVariantGridItem.vue_vue_type_style_index_0_scoped_601cc357_lang.js";
2
+ import "./StoryVariantGridItem.vue_vue_type_style_index_0_scoped_f7c98176_lang.js";
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const StoryVariantGridItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-601cc357"]]);
4
+ const StoryVariantGridItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f7c98176"]]);
5
5
  export {
6
6
  StoryVariantGridItem as default
7
7
  };
@@ -1,21 +1,25 @@
1
- import { defineComponent, useCssVars, unref, toRefs, ref, resolveComponent, resolveDirective, openBlock, createElementBlock, createElementVNode, withDirectives, createBlock, normalizeClass, withCtx, createVNode, toDisplayString, withModifiers, createCommentVNode, pushScopeId, popScopeId } from "@histoire/vendors/vue";
1
+ import { defineComponent, useCssVars, unref, toRefs, ref, computed, resolveComponent, resolveDirective, openBlock, createElementBlock, createElementVNode, withDirectives, createBlock, normalizeClass, withCtx, createVNode, toDisplayString, withModifiers, createCommentVNode, normalizeStyle, pushScopeId, popScopeId } from "@histoire/vendors/vue";
2
2
  import { Icon } from "@histoire/vendors/iconify";
3
3
  import { useRouter } from "@histoire/vendors/vue-router";
4
4
  import { useResizeObserver } from "@histoire/vendors/vue-use";
5
5
  import { useCurrentVariantRoute } from "../../util/variant.js";
6
6
  import { useScrollOnActive } from "../../util/scroll.js";
7
7
  import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
8
+ import { getContrastColor } from "../../util/preview-settings.js";
9
+ import { histoireConfig } from "../../util/config.js";
8
10
  import "./GenericRenderStory.js";
9
11
  import "../toolbar/ToolbarNewTab.js";
10
12
  import CheckerboardPattern from "../misc/CheckerboardPattern.js";
11
13
  import _sfc_main$1 from "../toolbar/ToolbarNewTab.vue_vue_type_script_setup_true_lang.js";
12
14
  import _sfc_main$2 from "./GenericRenderStory.vue_vue_type_script_setup_true_lang.js";
13
- const _withScopeId = (n) => (pushScopeId("data-v-601cc357"), n = n(), popScopeId(), n);
15
+ const _withScopeId = (n) => (pushScopeId("data-v-f7c98176"), n = n(), popScopeId(), n);
14
16
  const _hoisted_1 = { class: "htw-flex-none htw-flex htw-items-center" };
15
17
  const _hoisted_2 = { class: "htw-truncate htw-flex-1" };
16
18
  const _hoisted_3 = { class: "htw-flex-none htw-ml-auto htw-hidden group-hover:htw-flex htw-items-center" };
17
- const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "htw-absolute htw-inset-0 htw-rounded bind-preview-bg" }, null, -1));
18
- const _hoisted_5 = { class: "htw-relative htw-h-full" };
19
+ const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", {
20
+ class: "htw-absolute htw-inset-0 htw-rounded bind-preview-bg",
21
+ "data-test-id": "responsive-preview-bg"
22
+ }, null, -1));
19
23
  const _sfc_main = /* @__PURE__ */ defineComponent({
20
24
  __name: "StoryVariantGridItem",
21
25
  props: {
@@ -34,8 +38,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
38
  setup(__props, { emit }) {
35
39
  const props = __props;
36
40
  useCssVars((_ctx) => ({
37
- "f3384526": unref(variant).iconColor,
38
- "75db4c5e": unref(settings).backgroundColor
41
+ "edeb0368": unref(variant).iconColor,
42
+ "f4b27ac2": unref(settings).backgroundColor
39
43
  }));
40
44
  const { variant } = toRefs(props);
41
45
  const { isActive, targetRoute } = useCurrentVariantRoute(variant);
@@ -62,13 +66,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
62
66
  }
63
67
  });
64
68
  const settings = usePreviewSettingsStore().currentSettings;
69
+ const contrastColor = computed(() => getContrastColor(settings));
70
+ const autoApplyContrastColor = computed(() => !!histoireConfig.autoApplyContrastColor);
65
71
  return (_ctx, _cache) => {
66
72
  const _component_RouterLink = resolveComponent("RouterLink");
67
73
  const _directive_tooltip = resolveDirective("tooltip");
68
74
  return openBlock(), createElementBlock("div", {
69
75
  ref_key: "el",
70
76
  ref: el,
71
- class: "htw-cursor-default htw-flex htw-flex-col htw-gap-y-1 htw-group"
77
+ class: "histoire-story-variant-grid-item htw-cursor-default htw-flex htw-flex-col htw-gap-y-1 htw-group"
72
78
  }, [
73
79
  createElementVNode("div", _hoisted_1, [
74
80
  withDirectives((openBlock(), createBlock(_component_RouterLink, {
@@ -116,7 +122,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
116
122
  key: 0,
117
123
  class: "htw-absolute htw-inset-0 htw-w-full htw-h-full htw-text-gray-500/20"
118
124
  })) : createCommentVNode("", true),
119
- createElementVNode("div", _hoisted_5, [
125
+ createElementVNode("div", {
126
+ class: "htw-relative htw-h-full",
127
+ style: normalizeStyle({
128
+ "--histoire-contrast-color": unref(contrastColor),
129
+ color: unref(autoApplyContrastColor) ? unref(contrastColor) : void 0
130
+ })
131
+ }, [
120
132
  (openBlock(), createBlock(_sfc_main$2, {
121
133
  key: `${__props.story.id}-${unref(variant).id}`,
122
134
  variant: unref(variant),
@@ -124,7 +136,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
124
136
  dir: unref(settings).textDirection,
125
137
  onReady
126
138
  }, null, 8, ["variant", "story", "dir"]))
127
- ])
139
+ ], 4)
128
140
  ], 34)
129
141
  ], 512);
130
142
  };
@@ -0,0 +1,4 @@
1
+ const StoryVariantGridItem_vue_vue_type_style_index_0_scoped_f7c98176_lang = "";
2
+ export {
3
+ StoryVariantGridItem_vue_vue_type_style_index_0_scoped_f7c98176_lang as default
4
+ };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./StoryVariantListItem.vue_vue_type_script_setup_true_lang.js";
2
- import "./StoryVariantListItem.vue_vue_type_style_index_0_scoped_02816158_lang.js";
2
+ import "./StoryVariantListItem.vue_vue_type_style_index_0_scoped_ab890d9c_lang.js";
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const StoryVariantListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-02816158"]]);
4
+ const StoryVariantListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ab890d9c"]]);
5
5
  export {
6
6
  StoryVariantListItem as default
7
7
  };
@@ -3,7 +3,7 @@ import { useCurrentVariantRoute } from "../../util/variant.js";
3
3
  import BaseListItemLink from "../base/BaseListItemLink.js";
4
4
  import { Icon } from "@histoire/vendors/iconify";
5
5
  import { useScrollOnActive } from "../../util/scroll.js";
6
- const _withScopeId = (n) => (pushScopeId("data-v-02816158"), n = n(), popScopeId(), n);
6
+ const _withScopeId = (n) => (pushScopeId("data-v-ab890d9c"), n = n(), popScopeId(), n);
7
7
  const _hoisted_1 = { class: "htw-truncate" };
8
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
9
  __name: "StoryVariantListItem",
@@ -16,7 +16,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  setup(__props) {
17
17
  const props = __props;
18
18
  useCssVars((_ctx) => ({
19
- "36260edc": unref(variant).iconColor
19
+ "89126aaa": unref(variant).iconColor
20
20
  }));
21
21
  const { variant } = toRefs(props);
22
22
  const { isActive, targetRoute } = useCurrentVariantRoute(variant);
@@ -26,6 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
26
  return openBlock(), createElementBlock("div", {
27
27
  ref_key: "el",
28
28
  ref: el,
29
+ class: "histoire-story-variant-list-item",
29
30
  "data-test-id": "story-variant-list-item"
30
31
  }, [
31
32
  createVNode(BaseListItemLink, {
@@ -0,0 +1,4 @@
1
+ const StoryVariantListItem_vue_vue_type_style_index_0_scoped_ab890d9c_lang = "";
2
+ export {
3
+ StoryVariantListItem_vue_vue_type_style_index_0_scoped_ab890d9c_lang as default
4
+ };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./StoryVariantSingle.vue_vue_type_script_setup_true_lang.js";
2
- import "./StoryVariantSingle.vue_vue_type_style_index_0_scoped_89489ae4_lang.js";
2
+ import "./StoryVariantSingle.vue_vue_type_style_index_0_scoped_ddfc5b4f_lang.js";
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const StoryVariantSingle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-89489ae4"]]);
4
+ const StoryVariantSingle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ddfc5b4f"]]);
5
5
  export {
6
6
  StoryVariantSingle as default
7
7
  };
@@ -6,10 +6,10 @@ import BaseSplitPane from "../base/BaseSplitPane.js";
6
6
  import StoryVariantListItem from "./StoryVariantListItem.js";
7
7
  import "./StoryVariantSingleView.js";
8
8
  import _sfc_main$1 from "./StoryVariantSingleView.vue_vue_type_script_setup_true_lang.js";
9
- const _withScopeId = (n) => (pushScopeId("data-v-89489ae4"), n = n(), popScopeId(), n);
9
+ const _withScopeId = (n) => (pushScopeId("data-v-ddfc5b4f"), n = n(), popScopeId(), n);
10
10
  const _hoisted_1 = {
11
11
  key: 0,
12
- class: "htw-p-2 htw-h-full __histoire-pane-shadow-from-right"
12
+ class: "histoire-story-variant-single htw-p-2 htw-h-full __histoire-pane-shadow-from-right"
13
13
  };
14
14
  const _hoisted_2 = {
15
15
  key: 0,
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  useCssVars((_ctx) => {
34
34
  var _a;
35
35
  return {
36
- "513cd7c8": (_a = unref(variant)) == null ? void 0 : _a.iconColor
36
+ "4d25d048": (_a = unref(variant)) == null ? void 0 : _a.iconColor
37
37
  };
38
38
  });
39
39
  const storyStore = useStoryStore();
@@ -0,0 +1,4 @@
1
+ const StoryVariantSingle_vue_vue_type_style_index_0_scoped_ddfc5b4f_lang = "";
2
+ export {
3
+ StoryVariantSingle_vue_vue_type_style_index_0_scoped_ddfc5b4f_lang as default
4
+ };
@@ -1,8 +1,9 @@
1
- import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, normalizeClass, unref } from "@histoire/vendors/vue";
2
- import "./GenericRenderStory.js";
1
+ import { defineComponent, computed, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, unref, normalizeClass } from "@histoire/vendors/vue";
3
2
  import { isDark } from "../../util/dark.js";
4
3
  import { histoireConfig } from "../../util/config.js";
5
4
  import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
5
+ import { getContrastColor } from "../../util/preview-settings.js";
6
+ import "./GenericRenderStory.js";
6
7
  import StoryResponsivePreview from "./StoryResponsivePreview.js";
7
8
  import _sfc_main$1 from "./GenericRenderStory.vue_vue_type_script_setup_true_lang.js";
8
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -22,14 +23,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
23
  });
23
24
  }
24
25
  const settings = usePreviewSettingsStore().currentSettings;
26
+ const contrastColor = computed(() => getContrastColor(settings));
27
+ const autoApplyContrastColor = computed(() => !!histoireConfig.autoApplyContrastColor);
25
28
  return (_ctx, _cache) => {
26
- return openBlock(), createBlock(StoryResponsivePreview, { variant: __props.variant }, {
29
+ return openBlock(), createBlock(StoryResponsivePreview, {
30
+ class: "histoire-story-variant-single-preview-native",
31
+ variant: __props.variant
32
+ }, {
27
33
  default: withCtx(({ isResponsiveEnabled, finalWidth, finalHeight }) => [
28
34
  createElementVNode("div", {
29
- style: normalizeStyle(isResponsiveEnabled ? {
30
- width: finalWidth ? `${finalWidth}px` : "100%",
31
- height: finalHeight ? `${finalHeight}px` : "100%"
32
- } : { width: "100%", height: "100%" }),
35
+ style: normalizeStyle([
36
+ isResponsiveEnabled ? {
37
+ width: finalWidth ? `${finalWidth}px` : "100%",
38
+ height: finalHeight ? `${finalHeight}px` : "100%"
39
+ } : { width: "100%", height: "100%" },
40
+ {
41
+ "--histoire-contrast-color": unref(contrastColor),
42
+ color: unref(autoApplyContrastColor) ? unref(contrastColor) : void 0
43
+ }
44
+ ]),
33
45
  class: "htw-relative",
34
46
  "data-test-id": "sandbox-render"
35
47
  }, [
@@ -96,7 +96,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
96
96
  syncSettings();
97
97
  }
98
98
  return (_ctx, _cache) => {
99
- return openBlock(), createBlock(StoryResponsivePreview, { variant: __props.variant }, {
99
+ return openBlock(), createBlock(StoryResponsivePreview, {
100
+ class: "histoire-story-variant-single-preview-remote",
101
+ variant: __props.variant
102
+ }, {
100
103
  default: withCtx(({ isResponsiveEnabled, finalWidth, finalHeight, resizing }) => [
101
104
  createElementVNode("iframe", {
102
105
  ref_key: "iframe",
@@ -14,7 +14,7 @@ import _sfc_main$4 from "../toolbar/ToolbarNewTab.vue_vue_type_script_setup_true
14
14
  import _sfc_main$5 from "./StoryVariantSinglePreviewNative.vue_vue_type_script_setup_true_lang.js";
15
15
  import _sfc_main$6 from "./StoryVariantSinglePreviewRemote.vue_vue_type_script_setup_true_lang.js";
16
16
  const _hoisted_1 = {
17
- class: "htw-h-full htw-flex htw-flex-col",
17
+ class: "histoire-story-variant-single-view htw-h-full htw-flex htw-flex-col",
18
18
  "data-test-id": "story-variant-single-view"
19
19
  };
20
20
  const _hoisted_2 = {
@@ -12,7 +12,7 @@ import _sfc_main$1 from "../panel/StoryDocs.vue_vue_type_script_setup_true_lang.
12
12
  import _sfc_main$2 from "../panel/StorySidePanel.vue_vue_type_script_setup_true_lang.js";
13
13
  const _hoisted_1 = {
14
14
  key: 1,
15
- class: "htw-h-full"
15
+ class: "histoire-story-view histoire-with-story htw-h-full"
16
16
  };
17
17
  const _hoisted_2 = {
18
18
  key: 0,
@@ -55,7 +55,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
55
  });
56
56
  }
57
57
  return (_ctx, _cache) => {
58
- return !unref(storyStore).currentStory ? (openBlock(), createBlock(BaseEmpty, { key: 0 }, {
58
+ return !unref(storyStore).currentStory ? (openBlock(), createBlock(BaseEmpty, {
59
+ key: 0,
60
+ class: "histoire-story-view histoire-no-story"
61
+ }, {
59
62
  default: withCtx(() => [
60
63
  createVNode(unref(Icon), {
61
64
  icon: "carbon:software-resource-resource",
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./StoryViewer.vue_vue_type_script_setup_true_lang.js";
2
- import "./StoryViewer.vue_vue_type_style_index_0_scoped_54d5a557_lang.js";
2
+ import "./StoryViewer.vue_vue_type_style_index_0_scoped_6046525f_lang.js";
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const StoryViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-54d5a557"]]);
4
+ const StoryViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6046525f"]]);
5
5
  export {
6
6
  StoryViewer as default
7
7
  };
@@ -6,15 +6,15 @@ import "./StoryVariantGrid.js";
6
6
  import StoryVariantSingle from "./StoryVariantSingle.js";
7
7
  import _sfc_main$1 from "./StoryVariantGrid.vue_vue_type_script_setup_true_lang.js";
8
8
  import _sfc_main$2 from "../app/MobileOverlay.vue_vue_type_script_setup_true_lang.js";
9
- const _withScopeId = (n) => (pushScopeId("data-v-54d5a557"), n = n(), popScopeId(), n);
10
- const _hoisted_1 = { class: "htw-bg-gray-50 htw-h-full dark:htw-bg-gray-750" };
9
+ const _withScopeId = (n) => (pushScopeId("data-v-6046525f"), n = n(), popScopeId(), n);
10
+ const _hoisted_1 = { class: "histoire-story-viewer htw-bg-gray-50 htw-h-full dark:htw-bg-gray-750" };
11
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
12
12
  __name: "StoryViewer",
13
13
  setup(__props) {
14
14
  useCssVars((_ctx) => {
15
15
  var _a;
16
16
  return {
17
- "249174dc": (_a = unref(variant)) == null ? void 0 : _a.iconColor
17
+ "663732b6": (_a = unref(variant)) == null ? void 0 : _a.iconColor
18
18
  };
19
19
  });
20
20
  const storyStore = useStoryStore();
@@ -0,0 +1,4 @@
1
+ const StoryViewer_vue_vue_type_style_index_0_scoped_6046525f_lang = "";
2
+ export {
3
+ StoryViewer_vue_vue_type_style_index_0_scoped_6046525f_lang as default
4
+ };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./ToolbarBackground.vue_vue_type_script_setup_true_lang.js";
2
- import "./ToolbarBackground.vue_vue_type_style_index_0_scoped_8d0cb17e_lang.js";
2
+ import "./ToolbarBackground.vue_vue_type_style_index_0_scoped_c48fb2b2_lang.js";
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const ToolbarBackground = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8d0cb17e"]]);
4
+ const ToolbarBackground = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c48fb2b2"]]);
5
5
  export {
6
6
  ToolbarBackground as default
7
7
  };