karin-plugin-mys-core 1.0.5 → 1.0.6

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <h1 align="center"><font color="#3f7dd1">karin-plugin-mys-core</font></h1>
1
+ ![karin-plugin-mys-core](https://socialify.git.ci/Karin-Mys-Plugins/karin-plugin-mys-core/image?forks=1&issues=1&language=1&name=1&owner=1&pulls=1&stargazers=1&theme=Light)
2
2
 
3
3
  ## 📖 目录
4
4
 
@@ -11,7 +11,7 @@
11
11
  - [米游社模块 (mys)](#米游社模块-mys)
12
12
  - [渲染模块 (render)](#渲染模块-render)
13
13
  - [工具模块 (utils)](#工具模块-utils)
14
- - [贡献与反馈](#贡献与反馈)
14
+ - [贡献者](#贡献者)
15
15
 
16
16
  ---
17
17
 
@@ -1072,7 +1072,18 @@ const str = common.ObjToStr({ key: 'value', foo: 'bar' }, '&')
1072
1072
 
1073
1073
  ---
1074
1074
 
1075
- ## 贡献与反馈
1075
+ ### 贡献者
1076
1076
 
1077
- - 有任何建议或问题,欢迎在 [Issues](https://github.com/Karin-Mys-Plugins/karin-plugin-mys-core/issues) 提出。
1078
- - 也可加入官方交流群交流经验。
1077
+ [![贡献者](https://contributors-img.web.app/image?repo=Karin-Mys-Plugins/karin-plugin-mys-core)](https://github.com/Karin-Mys-Plugins/karin-plugin-mys-core/graphs/contributors)
1078
+
1079
+ ![Alt](https://repobeats.axiom.co/api/embed/d187ed0811bf5aae42c89dceaf7482f8944bbbea.svg "Repobeats analytics image")
1080
+
1081
+ ## 如何参与贡献(PR)
1082
+
1083
+ 1. Fork 本仓库,创建你的分支
1084
+ 2. 提交你的更改,附上简要说明
1085
+ 3. 发起 Pull Request,耐心等待 Review
1086
+ 4. 你的名字将出现在贡献者列表,收获一份开源荣誉!
1087
+ 5. 有任何建议或问题,欢迎在 [Issues](https://github.com/Karin-Mys-Plugins/karin-plugin-mys-core/issues) 提出。
1088
+
1089
+ > 💡 欢迎任何形式的贡献,无论是代码、文档、建议还是灵感!
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ShowBindAccountCmdFunc
3
- } from "../chunk-ZZ5BYFNK.js";
3
+ } from "../chunk-CZZETPLY.js";
4
4
  import "../chunk-UX2BDLJF.js";
5
- import "../chunk-AY34PPJT.js";
5
+ import "../chunk-NUOK4VFP.js";
6
6
  import {
7
7
  UserInfo,
8
8
  fetchQRcode,
@@ -4,9 +4,9 @@ import {
4
4
  ShowBindAccountCmdFunc,
5
5
  UnbindAccount,
6
6
  UnbindUID
7
- } from "../chunk-ZZ5BYFNK.js";
7
+ } from "../chunk-CZZETPLY.js";
8
8
  import "../chunk-UX2BDLJF.js";
9
- import "../chunk-AY34PPJT.js";
9
+ import "../chunk-NUOK4VFP.js";
10
10
  import "../chunk-DJTJKSNN.js";
11
11
  import "../chunk-7VAWV6ZE.js";
12
12
  import "../chunk-LJSDSOY6.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ReactRender
3
- } from "./chunk-AY34PPJT.js";
3
+ } from "./chunk-NUOK4VFP.js";
4
4
  import {
5
5
  UserInfo
6
6
  } from "./chunk-DJTJKSNN.js";
@@ -19,18 +19,41 @@ var Render = new ReactRender(dir, {});
19
19
 
20
20
  // src/template/layout/DefaultLayout.tsx
21
21
  var DefaultLayoutComponent = ({
22
- children
22
+ children,
23
+ bgColor,
24
+ mysPlugin
23
25
  }) => {
24
26
  const { plugin, karin: karin2 } = Render;
25
27
  return /* @__PURE__ */ React.createElement(
26
28
  "div",
27
29
  {
28
- className: "relative flex w-[600px] flex-col pb-10 font-[HYWenHei-55W] text-white",
30
+ className: `relative flex w-[600px] flex-col pb-10 font-[HYWenHei-55W] text-black ${bgColor}`,
29
31
  id: "container",
30
32
  style: { fontFamily: "HYWenHei-55W, sans-serif" }
31
33
  },
32
34
  children,
33
- /* @__PURE__ */ React.createElement("div", { className: "absolute bottom-0 left-0 flex w-full items-center justify-center bg-black px-0 py-2.5 text-base" }, /* @__PURE__ */ React.createElement("span", null, "Created\xA0by\xA0Karin"), /* @__PURE__ */ React.createElement("strong", { className: "pt-1.5 text-[10px] font-bold text-[#f2c06f]" }, "v", karin2.version), /* @__PURE__ */ React.createElement("span", null, "\xA0&&\xA0", plugin.name), /* @__PURE__ */ React.createElement("strong", { className: "pt-1.5 text-[10px] font-bold text-[#f2c06f]" }, "v", plugin.version))
35
+ /* @__PURE__ */ React.createElement("div", { className: "absolute bottom-0 left-0 flex w-full items-center justify-center gap-4 px-4 py-2.5 text-sm" }, mysPlugin && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
36
+ "img",
37
+ {
38
+ src: `${mysPlugin.logoPath}`,
39
+ alt: "Mys Plugin Logo",
40
+ className: "h-6 w-6 rounde"
41
+ }
42
+ ), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React.createElement("span", { className: "text-[5px] font-bold leading-none text-black" }, "KARIN-MYS-PLUGIN"), /* @__PURE__ */ React.createElement("div", { className: "flex items-baseline gap-0.5" }, /* @__PURE__ */ React.createElement("span", { className: "font-semibold" }, mysPlugin.name), /* @__PURE__ */ React.createElement("strong", { className: "text-xs font-bold text-[#f2c06f]" }, "v", mysPlugin.version)))), /* @__PURE__ */ React.createElement("div", { className: "h-8 w-px bg-gray-600" })), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
43
+ "img",
44
+ {
45
+ src: `${plugin.resources.default}/image/mys-core-logo.png`,
46
+ alt: "MysCore Logo",
47
+ className: "h-6 w-6 rounded-sm"
48
+ }
49
+ ), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React.createElement("span", { className: "text-[5px] font-bold leading-none text-black" }, "KARIN-PLUGIN"), /* @__PURE__ */ React.createElement("div", { className: "flex items-baseline gap-0.5" }, /* @__PURE__ */ React.createElement("span", { className: "font-semibold" }, "MysCore"), /* @__PURE__ */ React.createElement("strong", { className: "text-xs font-bold text-[#f2c06f]" }, "v", plugin.version)))), /* @__PURE__ */ React.createElement("div", { className: "h-8 w-px bg-gray-600" }), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
50
+ "img",
51
+ {
52
+ src: `${plugin.resources.default}/image/frame-logo.png`,
53
+ alt: "Karin Logo",
54
+ className: "h-6 w-6 rounded-sm"
55
+ }
56
+ ), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React.createElement("span", { className: "text-[5px] font-bold leading-none text-black" }, "IS DRIVEN BY"), /* @__PURE__ */ React.createElement("div", { className: "flex items-baseline gap-1.5" }, /* @__PURE__ */ React.createElement("span", { className: "font-semibold" }, "Karin"), /* @__PURE__ */ React.createElement("strong", { className: "text-[10px] font-bold text-[#f2c06f]" }, "v", karin2.version)))))
34
57
  );
35
58
  };
36
59
 
@@ -41,7 +64,7 @@ var ShowBindAccountComponent = ({
41
64
  AccountList
42
65
  }) => {
43
66
  const plugin = Render.plugin;
44
- return /* @__PURE__ */ React2.createElement(DefaultLayoutComponent, null, /* @__PURE__ */ React2.createElement("div", { className: "bg-[#f6f0e6] px-[18px] pb-9 pt-5" }, /* @__PURE__ */ React2.createElement(
67
+ return /* @__PURE__ */ React2.createElement(DefaultLayoutComponent, { bgColor: "bg-[#f6f0e6]" }, /* @__PURE__ */ React2.createElement("div", { className: "px-[18px] pb-9 pt-5" }, /* @__PURE__ */ React2.createElement(
45
68
  "div",
46
69
  {
47
70
  className: "absolute -top-2.5 right-0 z-[5] h-[72px] w-[150px] bg-contain bg-center bg-no-repeat opacity-50",
@@ -194,7 +217,9 @@ var ShowBindAccountCmdFunc = async (e) => {
194
217
  renderData.AccountList.push(data);
195
218
  }
196
219
  }
197
- const image = await Render.template("ShowBindAccount", ShowBindAccountComponent, renderData);
220
+ const image = await Render.template("ShowBindAccount", ShowBindAccountComponent, renderData, {
221
+ type: "png"
222
+ });
198
223
  image && e.reply(segment.image(image), { at: true });
199
224
  return true;
200
225
  };
@@ -57,7 +57,7 @@ var ReactRender = class {
57
57
  omitBackground: options.type === "png",
58
58
  selector: "container",
59
59
  setViewport: {
60
- deviceScaleFactor: 2
60
+ deviceScaleFactor: 3
61
61
  },
62
62
  ...options.render || {},
63
63
  file: savePath
@@ -3,7 +3,7 @@ import {
3
3
  } from "../../chunk-UX2BDLJF.js";
4
4
  import {
5
5
  ReactRender
6
- } from "../../chunk-AY34PPJT.js";
6
+ } from "../../chunk-NUOK4VFP.js";
7
7
  import "../../chunk-UC6INRYV.js";
8
8
  import "../../chunk-LG34FPBI.js";
9
9
  import "../../chunk-MLKGABMK.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ReactRender
3
- } from "../../chunk-AY34PPJT.js";
3
+ } from "../../chunk-NUOK4VFP.js";
4
4
  import "../../chunk-UC6INRYV.js";
5
5
  import "../../chunk-LG34FPBI.js";
6
6
  import "../../chunk-MLKGABMK.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karin-plugin-mys-core",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "author": "babanbang",
5
5
  "type": "module",
6
6
  "description": "karin-plugin-mys-core",
@@ -79,11 +79,10 @@
79
79
  "/lib/**/*.js",
80
80
  "/lib/**/*.d.ts",
81
81
  "resources",
82
- "!resources/**/*.css.map",
83
- "!resources/**/*.scss",
84
82
  "!lib/app.js",
85
83
  "!lib/app.d.ts",
86
- "!lib/index.d.ts"
84
+ "!lib/index.d.ts",
85
+ "!lib/apps/**/*.d.ts"
87
86
  ],
88
87
  "publishConfig": {
89
88
  "access": "public",
Binary file
@@ -641,6 +641,14 @@ video {
641
641
  height: 2.5rem;
642
642
  }
643
643
 
644
+ .h-6 {
645
+ height: 1.5rem;
646
+ }
647
+
648
+ .h-8 {
649
+ height: 2rem;
650
+ }
651
+
644
652
  .h-\[72px\] {
645
653
  height: 72px;
646
654
  }
@@ -649,6 +657,10 @@ video {
649
657
  width: 2.5rem;
650
658
  }
651
659
 
660
+ .w-6 {
661
+ width: 1.5rem;
662
+ }
663
+
652
664
  .w-\[150px\] {
653
665
  width: 150px;
654
666
  }
@@ -661,6 +673,10 @@ video {
661
673
  width: 100%;
662
674
  }
663
675
 
676
+ .w-px {
677
+ width: 1px;
678
+ }
679
+
664
680
  .min-w-0 {
665
681
  min-width: 0px;
666
682
  }
@@ -685,6 +701,10 @@ video {
685
701
  align-items: center;
686
702
  }
687
703
 
704
+ .items-baseline {
705
+ align-items: baseline;
706
+ }
707
+
688
708
  .justify-center {
689
709
  justify-content: center;
690
710
  }
@@ -693,6 +713,10 @@ video {
693
713
  justify-content: space-between;
694
714
  }
695
715
 
716
+ .gap-0\.5 {
717
+ gap: 0.125rem;
718
+ }
719
+
696
720
  .gap-1\.5 {
697
721
  gap: 0.375rem;
698
722
  }
@@ -709,6 +733,10 @@ video {
709
733
  gap: 0.75rem;
710
734
  }
711
735
 
736
+ .gap-4 {
737
+ gap: 1rem;
738
+ }
739
+
712
740
  .overflow-visible {
713
741
  overflow: visible;
714
742
  }
@@ -737,6 +765,10 @@ video {
737
765
  border-radius: 0.375rem;
738
766
  }
739
767
 
768
+ .rounded-sm {
769
+ border-radius: 0.125rem;
770
+ }
771
+
740
772
  .rounded-xl {
741
773
  border-radius: 0.75rem;
742
774
  }
@@ -754,15 +786,15 @@ video {
754
786
  background-color: rgb(246 240 230 / var(--tw-bg-opacity, 1));
755
787
  }
756
788
 
757
- .bg-black {
758
- --tw-bg-opacity: 1;
759
- background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
760
- }
761
-
762
789
  .bg-black\/\[0\.06\] {
763
790
  background-color: rgb(0 0 0 / 0.06);
764
791
  }
765
792
 
793
+ .bg-gray-600 {
794
+ --tw-bg-opacity: 1;
795
+ background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1));
796
+ }
797
+
766
798
  .bg-white {
767
799
  --tw-bg-opacity: 1;
768
800
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
@@ -817,11 +849,6 @@ video {
817
849
  padding: 1rem;
818
850
  }
819
851
 
820
- .px-0 {
821
- padding-left: 0px;
822
- padding-right: 0px;
823
- }
824
-
825
852
  .px-1 {
826
853
  padding-left: 0.25rem;
827
854
  padding-right: 0.25rem;
@@ -832,6 +859,11 @@ video {
832
859
  padding-right: 0.5rem;
833
860
  }
834
861
 
862
+ .px-4 {
863
+ padding-left: 1rem;
864
+ padding-right: 1rem;
865
+ }
866
+
835
867
  .px-5 {
836
868
  padding-left: 1.25rem;
837
869
  padding-right: 1.25rem;
@@ -870,10 +902,6 @@ video {
870
902
  padding-bottom: 2.25rem;
871
903
  }
872
904
 
873
- .pt-1\.5 {
874
- padding-top: 0.375rem;
875
- }
876
-
877
905
  .pt-3 {
878
906
  padding-top: 0.75rem;
879
907
  }
@@ -898,9 +926,8 @@ video {
898
926
  font-size: 13px;
899
927
  }
900
928
 
901
- .text-base {
902
- font-size: 1rem;
903
- line-height: 1.5rem;
929
+ .text-\[5px\] {
930
+ font-size: 5px;
904
931
  }
905
932
 
906
933
  .text-sm {
@@ -921,6 +948,10 @@ video {
921
948
  font-weight: 600;
922
949
  }
923
950
 
951
+ .leading-none {
952
+ line-height: 1;
953
+ }
954
+
924
955
  .text-\[\#111\] {
925
956
  --tw-text-opacity: 1;
926
957
  color: rgb(17 17 17 / var(--tw-text-opacity, 1));
@@ -946,6 +977,11 @@ video {
946
977
  color: rgb(242 192 111 / var(--tw-text-opacity, 1));
947
978
  }
948
979
 
980
+ .text-black {
981
+ --tw-text-opacity: 1;
982
+ color: rgb(0 0 0 / var(--tw-text-opacity, 1));
983
+ }
984
+
949
985
  .text-black\/60 {
950
986
  color: rgb(0 0 0 / 0.6);
951
987
  }
@@ -1,7 +0,0 @@
1
- import * as node_karin from 'node-karin';
2
-
3
- declare const MiHoYoLoginQRCode: node_karin.Command<keyof node_karin.MessageEventMap>;
4
- declare const BindCookieByMessage: node_karin.Command<keyof node_karin.MessageEventMap>;
5
- declare const BindStokenByMessage: node_karin.Command<keyof node_karin.MessageEventMap>;
6
-
7
- export { BindCookieByMessage, BindStokenByMessage, MiHoYoLoginQRCode };
@@ -1,5 +0,0 @@
1
- import * as node_karin from 'node-karin';
2
-
3
- declare const BindMysDevice: node_karin.Command<keyof node_karin.MessageEventMap>;
4
-
5
- export { BindMysDevice };
@@ -1,10 +0,0 @@
1
- import * as node_karin from 'node-karin';
2
- import { Message } from 'node-karin';
3
-
4
- declare const BindUID: node_karin.Command<keyof node_karin.MessageEventMap>;
5
- declare const UnbindUID: node_karin.Command<keyof node_karin.MessageEventMap>;
6
- declare const ShowBindAccountCmdFunc: (e: Message) => Promise<boolean>;
7
- declare const ShowBindAccount: node_karin.Command<keyof node_karin.MessageEventMap>;
8
- declare const UnbindAccount: node_karin.Command<keyof node_karin.MessageEventMap>;
9
-
10
- export { BindUID, ShowBindAccount, ShowBindAccountCmdFunc, UnbindAccount, UnbindUID };