@bbki.ng/components 1.5.47 → 1.5.50

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/index.d.ts CHANGED
@@ -275,9 +275,8 @@ interface ISettings {
275
275
  interface IOpt {
276
276
  multiplier: number;
277
277
  color: number[];
278
- spiralConstA: number;
279
- spiralConstB: number;
280
278
  offset?: number;
279
+ length: number;
281
280
  }
282
281
 
283
282
  interface LoadingSpiralProps extends IOpt, ISettings {
@@ -287,4 +286,4 @@ interface LoadingSpiralProps extends IOpt, ISettings {
287
286
  }
288
287
  declare const LoadingSpiral: (props?: LoadingSpiralProps | undefined) => JSX.Element;
289
288
 
290
- export { Article, ArticleProps, ArticleSkeleton, ArticleSkeletonProps, BLinkDotProps, BlinkDot, Breadcrumb, BreadcrumbProps, Button, ButtonProps, ButtonType, DropImage, Error, ErrorBoundary, Gallery, GalleryProps, ImageDropProps, ImagePreviewerProps, ImageRenderer, Img, Link, LinkColor, LinkList, LinkListProps, LinkListSkeleton, LinkListSkeletonProps, LinkProps, List, LoadingSpiral, LoadingSpiralProps, Logo, LogoProps, Nav, NavProps, NoiseCover, NoiseCoverProps, NotFound, Page, Panel, PanelProps, PathObj, PopConfirm, PopConfirmProps, Skeleton, SkeletonColor, SkeletonProps, Table, TableProps, Tag, TagProps, Tags, ThreeColLayout, TitledList, TitledListProps, listProps, threeColLayoutProps };
289
+ export { Article, ArticleProps, ArticleSkeleton, ArticleSkeletonProps, BLinkDotProps, BlinkDot, Breadcrumb, BreadcrumbProps, Button, ButtonProps, ButtonType, DropImage, Error, ErrorBoundary, Gallery, GalleryProps, ImageDropProps, ImagePreviewerProps, ImageRenderer, Img, ImgProps, Link, LinkColor, LinkList, LinkListProps, LinkListSkeleton, LinkListSkeletonProps, LinkProps, List, LoadingSpiral, LoadingSpiralProps, Logo, LogoProps, Nav, NavProps, NoiseCover, NoiseCoverProps, NotFound, Page, Panel, PanelProps, PathObj, Photo, PopConfirm, PopConfirmProps, Skeleton, SkeletonColor, SkeletonProps, Table, TableProps, Tag, TagProps, Tags, ThreeColLayout, TitledList, TitledListProps, listProps, ossProcessType, threeColLayoutProps };
package/dist/index.js CHANGED
@@ -88,7 +88,8 @@ __export(src_exports, {
88
88
  Tag: () => Tag,
89
89
  Tags: () => Tags,
90
90
  ThreeColLayout: () => ThreeColLayout,
91
- TitledList: () => TitledList
91
+ TitledList: () => TitledList,
92
+ ossProcessType: () => ossProcessType
92
93
  });
93
94
 
94
95
  // src/article/Article.tsx
@@ -851,6 +852,16 @@ var ThreeColLayout = (props) => {
851
852
  var import_classnames10 = __toESM(require("classnames"));
852
853
  var import_react19 = __toESM(require("react"));
853
854
 
855
+ // src/img/types.ts
856
+ var ossProcessType = /* @__PURE__ */ ((ossProcessType2) => {
857
+ ossProcessType2["THUMBNAIL"] = "thumbnail";
858
+ ossProcessType2["WEBP"] = "webp";
859
+ ossProcessType2["NULL"] = "null";
860
+ ossProcessType2["oWEBP"] = "owebp";
861
+ ossProcessType2["PROG"] = "prog";
862
+ return ossProcessType2;
863
+ })(ossProcessType || {});
864
+
854
865
  // src/img/utils.ts
855
866
  var addOssWebpProcessStyle = (originUrl, style) => {
856
867
  const OSS_ADDRESS = "https://zjh-im-res.oss-cn-shenzhen.aliyuncs.com";
@@ -1143,33 +1154,24 @@ var rgba = (val) => {
1143
1154
 
1144
1155
  // src/loading-spiral/createOptions.ts
1145
1156
  var DEFAULT_OPT = {
1146
- multiplier: 1e4,
1157
+ multiplier: 5e4,
1147
1158
  color: [209, 213, 219, 1],
1148
- spiralConstA: 0.04,
1149
- spiralConstB: 0.16,
1150
- offset: -0.3
1159
+ offset: -0.3,
1160
+ length: 0.15
1151
1161
  };
1152
1162
  var createOptions = (opt = DEFAULT_OPT) => {
1153
- const {
1154
- multiplier,
1155
- spiralConstA,
1156
- spiralConstB,
1157
- color,
1158
- offset = -1 * 0.3
1159
- } = opt;
1163
+ const { multiplier, color, length, offset = -1 * 0.3 } = opt;
1164
+ const radius = 0.028 / 0.15 * length;
1160
1165
  const attributes = [
1161
1166
  {
1162
1167
  name: "aPositionStart" /* POSITION_START */,
1163
1168
  data: (index, total) => {
1164
1169
  const percent = index / total;
1165
- const length = 0.28;
1166
- const radius = 0.056;
1167
1170
  const pi2 = Math.PI * 2;
1168
1171
  let x = length * Math.sin(pi2 * percent), y = radius * Math.cos(pi2 * 3 * percent), z, t;
1169
1172
  t = percent % 0.25 / 0.25;
1170
1173
  t = percent % 0.25 - (2 * (1 - t) * t * -0.0185 + t * t * 0.25);
1171
1174
  if (Math.floor(percent / 0.25) == 0 || Math.floor(percent / 0.25) == 2) {
1172
- console.log("neg t");
1173
1175
  t *= -1;
1174
1176
  }
1175
1177
  z = radius * Math.sin(pi2 * 2 * (percent - t));
@@ -1227,7 +1229,11 @@ var LoadingSpiral = (props) => {
1227
1229
  return;
1228
1230
  }
1229
1231
  const phenomenon = new import_phenomenon.default({
1230
- settings: createSettings({ canvas: canvasRef.current, step })
1232
+ settings: createSettings({ canvas: canvasRef.current, step }),
1233
+ context: {
1234
+ alpha: true,
1235
+ antialias: true
1236
+ }
1231
1237
  });
1232
1238
  phenomenon.add("spiral", createOptions(Object.assign({}, DEFAULT_OPT, rest)));
1233
1239
  }, []);
@@ -1272,5 +1278,6 @@ module.exports = __toCommonJS(src_exports);
1272
1278
  Tag,
1273
1279
  Tags,
1274
1280
  ThreeColLayout,
1275
- TitledList
1281
+ TitledList,
1282
+ ossProcessType
1276
1283
  });
package/dist/index.mjs CHANGED
@@ -793,6 +793,16 @@ var ThreeColLayout = (props) => {
793
793
  import classnames from "classnames";
794
794
  import React18, { useState as useState5 } from "react";
795
795
 
796
+ // src/img/types.ts
797
+ var ossProcessType = /* @__PURE__ */ ((ossProcessType2) => {
798
+ ossProcessType2["THUMBNAIL"] = "thumbnail";
799
+ ossProcessType2["WEBP"] = "webp";
800
+ ossProcessType2["NULL"] = "null";
801
+ ossProcessType2["oWEBP"] = "owebp";
802
+ ossProcessType2["PROG"] = "prog";
803
+ return ossProcessType2;
804
+ })(ossProcessType || {});
805
+
796
806
  // src/img/utils.ts
797
807
  var addOssWebpProcessStyle = (originUrl, style) => {
798
808
  const OSS_ADDRESS = "https://zjh-im-res.oss-cn-shenzhen.aliyuncs.com";
@@ -1085,33 +1095,24 @@ var rgba = (val) => {
1085
1095
 
1086
1096
  // src/loading-spiral/createOptions.ts
1087
1097
  var DEFAULT_OPT = {
1088
- multiplier: 1e4,
1098
+ multiplier: 5e4,
1089
1099
  color: [209, 213, 219, 1],
1090
- spiralConstA: 0.04,
1091
- spiralConstB: 0.16,
1092
- offset: -0.3
1100
+ offset: -0.3,
1101
+ length: 0.15
1093
1102
  };
1094
1103
  var createOptions = (opt = DEFAULT_OPT) => {
1095
- const {
1096
- multiplier,
1097
- spiralConstA,
1098
- spiralConstB,
1099
- color,
1100
- offset = -1 * 0.3
1101
- } = opt;
1104
+ const { multiplier, color, length, offset = -1 * 0.3 } = opt;
1105
+ const radius = 0.028 / 0.15 * length;
1102
1106
  const attributes = [
1103
1107
  {
1104
1108
  name: "aPositionStart" /* POSITION_START */,
1105
1109
  data: (index, total) => {
1106
1110
  const percent = index / total;
1107
- const length = 0.28;
1108
- const radius = 0.056;
1109
1111
  const pi2 = Math.PI * 2;
1110
1112
  let x = length * Math.sin(pi2 * percent), y = radius * Math.cos(pi2 * 3 * percent), z, t;
1111
1113
  t = percent % 0.25 / 0.25;
1112
1114
  t = percent % 0.25 - (2 * (1 - t) * t * -0.0185 + t * t * 0.25);
1113
1115
  if (Math.floor(percent / 0.25) == 0 || Math.floor(percent / 0.25) == 2) {
1114
- console.log("neg t");
1115
1116
  t *= -1;
1116
1117
  }
1117
1118
  z = radius * Math.sin(pi2 * 2 * (percent - t));
@@ -1169,7 +1170,11 @@ var LoadingSpiral = (props) => {
1169
1170
  return;
1170
1171
  }
1171
1172
  const phenomenon = new Phenomenon({
1172
- settings: createSettings({ canvas: canvasRef.current, step })
1173
+ settings: createSettings({ canvas: canvasRef.current, step }),
1174
+ context: {
1175
+ alpha: true,
1176
+ antialias: true
1177
+ }
1173
1178
  });
1174
1179
  phenomenon.add("spiral", createOptions(Object.assign({}, DEFAULT_OPT, rest)));
1175
1180
  }, []);
@@ -1212,5 +1217,6 @@ export {
1212
1217
  Tag,
1213
1218
  Tags,
1214
1219
  ThreeColLayout,
1215
- TitledList
1220
+ TitledList,
1221
+ ossProcessType
1216
1222
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/components",
3
- "version": "1.5.47",
3
+ "version": "1.5.50",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",