useblocks 1.1.72 → 1.1.84

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +461 -0
  2. package/README.md +55 -6
  3. package/iframe/css/sandbox-dark.css +1 -1
  4. package/iframe/css/sandbox-darktheme.css +3 -3
  5. package/iframe/css/sandbox-light.css +1 -1
  6. package/iframe/css/sandbox.css +2 -2
  7. package/iframe/js/amp.D1dkO3ub.js +1 -0
  8. package/iframe/js/iframe-eblock.js +1 -1
  9. package/iframe/js/iframe.js +1 -1
  10. package/iframe/js/rules.4N5s3OV-.js +1 -1
  11. package/package.json +30 -9
  12. package/static/core/{842c8d41.js → 16c7408a.js} +4 -4
  13. package/static/core/{dd94baa62.js → 278c19282.js} +1208 -1127
  14. package/static/core/27b7d154.js +1098 -0
  15. package/static/core/{585259872.js → 7877b5712.js} +41 -41
  16. package/static/core/{ffc83e02.js → 86acf537.js} +7 -7
  17. package/static/core/{e02024fb2.js → 95074b4e2.js} +58 -58
  18. package/static/core/{ce9be2ec2.js → 9a1229572.js} +2155 -2090
  19. package/static/core/{b7c107e3.js → ab3c035c.js} +15 -15
  20. package/static/core/{d082c64e2.js → b8fa83f82.js} +2490 -2229
  21. package/static/core/{bfab4558.js → bb8665a8.js} +3551 -3153
  22. package/static/core/{513594a8.js → c013e7cc.js} +72 -72
  23. package/static/core/{efbe495c.js → c871702e.js} +2403 -2548
  24. package/static/core/cf26b064.js +3280 -0
  25. package/static/core/{d645302e.js → d15a988b.js} +272 -248
  26. package/static/core/{24c3f399.js → d4962564.js} +3 -3
  27. package/static/core/dc948de7.js +2134 -0
  28. package/static/core/{5e082e16.js → e9b6fbb9.js} +48 -48
  29. package/static/core/{d19e8c6f.js → ec6e74e5.js} +22978 -19773
  30. package/static/umd-runtime/{n8zqoGYh.js → D80ABE1O.js} +7 -1
  31. package/static/umd-runtime/runtime.js +2 -2
  32. package/static/umd-runtime/ui-kit.js +1704 -1628
  33. package/ui-kit/index.js +1390 -1310
  34. package/{useblocks-core.8837a348.js → useblocks-core.2fa005e8.js} +6 -6
  35. package/useblocks-esm.js +4 -4
  36. package/{useblocks-po.8837a348.js → useblocks-po.2fa005e8.js} +1 -1
  37. package/useblocks.d.ts +55 -24
  38. package/useblocks.js +3 -3
  39. package/favicon-b.ico +0 -0
  40. package/favicon.ico +0 -0
  41. package/fonts/SegoeUI-Bold.woff2 +0 -0
  42. package/fonts/SegoeUI-Semibold.woff2 +0 -0
  43. package/fonts/SegoeUI.woff2 +0 -0
  44. package/iframe/js/amp.DllX-Im0.js +0 -1
  45. package/js/amplitude.min.js +0 -10859
  46. package/js/sourcebuster.min.js +0 -672
  47. package/manifest.json +0 -17
  48. package/npm-publish.manifest.json +0 -51
  49. package/static/core/241f0387.js +0 -3189
  50. package/static/core/45b5e246.js +0 -925
  51. package/static/core/9bcb736c.js +0 -2122
  52. package/static/media/image-editor/images/samples/large_sample.jpg +0 -0
  53. package/static/media/image-editor/images/samples/sample1.jpg +0 -0
  54. package/static/media/image-editor/images/samples/sample1_thumbnail.jpg +0 -0
  55. package/static/media/image-editor/images/samples/sample2.jpg +0 -0
  56. package/static/media/image-editor/images/samples/sample2_thumbnail.jpg +0 -0
  57. package/static/media/image-editor/images/samples/sample3.jpg +0 -0
  58. package/static/media/image-editor/images/samples/sample3_thumbnail.jpg +0 -0
  59. package/static/media/image-editor/images/samples/sample4.json +0 -871
  60. package/static/media/image-editor/images/samples/sample4_preview.jpg +0 -0
  61. package/test-font.otf +0 -0
  62. package/test-font.ttf +0 -0
  63. package/test-font.woff2 +0 -0
  64. package/tsconfig.json +0 -14
  65. package/two_step_headless_plugin.html +0 -558
  66. /package/iframe/{iframe-eblock.8837a348.html → iframe-eblock.2fa005e8.html} +0 -0
  67. /package/iframe/{iframe.8837a348.html → iframe.2fa005e8.html} +0 -0
@@ -1,16 +1,16 @@
1
- __useblocks__.define("static/core/e02024fb2.js", [
1
+ __useblocks__.define("static/core/95074b4e2.js", [
2
2
  "require",
3
3
  "exports",
4
4
  "module",
5
5
  "static/core/df237243.js",
6
- "static/core/ce9be2ec2.js",
6
+ "static/core/9a1229572.js",
7
7
  "static/core/92871f5a2.js",
8
8
  "react",
9
9
  "antd",
10
10
  "react/jsx-runtime",
11
11
  "@ant-design/icons"
12
- ], function(U, N, Ye) {
13
- const te = U("./df237243.js"), G = U("./ce9be2ec2.js"), me = U("./92871f5a2.js");
12
+ ], function(U, O, Ge) {
13
+ const te = U("./df237243.js"), X = U("./9a1229572.js"), me = U("./92871f5a2.js");
14
14
  let s = U("react"), T = te.__toESM(s, 1);
15
15
  s = te.__toESM(s);
16
16
  let z = U("antd"), t = U("react/jsx-runtime"), c = U("@ant-design/icons");
@@ -377,7 +377,7 @@ __useblocks__.define("static/core/e02024fb2.js", [
377
377
  ...e
378
378
  })
379
379
  }, ne = () => {
380
- let { options: e } = G.V(), { customIcons: n } = e, r = s.default.useCallback((o, h, l) => {
380
+ let { options: e } = X.B(), { customIcons: n } = e, r = s.default.useCallback((o, h, l) => {
381
381
  let i = n?.[o];
382
382
  return i ? s.default.createElement(i, l) : s.default.createElement(h, l);
383
383
  }, [n]);
@@ -413,7 +413,7 @@ __useblocks__.define("static/core/e02024fb2.js", [
413
413
  ThumbsUpIcon: (o) => r("thumbsUp", oe, o),
414
414
  getCustomIcon: r
415
415
  }), [r]);
416
- }, X = {
416
+ }, Y = {
417
417
  "em-filemanager": "em-filemanager",
418
418
  emFilemanager: "em-filemanager",
419
419
  noFilesContainer: "noFilesContainer",
@@ -421,21 +421,21 @@ __useblocks__.define("static/core/e02024fb2.js", [
421
421
  noFilesTitle: "noFilesTitle",
422
422
  noFilesDescription: "noFilesDescription"
423
423
  }, Ve = () => {
424
- let { t: e } = G.Nn(), { NoFilesIcon: n } = ne();
424
+ let { t: e } = X.zn(), { NoFilesIcon: n } = ne();
425
425
  return (0, t.jsxs)("div", {
426
- className: X.noFilesContainer,
426
+ className: Y.noFilesContainer,
427
427
  children: [
428
428
  (0, t.jsx)(n, {
429
- className: X.noFilesImage,
429
+ className: Y.noFilesImage,
430
430
  size: 48,
431
431
  strokeWidth: 1.4
432
432
  }),
433
433
  (0, t.jsx)("h2", {
434
- className: X.noFilesTitle,
434
+ className: Y.noFilesTitle,
435
435
  children: e("There's nothing here")
436
436
  }),
437
437
  (0, t.jsx)("div", {
438
- className: X.noFilesDescription,
438
+ className: Y.noFilesDescription,
439
439
  children: e("Try using a different search query.")
440
440
  })
441
441
  ]
@@ -528,7 +528,7 @@ __useblocks__.define("static/core/e02024fb2.js", [
528
528
  folderMenu: "folderMenu",
529
529
  folderIcon: "folderIcon"
530
530
  }, Be = ({ selectedFolder: e, onSelect: n, onExpand: r, generateMenuItems: o, fetchChildFolders: h, disabledFolders: l = [], showFileCounts: i = !1, folderFileCounts: v = {}, className: f = "", expandedKeys: d, setExpandedKeys: W, showTrashFolder: j = !1, mode: w = "navigation", defaultExpandAll: I = !1 }) => {
531
- let { t: m } = G.Nn(), { options: b } = G.V(), { config: S } = b, { ExpandArrowIcon: D, CollapseArrowIcon: B, CollapseFolderIcon: V, ExpandFolderIcon: H, EmptyFolderIcon: _ } = ne(), F = (0, s.useCallback)((x) => {
531
+ let { t: m } = X.zn(), { options: b } = X.B(), { config: S } = b, { ExpandArrowIcon: D, CollapseArrowIcon: B, CollapseFolderIcon: V, ExpandFolderIcon: H, EmptyFolderIcon: _ } = ne(), F = (0, s.useCallback)((x) => {
532
532
  let M = [], g = (E) => {
533
533
  E.forEach((A) => {
534
534
  M.push(A.key), A.children && g(A.children);
@@ -541,7 +541,7 @@ __useblocks__.define("static/core/e02024fb2.js", [
541
541
  return F(x);
542
542
  }
543
543
  return [];
544
- }), u = d === void 0 ? R : d, O = W === void 0 ? p : W;
544
+ }), u = d === void 0 ? R : d, N = W === void 0 ? p : W;
545
545
  (0, s.useEffect)(() => {
546
546
  if (I || w === "selection" && I) {
547
547
  let x = o(), M = F(x);
@@ -558,7 +558,7 @@ __useblocks__.define("static/core/e02024fb2.js", [
558
558
  let M = x[0];
559
559
  !M || M === "empty" || M.endsWith("_input") || n?.(x);
560
560
  }, [n]), k = (0, s.useCallback)(async (x, M) => {
561
- if (O(x), r?.(x, M), S?.folderTreeLoading !== "lazy") return;
561
+ if (N(x), r?.(x, M), S?.folderTreeLoading !== "lazy") return;
562
562
  let g = M?.node?.key || void 0;
563
563
  if (!(!g || g === "folders")) try {
564
564
  await h?.(g);
@@ -567,7 +567,7 @@ __useblocks__.define("static/core/e02024fb2.js", [
567
567
  S?.folderTreeLoading,
568
568
  h,
569
569
  r,
570
- O
570
+ N
571
571
  ]), y = (0, s.useCallback)(() => {
572
572
  let x = o(), M = (a) => a.filter((Z) => Z.key !== "Trash").map((Z) => ({
573
573
  ...Z,
@@ -577,18 +577,18 @@ __useblocks__.define("static/core/e02024fb2.js", [
577
577
  C([a]);
578
578
  return;
579
579
  }
580
- u.includes(a) && e === a ? O(u.filter((Z) => Z !== a)) : u.includes(a) || O([...u, a]), C([a]);
581
- }, A = g.length === 0 || g.length === 1 && (!g[0].children || g[0].children.length === 0), q = (a) => {
582
- let Z = i ? v[a.key] : void 0, Y = i && Z === null ? null : i ? Z ?? 0 : 0, Re = u.includes(a.key), ee = l.includes(a.key), Ue = a.children?.length ? (0, t.jsx)(Re ? V : H, {
580
+ u.includes(a) && e === a ? N(u.filter((Z) => Z !== a)) : u.includes(a) || N([...u, a]), C([a]);
581
+ }, A = g.length === 0 || g.length === 1 && (!g[0].children || g[0].children.length === 0), K = (a) => {
582
+ let Z = i ? v[a.key] : void 0, G = i && Z === null ? null : i ? Z ?? 0 : 0, Re = u.includes(a.key), ee = l.includes(a.key), Ue = a.children?.length ? (0, t.jsx)(Re ? V : H, {
583
583
  size: 20,
584
584
  strokeWidth: S?.iconStrokeWidth
585
585
  }) : (0, t.jsx)(_, {
586
586
  size: 20,
587
587
  strokeWidth: S?.iconStrokeWidth
588
- }), qe = (0, t.jsxs)("div", {
588
+ }), Ke = (0, t.jsxs)("div", {
589
589
  className: `${P.folderItemContainer} folder-item-container`,
590
- onClick: (Ke) => {
591
- Ke.stopPropagation(), ee || E(a.key);
590
+ onClick: (qe) => {
591
+ qe.stopPropagation(), ee || E(a.key);
592
592
  },
593
593
  style: {
594
594
  opacity: ee ? .5 : 1,
@@ -602,14 +602,14 @@ __useblocks__.define("static/core/e02024fb2.js", [
602
602
  })]
603
603
  }), i && (0, t.jsx)("div", {
604
604
  className: P.fileCount,
605
- title: Y === null ? void 0 : `${Y} ${m(Y === 1 ? "item" : "items")}`,
606
- children: Y === null ? "—" : Y
605
+ title: G === null ? void 0 : `${G} ${m(G === 1 ? "item" : "items")}`,
606
+ children: G === null ? "—" : G
607
607
  })]
608
608
  });
609
609
  return {
610
610
  key: a.key,
611
- title: qe,
612
- children: a.children?.map(q),
611
+ title: Ke,
612
+ children: a.children?.map(K),
613
613
  disabled: ee
614
614
  };
615
615
  }, le = u.includes("folders"), $ = (0, t.jsx)("div", {
@@ -667,11 +667,11 @@ __useblocks__.define("static/core/e02024fb2.js", [
667
667
  let a = [{
668
668
  key: "folders",
669
669
  title: $,
670
- children: g[0].children?.map(q)
670
+ children: g[0].children?.map(K)
671
671
  }];
672
672
  return j && a.push(Q()), a;
673
673
  }
674
- return g.map(q);
674
+ return g.map(K);
675
675
  }, [
676
676
  o,
677
677
  u,
@@ -687,7 +687,7 @@ __useblocks__.define("static/core/e02024fb2.js", [
687
687
  l,
688
688
  j,
689
689
  w,
690
- O
690
+ N
691
691
  ]), J = (0, s.useMemo)(() => y(), [y]);
692
692
  return (0, t.jsx)(z.Tree, {
693
693
  className: `${P.folderTree} ${P.folderMenu} ${f}`,
@@ -700,7 +700,7 @@ __useblocks__.define("static/core/e02024fb2.js", [
700
700
  showLine: !1,
701
701
  focusable: w !== "selection"
702
702
  });
703
- }, K = {
703
+ }, q = {
704
704
  "em-filemanager": "em-filemanager",
705
705
  emFilemanager: "em-filemanager",
706
706
  formFooter: "formFooter",
@@ -737,14 +737,14 @@ __useblocks__.define("static/core/e02024fb2.js", [
737
737
  title: "Clean",
738
738
  children: (0, t.jsx)(z.Button, {
739
739
  icon: (0, t.jsx)(c.CloseOutlined, { style: { fontSize: 10 } }),
740
- className: K.inputButtonClose,
740
+ className: q.inputButtonClose,
741
741
  type: "text",
742
742
  onClick: () => {
743
743
  o.setFieldsValue({ folderName: "" });
744
744
  }
745
745
  })
746
746
  }), (0, t.jsx)(z.Button, {
747
- className: K.inputButtonOk,
747
+ className: q.inputButtonOk,
748
748
  type: "text",
749
749
  onClick: () => {
750
750
  i(!0), h(o).then((f) => {
@@ -791,8 +791,8 @@ __useblocks__.define("static/core/e02024fb2.js", [
791
791
  setActiveFormField: v,
792
792
  generateMenuItemsFromFolders: s.default.useCallback((W) => {
793
793
  let { targetForm: j, onTreeSelect: w, onComplete: I, actionButtonText: m } = W, b = f(j, I), S = Array.isArray(e) ? e : [], D = (F = null, R = new Set()) => S.filter((p) => {
794
- let u = F === null && !p.parentId, O = p.parentId === F;
795
- return u || O;
794
+ let u = F === null && !p.parentId, N = p.parentId === F;
795
+ return u || N;
796
796
  }).map((p) => {
797
797
  if (R.has(p.id)) return {
798
798
  key: p.id,
@@ -800,7 +800,7 @@ __useblocks__.define("static/core/e02024fb2.js", [
800
800
  };
801
801
  let u = new Set(R);
802
802
  u.add(p.id);
803
- let O = D(p.id, u), { handleAddFolder: C, handleSelectFolder: k } = d({
803
+ let N = D(p.id, u), { handleAddFolder: C, handleSelectFolder: k } = d({
804
804
  folderId: p.id,
805
805
  targetForm: j,
806
806
  onTreeSelect: w,
@@ -809,11 +809,11 @@ __useblocks__.define("static/core/e02024fb2.js", [
809
809
  key: `${p.id}_input`,
810
810
  label: b(p.id),
811
811
  icon: null
812
- }, ...O] : O;
812
+ }, ...N] : N;
813
813
  return {
814
814
  key: p.id,
815
815
  label: (0, t.jsxs)(t.Fragment, { children: [p.name, n !== p.id && (0, t.jsxs)("div", {
816
- className: `${K.folderToolsField} folder-tools-field`,
816
+ className: `${q.folderToolsField} folder-tools-field`,
817
817
  children: [(0, t.jsx)(z.Button, {
818
818
  onClick: C,
819
819
  children: "+"
@@ -837,7 +837,7 @@ __useblocks__.define("static/core/e02024fb2.js", [
837
837
  return [{
838
838
  key: "folders",
839
839
  label: (0, t.jsxs)(t.Fragment, { children: [l("Folders"), n !== "folders" && n !== null && (0, t.jsxs)("div", {
840
- className: `${K.folderToolsField} folder-tools-field`,
840
+ className: `${q.folderToolsField} folder-tools-field`,
841
841
  children: [(0, t.jsx)(z.Button, {
842
842
  onClick: V,
843
843
  children: "+"
@@ -889,8 +889,8 @@ __useblocks__.define("static/core/e02024fb2.js", [
889
889
  }
890
890
  };
891
891
  }
892
- var Ne = 240, Oe = 240, Ze = 20, Ae = 800, ze = 1200, _e = 40, ie = 1200, $e = 800;
893
- function De({ items: e, getId: n, getPreviewSrc: r, getAltText: o, getWidth: h, getHeight: l, layoutMode: i = "masonry", minColumnWidth: v = Ne, estimatedItemHeight: f = Oe, gap: d = Ze, overscanPx: W = Ae, prefetchThresholdPx: j = ze, resolveColumnCount: w, virtualizationThreshold: I = _e }) {
892
+ var Oe = 240, Ne = 240, Ze = 20, Ae = 800, ze = 1200, _e = 40, ie = 1200, $e = 800;
893
+ function De({ items: e, getId: n, getPreviewSrc: r, getAltText: o, getWidth: h, getHeight: l, layoutMode: i = "masonry", minColumnWidth: v = Oe, estimatedItemHeight: f = Ne, gap: d = Ze, overscanPx: W = Ae, prefetchThresholdPx: j = ze, resolveColumnCount: w, virtualizationThreshold: I = _e }) {
894
894
  let [m, b] = (0, s.useState)({
895
895
  scrollTop: 0,
896
896
  viewportHeight: $e,
@@ -939,14 +939,14 @@ __useblocks__.define("static/core/e02024fb2.js", [
939
939
  }
940
940
  let A = 0;
941
941
  for (let $ = 1; $ < C.length; $ += 1) C[$] < C[A] && (A = $);
942
- let q = C[A], le = A * (V + d);
943
- C[A] = q + E + d, k.push({
942
+ let K = C[A], le = A * (V + d);
943
+ C[A] = K + E + d, k.push({
944
944
  index: y,
945
- top: q,
945
+ top: K,
946
946
  left: le,
947
947
  width: V,
948
948
  height: E,
949
- bottom: q + E
949
+ bottom: K + E
950
950
  });
951
951
  }
952
952
  return {
@@ -996,74 +996,74 @@ __useblocks__.define("static/core/e02024fb2.js", [
996
996
  height: f,
997
997
  bottom: f
998
998
  }
999
- })), u = F.containerHeight ?? H.containerHeight, O = u > 0 && m.scrollTop + m.viewportHeight >= u - j;
999
+ })), u = F.containerHeight ?? H.containerHeight, N = u > 0 && m.scrollTop + m.viewportHeight >= u - j;
1000
1000
  return {
1001
1001
  rowModels: _,
1002
1002
  renderRows: F.rows,
1003
1003
  renderWindow: F,
1004
1004
  positionedItems: p,
1005
1005
  containerHeight: u,
1006
- isNearEnd: O,
1006
+ isNearEnd: N,
1007
1007
  viewportMetrics: m,
1008
1008
  handleViewportChange: R
1009
1009
  };
1010
1010
  }
1011
- Object.defineProperty(N, "J", {
1011
+ Object.defineProperty(O, "J", {
1012
1012
  enumerable: !0,
1013
1013
  get: function() {
1014
1014
  return Ve;
1015
1015
  }
1016
- }), Object.defineProperty(N, "K", {
1016
+ }), Object.defineProperty(O, "K", {
1017
1017
  enumerable: !0,
1018
1018
  get: function() {
1019
1019
  return ne;
1020
1020
  }
1021
- }), Object.defineProperty(N, "Q", {
1021
+ }), Object.defineProperty(O, "Q", {
1022
1022
  enumerable: !0,
1023
1023
  get: function() {
1024
- return K;
1024
+ return q;
1025
1025
  }
1026
- }), Object.defineProperty(N, "X", {
1026
+ }), Object.defineProperty(O, "X", {
1027
1027
  enumerable: !0,
1028
1028
  get: function() {
1029
1029
  return ue;
1030
1030
  }
1031
- }), Object.defineProperty(N, "a", {
1031
+ }), Object.defineProperty(O, "a", {
1032
1032
  enumerable: !0,
1033
1033
  get: function() {
1034
1034
  return ce;
1035
1035
  }
1036
- }), Object.defineProperty(N, "a$1", {
1036
+ }), Object.defineProperty(O, "a$1", {
1037
1037
  enumerable: !0,
1038
1038
  get: function() {
1039
1039
  return ae;
1040
1040
  }
1041
- }), Object.defineProperty(N, "ge", {
1041
+ }), Object.defineProperty(O, "ge", {
1042
1042
  enumerable: !0,
1043
1043
  get: function() {
1044
1044
  return De;
1045
1045
  }
1046
- }), Object.defineProperty(N, "i", {
1046
+ }), Object.defineProperty(O, "i", {
1047
1047
  enumerable: !0,
1048
1048
  get: function() {
1049
1049
  return he;
1050
1050
  }
1051
- }), Object.defineProperty(N, "ie", {
1051
+ }), Object.defineProperty(O, "ie", {
1052
1052
  enumerable: !0,
1053
1053
  get: function() {
1054
1054
  return Be;
1055
1055
  }
1056
- }), Object.defineProperty(N, "oe", {
1056
+ }), Object.defineProperty(O, "oe", {
1057
1057
  enumerable: !0,
1058
1058
  get: function() {
1059
1059
  return We;
1060
1060
  }
1061
- }), Object.defineProperty(N, "s", {
1061
+ }), Object.defineProperty(O, "s", {
1062
1062
  enumerable: !0,
1063
1063
  get: function() {
1064
1064
  return re;
1065
1065
  }
1066
- }), Object.defineProperty(N, "s$1", {
1066
+ }), Object.defineProperty(O, "s$1", {
1067
1067
  enumerable: !0,
1068
1068
  get: function() {
1069
1069
  return oe;