@poveste/app 0.14.0 → 0.15.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.
- package/dist/bundled/app.css +26 -26
- package/dist/bundled/components/app/TopBarChipItem.js +1 -1
- package/dist/bundled/components/base/BaseEmpty.js +2 -2
- package/dist/bundled/components/base/BaseOverflowMenu.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/bundled/components/base/BaseSelect.vue_vue_type_script_setup_true_lang.js +158 -26
- package/dist/bundled/components/base/BaseSplitPane.js +1 -1
- package/dist/bundled/components/command/PromptSelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue_vue_type_script_setup_true_lang.js +20 -14
- package/dist/bundled/components/panel/PaneTabs.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/bundled/components/panel/StatePresets.vue_vue_type_script_setup_true_lang.js +78 -49
- package/dist/bundled/components/panel/StorySidePanel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/panel/StorySourceCode.js +1 -1
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/bundled/components/search/SearchItemContent.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/bundled/components/search/SearchPane.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/bundled/components/story/StoryResponsivePreview.js +1 -1
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js +8 -4
- package/dist/bundled/components/story/StoryVariantGridItem.js +1 -1
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue_vue_type_script_setup_true_lang.js +9 -6
- package/dist/bundled/components/story/StoryView.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/bundled/components/toolbar/ToolbarTitle.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarTitle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/tree/StoryGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/bundled/components/tree/StoryList.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/tree/StoryListFolder.js +1 -1
- package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/tree/StoryListItem.js +1 -1
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/sandbox.js +3 -2
- package/dist/bundled/stores/story.js +2 -2
- package/dist/bundled/util/commands.js +1 -1
- package/dist/bundled/util/dark.js +1 -1
- package/dist/bundled/util/events.js +1 -1
- package/dist/bundled/util/grid-slots.js +1 -1
- package/dist/bundled/util/keyboard.js +8 -14
- package/dist/bundled/util/mapping.js +2 -2
- package/dist/bundled/util/render-tracker.js +33 -0
- package/dist/bundled/util/variant.js +12 -2
- package/dist/style.css +23 -1
- package/package.json +13 -17
- package/src/__tests__/render-tracker.spec.ts +38 -0
- package/src/app/App.vue +1 -1
- package/src/app/components/app/TopBarChipItem.vue +1 -1
- package/src/app/components/base/BaseEmpty.vue +1 -1
- package/src/app/components/base/BaseListItemLink.vue +4 -2
- package/src/app/components/base/BaseOverflowMenu.vue +17 -16
- package/src/app/components/base/BaseSelect.vue +171 -15
- package/src/app/components/base/BaseSplitPane.vue +2 -2
- package/src/app/components/command/PromptSelect.vue +1 -1
- package/src/app/components/panel/ControlsComponentPropItem.vue +26 -15
- package/src/app/components/panel/PaneTabs.vue +6 -6
- package/src/app/components/panel/StatePresets.vue +100 -64
- package/src/app/components/panel/StorySidePanel.vue +1 -1
- package/src/app/components/panel/StorySourceCode.vue +6 -5
- package/src/app/components/search/SearchItemContent.vue +2 -1
- package/src/app/components/search/SearchPane.vue +2 -3
- package/src/app/components/story/StoryResponsivePreview.vue +6 -2
- package/src/app/components/story/StoryVariantGridItem.vue +1 -1
- package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +14 -8
- package/src/app/components/story/StoryView.vue +3 -1
- package/src/app/components/toolbar/ToolbarTitle.vue +2 -2
- package/src/app/components/tree/StoryGroup.vue +2 -2
- package/src/app/components/tree/StoryList.vue +2 -2
- package/src/app/components/tree/StoryListFolder.vue +2 -2
- package/src/app/components/tree/StoryListItem.vue +1 -1
- package/src/app/sandbox.ts +8 -2
- package/src/app/stores/story.ts +2 -2
- package/src/app/types.ts +4 -4
- package/src/app/util/commands.ts +1 -1
- package/src/app/util/dark.ts +1 -1
- package/src/app/util/env.ts +0 -1
- package/src/app/util/events.ts +6 -5
- package/src/app/util/grid-slots.ts +1 -1
- package/src/app/util/keyboard.ts +7 -11
- package/src/app/util/mapping.ts +2 -2
- package/src/app/util/render-tracker.ts +31 -0
- package/src/app/util/state.ts +3 -3
- package/src/app/util/variant.ts +12 -2
package/dist/bundled/app.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
2
|
-
.bind-tree-margin[data-v-
|
|
3
|
-
margin-left: var(--
|
|
2
|
+
.bind-tree-margin[data-v-83161585] {
|
|
3
|
+
margin-left: var(--v0299061e);
|
|
4
4
|
}
|
|
5
|
-
.bind-icon-color[data-v-
|
|
6
|
-
color: var(--
|
|
5
|
+
.bind-icon-color[data-v-83161585] {
|
|
6
|
+
color: var(--v80ccd94c);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
10
|
-
.bind-tree-padding[data-v-
|
|
11
|
-
padding-left: var(--
|
|
10
|
+
.bind-tree-padding[data-v-9702f44e] {
|
|
11
|
+
padding-left: var(--v716b068e);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
@@ -17,33 +17,33 @@
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
20
|
-
.bind-icon-color[data-v-
|
|
21
|
-
color: var(--
|
|
20
|
+
.bind-icon-color[data-v-30c06406] {
|
|
21
|
+
color: var(--v5947d534);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
25
|
-
.landscape > div > .dragger[data-v-
|
|
25
|
+
.landscape > div > .dragger[data-v-e5174855] {
|
|
26
26
|
width: .625rem;
|
|
27
27
|
}
|
|
28
|
-
.portrait > div > .dragger[data-v-
|
|
28
|
+
.portrait > div > .dragger[data-v-e5174855] {
|
|
29
29
|
height: .625rem;
|
|
30
30
|
}
|
|
31
|
-
.landscape > div > .dragger.dragger-offset-before[data-v-
|
|
31
|
+
.landscape > div > .dragger.dragger-offset-before[data-v-e5174855] {
|
|
32
32
|
right: 0;
|
|
33
33
|
}
|
|
34
|
-
.portrait > div > .dragger.dragger-offset-before[data-v-
|
|
34
|
+
.portrait > div > .dragger.dragger-offset-before[data-v-e5174855] {
|
|
35
35
|
bottom: 0;
|
|
36
36
|
}
|
|
37
|
-
.landscape > div > .dragger.dragger-offset-center[data-v-
|
|
37
|
+
.landscape > div > .dragger.dragger-offset-center[data-v-e5174855] {
|
|
38
38
|
right: -.3125rem;
|
|
39
39
|
}
|
|
40
|
-
.portrait > div > .dragger.dragger-offset-center[data-v-
|
|
40
|
+
.portrait > div > .dragger.dragger-offset-center[data-v-e5174855] {
|
|
41
41
|
bottom: -.3125rem;
|
|
42
42
|
}
|
|
43
|
-
.landscape > div > .dragger.dragger-offset-after[data-v-
|
|
43
|
+
.landscape > div > .dragger.dragger-offset-after[data-v-e5174855] {
|
|
44
44
|
right: -.625rem;
|
|
45
45
|
}
|
|
46
|
-
.portrait > div > .dragger.dragger-offset-after[data-v-
|
|
46
|
+
.portrait > div > .dragger.dragger-offset-after[data-v-e5174855] {
|
|
47
47
|
bottom: -.625rem;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
77
|
-
.base-empty[data-v-
|
|
78
|
-
animation: base-empty-
|
|
77
|
+
.base-empty[data-v-63095ef6]:not(.no-animation) {
|
|
78
|
+
animation: base-empty-63095ef6 .15s .2s both;
|
|
79
79
|
}
|
|
80
|
-
@keyframes base-empty-
|
|
80
|
+
@keyframes base-empty-63095ef6 {
|
|
81
81
|
0% {
|
|
82
82
|
opacity: 0;
|
|
83
83
|
}
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
90
|
-
.__poveste-code-placeholder[data-v-
|
|
90
|
+
.__poveste-code-placeholder[data-v-b595e0d4] {
|
|
91
91
|
color: inherit;
|
|
92
92
|
font-size: inherit;
|
|
93
93
|
}
|
|
@@ -102,16 +102,16 @@
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
105
|
-
.bind-preview-bg[data-v-
|
|
106
|
-
background-color: var(--
|
|
105
|
+
.bind-preview-bg[data-v-13932615] {
|
|
106
|
+
background-color: var(--v538c65b8);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
110
|
-
.bind-icon-color[data-v-
|
|
111
|
-
color: var(--
|
|
110
|
+
.bind-icon-color[data-v-ae85762b] {
|
|
111
|
+
color: var(--v2b77a04a);
|
|
112
112
|
}
|
|
113
|
-
.bind-preview-bg[data-v-
|
|
114
|
-
background-color: var(--
|
|
113
|
+
.bind-preview-bg[data-v-ae85762b] {
|
|
114
|
+
background-color: var(--v8dc7fba0);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
@@ -5,7 +5,7 @@ var _sfc_main = {};
|
|
|
5
5
|
var _hoisted_1 = ["role"];
|
|
6
6
|
function _sfc_render(_ctx, _cache) {
|
|
7
7
|
return openBlock(), createElementBlock("a", {
|
|
8
|
-
role: _ctx.$attrs
|
|
8
|
+
role: _ctx.$attrs["href"] ? void 0 : "button",
|
|
9
9
|
class: "poveste-top-bar-chip-item flex items-center gap-1 px-2.5 py-1.5 hover:bg-white/50 active:bg-white/70 dark:hover:bg-white/10 dark:active:bg-white/15 hover:text-primary-500 dark:hover:text-primary-400 cursor-pointer text-gray-900 dark:text-gray-100 transition-colors"
|
|
10
10
|
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1);
|
|
11
11
|
}
|
|
@@ -3,10 +3,10 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
3
3
|
import { createElementBlock, openBlock, renderSlot } from "@poveste/vendors/vue";
|
|
4
4
|
//#region src/app/components/base/BaseEmpty.vue
|
|
5
5
|
var _sfc_main = {};
|
|
6
|
-
var _hoisted_1 = { class: "poveste-base-empty base-empty flex flex-col items-center justify-center space-y-4 py-12 h-full text-center text-gray-400 text-lg" };
|
|
6
|
+
var _hoisted_1 = { class: "poveste-base-empty base-empty flex flex-col items-center justify-center space-y-4 py-12 h-full text-center text-gray-500 dark:text-gray-400 text-lg" };
|
|
7
7
|
function _sfc_render(_ctx, _cache) {
|
|
8
8
|
return openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]);
|
|
9
9
|
}
|
|
10
|
-
var BaseEmpty_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
10
|
+
var BaseEmpty_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-63095ef6"]]);
|
|
11
11
|
//#endregion
|
|
12
12
|
export { BaseEmpty_default as default };
|
package/dist/bundled/components/base/BaseOverflowMenu.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -13,16 +13,16 @@ var BaseOverflowMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
13
13
|
setup(__props) {
|
|
14
14
|
const el = ref();
|
|
15
15
|
const availableWidth = ref(0);
|
|
16
|
-
useResizeObserver(el, (
|
|
17
|
-
|
|
18
|
-
availableWidth.value =
|
|
16
|
+
useResizeObserver(el, ([entry]) => {
|
|
17
|
+
if (!entry) return;
|
|
18
|
+
availableWidth.value = entry.contentRect.width - overflowButtonWidth;
|
|
19
19
|
});
|
|
20
20
|
const children = ref(/* @__PURE__ */ new Map());
|
|
21
21
|
const visibleChildrenCount = computed(() => {
|
|
22
22
|
let width = 0;
|
|
23
23
|
const c = [...children.value.values()].sort((a, b) => a.index - b.index);
|
|
24
|
-
for (
|
|
25
|
-
width +=
|
|
24
|
+
for (const [i, child] of c.entries()) {
|
|
25
|
+
width += child.width;
|
|
26
26
|
if (width > availableWidth.value) return i;
|
|
27
27
|
}
|
|
28
28
|
return c.length;
|
|
@@ -39,10 +39,10 @@ var BaseOverflowMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
39
39
|
width: 0,
|
|
40
40
|
index: props.index
|
|
41
41
|
});
|
|
42
|
-
useResizeObserver(el, (
|
|
42
|
+
useResizeObserver(el, ([entry]) => {
|
|
43
43
|
const element = el.value;
|
|
44
|
-
if (!element) return;
|
|
45
|
-
const width =
|
|
44
|
+
if (!element || !entry) return;
|
|
45
|
+
const width = entry.contentRect.width;
|
|
46
46
|
if (!children.value.has(element)) children.value.set(element, state);
|
|
47
47
|
state.width = width;
|
|
48
48
|
});
|
|
@@ -54,22 +54,22 @@ var BaseOverflowMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
54
54
|
return () => h("div", {
|
|
55
55
|
ref: el,
|
|
56
56
|
style: { visibility: visible.value ? "visible" : "hidden" }
|
|
57
|
-
}, slots
|
|
57
|
+
}, slots["default"]?.());
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
/**
|
|
61
61
|
* Wraps each child with a <ChildWrapper>
|
|
62
62
|
*/
|
|
63
|
-
function ChildrenRender(
|
|
64
|
-
const
|
|
65
|
-
return
|
|
63
|
+
function ChildrenRender(_props, { slots }) {
|
|
64
|
+
const children = slots["default"]?.()[0]?.children;
|
|
65
|
+
return Array.isArray(children) ? children.map((vnode, index) => h(ChildWrapper, { index }, () => [vnode])) : [];
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
68
|
* Only renders a part of a children list
|
|
69
69
|
*/
|
|
70
70
|
function ChildrenSlice(props, { slots }) {
|
|
71
|
-
const
|
|
72
|
-
return
|
|
71
|
+
const children = slots["default"]?.()[0]?.children;
|
|
72
|
+
return Array.isArray(children) ? children.slice(props.start, props.end) : [];
|
|
73
73
|
}
|
|
74
74
|
return (_ctx, _cache) => {
|
|
75
75
|
const _component_VDropdown = resolveComponent("VDropdown");
|
|
@@ -1,57 +1,189 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { refAutoReset } from "@poveste/vendors/vue-use";
|
|
2
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, withCtx, withModifiers } from "@poveste/vendors/vue";
|
|
2
3
|
import { Icon } from "@poveste/vendors/iconify";
|
|
3
4
|
import { Dropdown } from "@poveste/vendors/floating-vue";
|
|
4
5
|
//#region src/app/components/base/BaseSelect.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var _hoisted_1 =
|
|
6
|
+
var _hoisted_1 = [
|
|
7
|
+
"aria-label",
|
|
8
|
+
"aria-expanded",
|
|
9
|
+
"aria-controls",
|
|
10
|
+
"aria-activedescendant"
|
|
11
|
+
];
|
|
6
12
|
var _hoisted_2 = { class: "flex-1 truncate" };
|
|
7
|
-
var _hoisted_3 =
|
|
8
|
-
var _hoisted_4 = [
|
|
13
|
+
var _hoisted_3 = ["aria-label"];
|
|
14
|
+
var _hoisted_4 = [
|
|
15
|
+
"id",
|
|
16
|
+
"aria-selected",
|
|
17
|
+
"onMousemove",
|
|
18
|
+
"onClick"
|
|
19
|
+
];
|
|
9
20
|
var BaseSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
10
21
|
__name: "BaseSelect",
|
|
11
22
|
props: {
|
|
12
23
|
modelValue: {},
|
|
13
|
-
options: {}
|
|
24
|
+
options: {},
|
|
25
|
+
label: {}
|
|
14
26
|
},
|
|
15
27
|
emits: ["update:modelValue", "select"],
|
|
16
|
-
setup(__props, { emit: __emit }) {
|
|
28
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
17
29
|
const props = __props;
|
|
18
30
|
const emit = __emit;
|
|
19
31
|
const formattedOptions = computed(() => {
|
|
20
32
|
if (Array.isArray(props.options)) return Object.fromEntries(props.options.map((value) => [value, value]));
|
|
21
33
|
return props.options;
|
|
22
34
|
});
|
|
35
|
+
const entries = computed(() => Object.entries(formattedOptions.value));
|
|
23
36
|
const selectedLabel = computed(() => formattedOptions.value[props.modelValue]);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
37
|
+
const id = useId();
|
|
38
|
+
const listboxId = `${id}-listbox`;
|
|
39
|
+
function optionId(index) {
|
|
40
|
+
return `${id}-option-${index}`;
|
|
28
41
|
}
|
|
42
|
+
const combobox = ref();
|
|
43
|
+
const open = ref(false);
|
|
44
|
+
const activeIndex = ref(-1);
|
|
45
|
+
function openList(index) {
|
|
46
|
+
const selected = entries.value.findIndex(([value]) => value === props.modelValue);
|
|
47
|
+
activeIndex.value = index ?? Math.max(selected, 0);
|
|
48
|
+
open.value = true;
|
|
49
|
+
}
|
|
50
|
+
const typed = refAutoReset("", 500);
|
|
51
|
+
function isTypeaheadKey(event) {
|
|
52
|
+
if (event.ctrlKey || event.metaKey || event.altKey || event.key.length !== 1) return false;
|
|
53
|
+
return event.key !== " " || typed.value !== "";
|
|
54
|
+
}
|
|
55
|
+
function typeahead(char) {
|
|
56
|
+
const previous = typed.value;
|
|
57
|
+
typed.value = previous + char.toLowerCase();
|
|
58
|
+
const repeated = [...typed.value].every((c) => c === typed.value[0]);
|
|
59
|
+
const search = repeated ? typed.value.charAt(0) : typed.value;
|
|
60
|
+
const start = repeated ? activeIndex.value + 1 : Math.max(activeIndex.value, 0);
|
|
61
|
+
const count = entries.value.length;
|
|
62
|
+
for (let offset = 0; offset < count; offset++) {
|
|
63
|
+
const index = (start + offset) % count;
|
|
64
|
+
if (entries.value[index]?.[1].toLowerCase().startsWith(search)) {
|
|
65
|
+
activeIndex.value = index;
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function close() {
|
|
71
|
+
open.value = false;
|
|
72
|
+
}
|
|
73
|
+
function choose(index) {
|
|
74
|
+
const entry = entries.value[index];
|
|
75
|
+
if (entry) {
|
|
76
|
+
emit("update:modelValue", entry[0]);
|
|
77
|
+
emit("select", entry[0]);
|
|
78
|
+
}
|
|
79
|
+
close();
|
|
80
|
+
combobox.value?.focus();
|
|
81
|
+
}
|
|
82
|
+
function onKeydown(event) {
|
|
83
|
+
const last = entries.value.length - 1;
|
|
84
|
+
if (isTypeaheadKey(event)) {
|
|
85
|
+
event.preventDefault();
|
|
86
|
+
if (!open.value) openList();
|
|
87
|
+
typeahead(event.key);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (!open.value) {
|
|
91
|
+
if ([
|
|
92
|
+
"ArrowDown",
|
|
93
|
+
"ArrowUp",
|
|
94
|
+
"Enter",
|
|
95
|
+
" ",
|
|
96
|
+
"Home",
|
|
97
|
+
"End"
|
|
98
|
+
].includes(event.key)) {
|
|
99
|
+
event.preventDefault();
|
|
100
|
+
openList(event.key === "Home" ? 0 : event.key === "End" ? last : void 0);
|
|
101
|
+
}
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
switch (event.key) {
|
|
105
|
+
case "ArrowDown":
|
|
106
|
+
event.preventDefault();
|
|
107
|
+
activeIndex.value = Math.min(activeIndex.value + 1, last);
|
|
108
|
+
break;
|
|
109
|
+
case "ArrowUp":
|
|
110
|
+
event.preventDefault();
|
|
111
|
+
if (event.altKey) choose(activeIndex.value);
|
|
112
|
+
else activeIndex.value = Math.max(activeIndex.value - 1, 0);
|
|
113
|
+
break;
|
|
114
|
+
case "Home":
|
|
115
|
+
event.preventDefault();
|
|
116
|
+
activeIndex.value = 0;
|
|
117
|
+
break;
|
|
118
|
+
case "End":
|
|
119
|
+
event.preventDefault();
|
|
120
|
+
activeIndex.value = last;
|
|
121
|
+
break;
|
|
122
|
+
case "Enter":
|
|
123
|
+
case " ":
|
|
124
|
+
event.preventDefault();
|
|
125
|
+
choose(activeIndex.value);
|
|
126
|
+
break;
|
|
127
|
+
case "Escape":
|
|
128
|
+
event.preventDefault();
|
|
129
|
+
close();
|
|
130
|
+
break;
|
|
131
|
+
case "Tab": choose(activeIndex.value);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
__expose({ focus: () => combobox.value?.focus() });
|
|
29
135
|
return (_ctx, _cache) => {
|
|
30
136
|
return openBlock(), createBlock(unref(Dropdown), {
|
|
137
|
+
shown: open.value,
|
|
138
|
+
"onUpdate:shown": _cache[2] || (_cache[2] = ($event) => open.value = $event),
|
|
31
139
|
class: "poveste-base-select",
|
|
140
|
+
triggers: [],
|
|
141
|
+
"no-auto-focus": "",
|
|
32
142
|
"auto-size": "",
|
|
33
143
|
"auto-boundary-max-size": ""
|
|
34
144
|
}, {
|
|
35
|
-
popper: withCtx((
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
145
|
+
popper: withCtx(() => [createElementVNode("div", {
|
|
146
|
+
id: listboxId,
|
|
147
|
+
role: "listbox",
|
|
148
|
+
"aria-label": __props.label,
|
|
149
|
+
class: "flex flex-col bg-gray-50 dark:bg-gray-700"
|
|
150
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(entries.value, ([value, optionLabel], index) => {
|
|
151
|
+
return openBlock(), createElementBlock("div", {
|
|
152
|
+
id: optionId(index),
|
|
153
|
+
key: value,
|
|
154
|
+
role: "option",
|
|
155
|
+
"aria-selected": value === __props.modelValue,
|
|
156
|
+
class: normalizeClass(["px-2 py-1 cursor-pointer hover:bg-primary-100 dark:hover:bg-primary-700", {
|
|
157
|
+
"bg-primary-200 dark:bg-primary-800": value === __props.modelValue,
|
|
158
|
+
"outline outline-2 -outline-offset-2 outline-primary-500": index === activeIndex.value
|
|
159
|
+
}]),
|
|
160
|
+
onMousedown: _cache[1] || (_cache[1] = withModifiers(() => {}, ["prevent"])),
|
|
161
|
+
onMousemove: ($event) => activeIndex.value = index,
|
|
162
|
+
onClick: ($event) => choose(index)
|
|
163
|
+
}, [renderSlot(_ctx.$slots, "option", {
|
|
164
|
+
label: optionLabel,
|
|
46
165
|
value
|
|
47
|
-
}, () => [createTextVNode(toDisplayString(
|
|
48
|
-
}), 128))])]),
|
|
49
|
-
default: withCtx(() => [createElementVNode("div",
|
|
166
|
+
}, () => [createTextVNode(toDisplayString(optionLabel), 1)])], 42, _hoisted_4);
|
|
167
|
+
}), 128))], 8, _hoisted_3)]),
|
|
168
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
169
|
+
ref_key: "combobox",
|
|
170
|
+
ref: combobox,
|
|
171
|
+
role: "combobox",
|
|
172
|
+
tabindex: "0",
|
|
173
|
+
"aria-label": __props.label,
|
|
174
|
+
"aria-haspopup": "listbox",
|
|
175
|
+
"aria-expanded": open.value,
|
|
176
|
+
"aria-controls": open.value ? listboxId : void 0,
|
|
177
|
+
"aria-activedescendant": open.value && activeIndex.value >= 0 ? optionId(activeIndex.value) : void 0,
|
|
178
|
+
class: "cursor-pointer w-full outline-none focus-visible:border-primary-500 px-2 h-[27px] -my-1 border border-solid border-black/25 dark:border-white/25 hover:border-primary-500 dark:hover:border-primary-500 rounded-sm flex gap-2 items-center leading-normal",
|
|
179
|
+
onClick: _cache[0] || (_cache[0] = ($event) => open.value ? close() : openList()),
|
|
180
|
+
onKeydown
|
|
181
|
+
}, [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default", { label: selectedLabel.value }, () => [createTextVNode(toDisplayString(selectedLabel.value), 1)])]), createVNode(unref(Icon), {
|
|
50
182
|
icon: "carbon:chevron-sort",
|
|
51
183
|
class: "w-4 h-4 flex-none ml-auto"
|
|
52
|
-
})])]),
|
|
184
|
+
})], 40, _hoisted_1)]),
|
|
53
185
|
_: 3
|
|
54
|
-
});
|
|
186
|
+
}, 8, ["shown"]);
|
|
55
187
|
};
|
|
56
188
|
}
|
|
57
189
|
});
|
|
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import BaseSplitPane_vue_vue_type_script_setup_true_lang_default from "./BaseSplitPane.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/app/components/base/BaseSplitPane.vue
|
|
5
|
-
var BaseSplitPane_default = /*#__PURE__*/ _plugin_vue_export_helper_default(BaseSplitPane_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var BaseSplitPane_default = /*#__PURE__*/ _plugin_vue_export_helper_default(BaseSplitPane_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e5174855"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { BaseSplitPane_default as default };
|
|
@@ -60,7 +60,7 @@ var PromptSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
60
60
|
});
|
|
61
61
|
const { selectedIndex, selectNext, selectPrevious } = useSelection(formattedOptions);
|
|
62
62
|
function selectIndex(index) {
|
|
63
|
-
const result = formattedOptions.value[index]
|
|
63
|
+
const result = formattedOptions.value[index]?.value;
|
|
64
64
|
if (result) model.value = result;
|
|
65
65
|
}
|
|
66
66
|
return (_ctx, _cache) => {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { computed, createBlock, createCommentVNode, createVNode, defineComponent, normalizeClass, openBlock, resolveDirective, resolveDynamicComponent, unref,
|
|
1
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, normalizeClass, openBlock, resolveDirective, resolveDynamicComponent, unref, withDirectives } from "@poveste/vendors/vue";
|
|
2
2
|
import { Icon } from "@poveste/vendors/iconify";
|
|
3
3
|
import { HstCheckbox, HstJson, HstNumber, HstText } from "@poveste/controls";
|
|
4
4
|
//#region src/app/components/panel/ControlsComponentPropItem.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var _hoisted_1 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "flex items-end hover:bg-primary-100 dark:hover:bg-primary-800"
|
|
8
|
+
};
|
|
9
|
+
var _hoisted_2 = ["aria-label", "disabled"];
|
|
5
10
|
var ControlsComponentPropItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
6
11
|
__name: "ControlsComponentPropItem",
|
|
7
12
|
props: {
|
|
@@ -34,25 +39,26 @@ var ControlsComponentPropItem_vue_vue_type_script_setup_true_lang_default = /*@_
|
|
|
34
39
|
const canReset = computed(() => props.variant.state?._hPropState?.[props.component.index] && props.definition.name in props.variant.state._hPropState[props.component.index]);
|
|
35
40
|
return (_ctx, _cache) => {
|
|
36
41
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
37
|
-
return comp.value ? (openBlock(), createBlock(resolveDynamicComponent(comp.value), {
|
|
38
|
-
key: 0,
|
|
42
|
+
return comp.value ? (openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(), createBlock(resolveDynamicComponent(comp.value), {
|
|
39
43
|
modelValue: model.value,
|
|
40
|
-
"onUpdate:modelValue": _cache[
|
|
44
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
41
45
|
placeholder: model.value === void 0 ? __props.definition?.default : null,
|
|
42
|
-
class: "poveste-controls-component-prop-item",
|
|
46
|
+
class: "poveste-controls-component-prop-item grow min-w-0",
|
|
43
47
|
title: `${__props.definition.name}${canReset.value ? " *" : ""}`
|
|
44
|
-
},
|
|
45
|
-
actions: withCtx(() => [withDirectives(createVNode(unref(Icon), {
|
|
46
|
-
icon: "carbon:erase",
|
|
47
|
-
class: normalizeClass(["cursor-pointer w-4 h-4 hover:text-primary-500 dark:hover:text-primary-400 text-gray-900 dark:text-gray-100", [canReset.value ? "opacity-50 hover:opacity-100" : "opacity-25 pointer-events-none"]]),
|
|
48
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => reset(), ["stop"]))
|
|
49
|
-
}, null, 8, ["class"]), [[_directive_tooltip, "Remove override"]])]),
|
|
50
|
-
_: 1
|
|
51
|
-
}, 8, [
|
|
48
|
+
}, null, 8, [
|
|
52
49
|
"modelValue",
|
|
53
50
|
"placeholder",
|
|
54
51
|
"title"
|
|
55
|
-
]))
|
|
52
|
+
])), withDirectives((openBlock(), createElementBlock("button", {
|
|
53
|
+
type: "button",
|
|
54
|
+
"aria-label": `Remove override of ${__props.definition.name}`,
|
|
55
|
+
disabled: !canReset.value,
|
|
56
|
+
class: normalizeClass(["flex-none flex mr-2 mb-[10px] p-0 bg-transparent border-0 cursor-pointer text-gray-900 dark:text-gray-100 hover:text-primary-500 dark:hover:text-primary-400", [canReset.value ? "opacity-50 hover:opacity-100 focus-visible:opacity-100" : "opacity-25 pointer-events-none"]]),
|
|
57
|
+
onClick: _cache[1] || (_cache[1] = ($event) => reset())
|
|
58
|
+
}, [createVNode(unref(Icon), {
|
|
59
|
+
icon: "carbon:erase",
|
|
60
|
+
class: "w-4 h-4"
|
|
61
|
+
})], 10, _hoisted_2)), [[_directive_tooltip, "Remove override"]])])) : createCommentVNode("", true);
|
|
56
62
|
};
|
|
57
63
|
}
|
|
58
64
|
});
|
|
@@ -29,7 +29,7 @@ var PaneTabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
29
29
|
tab: ""
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
matched: !_ctx.$route.query
|
|
32
|
+
matched: !_ctx.$route.query["tab"]
|
|
33
33
|
}, {
|
|
34
34
|
default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" Controls ", -1)])]),
|
|
35
35
|
_: 1
|
|
@@ -42,7 +42,7 @@ var PaneTabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
42
42
|
tab: "docs"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
matched: _ctx.$route.query
|
|
45
|
+
matched: _ctx.$route.query["tab"] === "docs",
|
|
46
46
|
class: normalizeClass({ "opacity-70": !unref(renderedDoc) })
|
|
47
47
|
}, {
|
|
48
48
|
default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode(" Docs ", -1)])]),
|
|
@@ -60,7 +60,7 @@ var PaneTabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
60
60
|
tab: "events"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
matched: _ctx.$route.query
|
|
63
|
+
matched: _ctx.$route.query["tab"] === "events",
|
|
64
64
|
class: normalizeClass({ "opacity-70": !hasEvents.value })
|
|
65
65
|
}, {
|
|
66
66
|
default: withCtx(() => [_cache[5] || (_cache[5] = createTextVNode(" Events ", -1)), unref(eventsStore).unseen ? (openBlock(), createBlock(BaseTag_default, { key: 0 }, {
|
|
@@ -83,7 +83,7 @@ var PaneTabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
83
83
|
tab: ""
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
|
-
matched: !_ctx.$route.query
|
|
86
|
+
matched: !_ctx.$route.query["tab"]
|
|
87
87
|
}, {
|
|
88
88
|
default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" Controls ", -1)])]),
|
|
89
89
|
_: 1
|
|
@@ -96,7 +96,7 @@ var PaneTabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
96
96
|
tab: "docs"
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
matched: _ctx.$route.query
|
|
99
|
+
matched: _ctx.$route.query["tab"] === "docs",
|
|
100
100
|
class: normalizeClass({ "opacity-70": !unref(renderedDoc) })
|
|
101
101
|
}, {
|
|
102
102
|
default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Docs ", -1)])]),
|
|
@@ -114,7 +114,7 @@ var PaneTabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
114
114
|
tab: "events"
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
|
-
matched: _ctx.$route.query
|
|
117
|
+
matched: _ctx.$route.query["tab"] === "events",
|
|
118
118
|
class: normalizeClass({ "opacity-70": !hasEvents.value })
|
|
119
119
|
}, {
|
|
120
120
|
default: withCtx(() => [_cache[2] || (_cache[2] = createTextVNode(" Events ", -1)), unref(eventsStore).unseen ? (openBlock(), createBlock(BaseTag_default, { key: 0 }, {
|