histoire 0.7.8 → 0.8.1

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 (155) hide show
  1. package/dist/bundled/App.js +166 -0
  2. package/dist/bundled/_virtual/plugin-vue_export-helper.js +8 -0
  3. package/dist/bundled/api.js +1 -32
  4. package/dist/bundled/assets/histoire-text-dark.js +2 -0
  5. package/dist/bundled/assets/histoire-text.js +2 -0
  6. package/dist/bundled/{HomeView.js → assets/histoire.js} +1 -23
  7. package/dist/bundled/components/HomeView.js +24 -0
  8. package/dist/bundled/components/app/AppHeader.js +67 -0
  9. package/dist/bundled/components/app/AppLogo.js +26 -0
  10. package/dist/bundled/components/app/Breadcrumb.js +95 -0
  11. package/dist/bundled/components/app/Breadcrumb.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  12. package/dist/bundled/components/app/InitialLoading.js +48 -0
  13. package/dist/bundled/components/app/MobileOverlay.js +41 -0
  14. package/dist/bundled/components/base/BaseCheckbox.js +75 -0
  15. package/dist/bundled/{BaseEmpty.js → components/base/BaseEmpty.js} +4 -4
  16. package/dist/bundled/components/base/BaseEmpty.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  17. package/dist/bundled/components/base/BaseListItemLink.js +50 -0
  18. package/dist/bundled/components/base/BaseOverflowMenu.js +97 -0
  19. package/dist/bundled/components/base/BaseOverflowTab.js +45 -0
  20. package/dist/bundled/components/base/BaseSelect.js +88 -0
  21. package/dist/bundled/{MobileOverlay.js → components/base/BaseSplitPane.js} +9 -130
  22. package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  23. package/dist/bundled/components/base/BaseTab.js +45 -0
  24. package/dist/bundled/components/misc/CheckerboardPattern.js +41 -0
  25. package/dist/bundled/components/misc/HatchedPattern.js +11 -0
  26. package/dist/bundled/components/misc/HatchedPattern.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  27. package/dist/bundled/components/panel/ControlsComponentPropItem.js +98 -0
  28. package/dist/bundled/components/panel/ControlsComponentProps.js +42 -0
  29. package/dist/bundled/components/panel/PaneTabs.js +110 -0
  30. package/dist/bundled/components/panel/StatePresets.js +184 -0
  31. package/dist/bundled/components/panel/StoryControls.js +66 -0
  32. package/dist/bundled/components/panel/StoryDocs.js +48 -0
  33. package/dist/bundled/components/panel/StoryEvent.js +56 -0
  34. package/dist/bundled/components/panel/StoryEvents.js +49 -0
  35. package/dist/bundled/components/panel/StorySidePanel.js +68 -0
  36. package/dist/bundled/components/panel/StorySourceCode.js +110 -0
  37. package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  38. package/dist/bundled/components/search/SearchItem.js +113 -0
  39. package/dist/bundled/components/search/SearchItem.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  40. package/dist/bundled/components/search/SearchLoading.js +19 -0
  41. package/dist/bundled/components/search/SearchModal.js +46 -0
  42. package/dist/bundled/components/search/SearchPane.js +263 -0
  43. package/dist/bundled/{search-docs-data.js → components/search/search-docs-data.js} +1 -1
  44. package/dist/bundled/components/search/search-title-data.js +7 -0
  45. package/dist/bundled/components/story/StoryResponsivePreview.js +180 -0
  46. package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  47. package/dist/bundled/components/story/StoryVariantGrid.js +94 -0
  48. package/dist/bundled/components/story/StoryVariantGridItem.js +106 -0
  49. package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  50. package/dist/bundled/components/story/StoryVariantListItem.js +58 -0
  51. package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  52. package/dist/bundled/components/story/StoryVariantSingle.js +115 -0
  53. package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  54. package/dist/bundled/components/story/StoryVariantSinglePreviewNative.js +43 -0
  55. package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.js +119 -0
  56. package/dist/bundled/components/story/StoryVariantSingleView.js +49 -0
  57. package/dist/bundled/components/story/StoryView.js +107 -0
  58. package/dist/bundled/components/story/StoryViewer.js +57 -0
  59. package/dist/bundled/components/story/StoryViewer.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  60. package/dist/bundled/components/toolbar/StoryVariantBackground.js +85 -0
  61. package/dist/bundled/components/toolbar/StoryVariantBackground.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  62. package/dist/bundled/components/toolbar/StoryVariantNewTab.js +33 -0
  63. package/dist/bundled/components/toolbar/StoryVariantResponsiveSize.js +129 -0
  64. package/dist/bundled/components/toolbar/StoryVariantTitle.js +24 -0
  65. package/dist/bundled/components/tree/StoryGroup.js +74 -0
  66. package/dist/bundled/components/tree/StoryList.js +37 -0
  67. package/dist/bundled/components/tree/StoryListFolder.js +89 -0
  68. package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  69. package/dist/bundled/components/tree/StoryListItem.js +72 -0
  70. package/dist/bundled/components/tree/StoryListItem.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  71. package/dist/bundled/index.js +28 -5
  72. package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/common.js +40 -0
  73. package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/en.js +5 -0
  74. package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/advanced.js +11 -0
  75. package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/balance.js +26 -0
  76. package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/simple.js +10 -0
  77. package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang.js +50 -0
  78. package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/type.js +8 -0
  79. package/dist/bundled/router.js +28 -0
  80. package/dist/bundled/sandbox.js +11 -14
  81. package/dist/bundled/{events.js → stores/events.js} +3 -3
  82. package/dist/bundled/stores/folder.js +46 -0
  83. package/dist/bundled/stores/preview-settings.js +15 -0
  84. package/dist/bundled/{story.js → stores/story.js} +4 -30
  85. package/dist/bundled/style.css +55 -55
  86. package/dist/bundled/{config.js → util/config.js} +1 -1
  87. package/dist/bundled/{const.js → util/const.js} +1 -1
  88. package/dist/bundled/util/dark.js +4 -0
  89. package/dist/bundled/util/env.js +2 -0
  90. package/dist/bundled/util/events.js +32 -0
  91. package/dist/bundled/util/keyboard.js +84 -0
  92. package/dist/bundled/{mapping.js → util/mapping.js} +5 -5
  93. package/dist/bundled/util/preview-settings.js +6 -0
  94. package/dist/bundled/util/responsive.js +3 -0
  95. package/dist/bundled/util/sandbox.js +8 -0
  96. package/dist/bundled/util/scroll.js +28 -0
  97. package/dist/bundled/{state.js → util/state.js} +4 -3
  98. package/dist/bundled/util/tooltip.js +12 -0
  99. package/dist/bundled/util/variant.js +35 -0
  100. package/dist/client/app/App.vue +0 -1
  101. package/dist/client/app/components/app/Breadcrumb.vue +1 -1
  102. package/dist/client/app/components/app/MobileOverlay.vue +1 -1
  103. package/dist/client/app/components/base/BaseCheckbox.vue +2 -1
  104. package/dist/client/app/components/base/BaseCopyIcon.vue +34 -0
  105. package/dist/client/app/components/base/BaseOverflowMenu.vue +1 -0
  106. package/dist/client/app/components/base/BaseSplitPane.vue +1 -0
  107. package/dist/client/app/components/panel/StatePresets.vue +3 -3
  108. package/dist/client/app/components/panel/StorySidePanel.vue +1 -1
  109. package/dist/client/app/components/story/StoryVariantGridItem.vue +1 -0
  110. package/dist/client/app/components/story/StoryVariantSingle.vue +5 -7
  111. package/dist/client/app/components/story/StoryVariantSinglePreviewRemote.vue +3 -6
  112. package/dist/client/app/components/story/StoryViewer.vue +2 -2
  113. package/dist/client/app/components/tree/StoryList.vue +1 -1
  114. package/dist/client/app/components/tree/StoryListItem.vue +2 -2
  115. package/dist/client/app/index.js +1 -3
  116. package/dist/client/app/sandbox.js +3 -2
  117. package/dist/client/app/stores/story.d.ts +30 -30
  118. package/dist/client/app/util/dark.d.ts +1 -1
  119. package/dist/client/app/util/mapping.js +3 -3
  120. package/dist/client/app/util/responsive.d.ts +1 -1
  121. package/dist/client/app/util/scroll.js +1 -1
  122. package/dist/client/app/util/state.js +2 -1
  123. package/dist/node/build.js +1 -1
  124. package/dist/node/vite.d.ts +1 -1
  125. package/dist/node/vite.js +6 -2
  126. package/dist/style.css +21 -0
  127. package/package.json +8 -14
  128. package/src/client/app/App.vue +0 -1
  129. package/src/client/app/components/app/Breadcrumb.vue +1 -1
  130. package/src/client/app/components/app/MobileOverlay.vue +1 -1
  131. package/src/client/app/components/base/BaseCheckbox.vue +2 -1
  132. package/src/client/app/components/base/BaseCopyIcon.vue +34 -0
  133. package/src/client/app/components/base/BaseOverflowMenu.vue +1 -0
  134. package/src/client/app/components/base/BaseSplitPane.vue +1 -0
  135. package/src/client/app/components/panel/StatePresets.vue +3 -3
  136. package/src/client/app/components/panel/StorySidePanel.vue +1 -1
  137. package/src/client/app/components/story/StoryVariantGridItem.vue +1 -0
  138. package/src/client/app/components/story/StoryVariantSingle.vue +5 -7
  139. package/src/client/app/components/story/StoryVariantSinglePreviewRemote.vue +3 -6
  140. package/src/client/app/components/story/StoryViewer.vue +2 -2
  141. package/src/client/app/components/tree/StoryList.vue +1 -1
  142. package/src/client/app/components/tree/StoryListItem.vue +2 -2
  143. package/src/client/app/index.ts +1 -5
  144. package/src/client/app/sandbox.ts +3 -2
  145. package/src/client/app/util/mapping.ts +3 -3
  146. package/src/client/app/util/scroll.ts +1 -1
  147. package/src/client/app/util/state.ts +2 -1
  148. package/src/node/build.ts +1 -1
  149. package/src/node/vite.ts +6 -2
  150. package/tsconfig.json +11 -0
  151. package/vite.config.ts +20 -10
  152. package/dist/bundled/SearchPane.js +0 -506
  153. package/dist/bundled/StoryView.js +0 -2264
  154. package/dist/bundled/dark.js +0 -4
  155. package/dist/bundled/index2.js +0 -843
@@ -0,0 +1,75 @@
1
+ import { defineComponent, ref, computed, watch, openBlock, createElementBlock, withKeys, withModifiers, createElementVNode, normalizeClass, unref, renderSlot } from "@histoire/vendors/dist/client/vue.js";
2
+ const _hoisted_1 = { class: "htw-text-white htw-w-[16px] htw-h-[16px] htw-relative" };
3
+ const _hoisted_2 = {
4
+ width: "16",
5
+ height: "16",
6
+ viewBox: "0 0 24 24",
7
+ class: "htw-relative htw-z-10"
8
+ };
9
+ const _hoisted_3 = ["stroke-dasharray", "stroke-dashoffset"];
10
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ name: "BaseCheckbox",
12
+ props: {
13
+ modelValue: {
14
+ type: Boolean,
15
+ default: false
16
+ }
17
+ },
18
+ emits: {
19
+ "update:modelValue": (newValue) => true
20
+ },
21
+ setup(__props, { emit }) {
22
+ const props = __props;
23
+ function toggle() {
24
+ emit("update:modelValue", !props.modelValue);
25
+ animationEnabled.value = true;
26
+ }
27
+ const path = ref();
28
+ const dasharray = ref(0);
29
+ const progress = computed(() => props.modelValue ? 1 : 0);
30
+ const dashoffset = computed(() => (1 - progress.value) * dasharray.value);
31
+ const animationEnabled = ref(false);
32
+ watch(path, () => {
33
+ var _a, _b, _c;
34
+ dasharray.value = (_c = (_b = (_a = path.value).getTotalLength) == null ? void 0 : _b.call(_a)) != null ? _c : 21.21;
35
+ });
36
+ return (_ctx, _cache) => {
37
+ return openBlock(), createElementBlock("div", {
38
+ role: "checkbox",
39
+ tabindex: "0",
40
+ 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",
41
+ onClick: _cache[0] || (_cache[0] = ($event) => toggle()),
42
+ onKeydown: [
43
+ _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => toggle(), ["prevent"]), ["enter"])),
44
+ _cache[2] || (_cache[2] = withKeys(withModifiers(($event) => toggle(), ["prevent"]), ["space"]))
45
+ ]
46
+ }, [
47
+ createElementVNode("div", _hoisted_1, [
48
+ createElementVNode("div", {
49
+ class: normalizeClass(["htw-border group-active:htw-bg-gray-500/20 htw-rounded-sm htw-box-border htw-absolute htw-inset-0 htw-transition-border htw-duration-150 htw-ease-out", [
50
+ __props.modelValue ? "htw-border-primary-500 htw-border-8" : "htw-border-black/25 dark:htw-border-white/25 htw-delay-150"
51
+ ]])
52
+ }, null, 2),
53
+ (openBlock(), createElementBlock("svg", _hoisted_2, [
54
+ createElementVNode("path", {
55
+ ref_key: "path",
56
+ ref: path,
57
+ d: "m 4 12 l 5 5 l 10 -10",
58
+ fill: "none",
59
+ class: normalizeClass(["htw-stroke-white htw-stroke-2 htw-duration-200 htw-ease-in-out", [
60
+ animationEnabled.value ? "htw-transition-all" : "htw-transition-none",
61
+ {
62
+ "htw-delay-150": __props.modelValue
63
+ }
64
+ ]]),
65
+ "stroke-dasharray": dasharray.value,
66
+ "stroke-dashoffset": unref(dashoffset)
67
+ }, null, 10, _hoisted_3)
68
+ ]))
69
+ ]),
70
+ renderSlot(_ctx.$slots, "default")
71
+ ], 32);
72
+ };
73
+ }
74
+ });
75
+ export { _sfc_main as default };
@@ -1,6 +1,6 @@
1
- import { pushScopeId, popScopeId, openBlock, createElementBlock, renderSlot } from "vue";
2
- import { _ as _export_sfc } from "./MobileOverlay.js";
3
- var BaseEmpty_vue_vue_type_style_index_0_scoped_true_lang = "";
1
+ import { pushScopeId, popScopeId, openBlock, createElementBlock, renderSlot } from "@histoire/vendors/dist/client/vue.js";
2
+ import "./BaseEmpty.vue_vue_type_style_index_0_scoped_true_lang.js";
3
+ import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
4
4
  const _sfc_main = {};
5
5
  const _withScopeId = (n) => (pushScopeId("data-v-552cc113"), n = n(), popScopeId(), n);
6
6
  const _hoisted_1 = { 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" };
@@ -10,4 +10,4 @@ function _sfc_render(_ctx, _cache) {
10
10
  ]);
11
11
  }
12
12
  var BaseEmpty = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-552cc113"]]);
13
- export { BaseEmpty as B };
13
+ export { BaseEmpty as default };
@@ -0,0 +1,2 @@
1
+ var BaseEmpty_vue_vue_type_style_index_0_scoped_true_lang = "";
2
+ export { BaseEmpty_vue_vue_type_style_index_0_scoped_true_lang as default };
@@ -0,0 +1,50 @@
1
+ import { defineComponent, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementVNode, normalizeClass, withKeys, renderSlot } from "@histoire/vendors/dist/client/vue.js";
2
+ import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
3
+ const _sfc_main = defineComponent({
4
+ inheritAttrs: false,
5
+ props: {
6
+ isActive: {
7
+ type: Boolean,
8
+ default: void 0
9
+ }
10
+ },
11
+ emits: {
12
+ navigate: () => true
13
+ },
14
+ setup(props, { emit }) {
15
+ function handleNavigate(event, navigate) {
16
+ emit("navigate");
17
+ navigate(event);
18
+ }
19
+ return {
20
+ handleNavigate
21
+ };
22
+ }
23
+ });
24
+ const _hoisted_1 = ["href", "onClick", "onKeyup"];
25
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
26
+ const _component_RouterLink = resolveComponent("RouterLink");
27
+ return openBlock(), createBlock(_component_RouterLink, mergeProps(_ctx.$attrs, { custom: "" }), {
28
+ default: withCtx(({ isActive: linkIsActive, href, navigate }) => [
29
+ createElementVNode("a", {
30
+ href,
31
+ class: normalizeClass(["htw-flex htw-items-center htw-gap-2 htw-text-gray-900 dark:htw-text-gray-100", [
32
+ _ctx.$attrs.class,
33
+ (_ctx.isActive != null ? _ctx.isActive : linkIsActive) ? "active htw-bg-primary-500 hover:htw-bg-primary-600 htw-text-white dark:htw-text-black" : "hover:htw-bg-primary-100 dark:hover:htw-bg-primary-900"
34
+ ]]),
35
+ onClick: ($event) => _ctx.handleNavigate($event, navigate),
36
+ onKeyup: [
37
+ withKeys(($event) => _ctx.handleNavigate($event, navigate), ["enter"]),
38
+ withKeys(($event) => _ctx.handleNavigate($event, navigate), ["space"])
39
+ ]
40
+ }, [
41
+ renderSlot(_ctx.$slots, "default", {
42
+ active: _ctx.isActive != null ? _ctx.isActive : linkIsActive
43
+ })
44
+ ], 42, _hoisted_1)
45
+ ]),
46
+ _: 3
47
+ }, 16);
48
+ }
49
+ var BaseListItemLink = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
50
+ export { BaseListItemLink as default };
@@ -0,0 +1,97 @@
1
+ import { defineComponent, ref, computed, reactive, onBeforeUnmount, h, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, renderSlot, unref, createBlock, createElementVNode, createCommentVNode } from "@histoire/vendors/dist/client/vue.js";
2
+ import { useResizeObserver } from "@histoire/vendors/dist/client/vue-use.js";
3
+ import { Icon } from "@histoire/vendors/dist/client/iconify.js";
4
+ const _hoisted_1 = {
5
+ role: "button",
6
+ class: "htw-cursor-pointer hover:htw-bg-primary-50 dark:hover:htw-bg-primary-900 htw-w-8 htw-h-full htw-flex htw-items-center htw-justify-center htw-absolute htw-top-0 htw-right-0"
7
+ };
8
+ const _hoisted_2 = { class: "htw-flex htw-flex-col htw-items-stretch" };
9
+ const _sfc_main = /* @__PURE__ */ defineComponent({
10
+ name: "BaseOverflowMenu",
11
+ setup(__props) {
12
+ const overflowButtonWidth = 32;
13
+ const el = ref();
14
+ const availableWidth = ref(0);
15
+ useResizeObserver(el, (entries) => {
16
+ const containerWidth = entries[0].contentRect.width;
17
+ availableWidth.value = containerWidth - overflowButtonWidth;
18
+ });
19
+ const children = ref(/* @__PURE__ */ new Map());
20
+ const visibleChildrenCount = computed(() => {
21
+ let width = 0;
22
+ const c = [...children.value.values()].sort((a, b) => a.index - b.index);
23
+ for (let i = 0; i < c.length; i++) {
24
+ width += c[i].width;
25
+ if (width > availableWidth.value) {
26
+ return i;
27
+ }
28
+ }
29
+ return c.length;
30
+ });
31
+ const ChildWrapper = {
32
+ name: "ChildWrapper",
33
+ props: ["index"],
34
+ setup(props, { slots }) {
35
+ const el2 = ref();
36
+ const state = reactive({ width: 0, index: props.index });
37
+ useResizeObserver(el2, (entries) => {
38
+ const width = entries[0].contentRect.width;
39
+ if (!children.value.has(el2.value)) {
40
+ children.value.set(el2.value, state);
41
+ }
42
+ state.width = width;
43
+ });
44
+ onBeforeUnmount(() => {
45
+ children.value.delete(el2.value);
46
+ });
47
+ const visible = computed(() => visibleChildrenCount.value > state.index);
48
+ return () => h("div", { ref: el2, style: { visibility: visible.value ? "visible" : "hidden" } }, slots.default());
49
+ }
50
+ };
51
+ const ChildrenRender = (props, { slots }) => {
52
+ const [fragment] = slots.default();
53
+ return fragment.children.map((vnode, index) => h(ChildWrapper, { index }, () => [vnode]));
54
+ };
55
+ const ChildrenSlice = (props, { slots }) => {
56
+ const [fragment] = slots.default();
57
+ return fragment.children.slice(props.start, props.end);
58
+ };
59
+ return (_ctx, _cache) => {
60
+ const _component_VDropdown = resolveComponent("VDropdown");
61
+ return openBlock(), createElementBlock("div", {
62
+ ref_key: "el",
63
+ ref: el,
64
+ class: "htw-flex htw-overflow-hidden htw-relative"
65
+ }, [
66
+ createVNode(ChildrenRender, null, {
67
+ default: withCtx(() => [
68
+ renderSlot(_ctx.$slots, "default")
69
+ ]),
70
+ _: 3
71
+ }),
72
+ unref(visibleChildrenCount) < children.value.size ? (openBlock(), createBlock(_component_VDropdown, { key: 0 }, {
73
+ popper: withCtx(() => [
74
+ createElementVNode("div", _hoisted_2, [
75
+ createVNode(ChildrenSlice, { start: unref(visibleChildrenCount) }, {
76
+ default: withCtx(() => [
77
+ renderSlot(_ctx.$slots, "overflow")
78
+ ]),
79
+ _: 3
80
+ }, 8, ["start"])
81
+ ])
82
+ ]),
83
+ default: withCtx(() => [
84
+ createElementVNode("div", _hoisted_1, [
85
+ createVNode(unref(Icon), {
86
+ icon: "carbon:caret-down",
87
+ class: "htw-w-4 htw-h-4 htw-opacity-50 group-hover:htw-opacity-100"
88
+ })
89
+ ])
90
+ ]),
91
+ _: 3
92
+ })) : createCommentVNode("", true)
93
+ ], 512);
94
+ };
95
+ }
96
+ });
97
+ export { _sfc_main as default };
@@ -0,0 +1,45 @@
1
+ import { defineComponent, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementVNode, renderSlot, createVNode, Transition, createElementBlock, createCommentVNode } from "@histoire/vendors/dist/client/vue.js";
2
+ import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
3
+ const _sfc_main = defineComponent({
4
+ inheritAttrs: false,
5
+ props: {
6
+ exact: {
7
+ type: Boolean,
8
+ default: false
9
+ },
10
+ matched: {
11
+ type: Boolean,
12
+ default: null
13
+ }
14
+ }
15
+ });
16
+ const _hoisted_1 = ["href", "onClick"];
17
+ const _hoisted_2 = {
18
+ key: 0,
19
+ class: "htw-absolute htw-top-0 htw-left-0 htw-h-full htw-w-[2px] htw-bg-primary-500 dark:htw-bg-primary-400"
20
+ };
21
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
22
+ const _component_router_link = resolveComponent("router-link");
23
+ return openBlock(), createBlock(_component_router_link, mergeProps(_ctx.$attrs, { custom: "" }), {
24
+ default: withCtx(({ isActive, isExactActive, href, navigate }) => [
25
+ createElementVNode("a", mergeProps(_ctx.$attrs, {
26
+ href,
27
+ class: ["htw-px-4 htw-h-10 htw-min-w-[150px] htw-inline-flex htw-items-center hover:htw-bg-primary-50 dark:hover:htw-bg-primary-900 htw-relative htw-text-gray-900 dark:htw-text-gray-100", {
28
+ "htw-text-primary-500 dark:htw-text-primary-400": _ctx.matched != null ? _ctx.matched : _ctx.exact && isExactActive || !_ctx.exact && isActive
29
+ }],
30
+ onClick: navigate
31
+ }), [
32
+ renderSlot(_ctx.$slots, "default"),
33
+ createVNode(Transition, { name: "__histoire-scale-y" }, {
34
+ default: withCtx(() => [
35
+ (_ctx.matched != null ? _ctx.matched : _ctx.exact && isExactActive || !_ctx.exact && isActive) ? (openBlock(), createElementBlock("div", _hoisted_2)) : createCommentVNode("", true)
36
+ ]),
37
+ _: 2
38
+ }, 1024)
39
+ ], 16, _hoisted_1)
40
+ ]),
41
+ _: 3
42
+ }, 16);
43
+ }
44
+ var BaseOverflowTab = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
45
+ export { BaseOverflowTab as default };
@@ -0,0 +1,88 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, mergeProps, renderSlot, createTextVNode, toDisplayString, createVNode } from "@histoire/vendors/dist/client/vue.js";
21
+ import { Dropdown } from "@histoire/vendors/dist/client/floating-vue.js";
22
+ import { Icon } from "@histoire/vendors/dist/client/iconify.js";
23
+ const _hoisted_1 = { 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" };
24
+ const _hoisted_2 = { class: "htw-flex-1 htw-truncate" };
25
+ const _hoisted_3 = { class: "htw-flex htw-flex-col htw-bg-gray-50 dark:htw-bg-gray-700" };
26
+ const _hoisted_4 = ["onClick"];
27
+ const _sfc_main = /* @__PURE__ */ defineComponent({
28
+ name: "BaseSelect",
29
+ props: {
30
+ modelValue: null,
31
+ options: null
32
+ },
33
+ emits: ["update:modelValue", "select"],
34
+ setup(__props, { emit: emits }) {
35
+ const props = __props;
36
+ const formattedOptions = computed(() => {
37
+ if (Array.isArray(props.options)) {
38
+ return Object.fromEntries(props.options.map((value) => [value, value]));
39
+ }
40
+ return props.options;
41
+ });
42
+ const selectedLabel = computed(() => formattedOptions.value[props.modelValue]);
43
+ function selectValue(value, hide) {
44
+ emits("update:modelValue", value);
45
+ emits("select", value);
46
+ hide();
47
+ }
48
+ return (_ctx, _cache) => {
49
+ return openBlock(), createBlock(unref(Dropdown), { "auto-size": "" }, {
50
+ popper: withCtx(({ hide }) => [
51
+ createElementVNode("div", _hoisted_3, [
52
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(formattedOptions), (label, value) => {
53
+ return openBlock(), createElementBlock("div", mergeProps(__spreadProps(__spreadValues({}, _ctx.$attrs), { class: null, style: null }), {
54
+ key: label,
55
+ class: ["htw-px-2 htw-py-1 htw-cursor-pointer hover:htw-bg-primary-100 dark:hover:htw-bg-primary-700", {
56
+ "htw-bg-primary-200 dark:htw-bg-primary-800": props.modelValue === value
57
+ }],
58
+ onClick: ($event) => selectValue(value, hide)
59
+ }), [
60
+ renderSlot(_ctx.$slots, "option", {
61
+ label,
62
+ value
63
+ }, () => [
64
+ createTextVNode(toDisplayString(label), 1)
65
+ ])
66
+ ], 16, _hoisted_4);
67
+ }), 128))
68
+ ])
69
+ ]),
70
+ default: withCtx(() => [
71
+ createElementVNode("div", _hoisted_1, [
72
+ createElementVNode("div", _hoisted_2, [
73
+ renderSlot(_ctx.$slots, "default", { label: unref(selectedLabel) }, () => [
74
+ createTextVNode(toDisplayString(unref(selectedLabel)), 1)
75
+ ])
76
+ ]),
77
+ createVNode(unref(Icon), {
78
+ icon: "carbon:chevron-sort",
79
+ class: "htw-w-4 htw-h-4 htw-flex-none htw-ml-auto"
80
+ })
81
+ ])
82
+ ]),
83
+ _: 3
84
+ });
85
+ };
86
+ }
87
+ });
88
+ export { _sfc_main as default };
@@ -1,90 +1,9 @@
1
- import { defineComponent, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementVNode, normalizeClass, withKeys, renderSlot, watch, onMounted, pushScopeId, popScopeId, ref, computed, onUnmounted, createElementBlock, normalizeStyle, unref, withModifiers, Transition, toDisplayString, createVNode, createCommentVNode } from "vue";
2
- import scrollIntoView from "scroll-into-view-if-needed";
3
- import { useMediaQuery } from "@vueuse/core";
4
- import { Icon } from "@iconify/vue";
5
- var _export_sfc = (sfc, props) => {
6
- const target = sfc.__vccOpts || sfc;
7
- for (const [key, val] of props) {
8
- target[key] = val;
9
- }
10
- return target;
11
- };
12
- const _sfc_main$2 = defineComponent({
13
- inheritAttrs: false,
14
- props: {
15
- isActive: {
16
- type: Boolean,
17
- default: void 0
18
- }
19
- },
20
- emits: {
21
- navigate: () => true
22
- },
23
- setup(props, { emit }) {
24
- function handleNavigate(event, navigate) {
25
- emit("navigate");
26
- navigate(event);
27
- }
28
- return {
29
- handleNavigate
30
- };
31
- }
32
- });
33
- const _hoisted_1$2 = ["href", "onClick", "onKeyup"];
34
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
35
- const _component_RouterLink = resolveComponent("RouterLink");
36
- return openBlock(), createBlock(_component_RouterLink, mergeProps(_ctx.$attrs, { custom: "" }), {
37
- default: withCtx(({ isActive: linkIsActive, href, navigate }) => [
38
- createElementVNode("a", {
39
- href,
40
- class: normalizeClass(["htw-flex htw-items-center htw-gap-2 htw-text-gray-900 dark:htw-text-gray-100", [
41
- _ctx.$attrs.class,
42
- (_ctx.isActive != null ? _ctx.isActive : linkIsActive) ? "active htw-bg-primary-500 hover:htw-bg-primary-600 htw-text-white dark:htw-text-black" : "hover:htw-bg-primary-100 dark:hover:htw-bg-primary-900"
43
- ]]),
44
- onClick: ($event) => _ctx.handleNavigate($event, navigate),
45
- onKeyup: [
46
- withKeys(($event) => _ctx.handleNavigate($event, navigate), ["enter"]),
47
- withKeys(($event) => _ctx.handleNavigate($event, navigate), ["space"])
48
- ]
49
- }, [
50
- renderSlot(_ctx.$slots, "default", {
51
- active: _ctx.isActive != null ? _ctx.isActive : linkIsActive
52
- })
53
- ], 42, _hoisted_1$2)
54
- ]),
55
- _: 3
56
- }, 16);
57
- }
58
- var BaseListItemLink = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render]]);
59
- function useScrollOnActive(active, el) {
60
- watch(active, (value) => {
61
- if (value) {
62
- autoScroll();
63
- }
64
- });
65
- function autoScroll() {
66
- if (el.value) {
67
- scrollIntoView(el.value, {
68
- scrollMode: "if-needed",
69
- block: "center",
70
- inline: "nearest",
71
- behavior: "smooth"
72
- });
73
- }
74
- }
75
- onMounted(() => {
76
- if (active.value) {
77
- autoScroll();
78
- }
79
- });
80
- return {
81
- autoScroll
82
- };
83
- }
84
- var BaseSplitPane_vue_vue_type_style_index_0_scoped_true_lang = "";
85
- const _withScopeId = (n) => (pushScopeId("data-v-4cd3cd6c"), n = n(), popScopeId(), n);
86
- const _hoisted_1$1 = ["onMousedown"];
87
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1
+ import { pushScopeId, popScopeId, defineComponent, ref, watch, computed, onUnmounted, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, unref, renderSlot, withModifiers } from "@histoire/vendors/dist/client/vue.js";
2
+ import "./BaseSplitPane.vue_vue_type_style_index_0_scoped_true_lang.js";
3
+ import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
4
+ const _withScopeId = (n) => (pushScopeId("data-v-7c5763cc"), n = n(), popScopeId(), n);
5
+ const _hoisted_1 = ["onMousedown"];
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
88
7
  name: "BaseSplitPane",
89
8
  props: {
90
9
  orientation: {
@@ -245,7 +164,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
245
164
  "htw-bg-primary-500/25": dragging.value
246
165
  }]),
247
166
  onMousedown: withModifiers(dragStart, ["prevent"])
248
- }, null, 42, _hoisted_1$1)
167
+ }, null, 42, _hoisted_1)
249
168
  ], 6),
250
169
  createElementVNode("div", {
251
170
  class: normalizeClass(["htw-relative htw-bottom-0 htw-right-0", {
@@ -261,45 +180,5 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
261
180
  };
262
181
  }
263
182
  });
264
- var BaseSplitPane = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-4cd3cd6c"]]);
265
- const isMobile = useMediaQuery("(max-width: 640px)");
266
- const _hoisted_1 = {
267
- key: 0,
268
- 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"
269
- };
270
- const _hoisted_2 = { 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" };
271
- const _hoisted_3 = { class: "htw-text-gray-500" };
272
- const _sfc_main = /* @__PURE__ */ defineComponent({
273
- name: "MobileOverlay",
274
- props: {
275
- title: null,
276
- opened: { type: Boolean }
277
- },
278
- emits: ["close"],
279
- setup(__props, { emit: emits }) {
280
- const props = __props;
281
- return (_ctx, _cache) => {
282
- return openBlock(), createBlock(Transition, { name: "__histoire-fade-bottom" }, {
283
- default: withCtx(() => [
284
- __props.opened ? (openBlock(), createElementBlock("div", _hoisted_1, [
285
- createElementVNode("div", _hoisted_2, [
286
- createElementVNode("span", _hoisted_3, toDisplayString(__props.title), 1),
287
- createElementVNode("a", {
288
- class: "htw-p-1 hover:htw-text-primary-500 dark:hover:htw-text-primary-400 htw-cursor-pointer",
289
- onClick: _cache[0] || (_cache[0] = ($event) => emits("close"))
290
- }, [
291
- createVNode(unref(Icon), {
292
- icon: "carbon:close",
293
- class: "htw-w-8 htw-h-8 htw-shrink-0"
294
- })
295
- ])
296
- ]),
297
- renderSlot(_ctx.$slots, "default")
298
- ])) : createCommentVNode("", true)
299
- ]),
300
- _: 3
301
- });
302
- };
303
- }
304
- });
305
- export { BaseListItemLink as B, _export_sfc as _, _sfc_main as a, BaseSplitPane as b, isMobile as i, useScrollOnActive as u };
183
+ var BaseSplitPane = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7c5763cc"]]);
184
+ export { BaseSplitPane as default };
@@ -0,0 +1,2 @@
1
+ var BaseSplitPane_vue_vue_type_style_index_0_scoped_true_lang = "";
2
+ export { BaseSplitPane_vue_vue_type_style_index_0_scoped_true_lang as default };
@@ -0,0 +1,45 @@
1
+ import { defineComponent, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementVNode, renderSlot, createVNode, Transition, createElementBlock, createCommentVNode } from "@histoire/vendors/dist/client/vue.js";
2
+ import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
3
+ const _sfc_main = defineComponent({
4
+ inheritAttrs: false,
5
+ props: {
6
+ exact: {
7
+ type: Boolean,
8
+ default: false
9
+ },
10
+ matched: {
11
+ type: Boolean,
12
+ default: null
13
+ }
14
+ }
15
+ });
16
+ const _hoisted_1 = ["href", "onClick"];
17
+ const _hoisted_2 = {
18
+ key: 0,
19
+ class: "htw-absolute htw-bottom-0 htw-left-0 htw-w-full htw-h-[2px] htw-bg-primary-500 dark:htw-bg-primary-400"
20
+ };
21
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
22
+ const _component_router_link = resolveComponent("router-link");
23
+ return openBlock(), createBlock(_component_router_link, mergeProps(_ctx.$attrs, { custom: "" }), {
24
+ default: withCtx(({ isActive, isExactActive, href, navigate }) => [
25
+ createElementVNode("a", mergeProps(_ctx.$attrs, {
26
+ href,
27
+ class: ["htw-px-4 htw-h-full htw-inline-flex htw-items-center hover:htw-bg-primary-50 dark:hover:htw-bg-primary-900 htw-relative htw-text-gray-900 dark:htw-text-gray-100", {
28
+ "htw-text-primary-500 dark:htw-text-primary-400": _ctx.matched != null ? _ctx.matched : _ctx.exact && isExactActive || !_ctx.exact && isActive
29
+ }],
30
+ onClick: navigate
31
+ }), [
32
+ renderSlot(_ctx.$slots, "default"),
33
+ createVNode(Transition, { name: "__histoire-scale-x" }, {
34
+ default: withCtx(() => [
35
+ (_ctx.matched != null ? _ctx.matched : _ctx.exact && isExactActive || !_ctx.exact && isActive) ? (openBlock(), createElementBlock("div", _hoisted_2)) : createCommentVNode("", true)
36
+ ]),
37
+ _: 2
38
+ }, 1024)
39
+ ], 16, _hoisted_1)
40
+ ]),
41
+ _: 3
42
+ }, 16);
43
+ }
44
+ var BaseTab = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
45
+ export { BaseTab as default };
@@ -0,0 +1,41 @@
1
+ import { createElementVNode, openBlock, createElementBlock } from "@histoire/vendors/dist/client/vue.js";
2
+ import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
3
+ const _sfc_main = {};
4
+ const _hoisted_1 = { fill: "none" };
5
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("pattern", {
6
+ id: "checkerboard",
7
+ width: "64",
8
+ height: "64",
9
+ patternUnits: "userSpaceOnUse"
10
+ }, [
11
+ /* @__PURE__ */ createElementVNode("rect", {
12
+ x: "0",
13
+ y: "0",
14
+ width: "32",
15
+ height: "32",
16
+ fill: "currentColor"
17
+ }),
18
+ /* @__PURE__ */ createElementVNode("rect", {
19
+ x: "32",
20
+ y: "32",
21
+ width: "32",
22
+ height: "32",
23
+ fill: "currentColor"
24
+ })
25
+ ], -1);
26
+ const _hoisted_3 = /* @__PURE__ */ createElementVNode("rect", {
27
+ x: "0",
28
+ y: "0",
29
+ width: "100%",
30
+ height: "100%",
31
+ fill: "url(#checkerboard)"
32
+ }, null, -1);
33
+ const _hoisted_4 = [
34
+ _hoisted_2,
35
+ _hoisted_3
36
+ ];
37
+ function _sfc_render(_ctx, _cache) {
38
+ return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_4);
39
+ }
40
+ var CheckerboardPattern = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
41
+ export { CheckerboardPattern as default };
@@ -0,0 +1,11 @@
1
+ import { pushScopeId, popScopeId, openBlock, createElementBlock } from "@histoire/vendors/dist/client/vue.js";
2
+ import "./HatchedPattern.vue_vue_type_style_index_0_scoped_true_lang.js";
3
+ import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
4
+ const _sfc_main = {};
5
+ const _withScopeId = (n) => (pushScopeId("data-v-250960ac"), n = n(), popScopeId(), n);
6
+ const _hoisted_1 = { class: "__histoire-hatched-pattern" };
7
+ function _sfc_render(_ctx, _cache) {
8
+ return openBlock(), createElementBlock("div", _hoisted_1);
9
+ }
10
+ var HatchedPattern = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-250960ac"]]);
11
+ export { HatchedPattern as default };
@@ -0,0 +1,2 @@
1
+ var HatchedPattern_vue_vue_type_style_index_0_scoped_true_lang = "";
2
+ export { HatchedPattern_vue_vue_type_style_index_0_scoped_true_lang as default };