@poveste/app 0.13.1 → 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.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/app.css +31 -31
- package/dist/bundled/components/HomeView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/app/AppLogo.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/bundled/components/app/Breadcrumb.js +1 -1
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/bundled/components/app/TopBar.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/bundled/components/app/TopBarChipItem.js +1 -1
- package/dist/bundled/components/base/BaseCheckbox.vue_vue_type_script_setup_true_lang.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 +18 -15
- 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/base/BaseSplitPane.vue_vue_type_script_setup_true_lang.js +6 -4
- package/dist/bundled/components/command/CommandPrompts.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/command/CommandPromptsModal.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/bundled/components/command/PromptSelect.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/bundled/components/command/PromptText.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 +94 -55
- package/dist/bundled/components/panel/StoryControls.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/panel/StoryDocs.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/bundled/components/panel/StoryEvent.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/bundled/components/panel/StoryEvents.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/bundled/components/panel/StorySidePanel.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/bundled/components/panel/StorySourceCode.js +1 -1
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js +8 -6
- 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 +16 -9
- package/dist/bundled/components/story/GenericMountStory.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/bundled/components/story/GenericRenderStory.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/bundled/components/story/StoryResponsivePreview.js +1 -1
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js +23 -8
- package/dist/bundled/components/story/StoryVariantGrid.js +1 -1
- package/dist/bundled/components/story/StoryVariantGrid.vue_vue_type_script_setup_true_lang.js +15 -10
- 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 +7 -3
- package/dist/bundled/components/story/StoryViewer.js +1 -1
- package/dist/bundled/components/story/StoryViewer.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js +17 -16
- 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/plugin.js +4 -3
- package/dist/bundled/sandbox.js +5 -4
- package/dist/bundled/stores/folder.js +1 -1
- package/dist/bundled/stores/story.js +2 -2
- package/dist/bundled/util/commands.js +21 -10
- package/dist/bundled/util/dark.js +1 -1
- package/dist/bundled/util/docs.js +2 -1
- package/dist/bundled/util/events.js +1 -1
- package/dist/bundled/util/grid-slots.js +2 -2
- package/dist/bundled/util/icons.generated.js +0 -1
- package/dist/bundled/util/keyboard.js +9 -14
- package/dist/bundled/util/mapping.js +3 -3
- package/dist/bundled/util/preview-settings.js +1 -1
- 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 +14 -18
- package/src/__tests__/render-tracker.spec.ts +38 -0
- package/src/app/App.vue +7 -4
- package/src/app/components/HomeView.vue +1 -1
- package/src/app/components/app/AppLogo.vue +6 -2
- package/src/app/components/app/Breadcrumb.vue +2 -1
- package/src/app/components/app/TopBar.vue +7 -2
- package/src/app/components/app/TopBarChipItem.vue +1 -1
- package/src/app/components/base/BaseCheckbox.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 +25 -18
- package/src/app/components/base/BaseSelect.vue +171 -15
- package/src/app/components/base/BaseSplitPane.vue +11 -6
- package/src/app/components/command/CommandPrompts.vue +1 -1
- package/src/app/components/command/CommandPromptsModal.vue +1 -0
- package/src/app/components/command/PromptSelect.vue +3 -2
- package/src/app/components/command/PromptText.vue +7 -3
- 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 +125 -68
- package/src/app/components/panel/StoryControls.vue +1 -1
- package/src/app/components/panel/StoryDocs.vue +3 -1
- package/src/app/components/panel/StoryEvent.vue +7 -2
- package/src/app/components/panel/StoryEvents.vue +4 -1
- package/src/app/components/panel/StorySidePanel.vue +3 -1
- package/src/app/components/panel/StorySourceCode.vue +12 -8
- package/src/app/components/search/SearchItemContent.vue +2 -1
- package/src/app/components/search/SearchPane.vue +16 -8
- package/src/app/components/story/GenericMountStory.vue +2 -1
- package/src/app/components/story/GenericRenderStory.vue +2 -1
- package/src/app/components/story/StoryResponsivePreview.vue +36 -7
- package/src/app/components/story/StoryVariantGrid.vue +33 -16
- 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 +10 -4
- package/src/app/components/story/StoryViewer.vue +3 -3
- package/src/app/components/toolbar/ToolbarBackground.vue +1 -1
- package/src/app/components/toolbar/ToolbarResponsiveSize.vue +23 -3
- 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/plugin.ts +7 -3
- package/src/app/sandbox.ts +9 -3
- package/src/app/stores/folder.ts +1 -1
- package/src/app/stores/story.ts +2 -2
- package/src/app/types.ts +6 -6
- package/src/app/util/commands.ts +27 -17
- package/src/app/util/dark.ts +1 -1
- package/src/app/util/docs.ts +2 -1
- package/src/app/util/env.ts +0 -1
- package/src/app/util/events.ts +6 -5
- package/src/app/util/grid-slots.ts +2 -2
- package/src/app/util/icons.generated.ts +1 -1
- package/src/app/util/keyboard.ts +10 -11
- package/src/app/util/mapping.ts +3 -3
- package/src/app/util/preview-settings.ts +1 -1
- package/src/app/util/render-tracker.ts +31 -0
- package/src/app/util/scroll.ts +5 -1
- package/src/app/util/state.ts +4 -4
- package/src/app/util/variant.ts +16 -3
- package/src/app/components/base/BaseCopyIcon.vue +0 -34
|
@@ -51,7 +51,7 @@ var App_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompon
|
|
|
51
51
|
tree$1.value = newTree;
|
|
52
52
|
});
|
|
53
53
|
const stories = computed(() => files$1.value.reduce((acc, file) => {
|
|
54
|
-
acc.push(file.story);
|
|
54
|
+
if (file.story) acc.push(file.story);
|
|
55
55
|
return acc;
|
|
56
56
|
}, []));
|
|
57
57
|
const storyStore = useStoryStore();
|
package/dist/bundled/app.css
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
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)) {
|
|
15
|
-
.bind-icon-color[data-v-
|
|
16
|
-
color: var(--
|
|
15
|
+
.bind-icon-color[data-v-d524f876] {
|
|
16
|
+
color: var(--v1c581d20);
|
|
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,23 +102,23 @@
|
|
|
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)) {
|
|
118
118
|
/* Cells are placed with `order`, so without this Tab and a screen reader walk
|
|
119
119
|
them in slot order — the order they were recycled in, not the screen's.
|
|
120
120
|
Chromium only for now; elsewhere the rule is ignored. */
|
|
121
|
-
.poveste-story-variant-grid-cells[data-v-
|
|
121
|
+
.poveste-story-variant-grid-cells[data-v-a753c25f] {
|
|
122
122
|
reading-flow: grid-order;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -133,8 +133,8 @@
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
136
|
-
.bind-icon-color[data-v-
|
|
137
|
-
color: var(--
|
|
136
|
+
.bind-icon-color[data-v-5e1183de] {
|
|
137
|
+
color: var(--v96d17610);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
@scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
|
|
@@ -14,7 +14,7 @@ var _hoisted_3 = {
|
|
|
14
14
|
var HomeView_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
15
15
|
__name: "HomeView",
|
|
16
16
|
setup(__props) {
|
|
17
|
-
const logoUrl = computed(() => povesteConfig.theme?.logo?.square ? customLogos
|
|
17
|
+
const logoUrl = computed(() => povesteConfig.theme?.logo?.square ? customLogos?.square ?? "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%20width='512'%20height='512'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='pv'%20x1='96'%20y1='416'%20x2='416'%20y2='96'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2324C56A'/%3e%3cstop%20offset='1'%20stop-color='%2317A6C6'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='16'%20y='16'%20width='480'%20height='480'%20rx='112'%20fill='url(%23pv)'/%3e%3crect%20x='140'%20y='142'%20width='232'%20height='44'%20rx='16'%20fill='%23fff'/%3e%3crect%20x='151'%20y='217'%20width='88'%20height='146'%20rx='9'%20stroke='%23fff'%20stroke-width='22'/%3e%3crect%20x='172'%20y='244'%20width='30'%20height='92'%20rx='13'%20fill='%23fff'/%3e%3crect%20x='262'%20y='206'%20width='110'%20height='168'%20rx='20'%20fill='%23fff'/%3e%3crect%20x='284'%20y='226'%20width='66'%20height='58'%20rx='13'%20fill='url(%23pv)'/%3e%3c/svg%3e" : poveste_default);
|
|
18
18
|
const storyStore = useStoryStore();
|
|
19
19
|
const stats = computed(() => {
|
|
20
20
|
let storyCount = 0;
|
|
@@ -9,8 +9,8 @@ var AppLogo_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
9
9
|
__name: "AppLogo",
|
|
10
10
|
setup(__props) {
|
|
11
11
|
const logoUrl = computed(() => {
|
|
12
|
-
if (isDark.value) return povesteConfig.theme.logo?.dark ? customLogos
|
|
13
|
-
return povesteConfig.theme.logo?.light ? customLogos
|
|
12
|
+
if (isDark.value) return povesteConfig.theme.logo?.dark ? customLogos?.dark ?? "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxODcwIDUxMiIgZmlsbD0ibm9uZSI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InB2dyIgeDE9Ijk2IiB5MT0iNDE2IiB4Mj0iNDE2IiB5Mj0iOTYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjMjRDNTZBIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE3QTZDNiIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+CiAgPHJlY3QgeD0iMTYiIHk9IjE2IiB3aWR0aD0iNDgwIiBoZWlnaHQ9IjQ4MCIgcng9IjExMiIgZmlsbD0idXJsKCNwdncpIi8+CiAgPHJlY3QgeD0iMTQwIiB5PSIxNDIiIHdpZHRoPSIyMzIiIGhlaWdodD0iNDQiIHJ4PSIxNiIgZmlsbD0iI2ZmZiIvPgogIDxyZWN0IHg9IjE1MSIgeT0iMjE3IiB3aWR0aD0iODgiIGhlaWdodD0iMTQ2IiByeD0iOSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjIyIi8+CiAgPHJlY3QgeD0iMTcyIiB5PSIyNDQiIHdpZHRoPSIzMCIgaGVpZ2h0PSI5MiIgcng9IjEzIiBmaWxsPSIjZmZmIi8+CiAgPHJlY3QgeD0iMjYyIiB5PSIyMDYiIHdpZHRoPSIxMTAiIGhlaWdodD0iMTY4IiByeD0iMjAiIGZpbGw9IiNmZmYiLz4KICA8cmVjdCB4PSIyODQiIHk9IjIyNiIgd2lkdGg9IjY2IiBoZWlnaHQ9IjU4IiByeD0iMTMiIGZpbGw9InVybCgjcHZ3KSIvPgogIDx0ZXh0IHg9IjY3NiIgeT0iMjU2IiBkb21pbmFudC1iYXNlbGluZT0iY2VudHJhbCIgZm9udC1mYW1pbHk9InVpLXNhbnMtc2VyaWYsIHN5c3RlbS11aSwgLWFwcGxlLXN5c3RlbSwgJ1NlZ29lIFVJJywgUm9ib3RvLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjMyMCIgZm9udC13ZWlnaHQ9IjQwMCIgbGV0dGVyLXNwYWNpbmc9Ii00IiBmaWxsPSIjZjhmYWZjIj5Qb3Zlc3RlPC90ZXh0Pgo8L3N2Zz4K" : poveste_text_dark_default;
|
|
13
|
+
return povesteConfig.theme.logo?.light ? customLogos?.light ?? "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxODcwIDUxMiIgZmlsbD0ibm9uZSI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InB2dyIgeDE9Ijk2IiB5MT0iNDE2IiB4Mj0iNDE2IiB5Mj0iOTYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjMjRDNTZBIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE3QTZDNiIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+CiAgPHJlY3QgeD0iMTYiIHk9IjE2IiB3aWR0aD0iNDgwIiBoZWlnaHQ9IjQ4MCIgcng9IjExMiIgZmlsbD0idXJsKCNwdncpIi8+CiAgPHJlY3QgeD0iMTQwIiB5PSIxNDIiIHdpZHRoPSIyMzIiIGhlaWdodD0iNDQiIHJ4PSIxNiIgZmlsbD0iI2ZmZiIvPgogIDxyZWN0IHg9IjE1MSIgeT0iMjE3IiB3aWR0aD0iODgiIGhlaWdodD0iMTQ2IiByeD0iOSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjIyIi8+CiAgPHJlY3QgeD0iMTcyIiB5PSIyNDQiIHdpZHRoPSIzMCIgaGVpZ2h0PSI5MiIgcng9IjEzIiBmaWxsPSIjZmZmIi8+CiAgPHJlY3QgeD0iMjYyIiB5PSIyMDYiIHdpZHRoPSIxMTAiIGhlaWdodD0iMTY4IiByeD0iMjAiIGZpbGw9IiNmZmYiLz4KICA8cmVjdCB4PSIyODQiIHk9IjIyNiIgd2lkdGg9IjY2IiBoZWlnaHQ9IjU4IiByeD0iMTMiIGZpbGw9InVybCgjcHZ3KSIvPgogIDx0ZXh0IHg9IjY3NiIgeT0iMjU2IiBkb21pbmFudC1iYXNlbGluZT0iY2VudHJhbCIgZm9udC1mYW1pbHk9InVpLXNhbnMtc2VyaWYsIHN5c3RlbS11aSwgLWFwcGxlLXN5c3RlbSwgJ1NlZ29lIFVJJywgUm9ib3RvLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjMyMCIgZm9udC13ZWlnaHQ9IjQwMCIgbGV0dGVyLXNwYWNpbmc9Ii00IiBmaWxsPSIjMWUyOTNiIj5Qb3Zlc3RlPC90ZXh0Pgo8L3N2Zz4K" : poveste_text_default;
|
|
14
14
|
});
|
|
15
15
|
const altText = computed(() => `${povesteConfig.theme.title} logo`);
|
|
16
16
|
return (_ctx, _cache) => {
|
|
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import Breadcrumb_vue_vue_type_script_setup_true_lang_default from "./Breadcrumb.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/app/components/app/Breadcrumb.vue
|
|
5
|
-
var Breadcrumb_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Breadcrumb_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var Breadcrumb_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Breadcrumb_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-d524f876"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Breadcrumb_default as default };
|
|
@@ -14,11 +14,11 @@ var Breadcrumb_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
14
14
|
stories: {}
|
|
15
15
|
},
|
|
16
16
|
setup(__props) {
|
|
17
|
-
useCssVars((_ctx) => ({ "
|
|
17
|
+
useCssVars((_ctx) => ({ "v1c581d20": story.value?.iconColor }));
|
|
18
18
|
const storyStore = useStoryStore();
|
|
19
19
|
const story = computed(() => storyStore.currentStory);
|
|
20
20
|
const folders = computed(() => {
|
|
21
|
-
return story.value
|
|
21
|
+
return story.value?.file?.path.slice(0, -1) ?? [];
|
|
22
22
|
});
|
|
23
23
|
const isMenuOpened = ref(false);
|
|
24
24
|
function openMenu() {
|
|
@@ -7,7 +7,7 @@ import ToolbarNewTab_default from "../toolbar/ToolbarNewTab.js";
|
|
|
7
7
|
import ToolbarResponsiveSize_default from "../toolbar/ToolbarResponsiveSize.js";
|
|
8
8
|
import ToolbarTextDirection_default from "../toolbar/ToolbarTextDirection.js";
|
|
9
9
|
import ToolbarTitle_default from "../toolbar/ToolbarTitle.js";
|
|
10
|
-
import { createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, openBlock, unref, withCtx } from "@poveste/vendors/vue";
|
|
10
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, openBlock, unref, withCtx } from "@poveste/vendors/vue";
|
|
11
11
|
//#region src/app/components/app/TopBar.vue?vue&type=script&setup=true&lang.ts
|
|
12
12
|
var _hoisted_1 = { class: "poveste-top-bar flex-none grid grid-cols-[1fr_auto_1fr] items-center h-14 px-4 gap-3" };
|
|
13
13
|
var _hoisted_2 = { key: 1 };
|
|
@@ -19,6 +19,7 @@ var TopBar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
19
19
|
},
|
|
20
20
|
setup(__props) {
|
|
21
21
|
const storyStore = useStoryStore();
|
|
22
|
+
const editableFile = computed(() => storyStore.currentStory?.file?.filePath);
|
|
22
23
|
return (_ctx, _cache) => {
|
|
23
24
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
24
25
|
createVNode(AppActions_default, {
|
|
@@ -49,9 +50,9 @@ var TopBar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
49
50
|
variant: unref(storyStore).currentVariant,
|
|
50
51
|
story: unref(storyStore).currentStory
|
|
51
52
|
}, null, 8, ["variant", "story"])) : createCommentVNode("", true),
|
|
52
|
-
_ctx.__POVESTE_DEV__ ? (openBlock(), createBlock(DevOnlyToolbarOpenInEditor_default, {
|
|
53
|
+
_ctx.__POVESTE_DEV__ && editableFile.value ? (openBlock(), createBlock(DevOnlyToolbarOpenInEditor_default, {
|
|
53
54
|
key: 2,
|
|
54
|
-
file:
|
|
55
|
+
file: editableFile.value,
|
|
55
56
|
tooltip: "Edit story in editor"
|
|
56
57
|
}, null, 8, ["file"])) : createCommentVNode("", true)
|
|
57
58
|
]),
|
|
@@ -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
|
}
|
|
@@ -29,7 +29,7 @@ var BaseCheckbox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
29
29
|
const progress = computed(() => props.modelValue ? 1 : 0);
|
|
30
30
|
const dashoffset = computed(() => (1 - progress.value) * dasharray.value);
|
|
31
31
|
watch(path, () => {
|
|
32
|
-
dasharray.value = path.value
|
|
32
|
+
dasharray.value = path.value?.getTotalLength?.() ?? 21.21;
|
|
33
33
|
});
|
|
34
34
|
return (_ctx, _cache) => {
|
|
35
35
|
return openBlock(), createElementBlock("div", {
|
|
@@ -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,34 +39,37 @@ 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, (
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
42
|
+
useResizeObserver(el, ([entry]) => {
|
|
43
|
+
const element = el.value;
|
|
44
|
+
if (!element || !entry) return;
|
|
45
|
+
const width = entry.contentRect.width;
|
|
46
|
+
if (!children.value.has(element)) children.value.set(element, state);
|
|
45
47
|
state.width = width;
|
|
46
48
|
});
|
|
47
49
|
onBeforeUnmount(() => {
|
|
48
|
-
|
|
50
|
+
const element = el.value;
|
|
51
|
+
if (element) children.value.delete(element);
|
|
49
52
|
});
|
|
50
53
|
const visible = computed(() => visibleChildrenCount.value > state.index);
|
|
51
54
|
return () => h("div", {
|
|
52
55
|
ref: el,
|
|
53
56
|
style: { visibility: visible.value ? "visible" : "hidden" }
|
|
54
|
-
}, slots
|
|
57
|
+
}, slots["default"]?.());
|
|
55
58
|
}
|
|
56
59
|
};
|
|
57
60
|
/**
|
|
58
61
|
* Wraps each child with a <ChildWrapper>
|
|
59
62
|
*/
|
|
60
|
-
function ChildrenRender(
|
|
61
|
-
const
|
|
62
|
-
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])) : [];
|
|
63
66
|
}
|
|
64
67
|
/**
|
|
65
68
|
* Only renders a part of a children list
|
|
66
69
|
*/
|
|
67
70
|
function ChildrenSlice(props, { slots }) {
|
|
68
|
-
const
|
|
69
|
-
return
|
|
71
|
+
const children = slots["default"]?.()[0]?.children;
|
|
72
|
+
return Array.isArray(children) ? children.slice(props.start, props.end) : [];
|
|
70
73
|
}
|
|
71
74
|
return (_ctx, _cache) => {
|
|
72
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 };
|
|
@@ -111,12 +111,12 @@ var BaseSplitPane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
111
111
|
});
|
|
112
112
|
const rightStyle = computed(() => {
|
|
113
113
|
if (!hasBothPanes.value) return { [axis.value]: "100%" };
|
|
114
|
-
return { [axis.value]: props.fixed ?
|
|
114
|
+
return { [axis.value]: props.fixed ? void 0 : `${100 - boundSplit.value}%` };
|
|
115
115
|
});
|
|
116
116
|
const dragging = ref(false);
|
|
117
117
|
let startPosition = 0;
|
|
118
118
|
let startSplit = 0;
|
|
119
|
-
const el = ref(
|
|
119
|
+
const el = ref();
|
|
120
120
|
function dragStart(e) {
|
|
121
121
|
dragging.value = true;
|
|
122
122
|
startPosition = props.orientation === "landscape" ? e.pageX : e.pageY;
|
|
@@ -126,14 +126,16 @@ var BaseSplitPane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
126
126
|
}
|
|
127
127
|
function dragMove(e) {
|
|
128
128
|
if (dragging.value) {
|
|
129
|
+
const pane = el.value;
|
|
130
|
+
if (!pane) return;
|
|
129
131
|
let position;
|
|
130
132
|
let totalSize;
|
|
131
133
|
if (props.orientation === "landscape") {
|
|
132
134
|
position = e.pageX;
|
|
133
|
-
totalSize =
|
|
135
|
+
totalSize = pane.offsetWidth;
|
|
134
136
|
} else {
|
|
135
137
|
position = e.pageY;
|
|
136
|
-
totalSize =
|
|
138
|
+
totalSize = pane.offsetHeight;
|
|
137
139
|
}
|
|
138
140
|
const dPosition = position - startPosition;
|
|
139
141
|
if (props.fixed) currentSplit.value = startSplit + dPosition;
|
package/dist/bundled/components/command/CommandPrompts.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -19,7 +19,7 @@ var CommandPrompts_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
19
19
|
select: PromptSelect_default
|
|
20
20
|
};
|
|
21
21
|
const answers = reactive({});
|
|
22
|
-
for (const prompt of props.command.prompts) {
|
|
22
|
+
for (const prompt of props.command.prompts ?? []) {
|
|
23
23
|
let defaultValue;
|
|
24
24
|
if (typeof prompt.defaultValue === "function") defaultValue = prompt.defaultValue(answers);
|
|
25
25
|
else defaultValue = prompt.defaultValue;
|
package/dist/bundled/components/command/CommandPromptsModal.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCommandStore } from "../../stores/command.js";
|
|
2
|
-
import { createCommentVNode, createElementBlock, createElementVNode,
|
|
2
|
+
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineAsyncComponent, defineComponent, openBlock, unref } from "@poveste/vendors/vue";
|
|
3
3
|
//#region src/app/components/command/CommandPromptsModal.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var _hoisted_1 = {
|
|
5
5
|
key: 0,
|
|
@@ -24,10 +24,11 @@ var CommandPromptsModal_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
24
24
|
return __props.shown ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", {
|
|
25
25
|
class: "absolute inset-0",
|
|
26
26
|
onClick: _cache[0] || (_cache[0] = ($event) => close())
|
|
27
|
-
}), createElementVNode("div", _hoisted_2, [
|
|
27
|
+
}), createElementVNode("div", _hoisted_2, [unref(commandStore).selectedCommand ? (openBlock(), createBlock(unref(CommandPrompts), {
|
|
28
|
+
key: 0,
|
|
28
29
|
command: unref(commandStore).selectedCommand,
|
|
29
30
|
onClose: _cache[1] || (_cache[1] = ($event) => close())
|
|
30
|
-
}, null, 8, ["command"])])])) : createCommentVNode("", true);
|
|
31
|
+
}, null, 8, ["command"])) : createCommentVNode("", true)])])) : createCommentVNode("", true);
|
|
31
32
|
};
|
|
32
33
|
}
|
|
33
34
|
});
|
|
@@ -27,7 +27,7 @@ var PromptSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
27
27
|
const props = __props;
|
|
28
28
|
const emit = __emit;
|
|
29
29
|
const model = computed({
|
|
30
|
-
get: () => props.modelValue,
|
|
30
|
+
get: () => props.modelValue ?? "",
|
|
31
31
|
set: (value) => {
|
|
32
32
|
emit("update:modelValue", value);
|
|
33
33
|
emit("next");
|
|
@@ -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) => {
|