@lark-apaas/client-toolkit 1.2.64-beta.0 → 1.2.65-alpha.20260824094952
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,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useState } from "react";
|
|
3
3
|
import { Content, Portal, Root, Trigger } from "@radix-ui/react-popover";
|
|
4
|
-
import { DOUBAO_LOGO_SRC
|
|
4
|
+
import { DOUBAO_LOGO_SRC } from "./doubao-watermark-asset.js";
|
|
5
5
|
import { getAppId } from "../../utils/getAppId.js";
|
|
6
6
|
import { getEnv } from "../../utils/getParentOrigin.js";
|
|
7
7
|
import { useIsMobile } from "../../hooks/index.js";
|
|
@@ -265,27 +265,11 @@ const MobileWatermark = ({ onDontShow })=>{
|
|
|
265
265
|
position: 'fixed',
|
|
266
266
|
right: 12,
|
|
267
267
|
bottom: 12,
|
|
268
|
-
width: 122,
|
|
269
|
-
height: 30,
|
|
270
268
|
zIndex: 9999,
|
|
271
269
|
cursor: 'pointer'
|
|
272
270
|
},
|
|
273
|
-
children: /*#__PURE__*/ jsx(
|
|
274
|
-
|
|
275
|
-
width: 166,
|
|
276
|
-
height: 94,
|
|
277
|
-
alt: "豆包 AI 生成",
|
|
278
|
-
style: {
|
|
279
|
-
position: 'absolute',
|
|
280
|
-
right: -12,
|
|
281
|
-
bottom: -40,
|
|
282
|
-
width: 166,
|
|
283
|
-
height: 94,
|
|
284
|
-
maxWidth: 'none',
|
|
285
|
-
maxHeight: 'none',
|
|
286
|
-
display: 'block',
|
|
287
|
-
pointerEvents: 'none'
|
|
288
|
-
}
|
|
271
|
+
children: /*#__PURE__*/ jsx(Pill, {
|
|
272
|
+
variant: "mobile"
|
|
289
273
|
})
|
|
290
274
|
})
|
|
291
275
|
}),
|
|
@@ -2,7 +2,7 @@ import { afterEach, describe, expect, it, vi } from "vitest";
|
|
|
2
2
|
import react from "react";
|
|
3
3
|
import { renderToStaticMarkup } from "react-dom/server";
|
|
4
4
|
import Watermark, { Avatar, CloseIcon, FeedbackIcon, MenuCard, Pill, openDoubaoReport } from "../Watermark.js";
|
|
5
|
-
import { DOUBAO_LOGO_SRC
|
|
5
|
+
import { DOUBAO_LOGO_SRC } from "../doubao-watermark-asset.js";
|
|
6
6
|
const html = ()=>renderToStaticMarkup(/*#__PURE__*/ react.createElement(Watermark));
|
|
7
7
|
const setViewportWidth = (w)=>Object.defineProperty(window, 'innerWidth', {
|
|
8
8
|
value: w,
|
|
@@ -31,7 +31,7 @@ describe('Watermark(豆包来源水印)', ()=>{
|
|
|
31
31
|
setViewportWidth(375);
|
|
32
32
|
const out = html();
|
|
33
33
|
expect(out).toContain('data-custom-element="doubao-watermark-mobile"');
|
|
34
|
-
expect(out).toContain(
|
|
34
|
+
expect(out).toContain(DOUBAO_LOGO_SRC);
|
|
35
35
|
expect(out).toContain('豆包 AI 生成');
|
|
36
36
|
expect(out).not.toContain('aria-label="关闭"');
|
|
37
37
|
});
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export declare const DOUBAO_LOGO_SRC = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miaoda-ui/
|
|
2
|
-
export declare const DOUBAO_PILL_MOBILE_PNG = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miaoda-ui/Frame%202147223991%20(3).png";
|
|
1
|
+
export declare const DOUBAO_LOGO_SRC = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miaoda-ui/doubao.svg";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
const CDN = 'https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miaoda-ui';
|
|
2
|
-
const DOUBAO_LOGO_SRC = `${CDN}/
|
|
3
|
-
|
|
4
|
-
export { DOUBAO_LOGO_SRC, DOUBAO_PILL_MOBILE_PNG };
|
|
2
|
+
const DOUBAO_LOGO_SRC = `${CDN}/doubao.svg`;
|
|
3
|
+
export { DOUBAO_LOGO_SRC };
|