@uniformdev/canvas-react 20.75.1-alpha.16 → 20.75.1-alpha.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/index.esm.js CHANGED
@@ -781,34 +781,18 @@ var LinebreakRichTextNode = () => {
781
781
  };
782
782
 
783
783
  // src/components/UniformRichText/nodes/ListItemRichTextNode.tsx
784
- import { getRichTextListItemValue } from "@uniformdev/richtext";
785
784
  import React13 from "react";
786
785
  var ListItemRichTextNode = ({ children, node }) => {
787
786
  const { value } = node;
788
- const normalizedValue = getRichTextListItemValue(value);
789
- return /* @__PURE__ */ React13.createElement(
790
- "li",
791
- {
792
- value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
793
- },
794
- children
795
- );
787
+ return /* @__PURE__ */ React13.createElement("li", { value: Number.isFinite(value) && value > 0 ? value : void 0 }, children);
796
788
  };
797
789
 
798
790
  // src/components/UniformRichText/nodes/ListRichTextNode.tsx
799
- import { getRichTextListStart } from "@uniformdev/richtext";
800
791
  import React14 from "react";
801
792
  var ListRichTextNode = ({ children, node }) => {
802
793
  const { tag, start } = node;
803
794
  const ListTag = tag != null ? tag : "ul";
804
- const normalizedStart = getRichTextListStart(start);
805
- return /* @__PURE__ */ React14.createElement(
806
- ListTag,
807
- {
808
- start: typeof normalizedStart === "number" && Number.isFinite(normalizedStart) && normalizedStart > 0 ? normalizedStart : void 0
809
- },
810
- children
811
- );
795
+ return /* @__PURE__ */ React14.createElement(ListTag, { start: Number.isFinite(start) && start > 0 ? start : void 0 }, children);
812
796
  };
813
797
 
814
798
  // src/components/UniformRichText/nodes/ParagraphRichTextNode.tsx
package/dist/index.js CHANGED
@@ -759,11 +759,11 @@ var LinkRichTextNode = ({ children, node }) => {
759
759
 
760
760
  // src/components/UniformRichText/UniformRichText.tsx
761
761
  var import_canvas11 = require("@uniformdev/canvas");
762
- var import_richtext8 = require("@uniformdev/richtext");
762
+ var import_richtext6 = require("@uniformdev/richtext");
763
763
  var import_react22 = __toESM(require("react"));
764
764
 
765
765
  // src/components/UniformRichText/UniformRichTextNode.tsx
766
- var import_richtext7 = require("@uniformdev/richtext");
766
+ var import_richtext5 = require("@uniformdev/richtext");
767
767
  var import_react21 = __toESM(require("react"));
768
768
 
769
769
  // src/components/UniformRichText/nodes/AssetRichTextNode.tsx
@@ -801,57 +801,41 @@ var LinebreakRichTextNode = () => {
801
801
  };
802
802
 
803
803
  // src/components/UniformRichText/nodes/ListItemRichTextNode.tsx
804
- var import_richtext2 = require("@uniformdev/richtext");
805
804
  var import_react15 = __toESM(require("react"));
806
805
  var ListItemRichTextNode = ({ children, node }) => {
807
806
  const { value } = node;
808
- const normalizedValue = (0, import_richtext2.getRichTextListItemValue)(value);
809
- return /* @__PURE__ */ import_react15.default.createElement(
810
- "li",
811
- {
812
- value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
813
- },
814
- children
815
- );
807
+ return /* @__PURE__ */ import_react15.default.createElement("li", { value: Number.isFinite(value) && value > 0 ? value : void 0 }, children);
816
808
  };
817
809
 
818
810
  // src/components/UniformRichText/nodes/ListRichTextNode.tsx
819
- var import_richtext3 = require("@uniformdev/richtext");
820
811
  var import_react16 = __toESM(require("react"));
821
812
  var ListRichTextNode = ({ children, node }) => {
822
813
  const { tag, start } = node;
823
814
  const ListTag = tag != null ? tag : "ul";
824
- const normalizedStart = (0, import_richtext3.getRichTextListStart)(start);
825
- return /* @__PURE__ */ import_react16.default.createElement(
826
- ListTag,
827
- {
828
- start: typeof normalizedStart === "number" && Number.isFinite(normalizedStart) && normalizedStart > 0 ? normalizedStart : void 0
829
- },
830
- children
831
- );
815
+ return /* @__PURE__ */ import_react16.default.createElement(ListTag, { start: Number.isFinite(start) && start > 0 ? start : void 0 }, children);
832
816
  };
833
817
 
834
818
  // src/components/UniformRichText/nodes/ParagraphRichTextNode.tsx
835
- var import_richtext4 = require("@uniformdev/richtext");
819
+ var import_richtext2 = require("@uniformdev/richtext");
836
820
  var import_react17 = __toESM(require("react"));
837
821
  var ParagraphRichTextNode = ({ children, node }) => {
838
822
  const { format, direction } = node;
839
823
  return /* @__PURE__ */ import_react17.default.createElement(
840
824
  "p",
841
825
  {
842
- dir: (0, import_richtext4.isPureDirection)(direction) ? direction : void 0,
843
- style: (0, import_richtext4.isPureTextAlign)(format) ? { textAlign: format } : void 0
826
+ dir: (0, import_richtext2.isPureDirection)(direction) ? direction : void 0,
827
+ style: (0, import_richtext2.isPureTextAlign)(format) ? { textAlign: format } : void 0
844
828
  },
845
829
  children
846
830
  );
847
831
  };
848
832
 
849
833
  // src/components/UniformRichText/nodes/TableCellRichTextNode.tsx
850
- var import_richtext5 = require("@uniformdev/richtext");
834
+ var import_richtext3 = require("@uniformdev/richtext");
851
835
  var import_react18 = __toESM(require("react"));
852
836
  var TableCellRichTextNode = ({ children, node }) => {
853
837
  const { headerState } = node;
854
- const TableCellTag = (0, import_richtext5.getRichTextTagFromTableCellHeaderState)(headerState);
838
+ const TableCellTag = (0, import_richtext3.getRichTextTagFromTableCellHeaderState)(headerState);
855
839
  return /* @__PURE__ */ import_react18.default.createElement(TableCellTag, null, children);
856
840
  };
857
841
 
@@ -862,18 +846,18 @@ var TabRichTextNode = () => {
862
846
  };
863
847
 
864
848
  // src/components/UniformRichText/nodes/TextRichTextNode.tsx
865
- var import_richtext6 = require("@uniformdev/richtext");
849
+ var import_richtext4 = require("@uniformdev/richtext");
866
850
  var import_react20 = __toESM(require("react"));
867
851
  var TextRichTextNode = ({ node }) => {
868
852
  const { text, format } = node;
869
- const tags = (0, import_richtext6.getRichTextTagsFromTextFormat)(format);
853
+ const tags = (0, import_richtext4.getRichTextTagsFromTextFormat)(format);
870
854
  return /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ import_react20.default.createElement(Tag, null, children), text) : text);
871
855
  };
872
856
 
873
857
  // src/components/UniformRichText/UniformRichTextNode.tsx
874
858
  function UniformRichTextNode({ node, ...props }) {
875
859
  var _a;
876
- if (!(0, import_richtext7.isRichTextNode)(node)) return null;
860
+ if (!(0, import_richtext5.isRichTextNode)(node)) return null;
877
861
  let NodeRenderer = (_a = props.resolveRichTextRenderer) == null ? void 0 : _a.call(props, node);
878
862
  if (typeof NodeRenderer === "undefined") {
879
863
  NodeRenderer = resolveRichTextDefaultRenderer(node);
@@ -923,10 +907,10 @@ var UniformRichText = import_react22.default.forwardRef(function UniformRichText
923
907
  const placeholderProp = placeholder != null ? placeholder : contextualEditingDefaultPlaceholder;
924
908
  const computedPlaceholder = typeof placeholderProp === "function" ? placeholderProp({ id: parameterId }) : placeholderProp;
925
909
  const value = parameter.value;
926
- if (!value || !(0, import_richtext8.isRichTextValue)(value)) return null;
927
- if (!isContextualEditing && (0, import_richtext8.isRichTextValueConsideredEmpty)(value)) return null;
910
+ if (!value || !(0, import_richtext6.isRichTextValue)(value)) return null;
911
+ if (!isContextualEditing && (0, import_richtext6.isRichTextValueConsideredEmpty)(value)) return null;
928
912
  if (!Tag) {
929
- return isContextualEditing && (0, import_richtext8.isRichTextValueConsideredEmpty)(value) ? /* @__PURE__ */ import_react22.default.createElement(
913
+ return isContextualEditing && (0, import_richtext6.isRichTextValueConsideredEmpty)(value) ? /* @__PURE__ */ import_react22.default.createElement(
930
914
  "p",
931
915
  {
932
916
  ...{
@@ -949,7 +933,7 @@ var UniformRichText = import_react22.default.forwardRef(function UniformRichText
949
933
  [import_canvas11.ATTRIBUTE_PARAMETER_TYPE]: "richText"
950
934
  } : {}
951
935
  },
952
- (0, import_richtext8.isRichTextValueConsideredEmpty)(value) ? /* @__PURE__ */ import_react22.default.createElement("p", null, /* @__PURE__ */ import_react22.default.createElement("i", null, computedPlaceholder)) : /* @__PURE__ */ import_react22.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
936
+ (0, import_richtext6.isRichTextValueConsideredEmpty)(value) ? /* @__PURE__ */ import_react22.default.createElement("p", null, /* @__PURE__ */ import_react22.default.createElement("i", null, computedPlaceholder)) : /* @__PURE__ */ import_react22.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
953
937
  );
954
938
  });
955
939
 
package/dist/index.mjs CHANGED
@@ -781,34 +781,18 @@ var LinebreakRichTextNode = () => {
781
781
  };
782
782
 
783
783
  // src/components/UniformRichText/nodes/ListItemRichTextNode.tsx
784
- import { getRichTextListItemValue } from "@uniformdev/richtext";
785
784
  import React13 from "react";
786
785
  var ListItemRichTextNode = ({ children, node }) => {
787
786
  const { value } = node;
788
- const normalizedValue = getRichTextListItemValue(value);
789
- return /* @__PURE__ */ React13.createElement(
790
- "li",
791
- {
792
- value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
793
- },
794
- children
795
- );
787
+ return /* @__PURE__ */ React13.createElement("li", { value: Number.isFinite(value) && value > 0 ? value : void 0 }, children);
796
788
  };
797
789
 
798
790
  // src/components/UniformRichText/nodes/ListRichTextNode.tsx
799
- import { getRichTextListStart } from "@uniformdev/richtext";
800
791
  import React14 from "react";
801
792
  var ListRichTextNode = ({ children, node }) => {
802
793
  const { tag, start } = node;
803
794
  const ListTag = tag != null ? tag : "ul";
804
- const normalizedStart = getRichTextListStart(start);
805
- return /* @__PURE__ */ React14.createElement(
806
- ListTag,
807
- {
808
- start: typeof normalizedStart === "number" && Number.isFinite(normalizedStart) && normalizedStart > 0 ? normalizedStart : void 0
809
- },
810
- children
811
- );
795
+ return /* @__PURE__ */ React14.createElement(ListTag, { start: Number.isFinite(start) && start > 0 ? start : void 0 }, children);
812
796
  };
813
797
 
814
798
  // src/components/UniformRichText/nodes/ParagraphRichTextNode.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-react",
3
- "version": "20.75.1-alpha.16+4e56d1cd21",
3
+ "version": "20.75.1-alpha.3+8eaaa5230a",
4
4
  "description": "React SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -44,10 +44,10 @@
44
44
  "apidocs-extract": "api-extractor run --local"
45
45
  },
46
46
  "dependencies": {
47
- "@uniformdev/canvas": "20.75.1-alpha.16+4e56d1cd21",
48
- "@uniformdev/context": "20.75.1-alpha.16+4e56d1cd21",
49
- "@uniformdev/context-react": "20.75.1-alpha.16+4e56d1cd21",
50
- "@uniformdev/richtext": "20.75.1-alpha.16+4e56d1cd21"
47
+ "@uniformdev/canvas": "20.75.1-alpha.3+8eaaa5230a",
48
+ "@uniformdev/context": "20.75.1-alpha.3+8eaaa5230a",
49
+ "@uniformdev/context-react": "20.75.1-alpha.3+8eaaa5230a",
50
+ "@uniformdev/richtext": "20.75.1-alpha.3+8eaaa5230a"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "immer": ">= 10",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "4e56d1cd21f2d4a02b13d733e51fb71441cac298"
69
+ "gitHead": "8eaaa5230a5621f7b30b1b54b48dcd097f684af9"
70
70
  }