@histoire/app 0.16.4 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/bundled/App.vue2.js +2 -2
  2. package/dist/bundled/components/HomeView.vue2.js +2 -2
  3. package/dist/bundled/components/app/AppHeader.vue2.js +1 -1
  4. package/dist/bundled/components/app/AppLogo.vue2.js +3 -3
  5. package/dist/bundled/components/app/Breadcrumb.vue2.js +13 -13
  6. package/dist/bundled/components/app/MobileOverlay.vue2.js +5 -5
  7. package/dist/bundled/components/base/BaseButton.vue2.js +7 -7
  8. package/dist/bundled/components/base/BaseCheckbox.vue2.js +2 -2
  9. package/dist/bundled/components/base/BaseIcon.vue2.js +6 -6
  10. package/dist/bundled/components/base/BaseKeyboardShortcut.vue2.js +3 -3
  11. package/dist/bundled/components/base/BaseListItem.vue2.js +1 -1
  12. package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +4 -4
  13. package/dist/bundled/components/base/BaseSelect.vue2.js +8 -8
  14. package/dist/bundled/components/base/BaseSplitPane.vue2.js +4 -4
  15. package/dist/bundled/components/command/CommandPrompts.vue2.js +3 -3
  16. package/dist/bundled/components/command/PromptSelect.vue2.js +14 -14
  17. package/dist/bundled/components/command/PromptText.vue2.js +11 -11
  18. package/dist/bundled/components/panel/ControlsComponentPropItem.vue2.js +9 -9
  19. package/dist/bundled/components/panel/ControlsComponentProps.vue2.js +6 -6
  20. package/dist/bundled/components/panel/PaneTabs.vue2.js +4 -4
  21. package/dist/bundled/components/panel/StatePresets.vue2.js +7 -7
  22. package/dist/bundled/components/panel/StoryControls.vue2.js +3 -3
  23. package/dist/bundled/components/panel/StoryDocs.vue2.js +3 -3
  24. package/dist/bundled/components/panel/StoryEvent.vue2.js +5 -5
  25. package/dist/bundled/components/panel/StoryEvents.vue2.js +2 -2
  26. package/dist/bundled/components/panel/StorySidePanel.vue2.js +1 -1
  27. package/dist/bundled/components/panel/StorySourceCode.vue2.js +7 -7
  28. package/dist/bundled/components/search/SearchItemContent.vue2.js +11 -11
  29. package/dist/bundled/components/search/SearchPane.vue2.js +3 -3
  30. package/dist/bundled/components/story/GenericMountStory.vue2.js +2 -2
  31. package/dist/bundled/components/story/GenericRenderStory.vue2.js +2 -2
  32. package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +12 -12
  33. package/dist/bundled/components/story/StoryVariantGrid.vue2.js +3 -3
  34. package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +2 -2
  35. package/dist/bundled/components/story/StoryVariantSingle.vue2.js +9 -9
  36. package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +9 -9
  37. package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +5 -5
  38. package/dist/bundled/components/story/StoryVariantSingleView.vue2.js +12 -12
  39. package/dist/bundled/components/story/StoryViewer.vue2.js +2 -2
  40. package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue2.js +4 -4
  41. package/dist/bundled/components/toolbar/ToolbarBackground.vue2.js +2 -2
  42. package/dist/bundled/components/toolbar/ToolbarNewTab.vue2.js +4 -4
  43. package/dist/bundled/components/toolbar/ToolbarTitle.vue2.js +4 -4
  44. package/dist/bundled/components/tree/StoryGroup.vue2.js +10 -10
  45. package/dist/bundled/components/tree/StoryList.vue2.js +6 -6
  46. package/dist/bundled/components/tree/StoryListFolder.vue2.js +13 -13
  47. package/dist/bundled/components/tree/StoryListItem.vue2.js +10 -10
  48. package/dist/bundled/style.css +7 -7
  49. package/dist/style.css +530 -527
  50. package/package.json +15 -15
  51. package/src/app/components/app/MobileOverlay.vue +2 -2
  52. package/src/app/components/base/BaseSelect.vue +3 -3
@@ -15,15 +15,15 @@ const _hoisted_3 = {
15
15
  const _hoisted_4 = { class: "htw-flex-1 htw-truncate" };
16
16
  const _hoisted_5 = { class: "htw-flex htw-gap-2 htw-items-center" };
17
17
  const _hoisted_6 = { class: "htw-flex-1 htw-truncate" };
18
+ const DEFAULT_ID = "default";
18
19
  const _sfc_main = /* @__PURE__ */ defineComponent({
19
20
  __name: "StatePresets",
20
21
  props: {
21
- story: null,
22
- variant: null
22
+ story: {},
23
+ variant: {}
23
24
  },
24
25
  setup(__props) {
25
26
  const props = __props;
26
- const DEFAULT_ID = "default";
27
27
  const saveId = computed(() => `${props.story.id}:${props.variant.id}`);
28
28
  const omitKeys = ["_hPropDefs"];
29
29
  const defaultState = clone(omit(toRawDeep(props.variant.state), omitKeys));
@@ -114,7 +114,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
114
114
  createVNode(_sfc_main$1, {
115
115
  modelValue: unref(selectedOption),
116
116
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(selectedOption) ? selectedOption.value = $event : null),
117
- options: unref(presetsOptions),
117
+ options: presetsOptions.value,
118
118
  onDblclick: _cache[3] || (_cache[3] = ($event) => startEditing()),
119
119
  onKeydown: [
120
120
  _cache[4] || (_cache[4] = withKeys(($event) => stopEditing(), ["enter"])),
@@ -136,7 +136,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
136
136
  [vModelText, unref(presetStates).get(unref(selectedOption)).label]
137
137
  ]) : (openBlock(), createElementBlock("div", _hoisted_3, [
138
138
  createElementVNode("span", _hoisted_4, toDisplayString(label), 1),
139
- unref(canEdit) ? withDirectives((openBlock(), createBlock(unref(Icon), {
139
+ canEdit.value ? withDirectives((openBlock(), createBlock(unref(Icon), {
140
140
  key: 0,
141
141
  icon: "carbon:edit",
142
142
  class: "htw-flex-none htw-cursor-pointer htw-w-4 htw-h-4 hover:htw-text-primary-500 htw-opacity-50 hover:htw-opacity-100 dark:hover:htw-text-primary-400 htw-text-gray-900 dark:htw-text-gray-100",
@@ -165,11 +165,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
165
165
  withDirectives(createVNode(unref(Icon), {
166
166
  icon: savedNotif.value ? "carbon:checkmark" : "carbon:save",
167
167
  class: normalizeClass(["htw-cursor-pointer htw-w-4 htw-h-4 hover:htw-text-primary-500 dark:hover:htw-text-primary-400 htw-text-gray-900 dark:htw-text-gray-100", [
168
- unref(canEdit) ? "htw-opacity-50 hover:htw-opacity-100" : "htw-opacity-25 htw-pointer-events-none"
168
+ canEdit.value ? "htw-opacity-50 hover:htw-opacity-100" : "htw-opacity-25 htw-pointer-events-none"
169
169
  ]]),
170
170
  onClick: _cache[7] || (_cache[7] = ($event) => savePreset())
171
171
  }, null, 8, ["icon", "class"]), [
172
- [_directive_tooltip, savedNotif.value ? "Saved!" : unref(canEdit) ? "Save to preset" : null]
172
+ [_directive_tooltip, savedNotif.value ? "Saved!" : canEdit.value ? "Save to preset" : null]
173
173
  ]),
174
174
  withDirectives(createVNode(unref(Icon), {
175
175
  icon: "carbon:add-alt",
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, watch, computed, openBlock, createElementBlock, createElementVNode, unref, createBlock, createCommentVNode, withCtx, createVNode, Fragment, renderList } from "@histoire/vendors/vue";
1
+ import { defineComponent, ref, watch, computed, openBlock, createElementBlock, createElementVNode, createBlock, createCommentVNode, withCtx, createVNode, unref, Fragment, renderList } from "@histoire/vendors/vue";
2
2
  import { Icon } from "@histoire/vendors/iconify";
3
3
  import "../story/GenericRenderStory.vue.js";
4
4
  import BaseEmpty from "../base/BaseEmpty.vue.js";
@@ -38,13 +38,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38
38
  var _a, _b, _c, _d;
39
39
  return openBlock(), createElementBlock("div", _hoisted_1, [
40
40
  createElementVNode("div", _hoisted_2, [
41
- ready.value || !unref(hasCustomControls) ? (openBlock(), createBlock(_sfc_main$1, {
41
+ ready.value || !hasCustomControls.value ? (openBlock(), createBlock(_sfc_main$1, {
42
42
  key: 0,
43
43
  story: __props.story,
44
44
  variant: __props.variant
45
45
  }, null, 8, ["story", "variant"])) : createCommentVNode("", true)
46
46
  ]),
47
- unref(hasCustomControls) ? (openBlock(), createBlock(_sfc_main$2, {
47
+ hasCustomControls.value ? (openBlock(), createBlock(_sfc_main$2, {
48
48
  key: `${__props.story.id}-${__props.variant.id}`,
49
49
  "slot-name": "controls",
50
50
  variant: __props.variant,
@@ -125,15 +125,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
125
125
  class: "histoire-story-docs",
126
126
  onClickCapture: onClick
127
127
  }, [
128
- _ctx.__HISTOIRE_DEV__ && unref(renderedDoc) && unref(filePath) ? (openBlock(), createElementBlock("div", {
128
+ _ctx.__HISTOIRE_DEV__ && unref(renderedDoc) && filePath.value ? (openBlock(), createElementBlock("div", {
129
129
  key: 0,
130
130
  class: normalizeClass(["htw-flex htw-items-center htw-gap-2 htw-p-2", {
131
131
  "htw-pt-4": !__props.standalone
132
132
  }])
133
133
  }, [
134
- unref(filePath) ? (openBlock(), createBlock(_sfc_main$1, {
134
+ filePath.value ? (openBlock(), createBlock(_sfc_main$1, {
135
135
  key: 0,
136
- file: unref(filePath),
136
+ file: filePath.value,
137
137
  tooltip: "Edit docs in editor"
138
138
  }, null, 8, ["file"])) : createCommentVNode("", true)
139
139
  ], 2)) : createCommentVNode("", true),
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, toDisplayString, createElementBlock, unref, createCommentVNode } from "@histoire/vendors/vue";
1
+ import { defineComponent, computed, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, toDisplayString, createElementBlock, createCommentVNode } from "@histoire/vendors/vue";
2
2
  "use strict";
3
3
  const _hoisted_1 = {
4
4
  key: 0,
@@ -9,7 +9,7 @@ const _hoisted_3 = { class: "htw-p-4" };
9
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  __name: "StoryEvent",
11
11
  props: {
12
- event: null
12
+ event: {}
13
13
  },
14
14
  setup(__props) {
15
15
  const props = __props;
@@ -40,13 +40,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
40
  class: normalizeClass({
41
41
  "htw-text-primary-500": shown
42
42
  })
43
- }, toDisplayString(__props.event.name), 3),
44
- __props.event.argument ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(unref(formattedArgument)), 1)) : createCommentVNode("", true)
43
+ }, toDisplayString(_ctx.event.name), 3),
44
+ _ctx.event.argument ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(formattedArgument.value), 1)) : createCommentVNode("", true)
45
45
  ], 2)
46
46
  ]),
47
47
  popper: withCtx(() => [
48
48
  createElementVNode("div", _hoisted_2, [
49
- createElementVNode("pre", _hoisted_3, toDisplayString(__props.event.argument), 1)
49
+ createElementVNode("pre", _hoisted_3, toDisplayString(_ctx.event.argument), 1)
50
50
  ])
51
51
  ]),
52
52
  _: 1
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, onMounted, watch, nextTick, ref, openBlock, createElementBlock, unref, createBlock, withCtx, createVNode, createTextVNode, Fragment, renderList } from "@histoire/vendors/vue";
1
+ import { defineComponent, computed, onMounted, watch, nextTick, ref, openBlock, createElementBlock, createBlock, withCtx, createVNode, unref, createTextVNode, Fragment, renderList } from "@histoire/vendors/vue";
2
2
  import { Icon } from "@histoire/vendors/iconify";
3
3
  import BaseEmpty from "../base/BaseEmpty.vue.js";
4
4
  import { useEventsStore } from "../../stores/events.js";
@@ -27,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  ref: eventsElement,
28
28
  class: "histoire-story-events"
29
29
  }, [
30
- !unref(hasEvents) ? (openBlock(), createBlock(BaseEmpty, { key: 0 }, {
30
+ !hasEvents.value ? (openBlock(), createBlock(BaseEmpty, { key: 0 }, {
31
31
  default: withCtx(() => [
32
32
  createVNode(unref(Icon), {
33
33
  icon: "carbon:event-schedule",
@@ -61,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
61
  story: unref(storyStore).currentStory,
62
62
  variant: unref(storyStore).currentVariant
63
63
  }, null, 8, ["story", "variant"]),
64
- (openBlock(), createBlock(resolveDynamicComponent(unref(panelContentComponent)), {
64
+ (openBlock(), createBlock(resolveDynamicComponent(panelContentComponent.value), {
65
65
  story: unref(storyStore).currentStory,
66
66
  variant: unref(storyStore).currentVariant,
67
67
  class: "htw-h-full htw-overflow-auto"
@@ -26,8 +26,8 @@ const _hoisted_9 = ["innerHTML"];
26
26
  const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  __name: "StorySourceCode",
28
28
  props: {
29
- story: null,
30
- variant: null
29
+ story: {},
30
+ variant: {}
31
31
  },
32
32
  setup(__props) {
33
33
  const props = __props;
@@ -174,11 +174,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
174
174
  ])
175
175
  ]),
176
176
  createVNode(unref(HstCopyIcon), {
177
- content: unref(displayedSourceCode),
177
+ content: displayedSourceCode.value,
178
178
  class: "htw-flex-none"
179
179
  }, null, 8, ["content"])
180
180
  ])) : createCommentVNode("", true),
181
- error.value ? (openBlock(), createElementBlock("div", _hoisted_6, " Error: " + toDisplayString(error.value), 1)) : !unref(displayedSourceCode) ? (openBlock(), createBlock(BaseEmpty, { key: 2 }, {
181
+ error.value ? (openBlock(), createElementBlock("div", _hoisted_6, " Error: " + toDisplayString(error.value), 1)) : !displayedSourceCode.value ? (openBlock(), createBlock(BaseEmpty, { key: 2 }, {
182
182
  default: withCtx(() => [
183
183
  createVNode(unref(Icon), {
184
184
  icon: "carbon:code-hide",
@@ -187,12 +187,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
187
187
  _hoisted_7
188
188
  ]),
189
189
  _: 1
190
- })) : !unref(sourceHtml) ? (openBlock(), createElementBlock("textarea", {
190
+ })) : !sourceHtml.value ? (openBlock(), createElementBlock("textarea", {
191
191
  key: 3,
192
192
  ref_key: "scroller",
193
193
  ref: scroller,
194
194
  class: "__histoire-code-placeholder htw-w-full htw-h-full htw-p-4 htw-outline-none htw-bg-transparent htw-resize-none htw-m-0",
195
- value: unref(displayedSourceCode),
195
+ value: displayedSourceCode.value,
196
196
  readonly: "",
197
197
  "data-test-id": "story-source-code",
198
198
  onScroll
@@ -206,7 +206,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
206
206
  }, [
207
207
  createElementVNode("div", {
208
208
  class: "__histoire-code htw-p-4 htw-w-fit",
209
- innerHTML: unref(sourceHtml)
209
+ innerHTML: sourceHtml.value
210
210
  }, null, 8, _hoisted_9)
211
211
  ], 544))
212
212
  ]);
@@ -12,7 +12,7 @@ const _hoisted_4 = {
12
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
13
13
  __name: "SearchItemContent",
14
14
  props: {
15
- result: null,
15
+ result: {},
16
16
  selected: { type: Boolean }
17
17
  },
18
18
  setup(__props) {
@@ -29,26 +29,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
29
  var _a;
30
30
  return openBlock(), createElementBlock(Fragment, null, [
31
31
  createVNode(BaseIcon, {
32
- icon: __props.result.icon ?? defaultIcons[__props.result.kind],
32
+ icon: _ctx.result.icon ?? defaultIcons[_ctx.result.kind],
33
33
  class: normalizeClass(["htw-w-4 htw-h-4", [
34
- !__props.selected ? [
35
- __props.result.iconColor ? "bind-icon-color" : {
36
- "htw-text-primary-500": __props.result.kind === "story",
37
- "htw-text-gray-500": __props.result.kind === "variant"
34
+ !_ctx.selected ? [
35
+ _ctx.result.iconColor ? "bind-icon-color" : {
36
+ "htw-text-primary-500": _ctx.result.kind === "story",
37
+ "htw-text-gray-500": _ctx.result.kind === "variant"
38
38
  }
39
39
  ] : [],
40
40
  {
41
- "colorize-black": __props.selected
41
+ "colorize-black": _ctx.selected
42
42
  }
43
43
  ]])
44
44
  }, null, 8, ["icon", "class"]),
45
45
  createElementVNode("div", _hoisted_1, [
46
46
  createElementVNode("div", _hoisted_2, [
47
- createTextVNode(toDisplayString(__props.result.title) + " ", 1),
48
- createElementVNode("span", _hoisted_3, toDisplayString(kindLabels[__props.result.kind]), 1)
47
+ createTextVNode(toDisplayString(_ctx.result.title) + " ", 1),
48
+ createElementVNode("span", _hoisted_3, toDisplayString(kindLabels[_ctx.result.kind]), 1)
49
49
  ]),
50
- ((_a = __props.result.path) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div", _hoisted_4, [
51
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.result.path, (p, index) => {
50
+ ((_a = _ctx.result.path) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div", _hoisted_4, [
51
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.result.path, (p, index) => {
52
52
  return openBlock(), createElementBlock("div", {
53
53
  key: index,
54
54
  class: "htw-flex htw-items-center htw-gap-0.5"
@@ -265,7 +265,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
265
265
  [vModelText, searchInputText.value]
266
266
  ])
267
267
  ]),
268
- unref(rateLimitedSearch) && !unref(results).length ? (openBlock(), createBlock(BaseEmpty, {
268
+ unref(rateLimitedSearch) && !results.value.length ? (openBlock(), createBlock(BaseEmpty, {
269
269
  key: 0,
270
270
  class: "no-animation"
271
271
  }, {
@@ -273,8 +273,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
273
273
  createTextVNode(" No results ")
274
274
  ]),
275
275
  _: 1
276
- })) : unref(results).length ? (openBlock(), createElementBlock("div", _hoisted_1, [
277
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(results), (result, index) => {
276
+ })) : results.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
277
+ (openBlock(true), createElementBlock(Fragment, null, renderList(results.value, (result, index) => {
278
278
  return openBlock(), createBlock(SearchItem, {
279
279
  key: result.id,
280
280
  result,
@@ -8,7 +8,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  ...__default__,
9
9
  __name: "GenericMountStory",
10
10
  props: {
11
- story: null
11
+ story: {}
12
12
  },
13
13
  setup(__props) {
14
14
  const props = __props;
@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  return mountComponent.value ? (openBlock(), createBlock(resolveDynamicComponent(mountComponent.value), mergeProps({
26
26
  key: 0,
27
27
  class: "histoire-generic-mount-story",
28
- story: __props.story
28
+ story: _ctx.story
29
29
  }, _ctx.$attrs), null, 16, ["story"])) : createCommentVNode("", true);
30
30
  };
31
31
  }
@@ -8,7 +8,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  ...__default__,
9
9
  __name: "GenericRenderStory",
10
10
  props: {
11
- story: null
11
+ story: {}
12
12
  },
13
13
  setup(__props) {
14
14
  const props = __props;
@@ -30,7 +30,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
30
  return mountComponent.value ? (openBlock(), createBlock(resolveDynamicComponent(mountComponent.value), mergeProps({
31
31
  key: 0,
32
32
  class: "histoire-generic-render-story __histoire-render-story",
33
- story: __props.story
33
+ story: _ctx.story
34
34
  }, _ctx.$attrs), null, 16, ["story"])) : createCommentVNode("", true);
35
35
  };
36
36
  }
@@ -23,7 +23,7 @@ const _hoisted_7 = /* @__PURE__ */ createStaticVNode('<div class="htw-absolute h
23
23
  const _sfc_main = /* @__PURE__ */ defineComponent({
24
24
  __name: "StoryResponsivePreview",
25
25
  props: {
26
- variant: null
26
+ variant: {}
27
27
  },
28
28
  setup(__props) {
29
29
  const props = __props;
@@ -118,7 +118,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
118
118
  const sizeTooltip = computed(() => (responsiveWidth.value ?? "Auto") + " × " + (responsiveHeight.value ?? "Auto"));
119
119
  return (_ctx, _cache) => {
120
120
  return openBlock(), createElementBlock("div", _hoisted_1, [
121
- unref(isResponsiveEnabled) ? (openBlock(), createElementBlock("div", _hoisted_2, [
121
+ isResponsiveEnabled.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
122
122
  createVNode(HatchedPattern, { class: "htw-w-full htw-h-full htw-text-black/[1%] dark:htw-text-white/[1%]" })
123
123
  ])) : createCommentVNode("", true),
124
124
  createElementVNode("div", {
@@ -127,9 +127,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
127
127
  class: "htw-h-full htw-overflow-auto htw-relative"
128
128
  }, [
129
129
  createElementVNode("div", {
130
- class: normalizeClass(["htw-h-full htw-overflow-hidden htw-bg-white dark:htw-bg-gray-700 htw-rounded-lg htw-relative", unref(isResponsiveEnabled) ? {
131
- "htw-w-fit": !!unref(finalWidth),
132
- "htw-h-fit": !!unref(finalHeight)
130
+ class: normalizeClass(["htw-h-full htw-overflow-hidden htw-bg-white dark:htw-bg-gray-700 htw-rounded-lg htw-relative", isResponsiveEnabled.value ? {
131
+ "htw-w-fit": !!finalWidth.value,
132
+ "htw-h-fit": !!finalHeight.value
133
133
  } : void 0])
134
134
  }, [
135
135
  createElementVNode("div", _hoisted_3, [
@@ -141,15 +141,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
141
141
  createElementVNode("div", _hoisted_5, [
142
142
  _hoisted_6,
143
143
  renderSlot(_ctx.$slots, "default", {
144
- isResponsiveEnabled: unref(isResponsiveEnabled),
145
- finalWidth: unref(finalWidth),
146
- finalHeight: unref(finalHeight),
144
+ isResponsiveEnabled: isResponsiveEnabled.value,
145
+ finalWidth: finalWidth.value,
146
+ finalHeight: finalHeight.value,
147
147
  resizing: resizing.value
148
148
  }, void 0, true)
149
149
  ]),
150
150
  _hoisted_7
151
151
  ]),
152
- unref(isResponsiveEnabled) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
152
+ isResponsiveEnabled.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
153
153
  withDirectives((openBlock(), createElementBlock("div", {
154
154
  ref_key: "horizontalDragger",
155
155
  ref: horizontalDragger,
@@ -162,7 +162,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
162
162
  ])), [
163
163
  [
164
164
  unref(VTooltip),
165
- unref(sizeTooltip),
165
+ sizeTooltip.value,
166
166
  void 0,
167
167
  { right: true }
168
168
  ]
@@ -179,7 +179,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
179
179
  ])), [
180
180
  [
181
181
  unref(VTooltip),
182
- unref(sizeTooltip),
182
+ sizeTooltip.value,
183
183
  void 0,
184
184
  { bottom: true }
185
185
  ]
@@ -191,7 +191,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
191
191
  }, null, 512), [
192
192
  [
193
193
  unref(VTooltip),
194
- unref(sizeTooltip),
194
+ sizeTooltip.value,
195
195
  void 0,
196
196
  { bottom: true }
197
197
  ]
@@ -15,6 +15,8 @@ const _hoisted_2 = {
15
15
  class: "htw-flex-none htw-flex htw-items-center htw-justify-end htw-h-8 htw-mx-2 htw-mt-1"
16
16
  };
17
17
  const _hoisted_3 = { class: "htw-flex htw-w-0 htw-flex-1 htw-mx-4" };
18
+ const margin = 16;
19
+ const gap = 16;
18
20
  const _sfc_main = /* @__PURE__ */ defineComponent({
19
21
  __name: "StoryVariantGrid",
20
22
  setup(__props) {
@@ -32,8 +34,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
34
  }
33
35
  return layoutWidth;
34
36
  });
35
- const margin = 16;
36
- const gap = 16;
37
37
  const itemWidth = ref(16);
38
38
  const maxItemHeight = ref(0);
39
39
  const maxCount = ref(10);
@@ -126,7 +126,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
126
126
  ref: gridEl,
127
127
  class: "htw-grid htw-gap-4 htw-my-4",
128
128
  style: normalizeStyle({
129
- gridTemplateColumns: `repeat(${unref(columnCount)}, ${gridColumnWidth.value}px)`
129
+ gridTemplateColumns: `repeat(${columnCount.value}, ${gridColumnWidth.value}px)`
130
130
  })
131
131
  }, [
132
132
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(storyStore).currentStory.variants.slice(0, maxCount.value), (variant, index) => {
@@ -130,8 +130,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
130
130
  createElementVNode("div", {
131
131
  class: "htw-relative htw-h-full",
132
132
  style: normalizeStyle({
133
- "--histoire-contrast-color": unref(contrastColor),
134
- color: unref(autoApplyContrastColor) ? unref(contrastColor) : void 0
133
+ "--histoire-contrast-color": contrastColor.value,
134
+ color: autoApplyContrastColor.value ? contrastColor.value : void 0
135
135
  })
136
136
  }, [
137
137
  (openBlock(), createBlock(_sfc_main$2, {
@@ -1,4 +1,4 @@
1
- import { defineComponent, useCssVars, unref, computed, openBlock, createElementBlock, createVNode, Fragment, createElementVNode, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, createBlock, withCtx, renderList, pushScopeId, popScopeId } from "@histoire/vendors/vue";
1
+ import { defineComponent, useCssVars, computed, openBlock, createElementBlock, createVNode, unref, Fragment, createElementVNode, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, createBlock, withCtx, renderList, pushScopeId, popScopeId } from "@histoire/vendors/vue";
2
2
  import { useStoryStore } from "../../stores/story.js";
3
3
  import { Icon } from "@histoire/vendors/iconify";
4
4
  import { isMobile } from "../../util/responsive.js";
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
34
  useCssVars((_ctx) => {
35
35
  var _a;
36
36
  return {
37
- "4d25d048": (_a = unref(variant)) == null ? void 0 : _a.iconColor
37
+ "4d25d048": (_a = variant.value) == null ? void 0 : _a.iconColor
38
38
  };
39
39
  });
40
40
  const storyStore = useStoryStore();
@@ -44,9 +44,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
44
  });
45
45
  const variant = computed(() => storyStore.currentVariant);
46
46
  return (_ctx, _cache) => {
47
- return unref(hasSingleVariant) && unref(variant) ? (openBlock(), createElementBlock("div", _hoisted_1, [
47
+ return hasSingleVariant.value && variant.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
48
48
  createVNode(_sfc_main$1, {
49
- variant: unref(variant),
49
+ variant: variant.value,
50
50
  story: unref(storyStore).currentStory
51
51
  }, null, 8, ["variant", "story"])
52
52
  ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
@@ -55,15 +55,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
55
  class: "htw-px-6 htw-h-12 hover:htw-text-primary-500 dark:hover:htw-text-primary-400 htw-cursor-pointer htw-flex htw-gap-2 htw-flex-wrap htw-w-full htw-items-center htw-flex-none",
56
56
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("open-variant-menu"))
57
57
  }, [
58
- unref(variant) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
58
+ variant.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
59
59
  createVNode(unref(Icon), {
60
- icon: unref(variant).icon ?? "carbon:cube",
60
+ icon: variant.value.icon ?? "carbon:cube",
61
61
  class: normalizeClass(["htw-w-5 htw-h-5 htw-flex-none", {
62
- "htw-text-gray-500": !unref(variant).iconColor,
63
- "bind-icon-color": unref(variant).iconColor
62
+ "htw-text-gray-500": !variant.value.iconColor,
63
+ "bind-icon-color": variant.value.iconColor
64
64
  }])
65
65
  }, null, 8, ["icon", "class"]),
66
- createTextVNode(" " + toDisplayString(unref(variant).title), 1)
66
+ createTextVNode(" " + toDisplayString(variant.value.title), 1)
67
67
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
68
68
  createTextVNode(" Select a variant... ")
69
69
  ], 64)),
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, unref, normalizeClass } from "@histoire/vendors/vue";
1
+ import { defineComponent, computed, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, normalizeClass, unref } from "@histoire/vendors/vue";
2
2
  import { isDark } from "../../util/dark.js";
3
3
  import { histoireConfig } from "../../util/config.js";
4
4
  import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
@@ -10,8 +10,8 @@ import _sfc_main$1 from "./GenericRenderStory.vue2.js";
10
10
  const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  __name: "StoryVariantSinglePreviewNative",
12
12
  props: {
13
- story: null,
14
- variant: null
13
+ story: {},
14
+ variant: {}
15
15
  },
16
16
  setup(__props) {
17
17
  const props = __props;
@@ -29,7 +29,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
29
  return (_ctx, _cache) => {
30
30
  return openBlock(), createBlock(StoryResponsivePreview, {
31
31
  class: "histoire-story-variant-single-preview-native",
32
- variant: __props.variant
32
+ variant: _ctx.variant
33
33
  }, {
34
34
  default: withCtx(({ isResponsiveEnabled, finalWidth, finalHeight }) => [
35
35
  createElementVNode("div", {
@@ -39,17 +39,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
39
  height: finalHeight ? `${finalHeight}px` : "100%"
40
40
  } : { width: "100%", height: "100%" },
41
41
  {
42
- "--histoire-contrast-color": unref(contrastColor),
43
- color: unref(autoApplyContrastColor) ? unref(contrastColor) : void 0
42
+ "--histoire-contrast-color": contrastColor.value,
43
+ color: autoApplyContrastColor.value ? contrastColor.value : void 0
44
44
  }
45
45
  ]),
46
46
  class: "htw-relative",
47
47
  "data-test-id": "sandbox-render"
48
48
  }, [
49
49
  (openBlock(), createBlock(_sfc_main$1, {
50
- key: `${__props.story.id}-${__props.variant.id}`,
51
- variant: __props.variant,
52
- story: __props.story,
50
+ key: `${_ctx.story.id}-${_ctx.variant.id}`,
51
+ variant: _ctx.variant,
52
+ story: _ctx.story,
53
53
  class: normalizeClass(["htw-h-full", {
54
54
  [unref(histoireConfig).sandboxDarkClass]: unref(isDark),
55
55
  // @TODO remove
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, watch, computed, openBlock, createBlock, withCtx, createElementVNode, unref, normalizeClass, normalizeStyle, toRaw } from "@histoire/vendors/vue";
1
+ import { defineComponent, ref, watch, computed, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, normalizeStyle, toRaw } from "@histoire/vendors/vue";
2
2
  import { useEventListener } from "@histoire/vendors/vue-use";
3
3
  import { applyState } from "@histoire/shared";
4
4
  import { SANDBOX_READY, EVENT_SEND, STATE_SYNC, PREVIEW_SETTINGS_SYNC } from "../../util/const.js";
@@ -12,8 +12,8 @@ const _hoisted_1 = ["src"];
12
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
13
13
  __name: "StoryVariantSinglePreviewRemote",
14
14
  props: {
15
- story: null,
16
- variant: null
15
+ story: {},
16
+ variant: {}
17
17
  },
18
18
  setup(__props) {
19
19
  const props = __props;
@@ -99,13 +99,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
99
99
  return (_ctx, _cache) => {
100
100
  return openBlock(), createBlock(StoryResponsivePreview, {
101
101
  class: "histoire-story-variant-single-preview-remote",
102
- variant: __props.variant
102
+ variant: _ctx.variant
103
103
  }, {
104
104
  default: withCtx(({ isResponsiveEnabled, finalWidth, finalHeight, resizing }) => [
105
105
  createElementVNode("iframe", {
106
106
  ref_key: "iframe",
107
107
  ref: iframe,
108
- src: unref(sandboxUrl),
108
+ src: sandboxUrl.value,
109
109
  class: normalizeClass(["htw-w-full htw-h-full htw-relative", {
110
110
  "htw-invisible": !isIframeLoaded.value,
111
111
  "htw-pointer-events-none": resizing
@@ -27,36 +27,36 @@ const _hoisted_2 = {
27
27
  const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  __name: "StoryVariantSingleView",
29
29
  props: {
30
- variant: null,
31
- story: null
30
+ variant: {},
31
+ story: {}
32
32
  },
33
33
  setup(__props) {
34
34
  return (_ctx, _cache) => {
35
35
  var _a, _b;
36
36
  return openBlock(), createElementBlock("div", _hoisted_1, [
37
37
  !unref(isMobile) ? (openBlock(), createElementBlock("div", _hoisted_2, [
38
- createVNode(_sfc_main$1, { variant: __props.variant }, null, 8, ["variant"]),
39
- !__props.variant.responsiveDisabled ? (openBlock(), createBlock(_sfc_main$2, { key: 0 })) : createCommentVNode("", true),
38
+ createVNode(_sfc_main$1, { variant: _ctx.variant }, null, 8, ["variant"]),
39
+ !_ctx.variant.responsiveDisabled ? (openBlock(), createBlock(_sfc_main$2, { key: 0 })) : createCommentVNode("", true),
40
40
  createVNode(ToolbarBackground),
41
41
  createVNode(_sfc_main$3),
42
42
  createVNode(_sfc_main$4, {
43
- variant: __props.variant,
44
- story: __props.story
43
+ variant: _ctx.variant,
44
+ story: _ctx.story
45
45
  }, null, 8, ["variant", "story"]),
46
46
  _ctx.__HISTOIRE_DEV__ ? (openBlock(), createBlock(_sfc_main$5, {
47
47
  key: 1,
48
- file: (_a = __props.story.file) == null ? void 0 : _a.filePath,
48
+ file: (_a = _ctx.story.file) == null ? void 0 : _a.filePath,
49
49
  tooltip: "Edit story in editor"
50
50
  }, null, 8, ["file"])) : createCommentVNode("", true)
51
51
  ])) : createCommentVNode("", true),
52
- ((_b = __props.story.layout) == null ? void 0 : _b.iframe) === false ? (openBlock(), createBlock(_sfc_main$6, {
52
+ ((_b = _ctx.story.layout) == null ? void 0 : _b.iframe) === false ? (openBlock(), createBlock(_sfc_main$6, {
53
53
  key: 1,
54
- story: __props.story,
55
- variant: __props.variant
54
+ story: _ctx.story,
55
+ variant: _ctx.variant
56
56
  }, null, 8, ["story", "variant"])) : (openBlock(), createBlock(_sfc_main$7, {
57
57
  key: 2,
58
- story: __props.story,
59
- variant: __props.variant
58
+ story: _ctx.story,
59
+ variant: _ctx.variant
60
60
  }, null, 8, ["story", "variant"]))
61
61
  ]);
62
62
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, useCssVars, unref, computed, ref, watch, openBlock, createElementBlock, Fragment, createElementVNode, createBlock, createCommentVNode, createVNode, withCtx, renderList, pushScopeId, popScopeId } from "@histoire/vendors/vue";
1
+ import { defineComponent, useCssVars, computed, ref, watch, openBlock, createElementBlock, Fragment, createElementVNode, unref, createBlock, createCommentVNode, createVNode, withCtx, renderList, pushScopeId, popScopeId } from "@histoire/vendors/vue";
2
2
  import { useStoryStore } from "../../stores/story.js";
3
3
  import StoryVariantListItem from "./StoryVariantListItem.vue.js";
4
4
  import "../app/MobileOverlay.vue.js";
@@ -15,7 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  useCssVars((_ctx) => {
16
16
  var _a;
17
17
  return {
18
- "663732b6": (_a = unref(variant)) == null ? void 0 : _a.iconColor
18
+ "663732b6": (_a = variant.value) == null ? void 0 : _a.iconColor
19
19
  };
20
20
  });
21
21
  const storyStore = useStoryStore();