@elmethis/vue 0.2.4 → 0.2.5

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, watch, createElementBlock, openBlock, normalizeClass, createVNode, createElementVNode, Transition, unref, withCtx, withDirectives, vShow, normalizeStyle, createCommentVNode } from "vue";
1
+ import { defineComponent, ref, createElementBlock, openBlock, normalizeClass, createVNode, createElementVNode, Transition, unref, withCtx, withDirectives, vShow, normalizeStyle, createCommentVNode } from "vue";
2
2
  import ElmRectangleWave from "../fallback/ElmRectangleWave.vue.mjs";
3
3
  import ElmDotLoadingIcon from "../icon/ElmDotLoadingIcon.vue.mjs";
4
4
  import { useImage, onKeyStroke, useIntersectionObserver } from "@vueuse/core";
@@ -20,13 +20,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  setup(__props) {
21
21
  const props = __props;
22
22
  const { isLoading, error } = useImage({ src: props.src });
23
- const isLoaded = ref(false);
24
- watch(
25
- () => props.src,
26
- () => {
27
- isLoaded.value = false;
28
- }
29
- );
30
23
  const isModalOpen = ref(false);
31
24
  onKeyStroke("Escape", (e) => {
32
25
  e.preventDefault();
@@ -110,16 +103,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
110
103
  onClick: _cache[0] || (_cache[0] = ($event) => {
111
104
  if (__props.enableModal) isModalOpen.value = true;
112
105
  }),
113
- onLoad: _cache[1] || (_cache[1] = ($event) => isLoaded.value = true),
114
- onError: _cache[2] || (_cache[2] = ($event) => isLoaded.value = false),
115
106
  style: normalizeStyle({
116
107
  cursor: __props.enableModal ? "zoom-in" : void 0,
117
108
  "--margin-block": __props.margin,
118
- opacity: isLoaded.value && !unref(error) ? 1 : 0,
109
+ opacity: !unref(isLoading) && !unref(error) ? 1 : 0,
119
110
  transition: "opacity 220ms ease",
120
- pointerEvents: isLoaded.value && !unref(error) ? void 0 : "none"
111
+ pointerEvents: !unref(isLoading) && !unref(error) ? void 0 : "none"
121
112
  })
122
- }, null, 46, _hoisted_1)
113
+ }, null, 14, _hoisted_1)
123
114
  ]),
124
115
  _: 1
125
116
  }, 8, ["enter-from-class", "enter-active-class", "enter-to-class", "leave-from-class", "leave-active-class", "leave-to-class"])
@@ -166,7 +157,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
166
157
  isModalOpen.value ? (openBlock(), createElementBlock("div", {
167
158
  key: 0,
168
159
  class: normalizeClass(_ctx.$style.modal),
169
- onClick: _cache[3] || (_cache[3] = ($event) => isModalOpen.value = false)
160
+ onClick: _cache[1] || (_cache[1] = ($event) => isModalOpen.value = false)
170
161
  }, [
171
162
  createElementVNode("img", {
172
163
  class: normalizeClass(_ctx.$style["modal-image"]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elmethis/vue",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,7 +36,7 @@
36
36
  "devDependencies": {
37
37
  "@ag-ui/core": "^0.0.42",
38
38
  "@notionhq/client": "^5.6.0",
39
- "@storybook/vue3-vite": "10.1.10",
39
+ "@storybook/vue3-vite": "10.1.11",
40
40
  "@types/json-schema": "^7.0.15",
41
41
  "@types/katex": "^0.16.7",
42
42
  "@types/lodash-es": "^4.17.12",
@@ -46,7 +46,7 @@
46
46
  "jarkup-ts": "^0.6.0",
47
47
  "openapi-types": "^12.1.3",
48
48
  "postcss": "^8.5.6",
49
- "postcss-preset-env": "^10.5.0",
49
+ "postcss-preset-env": "^10.6.0",
50
50
  "sass": "^1.97.1",
51
51
  "vite": "^7.3.0",
52
52
  "vite-plugin-css-injected-by-js": "^3.5.2",