@opentiny/next-sdk 0.4.1 → 0.4.3
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.
- package/dist/{SimulatorMask-BHVXyogh-iNUb4dyF.js → SimulatorMask-BHVXyogh-CKmEDsYG.js} +1 -1
- package/dist/core.js +1 -1
- package/dist/{index-CXK8CcKq.js → index-CHMa2zG4.js} +1985 -1434
- package/dist/index.d.ts +11 -0
- package/dist/index.js +69 -50
- package/dist/{initialize-builtin-WebMCP-rALfqS-o.js → initialize-builtin-WebMCP-JaoKwVlm.js} +355 -346
- package/dist/page-tools/a11y/build.d.ts +3 -4
- package/dist/page-tools/a11y/config.d.ts +99 -0
- package/dist/page-tools/a11y/constants.d.ts +22 -0
- package/dist/page-tools/a11y/search.d.ts +1 -1
- package/dist/page-tools/a11y/types.d.ts +13 -22
- package/dist/page-tools/a11y/utils.d.ts +46 -11
- package/dist/page-tools/a11y/vnode.d.ts +14 -11
- package/dist/page-tools/a11y-tree.d.ts +1 -0
- package/dist/page-tools/configs/console-cloud.d.ts +6 -0
- package/dist/page-tools/constants.d.ts +7 -17
- package/dist/page-tools/context.d.ts +14 -0
- package/dist/page-tools/handlers/hover.d.ts +9 -0
- package/dist/page-tools/handlers/searchTree.d.ts +2 -1
- package/dist/page-tools/page-agent-highlight/index.d.ts +12 -0
- package/dist/page-tools/page-agent-mask/SimulatorMask.d.ts +2 -0
- package/dist/page-tools/page-agent-tool-event.d.ts +26 -0
- package/dist/page-tools/schema.d.ts +4 -3
- package/dist/page-tools/tool-config.d.ts +50 -0
- package/dist/page-tools/utils/dom.d.ts +8 -2
- package/dist/runtime.d.ts +4 -1
- package/dist/runtime.js +22 -187
- package/dist/vitest.config.d.ts +2 -0
- package/package.json +26 -16
- package/WebMcpClient.ts +0 -505
- package/WebMcpServer.ts +0 -447
- package/agent/AgentModelProvider.ts +0 -932
- package/agent/type.ts +0 -91
- package/agent/utils/generateReActPrompt.ts +0 -71
- package/agent/utils/getAISDKTools.ts +0 -34
- package/agent/utils/getBuiltinMcpTools.ts +0 -86
- package/agent/utils/parseReActAction.ts +0 -34
- package/core.ts +0 -26
- package/index.ts +0 -56
- package/page-tools/a11y/build.ts +0 -70
- package/page-tools/a11y/constants.ts +0 -110
- package/page-tools/a11y/search.ts +0 -129
- package/page-tools/a11y/types.ts +0 -108
- package/page-tools/a11y/utils.ts +0 -266
- package/page-tools/a11y/vnode.ts +0 -229
- package/page-tools/a11y-tree.ts +0 -13
- package/page-tools/bridge.ts +0 -702
- package/page-tools/constants.ts +0 -72
- package/page-tools/context.ts +0 -13
- package/page-tools/effects.ts +0 -345
- package/page-tools/handlers/browserState.ts +0 -12
- package/page-tools/handlers/click.ts +0 -26
- package/page-tools/handlers/executeJavascript.ts +0 -22
- package/page-tools/handlers/fill.ts +0 -60
- package/page-tools/handlers/scroll.ts +0 -66
- package/page-tools/handlers/searchTree.ts +0 -30
- package/page-tools/handlers/select.ts +0 -34
- package/page-tools/initialize-builtin-WebMCP.ts +0 -20
- package/page-tools/page-agent-highlight/index.ts +0 -198
- package/page-tools/page-agent-mask/SimulatorMask.module.css +0 -14
- package/page-tools/page-agent-mask/SimulatorMask.ts +0 -279
- package/page-tools/page-agent-mask/checkDarkMode.ts +0 -181
- package/page-tools/page-agent-mask/cursor-border.svg +0 -3
- package/page-tools/page-agent-mask/cursor-fill.svg +0 -5
- package/page-tools/page-agent-mask/cursor.module.css +0 -70
- package/page-tools/page-agent-prompt.md +0 -139
- package/page-tools/page-agent-tool.ts +0 -175
- package/page-tools/page-state-cache.ts +0 -78
- package/page-tools/schema.ts +0 -51
- package/page-tools/utils/dom.ts +0 -155
- package/page-tools/utils/scroll.ts +0 -58
- package/remoter/QrCode.ts +0 -54
- package/remoter/createRemoter.ts +0 -957
- package/remoter/svgs/chat.svg +0 -43
- package/remoter/svgs/icon-copy.svg +0 -25
- package/remoter/svgs/link.svg +0 -28
- package/remoter/svgs/logo.svg +0 -45
- package/remoter/svgs/qrcode.svg +0 -35
- package/remoter/svgs/scan.svg +0 -21
- package/remoter/tooltips.ts +0 -260
- package/runtime.html +0 -39
- package/runtime.ts +0 -13
- package/script/utils.ts +0 -26
- package/skills/index.ts +0 -287
- package/tsconfig.json +0 -16
- package/utils/builtinProxy.ts +0 -144
- package/utils/env.ts +0 -13
- package/utils/uuid.ts +0 -10
- package/vite.config.runtime.ts +0 -22
- package/vite.config.ts +0 -63
package/remoter/svgs/chat.svg
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 40 39.9692" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="40.000000" height="39.969238" fill="none" customFrame="url(#clipPath_3)">
|
|
2
|
-
<defs>
|
|
3
|
-
<clipPath id="clipPath_3">
|
|
4
|
-
<rect width="40.000000" height="39.969238" x="0.000000" y="0.000000" rx="12.000000" fill="rgb(255,255,255)" />
|
|
5
|
-
</clipPath>
|
|
6
|
-
<clipPath id="clipPath_4">
|
|
7
|
-
<rect width="24.000000" height="24.000000" x="8.000000" y="7.984619" fill="rgb(255,255,255)" />
|
|
8
|
-
</clipPath>
|
|
9
|
-
<clipPath id="clipPath_5">
|
|
10
|
-
<rect width="20.000000" height="20.000000" x="10.000000" y="9.984619" fill="rgb(255,255,255)" />
|
|
11
|
-
</clipPath>
|
|
12
|
-
<clipPath id="clipPath_6">
|
|
13
|
-
<rect width="20.000000" height="20.000000" x="10.000000" y="9.984619" fill="rgb(255,255,255)" />
|
|
14
|
-
</clipPath>
|
|
15
|
-
<clipPath id="clipPath_7">
|
|
16
|
-
<rect width="21.666666" height="13.333333" x="20.000000" y="9.984619" rx="6.666667" fill="rgb(255,255,255)" />
|
|
17
|
-
</clipPath>
|
|
18
|
-
<clipPath id="clipPath_8">
|
|
19
|
-
<rect width="6.666667" height="6.666667" x="23.333496" y="9.984619" fill="rgb(255,255,255)" />
|
|
20
|
-
</clipPath>
|
|
21
|
-
</defs>
|
|
22
|
-
<rect id="2" width="40.000000" height="39.969238" x="0.000000" y="0.000000" rx="12.000000" fill="rgb(239,246,255)" />
|
|
23
|
-
<g id="物业" clip-path="url(#clipPath_4)" customFrame="url(#clipPath_4)">
|
|
24
|
-
<rect id="物业" width="24.000000" height="24.000000" x="8.000000" y="7.984619" />
|
|
25
|
-
<g id="物业服务">
|
|
26
|
-
<g id="00公共/红点/图标+红点" customFrame="url(#clipPath_5)">
|
|
27
|
-
<rect id="00公共/红点/图标+红点" width="20.000000" height="20.000000" x="10.000000" y="9.984619" />
|
|
28
|
-
<g id="common_chats_line" customFrame="url(#clipPath_6)">
|
|
29
|
-
<rect id="common_chats_line" width="20.000000" height="20.000000" x="10.000000" y="9.984619" />
|
|
30
|
-
<path id="形状" d="M28.3332 19.9847C28.3332 15.3823 24.6022 11.6514 19.9998 11.6514C15.3975 11.6514 11.6665 15.3823 11.6665 19.9847C11.6665 24.5871 15.3975 28.318 19.9998 28.318C21.0018 28.318 21.9624 28.1412 22.8522 27.8171L26.581 28.1578C26.7205 28.1706 26.8611 28.1598 26.9971 28.1259C27.6669 27.959 28.0746 27.2806 27.9077 26.6108L27.2716 24.0578C27.9477 22.8535 28.3332 21.4641 28.3332 19.9847ZM19.9998 13.1514C16.2259 13.1514 13.1665 16.2108 13.1665 19.9847C13.1665 23.7586 16.2259 26.818 19.9998 26.818C20.8089 26.818 21.5967 26.678 22.3388 26.4077C22.505 26.3471 22.6803 26.3166 22.8565 26.3171L22.9887 26.3233L26.3665 26.6322L25.8161 24.4205C25.7352 24.0958 25.7655 23.7548 25.8997 23.4512L25.9636 23.3236C26.5311 22.3126 26.8332 21.1723 26.8332 19.9847C26.8332 16.2108 23.7738 13.1514 19.9998 13.1514ZM23.1152 21.2468C23.352 20.9069 23.2684 20.4394 22.9286 20.2026C22.5887 19.9659 22.1212 20.0494 21.8845 20.3893C21.2894 21.2433 20.4268 21.7347 19.5102 21.7347C18.9513 21.7347 18.4132 21.554 17.9375 21.2122C17.6011 20.9705 17.1325 21.0472 16.8908 21.3836C16.6491 21.7199 16.7258 22.1886 17.0622 22.4303C17.7879 22.9518 18.6305 23.2347 19.5102 23.2347C20.9394 23.2347 22.2505 22.4878 23.1152 21.2468Z" fill="rgb(65,142,255)" fill-rule="evenodd" />
|
|
31
|
-
</g>
|
|
32
|
-
<g id="00公共/3位数红点" opacity="0" customFrame="url(#clipPath_7)">
|
|
33
|
-
<rect id="00公共/3位数红点" width="21.666666" height="13.333333" x="20.000000" y="9.984619" rx="6.666667" opacity="0" fill="rgb(243,111,100)" />
|
|
34
|
-
<path id="文本" d="M26.0421 13.4421C26.4259 13.4421 26.7677 13.5255 27.0675 13.6923C27.3672 13.8591 27.6005 14.0931 27.7673 14.3942C27.9342 14.694 28.0176 15.0351 28.0176 15.4176C28.0176 15.7173 27.9633 15.994 27.8548 16.2476C27.7463 16.4999 27.5673 16.8315 27.3177 17.2425L25.859 19.6432L25.0167 19.6432L26.276 17.5924C26.3534 17.4704 26.4307 17.3564 26.508 17.2507C26.3357 17.3063 26.1445 17.3341 25.9342 17.3341C25.5721 17.3341 25.2493 17.2479 24.9658 17.0757C24.6837 16.9034 24.4633 16.6701 24.3046 16.3758C24.1459 16.0815 24.0666 15.7566 24.0666 15.4013C24.0666 15.0351 24.1513 14.7021 24.3209 14.4023C24.4904 14.1012 24.7264 13.8659 25.0289 13.6964C25.3314 13.5268 25.6691 13.4421 26.0421 13.4421ZM26.0421 16.6505C26.4029 16.6505 26.6904 16.5325 26.9047 16.2965C27.119 16.0605 27.2262 15.7539 27.2262 15.3769C27.2262 14.9985 27.119 14.694 26.9047 14.4634C26.6904 14.2328 26.4029 14.1175 26.0421 14.1175C25.6867 14.1175 25.4019 14.2342 25.1876 14.4674C24.9733 14.7007 24.8661 15.0039 24.8661 15.3769C24.8661 15.7539 24.9719 16.0605 25.1835 16.2965C25.3951 16.5325 25.6813 16.6505 26.0421 16.6505ZM30.7921 13.4421C31.1759 13.4421 31.5177 13.5255 31.8175 13.6923C32.1172 13.8591 32.3505 14.0931 32.5173 14.3942C32.6842 14.694 32.7676 15.0351 32.7676 15.4176C32.7676 15.7173 32.7133 15.994 32.6048 16.2476C32.4963 16.4999 32.3173 16.8315 32.0677 17.2425L30.609 19.6432L29.7667 19.6432L31.026 17.5924C31.1034 17.4704 31.1807 17.3564 31.258 17.2507C31.0857 17.3063 30.8945 17.3341 30.6842 17.3341C30.3221 17.3341 29.9993 17.2479 29.7158 17.0757C29.4337 16.9034 29.2133 16.6701 29.0546 16.3758C28.8959 16.0815 28.8166 15.7566 28.8166 15.4013C28.8166 15.0351 28.9013 14.7021 29.0709 14.4023C29.2404 14.1012 29.4764 13.8659 29.7789 13.6964C30.0814 13.5268 30.4191 13.4421 30.7921 13.4421ZM30.7921 16.6505C31.1529 16.6505 31.4404 16.5325 31.6547 16.2965C31.869 16.0605 31.9762 15.7539 31.9762 15.3769C31.9762 14.9985 31.869 14.694 31.6547 14.4634C31.4404 14.2328 31.1529 14.1175 30.7921 14.1175C30.4367 14.1175 30.1519 14.2342 29.9376 14.4674C29.7233 14.7007 29.6161 15.0039 29.6161 15.3769C29.6161 15.7539 29.7219 16.0605 29.9335 16.2965C30.1451 16.5325 30.4313 16.6505 30.7921 16.6505ZM35.2674 14.6851L35.9001 14.6851L35.9001 16.3188L37.5339 16.3188L37.5339 16.9516L35.9001 16.9516L35.9001 18.5853L35.2674 18.5853L35.2674 16.9516L33.6337 16.9516L33.6337 16.3188L35.2674 16.3188L35.2674 14.6851Z" fill="rgb(255,255,255)" fill-rule="nonzero" />
|
|
35
|
-
</g>
|
|
36
|
-
<g id="00公共/单红点" opacity="0" customFrame="url(#clipPath_8)">
|
|
37
|
-
<rect id="00公共/单红点" width="6.666667" height="6.666667" x="23.333496" y="9.984619" opacity="0" fill="rgb(255,255,255)" fill-opacity="0" />
|
|
38
|
-
<circle id="红点" cx="26.6668301" cy="13.3179522" r="3.33333325" fill="rgb(243,111,100)" />
|
|
39
|
-
</g>
|
|
40
|
-
</g>
|
|
41
|
-
</g>
|
|
42
|
-
</g>
|
|
43
|
-
</svg>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.000000" height="12.000000" fill="none">
|
|
2
|
-
<defs>
|
|
3
|
-
<filter id="pixso_custom_mask_type_luminance">
|
|
4
|
-
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 " />
|
|
5
|
-
</filter>
|
|
6
|
-
</defs>
|
|
7
|
-
<mask id="mask_0" width="11.999876" height="11.999876" x="0.000000" y="0.000000" maskUnits="userSpaceOnUse">
|
|
8
|
-
<g filter="url(#pixso_custom_mask_type_luminance)">
|
|
9
|
-
<g id="mask401_19830">
|
|
10
|
-
<path id="蒙版" d="M0 0L11.9999 0L11.9999 11.9999L0 11.9999L0 0ZM2.69992 1.34999L8.09977 1.34999C9.5082 1.34999 10.6498 2.49167 10.6498 3.89998L10.6498 9.2999C10.6498 10.7082 9.5082 11.8499 8.09977 11.8499L2.69992 11.8499C1.29149 11.8499 0.149901 10.7082 0.149901 9.2999L0.149901 3.89998C0.149901 2.49167 1.29149 1.34999 2.69992 1.34999Z" fill="rgb(196,196,196)" fill-rule="evenodd" />
|
|
11
|
-
</g>
|
|
12
|
-
</g>
|
|
13
|
-
</mask>
|
|
14
|
-
<rect id="ic_public_copy" width="12.000000" height="12.000000" x="0.000000" y="0.000000" />
|
|
15
|
-
<rect id="ic_public_copy-复制/base/ic_public_copy" width="11.999876" height="11.999876" x="0.000000" y="0.000000" fill="rgb(255,255,255)" fill-opacity="0" />
|
|
16
|
-
<path id="path1" d="M0.000134537 5.99497C0.000134537 5.05748 -0.00236544 4.11999 0.000134537 3.1825C-0.00236544 2.72751 0.055134 2.27501 0.165133 1.83752C0.41263 0.907526 1.01762 0.355032 1.94761 0.140034C2.41261 0.040035 2.8901 -0.00746449 3.3651 3.54269e-05C5.16258 3.54269e-05 6.96006 3.54269e-05 8.76004 3.54269e-05C9.21254 -0.00246455 9.66503 0.0475349 10.1075 0.155034C11.065 0.387531 11.64 0.995025 11.8575 1.95002C11.9575 2.40001 12.005 2.86001 11.9975 3.3225C11.9975 5.13998 11.9975 6.95746 11.9975 8.77244C12 9.22244 11.95 9.67243 11.845 10.1099C11.61 11.0674 11 11.6374 10.0475 11.8574C9.58003 11.9574 9.10504 12.0049 8.62754 11.9974C6.83756 11.9974 5.04758 11.9974 3.2576 11.9974C2.80011 12.0024 2.34511 11.9499 1.90011 11.8449C0.937625 11.6124 0.360131 11.0024 0.142633 10.0424C0.0301342 9.55494 0.000134537 9.06744 0.000134537 8.57495C0.000134537 7.71495 0.000134537 6.85496 0.000134537 5.99497Z" fill="rgb(255,255,255)" fill-opacity="0" fill-rule="evenodd" />
|
|
17
|
-
<circle id="path2" cx="5.99993801" cy="5.99993801" r="5.99993801" fill="rgb(255,255,255)" fill-opacity="0" />
|
|
18
|
-
<g id="mask" mask="url(#mask_0)">
|
|
19
|
-
<g id="组合 8">
|
|
20
|
-
<path id="path" d="M11.1 3.89993L11.1 6.8999C11.1 8.55488 9.75502 9.89737 8.10004 9.89737L5.10007 9.89737C3.44258 9.89737 2.1001 8.55488 2.1001 6.8999L2.1001 3.89993C2.1001 2.24245 3.44258 0.897461 5.10007 0.897461L8.10004 0.897461C9.75502 0.897461 11.1 2.24245 11.1 3.89993Z" fill-rule="nonzero" stroke="rgb(25,25,25)" stroke-linejoin="round" stroke-width="0.749992251" />
|
|
21
|
-
</g>
|
|
22
|
-
</g>
|
|
23
|
-
<path id="path4" d="M2.10008 2.39746L8.10002 2.39746C8.92751 2.39746 9.6 3.06995 9.6 3.89995L9.6 9.89738C9.6 10.7274 8.92751 11.3999 8.10002 11.3999L2.10008 11.3999C1.27009 11.3999 0.600098 10.7274 0.600098 9.89738L0.600098 3.89995C0.600098 3.06995 1.27009 2.39746 2.10008 2.39746Z" fill="rgb(255,255,255)" fill-opacity="0" fill-rule="evenodd" />
|
|
24
|
-
<path id="path4" d="M9.6 3.89995L9.6 9.89738C9.6 10.7274 8.92751 11.3999 8.10002 11.3999L2.10008 11.3999C1.27009 11.3999 0.600098 10.7274 0.600098 9.89738L0.600098 3.89995C0.600098 3.06995 1.27009 2.39746 2.10008 2.39746L8.10002 2.39746C8.92751 2.39746 9.6 3.06995 9.6 3.89995Z" fill-rule="nonzero" stroke="rgb(25,25,25)" stroke-linejoin="round" stroke-width="0.749992251" />
|
|
25
|
-
</svg>
|
package/remoter/svgs/link.svg
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="40.000000" height="40.000000" fill="none" customFrame="url(#clipPath_9)">
|
|
2
|
-
<defs>
|
|
3
|
-
<clipPath id="clipPath_9">
|
|
4
|
-
<rect width="40.000000" height="40.000000" x="0.000000" y="0.000000" rx="12.000000" fill="rgb(255,255,255)" />
|
|
5
|
-
</clipPath>
|
|
6
|
-
<clipPath id="clipPath_10">
|
|
7
|
-
<rect width="24.000000" height="24.000000" x="8.000000" y="8.000000" fill="rgb(255,255,255)" />
|
|
8
|
-
</clipPath>
|
|
9
|
-
<clipPath id="clipPath_11">
|
|
10
|
-
<rect width="20.000000" height="20.000000" x="10.000000" y="10.000000" fill="rgb(255,255,255)" />
|
|
11
|
-
</clipPath>
|
|
12
|
-
</defs>
|
|
13
|
-
<rect id="3" width="40.000000" height="40.000000" x="0.000000" y="0.000000" rx="12.000000" fill="rgb(236,250,254)" />
|
|
14
|
-
<g id="画板 2310" customFrame="url(#clipPath_10)">
|
|
15
|
-
<rect id="画板 2310" width="24.000000" height="24.000000" x="8.000000" y="8.000000" fill="rgb(255,255,255)" fill-opacity="0" />
|
|
16
|
-
<g id="人事服务">
|
|
17
|
-
<g id="ic_public_link" clip-path="url(#clipPath_11)" customFrame="url(#clipPath_11)">
|
|
18
|
-
<rect id="ic_public_link" width="20.000000" height="20.000000" x="10.000000" y="10.000000" />
|
|
19
|
-
<path id="path1" d="M9.9999 19.9917C9.9999 18.4292 9.99573 16.8667 9.9999 15.3042C9.99573 14.5459 10.0916 13.7917 10.2749 13.0626C10.6874 11.5126 11.6957 10.5917 13.2457 10.2334C14.0207 10.0667 14.8166 9.98756 15.6082 10.0001C18.6041 10.0001 21.5999 10.0001 24.5999 10.0001C25.3541 9.99589 26.1082 10.0792 26.8457 10.2584C28.4416 10.6459 29.3999 11.6584 29.7624 13.2501C29.9291 14.0001 30.0041 14.7667 29.9957 15.5376C29.9957 18.5667 29.9957 21.5959 29.9957 24.6209C29.9999 25.3709 29.9166 26.1209 29.7416 26.8459C29.3499 28.4459 28.3332 29.3959 26.7457 29.7626C25.9666 29.9292 25.1749 30.0084 24.3791 29.9959C21.3957 29.9959 18.4124 29.9959 15.4291 29.9959C14.6666 30.0042 13.9082 29.9167 13.1666 29.7417C11.5624 29.3542 10.5999 28.3376 10.2374 26.7376C10.0499 25.9251 9.9999 25.1126 9.9999 24.2917C9.9999 22.8584 9.9999 21.4251 9.9999 19.9917Z" fill="rgb(255,255,255)" fill-opacity="0" fill-rule="evenodd" />
|
|
20
|
-
<circle id="path2" cx="20" cy="20" r="10" fill="rgb(255,255,255)" fill-opacity="0" />
|
|
21
|
-
<path id="path3" d="M25.0333 21.8666L26.9 20C28.8083 18.0916 28.8083 15 26.9 13.0958C24.9958 11.1875 21.9041 11.1875 20 13.0958L18.1291 14.9625M21.8666 25.0333L20 26.9C18.0916 28.8083 15 28.8083 13.0958 26.9C11.1875 24.9958 11.1875 21.9041 13.0958 20L14.9625 18.1291" fill-rule="nonzero" stroke="rgb(14,191,241)" stroke-linecap="round" stroke-width="1.25" />
|
|
22
|
-
<path id="pah4" d="M18.125 21.875L21.875 18.125" stroke="rgb(14,191,241)" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" />
|
|
23
|
-
<path id="path5" d="M25.8207 19.2626L24.0457 21.0376C23.7998 21.2834 23.6748 21.5292 23.6748 21.7751C23.6748 22.0209 23.7998 22.2667 24.0457 22.5126C24.1498 22.6167 24.2665 22.6959 24.3915 22.7459C24.5123 22.7917 24.6415 22.8167 24.779 22.8167C24.9207 22.8167 25.0498 22.7917 25.1665 22.7459C25.2957 22.6959 25.4123 22.6167 25.5165 22.5126L27.2915 20.7334C27.8165 20.2126 28.2165 19.6334 28.4957 19.0001C28.5082 18.9667 28.5248 18.9334 28.5373 18.8959C28.554 18.8626 28.5665 18.8292 28.579 18.7917C28.8332 18.1501 28.9582 17.4584 28.9582 16.7209C28.9582 15.9792 28.8332 15.2876 28.579 14.6459C28.5665 14.6084 28.554 14.5751 28.5373 14.5417C28.5248 14.5042 28.5082 14.4709 28.4957 14.4376C28.2165 13.8042 27.8165 13.2292 27.2915 12.7042C26.7707 12.1792 26.1915 11.7792 25.5582 11.5001C25.5248 11.4876 25.4915 11.4709 25.454 11.4584C25.4207 11.4417 25.3873 11.4292 25.354 11.4167C24.7082 11.1667 24.0165 11.0417 23.279 11.0417C22.5373 11.0417 21.8457 11.1667 21.204 11.4167C21.1665 11.4292 21.1332 11.4417 21.0998 11.4584C21.0623 11.4709 21.029 11.4876 20.9957 11.5001C20.3623 11.7792 19.7832 12.1792 19.2623 12.7042L17.4832 14.4792C17.379 14.5834 17.2998 14.7001 17.2498 14.8292C17.204 14.9501 17.179 15.0751 17.179 15.2167C17.179 15.3542 17.204 15.4834 17.2498 15.6042C17.2998 15.7292 17.379 15.8459 17.4832 15.9542C17.5915 16.0584 17.7082 16.1376 17.8332 16.1876C17.954 16.2334 18.0832 16.2584 18.2207 16.2584C18.3623 16.2584 18.4915 16.2334 18.6082 16.1876C18.7373 16.1376 18.854 16.0584 18.9582 15.9542L20.7332 14.1751C21.0873 13.8209 21.4748 13.5584 21.8957 13.3834C22.3165 13.2084 22.779 13.1251 23.279 13.1251C23.7748 13.1251 24.2373 13.2084 24.6582 13.3834C25.079 13.5584 25.4665 13.8209 25.8207 14.1751C26.1748 14.5292 26.4373 14.9167 26.6123 15.3376C26.7873 15.7584 26.8748 16.2167 26.8748 16.7209C26.8748 17.2209 26.7873 17.6792 26.6123 18.1001C26.4373 18.5209 26.1748 18.9084 25.8207 19.2626ZM13.3832 21.8959C13.5582 21.4751 13.8207 21.0876 14.1748 20.7334L15.954 18.9584C16.0582 18.8542 16.1373 18.7376 16.1873 18.6084C16.2332 18.4876 16.2582 18.3626 16.2582 18.2209C16.2582 18.0834 16.2332 17.9542 16.1873 17.8334C16.1373 17.7084 16.0582 17.5917 15.954 17.4834C15.7082 17.2417 15.4623 17.1167 15.2165 17.1167C14.9707 17.1167 14.7248 17.2417 14.479 17.4834L12.704 19.2626C12.179 19.7876 11.779 20.3626 11.4998 20.9959C11.4873 21.0292 11.4707 21.0626 11.4582 21.1001C11.4415 21.1334 11.429 21.1667 11.4165 21.2042C11.1665 21.8459 11.0415 22.5376 11.0415 23.2792C11.0415 24.0167 11.1665 24.7084 11.4165 25.3542C11.429 25.3876 11.4415 25.4209 11.4582 25.4584C11.4707 25.4917 11.4873 25.5251 11.4998 25.5584C11.779 26.1917 12.179 26.7709 12.704 27.2917C13.2248 27.8167 13.804 28.2167 14.4373 28.4959C14.4707 28.5084 14.504 28.5251 14.5415 28.5376C14.5748 28.5542 14.6082 28.5667 14.6457 28.5792C15.2873 28.8292 15.979 28.9584 16.7207 28.9584C17.4582 28.9584 18.1498 28.8292 18.7915 28.5792C18.829 28.5667 18.8623 28.5542 18.8957 28.5376C18.9332 28.5251 18.9665 28.5084 18.9998 28.4959C19.6332 28.2167 20.2123 27.8167 20.7332 27.2917L22.5123 25.5167C22.6165 25.4126 22.6957 25.2959 22.7457 25.1667C22.7915 25.0459 22.8165 24.9209 22.8165 24.7792C22.8165 24.6417 22.7915 24.5126 22.7457 24.3917C22.6957 24.2667 22.6165 24.1501 22.5123 24.0417C22.2665 23.8001 22.0207 23.6751 21.7748 23.6751C21.529 23.6751 21.2832 23.8001 21.0373 24.0417L19.2623 25.8209C18.9082 26.1751 18.5207 26.4376 18.0998 26.6126C17.679 26.7876 17.2165 26.8751 16.7207 26.8751C16.2207 26.8751 15.7582 26.7876 15.3373 26.6126C14.9165 26.4376 14.529 26.1751 14.1748 25.8209C13.8207 25.4667 13.5582 25.0792 13.3832 24.6584C13.2082 24.2376 13.1248 23.7792 13.1248 23.2792C13.1248 22.7751 13.2082 22.3167 13.3832 21.8959Z" fill="rgb(255,255,255)" fill-opacity="0" fill-rule="evenodd" />
|
|
24
|
-
<path id="path6" d="M21.8127 16.7458C21.746 16.7874 21.6877 16.8374 21.6293 16.8916L16.8918 21.6291C16.8377 21.6874 16.7877 21.7499 16.746 21.8124C16.7127 21.8624 16.6877 21.9166 16.6627 21.9749C16.6377 22.0374 16.6168 22.1041 16.6043 22.1708C16.5918 22.2333 16.5835 22.2999 16.5835 22.3666C16.5835 22.4333 16.5918 22.4999 16.6043 22.5666C16.6168 22.6333 16.6377 22.6999 16.6627 22.7624C16.6877 22.8166 16.7127 22.8708 16.746 22.9208C16.7877 22.9874 16.8377 23.0499 16.8918 23.1041C16.946 23.1583 17.0085 23.2083 17.0752 23.2499C17.1252 23.2833 17.1793 23.3083 17.2335 23.3333C17.3002 23.3583 17.3627 23.3791 17.4293 23.3916C17.496 23.4041 17.5627 23.4124 17.6293 23.4124C17.696 23.4124 17.7627 23.4041 17.8252 23.3916C17.8918 23.3791 17.9585 23.3583 18.021 23.3333C18.0793 23.3083 18.1335 23.2833 18.1835 23.2499C18.246 23.2083 18.3085 23.1583 18.3668 23.1041L23.1043 18.3666C23.1585 18.3083 23.2085 18.2499 23.2502 18.1833C23.2835 18.1333 23.3085 18.0791 23.3335 18.0208C23.3585 17.9583 23.3793 17.8916 23.3918 17.8249C23.4043 17.7624 23.4127 17.6958 23.4127 17.6291C23.4127 17.5624 23.4043 17.4958 23.3918 17.4291C23.3793 17.3624 23.3585 17.2999 23.3335 17.2333C23.3085 17.1791 23.2835 17.1249 23.2502 17.0749C23.2085 17.0083 23.1585 16.9458 23.1043 16.8916C23.046 16.8374 22.9877 16.7874 22.921 16.7458C22.871 16.7124 22.8168 16.6874 22.7627 16.6624C22.696 16.6374 22.6335 16.6166 22.5668 16.6041C22.5002 16.5916 22.4335 16.5833 22.3668 16.5833C22.3002 16.5833 22.2335 16.5916 22.171 16.6041C22.1043 16.6166 22.0377 16.6374 21.9752 16.6624C21.9168 16.6874 21.8627 16.7124 21.8127 16.7458Z" fill="rgb(255,255,255)" fill-opacity="0" fill-rule="evenodd" />
|
|
25
|
-
</g>
|
|
26
|
-
</g>
|
|
27
|
-
</g>
|
|
28
|
-
</svg>
|
package/remoter/svgs/logo.svg
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<svg width="100.000000" height="100.000000" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
|
-
<desc>
|
|
3
|
-
Created with Pixso.
|
|
4
|
-
</desc>
|
|
5
|
-
<defs>
|
|
6
|
-
<radialGradient gradientTransform="translate(67.5526 65.1155) rotate(51.0683) scale(22.991 20.6919)" cx="0.000000" cy="0.000000" r="1.000000" id="paint_radial_9_3036_0" gradientUnits="userSpaceOnUse">
|
|
7
|
-
<stop stop-color="#5ADDF8"/>
|
|
8
|
-
<stop stop-color="#AEBFFF"/>
|
|
9
|
-
<stop offset="0.329153" stop-color="#1476FF"/>
|
|
10
|
-
<stop offset="0.667785" stop-color="#655AF8"/>
|
|
11
|
-
<stop offset="0.868255" stop-color="#948CFF"/>
|
|
12
|
-
<stop offset="1.000000" stop-color="#D25AF8"/>
|
|
13
|
-
<stop offset="1.000000" stop-color="#5A8BF8"/>
|
|
14
|
-
</radialGradient>
|
|
15
|
-
<linearGradient x1="69.000122" y1="85.000198" x2="69.500107" y2="70.500183" id="paint_linear_9_3039_0" gradientUnits="userSpaceOnUse">
|
|
16
|
-
<stop stop-color="#000000" stop-opacity="0.000000"/>
|
|
17
|
-
<stop offset="1.000000" stop-color="#000000"/>
|
|
18
|
-
</linearGradient>
|
|
19
|
-
<radialGradient gradientTransform="translate(26.9999 24.7118) rotate(38.3655) scale(77.7996 109.496)" cx="0.000000" cy="0.000000" r="1.000000" id="paint_radial_9_3040_0" gradientUnits="userSpaceOnUse">
|
|
20
|
-
<stop stop-color="#5ADDF8"/>
|
|
21
|
-
<stop stop-color="#AEBFFF"/>
|
|
22
|
-
<stop offset="0.329153" stop-color="#1476FF"/>
|
|
23
|
-
<stop offset="0.667785" stop-color="#655AF8"/>
|
|
24
|
-
<stop offset="0.868255" stop-color="#948CFF"/>
|
|
25
|
-
<stop offset="1.000000" stop-color="#D25AF8"/>
|
|
26
|
-
<stop offset="1.000000" stop-color="#5A8BF8"/>
|
|
27
|
-
</radialGradient>
|
|
28
|
-
</defs>
|
|
29
|
-
<rect id="NEXT-LOGO-无背景渐变-左" width="100.000000" height="99.999939" fill="#FFFFFF" fill-opacity="0"/>
|
|
30
|
-
<mask id="mask9_3032" mask-type="alpha" maskUnits="userSpaceOnUse" x="0.000000" y="0.000061" width="99.999939" height="99.999939">
|
|
31
|
-
<rect id="画板 1773" y="0.000061" width="99.999962" height="99.999947" fill="#000000" fill-opacity="1.000000"/>
|
|
32
|
-
</mask>
|
|
33
|
-
<g mask="url(#mask9_3032)">
|
|
34
|
-
<path id="矢量 1" d="M64.07 81.01L64 63L82 63.07L67.51 82.23C66.39 83.71 64.07 82.9 64.07 81.01Z" fill="url(#paint_radial_9_3036_0)" fill-opacity="1.000000" fill-rule="evenodd"/>
|
|
35
|
-
<g opacity="0.100000" style="mix-blend-mode:normal">
|
|
36
|
-
<path id="矢量 1" d="M64.07 81.01L64 63L82 63.07L67.51 82.23C66.39 83.71 64.07 82.9 64.07 81.01Z" fill="url(#paint_linear_9_3039_0)" fill-opacity="1.000000" fill-rule="evenodd"/>
|
|
37
|
-
</g>
|
|
38
|
-
<rect id="矩形 5" x="12.000000" y="19.000153" rx="26.999992" width="75.999977" height="53.999985" fill="url(#paint_radial_9_3040_0)" fill-opacity="1.000000"/>
|
|
39
|
-
<rect id="矩形 5" x="12.500000" y="19.500153" rx="26.499992" width="74.999977" height="52.999985" fill="#000000" fill-opacity="0"/>
|
|
40
|
-
<rect id="矩形 5" x="12.500000" y="19.500153" rx="26.499992" width="74.999977" height="52.999985" stroke="#000000" stroke-opacity="0" stroke-width="1.000000"/>
|
|
41
|
-
<path id="path" d="M54.61 59.06C55.78 60.05 57.1 60.66 58.57 60.89C60.05 61.12 61.43 61.04 62.72 60.65C64 60.26 65.96 58.58 65.96 58.58C65.96 58.58 70.98 54.73 70.98 45.61C70.98 36.5 66.5 32.5 66.5 32.5C66.5 32.5 65.28 31.31 63.5 31C61.71 30.68 60.57 30.98 59.34 31.33C49.11 34.23 37.62 34.33 27.42 31.33C26.19 30.98 25.09 30.93 24.11 31.17C23.13 31.42 22.29 31.89 21.58 32.59C18.35 35.81 17.12 41.06 17 45.61C16.87 50.09 18.03 55.24 21.06 58.54C21.96 59.52 23.02 60.22 24.22 60.63C25.41 61.04 26.68 61.12 28.01 60.89C29.34 60.66 30.52 60.05 31.54 59.06C31.98 58.62 32.61 58.07 33.43 57.4C34.24 56.73 35.16 56.08 36.21 55.44C37.25 54.8 38.38 54.25 39.61 53.8C40.84 53.35 42.09 53.13 43.38 53.13C44.64 53.13 45.84 53.36 47 53.83C48.15 54.29 49.21 54.84 50.18 55.48C51.14 56.12 52 56.78 52.74 57.45C53.49 58.11 54.11 58.65 54.61 59.06Z" fill="#FFFFFF" fill-opacity="1.000000" fill-rule="nonzero"/>
|
|
42
|
-
<rect id="矩形 840" x="58.016602" y="38.000046" rx="2.000000" width="3.999999" height="11.999996" transform="rotate(1.39597 58.016602 38.000046)" fill="#1476FF" fill-opacity="1.000000"/>
|
|
43
|
-
<path id="合并" d="M28.97 38C28.17 37.97 27.38 38.42 27.01 39.19L23.2 47.11C22.71 48.13 23.15 49.34 24.18 49.81C25.22 50.28 26.45 49.83 26.94 48.8L28.97 44.59L30.99 48.81C31.48 49.83 32.72 50.28 33.75 49.81C34.79 49.34 35.23 48.13 34.74 47.11L30.93 39.19C30.56 38.42 29.78 37.98 28.97 38Z" fill="#1476FF" fill-opacity="1.000000" fill-rule="evenodd"/>
|
|
44
|
-
</g>
|
|
45
|
-
</svg>
|
package/remoter/svgs/qrcode.svg
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="40.000000" height="40.000000" fill="none" customFrame="url(#clipPath_0)">
|
|
2
|
-
<defs>
|
|
3
|
-
<clipPath id="clipPath_0">
|
|
4
|
-
<rect width="40.000000" height="40.000000" x="0.000000" y="0.000000" rx="12.000000" fill="rgb(255,255,255)" />
|
|
5
|
-
</clipPath>
|
|
6
|
-
<clipPath id="clipPath_1">
|
|
7
|
-
<rect width="24.000000" height="24.000000" x="8.000000" y="8.000000" fill="rgb(255,255,255)" />
|
|
8
|
-
</clipPath>
|
|
9
|
-
<clipPath id="clipPath_2">
|
|
10
|
-
<rect width="20.000000" height="20.000000" x="10.000000" y="10.000000" fill="rgb(255,255,255)" />
|
|
11
|
-
</clipPath>
|
|
12
|
-
</defs>
|
|
13
|
-
<rect id="1" width="40.000000" height="40.000000" x="0.000000" y="0.000000" rx="12.000000" fill="rgb(236,250,254)" />
|
|
14
|
-
<g id="车辆" clip-path="url(#clipPath_1)" customFrame="url(#clipPath_1)">
|
|
15
|
-
<rect id="车辆" width="24.000000" height="24.000000" x="8.000000" y="8.000000" />
|
|
16
|
-
<g id="编组">
|
|
17
|
-
<g id="ic_public_qrcode" clip-path="url(#clipPath_2)" customFrame="url(#clipPath_2)">
|
|
18
|
-
<rect id="ic_public_qrcode" width="20.000000" height="20.000000" x="10.000000" y="10.000000" />
|
|
19
|
-
<g id="ic_public_qrcode_1_1">
|
|
20
|
-
<path id="ic_public_qrcode_2_0" d="M10.6273 19.9924C10.6273 18.5277 10.6222 17.0631 10.6273 15.5985C10.6243 14.8898 10.7114 14.1836 10.8865 13.4968C11.2702 12.0432 12.2171 11.1805 13.6693 10.8458C14.3974 10.6885 15.1411 10.6148 15.886 10.6261C18.6946 10.6261 21.5035 10.6261 24.3127 10.6261C25.0221 10.6217 25.7295 10.7029 26.4195 10.8678C27.9156 11.2339 28.8134 12.1816 29.1554 13.6725C29.3092 14.3772 29.3826 15.097 29.3744 15.8182C29.3744 18.6571 29.3744 21.4963 29.3744 24.3357C29.3782 25.0383 29.2973 25.7388 29.1334 26.422C28.7673 27.9189 27.8153 28.8123 26.3243 29.1543C25.5961 29.311 24.8524 29.3847 24.1076 29.374C21.3107 29.374 18.514 29.374 15.7176 29.374C15.0027 29.3798 14.2897 29.2999 13.5939 29.136C12.0912 28.7698 11.189 27.8178 10.8477 26.3195C10.6734 25.5579 10.6273 24.7941 10.6273 24.0237C10.6273 22.6802 10.6273 21.3364 10.6273 19.9924Z" fill="rgb(255,255,255)" fill-opacity="0" fill-rule="nonzero" />
|
|
21
|
-
<path id="ic_public_qrcode_2_0" d="M10.6273 15.5985C10.6243 14.8898 10.7114 14.1836 10.8865 13.4968C11.2702 12.0432 12.2171 11.1805 13.6693 10.8458C14.3974 10.6885 15.1411 10.6148 15.886 10.6261C18.6946 10.6261 21.5035 10.6261 24.3127 10.6261C25.0221 10.6217 25.7295 10.7029 26.4195 10.8678C27.9156 11.2339 28.8134 12.1816 29.1554 13.6725C29.3092 14.3772 29.3826 15.097 29.3744 15.8182C29.3744 18.6571 29.3744 21.4963 29.3744 24.3357C29.3782 25.0383 29.2973 25.7388 29.1334 26.422C28.7673 27.9189 27.8153 28.8123 26.3243 29.1543C25.5961 29.311 24.8524 29.3847 24.1076 29.374C21.3107 29.374 18.514 29.374 15.7176 29.374C15.0027 29.3798 14.2897 29.2999 13.5939 29.136C12.0912 28.7698 11.189 27.8178 10.8477 26.3195C10.6734 25.5579 10.6273 24.7941 10.6273 24.0237C10.6273 22.6802 10.6273 21.3364 10.6273 19.9924C10.6273 18.5277 10.6222 17.0631 10.6273 15.5985Z" fill-rule="nonzero" stroke="rgb(255,255,255)" stroke-opacity="0" stroke-width="1.25" />
|
|
22
|
-
<path id="ic_public_qrcode_2_1" d="M10.6273 15.5985C10.6243 14.8898 10.7114 14.1836 10.8865 13.4968C11.2702 12.0432 12.2171 11.1805 13.6693 10.8458C14.3974 10.6885 15.1411 10.6148 15.886 10.6261C18.6946 10.6261 21.5035 10.6261 24.3127 10.6261C25.0221 10.6217 25.7295 10.7029 26.4195 10.8678C27.9156 11.2339 28.8134 12.1816 29.1554 13.6725C29.3092 14.3772 29.3826 15.097 29.3744 15.8182C29.3744 18.6571 29.3744 21.4963 29.3744 24.3357C29.3782 25.0383 29.2973 25.7388 29.1334 26.422C28.7673 27.9189 27.8153 28.8123 26.3243 29.1543C25.5961 29.311 24.8524 29.3847 24.1076 29.374C21.3107 29.374 18.514 29.374 15.7176 29.374C15.0027 29.3798 14.2897 29.2999 13.5939 29.136C12.0912 28.7698 11.189 27.8178 10.8477 26.3195C10.6734 25.5579 10.6273 24.7941 10.6273 24.0237C10.6273 22.6802 10.6273 21.3364 10.6273 19.9924C10.6273 18.5277 10.6222 17.0631 10.6273 15.5985Z" opacity="0.200000003" fill-rule="nonzero" stroke="rgb(255,255,255)" stroke-opacity="0" stroke-width="1.25" />
|
|
23
|
-
<circle id="ic_public_qrcode_2_2" cx="20" cy="20" r="10" fill="rgb(255,255,255)" fill-opacity="0" />
|
|
24
|
-
<path id="ic_public_qrcode_2_3" d="M17.5 11.25C17.9602 11.25 18.3333 11.6231 18.3333 12.0833L18.3333 17.5C18.3333 17.9602 17.9602 18.3333 17.5 18.3333L12.0833 18.3333C11.6231 18.3333 11.25 17.9602 11.25 17.5L11.25 12.0833C11.25 11.6231 11.6231 11.25 12.0833 11.25L17.5 11.25ZM17.5 21.6667C17.9602 21.6667 18.3333 22.0398 18.3333 22.5L18.3333 27.9167C18.3333 28.3769 17.9602 28.75 17.5 28.75L12.0833 28.75C11.6231 28.75 11.25 28.3769 11.25 27.9167L11.25 22.5C11.25 22.0398 11.6231 21.6667 12.0833 21.6667L17.5 21.6667ZM27.9167 11.25C28.3769 11.25 28.75 11.6231 28.75 12.0833L28.75 17.5C28.75 17.9602 28.3769 18.3333 27.9167 18.3333L22.5 18.3333C22.0398 18.3333 21.6667 17.9602 21.6667 17.5L21.6667 12.0833C21.6667 11.6231 22.0398 11.25 22.5 11.25L27.9167 11.25Z" fill-rule="evenodd" stroke="rgb(14,191,241)" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" />
|
|
25
|
-
<path id="ic_public_qrcode_2_4" d="M17.5002 10.8333C18.1905 10.8333 18.7502 11.3929 18.7502 12.0833L18.7502 17.4999C18.7502 18.1903 18.1905 18.7499 17.5002 18.7499L12.0835 18.7499C11.3931 18.7499 10.8335 18.1903 10.8335 17.4999L10.8335 12.0833C10.8335 11.3929 11.3931 10.8333 12.0835 10.8333L17.5002 10.8333ZM17.5002 11.6666L12.0835 11.6666C11.8534 11.6666 11.6668 11.8531 11.6668 12.0833L11.6668 17.4999C11.6668 17.73 11.8534 17.9166 12.0835 17.9166L17.5002 17.9166C17.7303 17.9166 17.9168 17.73 17.9168 17.4999L17.9168 12.0833C17.9168 11.8531 17.7303 11.6666 17.5002 11.6666ZM17.5002 21.2499C18.1905 21.2499 18.7502 21.8096 18.7502 22.4999L18.7502 27.9166C18.7502 28.6069 18.1905 29.1666 17.5002 29.1666L12.0835 29.1666C11.3931 29.1666 10.8335 28.6069 10.8335 27.9166L10.8335 22.4999C10.8335 21.8096 11.3931 21.2499 12.0835 21.2499L17.5002 21.2499ZM17.5002 22.0833L12.0835 22.0833C11.8534 22.0833 11.6668 22.2698 11.6668 22.4999L11.6668 27.9166C11.6668 28.1467 11.8534 28.3333 12.0835 28.3333L17.5002 28.3333C17.7303 28.3333 17.9168 28.1467 17.9168 27.9166L17.9168 22.4999C17.9168 22.2698 17.7303 22.0833 17.5002 22.0833ZM27.9168 10.8333C28.6072 10.8333 29.1668 11.3929 29.1668 12.0833L29.1668 17.4999C29.1668 18.1903 28.6072 18.7499 27.9168 18.7499L22.5002 18.7499C21.8098 18.7499 21.2502 18.1903 21.2502 17.4999L21.2502 12.0833C21.2502 11.3929 21.8098 10.8333 22.5002 10.8333L27.9168 10.8333ZM27.9168 11.6666L22.5002 11.6666C22.27 11.6666 22.0835 11.8531 22.0835 12.0833L22.0835 17.4999C22.0835 17.73 22.27 17.9166 22.5002 17.9166L27.9168 17.9166C28.1469 17.9166 28.3335 17.73 28.3335 17.4999L28.3335 12.0833C28.3335 11.8531 28.1469 11.6666 27.9168 11.6666Z" fill="rgb(255,255,255)" fill-opacity="0" fill-rule="nonzero" />
|
|
26
|
-
<path id="ic_public_qrcode_2_4" d="M18.7502 12.0833L18.7502 17.4999C18.7502 18.1903 18.1905 18.7499 17.5002 18.7499L12.0835 18.7499C11.3931 18.7499 10.8335 18.1903 10.8335 17.4999L10.8335 12.0833C10.8335 11.3929 11.3931 10.8333 12.0835 10.8333L17.5002 10.8333C18.1905 10.8333 18.7502 11.3929 18.7502 12.0833ZM12.0835 11.6666C11.8534 11.6666 11.6668 11.8531 11.6668 12.0833L11.6668 17.4999C11.6668 17.73 11.8534 17.9166 12.0835 17.9166L17.5002 17.9166C17.7303 17.9166 17.9168 17.73 17.9168 17.4999L17.9168 12.0833C17.9168 11.8531 17.7303 11.6666 17.5002 11.6666L12.0835 11.6666ZM18.7502 22.4999L18.7502 27.9166C18.7502 28.6069 18.1905 29.1666 17.5002 29.1666L12.0835 29.1666C11.3931 29.1666 10.8335 28.6069 10.8335 27.9166L10.8335 22.4999C10.8335 21.8096 11.3931 21.2499 12.0835 21.2499L17.5002 21.2499C18.1905 21.2499 18.7502 21.8096 18.7502 22.4999ZM12.0835 22.0833C11.8534 22.0833 11.6668 22.2698 11.6668 22.4999L11.6668 27.9166C11.6668 28.1467 11.8534 28.3333 12.0835 28.3333L17.5002 28.3333C17.7303 28.3333 17.9168 28.1467 17.9168 27.9166L17.9168 22.4999C17.9168 22.2698 17.7303 22.0833 17.5002 22.0833L12.0835 22.0833ZM29.1668 12.0833L29.1668 17.4999C29.1668 18.1903 28.6072 18.7499 27.9168 18.7499L22.5002 18.7499C21.8098 18.7499 21.2502 18.1903 21.2502 17.4999L21.2502 12.0833C21.2502 11.3929 21.8098 10.8333 22.5002 10.8333L27.9168 10.8333C28.6072 10.8333 29.1668 11.3929 29.1668 12.0833ZM22.5002 11.6666C22.27 11.6666 22.0835 11.8531 22.0835 12.0833L22.0835 17.4999C22.0835 17.73 22.27 17.9166 22.5002 17.9166L27.9168 17.9166C28.1469 17.9166 28.3335 17.73 28.3335 17.4999L28.3335 12.0833C28.3335 11.8531 28.1469 11.6666 27.9168 11.6666L22.5002 11.6666Z" fill-rule="nonzero" stroke="rgb(255,255,255)" stroke-opacity="0" stroke-linejoin="round" stroke-width="1.25" />
|
|
27
|
-
<path id="ic_public_qrcode_2_5" d="M27.9165 21.6667L27.9165 24.5834L28.7498 24.5834L28.7498 21.6667L27.9165 21.6667ZM24.5832 21.6667L24.5832 22.639L24.5828 22.6388L24.5832 24.5834L23.6109 24.5834L23.6107 22.6388L21.6665 22.639L21.6665 21.6667L24.5832 21.6667ZM21.6665 25.8334L21.6665 28.7501L22.4998 28.7501L22.4998 25.8334L21.6665 25.8334ZM27.9165 27.9167L27.9165 28.7501L28.7498 28.7501L28.7498 27.9167L27.9165 27.9167ZM25.8332 25.8334L25.8332 26.6667L26.6665 26.6667L26.6665 25.8334L25.8332 25.8334Z" fill="rgb(14,191,241)" fill-rule="nonzero" />
|
|
28
|
-
<path id="ic_public_qrcode_2_5" d="M27.9165 24.5834L28.7498 24.5834L28.7498 21.6667L27.9165 21.6667L27.9165 24.5834ZM24.5832 22.639L24.5828 22.6388L24.5832 24.5834L23.6109 24.5834L23.6107 22.6388L21.6665 22.639L21.6665 21.6667L24.5832 21.6667L24.5832 22.639ZM21.6665 28.7501L22.4998 28.7501L22.4998 25.8334L21.6665 25.8334L21.6665 28.7501ZM27.9165 28.7501L28.7498 28.7501L28.7498 27.9167L27.9165 27.9167L27.9165 28.7501ZM25.8332 26.6667L26.6665 26.6667L26.6665 25.8334L25.8332 25.8334L25.8332 26.6667Z" fill-rule="nonzero" stroke="rgb(14,191,241)" stroke-linejoin="round" stroke-width="1.25" />
|
|
29
|
-
<path id="ic_public_qrcode_2_6" d="M14.375 14.375L14.375 15.2083L15.2083 15.2083L15.2083 14.375L14.375 14.375ZM14.375 24.7917L14.375 25.625L15.2083 25.625L15.2083 24.7917L14.375 24.7917ZM24.7917 14.375L24.7917 15.2083L25.625 15.2083L25.625 14.375L24.7917 14.375Z" fill="rgb(14,191,241)" fill-rule="nonzero" />
|
|
30
|
-
<path id="ic_public_qrcode_2_6" d="M14.375 15.2083L15.2083 15.2083L15.2083 14.375L14.375 14.375L14.375 15.2083ZM14.375 25.625L15.2083 25.625L15.2083 24.7917L14.375 24.7917L14.375 25.625ZM24.7917 15.2083L25.625 15.2083L25.625 14.375L24.7917 14.375L24.7917 15.2083Z" fill-rule="nonzero" stroke="rgb(14,191,241)" stroke-linejoin="round" stroke-width="1.25" />
|
|
31
|
-
</g>
|
|
32
|
-
</g>
|
|
33
|
-
</g>
|
|
34
|
-
</g>
|
|
35
|
-
</svg>
|
package/remoter/svgs/scan.svg
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="40.000000" height="40.000000" fill="none" customFrame="url(#clipPath_12)">
|
|
2
|
-
<defs>
|
|
3
|
-
<clipPath id="clipPath_12">
|
|
4
|
-
<rect width="40.000000" height="40.000000" x="0.000000" y="0.000000" rx="12.000000" fill="rgb(255,255,255)" />
|
|
5
|
-
</clipPath>
|
|
6
|
-
<clipPath id="clipPath_13">
|
|
7
|
-
<rect width="24.000000" height="24.000000" x="8.000000" y="8.000000" fill="rgb(255,255,255)" />
|
|
8
|
-
</clipPath>
|
|
9
|
-
<clipPath id="clipPath_14">
|
|
10
|
-
<rect width="20.000000" height="20.000000" x="10.000000" y="10.000000" fill="rgb(255,255,255)" />
|
|
11
|
-
</clipPath>
|
|
12
|
-
</defs>
|
|
13
|
-
<rect id="4" width="40.000000" height="40.000000" x="0.000000" y="0.000000" rx="12.000000" fill="rgb(234,255,244)" />
|
|
14
|
-
<g id="我的信息" clip-path="url(#clipPath_13)" customFrame="url(#clipPath_13)">
|
|
15
|
-
<rect id="我的信息" width="24.000000" height="24.000000" x="8.000000" y="8.000000" />
|
|
16
|
-
<g id="组合 8" customFrame="url(#clipPath_14)">
|
|
17
|
-
<rect id="组合 8" width="20.000000" height="20.000000" x="10.000000" y="10.000000" />
|
|
18
|
-
<path id="合并" d="M28.4994 12.3142C28.4994 12.2578 28.4937 12.2018 28.4825 12.1465C28.4713 12.0911 28.4547 12.0373 28.4327 11.9851C28.4107 11.933 28.3836 11.8835 28.3516 11.8365C28.3197 11.7896 28.2834 11.7461 28.2427 11.7062C28.202 11.6663 28.1579 11.6307 28.1101 11.5993C28.0622 11.568 28.0117 11.5415 27.9585 11.5199C27.9054 11.4983 27.8506 11.4819 27.7942 11.4709C27.7378 11.4599 27.6806 11.4544 27.6231 11.4544L24.1832 11.5199L24.1832 10L29.0796 10C29.1472 10 29.2143 10.0065 29.2806 10.0194C29.347 10.0324 29.4114 10.0516 29.4739 10.077C29.5364 10.1024 29.5961 10.1336 29.6523 10.1705C29.7086 10.2074 29.7605 10.2493 29.8084 10.2963C29.8562 10.3433 29.8991 10.3944 29.9367 10.4496C29.9743 10.5048 30.006 10.5631 30.0319 10.6244C30.0578 10.6858 30.0773 10.7491 30.0905 10.8142C30.1037 10.8794 30.1104 10.9451 30.1104 11.0115L30.1832 14.4522L28.4992 14.5L28.4994 12.3142ZM11.6995 12.3143C11.6995 12.2579 11.7051 12.2019 11.7163 12.1466C11.7275 12.0912 11.7441 12.0374 11.7661 11.9852C11.7882 11.9331 11.8152 11.8836 11.8472 11.8366C11.8791 11.7897 11.9155 11.7462 11.9562 11.7063C11.9968 11.6664 12.0409 11.6308 12.0888 11.5994C12.1366 11.5681 12.1871 11.5416 12.2403 11.52C12.2934 11.4984 12.3482 11.482 12.4046 11.471C12.4611 11.46 12.5182 11.4545 12.5758 11.4545L16.0157 11.52L16.0157 10.0001L11.1193 10.0001C11.0516 10.0001 10.9846 10.0066 10.9182 10.0196C10.8518 10.0325 10.7874 10.0517 10.7249 10.0771C10.6624 10.1025 10.6028 10.1337 10.5465 10.1706C10.4902 10.2075 10.4383 10.2494 10.3904 10.2964C10.3426 10.3434 10.2997 10.3945 10.2621 10.4497C10.2245 10.5049 10.1929 10.5632 10.167 10.6245C10.1411 10.6859 10.1215 10.7492 10.1083 10.8143C10.0951 10.8795 10.0885 10.9452 10.0884 11.0116L10.0157 14.4523L11.6997 14.5L11.6995 12.3143ZM25.3135 21.8051L25.3135 22.8167C25.7656 22.8929 26.2209 22.9249 26.6792 22.9127C28.3381 22.9127 29.1675 22.326 29.1675 21.1527C29.1733 20.9869 29.151 20.825 29.1006 20.667C29.0503 20.509 28.9747 20.3641 28.8742 20.2322C28.767 20.1025 28.6403 19.9963 28.4938 19.9134C28.3474 19.8306 28.191 19.7767 28.0246 19.7517L28.0246 19.7011C28.0971 19.6839 28.1676 19.6606 28.236 19.6311C28.3044 19.6016 28.3698 19.5665 28.4321 19.5257C28.4944 19.4848 28.5526 19.4389 28.6069 19.3879C28.6613 19.3369 28.7109 19.2816 28.7556 19.222C28.8003 19.1624 28.8394 19.0994 28.8732 19.033C28.9069 18.9665 28.9346 18.8977 28.9564 18.8265C28.9782 18.7552 28.9937 18.6826 29.0028 18.6086C29.0119 18.5347 29.0145 18.4605 29.0107 18.3861C29.0217 18.2675 29.0176 18.1495 28.9984 18.0319C28.9791 17.9144 28.9454 17.8012 28.8971 17.6923C28.8489 17.5834 28.7875 17.4823 28.7134 17.3891C28.6393 17.2959 28.5547 17.2135 28.4595 17.1419C28.219 17.0003 27.963 16.8972 27.6915 16.8326C27.4199 16.7679 27.1449 16.7446 26.8664 16.7626C26.6258 16.7621 26.3864 16.7791 26.1482 16.8132C25.9479 16.8386 25.7504 16.8791 25.5563 16.9346L25.5563 17.8854C25.743 17.8264 25.9337 17.7842 26.128 17.759C26.3276 17.73 26.5282 17.7148 26.7298 17.7134C27.0252 17.6949 27.3049 17.7523 27.5692 17.8854C27.6168 17.9161 27.6595 17.9525 27.6972 17.9947C27.7348 18.037 27.766 18.0835 27.791 18.1343C27.816 18.1851 27.8337 18.2383 27.8441 18.294C27.8545 18.3496 27.8573 18.4056 27.8525 18.462C27.8566 18.5278 27.8514 18.5927 27.8367 18.657C27.822 18.7212 27.7986 18.7821 27.7663 18.8395C27.734 18.897 27.694 18.9487 27.6468 18.9946C27.5995 19.0405 27.5468 19.0787 27.4885 19.1093C27.1544 19.2631 26.8037 19.3306 26.4364 19.3117L25.9862 19.3117L25.9862 20.1917L26.4466 20.1917C26.8409 20.1669 27.2202 20.2309 27.5845 20.3839C27.6459 20.4167 27.7011 20.4576 27.7505 20.5066C27.7999 20.5556 27.8412 20.6107 27.8745 20.6718C27.9077 20.733 27.9315 20.7976 27.9458 20.8656C27.9602 20.9337 27.9644 21.0024 27.9587 21.0717C27.9648 21.1402 27.9612 21.2083 27.9478 21.2757C27.9344 21.3432 27.912 21.4074 27.8801 21.4683C27.8483 21.5293 27.8086 21.5846 27.7609 21.6341C27.7132 21.6837 27.6593 21.7254 27.5996 21.7596C27.2884 21.9045 26.9613 21.9685 26.6184 21.9518C26.1786 21.9465 25.7436 21.8977 25.3135 21.8051ZM21.3382 18.6238C21.3445 18.5593 21.343 18.495 21.3335 18.4308C21.3241 18.3667 21.3069 18.3046 21.2822 18.2447C21.2575 18.1847 21.226 18.1287 21.1876 18.0765C21.1492 18.0242 21.1049 17.9774 21.055 17.936C20.9359 17.8608 20.808 17.806 20.6714 17.7714C20.5349 17.7368 20.3964 17.7242 20.2558 17.7337C19.8009 17.7395 19.356 17.8087 18.9208 17.9411L18.9208 16.9598C19.4252 16.8181 19.9393 16.7524 20.4633 16.7626C20.7322 16.7484 20.9964 16.7773 21.256 16.8491C21.5156 16.9209 21.7571 17.032 21.9806 17.1824C22.0729 17.2601 22.1548 17.3474 22.2263 17.4446C22.2978 17.5418 22.3567 17.646 22.4034 17.7573C22.45 17.8686 22.483 17.9838 22.5021 18.1029C22.5213 18.222 22.5261 18.3417 22.5167 18.462C22.5245 18.7882 22.4655 19.1017 22.3396 19.4027C22.1879 19.7384 21.984 20.0384 21.7277 20.3029C21.3021 20.7337 20.8502 21.135 20.3721 21.5067L19.9928 21.8051L19.9928 21.8759L22.6938 21.8759L22.6938 22.8419L18.5464 22.8419L18.5464 21.7697C19.2882 21.1796 19.8579 20.6975 20.2558 20.3232C20.574 20.0432 20.8523 19.728 21.0905 19.3774C21.1675 19.2665 21.2269 19.1469 21.2691 19.0187C21.3113 18.8904 21.3344 18.7588 21.3382 18.6238ZM12.3102 17.2127L12.3102 18.1939L13.7769 17.9107L13.7769 22.8419L14.9605 22.8419L14.9605 16.8486L14.0957 16.8486L12.3102 17.2127ZM28.5524 28.0475C28.5524 28.104 28.5467 28.1599 28.5353 28.2152C28.5239 28.2706 28.5071 28.3244 28.4849 28.3766C28.4626 28.4287 28.4352 28.4782 28.4028 28.5252C28.3705 28.5721 28.3337 28.6156 28.2925 28.6555C28.2513 28.6954 28.2067 28.731 28.1583 28.7624C28.1098 28.7937 28.0587 28.8202 28.0049 28.8418C27.9511 28.8634 27.8957 28.8798 27.8385 28.8908C27.7814 28.9018 27.7235 28.9073 27.6653 28.9073L24.1832 28.8418L24.1832 30.3617L29.1397 30.3617C29.2082 30.3617 29.276 30.3552 29.3432 30.3423C29.4104 30.3293 29.4756 30.3101 29.5389 30.2847C29.6022 30.2593 29.6625 30.2281 29.7195 30.1912C29.7765 30.1543 29.829 30.1124 29.8774 30.0654C29.9259 30.0184 29.9693 29.9673 30.0074 29.9121C30.0454 29.8569 30.0774 29.7986 30.1037 29.7373C30.1299 29.6759 30.1497 29.6126 30.163 29.5475C30.1764 29.4823 30.1831 29.4166 30.1832 29.3502L30.1832 26.0478L28.4785 26L28.5524 28.0475ZM11.6308 28.0099C11.6308 28.0664 11.6365 28.1223 11.6479 28.1777C11.6592 28.233 11.676 28.2868 11.6983 28.339C11.7206 28.3911 11.748 28.4406 11.7803 28.4876C11.8127 28.5345 11.8495 28.578 11.8906 28.6179C11.9318 28.6578 11.9765 28.6934 12.0249 28.7248C12.0733 28.7562 12.1244 28.7826 12.1783 28.8042C12.2321 28.8259 12.2875 28.8422 12.3446 28.8532C12.4017 28.8642 12.4596 28.8697 12.5178 28.8698L16 28.8042L16 30.3241L11.0435 30.3241C10.975 30.3241 10.9071 30.3176 10.8399 30.3047C10.7727 30.2917 10.7076 30.2725 10.6443 30.2471C10.581 30.2217 10.5206 30.1906 10.4637 30.1537C10.4067 30.1168 10.3542 30.0748 10.3057 30.0278C10.2573 29.9809 10.2138 29.9298 10.1758 29.8745C10.1377 29.8193 10.1057 29.7611 10.0795 29.6997C10.0533 29.6383 10.0335 29.575 10.0201 29.5099C10.0068 29.4448 10 29.379 10 29.3126L10 26.0478L11.7047 26L11.6308 28.0099Z" fill="rgb(14,191,241)" fill-rule="evenodd" />
|
|
19
|
-
</g>
|
|
20
|
-
</g>
|
|
21
|
-
</svg>
|
package/remoter/tooltips.ts
DELETED
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
type Placement =
|
|
2
|
-
| 'top' | 'top-start' | 'top-end'
|
|
3
|
-
| 'bottom' | 'bottom-start' | 'bottom-end'
|
|
4
|
-
| 'left' | 'left-start' | 'left-end'
|
|
5
|
-
| 'right' | 'right-start' | 'right-end'
|
|
6
|
-
|
|
7
|
-
type Trigger = 'hover' | 'focus' | 'click'
|
|
8
|
-
|
|
9
|
-
interface Options {
|
|
10
|
-
content?: string | (() => string)
|
|
11
|
-
placement?: Placement
|
|
12
|
-
trigger?: Trigger
|
|
13
|
-
delay?: number
|
|
14
|
-
hideDelay?: number
|
|
15
|
-
container?: HTMLElement
|
|
16
|
-
className?: string
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const DEFAULTS: Required<Options> = {
|
|
20
|
-
content: '',
|
|
21
|
-
placement: 'top',
|
|
22
|
-
trigger: 'hover',
|
|
23
|
-
delay: 150,
|
|
24
|
-
hideDelay: 150,
|
|
25
|
-
container: document.body,
|
|
26
|
-
className: 'tiny-remoter-native-tooltip'
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export class Tooltip {
|
|
30
|
-
private el: HTMLElement
|
|
31
|
-
private opts: Required<Options>
|
|
32
|
-
private tip: HTMLDivElement | null = null
|
|
33
|
-
private showTimer = 0
|
|
34
|
-
private hideTimer = 0
|
|
35
|
-
private clickOutside: ((e: MouseEvent) => void) | null = null
|
|
36
|
-
|
|
37
|
-
constructor (el: HTMLElement | string, options: Options = {}) {
|
|
38
|
-
this.el = typeof el === 'string' ? document.querySelector(el)! : el
|
|
39
|
-
if (!this.el) throw new Error('Tooltip: invalid element')
|
|
40
|
-
this.opts = { ...DEFAULTS, ...options }
|
|
41
|
-
this.bindEvents()
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* 公开 API */
|
|
45
|
-
public open (): void {
|
|
46
|
-
if (this.isShown()) return
|
|
47
|
-
this.clearTimer()
|
|
48
|
-
this.showTimer = window.setTimeout(() => {
|
|
49
|
-
this.render()
|
|
50
|
-
this.opts.container.appendChild(this.tip!)
|
|
51
|
-
this.reposition()
|
|
52
|
-
this.attachExtraEvents()
|
|
53
|
-
}, this.opts.delay)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
public close (): void {
|
|
57
|
-
this.clearTimer()
|
|
58
|
-
this.hideTimer = window.setTimeout(() => {
|
|
59
|
-
this.tip?.remove()
|
|
60
|
-
this.detachExtraEvents()
|
|
61
|
-
}, this.opts.hideDelay)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
public toggle (): void {
|
|
65
|
-
this.isShown() ? this.close() : this.open()
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
public destroy (): void {
|
|
69
|
-
this.close()
|
|
70
|
-
const t = this.opts.trigger
|
|
71
|
-
this.el.removeEventListener('mouseenter', this.open)
|
|
72
|
-
this.el.removeEventListener('mouseleave', this.close)
|
|
73
|
-
this.el.removeEventListener('focus', this.open)
|
|
74
|
-
this.el.removeEventListener('blur', this.close)
|
|
75
|
-
if (t === 'click') this.el.removeEventListener('click', this.toggle)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/* 私有方法 */
|
|
79
|
-
private bindEvents (): void {
|
|
80
|
-
const t = this.opts.trigger
|
|
81
|
-
if (t === 'hover') {
|
|
82
|
-
this.el.addEventListener('mouseenter', () => this.open())
|
|
83
|
-
this.el.addEventListener('mouseleave', () => this.close())
|
|
84
|
-
} else if (t === 'focus') {
|
|
85
|
-
this.el.addEventListener('focus', () => this.open())
|
|
86
|
-
this.el.addEventListener('blur', () => this.close())
|
|
87
|
-
} else if (t === 'click') {
|
|
88
|
-
this.el.addEventListener('click', () => this.toggle())
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
private render (): void {
|
|
93
|
-
if (this.tip) return
|
|
94
|
-
const content = typeof this.opts.content === 'function'
|
|
95
|
-
? this.opts.content()
|
|
96
|
-
: this.opts.content
|
|
97
|
-
this.tip = document.createElement('div')
|
|
98
|
-
this.tip.className = `${this.opts.className} ${this.opts.className}--${this.opts.placement}`
|
|
99
|
-
this.tip.innerHTML = `
|
|
100
|
-
<div class="${this.opts.className}__arrow"></div>
|
|
101
|
-
<div class="${this.opts.className}__inner">${content}</div>
|
|
102
|
-
`
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
private reposition (): void {
|
|
106
|
-
const list = this.placementList(this.opts.placement)
|
|
107
|
-
for (const pl of list) {
|
|
108
|
-
const style = this.calcStyle(pl)
|
|
109
|
-
if (this.checkViewport(style)) {
|
|
110
|
-
this.applyStyle(style)
|
|
111
|
-
this.tip!.className = `${this.opts.className} ${this.opts.className}--${pl}`
|
|
112
|
-
return
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
this.applyStyle(this.calcStyle('top'))
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
private calcStyle (placement: Placement): { top: number, left: number } {
|
|
119
|
-
const tr = this.el.getBoundingClientRect()
|
|
120
|
-
const tp = this.tip!.getBoundingClientRect()
|
|
121
|
-
const st = window.pageYOffset || document.documentElement.scrollTop
|
|
122
|
-
const sl = window.pageXOffset || document.documentElement.scrollLeft
|
|
123
|
-
const arrow = 6
|
|
124
|
-
|
|
125
|
-
const [main, sub = 'center'] = placement.split('-') as [string, string | undefined]
|
|
126
|
-
let top = 0, left = 0
|
|
127
|
-
|
|
128
|
-
if (main === 'top') top = tr.top + st - tp.height - arrow
|
|
129
|
-
else if (main === 'bottom') top = tr.bottom + st + arrow
|
|
130
|
-
else if (main === 'left') left = tr.left + sl - tp.width - arrow
|
|
131
|
-
else if (main === 'right') left = tr.right + sl + arrow
|
|
132
|
-
|
|
133
|
-
if (main === 'top' || main === 'bottom') {
|
|
134
|
-
if (sub === 'start') left = tr.left + sl
|
|
135
|
-
else if (sub === 'end') left = tr.right + sl - tp.width
|
|
136
|
-
else left = (tr.left + tr.right) / 2 + sl - tp.width / 2
|
|
137
|
-
}
|
|
138
|
-
if (main === 'left' || main === 'right') {
|
|
139
|
-
if (sub === 'start') top = tr.top + st
|
|
140
|
-
else if (sub === 'end') top = tr.bottom + st - tp.height
|
|
141
|
-
else top = (tr.top + tr.bottom) / 2 + st - tp.height / 2
|
|
142
|
-
}
|
|
143
|
-
return { top: Math.round(top), left: Math.round(left) }
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
private applyStyle ({ top, left }: { top: number, left: number }): void {
|
|
147
|
-
Object.assign(this.tip!.style, {
|
|
148
|
-
position: 'absolute',
|
|
149
|
-
top: `${top}px`,
|
|
150
|
-
left: `${left}px`
|
|
151
|
-
})
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
private checkViewport ({ top, left }: { top: number, left: number }): boolean {
|
|
155
|
-
const pad = 5
|
|
156
|
-
const w = window.innerWidth
|
|
157
|
-
const h = window.innerHeight
|
|
158
|
-
const tp = this.tip!.getBoundingClientRect()
|
|
159
|
-
return left >= pad && top >= pad &&
|
|
160
|
-
left + tp.width <= w - pad &&
|
|
161
|
-
top + tp.height <= h - pad
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
private placementList (pl: Placement): Placement[] {
|
|
165
|
-
const map: Record<string, Placement[]> = {
|
|
166
|
-
top: ['top', 'bottom', 'top-start', 'bottom-start', 'top-end', 'bottom-end'],
|
|
167
|
-
bottom: ['bottom', 'top', 'bottom-start', 'top-start', 'bottom-end', 'top-end'],
|
|
168
|
-
left: ['left', 'right', 'left-start', 'right-start', 'left-end', 'right-end'],
|
|
169
|
-
right: ['right', 'left', 'right-start', 'left-start', 'right-end', 'left-end']
|
|
170
|
-
}
|
|
171
|
-
return map[pl.split('-')[0]] || map.top
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
private attachExtraEvents (): void {
|
|
175
|
-
if (this.opts.trigger === 'click') {
|
|
176
|
-
this.clickOutside = (e: MouseEvent) => {
|
|
177
|
-
const path = e.composedPath() as EventTarget[]
|
|
178
|
-
if (!path.includes(this.el) && !path.includes(this.tip!)) this.close()
|
|
179
|
-
}
|
|
180
|
-
document.addEventListener('mousedown', this.clickOutside)
|
|
181
|
-
} else if (this.opts.trigger === 'hover') {
|
|
182
|
-
this.tip!.addEventListener('mouseenter', () => this.clearTimer())
|
|
183
|
-
this.tip!.addEventListener('mouseleave', () => this.close())
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
private detachExtraEvents (): void {
|
|
188
|
-
if (this.clickOutside) {
|
|
189
|
-
document.removeEventListener('mousedown', this.clickOutside)
|
|
190
|
-
this.clickOutside = null
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
private clearTimer (): void {
|
|
195
|
-
clearTimeout(this.showTimer)
|
|
196
|
-
clearTimeout(this.hideTimer)
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
private isShown (): boolean {
|
|
200
|
-
return Boolean(this.tip?.parentNode)
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/* ===== 样式内联 ===== */
|
|
205
|
-
const STYLE_ID = 'tiny-remoter-native-tooltip-style';
|
|
206
|
-
|
|
207
|
-
(() => {
|
|
208
|
-
if (document.getElementById(STYLE_ID)) return; // 已注入就跳过
|
|
209
|
-
const style = document.createElement('style');
|
|
210
|
-
style.id = STYLE_ID;
|
|
211
|
-
style.textContent = `
|
|
212
|
-
.tiny-remoter-native-tooltip {
|
|
213
|
-
position: absolute;
|
|
214
|
-
z-index: 9999;
|
|
215
|
-
max-width: 200px;
|
|
216
|
-
padding: 6px 10px;
|
|
217
|
-
font-size: 12px;
|
|
218
|
-
line-height: 1.4;
|
|
219
|
-
color: #fff;
|
|
220
|
-
background: #191919;
|
|
221
|
-
border-radius: 4px;
|
|
222
|
-
pointer-events: none;
|
|
223
|
-
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.2);
|
|
224
|
-
}
|
|
225
|
-
.tiny-remoter-native-tooltip__arrow {
|
|
226
|
-
position: absolute;
|
|
227
|
-
width: 0; height: 0;
|
|
228
|
-
border: 6px solid transparent;
|
|
229
|
-
}
|
|
230
|
-
.tiny-remoter-native-tooltip--top
|
|
231
|
-
.tiny-remoter-native-tooltip__arrow {
|
|
232
|
-
bottom: -12px;
|
|
233
|
-
left: 50%; transform:
|
|
234
|
-
translateX(-50%);
|
|
235
|
-
border-top-color: rgba(0,0,0,.75);
|
|
236
|
-
}
|
|
237
|
-
.tiny-remoter-native-tooltip--bottom
|
|
238
|
-
.tiny-remoter-native-tooltip__arrow {
|
|
239
|
-
top: -12px;
|
|
240
|
-
left: 50%; transform:
|
|
241
|
-
translateX(-50%);
|
|
242
|
-
border-bottom-color: rgba(0,0,0,.75);
|
|
243
|
-
}
|
|
244
|
-
.tiny-remoter-native-tooltip--left
|
|
245
|
-
.tiny-remoter-native-tooltip__arrow {
|
|
246
|
-
right: -12px;
|
|
247
|
-
top: 50%;
|
|
248
|
-
transform: translateY(-50%);
|
|
249
|
-
border-left-color: rgba(0,0,0,.75);
|
|
250
|
-
}
|
|
251
|
-
.tiny-remoter-native-tooltip--right
|
|
252
|
-
.tiny-remoter-native-tooltip__arrow {
|
|
253
|
-
left: -12px;
|
|
254
|
-
top: 50%;
|
|
255
|
-
transform: translateY(-50%);
|
|
256
|
-
border-right-color: rgba(0,0,0,.75);
|
|
257
|
-
}
|
|
258
|
-
`;
|
|
259
|
-
document.head.appendChild(style);
|
|
260
|
-
})();
|
package/runtime.html
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<!-- 导入 NEXT-SDKs -->
|
|
4
|
-
<script src="https://unpkg.com/@opentiny/next-sdk@0.1/dist/webmcp-full.js"></script>
|
|
5
|
-
</head>
|
|
6
|
-
<body>
|
|
7
|
-
<script>
|
|
8
|
-
;(async () => {
|
|
9
|
-
const { WebMcpServer, createMessageChannelPairTransport, z, WebMcpClient } = WebMCP
|
|
10
|
-
const [serverTransport, clientTransport] = createMessageChannelPairTransport()
|
|
11
|
-
|
|
12
|
-
const server = new WebMcpServer()
|
|
13
|
-
server.registerTool(
|
|
14
|
-
'demo-tool',
|
|
15
|
-
{
|
|
16
|
-
title: '演示工具',
|
|
17
|
-
description: '一个简单工具',
|
|
18
|
-
inputSchema: { foo: z.string() }
|
|
19
|
-
},
|
|
20
|
-
async (params) => {
|
|
21
|
-
console.log('params:', params)
|
|
22
|
-
return { content: [{ type: 'text', text: `收到: ${params.foo}` }] }
|
|
23
|
-
}
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
await server.connect(serverTransport)
|
|
27
|
-
|
|
28
|
-
const client = new WebMcpClient()
|
|
29
|
-
await client.connect(clientTransport)
|
|
30
|
-
const { sessionId } = await client.connect({
|
|
31
|
-
agent: true,
|
|
32
|
-
url: 'https://agent.opentiny.design/api/v1/webmcp-trial/mcp'
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
console.log('sessionId:', sessionId)
|
|
36
|
-
})()
|
|
37
|
-
</script>
|
|
38
|
-
</body>
|
|
39
|
-
</html>
|
package/runtime.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { initializeBuiltinWebMCP } from './page-tools/initialize-builtin-WebMCP'
|
|
2
|
-
import { registerPageAgentTool } from './page-tools/page-agent-tool'
|
|
3
|
-
|
|
4
|
-
if (typeof window !== 'undefined') {
|
|
5
|
-
;(window as any).initializeBuiltinWebMCP = initializeBuiltinWebMCP
|
|
6
|
-
;(window as any).registerPageAgentTool = registerPageAgentTool
|
|
7
|
-
|
|
8
|
-
// 作为 IIFE 注入到页面 MAIN world 时自动注册 page-agent-tool
|
|
9
|
-
// 避免 content script 需要额外触发(会被 CSP 内联 script 限制拦截)
|
|
10
|
-
registerPageAgentTool()
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { initializeBuiltinWebMCP, registerPageAgentTool }
|
package/script/utils.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'fs'
|
|
2
|
-
import { resolve } from 'path'
|
|
3
|
-
import { fileURLToPath } from 'url'
|
|
4
|
-
|
|
5
|
-
// 获取 __dirname 的替代方案
|
|
6
|
-
const __filename = fileURLToPath(import.meta.url)
|
|
7
|
-
const __dirname = resolve(__filename, '..')
|
|
8
|
-
|
|
9
|
-
// 读取目标包的版本号
|
|
10
|
-
export function getPackageVersion(packageName: string): string {
|
|
11
|
-
try {
|
|
12
|
-
// 直接读取 node_modules 中目标包的 package.json 获取实际版本号
|
|
13
|
-
const packagePath = resolve(__dirname, `../node_modules/${packageName}/package.json`)
|
|
14
|
-
const packageJson = JSON.parse(readFileSync(packagePath, 'utf-8'))
|
|
15
|
-
|
|
16
|
-
if (packageJson.version) {
|
|
17
|
-
return packageJson.version
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// 如果没有找到版本号,返回默认版本
|
|
21
|
-
return 'latest'
|
|
22
|
-
} catch (error) {
|
|
23
|
-
console.warn(`无法读取 node_modules/${packageName} 版本号,使用默认命名:`, error)
|
|
24
|
-
return 'latest'
|
|
25
|
-
}
|
|
26
|
-
}
|