@scalar/sidebar 0.12.10 → 0.12.12
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/_virtual/_plugin-vue_export-helper.js +1 -2
- package/dist/components/HttpMethod.vue.js +1 -2
- package/dist/components/HttpMethod.vue.js.map +1 -1
- package/dist/components/HttpMethod.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/ScalarSidebar.vue.js +1 -2
- package/dist/components/ScalarSidebar.vue.js.map +1 -1
- package/dist/components/ScalarSidebar.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/ScalarSidebar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/SidebarHttpBadge.vue.js +2 -3
- package/dist/components/SidebarHttpBadge.vue.js.map +1 -1
- package/dist/components/SidebarHttpBadge.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/SidebarHttpBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/SidebarItem.vue.js +1 -2
- package/dist/components/SidebarItem.vue.js.map +1 -1
- package/dist/components/SidebarItem.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/components/SidebarItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/SidebarItemDecorator.vue.js +1 -2
- package/dist/components/SidebarItemLabel.vue.js +1 -2
- package/dist/components/SidebarItemLabel.vue.js.map +1 -1
- package/dist/components/SidebarItemLabel.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/helpers/create-sidebar-state.js +1 -2
- package/dist/helpers/filter-items.js +1 -2
- package/dist/helpers/generate-reverse-index.js +1 -2
- package/dist/helpers/get-child-entry.js +1 -2
- package/dist/helpers/has-children.js +1 -2
- package/dist/helpers/is-sidebar-folder.js +1 -2
- package/dist/helpers/scroll-sidebar-to-top.js +1 -2
- package/dist/hooks/use-draggable.js +1 -2
- package/dist/index.js +4 -4
- package/dist/style.css +30 -22
- package/package.json +15 -15
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// \0plugin-vue:export-helper
|
|
2
2
|
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
3
3
|
const target = sfc.__vccOpts || sfc;
|
|
4
4
|
for (const [key, val] of props) target[key] = val;
|
|
5
5
|
return target;
|
|
6
6
|
};
|
|
7
|
-
//#endregion
|
|
8
7
|
export { _plugin_vue_export_helper_default as default };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import HttpMethod_vue_vue_type_script_setup_true_lang_default from "./HttpMethod.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
|
|
2
|
+
// src/components/HttpMethod.vue
|
|
3
3
|
var HttpMethod_default = HttpMethod_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { HttpMethod_default as default };
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=HttpMethod.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpMethod.vue.js","names":[
|
|
1
|
+
{"version":3,"file":"HttpMethod.vue.js","names":[],"sources":[],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed, createBlock, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
|
|
2
2
|
import { getHttpMethodInfo } from "@scalar/helpers/http/http-info";
|
|
3
3
|
import { isHttpMethod } from "@scalar/helpers/http/is-http-method";
|
|
4
|
-
|
|
4
|
+
// src/components/HttpMethod.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var HttpMethod_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
6
6
|
__name: "HttpMethod",
|
|
7
7
|
props: {
|
|
@@ -31,7 +31,6 @@ var HttpMethod_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
//#endregion
|
|
35
34
|
export { HttpMethod_vue_vue_type_script_setup_true_lang_default as default };
|
|
36
35
|
|
|
37
36
|
//# sourceMappingURL=HttpMethod.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import ScalarSidebar_vue_vue_type_script_setup_true_lang_default from "./ScalarSidebar.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
|
|
2
|
+
// src/components/ScalarSidebar.vue
|
|
3
3
|
var ScalarSidebar_default = ScalarSidebar_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { ScalarSidebar_default as default };
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=ScalarSidebar.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSidebar.vue.js","names":[
|
|
1
|
+
{"version":3,"file":"ScalarSidebar.vue.js","names":[],"sources":[],"mappings":""}
|
|
@@ -2,7 +2,7 @@ import { filterItems } from "../helpers/filter-items.js";
|
|
|
2
2
|
import SidebarItem_default from "./SidebarItem.vue.js";
|
|
3
3
|
import { Fragment, createBlock, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeProps, normalizeStyle, openBlock, renderList, renderSlot, unref, useSlots, withCtx } from "vue";
|
|
4
4
|
import { ScalarSidebar, ScalarSidebarItems } from "@scalar/components/sidebar";
|
|
5
|
-
|
|
5
|
+
// src/components/ScalarSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var ScalarSidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
7
7
|
__name: "ScalarSidebar",
|
|
8
8
|
props: {
|
|
@@ -89,7 +89,6 @@ var ScalarSidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
//#endregion
|
|
93
92
|
export { ScalarSidebar_vue_vue_type_script_setup_true_lang_default as default };
|
|
94
93
|
|
|
95
94
|
//# sourceMappingURL=ScalarSidebar.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSidebar.vue_vue_type_script_setup_true_lang.js","names":["_useSlots","_openBlock","_createBlock","_unref","_normalizeStyle","_withCtx","_renderSlot","_createVNode","_createElementBlock","_Fragment","_renderList","SidebarItem","
|
|
1
|
+
{"version":3,"file":"ScalarSidebar.vue_vue_type_script_setup_true_lang.js","names":["_useSlots","_openBlock","_createBlock","_unref","_normalizeStyle","_withCtx","_renderSlot","_createVNode","_createElementBlock","_Fragment","_renderList","SidebarItem","_mergeProps","_createElementVNode"],"sources":["../../src/components/ScalarSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSidebar, ScalarSidebarItems } from '@scalar/components/sidebar'\n\nimport { filterItems } from '@/helpers/filter-items'\nimport type {\n DraggingItem,\n HoveredItem,\n UseDraggableOptions,\n} from '@/hooks/use-draggable'\nimport type { Item, Layout, SidebarOptions } from '@/types'\n\nimport SidebarItem from './SidebarItem.vue'\n\nconst {\n layout,\n items,\n indent = 20,\n getHref,\n} = defineProps<{\n /**\n * Layout type for the sidebar.\n * Determines whether the sidebar should behave in 'client' or 'reference' mode.\n */\n layout: Layout\n /**\n * List of items to render in the sidebar.\n */\n items: Item[]\n /**\n * Function to determine whether a given item (by id) is currently selected.\n */\n isSelected: (id: string) => boolean\n /**\n * Function to determine whether a given item (by id) is currently expanded (open to show children).\n */\n isExpanded: (id: string) => boolean\n /**\n * Sidebar configuration options.\n * - operationTitleSource: sets whether operations show their path or summary as the display title.\n */\n options?: SidebarOptions\n /**\n * The indentation in pixels to apply to nested items/groups in the sidebar.\n */\n indent?: number\n /**\n * Returns the URL for a sidebar item.\n *\n * When provided (and it returns a value) items render as anchor tags\n * instead of buttons, so search engines can crawl the navigation.\n */\n getHref?: (item: Item) => string | undefined\n /**\n * Prevents this item from being dragged.\n *\n * @default true\n */\n isDraggable?: UseDraggableOptions['isDraggable']\n /**\n * Prevents this item from being hovered and dropped into. Can be either a function or a boolean.\n *\n * @default true\n */\n isDroppable?: UseDraggableOptions['isDroppable']\n}>()\n\nconst emit = defineEmits<{\n /**\n * Emitted when the user reorders sidebar items via drag-and-drop.\n * @param draggingItem - The item being dragged.\n * @param hoveredItem - The item currently being hovered over.\n */\n (e: 'reorder', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n\n /**\n * Emitted when a sidebar item is selected.\n * @param id - The id of the selected item.\n */\n (e: 'selectItem', id: string): void\n\n /**\n * Emitted when the group is toggled.\n * @param id - The id of the group.\n */\n (e: 'toggleGroup', id: string): void\n}>()\n\nconst slots = defineSlots<{\n /** Overrides the main items list */\n default?(): unknown\n /** Adds an optional decorator for each item like an edit menu */\n decorator?(props: { item: Item }): unknown\n /** Places content at the top of the sidebar outside of the items list */\n header?(): unknown\n /** Places content between the header and the items list */\n spacer?(): unknown\n /** Places content at the bottom of the sidebar outside of the items list */\n footer?(): unknown\n /** Places content before the first item in the items list */\n before?(): unknown\n /** Places content when an item is empty */\n empty?(props: { item: Item }): unknown\n /** Places content when an item is empty */\n icon?(props: { item: Item; open: boolean }): unknown\n}>()\n\n/**\n * Handle drag and drop reordering of sidebar items.\n * Emit the reorder event to the parent component for handling.\n */\nconst handleDragEnd = (\n draggingItem: DraggingItem,\n hoveredItem: HoveredItem,\n) => {\n emit('reorder', draggingItem, hoveredItem)\n}\n</script>\n<template>\n <ScalarSidebar\n class=\"flex min-h-0 flex-col\"\n :style=\"{ '--scalar-sidebar-indent': indent + 'px' }\">\n <slot name=\"header\" />\n <slot>\n <ScalarSidebarItems class=\"custom-scroll\">\n <!-- First item -->\n <slot name=\"before\" />\n <SidebarItem\n v-for=\"item in filterItems(layout, items)\"\n :key=\"item.id\"\n :getHref=\"getHref\"\n :isDraggable=\"isDraggable ?? layout === 'client'\"\n :isDroppable=\"isDroppable\"\n :isExpanded=\"isExpanded\"\n :isSelected=\"isSelected\"\n :item=\"item\"\n :layout=\"layout\"\n :options=\"options\"\n @onDragEnd=\"handleDragEnd\"\n @selectItem=\"(id) => emit('selectItem', id)\"\n @toggleGroup=\"(id) => emit('toggleGroup', id)\">\n <template\n v-if=\"slots.decorator\"\n #decorator=\"props\">\n <slot\n name=\"decorator\"\n v-bind=\"props\" />\n </template>\n <template\n v-if=\"slots.empty\"\n #empty=\"props\">\n <slot\n name=\"empty\"\n v-bind=\"props\" />\n </template>\n <template\n v-if=\"slots.icon\"\n #icon=\"props\">\n <slot\n name=\"icon\"\n v-bind=\"props\" />\n </template>\n </SidebarItem>\n </ScalarSidebarItems>\n <!-- Spacer -->\n <slot name=\"spacer\">\n <div class=\"flex-1\"></div>\n </slot>\n </slot>\n <slot name=\"footer\" />\n </ScalarSidebar>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAkEA,MAAM,OAAO;EAqBb,MAAM,QAAQA,SAAA;;;;;EAuBd,MAAM,iBACJ,cACA,gBACG;GACH,KAAK,WAAW,cAAc,WAAW;EAC3C;;GAGE,OAAAC,UAAA,GAAAC,YAmDgBC,MAAA,aAAA,GAAA;IAlDd,OAAM;IACL,OAAKC,eAAA,EAAA,2BAA+B,QAAA,SAAM,KAAA,CAAA;;IAC3C,SAAAC,cAAsB;KAAtBC,WAAsB,KAAA,QAAA,QAAA;KACtBA,WA6CO,KAAA,QAAA,WAAA,CAAA,SAAA,CA5CLC,YAuCqBJ,MAAA,kBAAA,GAAA,EAvCD,OAAM,gBAAe,GAAA;MAEvC,SAAAE,cAAsB,CAAtBC,WAAsB,KAAA,QAAA,QAAA,IACtBL,UAAA,IAAA,GAAAO,mBAmCcC,UAAA,MAAAC,WAlCGP,MAAA,WAAA,CAAW,CAAC,QAAA,QAAQ,QAAA,KAAK,IAAjC,SAAI;OADb,OAAAF,UAAA,GAAAC,YAmCcS,qBAAA;QAjCX,KAAK,KAAK;QACV,SAAS,QAAA;QACT,aAAa,QAAA,eAAe,QAAA,WAAM;QAClC,aAAa,QAAA;QACb,YAAY,QAAA;QACZ,YAAY,QAAA;QACN;QACN,QAAQ,QAAA;QACR,SAAS,QAAA;QACT,aAAW;QACX,cAAU,OAAA,OAAA,OAAA,MAAG,OAAO,KAAI,cAAe,EAAE;QACzC,eAAW,OAAA,OAAA,OAAA,MAAG,OAAO,KAAI,eAAgB,EAAE;;QAEpC,MAAM,Y;SACX,MAAA;SACD,IAAAN,SADY,UAAK,CACjBC,WAEmB,KAAA,QAAA,aAFnBM,WAEmB,EAAA,SAAA,KAAA,GAAT,KAAK,CAAA,C;;;QAGT,MAAM,Q;SACX,MAAA;SACD,IAAAP,SADQ,UAAK,CACbC,WAEmB,KAAA,QAAA,SAFnBM,WAEmB,EAAA,SAAA,KAAA,GAAT,KAAK,CAAA,C;;;QAGT,MAAM,O;SACX,MAAA;SACD,IAAAP,SADO,UAAK,CACZC,WAEmB,KAAA,QAAA,QAFnBM,WAEmB,EAAA,SAAA,KAAA,GAAT,KAAK,CAAA,C;;;;;;;;;;;;;;;K,IAKrBN,WAEO,KAAA,QAAA,UAAA,CAAA,SAAA,CADL,OAAA,OAAA,OAAA,KAAAO,mBAA0B,OAAA,EAArB,OAAM,SAAQ,GAAA,MAAA,EAAA,E;KAGvBP,WAAsB,KAAA,QAAA,QAAA"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import _plugin_vue_export_helper_default from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
1
|
import SidebarHttpBadge_vue_vue_type_script_setup_true_lang_default from "./SidebarHttpBadge.vue_vue_type_script_setup_true_lang.js";
|
|
3
2
|
/* empty css */
|
|
4
|
-
|
|
3
|
+
import _plugin_vue_export_helper_default from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
// src/components/SidebarHttpBadge.vue
|
|
5
5
|
var SidebarHttpBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(SidebarHttpBadge_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-5edae08d"]]);
|
|
6
|
-
//#endregion
|
|
7
6
|
export { SidebarHttpBadge_default as default };
|
|
8
7
|
|
|
9
8
|
//# sourceMappingURL=SidebarHttpBadge.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarHttpBadge.vue.js","names":[
|
|
1
|
+
{"version":3,"file":"SidebarHttpBadge.vue.js","names":[],"sources":[],"mappings":""}
|
|
@@ -2,7 +2,7 @@ import HttpMethod_default from "./HttpMethod.vue.js";
|
|
|
2
2
|
import { createBlock, createCommentVNode, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
3
3
|
import { getHttpMethodInfo } from "@scalar/helpers/http/http-info";
|
|
4
4
|
import { ScalarIconWebhooksLogo } from "@scalar/icons";
|
|
5
|
-
|
|
5
|
+
// src/components/SidebarHttpBadge.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var _hoisted_1 = { class: "sr-only" };
|
|
7
7
|
var SidebarHttpBadge_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
8
8
|
__name: "SidebarHttpBadge",
|
|
@@ -34,7 +34,6 @@ var SidebarHttpBadge_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
//#endregion
|
|
38
37
|
export { SidebarHttpBadge_vue_vue_type_script_setup_true_lang_default as default };
|
|
39
38
|
|
|
40
39
|
//# sourceMappingURL=SidebarHttpBadge.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarHttpBadge.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","HttpMethod","_normalizeClass","_withCtx","_createElementVNode","_toDisplayString","_renderSlot","_unref","_normalizeStyle"
|
|
1
|
+
{"version":3,"file":"SidebarHttpBadge.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","HttpMethod","_normalizeClass","_withCtx","_createElementVNode","_toDisplayString","_renderSlot","_unref","_normalizeStyle"],"sources":["../../src/components/SidebarHttpBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getHttpMethodInfo } from '@scalar/helpers/http/http-info'\nimport { ScalarIconWebhooksLogo } from '@scalar/icons'\n\nimport HttpMethod from './HttpMethod.vue'\n\ndefineProps<{\n method: string\n active?: boolean\n label?: string\n webhook?: boolean\n}>()\n</script>\n<template>\n <HttpMethod\n :class=\"[\n 'sidebar-heading-type',\n `sidebar-heading-type--${method.toLowerCase()}`,\n { 'sidebar-heading-type-active': active },\n ]\"\n :method=\"method\"\n property=\"--method-color\"\n short>\n <span class=\"sr-only\">{{ label ?? 'HTTP Method' }}: </span>\n <slot>\n <ScalarIconWebhooksLogo\n v-if=\"webhook\"\n :style=\"{\n color: getHttpMethodInfo(method).colorVar,\n }\"\n weight=\"bold\" />\n </slot>\n </HttpMethod>\n</template>\n\n<style scoped>\n.sidebar-heading-type {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n overflow: hidden;\n line-height: 14px;\n flex-shrink: 0;\n color: var(--method-color, var(--scalar-color-1));\n font-size: 10px;\n font-weight: var(--scalar-bold);\n font-family: var(--scalar-font-code);\n white-space: nowrap;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;GAcE,OAAAA,UAAA,GAAAC,YAkBaC,oBAAA;IAjBV,OAAKC,eAAA;;KAAiE,yBAAA,QAAA,OAAO,YAAW;KAA6C,EAAA,+BAAA,QAAA,OAAM;;IAK3I,QAAQ,QAAA;IACT,UAAS;IACT,OAAA;;IACA,SAAAC,cAAgE,CAAhEC,mBAAgE,QAAhE,YAAgEC,gBAAvC,QAAA,SAAK,aAAA,IAAoB,SAAO,CAAA,GACzDC,WAOO,KAAA,QAAA,WAAA,CAAA,SAAA,CALG,QAAA,WADRP,UAAA,GAAAC,YAKkBO,MAAA,sBAAA,GAAA;;KAHf,OAAKC,eAAA,EAAqB,OAAAD,MAAA,iBAAA,CAAiB,CAAC,QAAA,MAAM,CAAA,CAAE,S;KAGrD,QAAO"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import SidebarItem_vue_vue_type_script_setup_true_lang_default from "./SidebarItem.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
|
|
2
|
+
// src/components/SidebarItem.vue
|
|
3
3
|
var SidebarItem_default = SidebarItem_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { SidebarItem_default as default };
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=SidebarItem.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarItem.vue.js","names":["_sfc_main"],"sources":["../../src/components/SidebarItem.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarSidebarButton,\n ScalarSidebarGroup,\n ScalarSidebarGroupToggle,\n ScalarSidebarGroupToggleButton,\n ScalarSidebarGroupToggleSpacer,\n ScalarSidebarIndent,\n ScalarSidebarItem,\n ScalarSidebarSection,\n} from '@scalar/components/sidebar'\nimport { isPlainLeftClick } from '@scalar/helpers/dom/is-plain-left-click'\nimport { LibraryIcon } from '@scalar/icons/library'\nimport { computed } from 'vue'\n\nimport SidebarItemDecorator from '@/components/SidebarItemDecorator.vue'\nimport { filterItems } from '@/helpers/filter-items'\nimport { hasChildren } from '@/helpers/has-children'\nimport { isSidebarFolder } from '@/helpers/is-sidebar-folder'\nimport {\n useDraggable,\n type DraggingItem,\n type HoveredItem,\n type UseDraggableOptions,\n} from '@/hooks/use-draggable'\nimport type { Item, Layout, SidebarOptions } from '@/types'\n\nimport SidebarHttpBadge from './SidebarHttpBadge.vue'\nimport SidebarItemLabel from './SidebarItemLabel.vue'\n\nconst {\n item,\n layout,\n isSelected,\n isExpanded,\n isDraggable,\n isDroppable,\n options,\n getHref,\n} = defineProps<{\n /**\n * The sidebar item to render.\n */\n item: Item\n /**\n * The layout mode for the sidebar ('client' or 'reference').\n */\n layout: Layout\n /**\n * Function to determine if an item is currently selected by id.\n */\n isSelected: (id: string) => boolean\n /**\n * Function to determine if an item is currently expanded (showing its children) by id.\n */\n isExpanded: (id: string) => boolean\n /**\n * Sidebar configuration options.\n * - operationTitleSource: sets whether operations show their path or summary as the display title.\n */\n options?: SidebarOptions\n\n /**\n * Returns the URL for a sidebar item.\n *\n * When provided (and it returns a value) items render as anchor tags\n * instead of buttons, so search engines can crawl the navigation.\n */\n getHref?: (item: Item) => string | undefined\n\n /**\n * Prevents this item from being dragged.\n *\n * @default true\n */\n isDraggable?: UseDraggableOptions['isDraggable']\n /**\n * Prevents this item from being hovered and dropped into. Can be either a function or a boolean.\n *\n * @default true\n */\n isDroppable?: UseDraggableOptions['isDroppable']\n}>()\n\nconst emit = defineEmits<{\n /**\n * Emitted when the item is selected\n * @param id - The id of the selected item\n */\n (e: 'selectItem', id: string): void\n /**\n * Emitted when a drag operation ends for this item\n * @param draggingItem - The item being dragged\n * @param hoveredItem - The item currently being hovered over\n */\n (e: 'onDragEnd', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n\n /**\n * Emitted when the group is toggled\n * @param id - The id of the group\n */\n (e: 'toggleGroup', id: string): void\n}>()\n\nconst slots = defineSlots<{\n /**\n * Adds an optional decorator for each item, such as an edit menu.\n * The slot receives an object with the current item.\n */\n decorator?(props: { item: Item }): unknown\n /**\n * Adds an optional empty state for an item.\n * The slot receives an object with the current item.\n */\n empty?(props: { item: Item }): unknown\n /**\n * Adds an optional icon for each item.\n * The slot receives an object with the current item and the open state.\n */\n icon?(props: { item: Item; open: boolean }): unknown\n}>()\n\nconst isGroup = (\n currentItem: Item,\n): currentItem is Item & { isGroup: true } => {\n return 'isGroup' in currentItem && currentItem.isGroup\n}\n\nconst isDeprecated = (\n currentItem: Item,\n): currentItem is Item & { isDeprecated: true } => {\n return ('isDeprecated' in currentItem && currentItem.isDeprecated) ?? false\n}\n\n/**\n * Handle drag end event and bubble it up to parent.\n */\nconst onDragEnd = (draggingItem: DraggingItem, hoveredItem: HoveredItem) => {\n emit('onDragEnd', draggingItem, hoveredItem)\n}\nconst { draggableAttrs, draggableEvents } = useDraggable({\n id: item.id,\n isDraggable,\n isDroppable,\n onDragEnd,\n})\n\nconst children = computed(() =>\n hasChildren(item)\n ? filterItems(layout, item.children, options?.hideOperationDefaultExamples)\n : [],\n)\n\n/**\n * Whether this item is the one currently displayed on the page.\n *\n * `isSelected` also reports true for every ancestor of the displayed item,\n * which is what the active styling of a group needs. Only the deepest\n * selected node is the current page though, so a group counts as current when\n * none of its children are selected. Leaf items already get this from the\n * `selected` prop of ScalarSidebarButton.\n */\nconst isCurrent = computed(\n () =>\n isSelected(item.id) &&\n !(hasChildren(item) && item.children.some((child) => isSelected(child.id))),\n)\n\n/** The URL for this item, when the consumer provides one it renders as a link */\nconst href = computed(() => getHref?.(item) || undefined)\n\n/**\n * Whether the group renders its toggle separately from its label.\n *\n * A label that navigates cannot also own the open state, so a group that\n * renders as a link needs a toggle button of its own. Without one there is no\n * way to collapse the group from the keyboard, because pressing Enter on the\n * label follows the link instead.\n */\nconst isDiscrete = computed(\n () => Boolean(href.value) || (layout === 'reference' && item.type === 'text'),\n)\n\n/**\n * Builds the screen reader label for the discrete group toggle.\n *\n * The title of the group is appended so the toggles can be told apart. A page\n * can hold a lot of them, and a list of identical \"Open Group\" buttons gives a\n * screen reader user nothing to navigate by.\n */\nconst getToggleLabel = (open: boolean): string => {\n const label = open\n ? (options?.labels?.closeGroup ?? 'Close Group')\n : (options?.labels?.openGroup ?? 'Open Group')\n\n return item.title ? `${label} - ${item.title}` : label\n}\n\n/**\n * Emit the select event for a click on the item label.\n *\n * When the item renders as a link we only hijack plain left clicks on the\n * link itself for in-app navigation. Modified clicks (meta, ctrl, shift,\n * alt) and middle clicks keep the browser's default behavior so the link\n * can be opened in a new tab or window, and clicks on surrounding content\n * (like the decorator menu) keep their native behavior. A click whose\n * default is already prevented has been handled by someone else, so it is\n * left alone rather than navigated a second time.\n */\nconst handleSelect = (event: MouseEvent) => {\n if (href.value) {\n const anchor =\n event.target instanceof Element ? event.target.closest('a') : null\n if (anchor?.getAttribute('href') !== href.value) {\n return\n }\n if (event.defaultPrevented || !isPlainLeftClick(event)) {\n return\n }\n event.preventDefault()\n }\n emit('selectItem', item.id)\n}\n</script>\n<template>\n <!-- Keep the client section layout; reference tags all use collapsible groups. -->\n <ScalarSidebarSection\n v-if=\"layout === 'client' && children.length > 0 && isGroup(item)\"\n :data-sidebar-id=\"item.id\"\n v-bind=\"draggableAttrs\"\n v-on=\"draggableEvents\">\n {{ item.title }}\n <template #items>\n <SidebarItem\n v-for=\"child in children\"\n :key=\"child.id\"\n :getHref=\"getHref\"\n :isDraggable=\"isDraggable\"\n :isDroppable=\"isDroppable\"\n :isExpanded=\"isExpanded\"\n :isSelected=\"isSelected\"\n :item=\"child\"\n :layout=\"layout\"\n :options=\"options\"\n @onDragEnd=\"onDragEnd\"\n @selectItem=\"(id) => emit('selectItem', id)\"\n @toggleGroup=\"(id) => emit('toggleGroup', id)\">\n <template\n v-if=\"slots.decorator\"\n #decorator=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"decorator\" />\n </template>\n <template\n v-if=\"slots.empty\"\n #empty=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"empty\" />\n </template>\n <template\n v-if=\"slots.icon\"\n #icon=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"icon\" />\n </template>\n </SidebarItem>\n </template>\n </ScalarSidebarSection>\n\n <!-- Sidebar group (folder) -->\n <ScalarSidebarGroup\n v-else-if=\"\n isSidebarFolder(\n layout,\n item,\n slots.empty !== undefined,\n options?.hideOperationDefaultExamples ?? false,\n )\n \"\n :active=\"isSelected(item.id)\"\n class=\"relative\"\n controlled\n :data-sidebar-id=\"item.id\"\n v-bind=\"draggableAttrs\"\n :discrete=\"isDiscrete\"\n :open=\"isExpanded(item.id)\"\n v-on=\"draggableEvents\">\n <template #button=\"{ open, level }\">\n <ScalarSidebarButton\n :is=\"href ? 'a' : 'button'\"\n :active=\"isSelected(item.id)\"\n :aria-current=\"isCurrent ? 'page' : undefined\"\n :aria-expanded=\"isDiscrete ? undefined : open\"\n :href=\"href\"\n :indent=\"level\"\n @click=\"handleSelect\">\n <template #indent>\n <ScalarSidebarIndent\n class=\"-my-2 mr-0\"\n :indent=\"level\" />\n </template>\n <template\n v-if=\"item.type === 'document'\"\n #icon>\n <slot\n :item=\"item\"\n name=\"icon\"\n :open=\"open\">\n <LibraryIcon\n class=\"block\"\n :src=\"\n ('icon' in item && item.icon) || 'interface-content-folder'\n \" />\n </slot>\n </template>\n <span\n v-if=\"isDeprecated(item)\"\n class=\"line-through\">\n <SidebarItemLabel\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n </span>\n <SidebarItemLabel\n v-else\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n <template #aside>\n <SidebarHttpBadge\n v-if=\"'method' in item\"\n :active=\"isSelected(item.id)\"\n class=\"ml-2 h-4 self-start\"\n :class=\"{\n // Hide the badge when we're showing the decorator\n 'group-hover/button:opacity-0 group-focus-visible/button:opacity-0 group-has-[~*_[aria-expanded=true]]/button:opacity-0 group-has-[~*:focus-within]/button:opacity-0 group-has-[~*:hover]/button:opacity-0':\n slots.decorator,\n }\"\n :label=\"options?.labels?.httpMethod\"\n :method=\"item.method\"\n :webhook=\"item.type === 'webhook'\" />\n <ScalarSidebarGroupToggleSpacer v-if=\"isDiscrete\" />\n <ScalarSidebarGroupToggle\n v-else-if=\"!('method' in item)\"\n class=\"text-sidebar-c-2\"\n :open>\n <template #label>\n {{\n open\n ? (options?.labels?.closeGroup ?? 'Close Group')\n : (options?.labels?.openGroup ?? 'Open Group')\n }}\n </template>\n </ScalarSidebarGroupToggle>\n </template>\n </ScalarSidebarButton>\n <ScalarSidebarGroupToggleButton\n v-if=\"isDiscrete\"\n :open\n @click=\"() => emit('toggleGroup', item.id)\">\n <template #label>{{ getToggleLabel(open) }}</template>\n </ScalarSidebarGroupToggleButton>\n </template>\n <template\n v-if=\"slots.decorator\"\n #after>\n <SidebarItemDecorator>\n <slot\n :item\n name=\"decorator\" />\n </SidebarItemDecorator>\n </template>\n <template #items>\n <SidebarItem\n v-for=\"child in children\"\n :key=\"child.id\"\n :getHref=\"getHref\"\n :isDraggable=\"isDraggable\"\n :isDroppable=\"isDroppable\"\n :isExpanded=\"isExpanded\"\n :isSelected=\"isSelected\"\n :item=\"child\"\n :layout=\"layout\"\n :options=\"options\"\n :parentIds=\"[]\"\n @onDragEnd=\"onDragEnd\"\n @selectItem=\"(id) => emit('selectItem', id)\"\n @toggleGroup=\"(id) => emit('toggleGroup', id)\">\n <template\n v-if=\"slots.decorator\"\n #decorator=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"decorator\" />\n </template>\n <template\n v-if=\"slots.empty\"\n #empty=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"empty\" />\n </template>\n <template\n v-if=\"slots.icon\"\n #icon=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"icon\" />\n </template>\n </SidebarItem>\n <template v-if=\"slots.empty && (item.children?.length ?? 0) === 0\">\n <slot\n :item\n name=\"empty\" />\n </template>\n </template>\n </ScalarSidebarGroup>\n\n <!-- Sidebar item (leaf node) -->\n <ScalarSidebarItem\n v-else\n v-bind=\"draggableAttrs\"\n class=\"relative\"\n :data-sidebar-id=\"item.id\"\n v-on=\"draggableEvents\"\n @click=\"handleSelect\">\n <template #button=\"{ level }\">\n <ScalarSidebarButton\n :is=\"href ? 'a' : 'button'\"\n :href=\"href\"\n :indent=\"level\"\n :selected=\"isSelected(item.id)\">\n <template\n v-if=\"slots.icon\"\n #icon>\n <slot\n :item=\"item\"\n name=\"icon\"\n :open=\"true\" />\n </template>\n <span\n v-if=\"isDeprecated(item)\"\n class=\"line-through\">\n <SidebarItemLabel\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n </span>\n <SidebarItemLabel\n v-else\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n <template\n v-if=\"'method' in item\"\n #aside>\n <SidebarHttpBadge\n :active=\"isSelected(item.id)\"\n class=\"ml-2 h-4 self-start\"\n :class=\"{\n // Hide the badge when we're showing the decorator\n 'group-hover/button:opacity-0 group-focus-visible/button:opacity-0 group-has-[~*_[aria-expanded=true]]/button:opacity-0 group-has-[~*:focus-within]/button:opacity-0 group-has-[~*:hover]/button:opacity-0':\n slots.decorator,\n }\"\n :label=\"options?.labels?.httpMethod\"\n :method=\"item.method\"\n :webhook=\"item.type === 'webhook'\" />\n </template>\n </ScalarSidebarButton>\n </template>\n <template\n v-if=\"slots.decorator\"\n #after>\n <SidebarItemDecorator>\n <slot\n :item\n name=\"decorator\" />\n </SidebarItemDecorator>\n </template>\n </ScalarSidebarItem>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"SidebarItem.vue.js","names":[],"sources":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { filterItems } from "../helpers/filter-items.js";
|
|
2
1
|
import SidebarItemDecorator_default from "./SidebarItemDecorator.vue.js";
|
|
2
|
+
import { filterItems } from "../helpers/filter-items.js";
|
|
3
3
|
import { hasChildren } from "../helpers/has-children.js";
|
|
4
4
|
import { isSidebarFolder } from "../helpers/is-sidebar-folder.js";
|
|
5
5
|
import { useDraggable } from "../hooks/use-draggable.js";
|
|
@@ -9,7 +9,7 @@ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock
|
|
|
9
9
|
import { ScalarSidebarButton, ScalarSidebarGroup, ScalarSidebarGroupToggle, ScalarSidebarGroupToggleButton, ScalarSidebarGroupToggleSpacer, ScalarSidebarIndent, ScalarSidebarItem, ScalarSidebarSection } from "@scalar/components/sidebar";
|
|
10
10
|
import { isPlainLeftClick } from "@scalar/helpers/dom/is-plain-left-click";
|
|
11
11
|
import { LibraryIcon } from "@scalar/icons/library";
|
|
12
|
-
|
|
12
|
+
// src/components/SidebarItem.vue?vue&type=script&setup=true&lang.ts
|
|
13
13
|
var _hoisted_1 = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "line-through"
|
|
@@ -350,7 +350,6 @@ var SidebarItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
|
-
//#endregion
|
|
354
353
|
export { SidebarItem_vue_vue_type_script_setup_true_lang_default as default };
|
|
355
354
|
|
|
356
355
|
//# sourceMappingURL=SidebarItem.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarItem.vue_vue_type_script_setup_true_lang.js","names":["_useSlots","_resolveComponent","_openBlock","_createBlock","_unref","_mergeProps","_toHandlers","_withCtx","_createElementBlock","_Fragment","_renderList","_createSlots","_renderSlot","_createTextVNode","_toDisplayString","_createVNode","SidebarHttpBadge","_normalizeClass","_createCommentVNode","SidebarItemLabel","SidebarItemDecorator"],"sources":["../../src/components/SidebarItem.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarSidebarButton,\n ScalarSidebarGroup,\n ScalarSidebarGroupToggle,\n ScalarSidebarGroupToggleButton,\n ScalarSidebarGroupToggleSpacer,\n ScalarSidebarIndent,\n ScalarSidebarItem,\n ScalarSidebarSection,\n} from '@scalar/components/sidebar'\nimport { isPlainLeftClick } from '@scalar/helpers/dom/is-plain-left-click'\nimport { LibraryIcon } from '@scalar/icons/library'\nimport { computed } from 'vue'\n\nimport SidebarItemDecorator from '@/components/SidebarItemDecorator.vue'\nimport { filterItems } from '@/helpers/filter-items'\nimport { hasChildren } from '@/helpers/has-children'\nimport { isSidebarFolder } from '@/helpers/is-sidebar-folder'\nimport {\n useDraggable,\n type DraggingItem,\n type HoveredItem,\n type UseDraggableOptions,\n} from '@/hooks/use-draggable'\nimport type { Item, Layout, SidebarOptions } from '@/types'\n\nimport SidebarHttpBadge from './SidebarHttpBadge.vue'\nimport SidebarItemLabel from './SidebarItemLabel.vue'\n\nconst {\n item,\n layout,\n isSelected,\n isExpanded,\n isDraggable,\n isDroppable,\n options,\n getHref,\n} = defineProps<{\n /**\n * The sidebar item to render.\n */\n item: Item\n /**\n * The layout mode for the sidebar ('client' or 'reference').\n */\n layout: Layout\n /**\n * Function to determine if an item is currently selected by id.\n */\n isSelected: (id: string) => boolean\n /**\n * Function to determine if an item is currently expanded (showing its children) by id.\n */\n isExpanded: (id: string) => boolean\n /**\n * Sidebar configuration options.\n * - operationTitleSource: sets whether operations show their path or summary as the display title.\n */\n options?: SidebarOptions\n\n /**\n * Returns the URL for a sidebar item.\n *\n * When provided (and it returns a value) items render as anchor tags\n * instead of buttons, so search engines can crawl the navigation.\n */\n getHref?: (item: Item) => string | undefined\n\n /**\n * Prevents this item from being dragged.\n *\n * @default true\n */\n isDraggable?: UseDraggableOptions['isDraggable']\n /**\n * Prevents this item from being hovered and dropped into. Can be either a function or a boolean.\n *\n * @default true\n */\n isDroppable?: UseDraggableOptions['isDroppable']\n}>()\n\nconst emit = defineEmits<{\n /**\n * Emitted when the item is selected\n * @param id - The id of the selected item\n */\n (e: 'selectItem', id: string): void\n /**\n * Emitted when a drag operation ends for this item\n * @param draggingItem - The item being dragged\n * @param hoveredItem - The item currently being hovered over\n */\n (e: 'onDragEnd', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n\n /**\n * Emitted when the group is toggled\n * @param id - The id of the group\n */\n (e: 'toggleGroup', id: string): void\n}>()\n\nconst slots = defineSlots<{\n /**\n * Adds an optional decorator for each item, such as an edit menu.\n * The slot receives an object with the current item.\n */\n decorator?(props: { item: Item }): unknown\n /**\n * Adds an optional empty state for an item.\n * The slot receives an object with the current item.\n */\n empty?(props: { item: Item }): unknown\n /**\n * Adds an optional icon for each item.\n * The slot receives an object with the current item and the open state.\n */\n icon?(props: { item: Item; open: boolean }): unknown\n}>()\n\nconst isGroup = (\n currentItem: Item,\n): currentItem is Item & { isGroup: true } => {\n return 'isGroup' in currentItem && currentItem.isGroup\n}\n\nconst isDeprecated = (\n currentItem: Item,\n): currentItem is Item & { isDeprecated: true } => {\n return ('isDeprecated' in currentItem && currentItem.isDeprecated) ?? false\n}\n\n/**\n * Handle drag end event and bubble it up to parent.\n */\nconst onDragEnd = (draggingItem: DraggingItem, hoveredItem: HoveredItem) => {\n emit('onDragEnd', draggingItem, hoveredItem)\n}\nconst { draggableAttrs, draggableEvents } = useDraggable({\n id: item.id,\n isDraggable,\n isDroppable,\n onDragEnd,\n})\n\nconst children = computed(() =>\n hasChildren(item)\n ? filterItems(layout, item.children, options?.hideOperationDefaultExamples)\n : [],\n)\n\n/**\n * Whether this item is the one currently displayed on the page.\n *\n * `isSelected` also reports true for every ancestor of the displayed item,\n * which is what the active styling of a group needs. Only the deepest\n * selected node is the current page though, so a group counts as current when\n * none of its children are selected. Leaf items already get this from the\n * `selected` prop of ScalarSidebarButton.\n */\nconst isCurrent = computed(\n () =>\n isSelected(item.id) &&\n !(hasChildren(item) && item.children.some((child) => isSelected(child.id))),\n)\n\n/** The URL for this item, when the consumer provides one it renders as a link */\nconst href = computed(() => getHref?.(item) || undefined)\n\n/**\n * Whether the group renders its toggle separately from its label.\n *\n * A label that navigates cannot also own the open state, so a group that\n * renders as a link needs a toggle button of its own. Without one there is no\n * way to collapse the group from the keyboard, because pressing Enter on the\n * label follows the link instead.\n */\nconst isDiscrete = computed(\n () => Boolean(href.value) || (layout === 'reference' && item.type === 'text'),\n)\n\n/**\n * Builds the screen reader label for the discrete group toggle.\n *\n * The title of the group is appended so the toggles can be told apart. A page\n * can hold a lot of them, and a list of identical \"Open Group\" buttons gives a\n * screen reader user nothing to navigate by.\n */\nconst getToggleLabel = (open: boolean): string => {\n const label = open\n ? (options?.labels?.closeGroup ?? 'Close Group')\n : (options?.labels?.openGroup ?? 'Open Group')\n\n return item.title ? `${label} - ${item.title}` : label\n}\n\n/**\n * Emit the select event for a click on the item label.\n *\n * When the item renders as a link we only hijack plain left clicks on the\n * link itself for in-app navigation. Modified clicks (meta, ctrl, shift,\n * alt) and middle clicks keep the browser's default behavior so the link\n * can be opened in a new tab or window, and clicks on surrounding content\n * (like the decorator menu) keep their native behavior. A click whose\n * default is already prevented has been handled by someone else, so it is\n * left alone rather than navigated a second time.\n */\nconst handleSelect = (event: MouseEvent) => {\n if (href.value) {\n const anchor =\n event.target instanceof Element ? event.target.closest('a') : null\n if (anchor?.getAttribute('href') !== href.value) {\n return\n }\n if (event.defaultPrevented || !isPlainLeftClick(event)) {\n return\n }\n event.preventDefault()\n }\n emit('selectItem', item.id)\n}\n</script>\n<template>\n <!-- Keep the client section layout; reference tags all use collapsible groups. -->\n <ScalarSidebarSection\n v-if=\"layout === 'client' && children.length > 0 && isGroup(item)\"\n :data-sidebar-id=\"item.id\"\n v-bind=\"draggableAttrs\"\n v-on=\"draggableEvents\">\n {{ item.title }}\n <template #items>\n <SidebarItem\n v-for=\"child in children\"\n :key=\"child.id\"\n :getHref=\"getHref\"\n :isDraggable=\"isDraggable\"\n :isDroppable=\"isDroppable\"\n :isExpanded=\"isExpanded\"\n :isSelected=\"isSelected\"\n :item=\"child\"\n :layout=\"layout\"\n :options=\"options\"\n @onDragEnd=\"onDragEnd\"\n @selectItem=\"(id) => emit('selectItem', id)\"\n @toggleGroup=\"(id) => emit('toggleGroup', id)\">\n <template\n v-if=\"slots.decorator\"\n #decorator=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"decorator\" />\n </template>\n <template\n v-if=\"slots.empty\"\n #empty=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"empty\" />\n </template>\n <template\n v-if=\"slots.icon\"\n #icon=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"icon\" />\n </template>\n </SidebarItem>\n </template>\n </ScalarSidebarSection>\n\n <!-- Sidebar group (folder) -->\n <ScalarSidebarGroup\n v-else-if=\"\n isSidebarFolder(\n layout,\n item,\n slots.empty !== undefined,\n options?.hideOperationDefaultExamples ?? false,\n )\n \"\n :active=\"isSelected(item.id)\"\n class=\"relative\"\n controlled\n :data-sidebar-id=\"item.id\"\n v-bind=\"draggableAttrs\"\n :discrete=\"isDiscrete\"\n :open=\"isExpanded(item.id)\"\n v-on=\"draggableEvents\">\n <template #button=\"{ open, level }\">\n <ScalarSidebarButton\n :is=\"href ? 'a' : 'button'\"\n :active=\"isSelected(item.id)\"\n :aria-current=\"isCurrent ? 'page' : undefined\"\n :aria-expanded=\"isDiscrete ? undefined : open\"\n :href=\"href\"\n :indent=\"level\"\n @click=\"handleSelect\">\n <template #indent>\n <ScalarSidebarIndent\n class=\"-my-2 mr-0\"\n :indent=\"level\" />\n </template>\n <template\n v-if=\"item.type === 'document'\"\n #icon>\n <slot\n :item=\"item\"\n name=\"icon\"\n :open=\"open\">\n <LibraryIcon\n class=\"block\"\n :src=\"\n ('icon' in item && item.icon) || 'interface-content-folder'\n \" />\n </slot>\n </template>\n <span\n v-if=\"isDeprecated(item)\"\n class=\"line-through\">\n <SidebarItemLabel\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n </span>\n <SidebarItemLabel\n v-else\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n <template #aside>\n <SidebarHttpBadge\n v-if=\"'method' in item\"\n :active=\"isSelected(item.id)\"\n class=\"ml-2 h-4 self-start\"\n :class=\"{\n // Hide the badge when we're showing the decorator\n 'group-hover/button:opacity-0 group-focus-visible/button:opacity-0 group-has-[~*_[aria-expanded=true]]/button:opacity-0 group-has-[~*:focus-within]/button:opacity-0 group-has-[~*:hover]/button:opacity-0':\n slots.decorator,\n }\"\n :label=\"options?.labels?.httpMethod\"\n :method=\"item.method\"\n :webhook=\"item.type === 'webhook'\" />\n <ScalarSidebarGroupToggleSpacer v-if=\"isDiscrete\" />\n <ScalarSidebarGroupToggle\n v-else-if=\"!('method' in item)\"\n class=\"text-sidebar-c-2\"\n :open>\n <template #label>\n {{\n open\n ? (options?.labels?.closeGroup ?? 'Close Group')\n : (options?.labels?.openGroup ?? 'Open Group')\n }}\n </template>\n </ScalarSidebarGroupToggle>\n </template>\n </ScalarSidebarButton>\n <ScalarSidebarGroupToggleButton\n v-if=\"isDiscrete\"\n :open\n @click=\"() => emit('toggleGroup', item.id)\">\n <template #label>{{ getToggleLabel(open) }}</template>\n </ScalarSidebarGroupToggleButton>\n </template>\n <template\n v-if=\"slots.decorator\"\n #after>\n <SidebarItemDecorator>\n <slot\n :item\n name=\"decorator\" />\n </SidebarItemDecorator>\n </template>\n <template #items>\n <SidebarItem\n v-for=\"child in children\"\n :key=\"child.id\"\n :getHref=\"getHref\"\n :isDraggable=\"isDraggable\"\n :isDroppable=\"isDroppable\"\n :isExpanded=\"isExpanded\"\n :isSelected=\"isSelected\"\n :item=\"child\"\n :layout=\"layout\"\n :options=\"options\"\n :parentIds=\"[]\"\n @onDragEnd=\"onDragEnd\"\n @selectItem=\"(id) => emit('selectItem', id)\"\n @toggleGroup=\"(id) => emit('toggleGroup', id)\">\n <template\n v-if=\"slots.decorator\"\n #decorator=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"decorator\" />\n </template>\n <template\n v-if=\"slots.empty\"\n #empty=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"empty\" />\n </template>\n <template\n v-if=\"slots.icon\"\n #icon=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"icon\" />\n </template>\n </SidebarItem>\n <template v-if=\"slots.empty && (item.children?.length ?? 0) === 0\">\n <slot\n :item\n name=\"empty\" />\n </template>\n </template>\n </ScalarSidebarGroup>\n\n <!-- Sidebar item (leaf node) -->\n <ScalarSidebarItem\n v-else\n v-bind=\"draggableAttrs\"\n class=\"relative\"\n :data-sidebar-id=\"item.id\"\n v-on=\"draggableEvents\"\n @click=\"handleSelect\">\n <template #button=\"{ level }\">\n <ScalarSidebarButton\n :is=\"href ? 'a' : 'button'\"\n :href=\"href\"\n :indent=\"level\"\n :selected=\"isSelected(item.id)\">\n <template\n v-if=\"slots.icon\"\n #icon>\n <slot\n :item=\"item\"\n name=\"icon\"\n :open=\"true\" />\n </template>\n <span\n v-if=\"isDeprecated(item)\"\n class=\"line-through\">\n <SidebarItemLabel\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n </span>\n <SidebarItemLabel\n v-else\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n <template\n v-if=\"'method' in item\"\n #aside>\n <SidebarHttpBadge\n :active=\"isSelected(item.id)\"\n class=\"ml-2 h-4 self-start\"\n :class=\"{\n // Hide the badge when we're showing the decorator\n 'group-hover/button:opacity-0 group-focus-visible/button:opacity-0 group-has-[~*_[aria-expanded=true]]/button:opacity-0 group-has-[~*:focus-within]/button:opacity-0 group-has-[~*:hover]/button:opacity-0':\n slots.decorator,\n }\"\n :label=\"options?.labels?.httpMethod\"\n :method=\"item.method\"\n :webhook=\"item.type === 'webhook'\" />\n </template>\n </ScalarSidebarButton>\n </template>\n <template\n v-if=\"slots.decorator\"\n #after>\n <SidebarItemDecorator>\n <slot\n :item\n name=\"decorator\" />\n </SidebarItemDecorator>\n </template>\n </ScalarSidebarItem>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoFA,MAAM,OAAO;EAoBb,MAAM,QAAQA,SAAA;EAkBd,MAAM,WACJ,gBAC4C;GAC5C,OAAO,aAAa,eAAe,YAAY;EACjD;EAEA,MAAM,gBACJ,gBACiD;GACjD,QAAQ,kBAAkB,eAAe,YAAY,iBAAiB;EACxE;;;;EAKA,MAAM,aAAa,cAA4B,gBAA6B;GAC1E,KAAK,aAAa,cAAc,WAAW;EAC7C;EACA,MAAM,EAAE,gBAAgB,oBAAoB,aAAa;GACvD,IAAI,QAAA,KAAK;GACT,aAAU,QAAA;GACV,aAAU,QAAA;GACV;EACF,CAAC;EAED,MAAM,WAAW,eACf,YAAY,QAAA,IAAI,IACZ,YAAY,QAAA,QAAQ,QAAA,KAAK,UAAU,QAAA,SAAS,4BAA4B,IACxE,CAAC,CACP;;;;;;;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AK;MACb,SAAS,QAAA,KAAK,SAAI;;;;;;;;;;;;;;;;G,IAKnB,MAAM,Y;IACX,MAAA;IACD,IAAAV,cAIuB,CAJvBQ,YAIuBK,8BAAA,MAAA;KAHrB,SAAAb,cAEqB,CAFrBK,WAEqB,KAAA,QAAA,aAAA,EADlB,MAAA,QAAA,KAAI,CAAA,C"}
|
|
1
|
+
{"version":3,"file":"SidebarItem.vue_vue_type_script_setup_true_lang.js","names":["_useSlots","_openBlock","_createBlock","_unref","_mergeProps","_toHandlers","_withCtx","_createElementBlock","_Fragment","_renderList","_createSlots","_renderSlot","_createTextVNode","_toDisplayString","_createVNode","SidebarHttpBadge","_normalizeClass","SidebarItemLabel","SidebarItemDecorator"],"sources":["../../src/components/SidebarItem.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarSidebarButton,\n ScalarSidebarGroup,\n ScalarSidebarGroupToggle,\n ScalarSidebarGroupToggleButton,\n ScalarSidebarGroupToggleSpacer,\n ScalarSidebarIndent,\n ScalarSidebarItem,\n ScalarSidebarSection,\n} from '@scalar/components/sidebar'\nimport { isPlainLeftClick } from '@scalar/helpers/dom/is-plain-left-click'\nimport { LibraryIcon } from '@scalar/icons/library'\nimport { computed } from 'vue'\n\nimport SidebarItemDecorator from '@/components/SidebarItemDecorator.vue'\nimport { filterItems } from '@/helpers/filter-items'\nimport { hasChildren } from '@/helpers/has-children'\nimport { isSidebarFolder } from '@/helpers/is-sidebar-folder'\nimport {\n useDraggable,\n type DraggingItem,\n type HoveredItem,\n type UseDraggableOptions,\n} from '@/hooks/use-draggable'\nimport type { Item, Layout, SidebarOptions } from '@/types'\n\nimport SidebarHttpBadge from './SidebarHttpBadge.vue'\nimport SidebarItemLabel from './SidebarItemLabel.vue'\n\nconst {\n item,\n layout,\n isSelected,\n isExpanded,\n isDraggable,\n isDroppable,\n options,\n getHref,\n} = defineProps<{\n /**\n * The sidebar item to render.\n */\n item: Item\n /**\n * The layout mode for the sidebar ('client' or 'reference').\n */\n layout: Layout\n /**\n * Function to determine if an item is currently selected by id.\n */\n isSelected: (id: string) => boolean\n /**\n * Function to determine if an item is currently expanded (showing its children) by id.\n */\n isExpanded: (id: string) => boolean\n /**\n * Sidebar configuration options.\n * - operationTitleSource: sets whether operations show their path or summary as the display title.\n */\n options?: SidebarOptions\n\n /**\n * Returns the URL for a sidebar item.\n *\n * When provided (and it returns a value) items render as anchor tags\n * instead of buttons, so search engines can crawl the navigation.\n */\n getHref?: (item: Item) => string | undefined\n\n /**\n * Prevents this item from being dragged.\n *\n * @default true\n */\n isDraggable?: UseDraggableOptions['isDraggable']\n /**\n * Prevents this item from being hovered and dropped into. Can be either a function or a boolean.\n *\n * @default true\n */\n isDroppable?: UseDraggableOptions['isDroppable']\n}>()\n\nconst emit = defineEmits<{\n /**\n * Emitted when the item is selected\n * @param id - The id of the selected item\n */\n (e: 'selectItem', id: string): void\n /**\n * Emitted when a drag operation ends for this item\n * @param draggingItem - The item being dragged\n * @param hoveredItem - The item currently being hovered over\n */\n (e: 'onDragEnd', draggingItem: DraggingItem, hoveredItem: HoveredItem): void\n\n /**\n * Emitted when the group is toggled\n * @param id - The id of the group\n */\n (e: 'toggleGroup', id: string): void\n}>()\n\nconst slots = defineSlots<{\n /**\n * Adds an optional decorator for each item, such as an edit menu.\n * The slot receives an object with the current item.\n */\n decorator?(props: { item: Item }): unknown\n /**\n * Adds an optional empty state for an item.\n * The slot receives an object with the current item.\n */\n empty?(props: { item: Item }): unknown\n /**\n * Adds an optional icon for each item.\n * The slot receives an object with the current item and the open state.\n */\n icon?(props: { item: Item; open: boolean }): unknown\n}>()\n\nconst isGroup = (\n currentItem: Item,\n): currentItem is Item & { isGroup: true } => {\n return 'isGroup' in currentItem && currentItem.isGroup\n}\n\nconst isDeprecated = (\n currentItem: Item,\n): currentItem is Item & { isDeprecated: true } => {\n return ('isDeprecated' in currentItem && currentItem.isDeprecated) ?? false\n}\n\n/**\n * Handle drag end event and bubble it up to parent.\n */\nconst onDragEnd = (draggingItem: DraggingItem, hoveredItem: HoveredItem) => {\n emit('onDragEnd', draggingItem, hoveredItem)\n}\nconst { draggableAttrs, draggableEvents } = useDraggable({\n id: item.id,\n isDraggable,\n isDroppable,\n onDragEnd,\n})\n\nconst children = computed(() =>\n hasChildren(item)\n ? filterItems(layout, item.children, options?.hideOperationDefaultExamples)\n : [],\n)\n\n/**\n * Whether this item is the one currently displayed on the page.\n *\n * `isSelected` also reports true for every ancestor of the displayed item,\n * which is what the active styling of a group needs. Only the deepest\n * selected node is the current page though, so a group counts as current when\n * none of its children are selected. Leaf items already get this from the\n * `selected` prop of ScalarSidebarButton.\n */\nconst isCurrent = computed(\n () =>\n isSelected(item.id) &&\n !(hasChildren(item) && item.children.some((child) => isSelected(child.id))),\n)\n\n/** The URL for this item, when the consumer provides one it renders as a link */\nconst href = computed(() => getHref?.(item) || undefined)\n\n/**\n * Whether the group renders its toggle separately from its label.\n *\n * A label that navigates cannot also own the open state, so a group that\n * renders as a link needs a toggle button of its own. Without one there is no\n * way to collapse the group from the keyboard, because pressing Enter on the\n * label follows the link instead.\n */\nconst isDiscrete = computed(\n () => Boolean(href.value) || (layout === 'reference' && item.type === 'text'),\n)\n\n/**\n * Builds the screen reader label for the discrete group toggle.\n *\n * The title of the group is appended so the toggles can be told apart. A page\n * can hold a lot of them, and a list of identical \"Open Group\" buttons gives a\n * screen reader user nothing to navigate by.\n */\nconst getToggleLabel = (open: boolean): string => {\n const label = open\n ? (options?.labels?.closeGroup ?? 'Close Group')\n : (options?.labels?.openGroup ?? 'Open Group')\n\n return item.title ? `${label} - ${item.title}` : label\n}\n\n/**\n * Emit the select event for a click on the item label.\n *\n * When the item renders as a link we only hijack plain left clicks on the\n * link itself for in-app navigation. Modified clicks (meta, ctrl, shift,\n * alt) and middle clicks keep the browser's default behavior so the link\n * can be opened in a new tab or window, and clicks on surrounding content\n * (like the decorator menu) keep their native behavior. A click whose\n * default is already prevented has been handled by someone else, so it is\n * left alone rather than navigated a second time.\n */\nconst handleSelect = (event: MouseEvent) => {\n if (href.value) {\n const anchor =\n event.target instanceof Element ? event.target.closest('a') : null\n if (anchor?.getAttribute('href') !== href.value) {\n return\n }\n if (event.defaultPrevented || !isPlainLeftClick(event)) {\n return\n }\n event.preventDefault()\n }\n emit('selectItem', item.id)\n}\n</script>\n<template>\n <!-- Keep the client section layout; reference tags all use collapsible groups. -->\n <ScalarSidebarSection\n v-if=\"layout === 'client' && children.length > 0 && isGroup(item)\"\n :data-sidebar-id=\"item.id\"\n v-bind=\"draggableAttrs\"\n v-on=\"draggableEvents\">\n {{ item.title }}\n <template #items>\n <SidebarItem\n v-for=\"child in children\"\n :key=\"child.id\"\n :getHref=\"getHref\"\n :isDraggable=\"isDraggable\"\n :isDroppable=\"isDroppable\"\n :isExpanded=\"isExpanded\"\n :isSelected=\"isSelected\"\n :item=\"child\"\n :layout=\"layout\"\n :options=\"options\"\n @onDragEnd=\"onDragEnd\"\n @selectItem=\"(id) => emit('selectItem', id)\"\n @toggleGroup=\"(id) => emit('toggleGroup', id)\">\n <template\n v-if=\"slots.decorator\"\n #decorator=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"decorator\" />\n </template>\n <template\n v-if=\"slots.empty\"\n #empty=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"empty\" />\n </template>\n <template\n v-if=\"slots.icon\"\n #icon=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"icon\" />\n </template>\n </SidebarItem>\n </template>\n </ScalarSidebarSection>\n\n <!-- Sidebar group (folder) -->\n <ScalarSidebarGroup\n v-else-if=\"\n isSidebarFolder(\n layout,\n item,\n slots.empty !== undefined,\n options?.hideOperationDefaultExamples ?? false,\n )\n \"\n :active=\"isSelected(item.id)\"\n class=\"relative\"\n controlled\n :data-sidebar-id=\"item.id\"\n v-bind=\"draggableAttrs\"\n :discrete=\"isDiscrete\"\n :open=\"isExpanded(item.id)\"\n v-on=\"draggableEvents\">\n <template #button=\"{ open, level }\">\n <ScalarSidebarButton\n :is=\"href ? 'a' : 'button'\"\n :active=\"isSelected(item.id)\"\n :aria-current=\"isCurrent ? 'page' : undefined\"\n :aria-expanded=\"isDiscrete ? undefined : open\"\n :href=\"href\"\n :indent=\"level\"\n @click=\"handleSelect\">\n <template #indent>\n <ScalarSidebarIndent\n class=\"-my-2 mr-0\"\n :indent=\"level\" />\n </template>\n <template\n v-if=\"item.type === 'document'\"\n #icon>\n <slot\n :item=\"item\"\n name=\"icon\"\n :open=\"open\">\n <LibraryIcon\n class=\"block\"\n :src=\"\n ('icon' in item && item.icon) || 'interface-content-folder'\n \" />\n </slot>\n </template>\n <span\n v-if=\"isDeprecated(item)\"\n class=\"line-through\">\n <SidebarItemLabel\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n </span>\n <SidebarItemLabel\n v-else\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n <template #aside>\n <SidebarHttpBadge\n v-if=\"'method' in item\"\n :active=\"isSelected(item.id)\"\n class=\"ml-2 h-4 self-start\"\n :class=\"{\n // Hide the badge when we're showing the decorator\n 'group-hover/button:opacity-0 group-focus-visible/button:opacity-0 group-has-[~*_[aria-expanded=true]]/button:opacity-0 group-has-[~*:focus-within]/button:opacity-0 group-has-[~*:hover]/button:opacity-0':\n slots.decorator,\n }\"\n :label=\"options?.labels?.httpMethod\"\n :method=\"item.method\"\n :webhook=\"item.type === 'webhook'\" />\n <ScalarSidebarGroupToggleSpacer v-if=\"isDiscrete\" />\n <ScalarSidebarGroupToggle\n v-else-if=\"!('method' in item)\"\n class=\"text-sidebar-c-2\"\n :open>\n <template #label>\n {{\n open\n ? (options?.labels?.closeGroup ?? 'Close Group')\n : (options?.labels?.openGroup ?? 'Open Group')\n }}\n </template>\n </ScalarSidebarGroupToggle>\n </template>\n </ScalarSidebarButton>\n <ScalarSidebarGroupToggleButton\n v-if=\"isDiscrete\"\n :open\n @click=\"() => emit('toggleGroup', item.id)\">\n <template #label>{{ getToggleLabel(open) }}</template>\n </ScalarSidebarGroupToggleButton>\n </template>\n <template\n v-if=\"slots.decorator\"\n #after>\n <SidebarItemDecorator>\n <slot\n :item\n name=\"decorator\" />\n </SidebarItemDecorator>\n </template>\n <template #items>\n <SidebarItem\n v-for=\"child in children\"\n :key=\"child.id\"\n :getHref=\"getHref\"\n :isDraggable=\"isDraggable\"\n :isDroppable=\"isDroppable\"\n :isExpanded=\"isExpanded\"\n :isSelected=\"isSelected\"\n :item=\"child\"\n :layout=\"layout\"\n :options=\"options\"\n :parentIds=\"[]\"\n @onDragEnd=\"onDragEnd\"\n @selectItem=\"(id) => emit('selectItem', id)\"\n @toggleGroup=\"(id) => emit('toggleGroup', id)\">\n <template\n v-if=\"slots.decorator\"\n #decorator=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"decorator\" />\n </template>\n <template\n v-if=\"slots.empty\"\n #empty=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"empty\" />\n </template>\n <template\n v-if=\"slots.icon\"\n #icon=\"slotProps\">\n <slot\n v-bind=\"slotProps\"\n name=\"icon\" />\n </template>\n </SidebarItem>\n <template v-if=\"slots.empty && (item.children?.length ?? 0) === 0\">\n <slot\n :item\n name=\"empty\" />\n </template>\n </template>\n </ScalarSidebarGroup>\n\n <!-- Sidebar item (leaf node) -->\n <ScalarSidebarItem\n v-else\n v-bind=\"draggableAttrs\"\n class=\"relative\"\n :data-sidebar-id=\"item.id\"\n v-on=\"draggableEvents\"\n @click=\"handleSelect\">\n <template #button=\"{ level }\">\n <ScalarSidebarButton\n :is=\"href ? 'a' : 'button'\"\n :href=\"href\"\n :indent=\"level\"\n :selected=\"isSelected(item.id)\">\n <template\n v-if=\"slots.icon\"\n #icon>\n <slot\n :item=\"item\"\n name=\"icon\"\n :open=\"true\" />\n </template>\n <span\n v-if=\"isDeprecated(item)\"\n class=\"line-through\">\n <SidebarItemLabel\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n </span>\n <SidebarItemLabel\n v-else\n :item\n :operationTitleSource=\"options?.operationTitleSource\" />\n <template\n v-if=\"'method' in item\"\n #aside>\n <SidebarHttpBadge\n :active=\"isSelected(item.id)\"\n class=\"ml-2 h-4 self-start\"\n :class=\"{\n // Hide the badge when we're showing the decorator\n 'group-hover/button:opacity-0 group-focus-visible/button:opacity-0 group-has-[~*_[aria-expanded=true]]/button:opacity-0 group-has-[~*:focus-within]/button:opacity-0 group-has-[~*:hover]/button:opacity-0':\n slots.decorator,\n }\"\n :label=\"options?.labels?.httpMethod\"\n :method=\"item.method\"\n :webhook=\"item.type === 'webhook'\" />\n </template>\n </ScalarSidebarButton>\n </template>\n <template\n v-if=\"slots.decorator\"\n #after>\n <SidebarItemDecorator>\n <slot\n :item\n name=\"decorator\" />\n </SidebarItemDecorator>\n </template>\n </ScalarSidebarItem>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoFA,MAAM,OAAO;EAoBb,MAAM,QAAQA,SAAA;EAkBd,MAAM,WACJ,gBAC4C;GAC5C,OAAO,aAAa,eAAe,YAAY;EACjD;EAEA,MAAM,gBACJ,gBACiD;GACjD,QAAQ,kBAAkB,eAAe,YAAY,iBAAiB;EACxE;;;;EAKA,MAAM,aAAa,cAA4B,gBAA6B;GAC1E,KAAK,aAAa,cAAc,WAAW;EAC7C;EACA,MAAM,EAAE,gBAAgB,oBAAoB,aAAa;GACvD,IAAI,QAAA,KAAK;GACT,aAAU,QAAA;GACV,aAAU,QAAA;GACV;EACF,CAAC;EAED,MAAM,WAAW,eACf,YAAY,QAAA,IAAI,IACZ,YAAY,QAAA,QAAQ,QAAA,KAAK,UAAU,QAAA,SAAS,4BAA4B,IACxE,CAAC,CACP;;;;;;;;;;EAWA,MAAM,YAAY,eAEd,QAAA,WAAW,QAAA,KAAK,EAAE,KAClB,EAAE,YAAY,QAAA,IAAI,KAAK,QAAA,KAAK,SAAS,MAAM,UAAU,QAAA,WAAW,MAAM,EAAE,CAAC,EAC7E;;EAGA,M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AA,aAAA,EADlB,MAAA,QAAA,KAAI,CAAA,C"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import _plugin_vue_export_helper_default from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock, openBlock, renderSlot } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/components/SidebarItemDecorator.vue
|
|
4
4
|
var _sfc_main = {};
|
|
5
5
|
var _hoisted_1 = { class: "absolute top-[1lh] right-0.75 flex -translate-y-1/2 opacity-0 peer-hover/button:opacity-100 peer-focus-visible/button:opacity-100 focus-within:opacity-100 hover:opacity-100 has-[&[aria-expanded=true]]:opacity-100" };
|
|
6
6
|
function _sfc_render(_ctx, _cache) {
|
|
7
7
|
return openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default")]);
|
|
8
8
|
}
|
|
9
9
|
var SidebarItemDecorator_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
|
|
10
|
-
//#endregion
|
|
11
10
|
export { SidebarItemDecorator_default as default };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=SidebarItemDecorator.vue.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import SidebarItemLabel_vue_vue_type_script_setup_true_lang_default from "./SidebarItemLabel.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
|
|
2
|
+
// src/components/SidebarItemLabel.vue
|
|
3
3
|
var SidebarItemLabel_default = SidebarItemLabel_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { SidebarItemLabel_default as default };
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=SidebarItemLabel.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarItemLabel.vue.js","names":[
|
|
1
|
+
{"version":3,"file":"SidebarItemLabel.vue.js","names":[],"sources":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createBlock, defineComponent, openBlock, unref } from "vue";
|
|
2
2
|
import { ScalarWrappingText } from "@scalar/components/wrapping-text";
|
|
3
|
-
|
|
3
|
+
// src/components/SidebarItemLabel.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var SidebarItemLabel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
5
5
|
__name: "SidebarItemLabel",
|
|
6
6
|
props: {
|
|
@@ -20,7 +20,6 @@ var SidebarItemLabel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
//#endregion
|
|
24
23
|
export { SidebarItemLabel_vue_vue_type_script_setup_true_lang_default as default };
|
|
25
24
|
|
|
26
25
|
//# sourceMappingURL=SidebarItemLabel.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { generateReverseIndex } from "./generate-reverse-index.js";
|
|
2
2
|
import { computed, ref, toValue } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/helpers/create-sidebar-state.ts
|
|
4
4
|
/**
|
|
5
5
|
* Creates and manages the state for a sidebar tree, including selection and expansion of items.
|
|
6
6
|
*
|
|
@@ -131,7 +131,6 @@ var createSidebarState = (items, options) => {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
};
|
|
134
|
-
//#endregion
|
|
135
134
|
export { createSidebarState };
|
|
136
135
|
|
|
137
136
|
//# sourceMappingURL=create-sidebar-state.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/filter-items.ts
|
|
2
2
|
/** The type of items we want to */
|
|
3
3
|
var API_CLIENT_TYPES_SET = /* @__PURE__ */ new Set([
|
|
4
4
|
"document",
|
|
@@ -16,7 +16,6 @@ var filterItems = (layout, items, hideOperationDefaultExamples) => {
|
|
|
16
16
|
});
|
|
17
17
|
return items.filter((c) => API_CLIENT_TYPES_SET.has(c.type));
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { filterItems };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=filter-items.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/generate-reverse-index.ts
|
|
2
2
|
/**
|
|
3
3
|
* Builds a reverse index for fast ID-based lookup and attaches a `parent` property to each node for upward traversal.
|
|
4
4
|
*
|
|
@@ -36,7 +36,6 @@ var generateReverseIndex = ({ items, nestedKey = "children", filter = () => true
|
|
|
36
36
|
items.forEach(dfs);
|
|
37
37
|
return mapping;
|
|
38
38
|
};
|
|
39
|
-
//#endregion
|
|
40
39
|
export { generateReverseIndex };
|
|
41
40
|
|
|
42
41
|
//# sourceMappingURL=generate-reverse-index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/get-child-entry.ts
|
|
2
2
|
/**
|
|
3
3
|
* Recursively searches for and returns the first child node (including the given node itself)
|
|
4
4
|
* of a specific type within the provided node's subtree.
|
|
@@ -16,7 +16,6 @@ var getChildEntry = (type, node) => {
|
|
|
16
16
|
}
|
|
17
17
|
return null;
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { getChildEntry };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=get-child-entry.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/has-children.ts
|
|
2
2
|
/**
|
|
3
3
|
* Type guard to check if the given Item has a non-empty array of children.
|
|
4
4
|
* Returns true if `currentItem` has a `children` property that is an array with at least one element.
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
var hasChildren = (currentItem) => {
|
|
7
7
|
return "children" in currentItem && Array.isArray(currentItem.children) && currentItem.children.length > 0;
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { hasChildren };
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=has-children.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hasChildren } from "./has-children.js";
|
|
2
|
-
|
|
2
|
+
// src/helpers/is-sidebar-folder.ts
|
|
3
3
|
/**
|
|
4
4
|
* Determines if a sidebar item should be treated as a "folder",
|
|
5
5
|
* i.e. a collapsible group, depending on the layout, its type,
|
|
@@ -20,7 +20,6 @@ var isSidebarFolder = (layout, item, hasEmptySlot, hideOperationDefaultExamples)
|
|
|
20
20
|
if (layout === "reference") return item.type !== "operation" && item.type !== "webhook" && item.type !== "asyncapi-operation";
|
|
21
21
|
return false;
|
|
22
22
|
};
|
|
23
|
-
//#endregion
|
|
24
23
|
export { isSidebarFolder };
|
|
25
24
|
|
|
26
25
|
//# sourceMappingURL=is-sidebar-folder.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/scroll-sidebar-to-top.ts
|
|
2
2
|
var DEFAULT_SCROLL_OFFSET_TOP = 100;
|
|
3
3
|
/**
|
|
4
4
|
* Returns the element that should be used for vertical position measurement.
|
|
@@ -42,7 +42,6 @@ var scrollSidebarToTop = (id, offsetTop = DEFAULT_SCROLL_OFFSET_TOP) => {
|
|
|
42
42
|
const targetTop = getTopRelativeToScroller(getMeasurableElement(element), scroller) + getHeadingOffset(element) - offsetTop;
|
|
43
43
|
scroller.scrollTo({ top: targetTop > 0 ? targetTop : 0 });
|
|
44
44
|
};
|
|
45
|
-
//#endregion
|
|
46
45
|
export { scrollSidebarToTop };
|
|
47
46
|
|
|
48
47
|
//# sourceMappingURL=scroll-sidebar-to-top.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, ref, toValue } from "vue";
|
|
2
2
|
import { cva } from "@scalar/use-hooks/useBindCx";
|
|
3
|
-
|
|
3
|
+
// src/hooks/use-draggable.ts
|
|
4
4
|
/**
|
|
5
5
|
* Simple throttle function to avoid package dependencies
|
|
6
6
|
*/
|
|
@@ -114,7 +114,6 @@ function useDraggable(options) {
|
|
|
114
114
|
hoveredItem
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
//#endregion
|
|
118
117
|
export { useDraggable };
|
|
119
118
|
|
|
120
119
|
//# sourceMappingURL=use-draggable.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import HttpMethod_default from "./components/HttpMethod.vue.js";
|
|
2
|
-
import
|
|
3
|
-
import { useDraggable } from "./hooks/use-draggable.js";
|
|
2
|
+
import ScalarSidebar_default from "./components/ScalarSidebar.vue.js";
|
|
4
3
|
import SidebarHttpBadge_default from "./components/SidebarHttpBadge.vue.js";
|
|
5
4
|
import SidebarItem_default from "./components/SidebarItem.vue.js";
|
|
6
|
-
import ScalarSidebar_default from "./components/ScalarSidebar.vue.js";
|
|
7
|
-
import { generateReverseIndex } from "./helpers/generate-reverse-index.js";
|
|
8
5
|
import { createSidebarState } from "./helpers/create-sidebar-state.js";
|
|
6
|
+
import { filterItems } from "./helpers/filter-items.js";
|
|
7
|
+
import { generateReverseIndex } from "./helpers/generate-reverse-index.js";
|
|
9
8
|
import { getChildEntry } from "./helpers/get-child-entry.js";
|
|
10
9
|
import { scrollSidebarToTop } from "./helpers/scroll-sidebar-to-top.js";
|
|
10
|
+
import { useDraggable } from "./hooks/use-draggable.js";
|
|
11
11
|
export { HttpMethod_default as HttpMethod, ScalarSidebar_default as ScalarSidebar, SidebarHttpBadge_default as SidebarHttpBadge, SidebarItem_default as SidebarItem, createSidebarState, filterItems, generateReverseIndex, getChildEntry, scrollSidebarToTop, useDraggable };
|
package/dist/style.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties {
|
|
3
|
-
@supports (((-webkit-hyphens: none)) and (not (margin-trim:
|
|
3
|
+
@supports (((-webkit-hyphens: none)) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
4
4
|
*, :before, :after, ::backdrop {
|
|
5
5
|
--tw-font-weight: initial;
|
|
6
6
|
--tw-shadow: 0 0 #0000;
|
|
@@ -744,6 +744,14 @@
|
|
|
744
744
|
border-radius: var(--scalar-radius-xl);
|
|
745
745
|
}
|
|
746
746
|
|
|
747
|
+
:where(.scalar-card.p-1 > .scalar-card-header:first-child:not(:last-child)) {
|
|
748
|
+
margin-block: -2px 2px;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
:where(.scalar-card.p-1 > .scalar-card-footer:last-child:not(:first-child)) {
|
|
752
|
+
margin-block: 2px -2px;
|
|
753
|
+
}
|
|
754
|
+
|
|
747
755
|
.scalar-app .hljs-regexp, .scalar-app .hljs-string, .scalar-app .hljs-built_in, .scalar-app .hljs-subst, .scalar-app .hljs-name, .scalar-app .hljs-doctag, .scalar-app .hljs-section, .scalar-app .hljs-title {
|
|
748
756
|
color: var(--scalar-color-blue);
|
|
749
757
|
}
|
|
@@ -1720,7 +1728,7 @@
|
|
|
1720
1728
|
}
|
|
1721
1729
|
|
|
1722
1730
|
.group\/item.group\/nested-items-open > * > .group\/items.translate-x-0 .group\/button {
|
|
1723
|
-
max-height:
|
|
1731
|
+
max-height: 2147483647px;
|
|
1724
1732
|
display: flex;
|
|
1725
1733
|
}
|
|
1726
1734
|
|
|
@@ -3896,47 +3904,47 @@
|
|
|
3896
3904
|
}
|
|
3897
3905
|
|
|
3898
3906
|
@media (hover: hover) {
|
|
3899
|
-
.scalar-app .group-hover\:text-c-1
|
|
3907
|
+
:is(:where(.group):hover :is(.scalar-app .group-hover\:text-c-1)) {
|
|
3900
3908
|
color: var(--scalar-color-1);
|
|
3901
3909
|
}
|
|
3902
3910
|
|
|
3903
|
-
.scalar-app .group-hover\/button\:bg-sidebar-indent-border-hover
|
|
3911
|
+
:is(:where(.group\/button):hover :is(.scalar-app .group-hover\/button\:bg-sidebar-indent-border-hover)) {
|
|
3904
3912
|
background-color: var(--scalar-sidebar-indent-border-hover, var(--scalar-border-color));
|
|
3905
3913
|
}
|
|
3906
3914
|
|
|
3907
|
-
.scalar-app .group-hover\/button\:text-c-header-1
|
|
3915
|
+
:is(:where(.group\/button):hover :is(.scalar-app .group-hover\/button\:text-c-header-1)) {
|
|
3908
3916
|
color: var(--scalar-header-color-1, var(--scalar-color-1));
|
|
3909
3917
|
}
|
|
3910
3918
|
|
|
3911
|
-
.scalar-app .group-hover\/button\:opacity-0
|
|
3919
|
+
:is(:where(.group\/button):hover :is(.scalar-app .group-hover\/button\:opacity-0)) {
|
|
3912
3920
|
opacity: 0;
|
|
3913
3921
|
}
|
|
3914
3922
|
|
|
3915
|
-
.scalar-app .group-hover\/copy-button\:bg-b-1\.5
|
|
3923
|
+
:is(:where(.group\/copy-button):hover :is(.scalar-app .group-hover\/copy-button\:bg-b-1\.5)) {
|
|
3916
3924
|
background-color: var(--scalar-background-1);
|
|
3917
3925
|
}
|
|
3918
3926
|
|
|
3919
3927
|
@supports (color: color-mix(in lab, red, red)) {
|
|
3920
|
-
.scalar-app .group-hover\/copy-button\:bg-b-1\.5
|
|
3928
|
+
:is(:where(.group\/copy-button):hover :is(.scalar-app .group-hover\/copy-button\:bg-b-1\.5)) {
|
|
3921
3929
|
background-color: color-mix(in srgb, var(--scalar-background-1), var(--scalar-background-2));
|
|
3922
3930
|
}
|
|
3923
3931
|
}
|
|
3924
3932
|
}
|
|
3925
3933
|
|
|
3926
|
-
.scalar-app .group-focus-visible\/button\:opacity-0
|
|
3934
|
+
:is(:where(.group\/button):focus-visible :is(.scalar-app .group-focus-visible\/button\:opacity-0)) {
|
|
3927
3935
|
opacity: 0;
|
|
3928
3936
|
}
|
|
3929
3937
|
|
|
3930
|
-
|
|
3938
|
+
:is(:where(.group\/toggle):focus-visible :is(.scalar-app .group-focus-visible\/toggle\:outline)) {
|
|
3931
3939
|
outline-style: var(--tw-outline-style);
|
|
3932
3940
|
outline-width: 1px;
|
|
3933
3941
|
}
|
|
3934
3942
|
|
|
3935
|
-
.scalar-app .group-has-\[\~\*_\[aria-expanded\=true\]\]\/button\:opacity-0:is(:where(.group\/button):has( ~
|
|
3943
|
+
:is(:where(.group\/button):has( ~ * [aria-expanded="true"]) :is(.scalar-app .group-has-\[\~\*_\[aria-expanded\=true\]\]\/button\:opacity-0)), :is(:where(.group\/button):has( ~ :focus-within) :is(.scalar-app .group-has-\[\~\*\:focus-within\]\/button\:opacity-0)), :is(:where(.group\/button):has( ~ :hover) :is(.scalar-app .group-has-\[\~\*\:hover\]\/button\:opacity-0)) {
|
|
3936
3944
|
opacity: 0;
|
|
3937
3945
|
}
|
|
3938
3946
|
|
|
3939
|
-
|
|
3947
|
+
:is(:is(:where(.group\/copy-button):hover, :where(.group\/copy-button):focus-visible) :is(.scalar-app .group-hocus\/copy-button\:sr-only)) {
|
|
3940
3948
|
clip-path: inset(50%);
|
|
3941
3949
|
white-space: nowrap;
|
|
3942
3950
|
border-width: 0;
|
|
@@ -3948,7 +3956,7 @@
|
|
|
3948
3956
|
overflow: hidden;
|
|
3949
3957
|
}
|
|
3950
3958
|
|
|
3951
|
-
|
|
3959
|
+
:is(:is(:where(.group\/copy-button):hover, :where(.group\/copy-button):focus-visible) :is(.scalar-app .group-hocus\/copy-button\:not-sr-only)) {
|
|
3952
3960
|
clip-path: none;
|
|
3953
3961
|
white-space: normal;
|
|
3954
3962
|
width: auto;
|
|
@@ -3959,29 +3967,29 @@
|
|
|
3959
3967
|
overflow: visible;
|
|
3960
3968
|
}
|
|
3961
3969
|
|
|
3962
|
-
|
|
3970
|
+
:is(:is(:where(.group\/copy-button):hover, :where(.group\/copy-button):focus-visible) :is(.scalar-app .group-hocus\/copy-button\:block)) {
|
|
3963
3971
|
display: block;
|
|
3964
3972
|
}
|
|
3965
3973
|
|
|
3966
|
-
|
|
3974
|
+
:is(:is(:where(.group\/code-block):hover, :where(.group\/code-block):focus-within) :is(.scalar-app .group-hocus-within\/code-block\:-left-0\.5)) {
|
|
3967
3975
|
left: -2px;
|
|
3968
3976
|
}
|
|
3969
3977
|
|
|
3970
|
-
|
|
3978
|
+
:is(:is(:where(.group\/code-block):hover, :where(.group\/code-block):focus-within) :is(.scalar-app .group-hocus-within\/code-block\:inline)) {
|
|
3971
3979
|
display: inline;
|
|
3972
3980
|
}
|
|
3973
3981
|
|
|
3974
|
-
|
|
3982
|
+
:is(:is(:where(.group\/code-block):hover, :where(.group\/code-block):focus-within) :is(.scalar-app .group-hocus-within\/code-block\:opacity-100)) {
|
|
3975
3983
|
opacity: 1;
|
|
3976
3984
|
}
|
|
3977
3985
|
|
|
3978
3986
|
@media (hover: hover) {
|
|
3979
|
-
|
|
3987
|
+
:is(:where(.peer\/button):hover ~ :is(.scalar-app .peer-hover\/button\:opacity-100)) {
|
|
3980
3988
|
opacity: 1;
|
|
3981
3989
|
}
|
|
3982
3990
|
}
|
|
3983
3991
|
|
|
3984
|
-
|
|
3992
|
+
:is(:where(.peer\/button):focus-visible ~ :is(.scalar-app .peer-focus-visible\/button\:opacity-100)) {
|
|
3985
3993
|
opacity: 1;
|
|
3986
3994
|
}
|
|
3987
3995
|
|
|
@@ -4273,12 +4281,12 @@
|
|
|
4273
4281
|
}
|
|
4274
4282
|
|
|
4275
4283
|
@media (hover: hover) {
|
|
4276
|
-
.scalar-app .dark\:group-hover\/copy-button\:bg-b-1\.5:where(.dark-mode, .dark-mode *)
|
|
4284
|
+
:is(:where(.group\/copy-button):hover :is(.scalar-app .dark\:group-hover\/copy-button\:bg-b-1\.5:where(.dark-mode, .dark-mode *))) {
|
|
4277
4285
|
background-color: var(--scalar-background-1);
|
|
4278
4286
|
}
|
|
4279
4287
|
|
|
4280
4288
|
@supports (color: color-mix(in lab, red, red)) {
|
|
4281
|
-
.scalar-app .dark\:group-hover\/copy-button\:bg-b-1\.5:where(.dark-mode, .dark-mode *)
|
|
4289
|
+
:is(:where(.group\/copy-button):hover :is(.scalar-app .dark\:group-hover\/copy-button\:bg-b-1\.5:where(.dark-mode, .dark-mode *))) {
|
|
4282
4290
|
background-color: color-mix(in srgb, var(--scalar-background-1), var(--scalar-background-2));
|
|
4283
4291
|
}
|
|
4284
4292
|
}
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "git+https://github.com/scalar/scalar.git",
|
|
11
11
|
"directory": "packages/sidebar"
|
|
12
12
|
},
|
|
13
|
-
"version": "0.12.
|
|
13
|
+
"version": "0.12.12",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=22"
|
|
16
16
|
},
|
|
@@ -32,25 +32,25 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@scalar/components": "0.35.
|
|
36
|
-
"@scalar/helpers": "0.18.
|
|
37
|
-
"@scalar/icons": "0.7.
|
|
38
|
-
"@scalar/themes": "0.20.
|
|
39
|
-
"@scalar/use-hooks": "0.4.
|
|
40
|
-
"@scalar/workspace-store": "0.
|
|
41
|
-
"vue": "^3.5.
|
|
35
|
+
"@scalar/components": "0.35.2",
|
|
36
|
+
"@scalar/helpers": "0.18.1",
|
|
37
|
+
"@scalar/icons": "0.7.11",
|
|
38
|
+
"@scalar/themes": "0.20.3",
|
|
39
|
+
"@scalar/use-hooks": "0.4.28",
|
|
40
|
+
"@scalar/workspace-store": "0.74.0",
|
|
41
|
+
"vue": "^3.5.45"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@tailwindcss/cli": "^4.3.
|
|
45
|
-
"@tailwindcss/vite": "^4.3.
|
|
44
|
+
"@tailwindcss/cli": "^4.3.5",
|
|
45
|
+
"@tailwindcss/vite": "^4.3.5",
|
|
46
46
|
"@types/jsdom": "30.0.0",
|
|
47
47
|
"@types/node": "^24.19.2",
|
|
48
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
49
|
-
"@vue/test-utils": "2.
|
|
48
|
+
"@vitejs/plugin-vue": "^6.0.11",
|
|
49
|
+
"@vue/test-utils": "2.6.0",
|
|
50
50
|
"jsdom": "30.1.3",
|
|
51
|
-
"tailwindcss": "^4.3.
|
|
52
|
-
"vite": "8.3.
|
|
53
|
-
"vitest": "5.0
|
|
51
|
+
"tailwindcss": "^4.3.5",
|
|
52
|
+
"vite": "8.3.8",
|
|
53
|
+
"vitest": "5.1.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "vite build && pnpm build:styles && vue-tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|