@scalar/sidebar 0.12.2 → 0.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/components/HttpMethod.vue.js +1 -1
  2. package/dist/components/HttpMethod.vue.js.map +1 -1
  3. package/dist/components/{HttpMethod.vue.script.js → HttpMethod.vue_vue_type_script_setup_true_lang.js} +1 -1
  4. package/dist/components/HttpMethod.vue_vue_type_script_setup_true_lang.js.map +1 -0
  5. package/dist/components/ScalarSidebar.vue.d.ts +1 -1
  6. package/dist/components/ScalarSidebar.vue.js +1 -1
  7. package/dist/components/ScalarSidebar.vue.js.map +1 -1
  8. package/dist/components/{ScalarSidebar.vue.script.js → ScalarSidebar.vue_vue_type_script_setup_true_lang.js} +1 -1
  9. package/dist/components/ScalarSidebar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  10. package/dist/components/SidebarHttpBadge.vue.js +2 -2
  11. package/dist/components/SidebarHttpBadge.vue.js.map +1 -1
  12. package/dist/components/{SidebarHttpBadge.vue.script.js → SidebarHttpBadge.vue_vue_type_script_setup_true_lang.js} +1 -1
  13. package/dist/components/SidebarHttpBadge.vue_vue_type_script_setup_true_lang.js.map +1 -0
  14. package/dist/components/SidebarItem.vue.d.ts +1 -1
  15. package/dist/components/SidebarItem.vue.js +1 -1
  16. package/dist/components/SidebarItem.vue.js.map +1 -1
  17. package/dist/components/{SidebarItem.vue.script.js → SidebarItem.vue_vue_type_script_setup_true_lang.js} +1 -1
  18. package/dist/components/SidebarItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  19. package/dist/components/SidebarItemDecorator.vue.js.map +1 -1
  20. package/dist/components/SidebarItemLabel.vue.d.ts +1 -1
  21. package/dist/components/SidebarItemLabel.vue.js +1 -1
  22. package/dist/components/SidebarItemLabel.vue.js.map +1 -1
  23. package/dist/components/{SidebarItemLabel.vue.script.js → SidebarItemLabel.vue_vue_type_script_setup_true_lang.js} +1 -1
  24. package/dist/components/SidebarItemLabel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  25. package/dist/helpers/filter-items.d.ts +2 -2
  26. package/dist/helpers/filter-items.d.ts.map +1 -1
  27. package/dist/helpers/filter-items.js +5 -1
  28. package/dist/helpers/filter-items.js.map +1 -1
  29. package/dist/helpers/has-children.d.ts +1 -1
  30. package/dist/helpers/is-sidebar-folder.d.ts +1 -1
  31. package/dist/helpers/is-sidebar-folder.js +1 -1
  32. package/dist/helpers/is-sidebar-folder.js.map +1 -1
  33. package/dist/style.css +44 -31
  34. package/package.json +14 -14
  35. package/dist/components/HttpMethod.vue.script.js.map +0 -1
  36. package/dist/components/ScalarSidebar.vue.script.js.map +0 -1
  37. package/dist/components/SidebarHttpBadge.vue.script.js.map +0 -1
  38. package/dist/components/SidebarItem.vue.script.js.map +0 -1
  39. package/dist/components/SidebarItemLabel.vue.script.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import HttpMethod_vue_vue_type_script_setup_true_lang_default from "./HttpMethod.vue.script.js";
1
+ import HttpMethod_vue_vue_type_script_setup_true_lang_default from "./HttpMethod.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/components/HttpMethod.vue
3
3
  var HttpMethod_default = HttpMethod_vue_vue_type_script_setup_true_lang_default;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"HttpMethod.vue.js","names":[],"sources":["../../src/components/HttpMethod.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getHttpMethodInfo } from '@scalar/helpers/http/http-info'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { computed, type Component } from 'vue'\n\nconst props = defineProps<{\n /** The type of element to render as, defaults to `span` */\n as?: Component | string\n /** The css style property or variable that will be set to the request method color, defaults to `color` */\n property?: string\n /** Whether or not to abbreviated the slot content */\n short?: boolean\n /** The HTTP method to show */\n method: HttpMethod | string\n}>()\n\n/** Grabs the method info object which contains abbreviation, color, and background color etc */\nconst httpMethodInfo = computed(() =>\n getHttpMethodInfo(String(props.method || '')),\n)\n\n/** Full method name */\nconst normalized = computed(() => {\n if (typeof props.method !== 'string' || !props.method.trim()) {\n return 'get'\n }\n const method = props.method.trim()\n return isHttpMethod(method.toLowerCase()) ? method.toLowerCase() : method\n})\n</script>\n\n<template>\n <component\n :is=\"as ?? 'span'\"\n :class=\"{ uppercase: isHttpMethod(normalized) }\"\n :style=\"{ [property || 'color']: httpMethodInfo.colorVar }\">\n <slot />\n {{ short ? httpMethodInfo.short : normalized }}\n </component>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"HttpMethod.vue.js","names":["_sfc_main"],"sources":["../../src/components/HttpMethod.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getHttpMethodInfo } from '@scalar/helpers/http/http-info'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { computed, type Component } from 'vue'\n\nconst props = defineProps<{\n /** The type of element to render as, defaults to `span` */\n as?: Component | string\n /** The css style property or variable that will be set to the request method color, defaults to `color` */\n property?: string\n /** Whether or not to abbreviated the slot content */\n short?: boolean\n /** The HTTP method to show */\n method: HttpMethod | string\n}>()\n\n/** Grabs the method info object which contains abbreviation, color, and background color etc */\nconst httpMethodInfo = computed(() =>\n getHttpMethodInfo(String(props.method || '')),\n)\n\n/** Full method name */\nconst normalized = computed(() => {\n if (typeof props.method !== 'string' || !props.method.trim()) {\n return 'get'\n }\n const method = props.method.trim()\n return isHttpMethod(method.toLowerCase()) ? method.toLowerCase() : method\n})\n</script>\n\n<template>\n <component\n :is=\"as ?? 'span'\"\n :class=\"{ uppercase: isHttpMethod(normalized) }\"\n :style=\"{ [property || 'color']: httpMethodInfo.colorVar }\">\n <slot />\n {{ short ? httpMethodInfo.short : normalized }}\n </component>\n</template>\n"],"mappings":""}
@@ -34,4 +34,4 @@ var HttpMethod_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
34
34
  //#endregion
35
35
  export { HttpMethod_vue_vue_type_script_setup_true_lang_default as default };
36
36
 
37
- //# sourceMappingURL=HttpMethod.vue.script.js.map
37
+ //# sourceMappingURL=HttpMethod.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpMethod.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_unref","_normalizeStyle","_withCtx","_renderSlot","_createTextVNode","_toDisplayString"],"sources":["../../src/components/HttpMethod.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getHttpMethodInfo } from '@scalar/helpers/http/http-info'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { computed, type Component } from 'vue'\n\nconst props = defineProps<{\n /** The type of element to render as, defaults to `span` */\n as?: Component | string\n /** The css style property or variable that will be set to the request method color, defaults to `color` */\n property?: string\n /** Whether or not to abbreviated the slot content */\n short?: boolean\n /** The HTTP method to show */\n method: HttpMethod | string\n}>()\n\n/** Grabs the method info object which contains abbreviation, color, and background color etc */\nconst httpMethodInfo = computed(() =>\n getHttpMethodInfo(String(props.method || '')),\n)\n\n/** Full method name */\nconst normalized = computed(() => {\n if (typeof props.method !== 'string' || !props.method.trim()) {\n return 'get'\n }\n const method = props.method.trim()\n return isHttpMethod(method.toLowerCase()) ? method.toLowerCase() : method\n})\n</script>\n\n<template>\n <component\n :is=\"as ?? 'span'\"\n :class=\"{ uppercase: isHttpMethod(normalized) }\"\n :style=\"{ [property || 'color']: httpMethodInfo.colorVar }\">\n <slot />\n {{ short ? httpMethodInfo.short : normalized }}\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;EAMA,MAAM,QAAQ;;EAYd,MAAM,iBAAiB,eACrB,kBAAkB,OAAO,MAAM,UAAU,EAAE,CAAC,CAC9C;;EAGA,MAAM,aAAa,eAAe;GAChC,IAAI,OAAO,MAAM,WAAW,YAAY,CAAC,MAAM,OAAO,KAAK,GACzD,OAAO;GAET,MAAM,SAAS,MAAM,OAAO,KAAK;GACjC,OAAO,aAAa,OAAO,YAAY,CAAC,IAAI,OAAO,YAAY,IAAI;EACrE,CAAC;;GAIC,OAAAA,UAAA,GAAAC,YAMYC,wBALL,QAAA,MAAE,MAAA,GAAA;IACN,OAAKC,eAAA,EAAA,WAAeC,MAAA,YAAA,CAAY,CAAC,WAAA,KAAU,EAAA,CAAA;IAC3C,OAAKC,eAAA,GAAK,QAAA,YAAQ,UAAc,eAAA,MAAe,SAAQ,CAAA;;IACxD,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,GAAAC,gBAAA,MACRC,gBAAG,QAAA,QAAQ,eAAA,MAAe,QAAQ,WAAA,KAAU,GAAA,CAAA,C"}
@@ -1,5 +1,5 @@
1
1
  import type { DraggingItem, HoveredItem, UseDraggableOptions } from '../hooks/use-draggable.js';
2
- import type { Item, Layout, SidebarOptions } from '../types';
2
+ import type { Item, Layout, SidebarOptions } from '../types.js';
3
3
  type __VLS_Props = {
4
4
  /**
5
5
  * Layout type for the sidebar.
@@ -1,4 +1,4 @@
1
- import ScalarSidebar_vue_vue_type_script_setup_true_lang_default from "./ScalarSidebar.vue.script.js";
1
+ import ScalarSidebar_vue_vue_type_script_setup_true_lang_default from "./ScalarSidebar.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/components/ScalarSidebar.vue
3
3
  var ScalarSidebar_default = ScalarSidebar_vue_vue_type_script_setup_true_lang_default;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebar.vue.js","names":[],"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":""}
1
+ {"version":3,"file":"ScalarSidebar.vue.js","names":["_sfc_main"],"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":""}
@@ -92,4 +92,4 @@ var ScalarSidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
92
92
  //#endregion
93
93
  export { ScalarSidebar_vue_vue_type_script_setup_true_lang_default as default };
94
94
 
95
- //# sourceMappingURL=ScalarSidebar.vue.script.js.map
95
+ //# sourceMappingURL=ScalarSidebar.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +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","_createSlots","_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,aAFnBO,WAEmB,EAAA,SAAA,KAAA,GAAT,KAAK,CAAA,C;;;QAGT,MAAM,Q;SACX,MAAA;SACD,IAAAR,SADQ,UAAK,CACbC,WAEmB,KAAA,QAAA,SAFnBO,WAEmB,EAAA,SAAA,KAAA,GAAT,KAAK,CAAA,C;;;QAGT,MAAM,O;SACX,MAAA;SACD,IAAAR,SADO,UAAK,CACZC,WAEmB,KAAA,QAAA,QAFnBO,WAEmB,EAAA,SAAA,KAAA,GAAT,KAAK,CAAA,C;;;;;;;;;;;;;;;K,IAKrBP,WAEO,KAAA,QAAA,UAAA,CAAA,SAAA,CADL,OAAA,OAAA,OAAA,KAAAQ,mBAA0B,OAAA,EAArB,OAAM,SAAQ,GAAA,MAAA,EAAA,E;KAGvBR,WAAsB,KAAA,QAAA,QAAA"}
@@ -1,6 +1,6 @@
1
1
  import _plugin_vue_export_helper_default from "../_virtual/_plugin-vue_export-helper.js";
2
- import SidebarHttpBadge_vue_vue_type_script_setup_true_lang_default from "./SidebarHttpBadge.vue.script.js";
3
- /* empty css */
2
+ import SidebarHttpBadge_vue_vue_type_script_setup_true_lang_default from "./SidebarHttpBadge.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
4
  //#region 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
6
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarHttpBadge.vue.js","names":[],"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' }}:&nbsp;</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":""}
1
+ {"version":3,"file":"SidebarHttpBadge.vue.js","names":["_sfc_main"],"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' }}:&nbsp;</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":""}
@@ -37,4 +37,4 @@ var SidebarHttpBadge_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
37
37
  //#endregion
38
38
  export { SidebarHttpBadge_vue_vue_type_script_setup_true_lang_default as default };
39
39
 
40
- //# sourceMappingURL=SidebarHttpBadge.vue.script.js.map
40
+ //# sourceMappingURL=SidebarHttpBadge.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +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","_createCommentVNode"],"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' }}:&nbsp;</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,5 +1,5 @@
1
1
  import { type DraggingItem, type HoveredItem, type UseDraggableOptions } from '../hooks/use-draggable.js';
2
- import type { Item, Layout, SidebarOptions } from '../types';
2
+ import type { Item, Layout, SidebarOptions } from '../types.js';
3
3
  type __VLS_Props = {
4
4
  /**
5
5
  * The sidebar item to render.
@@ -1,4 +1,4 @@
1
- import SidebarItem_vue_vue_type_script_setup_true_lang_default from "./SidebarItem.vue.script.js";
1
+ import SidebarItem_vue_vue_type_script_setup_true_lang_default from "./SidebarItem.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/components/SidebarItem.vue
3
3
  var SidebarItem_default = SidebarItem_vue_vue_type_script_setup_true_lang_default;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarItem.vue.js","names":[],"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":["_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":""}
@@ -353,4 +353,4 @@ var SidebarItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
353
353
  //#endregion
354
354
  export { SidebarItem_vue_vue_type_script_setup_true_lang_default as default };
355
355
 
356
- //# sourceMappingURL=SidebarItem.vue.script.js.map
356
+ //# sourceMappingURL=SidebarItem.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +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,Q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,E,6MAC2R,MAAM,U;MAK3T,OAAO,QAAA,SAAS,QAAQ;MACxB,QAAQ,QAAA,KAAK;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 +1 @@
1
- {"version":3,"file":"SidebarItemDecorator.vue.js","names":[],"sources":["../../src/components/SidebarItemDecorator.vue"],"sourcesContent":["<template>\n <div\n 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\">\n <slot />\n </div>\n</template>\n"],"mappings":";;;;mBAEI,OAAM,uNAAsN;;qBAD9N,mBAGM,OAHN,YAGM,CADJ,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"SidebarItemDecorator.vue.js","names":["_openBlock","_createElementBlock","_renderSlot"],"sources":["../../src/components/SidebarItemDecorator.vue"],"sourcesContent":["<template>\n <div\n 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\">\n <slot />\n </div>\n</template>\n"],"mappings":";;;;AAEI,IAAA,aAAA,EAAA,OAAM,uNAAsN;;CAD9N,OAAAA,UAAA,GAAAC,mBAGM,OAHN,YAGM,CADJC,WAAQ,KAAA,QAAA,SAAA,C"}
@@ -1,4 +1,4 @@
1
- import type { Item } from '../types';
1
+ import type { Item } from '../types.js';
2
2
  type __VLS_Props = {
3
3
  /**
4
4
  * The sidebar item to render.
@@ -1,4 +1,4 @@
1
- import SidebarItemLabel_vue_vue_type_script_setup_true_lang_default from "./SidebarItemLabel.vue.script.js";
1
+ import SidebarItemLabel_vue_vue_type_script_setup_true_lang_default from "./SidebarItemLabel.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/components/SidebarItemLabel.vue
3
3
  var SidebarItemLabel_default = SidebarItemLabel_vue_vue_type_script_setup_true_lang_default;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarItemLabel.vue.js","names":[],"sources":["../../src/components/SidebarItemLabel.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\n\nimport type { Item } from '@/types'\n\nconst { item } = defineProps<{\n /**\n * The sidebar item to render.\n */\n item: Item\n /**\n * The source of the operation title.\n */\n operationTitleSource?: 'path' | 'summary'\n}>()\n</script>\n<template>\n <ScalarWrappingText\n v-if=\"item.type === 'model' || item.type === 'example'\"\n preset=\"property\"\n :text=\"item.title\" />\n <ScalarWrappingText\n v-else\n :text=\"\n operationTitleSource === 'path' && 'path' in item\n ? (item.path as string)\n : (item.title as string)\n \" />\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SidebarItemLabel.vue.js","names":["_sfc_main"],"sources":["../../src/components/SidebarItemLabel.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\n\nimport type { Item } from '@/types'\n\nconst { item } = defineProps<{\n /**\n * The sidebar item to render.\n */\n item: Item\n /**\n * The source of the operation title.\n */\n operationTitleSource?: 'path' | 'summary'\n}>()\n</script>\n<template>\n <ScalarWrappingText\n v-if=\"item.type === 'model' || item.type === 'example'\"\n preset=\"property\"\n :text=\"item.title\" />\n <ScalarWrappingText\n v-else\n :text=\"\n operationTitleSource === 'path' && 'path' in item\n ? (item.path as string)\n : (item.title as string)\n \" />\n</template>\n"],"mappings":""}
@@ -23,4 +23,4 @@ var SidebarItemLabel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
23
23
  //#endregion
24
24
  export { SidebarItemLabel_vue_vue_type_script_setup_true_lang_default as default };
25
25
 
26
- //# sourceMappingURL=SidebarItemLabel.vue.script.js.map
26
+ //# sourceMappingURL=SidebarItemLabel.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarItemLabel.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref"],"sources":["../../src/components/SidebarItemLabel.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\n\nimport type { Item } from '@/types'\n\nconst { item } = defineProps<{\n /**\n * The sidebar item to render.\n */\n item: Item\n /**\n * The source of the operation title.\n */\n operationTitleSource?: 'path' | 'summary'\n}>()\n</script>\n<template>\n <ScalarWrappingText\n v-if=\"item.type === 'model' || item.type === 'example'\"\n preset=\"property\"\n :text=\"item.title\" />\n <ScalarWrappingText\n v-else\n :text=\"\n operationTitleSource === 'path' && 'path' in item\n ? (item.path as string)\n : (item.title as string)\n \" />\n</template>\n"],"mappings":";;;;;;;;;;;GAkBU,OAAA,QAAA,KAAK,SAAI,WAAgB,QAAA,KAAK,SAAI,aAD1CA,UAAA,GAAAC,YAGuBC,MAAA,kBAAA,GAAA;;IADrB,QAAO;IACN,MAAM,QAAA,KAAK;G,0BACdF,UAAA,GAAAC,YAMMC,MAAA,kBAAA,GAAA;;IAJH,MAAa,QAAA,yBAAoB,UAAA,UAAyB,QAAA,OAAgB,QAAA,KAAK,OAA2B,QAAA,KAAK"}
@@ -1,3 +1,3 @@
1
- import type { Item, Layout } from '../types';
2
- export declare const filterItems: (layout: Layout, items: Item[], hideOperationDefaultExamples?: boolean) => import("@scalar/workspace-store/schemas/navigation").TraversedEntry[];
1
+ import type { Item, Layout } from '../types.js';
2
+ export declare const filterItems: (layout: Layout, items: Item[], hideOperationDefaultExamples?: boolean) => Item[];
3
3
  //# sourceMappingURL=filter-items.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter-items.d.ts","sourceRoot":"","sources":["../../src/helpers/filter-items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAK3C,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,EAAE,OAAO,IAAI,EAAE,EAAE,+BAA+B,OAAO,0EAiBhG,CAAA"}
1
+ {"version":3,"file":"filter-items.d.ts","sourceRoot":"","sources":["../../src/helpers/filter-items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAK3C,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,EAAE,OAAO,IAAI,EAAE,EAAE,+BAA+B,OAAO,KAAG,IAAI,EA2BvG,CAAA"}
@@ -9,7 +9,11 @@ var API_CLIENT_TYPES_SET = /* @__PURE__ */ new Set([
9
9
  ]);
10
10
  var filterItems = (layout, items, hideOperationDefaultExamples) => {
11
11
  if (hideOperationDefaultExamples && items.length === 1 && items[0]?.type === "example" && items[0]?.name === "default") return [];
12
- if (layout === "reference") return items;
12
+ if (layout === "reference") return items.filter((item) => {
13
+ if (item.type === "asyncapi-message") return false;
14
+ if (item.type === "asyncapi-channel") return item.children?.some((child) => child.type === "asyncapi-operation") ?? false;
15
+ return true;
16
+ });
13
17
  return items.filter((c) => API_CLIENT_TYPES_SET.has(c.type));
14
18
  };
15
19
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"filter-items.js","names":[],"sources":["../../src/helpers/filter-items.ts"],"sourcesContent":["import type { Item, Layout } from '@/types'\n\n/** The type of items we want to */\nconst API_CLIENT_TYPES_SET = new Set(['document', 'operation', 'example', 'tag', 'webhook'])\n\nexport const filterItems = (layout: Layout, items: Item[], hideOperationDefaultExamples?: boolean) => {\n // If we are hiding the default examples and there is only one example and it is the default example, we don't want to show it\n if (\n hideOperationDefaultExamples &&\n items.length === 1 &&\n items[0]?.type === 'example' &&\n items[0]?.name === 'default'\n ) {\n return []\n }\n\n if (layout === 'reference') {\n return items\n }\n\n // For client layout, show entries that can open an HTTP request.\n return items.filter((c) => API_CLIENT_TYPES_SET.has(c.type))\n}\n"],"mappings":";;AAGA,IAAM,uCAAuB,IAAI,IAAI;CAAC;CAAY;CAAa;CAAW;CAAO;AAAS,CAAC;AAE3F,IAAa,eAAe,QAAgB,OAAe,iCAA2C;CAEpG,IACE,gCACA,MAAM,WAAW,KACjB,MAAM,EAAE,EAAE,SAAS,aACnB,MAAM,EAAE,EAAE,SAAS,WAEnB,OAAO,CAAC;CAGV,IAAI,WAAW,aACb,OAAO;CAIT,OAAO,MAAM,QAAQ,MAAM,qBAAqB,IAAI,EAAE,IAAI,CAAC;AAC7D"}
1
+ {"version":3,"file":"filter-items.js","names":[],"sources":["../../src/helpers/filter-items.ts"],"sourcesContent":["import type { Item, Layout } from '@/types'\n\n/** The type of items we want to */\nconst API_CLIENT_TYPES_SET = new Set(['document', 'operation', 'example', 'tag', 'webhook'])\n\nexport const filterItems = (layout: Layout, items: Item[], hideOperationDefaultExamples?: boolean): Item[] => {\n // If we are hiding the default examples and there is only one example and it is the default example, we don't want to show it\n if (\n hideOperationDefaultExamples &&\n items.length === 1 &&\n items[0]?.type === 'example' &&\n items[0]?.name === 'default'\n ) {\n return []\n }\n\n if (layout === 'reference') {\n // Message details remain available in content and search, while the sidebar focuses on operations.\n return items.filter((item) => {\n if (item.type === 'asyncapi-message') {\n return false\n }\n // A channel with only catalog messages has no operation to navigate to.\n if (item.type === 'asyncapi-channel') {\n return item.children?.some((child) => child.type === 'asyncapi-operation') ?? false\n }\n return true\n })\n }\n\n // For client layout, show entries that can open an HTTP request.\n return items.filter((c) => API_CLIENT_TYPES_SET.has(c.type))\n}\n"],"mappings":";;AAGA,IAAM,uCAAuB,IAAI,IAAI;CAAC;CAAY;CAAa;CAAW;CAAO;AAAS,CAAC;AAE3F,IAAa,eAAe,QAAgB,OAAe,iCAAmD;CAE5G,IACE,gCACA,MAAM,WAAW,KACjB,MAAM,EAAE,EAAE,SAAS,aACnB,MAAM,EAAE,EAAE,SAAS,WAEnB,OAAO,CAAC;CAGV,IAAI,WAAW,aAEb,OAAO,MAAM,QAAQ,SAAS;EAC5B,IAAI,KAAK,SAAS,oBAChB,OAAO;EAGT,IAAI,KAAK,SAAS,oBAChB,OAAO,KAAK,UAAU,MAAM,UAAU,MAAM,SAAS,oBAAoB,KAAK;EAEhF,OAAO;CACT,CAAC;CAIH,OAAO,MAAM,QAAQ,MAAM,qBAAqB,IAAI,EAAE,IAAI,CAAC;AAC7D"}
@@ -1,4 +1,4 @@
1
- import type { Item } from '../types';
1
+ import type { Item } from '../types.js';
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.
@@ -1,4 +1,4 @@
1
- import type { Item, Layout } from '../types';
1
+ import type { Item, Layout } from '../types.js';
2
2
  /**
3
3
  * Determines if a sidebar item should be treated as a "folder",
4
4
  * i.e. a collapsible group, depending on the layout, its type,
@@ -17,7 +17,7 @@ var isSidebarFolder = (layout, item, hasEmptySlot, hideOperationDefaultExamples)
17
17
  }
18
18
  if (hideOperationDefaultExamples && item.type === "operation" && item.children?.length === 1 && item.children[0]?.type === "example" && item.children[0]?.name === "default") return false;
19
19
  if (layout === "client") return true;
20
- if (layout === "reference") return item.type !== "operation" && item.type !== "webhook";
20
+ if (layout === "reference") return item.type !== "operation" && item.type !== "webhook" && item.type !== "asyncapi-operation";
21
21
  return false;
22
22
  };
23
23
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"is-sidebar-folder.js","names":[],"sources":["../../src/helpers/is-sidebar-folder.ts"],"sourcesContent":["import { hasChildren } from '@/helpers/has-children'\nimport type { Item, Layout } from '@/types'\n\n/**\n * Determines if a sidebar item should be treated as a \"folder\",\n * i.e. a collapsible group, depending on the layout, its type,\n * whether it has children, and special slot rules.\n *\n * @param layout - The sidebar layout ('client' or 'reference')\n * @param item - The sidebar item to check\n * @param hasEmptySlot - True if there is an empty slot to display as a group (client layout only)\n * @returns True if the item should be rendered as a folder/group node\n */\nexport const isSidebarFolder = (\n layout: Layout,\n item: Item,\n hasEmptySlot: boolean,\n hideOperationDefaultExamples: boolean,\n): item is Item & { children?: Item[] } => {\n // If the item has no children, check if there is an empty slot.\n if (!hasChildren(item)) {\n // In 'client' layout, allow \"document\" or \"tag\" items to act as group if there's an empty slot\n if (layout === 'client' && hasEmptySlot) {\n return item.type === 'document' || item.type === 'tag'\n }\n // Otherwise, not a folder if it has no children\n return false\n }\n\n if (\n hideOperationDefaultExamples &&\n item.type === 'operation' &&\n item.children?.length === 1 &&\n item.children[0]?.type === 'example' &&\n item.children[0]?.name === 'default'\n ) {\n return false\n }\n\n // 'client' layout: any item with children is a folder\n if (layout === 'client') {\n return true\n }\n\n // 'reference' layout: only non-'operation' and non-'webhook' are groups/folders\n if (layout === 'reference') {\n return item.type !== 'operation' && item.type !== 'webhook'\n }\n\n // Fallback: not a folder in other cases/layouts\n return false\n}\n"],"mappings":";;;;;;;;;;;;AAaA,IAAa,mBACX,QACA,MACA,cACA,iCACyC;CAEzC,IAAI,CAAC,YAAY,IAAI,GAAG;EAEtB,IAAI,WAAW,YAAY,cACzB,OAAO,KAAK,SAAS,cAAc,KAAK,SAAS;EAGnD,OAAO;CACT;CAEA,IACE,gCACA,KAAK,SAAS,eACd,KAAK,UAAU,WAAW,KAC1B,KAAK,SAAS,EAAE,EAAE,SAAS,aAC3B,KAAK,SAAS,EAAE,EAAE,SAAS,WAE3B,OAAO;CAIT,IAAI,WAAW,UACb,OAAO;CAIT,IAAI,WAAW,aACb,OAAO,KAAK,SAAS,eAAe,KAAK,SAAS;CAIpD,OAAO;AACT"}
1
+ {"version":3,"file":"is-sidebar-folder.js","names":[],"sources":["../../src/helpers/is-sidebar-folder.ts"],"sourcesContent":["import { hasChildren } from '@/helpers/has-children'\nimport type { Item, Layout } from '@/types'\n\n/**\n * Determines if a sidebar item should be treated as a \"folder\",\n * i.e. a collapsible group, depending on the layout, its type,\n * whether it has children, and special slot rules.\n *\n * @param layout - The sidebar layout ('client' or 'reference')\n * @param item - The sidebar item to check\n * @param hasEmptySlot - True if there is an empty slot to display as a group (client layout only)\n * @returns True if the item should be rendered as a folder/group node\n */\nexport const isSidebarFolder = (\n layout: Layout,\n item: Item,\n hasEmptySlot: boolean,\n hideOperationDefaultExamples: boolean,\n): item is Item & { children?: Item[] } => {\n // If the item has no children, check if there is an empty slot.\n if (!hasChildren(item)) {\n // In 'client' layout, allow \"document\" or \"tag\" items to act as group if there's an empty slot\n if (layout === 'client' && hasEmptySlot) {\n return item.type === 'document' || item.type === 'tag'\n }\n // Otherwise, not a folder if it has no children\n return false\n }\n\n if (\n hideOperationDefaultExamples &&\n item.type === 'operation' &&\n item.children?.length === 1 &&\n item.children[0]?.type === 'example' &&\n item.children[0]?.name === 'default'\n ) {\n return false\n }\n\n // 'client' layout: any item with children is a folder\n if (layout === 'client') {\n return true\n }\n\n // Reference operations are leaf links; their message and example details stay in the content.\n if (layout === 'reference') {\n return item.type !== 'operation' && item.type !== 'webhook' && item.type !== 'asyncapi-operation'\n }\n\n // Fallback: not a folder in other cases/layouts\n return false\n}\n"],"mappings":";;;;;;;;;;;;AAaA,IAAa,mBACX,QACA,MACA,cACA,iCACyC;CAEzC,IAAI,CAAC,YAAY,IAAI,GAAG;EAEtB,IAAI,WAAW,YAAY,cACzB,OAAO,KAAK,SAAS,cAAc,KAAK,SAAS;EAGnD,OAAO;CACT;CAEA,IACE,gCACA,KAAK,SAAS,eACd,KAAK,UAAU,WAAW,KAC1B,KAAK,SAAS,EAAE,EAAE,SAAS,aAC3B,KAAK,SAAS,EAAE,EAAE,SAAS,WAE3B,OAAO;CAIT,IAAI,WAAW,UACb,OAAO;CAIT,IAAI,WAAW,aACb,OAAO,KAAK,SAAS,eAAe,KAAK,SAAS,aAAa,KAAK,SAAS;CAI/E,OAAO;AACT"}
package/dist/style.css CHANGED
@@ -728,7 +728,7 @@
728
728
  background-color: var(--scalar-background-3);
729
729
  }
730
730
 
731
- .toggle-icon-ellipse[data-v-60be8692] {
731
+ .toggle-icon-ellipse[data-v-8f507267] {
732
732
  background: var(--scalar-background-1);
733
733
  border-radius: 50%;
734
734
  width: 7px;
@@ -740,7 +740,7 @@
740
740
  box-shadow: inset 0 0 0 1px;
741
741
  }
742
742
 
743
- .toggle-icon-moon-mask[data-v-60be8692] {
743
+ .toggle-icon-moon-mask[data-v-8f507267] {
744
744
  background: var(--scalar-background-1);
745
745
  border: 1px solid;
746
746
  border-radius: 50%;
@@ -754,7 +754,7 @@
754
754
  transform: translate3d(4px, -4px, 0);
755
755
  }
756
756
 
757
- .toggle-icon-sun-ray[data-v-60be8692] {
757
+ .toggle-icon-sun-ray[data-v-8f507267] {
758
758
  background: currentColor;
759
759
  border-radius: 8px;
760
760
  width: 12px;
@@ -763,30 +763,30 @@
763
763
  position: absolute;
764
764
  }
765
765
 
766
- .toggle-icon-sun-ray[data-v-60be8692]:nth-of-type(2) {
766
+ .toggle-icon-sun-ray[data-v-8f507267]:nth-of-type(2) {
767
767
  transform: rotate(90deg);
768
768
  }
769
769
 
770
- .toggle-icon-sun-ray[data-v-60be8692]:nth-of-type(3) {
770
+ .toggle-icon-sun-ray[data-v-8f507267]:nth-of-type(3) {
771
771
  transform: rotate(45deg);
772
772
  }
773
773
 
774
- .toggle-icon-sun-ray[data-v-60be8692]:nth-of-type(4) {
774
+ .toggle-icon-sun-ray[data-v-8f507267]:nth-of-type(4) {
775
775
  transform: rotate(-45deg);
776
776
  }
777
777
 
778
- .toggle-icon-dark .toggle-icon-ellipse[data-v-60be8692] {
778
+ .toggle-icon-dark .toggle-icon-ellipse[data-v-8f507267] {
779
779
  width: 10px;
780
780
  height: 10px;
781
781
  -webkit-mask-image: radial-gradient(circle at 0 100%, pink 10px, #0000 12px);
782
782
  mask-image: radial-gradient(circle at 0 100%, pink 10px, #0000 12px);
783
783
  }
784
784
 
785
- .toggle-icon-dark .toggle-icon-sun-ray[data-v-60be8692] {
785
+ .toggle-icon-dark .toggle-icon-sun-ray[data-v-8f507267] {
786
786
  transform: scale(0);
787
787
  }
788
788
 
789
- .toggle-icon-dark .toggle-icon-moon-mask[data-v-60be8692] {
789
+ .toggle-icon-dark .toggle-icon-moon-mask[data-v-8f507267] {
790
790
  transform: translate3d(0, 0, 0);
791
791
  }
792
792
 
@@ -807,13 +807,13 @@
807
807
  word-break: normal;
808
808
  word-wrap: normal;
809
809
  tab-size: 4;
810
- line-height: 1.4;
811
810
  }
812
811
 
813
812
  .scalar-app code.hljs {
814
813
  all: unset;
815
814
  font-size: inherit;
816
815
  color: var(--scalar-color-2);
816
+ line-height: 1.4;
817
817
  font-family: var(--scalar-font-code);
818
818
  counter-reset: linenumber;
819
819
  }
@@ -1561,22 +1561,22 @@
1561
1561
  display: none;
1562
1562
  }
1563
1563
 
1564
- .scalar-modal-layout[data-v-5bb1dcc2] {
1565
- animation: .3s ease-in-out forwards fadein-layout-5bb1dcc2;
1564
+ .scalar-modal-layout[data-v-b002945c] {
1565
+ animation: .3s ease-in-out forwards fadein-layout-b002945c;
1566
1566
  }
1567
1567
 
1568
- .scalar-modal[data-v-5bb1dcc2] {
1568
+ .scalar-modal[data-v-b002945c] {
1569
1569
  box-shadow: var(--scalar-shadow-2);
1570
- animation: .3s ease-in-out .1s forwards fadein-modal-5bb1dcc2;
1570
+ animation: .3s ease-in-out .1s forwards fadein-modal-b002945c;
1571
1571
  transform: translate3d(0, 10px, 0);
1572
1572
  }
1573
1573
 
1574
- .scalar-modal-layout-full[data-v-5bb1dcc2] {
1574
+ .scalar-modal-layout-full[data-v-b002945c] {
1575
1575
  opacity: 1 !important;
1576
1576
  background: none !important;
1577
1577
  }
1578
1578
 
1579
- .modal-content-search .modal-body[data-v-5bb1dcc2] {
1579
+ .modal-content-search .modal-body[data-v-b002945c] {
1580
1580
  flex-direction: column;
1581
1581
  max-height: 440px;
1582
1582
  padding: 0;
@@ -1585,13 +1585,13 @@
1585
1585
  }
1586
1586
 
1587
1587
  @media (max-width: 720px) and (max-height: 480px) {
1588
- .scalar-modal-layout .scalar-modal[data-v-5bb1dcc2] {
1588
+ .scalar-modal-layout .scalar-modal[data-v-b002945c] {
1589
1589
  max-height: 90svh;
1590
1590
  margin-top: 5svh;
1591
1591
  }
1592
1592
  }
1593
1593
 
1594
- @keyframes fadein-layout-5bb1dcc2 {
1594
+ @keyframes fadein-layout-b002945c {
1595
1595
  0% {
1596
1596
  opacity: 0;
1597
1597
  }
@@ -1601,7 +1601,7 @@
1601
1601
  }
1602
1602
  }
1603
1603
 
1604
- @keyframes fadein-modal-5bb1dcc2 {
1604
+ @keyframes fadein-modal-b002945c {
1605
1605
  0% {
1606
1606
  opacity: 0;
1607
1607
  transform: translate3d(0, 10px, 0);
@@ -1613,10 +1613,10 @@
1613
1613
  }
1614
1614
  }
1615
1615
 
1616
- .full-size-styles[data-v-5bb1dcc2] {
1616
+ .full-size-styles[data-v-b002945c] {
1617
1617
  margin: initial;
1618
1618
  border-right: var(--scalar-border-width) solid var(--scalar-border-color);
1619
- animation: .3s ease-in-out forwards fadein-layout-5bb1dcc2;
1619
+ animation: .3s ease-in-out forwards fadein-layout-b002945c;
1620
1620
  left: 0;
1621
1621
  transform: translate3d(0, 0, 0);
1622
1622
  background-color: var(--scalar-background-1) !important;
@@ -1628,12 +1628,12 @@
1628
1628
  }
1629
1629
 
1630
1630
  @media (min-width: 800px) {
1631
- .full-size-styles[data-v-5bb1dcc2] {
1631
+ .full-size-styles[data-v-b002945c] {
1632
1632
  width: 50dvw !important;
1633
1633
  }
1634
1634
  }
1635
1635
 
1636
- .full-size-styles[data-v-5bb1dcc2]:after {
1636
+ .full-size-styles[data-v-b002945c]:after {
1637
1637
  content: "";
1638
1638
  width: 50dvw;
1639
1639
  height: 100dvh;
@@ -1642,15 +1642,15 @@
1642
1642
  right: -50dvw;
1643
1643
  }
1644
1644
 
1645
- .group\/item > * > .scalar-sidebar-indent .scalar-sidebar-indent-border[data-v-3e080c68] {
1645
+ .group\/item > * > .scalar-sidebar-indent .scalar-sidebar-indent-border[data-v-b2388a0c] {
1646
1646
  inset-block: -1px;
1647
1647
  }
1648
1648
 
1649
- .group\/item:first-child > * > .scalar-sidebar-indent .scalar-sidebar-indent-border[data-v-3e080c68] {
1649
+ .group\/item:first-child > * > .scalar-sidebar-indent .scalar-sidebar-indent-border[data-v-b2388a0c] {
1650
1650
  top: 0;
1651
1651
  }
1652
1652
 
1653
- .group\/item:last-child > * > .scalar-sidebar-indent .scalar-sidebar-indent-border[data-v-3e080c68] {
1653
+ .group\/item:last-child > * > .scalar-sidebar-indent .scalar-sidebar-indent-border[data-v-b2388a0c] {
1654
1654
  bottom: 0;
1655
1655
  }
1656
1656
 
@@ -1887,22 +1887,22 @@
1887
1887
  inherits: false
1888
1888
  }
1889
1889
 
1890
- .scalar-virtual-text-search-input[data-v-95edadbb]::-webkit-search-cancel-button {
1890
+ .scalar-virtual-text-search-input[data-v-b843dc7d]::-webkit-search-cancel-button {
1891
1891
  display: none;
1892
1892
  }
1893
1893
 
1894
- .scalar-virtual-text[data-v-77b9d685]:focus {
1894
+ .scalar-virtual-text[data-v-50a0b01e]:focus {
1895
1895
  outline: none;
1896
1896
  }
1897
1897
 
1898
- .scalar-virtual-text-highlight[data-v-77b9d685] {
1898
+ .scalar-virtual-text-highlight[data-v-50a0b01e] {
1899
1899
  background: var(--scalar-background-accent);
1900
1900
  color: inherit;
1901
1901
  border-radius: var(--scalar-radius);
1902
1902
  padding: 1px 0;
1903
1903
  }
1904
1904
 
1905
- .scalar-virtual-text-highlight-active[data-v-77b9d685] {
1905
+ .scalar-virtual-text-highlight-active[data-v-50a0b01e] {
1906
1906
  background: var(--scalar-color-accent);
1907
1907
  color: var(--scalar-background-1);
1908
1908
  border-radius: var(--scalar-radius);
@@ -2297,6 +2297,10 @@
2297
2297
  margin-bottom: -4px;
2298
2298
  }
2299
2299
 
2300
+ .scalar-app .-mb-px {
2301
+ margin-bottom: -1px;
2302
+ }
2303
+
2300
2304
  .scalar-app .mb-0 {
2301
2305
  margin-bottom: 0;
2302
2306
  }
@@ -2634,6 +2638,10 @@
2634
2638
  max-width: calc(100vw - 32px);
2635
2639
  }
2636
2640
 
2641
+ .scalar-app .max-w-xs {
2642
+ max-width: 320px;
2643
+ }
2644
+
2637
2645
  .scalar-app .min-w-0 {
2638
2646
  min-width: 0;
2639
2647
  }
@@ -3475,7 +3483,7 @@
3475
3483
  text-wrap: nowrap;
3476
3484
  }
3477
3485
 
3478
- .scalar-app .break-words, .scalar-app .wrap-break-word {
3486
+ .scalar-app .wrap-break-word {
3479
3487
  overflow-wrap: break-word;
3480
3488
  }
3481
3489
 
@@ -3596,6 +3604,11 @@
3596
3604
  opacity: 1;
3597
3605
  }
3598
3606
 
3607
+ .scalar-app .shadow {
3608
+ --tw-shadow: var(--scalar-shadow-1);
3609
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
3610
+ }
3611
+
3599
3612
  .scalar-app .shadow-border {
3600
3613
  --tw-shadow: inset 0 0 0 var(--scalar-border-width) var(--scalar-border-color);
3601
3614
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
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.2",
13
+ "version": "0.12.3",
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.32.1",
35
+ "@scalar/components": "0.33.0",
36
36
  "@scalar/helpers": "0.16.4",
37
- "@scalar/icons": "0.7.7",
38
- "@scalar/themes": "0.19.2",
39
- "@scalar/use-hooks": "0.4.21",
40
- "@scalar/workspace-store": "0.68.5",
41
- "vue": "^3.5.40"
37
+ "@scalar/icons": "0.7.8",
38
+ "@scalar/themes": "0.19.3",
39
+ "@scalar/use-hooks": "0.4.22",
40
+ "@scalar/workspace-store": "0.69.0",
41
+ "vue": "^3.5.44"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@tailwindcss/cli": "^4.3.3",
45
45
  "@tailwindcss/vite": "^4.3.3",
46
- "@types/jsdom": "28.0.1",
47
- "@types/node": "^24.1.0",
48
- "@vitejs/plugin-vue": "^6.0.8",
49
- "@vue/test-utils": "2.4.11",
50
- "jsdom": "27.4.0",
46
+ "@types/jsdom": "28.0.3",
47
+ "@types/node": "^24.19.2",
48
+ "@vitejs/plugin-vue": "^6.0.10",
49
+ "@vue/test-utils": "2.5.1",
50
+ "jsdom": "29.0.1",
51
51
  "tailwindcss": "^4.3.3",
52
- "vite": "8.1.5",
53
- "vitest": "4.1.10"
52
+ "vite": "8.3.4",
53
+ "vitest": "4.1.12"
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",
@@ -1 +0,0 @@
1
- {"version":3,"file":"HttpMethod.vue.script.js","names":[],"sources":["../../src/components/HttpMethod.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getHttpMethodInfo } from '@scalar/helpers/http/http-info'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { computed, type Component } from 'vue'\n\nconst props = defineProps<{\n /** The type of element to render as, defaults to `span` */\n as?: Component | string\n /** The css style property or variable that will be set to the request method color, defaults to `color` */\n property?: string\n /** Whether or not to abbreviated the slot content */\n short?: boolean\n /** The HTTP method to show */\n method: HttpMethod | string\n}>()\n\n/** Grabs the method info object which contains abbreviation, color, and background color etc */\nconst httpMethodInfo = computed(() =>\n getHttpMethodInfo(String(props.method || '')),\n)\n\n/** Full method name */\nconst normalized = computed(() => {\n if (typeof props.method !== 'string' || !props.method.trim()) {\n return 'get'\n }\n const method = props.method.trim()\n return isHttpMethod(method.toLowerCase()) ? method.toLowerCase() : method\n})\n</script>\n\n<template>\n <component\n :is=\"as ?? 'span'\"\n :class=\"{ uppercase: isHttpMethod(normalized) }\"\n :style=\"{ [property || 'color']: httpMethodInfo.colorVar }\">\n <slot />\n {{ short ? httpMethodInfo.short : normalized }}\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;EAMA,MAAM,QAAQ;;EAYd,MAAM,iBAAiB,eACrB,kBAAkB,OAAO,MAAM,UAAU,EAAE,CAAC,CAC9C;;EAGA,MAAM,aAAa,eAAe;GAChC,IAAI,OAAO,MAAM,WAAW,YAAY,CAAC,MAAM,OAAO,KAAK,GACzD,OAAO;GAET,MAAM,SAAS,MAAM,OAAO,KAAK;GACjC,OAAO,aAAa,OAAO,YAAY,CAAC,IAAI,OAAO,YAAY,IAAI;EACrE,CAAC;;uBAIC,YAMY,wBALL,QAAA,MAAE,MAAA,GAAA;IACN,OAAK,eAAA,EAAA,WAAe,MAAA,YAAA,CAAY,CAAC,WAAA,KAAU,EAAA,CAAA;IAC3C,OAAK,eAAA,GAAK,QAAA,YAAQ,UAAc,eAAA,MAAe,SAAQ,CAAA;;2BAChD,CAAR,WAAQ,KAAA,QAAA,SAAA,GAAA,gBAAA,MACR,gBAAG,QAAA,QAAQ,eAAA,MAAe,QAAQ,WAAA,KAAU,GAAA,CAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScalarSidebar.vue.script.js","names":[],"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,QAAQ,SAAA;;;;;EAuBd,MAAM,iBACJ,cACA,gBACG;GACH,KAAK,WAAW,cAAc,WAAW;EAC3C;;uBAGE,YAmDgB,MAAA,aAAA,GAAA;IAlDd,OAAM;IACL,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AA,QAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SidebarHttpBadge.vue.script.js","names":[],"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' }}:&nbsp;</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":";;;;;;;;;;;;;;;;uBAcE,YAkBa,oBAAA;IAjBV,OAAK,eAAA;;8BAAiE,QAAA,OAAO,YAAW;sCAA6C,QAAA,OAAM;;IAK3I,QAAQ,QAAA;IACT,UAAS;IACT,OAAA;;2BACgE,CAAhE,mBAAgE,QAAhE,YAAgE,gBAAvC,QAAA,SAAK,aAAA,IAAoB,SAAO,CAAA,GACzD,WAOO,KAAA,QAAA,WAAA,CAAA,SAAA,CALG,QAAA,WAAA,UAAA,GADR,YAKkB,MAAA,sBAAA,GAAA;;KAHf,OAAK,eAAA,EAAA,OAAqB,MAAA,iBAAA,CAAiB,CAAC,QAAA,MAAM,CAAA,CAAE,SAAA,CAAA;KAGrD,QAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SidebarItem.vue.script.js","names":[],"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,QAAQ,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,MAAM,OAAO,eAAe,QAAA,UAAU,QAAA,IAAI,KAAK,KAAA,CAAS;;;;;;;;;EAUxD,MAAM,aAAa,eACX,QAAQ,KAAK,KAAK,KAAM,QAAA,WAAW,eAAe,QAAA,KAAK,SAAS,MACxE;;;;;;;;EASA,MAAM,kBAAkB,SAA0B;GAChD,MAAM,QAAQ,OACT,QAAA,SAAS,QAAQ,cAAc,gBAC/B,QAAA,SAAS,QAAQ,aAAa;GAEnC,OAAO,QAAA,KAAK,QAAQ,GAAG,MAAM,KAAK,QAAA,KAAK,UAAU;EACnD;;;;;;;;;;;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,QAAA,SAAS;sEAEpC,YAG0D,0BAAA;;MADvD,MAAA,QAAA;MACA,sBAAsB,QAAA,SAAS;;;QAjB1B,MAAM,OAAA;WACX;uBAIgB,CAHjB,WAGiB,KAAA,QAAA,QAAA;MAFd,MAAM,QAAA;MAEN,MAAM;;;4BAcS,QAAA,OAAA;WACjB;uBAWsC,CAVvC,YAUuC,0BAAA;MATpC,QAAQ,QAAA,WAAW,QAAA,KAAK,EAAE;MAC3B,OAAK,eAAA,CAAC,uBAAqB,EAAA,6MAC2R,MAAM,UAAA,CAAA,CAAA;MAK3T,OAAO,QAAA,SAAS,QAAQ;MACxB,QAAQ,QAAA,KAAK;MACb,SAAS,QAAA,KAAK,SAAI;;;;;;;;;;;;;;;;OAKnB,MAAM,YAAA;UACX;sBAKsB,CAJvB,YAIuB,8BAAA,MAAA;4BADA,CAFrB,WAEqB,KAAA,QAAA,aAAA,EADlB,MAAA,QAAA,KAAI,CAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SidebarItemLabel.vue.script.js","names":[],"sources":["../../src/components/SidebarItemLabel.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\n\nimport type { Item } from '@/types'\n\nconst { item } = defineProps<{\n /**\n * The sidebar item to render.\n */\n item: Item\n /**\n * The source of the operation title.\n */\n operationTitleSource?: 'path' | 'summary'\n}>()\n</script>\n<template>\n <ScalarWrappingText\n v-if=\"item.type === 'model' || item.type === 'example'\"\n preset=\"property\"\n :text=\"item.title\" />\n <ScalarWrappingText\n v-else\n :text=\"\n operationTitleSource === 'path' && 'path' in item\n ? (item.path as string)\n : (item.title as string)\n \" />\n</template>\n"],"mappings":";;;;;;;;;;;UAkBU,QAAA,KAAK,SAAI,WAAgB,QAAA,KAAK,SAAI,aAAA,UAAA,GAD1C,YAGuB,MAAA,kBAAA,GAAA;;IADrB,QAAO;IACN,MAAM,QAAA,KAAK;0CACd,YAMM,MAAA,kBAAA,GAAA;;IAJH,MAAa,QAAA,yBAAoB,UAAA,UAAyB,QAAA,OAAgB,QAAA,KAAK,OAA2B,QAAA,KAAK"}