@monkeyplus/flow 6.0.97 → 6.0.98

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.
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkeyplus/flow",
3
- "version": "6.0.97",
3
+ "version": "6.0.98",
4
4
  "description": "@monkeyplus/flow package-first runtime with Vite, Nitro, Vue and a workspace playground.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -258,7 +258,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
258
258
  sizes: string | Record<string, any>;
259
259
  strappi: boolean;
260
260
  alt: string;
261
- referrerpolicy: "origin" | "no-referrer" | "no-referrer-when-downgrade" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
261
+ referrerpolicy: "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
262
262
  usemap: string;
263
263
  longdesc: string;
264
264
  ismap: boolean;
@@ -13,10 +13,6 @@ function resolveImageSource(value, fallback) {
13
13
  function getLocalSource(src) {
14
14
  return src.startsWith("http") ? "" : src;
15
15
  }
16
- function isRuntimeLambda() {
17
- const runtimeProcess = typeof globalThis === "object" ? Reflect.get(globalThis, "process") : void 0;
18
- return !!(runtimeProcess?.env?.LAMBDA_TASK_ROOT || runtimeProcess?.env?.AWS_LAMBDA_FUNCTION_VERSION);
19
- }
20
16
  export default defineComponent({
21
17
  name: "MkImage",
22
18
  inheritAttrs: false,
@@ -117,17 +113,11 @@ export default defineComponent({
117
113
  };
118
114
  });
119
115
  return () => {
120
- const isLambda = isRuntimeLambda();
121
- const compatibilityThumb = !isLambda && nSrc.value.thumbnail;
122
- let lambdaSrc = resolvedSrc.value;
123
- if (isLambda) {
124
- const meta = imageUtils.getImageMeta?.(resolvedSrc.value);
125
- lambdaSrc = meta?.rename || resolvedSrc.value;
126
- }
116
+ const compatibilityThumb = nSrc.value.thumbnail;
127
117
  return h("img", {
128
118
  ...attrs,
129
119
  ...nAttrs.value,
130
- "src": isLambda ? lambdaSrc : compatibilityThumb || nSrc.value.normal,
120
+ "src": compatibilityThumb || nSrc.value.normal,
131
121
  "data-src": compatibilityThumb ? nSrc.value.normal : void 0,
132
122
  "alt": props.alt || image.value.alt,
133
123
  "title": props.title || image.value.title,
@@ -4,10 +4,6 @@ import { useImage } from "./image-shared.mjs";
4
4
  function getLocalSource(src) {
5
5
  return src.startsWith("http") ? "" : src;
6
6
  }
7
- function isRuntimeLambda() {
8
- const runtimeProcess = typeof globalThis === "object" ? Reflect.get(globalThis, "process") : void 0;
9
- return !!(runtimeProcess?.env?.LAMBDA_TASK_ROOT || runtimeProcess?.env?.AWS_LAMBDA_FUNCTION_VERSION);
10
- }
11
7
  function resolveThumbnailValue(value, fallback) {
12
8
  return value !== void 0 ? value : fallback;
13
9
  }
@@ -127,20 +123,6 @@ export default defineComponent({
127
123
  return typeof thumbnail === "string" ? thumbnail : resolvedSrc.value;
128
124
  });
129
125
  return () => {
130
- if (isRuntimeLambda()) {
131
- const meta = imageUtils.getImageMeta?.(resolvedSrc.value);
132
- const lambdaSrc = meta?.rename || resolvedSrc.value;
133
- return h("img", {
134
- ...attrs,
135
- ...nImgAttrs.value,
136
- "src": lambdaSrc,
137
- "alt": props.alt || image.value.alt,
138
- "title": props.title || image.value.title,
139
- "width": props.eWidth || nImgAttrs.value.width,
140
- "height": props.eHeight || nImgAttrs.value.height,
141
- "x-src": getLocalSource(resolvedSrc.value)
142
- });
143
- }
144
126
  const primarySource = nSources.value[0] || { src: resolvedSrc.value, srcset: resolvedSrc.value };
145
127
  const fallbackSource = nSources.value[1];
146
128
  const compatibilityThumb = nThumbnail.value;