@blocklet/discuss-kit-ux 1.6.233 → 1.6.236

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.
@@ -4,7 +4,7 @@ import { OnContentChangePlugin } from "@blocklet/editor/lib/ext/OnContentChangeP
4
4
  import { CtrlsShortcutPlugin } from "@blocklet/editor/lib/ext/ShortcutPlugin";
5
5
  import { SafeAreaPlugin } from "@blocklet/editor/lib/ext/SafeAreaPlugin";
6
6
  import { lazy } from "react";
7
- import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-C_fjNX2P.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-jd2U4xWv.mjs";
8
8
  const BlockletEditor = lazy(() => import("@blocklet/editor"));
9
9
  const Root = styled(Box)`
10
10
  .be-editable,
@@ -2814,21 +2814,12 @@ function UploaderProvider({ children }) {
2814
2814
  ref: uploaderRef,
2815
2815
  popup: true,
2816
2816
  coreProps: {
2817
- // 上传限制,参考 https://uppy.io/docs/uppy/#restrictions
2818
- restrictions: {
2819
- allowedFileTypes: [
2820
- "image/png",
2821
- "image/jpeg",
2822
- "image/gif",
2823
- "image/webp",
2824
- "image/svg+xml",
2825
- "video/mp4",
2826
- "video/webm",
2827
- "application/pdf"
2828
- ],
2829
- maxNumberOfFiles: void 0
2830
- // default is unlimited
2831
- }
2817
+ // 不做代码限制,默认使用 Media Kit 配置
2818
+ // // 上传限制,参考 https://uppy.io/docs/uppy/#restrictions
2819
+ // restrictions: {
2820
+ // allowedFileExts: ['.png', '.jpg', '.jpeg', '.gif', '.webp', '.svg', '.mp4', '.webm', '.pdf'],
2821
+ // maxNumberOfFiles: undefined, // default is unlimited
2822
+ // },
2832
2823
  }
2833
2824
  },
2834
2825
  "uploader"
@@ -5466,43 +5457,6 @@ function DefaultEditorConfigProvider({
5466
5457
  return result.data;
5467
5458
  }
5468
5459
  };
5469
- if (isAdmin && blockletExists("ai-assistant")) {
5470
- AI.fetchTemplateTags = async () => {
5471
- var _a3;
5472
- try {
5473
- const {
5474
- data: { tags }
5475
- } = await request.get(
5476
- joinUrl(window.location.origin, aiAssistantMountPoint, "/api/tags")
5477
- );
5478
- return tags;
5479
- } catch (e) {
5480
- (_a3 = e.markAsHandled) == null ? void 0 : _a3.call(e);
5481
- console.error(e);
5482
- return [];
5483
- }
5484
- };
5485
- AI.fetchTemplates = async (params = {}) => {
5486
- var _a3;
5487
- const { offset = 0, limit = 20, tag } = params;
5488
- try {
5489
- const {
5490
- data: { assistants }
5491
- } = await request.get(
5492
- joinUrl(
5493
- window.location.origin,
5494
- aiAssistantMountPoint,
5495
- `/api/assistants?offset=${offset}&limit=${limit}${tag ? `&tag=${tag}` : ""}`
5496
- )
5497
- );
5498
- return assistants;
5499
- } catch (e) {
5500
- (_a3 = e.markAsHandled) == null ? void 0 : _a3.call(e);
5501
- console.error(e);
5502
- return [];
5503
- }
5504
- };
5505
- }
5506
5460
  const templatePlugin = {
5507
5461
  fetchTemplateList: async ({ reload = false } = {}) => {
5508
5462
  var _a3;
@@ -5595,7 +5549,7 @@ function Pagination({
5595
5549
  }
5596
5550
  );
5597
5551
  }
5598
- const Editor = lazy(() => import("./editor-C9i-Y0CH.mjs"));
5552
+ const Editor = lazy(() => import("./editor-uebxw0_k.mjs"));
5599
5553
  function LazyEditor(props) {
5600
5554
  const fallback = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
5601
5555
  /* @__PURE__ */ jsx(Skeleton, {}),
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "@blocklet/labels";
2
- import { Q, m, U, A, k, ad, B, E, J, H, K, ap, X, W, _, Y, Z, a0, v, C, w, x, z, a4, a5, ah, a7, N, O, ab, D, ag, af, F, G, b, j, ae, M, P, ao, q, o, ac, R, S, a8, aq, n, a1, a3, ai, al, ak, am, ar, L, as, l, p, r, h, t, f, a9, T, c, $, y, a6, aa, u, an, d, at, a2, aj, e } from "./index-C_fjNX2P.mjs";
2
+ import { Q, m, U, A, k, ad, B, E, J, H, K, ap, X, W, _, Y, Z, a0, v, C, w, x, z, a4, a5, ah, a7, N, O, ab, D, ag, af, F, G, b, j, ae, M, P, ao, q, o, ac, R, S, a8, aq, n, a1, a3, ai, al, ak, am, ar, L, as, l, p, r, h, t, f, a9, T, c, $, y, a6, aa, u, an, d, at, a2, aj, e } from "./index-jd2U4xWv.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -2746,21 +2746,12 @@ var __publicField = (obj, key, value) => {
2746
2746
  ref: uploaderRef,
2747
2747
  popup: true,
2748
2748
  coreProps: {
2749
- // 上传限制,参考 https://uppy.io/docs/uppy/#restrictions
2750
- restrictions: {
2751
- allowedFileTypes: [
2752
- "image/png",
2753
- "image/jpeg",
2754
- "image/gif",
2755
- "image/webp",
2756
- "image/svg+xml",
2757
- "video/mp4",
2758
- "video/webm",
2759
- "application/pdf"
2760
- ],
2761
- maxNumberOfFiles: void 0
2762
- // default is unlimited
2763
- }
2749
+ // 不做代码限制,默认使用 Media Kit 配置
2750
+ // // 上传限制,参考 https://uppy.io/docs/uppy/#restrictions
2751
+ // restrictions: {
2752
+ // allowedFileExts: ['.png', '.jpg', '.jpeg', '.gif', '.webp', '.svg', '.mp4', '.webm', '.pdf'],
2753
+ // maxNumberOfFiles: undefined, // default is unlimited
2754
+ // },
2764
2755
  }
2765
2756
  },
2766
2757
  "uploader"
@@ -5398,43 +5389,6 @@ var __publicField = (obj, key, value) => {
5398
5389
  return result.data;
5399
5390
  }
5400
5391
  };
5401
- if (isAdmin && blockletExists("ai-assistant")) {
5402
- AI.fetchTemplateTags = async () => {
5403
- var _a3;
5404
- try {
5405
- const {
5406
- data: { tags }
5407
- } = await request.get(
5408
- joinUrl(window.location.origin, aiAssistantMountPoint, "/api/tags")
5409
- );
5410
- return tags;
5411
- } catch (e) {
5412
- (_a3 = e.markAsHandled) == null ? void 0 : _a3.call(e);
5413
- console.error(e);
5414
- return [];
5415
- }
5416
- };
5417
- AI.fetchTemplates = async (params = {}) => {
5418
- var _a3;
5419
- const { offset = 0, limit = 20, tag } = params;
5420
- try {
5421
- const {
5422
- data: { assistants }
5423
- } = await request.get(
5424
- joinUrl(
5425
- window.location.origin,
5426
- aiAssistantMountPoint,
5427
- `/api/assistants?offset=${offset}&limit=${limit}${tag ? `&tag=${tag}` : ""}`
5428
- )
5429
- );
5430
- return assistants;
5431
- } catch (e) {
5432
- (_a3 = e.markAsHandled) == null ? void 0 : _a3.call(e);
5433
- console.error(e);
5434
- return [];
5435
- }
5436
- };
5437
- }
5438
5392
  const templatePlugin = {
5439
5393
  fetchTemplateList: async ({ reload = false } = {}) => {
5440
5394
  var _a3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "1.6.233",
3
+ "version": "1.6.236",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -28,11 +28,11 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@arcblock/bridge": "^2.9.75",
32
- "@arcblock/ws": "^1.18.115",
33
- "@blocklet/editor": "1.6.233",
34
- "@blocklet/labels": "1.6.233",
35
- "@blocklet/uploader": "^0.0.78",
31
+ "@arcblock/bridge": "^2.9.77",
32
+ "@arcblock/ws": "^1.18.116",
33
+ "@blocklet/editor": "1.6.236",
34
+ "@blocklet/labels": "1.6.236",
35
+ "@blocklet/uploader": "^0.1.2",
36
36
  "@emotion/css": "^11.10.5",
37
37
  "@emotion/react": "^11.10.5",
38
38
  "@emotion/styled": "^11.10.5",
@@ -95,5 +95,5 @@
95
95
  "resolutions": {
96
96
  "react": "^18.2.0"
97
97
  },
98
- "gitHead": "f402f1a003e98d6db8526534c95e724d5f3dfdb2"
98
+ "gitHead": "f3efd9c52ddb748b932ce475cc17e444c03a8a57"
99
99
  }