1 line
		
	
	
		
			984 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			1 line
		
	
	
		
			984 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| {"version":3,"file":"useContainer.mjs","sources":["../../../../../../../packages/components/splitter/src/hooks/useContainer.ts"],"sourcesContent":["import { computed, ref } from 'vue'\nimport { useElementSize } from '@vueuse/core'\n\nimport type { Ref } from 'vue'\n\nexport function useContainer(layout: Ref<'horizontal' | 'vertical'>) {\n  const containerEl = ref<HTMLDivElement>()\n  const { width, height } = useElementSize(containerEl)\n\n  const containerSize = computed(() => {\n    return layout.value === 'horizontal' ? width.value : height.value\n  })\n\n  return { containerEl, containerSize }\n}\n"],"names":[],"mappings":";;;AAEO,SAAS,YAAY,CAAC,MAAM,EAAE;AACrC,EAAE,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC;AAC5B,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;AACxD,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM;AACvC,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,YAAY,GAAG,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AACtE,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;AACxC;;;;"} |