@uniformdev/canvas-react 19.177.2-alpha.10 → 19.177.2-alpha.18

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.mts CHANGED
@@ -171,6 +171,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
171
171
  isPatternParameter?: boolean | undefined;
172
172
  ignorePatternParameterDefault?: boolean | undefined;
173
173
  optionalPatternParameter?: boolean | undefined;
174
+ dataSourceVariant?: "unpublished" | undefined;
174
175
  variables?: {
175
176
  [key: string]: string;
176
177
  } | undefined;
@@ -182,6 +183,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
182
183
  isPatternParameter?: boolean | undefined;
183
184
  ignorePatternParameterDefault?: boolean | undefined;
184
185
  optionalPatternParameter?: boolean | undefined;
186
+ dataSourceVariant?: "unpublished" | undefined;
185
187
  variables?: {
186
188
  [key: string]: string;
187
189
  } | undefined;
@@ -236,6 +238,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
236
238
  isPatternParameter?: boolean | undefined;
237
239
  ignorePatternParameterDefault?: boolean | undefined;
238
240
  optionalPatternParameter?: boolean | undefined;
241
+ dataSourceVariant?: "unpublished" | undefined;
239
242
  variables?: {
240
243
  [key: string]: string;
241
244
  } | undefined;
@@ -247,6 +250,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
247
250
  isPatternParameter?: boolean | undefined;
248
251
  ignorePatternParameterDefault?: boolean | undefined;
249
252
  optionalPatternParameter?: boolean | undefined;
253
+ dataSourceVariant?: "unpublished" | undefined;
250
254
  variables?: {
251
255
  [key: string]: string;
252
256
  } | undefined;
package/dist/index.d.ts CHANGED
@@ -171,6 +171,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
171
171
  isPatternParameter?: boolean | undefined;
172
172
  ignorePatternParameterDefault?: boolean | undefined;
173
173
  optionalPatternParameter?: boolean | undefined;
174
+ dataSourceVariant?: "unpublished" | undefined;
174
175
  variables?: {
175
176
  [key: string]: string;
176
177
  } | undefined;
@@ -182,6 +183,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
182
183
  isPatternParameter?: boolean | undefined;
183
184
  ignorePatternParameterDefault?: boolean | undefined;
184
185
  optionalPatternParameter?: boolean | undefined;
186
+ dataSourceVariant?: "unpublished" | undefined;
185
187
  variables?: {
186
188
  [key: string]: string;
187
189
  } | undefined;
@@ -236,6 +238,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
236
238
  isPatternParameter?: boolean | undefined;
237
239
  ignorePatternParameterDefault?: boolean | undefined;
238
240
  optionalPatternParameter?: boolean | undefined;
241
+ dataSourceVariant?: "unpublished" | undefined;
239
242
  variables?: {
240
243
  [key: string]: string;
241
244
  } | undefined;
@@ -247,6 +250,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
247
250
  isPatternParameter?: boolean | undefined;
248
251
  ignorePatternParameterDefault?: boolean | undefined;
249
252
  optionalPatternParameter?: boolean | undefined;
253
+ dataSourceVariant?: "unpublished" | undefined;
250
254
  variables?: {
251
255
  [key: string]: string;
252
256
  } | undefined;
package/dist/index.esm.js CHANGED
@@ -694,11 +694,11 @@ import {
694
694
  isRichTextValue,
695
695
  isRichTextValueConsideredEmpty
696
696
  } from "@uniformdev/richtext";
697
- import React19, { useMemo as useMemo5 } from "react";
697
+ import React18, { useMemo as useMemo5 } from "react";
698
698
 
699
699
  // src/components/UniformRichText/UniformRichTextNode.tsx
700
700
  import { isRichTextNode } from "@uniformdev/richtext";
701
- import React18 from "react";
701
+ import React17 from "react";
702
702
 
703
703
  // src/components/UniformRichText/nodes/HeadingRichTextNode.tsx
704
704
  import React9 from "react";
@@ -752,28 +752,19 @@ var ParagraphRichTextNode = ({ children, node }) => {
752
752
  );
753
753
  };
754
754
 
755
- // src/components/UniformRichText/nodes/TableCellRichTextNode.tsx
756
- import { getRichTextTagFromTableCellHeaderState } from "@uniformdev/richtext";
757
- import React15 from "react";
758
- var TableCellRichTextNode = ({ children, node }) => {
759
- const { headerState } = node;
760
- const TableCellTag = getRichTextTagFromTableCellHeaderState(headerState);
761
- return /* @__PURE__ */ React15.createElement(TableCellTag, null, children);
762
- };
763
-
764
755
  // src/components/UniformRichText/nodes/TabRichTextNode.tsx
765
- import React16 from "react";
756
+ import React15 from "react";
766
757
  var TabRichTextNode = () => {
767
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, " ");
758
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, " ");
768
759
  };
769
760
 
770
761
  // src/components/UniformRichText/nodes/TextRichTextNode.tsx
771
762
  import { getRichTextTagsFromTextFormat } from "@uniformdev/richtext";
772
- import React17 from "react";
763
+ import React16 from "react";
773
764
  var TextRichTextNode = ({ node }) => {
774
765
  const { text, format } = node;
775
766
  const tags = getRichTextTagsFromTextFormat(format);
776
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ React17.createElement(Tag, null, children), text) : text);
767
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ React16.createElement(Tag, null, children), text) : text);
777
768
  };
778
769
 
779
770
  // src/components/UniformRichText/UniformRichTextNode.tsx
@@ -787,8 +778,8 @@ function UniformRichTextNode({ node, ...props }) {
787
778
  if (!NodeRenderer) {
788
779
  return null;
789
780
  }
790
- const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ React18.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
791
- return /* @__PURE__ */ React18.createElement(NodeRenderer, { node }, children);
781
+ const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ React17.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
782
+ return /* @__PURE__ */ React17.createElement(NodeRenderer, { node }, children);
792
783
  }
793
784
  var rendererMap = /* @__PURE__ */ new Map([
794
785
  ["heading", HeadingRichTextNode],
@@ -797,27 +788,21 @@ var rendererMap = /* @__PURE__ */ new Map([
797
788
  ["list", ListRichTextNode],
798
789
  ["listitem", ListItemRichTextNode],
799
790
  ["paragraph", ParagraphRichTextNode],
800
- ["quote", ({ children }) => /* @__PURE__ */ React18.createElement("blockquote", null, children)],
791
+ ["quote", ({ children }) => /* @__PURE__ */ React17.createElement("blockquote", null, children)],
801
792
  [
802
793
  "code",
803
- ({ children }) => /* @__PURE__ */ React18.createElement("pre", null, /* @__PURE__ */ React18.createElement("code", null, children))
794
+ ({ children }) => /* @__PURE__ */ React17.createElement("pre", null, /* @__PURE__ */ React17.createElement("code", null, children))
804
795
  ],
805
- ["root", ({ children }) => /* @__PURE__ */ React18.createElement(React18.Fragment, null, children)],
796
+ ["root", ({ children }) => /* @__PURE__ */ React17.createElement(React17.Fragment, null, children)],
806
797
  ["text", TextRichTextNode],
807
- ["tab", TabRichTextNode],
808
- [
809
- "table",
810
- ({ children }) => /* @__PURE__ */ React18.createElement("table", null, /* @__PURE__ */ React18.createElement("tbody", null, children))
811
- ],
812
- ["tablerow", ({ children }) => /* @__PURE__ */ React18.createElement("tr", null, children)],
813
- ["tablecell", TableCellRichTextNode]
798
+ ["tab", TabRichTextNode]
814
799
  ]);
815
800
  var resolveRichTextDefaultRenderer = (node) => {
816
801
  return rendererMap.get(node.type);
817
802
  };
818
803
 
819
804
  // src/components/UniformRichText/UniformRichText.tsx
820
- var UniformRichText = React19.forwardRef(function UniformRichText2({ parameterId, resolveRichTextRenderer, as: Tag = "div", ...props }, ref) {
805
+ var UniformRichText = React18.forwardRef(function UniformRichText2({ parameterId, resolveRichTextRenderer, as: Tag = "div", ...props }, ref) {
821
806
  const { data: componentData } = useUniformCurrentComponent();
822
807
  const parameter = useMemo5(() => {
823
808
  var _a;
@@ -825,7 +810,7 @@ var UniformRichText = React19.forwardRef(function UniformRichText2({ parameterId
825
810
  }, [componentData, parameterId]);
826
811
  const value = useMemo5(() => parameter == null ? void 0 : parameter.value, [parameter]);
827
812
  if (!value || !isRichTextValue(value) || isRichTextValueConsideredEmpty(value)) return null;
828
- return Tag === null ? /* @__PURE__ */ React19.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React19.createElement(
813
+ return Tag === null ? /* @__PURE__ */ React18.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React18.createElement(
829
814
  Tag,
830
815
  {
831
816
  ref,
@@ -836,15 +821,15 @@ var UniformRichText = React19.forwardRef(function UniformRichText2({ parameterId
836
821
  [ATTRIBUTE_PARAMETER_TYPE]: "richText"
837
822
  }
838
823
  },
839
- /* @__PURE__ */ React19.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
824
+ /* @__PURE__ */ React18.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
840
825
  );
841
826
  });
842
827
 
843
828
  // src/components/UniformText.tsx
844
- import React21, { useState as useState2 } from "react";
829
+ import React20, { useState as useState2 } from "react";
845
830
 
846
831
  // src/components/PureUniformText.tsx
847
- import React20 from "react";
832
+ import React19 from "react";
848
833
  var PureUniformText = ({
849
834
  as: Tag = "span",
850
835
  parameterId,
@@ -863,10 +848,10 @@ var PureUniformText = ({
863
848
  return null;
864
849
  }
865
850
  if (!isContextualEditing) {
866
- return /* @__PURE__ */ React20.createElement(Tag, { style: isMultiline ? { whiteSpace: "pre-wrap" } : {}, ...props }, render(value));
851
+ return /* @__PURE__ */ React19.createElement(Tag, { style: isMultiline ? { whiteSpace: "pre-wrap" } : {}, ...props }, render(value));
867
852
  }
868
853
  const computedPlaceholder = typeof placeholder === "function" ? placeholder({ id: parameterId }) : placeholder;
869
- return /* @__PURE__ */ React20.createElement(
854
+ return /* @__PURE__ */ React19.createElement(
870
855
  Tag,
871
856
  {
872
857
  ...props,
@@ -904,7 +889,7 @@ var UniformText = ({
904
889
  }
905
890
  const placeholderProp = placeholder != null ? placeholder : contextualEditingDefaultPlaceholder;
906
891
  const computedPlaceholder = typeof placeholderProp === "function" ? placeholderProp({ id: parameterId }) : placeholderProp;
907
- return /* @__PURE__ */ React21.createElement(
892
+ return /* @__PURE__ */ React20.createElement(
908
893
  PureUniformText,
909
894
  {
910
895
  ...props,
package/dist/index.js CHANGED
@@ -718,13 +718,13 @@ var UniformPlayground = ({
718
718
 
719
719
  // src/components/UniformRichText/UniformRichText.tsx
720
720
  var import_canvas11 = require("@uniformdev/canvas");
721
- var import_richtext6 = require("@uniformdev/richtext");
722
- var import_react21 = __toESM(require("react"));
723
-
724
- // src/components/UniformRichText/UniformRichTextNode.tsx
725
721
  var import_richtext5 = require("@uniformdev/richtext");
726
722
  var import_react20 = __toESM(require("react"));
727
723
 
724
+ // src/components/UniformRichText/UniformRichTextNode.tsx
725
+ var import_richtext4 = require("@uniformdev/richtext");
726
+ var import_react19 = __toESM(require("react"));
727
+
728
728
  // src/components/UniformRichText/nodes/HeadingRichTextNode.tsx
729
729
  var import_react11 = __toESM(require("react"));
730
730
  var HeadingRichTextNode = ({ children, node }) => {
@@ -777,34 +777,25 @@ var ParagraphRichTextNode = ({ children, node }) => {
777
777
  );
778
778
  };
779
779
 
780
- // src/components/UniformRichText/nodes/TableCellRichTextNode.tsx
781
- var import_richtext3 = require("@uniformdev/richtext");
782
- var import_react17 = __toESM(require("react"));
783
- var TableCellRichTextNode = ({ children, node }) => {
784
- const { headerState } = node;
785
- const TableCellTag = (0, import_richtext3.getRichTextTagFromTableCellHeaderState)(headerState);
786
- return /* @__PURE__ */ import_react17.default.createElement(TableCellTag, null, children);
787
- };
788
-
789
780
  // src/components/UniformRichText/nodes/TabRichTextNode.tsx
790
- var import_react18 = __toESM(require("react"));
781
+ var import_react17 = __toESM(require("react"));
791
782
  var TabRichTextNode = () => {
792
- return /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, " ");
783
+ return /* @__PURE__ */ import_react17.default.createElement(import_react17.default.Fragment, null, " ");
793
784
  };
794
785
 
795
786
  // src/components/UniformRichText/nodes/TextRichTextNode.tsx
796
- var import_richtext4 = require("@uniformdev/richtext");
797
- var import_react19 = __toESM(require("react"));
787
+ var import_richtext3 = require("@uniformdev/richtext");
788
+ var import_react18 = __toESM(require("react"));
798
789
  var TextRichTextNode = ({ node }) => {
799
790
  const { text, format } = node;
800
- const tags = (0, import_richtext4.getRichTextTagsFromTextFormat)(format);
801
- return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ import_react19.default.createElement(Tag, null, children), text) : text);
791
+ const tags = (0, import_richtext3.getRichTextTagsFromTextFormat)(format);
792
+ return /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ import_react18.default.createElement(Tag, null, children), text) : text);
802
793
  };
803
794
 
804
795
  // src/components/UniformRichText/UniformRichTextNode.tsx
805
796
  function UniformRichTextNode({ node, ...props }) {
806
797
  var _a;
807
- if (!(0, import_richtext5.isRichTextNode)(node)) return null;
798
+ if (!(0, import_richtext4.isRichTextNode)(node)) return null;
808
799
  let NodeRenderer = (_a = props.resolveRichTextRenderer) == null ? void 0 : _a.call(props, node);
809
800
  if (typeof NodeRenderer === "undefined") {
810
801
  NodeRenderer = resolveRichTextDefaultRenderer(node);
@@ -812,8 +803,8 @@ function UniformRichTextNode({ node, ...props }) {
812
803
  if (!NodeRenderer) {
813
804
  return null;
814
805
  }
815
- const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ import_react20.default.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
816
- return /* @__PURE__ */ import_react20.default.createElement(NodeRenderer, { node }, children);
806
+ const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ import_react19.default.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
807
+ return /* @__PURE__ */ import_react19.default.createElement(NodeRenderer, { node }, children);
817
808
  }
818
809
  var rendererMap = /* @__PURE__ */ new Map([
819
810
  ["heading", HeadingRichTextNode],
@@ -822,35 +813,29 @@ var rendererMap = /* @__PURE__ */ new Map([
822
813
  ["list", ListRichTextNode],
823
814
  ["listitem", ListItemRichTextNode],
824
815
  ["paragraph", ParagraphRichTextNode],
825
- ["quote", ({ children }) => /* @__PURE__ */ import_react20.default.createElement("blockquote", null, children)],
816
+ ["quote", ({ children }) => /* @__PURE__ */ import_react19.default.createElement("blockquote", null, children)],
826
817
  [
827
818
  "code",
828
- ({ children }) => /* @__PURE__ */ import_react20.default.createElement("pre", null, /* @__PURE__ */ import_react20.default.createElement("code", null, children))
819
+ ({ children }) => /* @__PURE__ */ import_react19.default.createElement("pre", null, /* @__PURE__ */ import_react19.default.createElement("code", null, children))
829
820
  ],
830
- ["root", ({ children }) => /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, children)],
821
+ ["root", ({ children }) => /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, children)],
831
822
  ["text", TextRichTextNode],
832
- ["tab", TabRichTextNode],
833
- [
834
- "table",
835
- ({ children }) => /* @__PURE__ */ import_react20.default.createElement("table", null, /* @__PURE__ */ import_react20.default.createElement("tbody", null, children))
836
- ],
837
- ["tablerow", ({ children }) => /* @__PURE__ */ import_react20.default.createElement("tr", null, children)],
838
- ["tablecell", TableCellRichTextNode]
823
+ ["tab", TabRichTextNode]
839
824
  ]);
840
825
  var resolveRichTextDefaultRenderer = (node) => {
841
826
  return rendererMap.get(node.type);
842
827
  };
843
828
 
844
829
  // src/components/UniformRichText/UniformRichText.tsx
845
- var UniformRichText = import_react21.default.forwardRef(function UniformRichText2({ parameterId, resolveRichTextRenderer, as: Tag = "div", ...props }, ref) {
830
+ var UniformRichText = import_react20.default.forwardRef(function UniformRichText2({ parameterId, resolveRichTextRenderer, as: Tag = "div", ...props }, ref) {
846
831
  const { data: componentData } = useUniformCurrentComponent();
847
- const parameter = (0, import_react21.useMemo)(() => {
832
+ const parameter = (0, import_react20.useMemo)(() => {
848
833
  var _a;
849
834
  return (_a = componentData == null ? void 0 : componentData.parameters) == null ? void 0 : _a[parameterId];
850
835
  }, [componentData, parameterId]);
851
- const value = (0, import_react21.useMemo)(() => parameter == null ? void 0 : parameter.value, [parameter]);
852
- if (!value || !(0, import_richtext6.isRichTextValue)(value) || (0, import_richtext6.isRichTextValueConsideredEmpty)(value)) return null;
853
- return Tag === null ? /* @__PURE__ */ import_react21.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react21.default.createElement(
836
+ const value = (0, import_react20.useMemo)(() => parameter == null ? void 0 : parameter.value, [parameter]);
837
+ if (!value || !(0, import_richtext5.isRichTextValue)(value) || (0, import_richtext5.isRichTextValueConsideredEmpty)(value)) return null;
838
+ return Tag === null ? /* @__PURE__ */ import_react20.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react20.default.createElement(
854
839
  Tag,
855
840
  {
856
841
  ref,
@@ -861,15 +846,15 @@ var UniformRichText = import_react21.default.forwardRef(function UniformRichText
861
846
  [import_canvas11.ATTRIBUTE_PARAMETER_TYPE]: "richText"
862
847
  }
863
848
  },
864
- /* @__PURE__ */ import_react21.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
849
+ /* @__PURE__ */ import_react20.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
865
850
  );
866
851
  });
867
852
 
868
853
  // src/components/UniformText.tsx
869
- var import_react23 = __toESM(require("react"));
854
+ var import_react22 = __toESM(require("react"));
870
855
 
871
856
  // src/components/PureUniformText.tsx
872
- var import_react22 = __toESM(require("react"));
857
+ var import_react21 = __toESM(require("react"));
873
858
  var PureUniformText = ({
874
859
  as: Tag = "span",
875
860
  parameterId,
@@ -888,10 +873,10 @@ var PureUniformText = ({
888
873
  return null;
889
874
  }
890
875
  if (!isContextualEditing) {
891
- return /* @__PURE__ */ import_react22.default.createElement(Tag, { style: isMultiline ? { whiteSpace: "pre-wrap" } : {}, ...props }, render(value));
876
+ return /* @__PURE__ */ import_react21.default.createElement(Tag, { style: isMultiline ? { whiteSpace: "pre-wrap" } : {}, ...props }, render(value));
892
877
  }
893
878
  const computedPlaceholder = typeof placeholder === "function" ? placeholder({ id: parameterId }) : placeholder;
894
- return /* @__PURE__ */ import_react22.default.createElement(
879
+ return /* @__PURE__ */ import_react21.default.createElement(
895
880
  Tag,
896
881
  {
897
882
  ...props,
@@ -920,7 +905,7 @@ var UniformText = ({
920
905
  var _a, _b, _c;
921
906
  const { data: componentData, contextualEditingDefaultPlaceholder } = useUniformCurrentComponent();
922
907
  const { isContextualEditing } = useUniformCurrentComposition();
923
- const [isFocused, setIsFocused] = (0, import_react23.useState)(false);
908
+ const [isFocused, setIsFocused] = (0, import_react22.useState)(false);
924
909
  const parameter = (_a = componentData == null ? void 0 : componentData.parameters) == null ? void 0 : _a[parameterId];
925
910
  const isEditable = (_c = (_b = parameter == null ? void 0 : parameter._contextualEditing) == null ? void 0 : _b.isEditable) != null ? _c : false;
926
911
  const shouldSkipCustomRendering = isFocused && isEditable;
@@ -929,7 +914,7 @@ var UniformText = ({
929
914
  }
930
915
  const placeholderProp = placeholder != null ? placeholder : contextualEditingDefaultPlaceholder;
931
916
  const computedPlaceholder = typeof placeholderProp === "function" ? placeholderProp({ id: parameterId }) : placeholderProp;
932
- return /* @__PURE__ */ import_react23.default.createElement(
917
+ return /* @__PURE__ */ import_react22.default.createElement(
933
918
  PureUniformText,
934
919
  {
935
920
  ...props,
@@ -962,14 +947,14 @@ var getParameterAttributes = (options) => {
962
947
 
963
948
  // src/hooks/useCompositionEventEffect.ts
964
949
  var import_canvas13 = require("@uniformdev/canvas");
965
- var import_react24 = require("react");
950
+ var import_react23 = require("react");
966
951
  function useCompositionEventEffect({
967
952
  enabled,
968
953
  projectId,
969
954
  compositionId,
970
955
  effect
971
956
  }) {
972
- (0, import_react24.useEffect)(() => {
957
+ (0, import_react23.useEffect)(() => {
973
958
  if (!enabled || !compositionId || !projectId) {
974
959
  return;
975
960
  }
@@ -998,17 +983,17 @@ function useCompositionEventEffect({
998
983
 
999
984
  // src/hooks/useUniformContextualEditingState.ts
1000
985
  var import_canvas14 = require("@uniformdev/canvas");
1001
- var import_react25 = require("react");
986
+ var import_react24 = require("react");
1002
987
  var useUniformContextualEditingState = ({
1003
988
  global = false
1004
989
  } = {}) => {
1005
990
  const { isContextualEditing } = useUniformCurrentComposition();
1006
991
  const { data: componentData } = useUniformCurrentComponent();
1007
- const [selectedComponentReference, setSelectedComponentReference] = (0, import_react25.useState)();
1008
- const [previewMode, setPreviewMode] = (0, import_react25.useState)(
992
+ const [selectedComponentReference, setSelectedComponentReference] = (0, import_react24.useState)();
993
+ const [previewMode, setPreviewMode] = (0, import_react24.useState)(
1009
994
  isContextualEditing ? "editor" : void 0
1010
995
  );
1011
- const channel = (0, import_react25.useMemo)(() => {
996
+ const channel = (0, import_react24.useMemo)(() => {
1012
997
  if (!isContextualEditing) {
1013
998
  return;
1014
999
  }
@@ -1018,7 +1003,7 @@ var useUniformContextualEditingState = ({
1018
1003
  });
1019
1004
  return channel2;
1020
1005
  }, [isContextualEditing]);
1021
- (0, import_react25.useEffect)(() => {
1006
+ (0, import_react24.useEffect)(() => {
1022
1007
  var _a, _b;
1023
1008
  if (!channel) {
1024
1009
  return;
@@ -1042,7 +1027,7 @@ var useUniformContextualEditingState = ({
1042
1027
  unsubscribe();
1043
1028
  };
1044
1029
  }, [global, channel, componentData == null ? void 0 : componentData._id, setSelectedComponentReference, setPreviewMode]);
1045
- return (0, import_react25.useMemo)(
1030
+ return (0, import_react24.useMemo)(
1046
1031
  () => ({
1047
1032
  isContextualEditing,
1048
1033
  selectedComponentReference,
package/dist/index.mjs CHANGED
@@ -694,11 +694,11 @@ import {
694
694
  isRichTextValue,
695
695
  isRichTextValueConsideredEmpty
696
696
  } from "@uniformdev/richtext";
697
- import React19, { useMemo as useMemo5 } from "react";
697
+ import React18, { useMemo as useMemo5 } from "react";
698
698
 
699
699
  // src/components/UniformRichText/UniformRichTextNode.tsx
700
700
  import { isRichTextNode } from "@uniformdev/richtext";
701
- import React18 from "react";
701
+ import React17 from "react";
702
702
 
703
703
  // src/components/UniformRichText/nodes/HeadingRichTextNode.tsx
704
704
  import React9 from "react";
@@ -752,28 +752,19 @@ var ParagraphRichTextNode = ({ children, node }) => {
752
752
  );
753
753
  };
754
754
 
755
- // src/components/UniformRichText/nodes/TableCellRichTextNode.tsx
756
- import { getRichTextTagFromTableCellHeaderState } from "@uniformdev/richtext";
757
- import React15 from "react";
758
- var TableCellRichTextNode = ({ children, node }) => {
759
- const { headerState } = node;
760
- const TableCellTag = getRichTextTagFromTableCellHeaderState(headerState);
761
- return /* @__PURE__ */ React15.createElement(TableCellTag, null, children);
762
- };
763
-
764
755
  // src/components/UniformRichText/nodes/TabRichTextNode.tsx
765
- import React16 from "react";
756
+ import React15 from "react";
766
757
  var TabRichTextNode = () => {
767
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, " ");
758
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, " ");
768
759
  };
769
760
 
770
761
  // src/components/UniformRichText/nodes/TextRichTextNode.tsx
771
762
  import { getRichTextTagsFromTextFormat } from "@uniformdev/richtext";
772
- import React17 from "react";
763
+ import React16 from "react";
773
764
  var TextRichTextNode = ({ node }) => {
774
765
  const { text, format } = node;
775
766
  const tags = getRichTextTagsFromTextFormat(format);
776
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ React17.createElement(Tag, null, children), text) : text);
767
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ React16.createElement(Tag, null, children), text) : text);
777
768
  };
778
769
 
779
770
  // src/components/UniformRichText/UniformRichTextNode.tsx
@@ -787,8 +778,8 @@ function UniformRichTextNode({ node, ...props }) {
787
778
  if (!NodeRenderer) {
788
779
  return null;
789
780
  }
790
- const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ React18.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
791
- return /* @__PURE__ */ React18.createElement(NodeRenderer, { node }, children);
781
+ const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ React17.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
782
+ return /* @__PURE__ */ React17.createElement(NodeRenderer, { node }, children);
792
783
  }
793
784
  var rendererMap = /* @__PURE__ */ new Map([
794
785
  ["heading", HeadingRichTextNode],
@@ -797,27 +788,21 @@ var rendererMap = /* @__PURE__ */ new Map([
797
788
  ["list", ListRichTextNode],
798
789
  ["listitem", ListItemRichTextNode],
799
790
  ["paragraph", ParagraphRichTextNode],
800
- ["quote", ({ children }) => /* @__PURE__ */ React18.createElement("blockquote", null, children)],
791
+ ["quote", ({ children }) => /* @__PURE__ */ React17.createElement("blockquote", null, children)],
801
792
  [
802
793
  "code",
803
- ({ children }) => /* @__PURE__ */ React18.createElement("pre", null, /* @__PURE__ */ React18.createElement("code", null, children))
794
+ ({ children }) => /* @__PURE__ */ React17.createElement("pre", null, /* @__PURE__ */ React17.createElement("code", null, children))
804
795
  ],
805
- ["root", ({ children }) => /* @__PURE__ */ React18.createElement(React18.Fragment, null, children)],
796
+ ["root", ({ children }) => /* @__PURE__ */ React17.createElement(React17.Fragment, null, children)],
806
797
  ["text", TextRichTextNode],
807
- ["tab", TabRichTextNode],
808
- [
809
- "table",
810
- ({ children }) => /* @__PURE__ */ React18.createElement("table", null, /* @__PURE__ */ React18.createElement("tbody", null, children))
811
- ],
812
- ["tablerow", ({ children }) => /* @__PURE__ */ React18.createElement("tr", null, children)],
813
- ["tablecell", TableCellRichTextNode]
798
+ ["tab", TabRichTextNode]
814
799
  ]);
815
800
  var resolveRichTextDefaultRenderer = (node) => {
816
801
  return rendererMap.get(node.type);
817
802
  };
818
803
 
819
804
  // src/components/UniformRichText/UniformRichText.tsx
820
- var UniformRichText = React19.forwardRef(function UniformRichText2({ parameterId, resolveRichTextRenderer, as: Tag = "div", ...props }, ref) {
805
+ var UniformRichText = React18.forwardRef(function UniformRichText2({ parameterId, resolveRichTextRenderer, as: Tag = "div", ...props }, ref) {
821
806
  const { data: componentData } = useUniformCurrentComponent();
822
807
  const parameter = useMemo5(() => {
823
808
  var _a;
@@ -825,7 +810,7 @@ var UniformRichText = React19.forwardRef(function UniformRichText2({ parameterId
825
810
  }, [componentData, parameterId]);
826
811
  const value = useMemo5(() => parameter == null ? void 0 : parameter.value, [parameter]);
827
812
  if (!value || !isRichTextValue(value) || isRichTextValueConsideredEmpty(value)) return null;
828
- return Tag === null ? /* @__PURE__ */ React19.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React19.createElement(
813
+ return Tag === null ? /* @__PURE__ */ React18.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React18.createElement(
829
814
  Tag,
830
815
  {
831
816
  ref,
@@ -836,15 +821,15 @@ var UniformRichText = React19.forwardRef(function UniformRichText2({ parameterId
836
821
  [ATTRIBUTE_PARAMETER_TYPE]: "richText"
837
822
  }
838
823
  },
839
- /* @__PURE__ */ React19.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
824
+ /* @__PURE__ */ React18.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
840
825
  );
841
826
  });
842
827
 
843
828
  // src/components/UniformText.tsx
844
- import React21, { useState as useState2 } from "react";
829
+ import React20, { useState as useState2 } from "react";
845
830
 
846
831
  // src/components/PureUniformText.tsx
847
- import React20 from "react";
832
+ import React19 from "react";
848
833
  var PureUniformText = ({
849
834
  as: Tag = "span",
850
835
  parameterId,
@@ -863,10 +848,10 @@ var PureUniformText = ({
863
848
  return null;
864
849
  }
865
850
  if (!isContextualEditing) {
866
- return /* @__PURE__ */ React20.createElement(Tag, { style: isMultiline ? { whiteSpace: "pre-wrap" } : {}, ...props }, render(value));
851
+ return /* @__PURE__ */ React19.createElement(Tag, { style: isMultiline ? { whiteSpace: "pre-wrap" } : {}, ...props }, render(value));
867
852
  }
868
853
  const computedPlaceholder = typeof placeholder === "function" ? placeholder({ id: parameterId }) : placeholder;
869
- return /* @__PURE__ */ React20.createElement(
854
+ return /* @__PURE__ */ React19.createElement(
870
855
  Tag,
871
856
  {
872
857
  ...props,
@@ -904,7 +889,7 @@ var UniformText = ({
904
889
  }
905
890
  const placeholderProp = placeholder != null ? placeholder : contextualEditingDefaultPlaceholder;
906
891
  const computedPlaceholder = typeof placeholderProp === "function" ? placeholderProp({ id: parameterId }) : placeholderProp;
907
- return /* @__PURE__ */ React21.createElement(
892
+ return /* @__PURE__ */ React20.createElement(
908
893
  PureUniformText,
909
894
  {
910
895
  ...props,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-react",
3
- "version": "19.177.2-alpha.10+c9cb5f414c",
3
+ "version": "19.177.2-alpha.18+f0847a28d4",
4
4
  "description": "React SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -45,10 +45,10 @@
45
45
  "document": "api-extractor run --local"
46
46
  },
47
47
  "dependencies": {
48
- "@uniformdev/canvas": "19.177.2-alpha.10+c9cb5f414c",
49
- "@uniformdev/context": "19.177.2-alpha.10+c9cb5f414c",
50
- "@uniformdev/context-react": "19.177.2-alpha.10+c9cb5f414c",
51
- "@uniformdev/richtext": "19.177.2-alpha.10+c9cb5f414c"
48
+ "@uniformdev/canvas": "19.177.2-alpha.18+f0847a28d4",
49
+ "@uniformdev/context": "19.177.2-alpha.18+f0847a28d4",
50
+ "@uniformdev/context-react": "19.177.2-alpha.18+f0847a28d4",
51
+ "@uniformdev/richtext": "19.177.2-alpha.18+f0847a28d4"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "immer": ">= 10",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "c9cb5f414c41dc1d2c37dff02a5b87484901657e"
70
+ "gitHead": "f0847a28d4ba83396723d0bb80311184a3143e00"
71
71
  }