yuyeon 0.3.4-beta.14 → 0.3.4-beta.15

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.
@@ -97,7 +97,7 @@ export const YImg = defineComponent({
97
97
  status.value = "error";
98
98
  emit("error", event);
99
99
  }
100
- const _Image = () => {
100
+ const _Image = imageProps => {
101
101
  const Img = _createVNode("img", {
102
102
  "ref": image$,
103
103
  "src": srcMeta.value.src,
@@ -112,7 +112,7 @@ export const YImg = defineComponent({
112
112
  return _createVNode(PolyTransition, _mergeProps(polyTransitionBindProps.value, {
113
113
  "appear": true
114
114
  }), {
115
- default: () => [withDirectives(Img, [[vShow, status.value === "loaded"]])]
115
+ default: () => [withDirectives(Img, [[vShow, imageProps.status === "loaded"]])]
116
116
  });
117
117
  };
118
118
  let requestTimer = -1;
@@ -165,8 +165,14 @@ export const YImg = defineComponent({
165
165
  useRender(() => {
166
166
  return _createVNode("div", {
167
167
  "class": ["y-img"]
168
- }, [_createVNode(_Placeholder, null, null), _createVNode(_Image, null, null)]);
168
+ }, [_createVNode(_Placeholder, null, null), _createVNode(_Image, {
169
+ "status": status.value
170
+ }, null)]);
169
171
  });
172
+ return {
173
+ status,
174
+ image$: image$
175
+ };
170
176
  }
171
177
  });
172
178
  //# sourceMappingURL=YImg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"YImg.js","names":["computed","getCurrentInstance","nextTick","onBeforeMount","onBeforeUnmount","ref","shallowRef","vShow","watch","withDirectives","createVNode","_createVNode","mergeProps","_mergeProps","useRender","pressDimensionPropsOptions","PolyTransition","pressPolyTransitionPropsOptions","usePolyTransition","defineComponent","propsFactory","Environments","pressYImgPropsOptions","src","String","crossorigin","referrerpolicy","transition","objectFit","type","default","eager","Boolean","YImg","name","props","slots","Object","emits","setup","_ref","attrs","emit","vm","image$","status","imgSrc","naturalWidth","naturalHeight","polyTransitionBindProps","srcMeta","imgClasses","getImgSrc","imgEl","value","currentSrc","inspectImage","complete","endsWith","startsWith","initIntersect","_Placeholder","placeholder","onLoad","isUnmounted","onError","event","_Image","Img","draggable","alt","requestTimer","requestInspectImage","timeout","arguments","length","undefined","_request","clearTimeout","window","setTimeout","isIntersection","canUseIntersectionObserver"],"sources":["../../../src/components/img/YImg.tsx"],"sourcesContent":["import {\n\ttype CSSProperties,\n\tcomputed,\n\tgetCurrentInstance,\n\ttype ImgHTMLAttributes,\n\tnextTick,\n\tonBeforeMount,\n\tonBeforeUnmount,\n\ttype PropType,\n\tref,\n\ttype SlotsType,\n\tshallowRef,\n\tvShow,\n\twatch,\n\twithDirectives,\n} from \"vue\";\n\nimport { useRender } from \"@/composables/component\";\nimport { pressDimensionPropsOptions } from \"@/composables/dimension\";\nimport {\n\tPolyTransition,\n\tpressPolyTransitionPropsOptions,\n\tusePolyTransition,\n} from \"@/composables/transition\";\nimport { defineComponent, propsFactory } from \"@/util/component\";\nimport Environments from \"@/util/environments\";\n\nimport \"./YImg.scss\";\n\nexport const pressYImgPropsOptions = propsFactory(\n\t{\n\t\tsrc: String as PropType<string>,\n\t\tcrossorigin: String as PropType<ImgHTMLAttributes[\"crossorigin\"]>,\n\t\treferrerpolicy: String as PropType<ImgHTMLAttributes[\"referrerpolicy\"]>,\n\t\t...pressPolyTransitionPropsOptions({\n\t\t\ttransition: \"fade\",\n\t\t}),\n\t\tobjectFit: {\n\t\t\ttype: String as PropType<\n\t\t\t\tExtract<\n\t\t\t\t\tCSSProperties[\"objectFit\"],\n\t\t\t\t\t\"contain\" | \"cover\" | \"fill\" | \"scale-down\"\n\t\t\t\t>\n\t\t\t>,\n\t\t\tdefault: \"contain\",\n\t\t},\n\t\teager: Boolean,\n\t\t...pressDimensionPropsOptions(),\n\t},\n\t\"YImg\",\n);\n\nexport type YImgStatus = \"idle\" | \"loading\" | \"loaded\" | \"error\";\n\nexport const YImg = defineComponent({\n\tname: \"YImg\",\n\tprops: {\n\t\t...pressYImgPropsOptions(),\n\t},\n\tslots: Object as SlotsType<{\n\t\tplaceholder: any;\n\t}>,\n\temits: [\"load\", \"loaded\", \"error\"],\n\tsetup(props, { slots, attrs, emit }) {\n\t\tconst vm = getCurrentInstance()!;\n\t\tconst image$ = ref<HTMLImageElement>();\n\t\tconst status = shallowRef<YImgStatus>(props.eager ? \"loading\" : \"idle\");\n\t\tconst imgSrc = shallowRef(\"\");\n\t\tconst naturalWidth = shallowRef<number>();\n\t\tconst naturalHeight = shallowRef<number>();\n\t\tconst { polyTransitionBindProps } = usePolyTransition(props);\n\n\t\tconst srcMeta = computed(() => {\n\t\t\tconst src = props.src;\n\n\t\t\treturn {\n\t\t\t\tsrc,\n\t\t\t};\n\t\t});\n\n\t\tconst imgClasses = computed(() => {\n\t\t\treturn {\n\t\t\t\t\"y-img--cover\": props.objectFit === \"cover\",\n\t\t\t\t\"y-img--contain\": props.objectFit === \"contain\",\n\t\t\t\t\"y-img--fill\": props.objectFit === \"fill\",\n\t\t\t\t\"y-img--scale-down\": props.objectFit === \"scale-down\",\n\t\t\t};\n\t\t});\n\n\t\tfunction getImgSrc() {\n\t\t\tconst imgEl = image$.value;\n\t\t\tif (imgEl) {\n\t\t\t\timgSrc.value = imgEl.currentSrc || imgEl.src;\n\t\t\t}\n\t\t}\n\n\t\tfunction inspectImage(imgEl: HTMLImageElement) {\n\t\t\tif (imgEl.naturalWidth || imgEl.naturalHeight) {\n\t\t\t\tnaturalWidth.value = imgEl.naturalWidth;\n\t\t\t\tnaturalHeight.value = imgEl.naturalHeight;\n\t\t\t} else if (!imgEl.complete && status.value === \"loading\") {\n\t\t\t\treturn false;\n\t\t\t} else if (\n\t\t\t\timgEl.currentSrc.endsWith(\".svg\") ||\n\t\t\t\timgEl.currentSrc.startsWith(\"data:image/svg+xml\")\n\t\t\t) {\n\t\t\t\tnaturalWidth.value = 1;\n\t\t\t\tnaturalHeight.value = 1;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\twatch(\n\t\t\t() => props.src,\n\t\t\t() => {\n\t\t\t\tinitIntersect();\n\t\t\t},\n\t\t);\n\n\t\tconst _Placeholder = () => {\n\t\t\tif (!slots.placeholder) return null;\n\t\t\treturn (\n\t\t\t\t<PolyTransition {...polyTransitionBindProps.value} appear>\n\t\t\t\t\t{(status.value === \"idle\" || status.value === \"error\") && (\n\t\t\t\t\t\t<div class=\"y-img__placeholder\">\n\t\t\t\t\t\t\t{slots.placeholder?.({ status: status.value })}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</PolyTransition>\n\t\t\t);\n\t\t};\n\n\t\tfunction onLoad() {\n\t\t\tif (vm.isUnmounted) return;\n\t\t\tstatus.value = \"loaded\";\n\t\t}\n\n\t\tfunction onError(event?: Event) {\n\t\t\tif (vm.isUnmounted) return;\n\t\t\tstatus.value = \"error\";\n\t\t\temit(\"error\", event);\n\t\t}\n\n\t\tconst _Image = () => {\n\t\t\tconst Img = (\n\t\t\t\t<img\n\t\t\t\t\tref={image$}\n\t\t\t\t\tsrc={srcMeta.value.src}\n\t\t\t\t\tcrossorigin={props.crossorigin}\n\t\t\t\t\treferrerpolicy={props.referrerpolicy}\n\t\t\t\t\tdraggable={(attrs as ImgHTMLAttributes).draggable}\n\t\t\t\t\talt={(attrs as ImgHTMLAttributes).alt}\n\t\t\t\t\tclass={[\"y-img__img\", imgClasses.value]}\n\t\t\t\t\tonLoad={onLoad}\n\t\t\t\t\tonError={onError}\n\t\t\t\t/>\n\t\t\t);\n\n\t\t\treturn (\n\t\t\t\t<PolyTransition {...polyTransitionBindProps.value} appear>\n\t\t\t\t\t{withDirectives(Img, [[vShow, status.value === \"loaded\"]])}\n\t\t\t\t</PolyTransition>\n\t\t\t);\n\t\t};\n\n\t\tlet requestTimer = -1;\n\n\t\t/**\n\t\t *\n\t\t * @param imgEl\n\t\t * @param timeout null: once\n\t\t */\n\t\tfunction requestInspectImage(\n\t\t\timgEl: HTMLImageElement,\n\t\t\ttimeout: number | null = 100,\n\t\t) {\n\t\t\tconst _request = () => {\n\t\t\t\tclearTimeout(requestTimer);\n\t\t\t\tif (vm.isUnmounted) return;\n\t\t\t\tif (!inspectImage(imgEl) && timeout != null) {\n\t\t\t\t\trequestTimer = window.setTimeout(_request, timeout);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t_request();\n\t\t}\n\n\t\tfunction initIntersect(isIntersection?: boolean) {\n\t\t\tif (props.eager && isIntersection) return;\n\t\t\tif (\n\t\t\t\tEnvironments.canUseIntersectionObserver &&\n\t\t\t\t!isIntersection &&\n\t\t\t\t!props.eager\n\t\t\t)\n\t\t\t\treturn;\n\n\t\t\tstatus.value = \"loading\";\n\n\t\t\tif (!srcMeta.value.src) return;\n\t\t\tnextTick(() => {\n\t\t\t\temit(\"load\", image$.value?.currentSrc || srcMeta.value.src);\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tif (vm.isUnmounted) return;\n\t\t\t\t\tif (image$.value?.complete) {\n\t\t\t\t\t\tif (!image$.value?.naturalWidth) {\n\t\t\t\t\t\t\tonError();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (status.value === \"error\") return;\n\t\t\t\t\t\trequestInspectImage(image$.value, null);\n\t\t\t\t\t\tif (status.value === \"loading\") onLoad();\n\t\t\t\t\t} else if (image$.value) {\n\t\t\t\t\t\trequestInspectImage(image$.value);\n\t\t\t\t\t\tgetImgSrc();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tonBeforeMount(() => {\n\t\t\tinitIntersect();\n\t\t});\n\n\t\tonBeforeUnmount(() => {\n\t\t\tclearTimeout(requestTimer);\n\t\t});\n\n\t\tuseRender(() => {\n\t\t\treturn (\n\t\t\t\t<div class={[\"y-img\"]}>\n\t\t\t\t\t<_Placeholder />\n\t\t\t\t\t<_Image />\n\t\t\t\t</div>\n\t\t\t);\n\t\t});\n\t},\n});\n"],"mappings":"AAAA,SAECA,QAAQ,EACRC,kBAAkB,EAElBC,QAAQ,EACRC,aAAa,EACbC,eAAe,EAEfC,GAAG,EAEHC,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M;UAChB,IAAIrC,EAAE,CAACqB,WAAW,EAAE;UACpB,IAAIpB,MAAM,CAACU,KAAK,EAAEG,QAAQ,EAAE;YAC3B,IAAI,CAACb,MAAM,CAACU,KAAK,EAAEP,YAAY,EAAE;cAChCkB,OAAO,CAAC,CAAC;YACV;YACA,IAAIpB,MAAM,CAACS,KAAK,KAAK,OAAO,EAAE;YAC9BkB,mBAAmB,CAAC5B,MAAM,CAACU,KAAK,EAAE,IAAI,CAAC;YACvC,IAAIT,MAAM,CAACS,KAAK,KAAK,SAAS,EAAES,MAAM,CAAC,CAAC;UACzC,CAAC,MAAM,IAAInB,MAAM,CAACU,KAAK,EAAE;YACxBkB,mBAAmB,CAAC5B,MAAM,CAACU,KAAK,CAAC;YACjCF,SAAS,CAAC,CAAC;UACZ;QACD,CAAC,CAAC;MACH,CAAC,CAAC;IACH;IAEAjD,aAAa,CAAC,MAAM;MACnByD,aAAa,CAAC,CAAC;IAChB,CAAC,CAAC;IAEFxD,eAAe,CAAC,MAAM;MACrB0E,YAAY,CAACP,YAAY,CAAC;IAC3B,CAAC,CAAC;IAEFzD,SAAS,CAAC,MAAM;MACf,OAAAH,YAAA;QAAA,SACa,CAAC,OAAO;MAAC,IAAAA,YAAA,CAAAkD,YAAA,eAAAlD,YAAA,CAAAwD,MAAA;IAKvB,CAAC,CAAC;EACH;AACD,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"YImg.js","names":["computed","getCurrentInstance","nextTick","onBeforeMount","onBeforeUnmount","ref","shallowRef","vShow","watch","withDirectives","createVNode","_createVNode","mergeProps","_mergeProps","useRender","pressDimensionPropsOptions","PolyTransition","pressPolyTransitionPropsOptions","usePolyTransition","defineComponent","propsFactory","Environments","pressYImgPropsOptions","src","String","crossorigin","referrerpolicy","transition","objectFit","type","default","eager","Boolean","YImg","name","props","slots","Object","emits","setup","_ref","attrs","emit","vm","image$","status","imgSrc","naturalWidth","naturalHeight","polyTransitionBindProps","srcMeta","imgClasses","getImgSrc","imgEl","value","currentSrc","inspectImage","complete","endsWith","startsWith","initIntersect","_Placeholder","placeholder","onLoad","isUnmounted","onError","event","_Image","imageProps","Img","draggable","alt","requestTimer","requestInspectImage","timeout","arguments","length","undefined","_request","clearTimeout","window","setTimeout","isIntersection","canUseIntersectionObserver"],"sources":["../../../src/components/img/YImg.tsx"],"sourcesContent":["import {\n type CSSProperties,\n computed,\n getCurrentInstance,\n type ImgHTMLAttributes,\n nextTick,\n onBeforeMount,\n onBeforeUnmount,\n type PropType,\n ref,\n type SlotsType,\n shallowRef,\n vShow,\n watch,\n withDirectives,\n} from \"vue\";\n\nimport { useRender } from \"@/composables/component\";\nimport { pressDimensionPropsOptions } from \"@/composables/dimension\";\nimport {\n PolyTransition,\n pressPolyTransitionPropsOptions,\n usePolyTransition,\n} from \"@/composables/transition\";\nimport { defineComponent, propsFactory } from \"@/util/component\";\nimport Environments from \"@/util/environments\";\n\nimport \"./YImg.scss\";\n\nexport const pressYImgPropsOptions = propsFactory(\n {\n src: String as PropType<string>,\n crossorigin: String as PropType<ImgHTMLAttributes[\"crossorigin\"]>,\n referrerpolicy: String as PropType<ImgHTMLAttributes[\"referrerpolicy\"]>,\n ...pressPolyTransitionPropsOptions({\n transition: \"fade\",\n }),\n objectFit: {\n type: String as PropType<\n Extract<\n CSSProperties[\"objectFit\"],\n \"contain\" | \"cover\" | \"fill\" | \"scale-down\"\n >\n >,\n default: \"contain\",\n },\n eager: Boolean,\n ...pressDimensionPropsOptions(),\n },\n \"YImg\",\n);\n\nexport type YImgStatus = \"idle\" | \"loading\" | \"loaded\" | \"error\";\n\nexport const YImg = defineComponent({\n name: \"YImg\",\n props: {\n ...pressYImgPropsOptions(),\n },\n slots: Object as SlotsType<{\n placeholder: any;\n }>,\n emits: [\"load\", \"loaded\", \"error\"],\n setup(props, { slots, attrs, emit }) {\n const vm = getCurrentInstance()!;\n const image$ = ref<HTMLImageElement>();\n const status = shallowRef<YImgStatus>(props.eager ? \"loading\" : \"idle\");\n const imgSrc = shallowRef(\"\");\n const naturalWidth = shallowRef<number>();\n const naturalHeight = shallowRef<number>();\n const { polyTransitionBindProps } = usePolyTransition(props);\n\n const srcMeta = computed(() => {\n const src = props.src;\n\n return {\n src,\n };\n });\n\n const imgClasses = computed(() => {\n return {\n \"y-img--cover\": props.objectFit === \"cover\",\n \"y-img--contain\": props.objectFit === \"contain\",\n \"y-img--fill\": props.objectFit === \"fill\",\n \"y-img--scale-down\": props.objectFit === \"scale-down\",\n };\n });\n\n function getImgSrc() {\n const imgEl = image$.value;\n if (imgEl) {\n imgSrc.value = imgEl.currentSrc || imgEl.src;\n }\n }\n\n function inspectImage(imgEl: HTMLImageElement) {\n if (imgEl.naturalWidth || imgEl.naturalHeight) {\n naturalWidth.value = imgEl.naturalWidth;\n naturalHeight.value = imgEl.naturalHeight;\n } else if (!imgEl.complete && status.value === \"loading\") {\n return false;\n } else if (\n imgEl.currentSrc.endsWith(\".svg\") ||\n imgEl.currentSrc.startsWith(\"data:image/svg+xml\")\n ) {\n naturalWidth.value = 1;\n naturalHeight.value = 1;\n }\n\n return true;\n }\n\n watch(\n () => props.src,\n () => {\n initIntersect();\n },\n );\n\n const _Placeholder = () => {\n if (!slots.placeholder) return null;\n return (\n <PolyTransition {...polyTransitionBindProps.value} appear>\n {(status.value === \"idle\" || status.value === \"error\") && (\n <div class=\"y-img__placeholder\">\n {slots.placeholder?.({ status: status.value })}\n </div>\n )}\n </PolyTransition>\n );\n };\n\n function onLoad() {\n if (vm.isUnmounted) return;\n status.value = \"loaded\";\n }\n\n function onError(event?: Event) {\n if (vm.isUnmounted) return;\n status.value = \"error\";\n emit(\"error\", event);\n }\n\n const _Image = (imageProps: { status: string }) => {\n const Img = (\n <img\n ref={image$}\n src={srcMeta.value.src}\n crossorigin={props.crossorigin}\n referrerpolicy={props.referrerpolicy}\n draggable={(attrs as ImgHTMLAttributes).draggable}\n alt={(attrs as ImgHTMLAttributes).alt}\n class={[\"y-img__img\", imgClasses.value]}\n onLoad={onLoad}\n onError={onError}\n />\n );\n\n return (\n <PolyTransition {...polyTransitionBindProps.value} appear>\n {withDirectives(Img, [[vShow, imageProps.status === \"loaded\"]])}\n </PolyTransition>\n );\n };\n\n let requestTimer = -1;\n\n /**\n *\n * @param imgEl\n * @param timeout null: once\n */\n function requestInspectImage(\n imgEl: HTMLImageElement,\n timeout: number | null = 100,\n ) {\n const _request = () => {\n clearTimeout(requestTimer);\n if (vm.isUnmounted) return;\n if (!inspectImage(imgEl) && timeout != null) {\n requestTimer = window.setTimeout(_request, timeout);\n }\n };\n\n _request();\n }\n\n function initIntersect(isIntersection?: boolean) {\n if (props.eager && isIntersection) return;\n if (\n Environments.canUseIntersectionObserver &&\n !isIntersection &&\n !props.eager\n )\n return;\n\n status.value = \"loading\";\n\n if (!srcMeta.value.src) return;\n nextTick(() => {\n emit(\"load\", image$.value?.currentSrc || srcMeta.value.src);\n setTimeout(() => {\n if (vm.isUnmounted) return;\n if (image$.value?.complete) {\n if (!image$.value?.naturalWidth) {\n onError();\n }\n if (status.value === \"error\") return;\n requestInspectImage(image$.value, null);\n if (status.value === \"loading\") onLoad();\n } else if (image$.value) {\n requestInspectImage(image$.value);\n getImgSrc();\n }\n });\n });\n }\n\n onBeforeMount(() => {\n initIntersect();\n });\n\n onBeforeUnmount(() => {\n clearTimeout(requestTimer);\n });\n\n useRender(() => {\n return (\n <div class={[\"y-img\"]}>\n <_Placeholder />\n <_Image status={status.value} />\n </div>\n );\n });\n\n return {\n status,\n image$: image$\n }\n },\n});\n"],"mappings":"AAAA,SAEEA,QAAQ,EACRC,kBAAkB,EAElBC,QAAQ,EACRC,aAAa,EACbC,eAAe,EAEfC,GAAG,EAEHC,UAAU,EACVC,KAAK,EACLC,KAAK,EACLC,cAAc,EAAAC,WAAA,IAAAC,YAAA,EAAAC,UAAA,IAAAC,WAAA,QACT,KAAK;AAAC,SAEJC,SAAS;AAAA,SACTC,0BAA0B;AAAA,SAEjCC,cAAc,EACdC,+BAA+B,EAC/BC,iBA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AAIpB,MAAM,CAACS,KAAK,KAAK,OAAO,EAAE;YAC9BmB,mBAAmB,CAAC7B,MAAM,CAACU,KAAK,EAAE,IAAI,CAAC;YACvC,IAAIT,MAAM,CAACS,KAAK,KAAK,SAAS,EAAES,MAAM,CAAC,CAAC;UAC1C,CAAC,MAAM,IAAInB,MAAM,CAACU,KAAK,EAAE;YACvBmB,mBAAmB,CAAC7B,MAAM,CAACU,KAAK,CAAC;YACjCF,SAAS,CAAC,CAAC;UACb;QACF,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ;IAEAjD,aAAa,CAAC,MAAM;MAClByD,aAAa,CAAC,CAAC;IACjB,CAAC,CAAC;IAEFxD,eAAe,CAAC,MAAM;MACpB2E,YAAY,CAACP,YAAY,CAAC;IAC5B,CAAC,CAAC;IAEF1D,SAAS,CAAC,MAAM;MACd,OAAAH,YAAA;QAAA,SACc,CAAC,OAAO;MAAC,IAAAA,YAAA,CAAAkD,YAAA,eAAAlD,YAAA,CAAAwD,MAAA;QAAA,UAEHtB,MAAM,CAACS;MAAK;IAGlC,CAAC,CAAC;IAEF,OAAO;MACLT,MAAM;MACND,MAAM,EAAEA;IACV,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
-
1
+ export * from "./YImg.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/img/index.ts"],"sourcesContent":[""],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/img/index.ts"],"sourcesContent":["export * from \"./YImg\";\n"],"mappings":"","ignoreList":[]}
@@ -36,4 +36,5 @@ export * from "./ip-field/index.js";
36
36
  export * from "./hover/index.js";
37
37
  export * from "./text-interpolation/index.js";
38
38
  export * from "./text-highlighter/index.js";
39
+ export * from "./img/index.js";
39
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './app';\nexport * from './button';\nexport * from './input';\nexport * from './field-input';\nexport * from './textarea';\nexport * from './form';\nexport * from './progress-bar';\nexport * from './progress-ring';\nexport * from './card';\nexport * from './chip';\nexport * from './switch';\nexport * from './layer';\nexport * from './dialog';\nexport * from './snackbar';\nexport * from './tooltip';\nexport * from './transitions';\nexport * from './panel';\nexport * from './tree-view';\nexport * from './list';\nexport * from './icons';\nexport * from './table';\nexport * from './menu';\nexport * from './checkbox';\nexport * from './pagination';\nexport * from './loading';\nexport * from './dropdown';\nexport * from './select';\nexport * from './tab';\nexport * from './alert';\nexport * from './divider';\nexport * from './date-picker';\nexport * from './icon';\nexport * from './badge';\nexport * from './text-ellipsis';\nexport * from './ip-field';\nexport * from './hover';\nexport * from './text-interpolation';\nexport * from './text-highlighter';\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from \"./app\";\nexport * from \"./button\";\nexport * from \"./input\";\nexport * from \"./field-input\";\nexport * from \"./textarea\";\nexport * from \"./form\";\nexport * from \"./progress-bar\";\nexport * from \"./progress-ring\";\nexport * from \"./card\";\nexport * from \"./chip\";\nexport * from \"./switch\";\nexport * from \"./layer\";\nexport * from \"./dialog\";\nexport * from \"./snackbar\";\nexport * from \"./tooltip\";\nexport * from \"./transitions\";\nexport * from \"./panel\";\nexport * from \"./tree-view\";\nexport * from \"./list\";\nexport * from \"./icons\";\nexport * from \"./table\";\nexport * from \"./menu\";\nexport * from \"./checkbox\";\nexport * from \"./pagination\";\nexport * from \"./loading\";\nexport * from \"./dropdown\";\nexport * from \"./select\";\nexport * from \"./tab\";\nexport * from \"./alert\";\nexport * from \"./divider\";\nexport * from \"./date-picker\";\nexport * from \"./icon\";\nexport * from \"./badge\";\nexport * from \"./text-ellipsis\";\nexport * from \"./ip-field\";\nexport * from \"./hover\";\nexport * from \"./text-interpolation\";\nexport * from \"./text-highlighter\";\nexport * from \"./img\";\n"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { computed, getCurrentInstance, mergeProps, reactive, ref, shallowRef, Teleport, toRef, Transition, Fragment as _Fragment, createVNode as _createVNode, vShow as _vShow, resolveDirective as _resolveDirective, mergeProps as _mergeProps, withDirectives as _withDirectives } from 'vue';
1
+ import { computed, getCurrentInstance, mergeProps, reactive, ref, shallowRef, Teleport, Transition, toRef, Fragment as _Fragment, createVNode as _createVNode, vShow as _vShow, resolveDirective as _resolveDirective, mergeProps as _mergeProps, withDirectives as _withDirectives } from "vue";
2
2
  import { useModelDuplex } from "../../composables/communication.js";
3
3
  import { useRender } from "../../composables/component.js";
4
4
  import { pressCoordinateProps, useCoordinate } from "../../composables/coordinate/index.js";
@@ -72,9 +72,9 @@ export const pressYLayerProps = propsFactory({
72
72
  ...pressCoordinateProps(),
73
73
  ...pressScrollStrategyProps(),
74
74
  ...pressDimensionPropsOptions()
75
- }, 'YLayer');
75
+ }, "YLayer");
76
76
  export const YLayer = defineComponent({
77
- name: 'YLayer',
77
+ name: "YLayer",
78
78
  inheritAttrs: false,
79
79
  components: {
80
80
  PolyTransition
@@ -87,8 +87,8 @@ export const YLayer = defineComponent({
87
87
  ...pressYLayerProps()
88
88
  },
89
89
  emits: {
90
- 'update:modelValue': value => true,
91
- 'click:complement': mouseEvent => true,
90
+ "update:modelValue": value => true,
91
+ "click:complement": mouseEvent => true,
92
92
  afterLeave: () => true
93
93
  },
94
94
  slots: Object,
@@ -140,13 +140,13 @@ export const YLayer = defineComponent({
140
140
  const {
141
141
  lazyValue,
142
142
  onAfterUpdate
143
- } = useLazy(toRef(props, 'eager'), active);
143
+ } = useLazy(toRef(props, "eager"), active);
144
144
  // States
145
145
  const finish = shallowRef(false);
146
146
  const hovered = ref(false);
147
147
  const focused = ref(false);
148
- const disabled = toRef(props, 'disabled');
149
- const maximized = toRef(props, 'maximized');
148
+ const disabled = toRef(props, "disabled");
149
+ const maximized = toRef(props, "maximized");
150
150
  const rendered = computed(() => !disabled.value && (lazyValue.value || active.value));
151
151
  const {
152
152
  coordinateStyles,
@@ -164,7 +164,7 @@ export const YLayer = defineComponent({
164
164
  updateCoordinate
165
165
  });
166
166
  function onClickComplementLayer(mouseEvent) {
167
- emit('click:complement', mouseEvent);
167
+ emit("click:complement", mouseEvent);
168
168
  if (!props.modal) {
169
169
  if (scrim$.value !== null && scrim$.value === mouseEvent.target && props.closeClickScrim) {
170
170
  active.value = false;
@@ -187,7 +187,7 @@ export const YLayer = defineComponent({
187
187
  function onAfterLeave() {
188
188
  onAfterUpdate();
189
189
  finish.value = false;
190
- emit('afterLeave');
190
+ emit("afterLeave");
191
191
  }
192
192
  function onClickScrim() {
193
193
  if (props.closeClickScrim) {
@@ -202,7 +202,7 @@ export const YLayer = defineComponent({
202
202
  }
203
203
  const computedStyle = computed(() => {
204
204
  return {
205
- zIndex: (props.zIndex ?? '2000').toString()
205
+ zIndex: (props.zIndex ?? "2000").toString()
206
206
  };
207
207
  });
208
208
  const computedClass = computed(() => {
@@ -212,7 +212,7 @@ export const YLayer = defineComponent({
212
212
  const boundClasses = bindClasses(classes);
213
213
  return {
214
214
  ...boundClasses,
215
- 'y-layer--active': !!active.value
215
+ "y-layer--active": !!active.value
216
216
  };
217
217
  });
218
218
  const computedContentClasses = computed(() => {
@@ -243,8 +243,8 @@ export const YLayer = defineComponent({
243
243
  props: mergeProps({
244
244
  ref: base$,
245
245
  class: {
246
- 'y-layer-base': true,
247
- 'y-layer-base--active': active.value
246
+ "y-layer-base": true,
247
+ "y-layer-base--active": active.value
248
248
  },
249
249
  ...(props.baseProps ?? {})
250
250
  })
@@ -256,9 +256,9 @@ export const YLayer = defineComponent({
256
256
  }, {
257
257
  default: () => [rendered.value && _createVNode("div", _mergeProps({
258
258
  "class": [{
259
- 'y-layer': true,
260
- 'y-layer--finish': finish.value,
261
- 'y-layer--contained': props.contained,
259
+ "y-layer": true,
260
+ "y-layer--finish": finish.value,
261
+ "y-layer--contained": props.contained,
262
262
  ...computedClass.value
263
263
  }, themeClasses.value],
264
264
  "onMouseenter": onMouseenter,
@@ -269,10 +269,12 @@ export const YLayer = defineComponent({
269
269
  "name": "fade",
270
270
  "appear": true
271
271
  }, {
272
- default: () => [active.value && props.scrim && _createVNode("div", {
272
+ default: () => [active.value && props.scrim && // biome-ignore lint/a11y/noStaticElementInteractions: <explanation>
273
+ // biome-ignore lint/a11y/useKeyWithClickEvents: <explanation>
274
+ _createVNode("div", {
273
275
  "class": "y-layer__scrim",
274
276
  "style": {
275
- '--y-layer-scrim-opacity': props.scrimOpacity
277
+ "--y-layer-scrim-opacity": props.scrimOpacity
276
278
  },
277
279
  "onClick": onClickScrim,
278
280
  "onKeydown": noop(),
@@ -286,7 +288,7 @@ export const YLayer = defineComponent({
286
288
  }, polyTransitionBindProps.value), {
287
289
  default: () => [_withDirectives(_createVNode("div", _mergeProps({
288
290
  "class": {
289
- 'y-layer__content': true,
291
+ "y-layer__content": true,
290
292
  ...computedContentClasses.value
291
293
  },
292
294
  "style": [{
@@ -1 +1 @@
1
- {"version":3,"file":"YLayer.js","names":["computed","getCurrentInstance","mergeProps","reactive","ref","shallowRef","Teleport","toRef","Transition","Fragment","_Fragment","createVNode","_createVNode","vShow","_vShow","resolveDirective","_resolveDirective","_mergeProps","withDirectives","_withDirectives","useModelDuplex","useRender","pressCoordinateProps","useCoordinate","pressDimensionPropsOptions","useDimension","useLayerGroup","pressThemePropsOptions","useLocalTheme","useLazy","PolyTransition","pressPolyTransitionPropsOptions","usePolyTransition","ComplementClick","bindClasses","defineComponent","propsFactory","pressBasePropsOptions","useBase","pressContentPropsOptions","useContent","pressScrollStrategyProps","useScrollStrategies","noop","pressYLayerProps","modelValue","type","Boolean","scrim","scrimOpacity","Number","eager","classes","Array","String","Object","contentClasses","closeClickScrim","contentStyles","default","disabled","maximized","openOnHover","openDelay","closeDelay","zIndex","contained","layerGroup","YLayer","name","inheritAttrs","components","directives","props","modal","emits","value","mouseEvent","afterLeave","slots","setup","_ref","emit","expose","attrs","vm","scrim$","content$","root$","model","active","get","set","v","base","base$","baseEl","baseSlot","baseFromSlotEl","contentEvents","themeClasses","layerGroupState","getActiveLayers","polyTransitionBindProps","dimensionStyles","lazyValue","onAfterUpdate","finish","hovered","focused","rendered","coordinateStyles","updateCoordinate","contentEl","root","onClickComplementLayer","target","closeConditional","complementClickOption","handler","determine","include","onAfterEnter","onAfterLeave","onClickScrim","onMouseenter","event","onMouseleave","computedStyle","toString","computedClass","boundClasses","computedContentClasses","isMe","vnode","slotBase","class","baseProps"],"sources":["../../../src/components/layer/YLayer.tsx"],"sourcesContent":["import type { ComponentInternalInstance, PropType, SlotsType } from 'vue';\nimport {\n computed,\n getCurrentInstance,\n mergeProps,\n reactive,\n ref,\n shallowRef,\n Teleport,\n toRef,\n Transition,\n} from 'vue';\n\nimport { useModelDuplex } from '@/composables/communication';\nimport { useRender } from '@/composables/component';\nimport { pressCoordinateProps, useCoordinate } from '@/composables/coordinate';\nimport {\n pressDimensionPropsOptions,\n useDimension,\n} from '@/composables/dimension';\nimport { useLayerGroup } from '@/composables/layer-group';\nimport { pressThemePropsOptions, useLocalTheme } from '@/composables/theme';\nimport { useLazy } from '@/composables/timing';\nimport {\n PolyTransition,\n pressPolyTransitionPropsOptions,\n usePolyTransition,\n} from '@/composables/transition';\nimport {\n ComplementClick,\n ComplementClickBindingOptions,\n} from '@/directives/complement-click';\nimport { bindClasses, defineComponent, propsFactory } from '@/util/component';\n\nimport { pressBasePropsOptions, useBase } from './base';\nimport { pressContentPropsOptions, useContent } from './content';\nimport {\n pressScrollStrategyProps,\n useScrollStrategies,\n} from './scroll-strategies';\n\nimport './YLayer.scss';\nimport { CssProperties } from '@/types';\nimport { noop } from '@/util';\n\nexport const pressYLayerProps = propsFactory(\n {\n modelValue: {\n type: Boolean as PropType<boolean>,\n },\n scrim: {\n type: Boolean as PropType<boolean>,\n },\n scrimOpacity: {\n type: Number as PropType<number>,\n },\n eager: {\n type: Boolean as PropType<boolean>,\n },\n classes: {\n type: [Array, String, Object] as PropType<\n string[] | string | Record<string, any>\n >,\n },\n contentClasses: {\n type: [Array, String, Object] as PropType<\n string[] | string | Record<string, any>\n >,\n },\n closeClickScrim: {\n type: Boolean as PropType<boolean>,\n },\n contentStyles: {\n type: Object as PropType<CssProperties>,\n default: () => {},\n },\n disabled: {\n type: Boolean as PropType<boolean>,\n default: false,\n },\n maximized: {\n type: Boolean as PropType<boolean>,\n },\n openOnHover: {\n type: Boolean as PropType<boolean>,\n default: false,\n },\n openDelay: {\n type: Number as PropType<number>,\n default: 200,\n },\n closeDelay: {\n type: Number as PropType<number>,\n default: 200,\n },\n zIndex: {\n type: [Number, String] as PropType<number | string>,\n default: 2000,\n },\n contained: Boolean,\n layerGroup: [String, Object] as PropType<string | Element>,\n ...pressThemePropsOptions(),\n ...pressPolyTransitionPropsOptions(),\n ...pressBasePropsOptions(),\n ...pressContentPropsOptions(),\n ...pressCoordinateProps(),\n ...pressScrollStrategyProps(),\n ...pressDimensionPropsOptions(),\n },\n 'YLayer',\n);\n\nexport const YLayer = defineComponent({\n name: 'YLayer',\n inheritAttrs: false,\n components: {\n PolyTransition,\n },\n directives: {\n ComplementClick,\n },\n props: {\n modal: Boolean as PropType<boolean>,\n ...pressYLayerProps(),\n },\n emits: {\n 'update:modelValue': (value: boolean) => true,\n 'click:complement': (mouseEvent: MouseEvent) => true,\n afterLeave: () => true,\n },\n slots: Object as SlotsType<{\n base: any;\n default: any;\n }>,\n setup(props, { emit, expose, attrs, slots }) {\n const vm = getCurrentInstance();\n const scrim$ = ref<HTMLElement>();\n const content$ = ref<HTMLElement>();\n const root$ = ref<HTMLElement>();\n const model = useModelDuplex(props);\n const active = computed({\n get: (): boolean => {\n return !!model.value;\n },\n set: (v: boolean) => {\n if (!(v && props.disabled)) model.value = v;\n },\n });\n // Frags\n const { base, base$, baseEl, baseSlot, baseFromSlotEl } = useBase(props);\n const { contentEvents } = useContent(props, active);\n const { themeClasses } = useLocalTheme(props);\n const { layerGroup, layerGroupState, getActiveLayers } =\n useLayerGroup(props);\n const { polyTransitionBindProps } = usePolyTransition(props);\n const { dimensionStyles } = useDimension(props);\n\n const { lazyValue, onAfterUpdate } = useLazy(toRef(props, 'eager'), active);\n // States\n const finish = shallowRef(false);\n const hovered = ref(false);\n const focused = ref(false);\n const disabled = toRef(props, 'disabled');\n const maximized = toRef(props, 'maximized');\n\n const rendered = computed<boolean>(\n () => !disabled.value && (lazyValue.value || active.value),\n );\n\n const { coordinateStyles, updateCoordinate } = useCoordinate(props, {\n contentEl: content$,\n base,\n active,\n });\n useScrollStrategies(props, {\n root: root$,\n contentEl: content$,\n active,\n baseEl: base,\n updateCoordinate,\n });\n\n function onClickComplementLayer(mouseEvent: MouseEvent) {\n emit('click:complement', mouseEvent);\n if (!props.modal) {\n if (\n scrim$.value !== null &&\n scrim$.value === mouseEvent.target &&\n props.closeClickScrim\n ) {\n active.value = false;\n }\n } else {\n // TODO: shrug ani\n }\n }\n\n function closeConditional(): boolean {\n return (\n (!props.openOnHover || (props.openOnHover && !hovered.value)) &&\n active.value &&\n finish.value\n ); // TODO: && groupTopLevel.value;\n }\n\n const complementClickOption = reactive<ComplementClickBindingOptions>({\n handler: onClickComplementLayer,\n determine: closeConditional,\n include: () => [baseEl.value],\n });\n\n function onAfterEnter() {\n finish.value = true;\n }\n\n function onAfterLeave() {\n onAfterUpdate();\n finish.value = false;\n emit('afterLeave');\n }\n\n function onClickScrim() {\n if (props.closeClickScrim) {\n active.value = false;\n }\n }\n\n function onMouseenter(event: Event) {\n hovered.value = true;\n }\n\n function onMouseleave(event: Event) {\n hovered.value = false;\n }\n\n const computedStyle = computed(() => {\n return {\n zIndex: (props.zIndex ?? '2000').toString(),\n };\n });\n\n const computedClass = computed<Record<string, boolean>>(() => {\n const { classes } = props;\n const boundClasses = bindClasses(classes);\n return {\n ...boundClasses,\n 'y-layer--active': !!active.value,\n };\n });\n\n const computedContentClasses = computed<Record<string, boolean>>(() => {\n const boundClasses = bindClasses(props.contentClasses);\n return {\n ...boundClasses,\n };\n });\n\n expose({\n scrim$,\n base$,\n content$: computed(() => content$.value),\n baseEl,\n active,\n onAfterUpdate,\n updateCoordinate,\n hovered,\n finish,\n modal: computed(() => props.modal),\n getActiveLayers,\n isMe: (vnode: ComponentInternalInstance) => {\n return vnode === vm;\n },\n });\n\n useRender(() => {\n const slotBase = slots.base?.({\n active: active.value,\n props: mergeProps({\n ref: base$,\n class: {\n 'y-layer-base': true,\n 'y-layer-base--active': active.value,\n },\n ...(props.baseProps ?? {}),\n }),\n });\n baseSlot.value = slotBase;\n return (\n <>\n {slotBase}\n <Teleport disabled={!layerGroup.value} to={layerGroup.value as any}>\n {rendered.value && (\n <div\n class={[\n {\n 'y-layer': true,\n 'y-layer--finish': finish.value,\n 'y-layer--contained': props.contained,\n ...computedClass.value,\n },\n themeClasses.value,\n ]}\n onMouseenter={onMouseenter}\n onMouseleave={onMouseleave}\n style={computedStyle.value}\n ref={root$}\n {...attrs}\n >\n <Transition name=\"fade\" appear>\n {active.value && props.scrim && (\n <div\n class=\"y-layer__scrim\"\n style={{ '--y-layer-scrim-opacity': props.scrimOpacity }}\n onClick={onClickScrim}\n onKeydown={noop()}\n onKeyup={noop()}\n ref=\"scrim$\"\n ></div>\n )}\n </Transition>\n <PolyTransition\n onAfterEnter={onAfterEnter}\n onAfterLeave={onAfterLeave}\n appear\n {...polyTransitionBindProps.value}\n >\n <div\n v-show={active.value}\n v-complement-click={{ ...complementClickOption }}\n class={{\n 'y-layer__content': true,\n ...computedContentClasses.value,\n }}\n style={[\n {\n ...dimensionStyles.value,\n ...coordinateStyles.value,\n ...props.contentStyles,\n },\n ]}\n {...contentEvents.value}\n ref={content$}\n >\n {slots.default?.({ active: active.value })}\n </div>\n </PolyTransition>\n </div>\n )}\n </Teleport>\n </>\n );\n });\n\n return {\n complementClickOption,\n layerGroup,\n active,\n finish,\n rendered,\n lazyValue,\n onAfterUpdate: onAfterUpdate as () => void,\n scrim$,\n content$,\n base$,\n baseEl,\n baseFromSlotEl,\n polyTransitionBindProps,\n coordinateStyles,\n layerGroupState,\n getActiveLayers,\n };\n },\n});\n\nexport type YLayer = InstanceType<typeof YLayer>;\n"],"mappings":"AACA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,UAAU,EACVC,QAAQ,EACRC,GAAG,EACHC,UAAU,EACVC,QAAQ,EACRC,KAAK,EACLC,UAAU,EAAAC,QAAA,IAAAC,SAAA,EAAAC,WAAA,IAAAC,YAAA,EAAAC,KAAA,IAAAC,MAAA,EAAAC,gBAAA,IAAAC,iBAAA,EAAAd,UAAA,IAAAe,WAAA,EAAAC,cAAA,IAAAC,eAAA,QACL,KAAK;AAAC,SAEJC,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,oBAAoB,EAAEC,aAAa;AAAA,SAE1CC,0BAA0B,EAC1BC,YAAY;AAAA,SAELC,aAAa;AAAA,SACbC,sBAAsB,EAAEC,aAAa;AAAA,SACrCC,OAAO;AAAA,SAEdC,cAAc,EACdC,+BAA+B,EAC/BC,iBAAiB;AAAA,SAGjBC,eAAe;AAAA,SAGRC,WAAW,EAAEC,eAAe,EAAEC,YAAY;AAAA,SAE1CC,qBAAqB,EAAEC,OAAO;AAAA,SAC9BC,wBAAwB,EAAEC,UAAU;AAAA,SAE3CC,wBAAwB,EACxBC,mBAAmB;AAGrB;AAAuB,SAEdC,IAAI;AAEb,OAAO,MAAMC,gBAAgB,GAAGR,YAAY,CAC1C;EACES,UAAU,EAAE;IACVC,IAAI,EAAEC;EACR,CAAC;EACDC,KAAK,EAAE;IACLF,IAAI,EAAEC;EACR,CAAC;EACDE,YAAY,EAAE;IACZH,IAAI,EAAEI;EACR,CAAC;EACDC,KAAK,EAAE;IACLL,IAAI,EAAEC;EACR,CAAC;EACDK,OAAO,EAAE;IACPN,IAAI,EAAE,CAACO,KAAK,EAAEC,MAAM,EAAEC,MAAM;EAG9B,CAAC;EACDC,cAAc,EAAE;IACdV,IAAI,EAAE,CAACO,KAAK,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MAAM,EAAEA,MAAM,CAACd;UAAM,CAAC,CAAC,MAAA9D,MAAA,EAhBlC4E,MAAM,CAACd,KAAK,IAAA5D,iBAAA,sBACA;YAAE,GAAGsG;UAAsB,CAAC;QAAA,IAmBvD;MAAA;IAIT,CAAC,CAAC;IAEF,OAAO;MACLA,qBAAqB;MACrBnD,UAAU;MACVuB,MAAM;MACNiB,MAAM;MACNG,QAAQ;MACRL,SAAS;MACTC,aAAa,EAAEA,aAA2B;MAC1CpB,MAAM;MACNC,QAAQ;MACRQ,KAAK;MACLC,MAAM;MACNE,cAAc;MACdK,uBAAuB;MACvBQ,gBAAgB;MAChBV,eAAe;MACfC;IACF,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"YLayer.js","names":["computed","getCurrentInstance","mergeProps","reactive","ref","shallowRef","Teleport","Transition","toRef","Fragment","_Fragment","createVNode","_createVNode","vShow","_vShow","resolveDirective","_resolveDirective","_mergeProps","withDirectives","_withDirectives","useModelDuplex","useRender","pressCoordinateProps","useCoordinate","pressDimensionPropsOptions","useDimension","useLayerGroup","pressThemePropsOptions","useLocalTheme","useLazy","PolyTransition","pressPolyTransitionPropsOptions","usePolyTransition","ComplementClick","bindClasses","defineComponent","propsFactory","pressBasePropsOptions","useBase","pressContentPropsOptions","useContent","pressScrollStrategyProps","useScrollStrategies","noop","pressYLayerProps","modelValue","type","Boolean","scrim","scrimOpacity","Number","eager","classes","Array","String","Object","contentClasses","closeClickScrim","contentStyles","default","disabled","maximized","openOnHover","openDelay","closeDelay","zIndex","contained","layerGroup","YLayer","name","inheritAttrs","components","directives","props","modal","emits","value","mouseEvent","afterLeave","slots","setup","_ref","emit","expose","attrs","vm","scrim$","content$","root$","model","active","get","set","v","base","base$","baseEl","baseSlot","baseFromSlotEl","contentEvents","themeClasses","layerGroupState","getActiveLayers","polyTransitionBindProps","dimensionStyles","lazyValue","onAfterUpdate","finish","hovered","focused","rendered","coordinateStyles","updateCoordinate","contentEl","root","onClickComplementLayer","target","closeConditional","complementClickOption","handler","determine","include","onAfterEnter","onAfterLeave","onClickScrim","onMouseenter","event","onMouseleave","computedStyle","toString","computedClass","boundClasses","computedContentClasses","isMe","vnode","slotBase","class","baseProps"],"sources":["../../../src/components/layer/YLayer.tsx"],"sourcesContent":["import type { ComponentInternalInstance, PropType, SlotsType } from \"vue\";\nimport {\n\tcomputed,\n\tgetCurrentInstance,\n\tmergeProps,\n\treactive,\n\tref,\n\tshallowRef,\n\tTeleport,\n\tTransition,\n\ttoRef,\n} from \"vue\";\n\nimport { useModelDuplex } from \"@/composables/communication\";\nimport { useRender } from \"@/composables/component\";\nimport { pressCoordinateProps, useCoordinate } from \"@/composables/coordinate\";\nimport {\n\tpressDimensionPropsOptions,\n\tuseDimension,\n} from \"@/composables/dimension\";\nimport { useLayerGroup } from \"@/composables/layer-group\";\nimport { pressThemePropsOptions, useLocalTheme } from \"@/composables/theme\";\nimport { useLazy } from \"@/composables/timing\";\nimport {\n\tPolyTransition,\n\tpressPolyTransitionPropsOptions,\n\tusePolyTransition,\n} from \"@/composables/transition\";\nimport {\n\tComplementClick,\n\ttype ComplementClickBindingOptions,\n} from \"@/directives/complement-click\";\nimport { bindClasses, defineComponent, propsFactory } from \"@/util/component\";\n\nimport { pressBasePropsOptions, useBase } from \"./base\";\nimport { pressContentPropsOptions, useContent } from \"./content\";\nimport {\n\tpressScrollStrategyProps,\n\tuseScrollStrategies,\n} from \"./scroll-strategies\";\n\nimport \"./YLayer.scss\";\nimport type { CssProperties } from \"@/types\";\nimport { noop } from \"@/util\";\n\nexport const pressYLayerProps = propsFactory(\n\t{\n\t\tmodelValue: {\n\t\t\ttype: Boolean as PropType<boolean>,\n\t\t},\n\t\tscrim: {\n\t\t\ttype: Boolean as PropType<boolean>,\n\t\t},\n\t\tscrimOpacity: {\n\t\t\ttype: Number as PropType<number>,\n\t\t},\n\t\teager: {\n\t\t\ttype: Boolean as PropType<boolean>,\n\t\t},\n\t\tclasses: {\n\t\t\ttype: [Array, String, Object] as PropType<\n\t\t\t\tstring[] | string | Record<string, any>\n\t\t\t>,\n\t\t},\n\t\tcontentClasses: {\n\t\t\ttype: [Array, String, Object] as PropType<\n\t\t\t\tstring[] | string | Record<string, any>\n\t\t\t>,\n\t\t},\n\t\tcloseClickScrim: {\n\t\t\ttype: Boolean as PropType<boolean>,\n\t\t},\n\t\tcontentStyles: {\n\t\t\ttype: Object as PropType<CssProperties>,\n\t\t\tdefault: () => {},\n\t\t},\n\t\tdisabled: {\n\t\t\ttype: Boolean as PropType<boolean>,\n\t\t\tdefault: false,\n\t\t},\n\t\tmaximized: {\n\t\t\ttype: Boolean as PropType<boolean>,\n\t\t},\n\t\topenOnHover: {\n\t\t\ttype: Boolean as PropType<boolean>,\n\t\t\tdefault: false,\n\t\t},\n\t\topenDelay: {\n\t\t\ttype: Number as PropType<number>,\n\t\t\tdefault: 200,\n\t\t},\n\t\tcloseDelay: {\n\t\t\ttype: Number as PropType<number>,\n\t\t\tdefault: 200,\n\t\t},\n\t\tzIndex: {\n\t\t\ttype: [Number, String] as PropType<number | string>,\n\t\t\tdefault: 2000,\n\t\t},\n\t\tcontained: Boolean,\n\t\tlayerGroup: [String, Object] as PropType<string | Element>,\n\t\t...pressThemePropsOptions(),\n\t\t...pressPolyTransitionPropsOptions(),\n\t\t...pressBasePropsOptions(),\n\t\t...pressContentPropsOptions(),\n\t\t...pressCoordinateProps(),\n\t\t...pressScrollStrategyProps(),\n\t\t...pressDimensionPropsOptions(),\n\t},\n\t\"YLayer\",\n);\n\nexport const YLayer = defineComponent({\n\tname: \"YLayer\",\n\tinheritAttrs: false,\n\tcomponents: {\n\t\tPolyTransition,\n\t},\n\tdirectives: {\n\t\tComplementClick,\n\t},\n\tprops: {\n\t\tmodal: Boolean as PropType<boolean>,\n\t\t...pressYLayerProps(),\n\t},\n\temits: {\n\t\t\"update:modelValue\": (value: boolean) => true,\n\t\t\"click:complement\": (mouseEvent: MouseEvent) => true,\n\t\tafterLeave: () => true,\n\t},\n\tslots: Object as SlotsType<{\n\t\tbase: any;\n\t\tdefault: any;\n\t}>,\n\tsetup(props, { emit, expose, attrs, slots }) {\n\t\tconst vm = getCurrentInstance();\n\t\tconst scrim$ = ref<HTMLElement>();\n\t\tconst content$ = ref<HTMLElement>();\n\t\tconst root$ = ref<HTMLElement>();\n\t\tconst model = useModelDuplex(props);\n\t\tconst active = computed({\n\t\t\tget: (): boolean => {\n\t\t\t\treturn !!model.value;\n\t\t\t},\n\t\t\tset: (v: boolean) => {\n\t\t\t\tif (!(v && props.disabled)) model.value = v;\n\t\t\t},\n\t\t});\n\t\t// Frags\n\t\tconst { base, base$, baseEl, baseSlot, baseFromSlotEl } = useBase(props);\n\t\tconst { contentEvents } = useContent(props, active);\n\t\tconst { themeClasses } = useLocalTheme(props);\n\t\tconst { layerGroup, layerGroupState, getActiveLayers } =\n\t\t\tuseLayerGroup(props);\n\t\tconst { polyTransitionBindProps } = usePolyTransition(props);\n\t\tconst { dimensionStyles } = useDimension(props);\n\n\t\tconst { lazyValue, onAfterUpdate } = useLazy(toRef(props, \"eager\"), active);\n\t\t// States\n\t\tconst finish = shallowRef(false);\n\t\tconst hovered = ref(false);\n\t\tconst focused = ref(false);\n\t\tconst disabled = toRef(props, \"disabled\");\n\t\tconst maximized = toRef(props, \"maximized\");\n\n\t\tconst rendered = computed<boolean>(\n\t\t\t() => !disabled.value && (lazyValue.value || active.value),\n\t\t);\n\n\t\tconst { coordinateStyles, updateCoordinate } = useCoordinate(props, {\n\t\t\tcontentEl: content$,\n\t\t\tbase,\n\t\t\tactive,\n\t\t});\n\t\tuseScrollStrategies(props, {\n\t\t\troot: root$,\n\t\t\tcontentEl: content$,\n\t\t\tactive,\n\t\t\tbaseEl: base,\n\t\t\tupdateCoordinate,\n\t\t});\n\n\t\tfunction onClickComplementLayer(mouseEvent: MouseEvent) {\n\t\t\temit(\"click:complement\", mouseEvent);\n\t\t\tif (!props.modal) {\n\t\t\t\tif (\n\t\t\t\t\tscrim$.value !== null &&\n\t\t\t\t\tscrim$.value === mouseEvent.target &&\n\t\t\t\t\tprops.closeClickScrim\n\t\t\t\t) {\n\t\t\t\t\tactive.value = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// TODO: shrug ani\n\t\t\t}\n\t\t}\n\n\t\tfunction closeConditional(): boolean {\n\t\t\treturn (\n\t\t\t\t(!props.openOnHover || (props.openOnHover && !hovered.value)) &&\n\t\t\t\tactive.value &&\n\t\t\t\tfinish.value\n\t\t\t); // TODO: && groupTopLevel.value;\n\t\t}\n\n\t\tconst complementClickOption = reactive<ComplementClickBindingOptions>({\n\t\t\thandler: onClickComplementLayer,\n\t\t\tdetermine: closeConditional,\n\t\t\tinclude: () => [baseEl.value],\n\t\t});\n\n\t\tfunction onAfterEnter() {\n\t\t\tfinish.value = true;\n\t\t}\n\n\t\tfunction onAfterLeave() {\n\t\t\tonAfterUpdate();\n\t\t\tfinish.value = false;\n\t\t\temit(\"afterLeave\");\n\t\t}\n\n\t\tfunction onClickScrim() {\n\t\t\tif (props.closeClickScrim) {\n\t\t\t\tactive.value = false;\n\t\t\t}\n\t\t}\n\n\t\tfunction onMouseenter(event: Event) {\n\t\t\thovered.value = true;\n\t\t}\n\n\t\tfunction onMouseleave(event: Event) {\n\t\t\thovered.value = false;\n\t\t}\n\n\t\tconst computedStyle = computed(() => {\n\t\t\treturn {\n\t\t\t\tzIndex: (props.zIndex ?? \"2000\").toString(),\n\t\t\t};\n\t\t});\n\n\t\tconst computedClass = computed<Record<string, boolean>>(() => {\n\t\t\tconst { classes } = props;\n\t\t\tconst boundClasses = bindClasses(classes);\n\t\t\treturn {\n\t\t\t\t...boundClasses,\n\t\t\t\t\"y-layer--active\": !!active.value,\n\t\t\t};\n\t\t});\n\n\t\tconst computedContentClasses = computed<Record<string, boolean>>(() => {\n\t\t\tconst boundClasses = bindClasses(props.contentClasses);\n\t\t\treturn {\n\t\t\t\t...boundClasses,\n\t\t\t};\n\t\t});\n\n\t\texpose({\n\t\t\tscrim$,\n\t\t\tbase$,\n\t\t\tcontent$: computed(() => content$.value),\n\t\t\tbaseEl,\n\t\t\tactive,\n\t\t\tonAfterUpdate,\n\t\t\tupdateCoordinate,\n\t\t\thovered,\n\t\t\tfinish,\n\t\t\tmodal: computed(() => props.modal),\n\t\t\tgetActiveLayers,\n\t\t\tisMe: (vnode: ComponentInternalInstance) => {\n\t\t\t\treturn vnode === vm;\n\t\t\t},\n\t\t});\n\n\t\tuseRender(() => {\n\t\t\tconst slotBase = slots.base?.({\n\t\t\t\tactive: active.value,\n\t\t\t\tprops: mergeProps({\n\t\t\t\t\tref: base$,\n\t\t\t\t\tclass: {\n\t\t\t\t\t\t\"y-layer-base\": true,\n\t\t\t\t\t\t\"y-layer-base--active\": active.value,\n\t\t\t\t\t},\n\t\t\t\t\t...(props.baseProps ?? {}),\n\t\t\t\t}),\n\t\t\t});\n\t\t\tbaseSlot.value = slotBase;\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t{slotBase}\n\t\t\t\t\t<Teleport disabled={!layerGroup.value} to={layerGroup.value as any}>\n\t\t\t\t\t\t{rendered.value && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={[\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\"y-layer\": true,\n\t\t\t\t\t\t\t\t\t\t\"y-layer--finish\": finish.value,\n\t\t\t\t\t\t\t\t\t\t\"y-layer--contained\": props.contained,\n\t\t\t\t\t\t\t\t\t\t...computedClass.value,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tthemeClasses.value,\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\tonMouseenter={onMouseenter}\n\t\t\t\t\t\t\t\tonMouseleave={onMouseleave}\n\t\t\t\t\t\t\t\tstyle={computedStyle.value}\n\t\t\t\t\t\t\t\tref={root$}\n\t\t\t\t\t\t\t\t{...attrs}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Transition name=\"fade\" appear>\n\t\t\t\t\t\t\t\t\t{active.value && props.scrim && (\n\t\t\t\t\t\t\t\t\t\t// biome-ignore lint/a11y/noStaticElementInteractions: <explanation>\n\t\t\t\t\t\t\t\t\t\t// biome-ignore lint/a11y/useKeyWithClickEvents: <explanation>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclass=\"y-layer__scrim\"\n\t\t\t\t\t\t\t\t\t\t\tstyle={{ \"--y-layer-scrim-opacity\": props.scrimOpacity }}\n\t\t\t\t\t\t\t\t\t\t\tonClick={onClickScrim}\n\t\t\t\t\t\t\t\t\t\t\tonKeydown={noop()}\n\t\t\t\t\t\t\t\t\t\t\tonKeyup={noop()}\n\t\t\t\t\t\t\t\t\t\t\tref=\"scrim$\"\n\t\t\t\t\t\t\t\t\t\t></div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Transition>\n\t\t\t\t\t\t\t\t<PolyTransition\n\t\t\t\t\t\t\t\t\tonAfterEnter={onAfterEnter}\n\t\t\t\t\t\t\t\t\tonAfterLeave={onAfterLeave}\n\t\t\t\t\t\t\t\t\tappear\n\t\t\t\t\t\t\t\t\t{...polyTransitionBindProps.value}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tv-show={active.value}\n\t\t\t\t\t\t\t\t\t\tv-complement-click={{ ...complementClickOption }}\n\t\t\t\t\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t\t\t\t\t\"y-layer__content\": true,\n\t\t\t\t\t\t\t\t\t\t\t...computedContentClasses.value,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t...dimensionStyles.value,\n\t\t\t\t\t\t\t\t\t\t\t\t...coordinateStyles.value,\n\t\t\t\t\t\t\t\t\t\t\t\t...props.contentStyles,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\t{...contentEvents.value}\n\t\t\t\t\t\t\t\t\t\tref={content$}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{slots.default?.({ active: active.value })}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</PolyTransition>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Teleport>\n\t\t\t\t</>\n\t\t\t);\n\t\t});\n\n\t\treturn {\n\t\t\tcomplementClickOption,\n\t\t\tlayerGroup,\n\t\t\tactive,\n\t\t\tfinish,\n\t\t\trendered,\n\t\t\tlazyValue,\n\t\t\tonAfterUpdate: onAfterUpdate as () => void,\n\t\t\tscrim$,\n\t\t\tcontent$,\n\t\t\tbase$,\n\t\t\tbaseEl,\n\t\t\tbaseFromSlotEl,\n\t\t\tpolyTransitionBindProps,\n\t\t\tcoordinateStyles,\n\t\t\tlayerGroupState,\n\t\t\tgetActiveLayers,\n\t\t};\n\t},\n});\n\nexport type YLayer = InstanceType<typeof YLayer>;\n"],"mappings":"AACA,SACCA,QAAQ,EACRC,kBAAkB,EAClBC,UAAU,EACVC,QAAQ,EACRC,GAAG,EACHC,UAAU,EACVC,QAAQ,EACRC,UAAU,EACVC,KAAK,EAAAC,QAAA,IAAAC,SAAA,EAAAC,WAAA,IAAAC,YAAA,EAAAC,KAAA,IAAAC,MAAA,EAAAC,gBAAA,IAAAC,iBAAA,EAAAd,UAAA,IAAAe,WAAA,EAAAC,cAAA,IAAAC,eAAA,QACC,KAAK;AAAC,SAEJC,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,oBAAoB,EAAEC,aAAa;AAAA,SAE3CC,0BAA0B,EAC1BC,YAAY;AAAA,SAEJC,aAAa;AAAA,SACbC,sBAAsB,EAAEC,aAAa;AAAA,SACrCC,OAAO;AAAA,SAEfC,cA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EAAE6D,KAAK,CAACxB;YAAa,CAAC;YAAA,WAC/C2E,YAAY;YAAA,aACVjF,IAAI,CAAC,CAAC;YAAA,WACRA,IAAI,CAAC,CAAC;YAAA;UAAA,QAGhB;QAAA,IAAA/B,YAAA,CAAAkB,cAAA,EAAAb,WAAA;UAAA,gBAGayG,YAAY;UAAA,gBACZC,YAAY;UAAA;QAAA,GAEtBpB,uBAAuB,CAAC3B,KAAK;UAAAjB,OAAA,EAAAA,CAAA,MAAAxC,eAAA,CAAAP,YAAA,QAAAK,WAAA;YAAA,SAKzB;cACN,kBAAkB,EAAE,IAAI;cACxB,GAAGmH,sBAAsB,CAACxD;YAC3B,CAAC;YAAA,SACM,CACN;cACC,GAAG4B,eAAe,CAAC5B,KAAK;cACxB,GAAGmC,gBAAgB,CAACnC,KAAK;cACzB,GAAGH,KAAK,CAACf;YACV,CAAC;UACD,GACGyC,aAAa,CAACvB,KAAK;YAAA,OAClBW;UAAQ,KAEZR,KAAK,CAACpB,OAAO,GAAG;YAAE+B,MAAM,EAAEA,MAAM,CAACd;UAAM,CAAC,CAAC,MAAA9D,MAAA,EAhBlC4E,MAAM,CAACd,KAAK,IAAA5D,iBAAA,sBACA;YAAE,GAAGsG;UAAsB,CAAC;QAAA,IAmBnD;MAAA;IAIL,CAAC,CAAC;IAEF,OAAO;MACNA,qBAAqB;MACrBnD,UAAU;MACVuB,MAAM;MACNiB,MAAM;MACNG,QAAQ;MACRL,SAAS;MACTC,aAAa,EAAEA,aAA2B;MAC1CpB,MAAM;MACNC,QAAQ;MACRQ,KAAK;MACLC,MAAM;MACNE,cAAc;MACdK,uBAAuB;MACvBQ,gBAAgB;MAChBV,eAAe;MACfC;IACD,CAAC;EACF;AACD,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/composables/coordinate/types.ts"],"sourcesContent":["import type { Ref } from 'vue';\n\nexport interface CoordinateState {\n contentEl: Ref<HTMLElement | undefined>;\n base: Ref<HTMLElement | [x: number, y: number] | undefined>;\n active: Ref<boolean>;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/composables/coordinate/types.ts"],"sourcesContent":["import type { Ref } from 'vue';\n\nexport interface CoordinateState {\n contentEl: Ref<HTMLElement | undefined>;\n base: Ref<HTMLElement | [x: number, y: number] | undefined>;\n active: Ref<boolean>;\n placement?: Ref<any>;\n}\n"],"mappings":"","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuyeon",
3
- "version": "0.3.4-beta.14",
3
+ "version": "0.3.4-beta.15",
4
4
  "keywords": [
5
5
  "UI Library",
6
6
  "Vue"
@@ -577,8 +577,8 @@ export declare const YDialog: import('vue').DefineComponent<{
577
577
  layerGroupState: WeakMap<HTMLElement, Set<any>>;
578
578
  getActiveLayers: () => import('vue').ComponentInternalInstance[];
579
579
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
580
- 'update:modelValue': (value: boolean) => true;
581
- 'click:complement': (mouseEvent: MouseEvent) => true;
580
+ "update:modelValue": (value: boolean) => true;
581
+ "click:complement": (mouseEvent: MouseEvent) => true;
582
582
  afterLeave: () => true;
583
583
  }, string> | undefined, import('vue').DefineComponent<{
584
584
  minWidth: PropType<number | string>;
@@ -703,8 +703,8 @@ export declare const YDialog: import('vue').DefineComponent<{
703
703
  layerGroupState: WeakMap<HTMLElement, Set<any>>;
704
704
  getActiveLayers: () => import('vue').ComponentInternalInstance[];
705
705
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
706
- 'update:modelValue': (value: boolean) => true;
707
- 'click:complement': (mouseEvent: MouseEvent) => true;
706
+ "update:modelValue": (value: boolean) => true;
707
+ "click:complement": (mouseEvent: MouseEvent) => true;
708
708
  afterLeave: () => true;
709
709
  }, string> | undefined>;
710
710
  classes: import('vue').ComputedRef<{
@@ -130,4 +130,7 @@ export declare const YImg: import('vue').DefineComponent<{
130
130
  src: PropType<string>;
131
131
  crossorigin: PropType<ImgHTMLAttributes["crossorigin"]>;
132
132
  referrerpolicy: PropType<ImgHTMLAttributes["referrerpolicy"]>;
133
- }, void, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("error" | "load" | "loaded")[], "error" | "load" | "loaded">;
133
+ }, {
134
+ status: import('vue').ShallowRef<YImgStatus, YImgStatus>;
135
+ image$: import('vue').Ref<HTMLImageElement | undefined, HTMLImageElement | undefined>;
136
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("error" | "load" | "loaded")[], "error" | "load" | "loaded">;
@@ -0,0 +1 @@
1
+ export * from './YImg';
@@ -36,3 +36,4 @@ export * from './ip-field';
36
36
  export * from './hover';
37
37
  export * from './text-interpolation';
38
38
  export * from './text-highlighter';
39
+ export * from './img';
@@ -429,8 +429,8 @@ export declare const YLayer: import('vue').DefineComponent<{
429
429
  layerGroupState: WeakMap<HTMLElement, Set<any>>;
430
430
  getActiveLayers: () => ComponentInternalInstance[];
431
431
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
432
- 'update:modelValue': (value: boolean) => true;
433
- 'click:complement': (mouseEvent: MouseEvent) => true;
432
+ "update:modelValue": (value: boolean) => true;
433
+ "click:complement": (mouseEvent: MouseEvent) => true;
434
434
  afterLeave: () => true;
435
435
  }, string>;
436
436
  export type YLayer = InstanceType<typeof YLayer>;
@@ -373,8 +373,8 @@ export declare const YMenu: import('vue').DefineComponent<{
373
373
  layerGroupState: WeakMap<HTMLElement, Set<any>>;
374
374
  getActiveLayers: () => import('vue').ComponentInternalInstance[];
375
375
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
376
- 'update:modelValue': (value: boolean) => true;
377
- 'click:complement': (mouseEvent: MouseEvent) => true;
376
+ "update:modelValue": (value: boolean) => true;
377
+ "click:complement": (mouseEvent: MouseEvent) => true;
378
378
  afterLeave: () => true;
379
379
  }, string> | undefined, import('vue').DefineComponent<{
380
380
  minWidth: PropType<number | string>;
@@ -499,8 +499,8 @@ export declare const YMenu: import('vue').DefineComponent<{
499
499
  layerGroupState: WeakMap<HTMLElement, Set<any>>;
500
500
  getActiveLayers: () => import('vue').ComponentInternalInstance[];
501
501
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
502
- 'update:modelValue': (value: boolean) => true;
503
- 'click:complement': (mouseEvent: MouseEvent) => true;
502
+ "update:modelValue": (value: boolean) => true;
503
+ "click:complement": (mouseEvent: MouseEvent) => true;
504
504
  afterLeave: () => true;
505
505
  }, string> | undefined>;
506
506
  baseEl: import('vue').ComputedRef<any>;
@@ -4,4 +4,5 @@ export interface CoordinateState {
4
4
  contentEl: Ref<HTMLElement | undefined>;
5
5
  base: Ref<HTMLElement | [x: number, y: number] | undefined>;
6
6
  active: Ref<boolean>;
7
+ placement?: Ref<any>;
7
8
  }
@@ -1,7 +1,7 @@
1
- import { YAlert, YApp, YBadge, YButton, YCard, YCardBody, YCardFooter, YCardHeader, YCheckbox, YChip, YDataTable, YDataTableLayerRow, YDataTableLayerRows, YDataTableServer, YDateCalendar, YDatePicker, YDialog, YDividePanel, YDivider, YDropdown, YExpandHTransition, YExpandVTransition, YFieldInput, YForm, YHover, YIcon, YInput, YInputCheckbox, YIpv4Field, YLayer, YList, YListItem, YMenu, YMonthPicker, YPagination, YProgressBar, YProgressRing, YSelect, YSnackbar, YSpinnerRing, YSwitch, YTab, YTable, YTabs, YTextarea, YTextEllipsis, YTextHighlighter, YTi, YTooltip, YTreeView, YTreeViewNode } from 'yuyeon/components';
1
+ import { YAlert, YApp, YBadge, YButton, YCard, YCardBody, YCardFooter, YCardHeader, YCheckbox, YChip, YDataTable, YDataTableServer, YDateCalendar, YDatePicker, YDividePanel, YDivider, YExpandHTransition, YExpandVTransition, YFieldInput, YForm, YHover, YIcon, YImg, YInput, YIpv4Field, YLayer, YList, YListItem, YMenu, YMonthPicker, YPagination, YProgressBar, YProgressRing, YSelect, YSnackbar, YSpinnerRing, YSwitch, YTab, YTable, YTabs, YTextarea, YTextEllipsis, YTextHighlighter, YTi, YTooltip, YTreeView } from 'yuyeon/components';
2
2
 
3
3
 
4
- declare module 'vue' {
4
+ declare module "vue" {
5
5
  export interface GlobalComponents {
6
6
  // @define-components
7
7
  YApp: YApp;
@@ -55,10 +55,11 @@ declare module 'vue' {
55
55
  YTextHighlighter: YTextHighlighter;
56
56
  YProgressRing: YProgressRing;
57
57
  YTextEllipsis: YTextEllipsis;
58
+ YImg: YImg;
58
59
  }
59
60
 
60
61
  export interface GlobalDirectives {
61
- vPlateWave: typeof import('yuyeon/directives')['PlateWave'];
62
- vComplementClick: typeof import('yuyeon/directives')['ComplementClick'];
62
+ vPlateWave: (typeof import("yuyeon/directives"))["PlateWave"];
63
+ vComplementClick: (typeof import("yuyeon/directives"))["ComplementClick"];
63
64
  }
64
65
  }