@uniformdev/canvas-react 19.51.0 → 19.51.1-alpha.1

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
@@ -42,7 +42,7 @@ type ComponentStore = {
42
42
  **/
43
43
  declare function DefaultNotImplementedComponent(props: ComponentProps): React$1.JSX.Element | null;
44
44
 
45
- type UniformTextProps = Omit<PureUniformTextProps, 'skipCustomRendering' | 'isContextualEditing'>;
45
+ type UniformTextProps = Omit<PureUniformTextProps, 'skipCustomRendering' | 'isContextualEditing' | 'component'>;
46
46
  /**
47
47
  * Renders text parameters. Offers inline editing capability out of the box.
48
48
  */
package/dist/index.d.ts CHANGED
@@ -42,7 +42,7 @@ type ComponentStore = {
42
42
  **/
43
43
  declare function DefaultNotImplementedComponent(props: ComponentProps): React$1.JSX.Element | null;
44
44
 
45
- type UniformTextProps = Omit<PureUniformTextProps, 'skipCustomRendering' | 'isContextualEditing'>;
45
+ type UniformTextProps = Omit<PureUniformTextProps, 'skipCustomRendering' | 'isContextualEditing' | 'component'>;
46
46
  /**
47
47
  * Renders text parameters. Offers inline editing capability out of the box.
48
48
  */
package/dist/index.esm.js CHANGED
@@ -609,6 +609,11 @@ var UniformPlayground = ({
609
609
  };
610
610
 
611
611
  // src/components/UniformRichText/UniformRichText.tsx
612
+ import {
613
+ ATTRIBUTE_COMPONENT_ID,
614
+ ATTRIBUTE_PARAMETER_ID,
615
+ ATTRIBUTE_PARAMETER_TYPE
616
+ } from "@uniformdev/canvas";
612
617
  import {
613
618
  isRichTextValue,
614
619
  isRichTextValueConsideredEmpty
@@ -731,7 +736,19 @@ var UniformRichText = React17.forwardRef(function UniformRichText2({ parameterId
731
736
  const value = useMemo3(() => parameter == null ? void 0 : parameter.value, [parameter]);
732
737
  if (!value || !isRichTextValue(value) || isRichTextValueConsideredEmpty(value))
733
738
  return null;
734
- return Tag === null ? /* @__PURE__ */ React17.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React17.createElement(Tag, { ref, ...props }, /* @__PURE__ */ React17.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }));
739
+ return Tag === null ? /* @__PURE__ */ React17.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React17.createElement(
740
+ Tag,
741
+ {
742
+ ref,
743
+ ...props,
744
+ ...{
745
+ [ATTRIBUTE_COMPONENT_ID]: componentData == null ? void 0 : componentData._id,
746
+ [ATTRIBUTE_PARAMETER_ID]: parameterId,
747
+ [ATTRIBUTE_PARAMETER_TYPE]: "richText"
748
+ }
749
+ },
750
+ /* @__PURE__ */ React17.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
751
+ );
735
752
  });
736
753
 
737
754
  // src/components/UniformText.tsx
package/dist/index.js CHANGED
@@ -643,6 +643,7 @@ var UniformPlayground = ({
643
643
  };
644
644
 
645
645
  // src/components/UniformRichText/UniformRichText.tsx
646
+ var import_canvas8 = require("@uniformdev/canvas");
646
647
  var import_richtext5 = require("@uniformdev/richtext");
647
648
  var import_react17 = __toESM(require("react"));
648
649
 
@@ -762,7 +763,19 @@ var UniformRichText = import_react17.default.forwardRef(function UniformRichText
762
763
  const value = (0, import_react17.useMemo)(() => parameter == null ? void 0 : parameter.value, [parameter]);
763
764
  if (!value || !(0, import_richtext5.isRichTextValue)(value) || (0, import_richtext5.isRichTextValueConsideredEmpty)(value))
764
765
  return null;
765
- return Tag === null ? /* @__PURE__ */ import_react17.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react17.default.createElement(Tag, { ref, ...props }, /* @__PURE__ */ import_react17.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }));
766
+ return Tag === null ? /* @__PURE__ */ import_react17.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react17.default.createElement(
767
+ Tag,
768
+ {
769
+ ref,
770
+ ...props,
771
+ ...{
772
+ [import_canvas8.ATTRIBUTE_COMPONENT_ID]: componentData == null ? void 0 : componentData._id,
773
+ [import_canvas8.ATTRIBUTE_PARAMETER_ID]: parameterId,
774
+ [import_canvas8.ATTRIBUTE_PARAMETER_TYPE]: "richText"
775
+ }
776
+ },
777
+ /* @__PURE__ */ import_react17.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
778
+ );
766
779
  });
767
780
 
768
781
  // src/components/UniformText.tsx
@@ -852,16 +865,16 @@ var UniformText = ({
852
865
  };
853
866
 
854
867
  // src/helpers/getParameterAttributes.ts
855
- var import_canvas8 = require("@uniformdev/canvas");
868
+ var import_canvas9 = require("@uniformdev/canvas");
856
869
  var getParameterAttributes = (options) => {
857
870
  return {
858
- ...(0, import_canvas8.getParameterAttributes)(options),
871
+ ...(0, import_canvas9.getParameterAttributes)(options),
859
872
  suppressContentEditableWarning: true
860
873
  };
861
874
  };
862
875
 
863
876
  // src/hooks/useCompositionEventEffect.ts
864
- var import_canvas9 = require("@uniformdev/canvas");
877
+ var import_canvas10 = require("@uniformdev/canvas");
865
878
  var import_react20 = require("react");
866
879
  function useCompositionEventEffect({
867
880
  enabled,
@@ -875,12 +888,12 @@ function useCompositionEventEffect({
875
888
  }
876
889
  let goodbye = void 0;
877
890
  const loadEffect = async () => {
878
- const eventBus = await (0, import_canvas9.createEventBus)();
891
+ const eventBus = await (0, import_canvas10.createEventBus)();
879
892
  if (eventBus) {
880
- goodbye = (0, import_canvas9.subscribeToComposition)({
893
+ goodbye = (0, import_canvas10.subscribeToComposition)({
881
894
  eventBus,
882
895
  compositionId,
883
- compositionState: import_canvas9.CANVAS_DRAFT_STATE,
896
+ compositionState: import_canvas10.CANVAS_DRAFT_STATE,
884
897
  projectId,
885
898
  callback: effect,
886
899
  event: "updated"
@@ -897,7 +910,7 @@ function useCompositionEventEffect({
897
910
  }
898
911
 
899
912
  // src/hooks/useUniformContextualEditingState.ts
900
- var import_canvas10 = require("@uniformdev/canvas");
913
+ var import_canvas11 = require("@uniformdev/canvas");
901
914
  var import_react21 = require("react");
902
915
  var useUniformContextualEditingState = ({
903
916
  global = false
@@ -909,7 +922,7 @@ var useUniformContextualEditingState = ({
909
922
  if (!isContextualEditing) {
910
923
  return;
911
924
  }
912
- const channel2 = (0, import_canvas10.createCanvasChannel)({
925
+ const channel2 = (0, import_canvas11.createCanvasChannel)({
913
926
  broadcastTo: [window],
914
927
  listenTo: [window]
915
928
  });
@@ -921,7 +934,7 @@ var useUniformContextualEditingState = ({
921
934
  }
922
935
  const unsubscribe = channel.on("update-contextual-editing-state-internal", async (message) => {
923
936
  var _a;
924
- if (!(0, import_canvas10.isUpdateContextualEditingStateInternalMessage)(message)) {
937
+ if (!(0, import_canvas11.isUpdateContextualEditingStateInternalMessage)(message)) {
925
938
  return;
926
939
  }
927
940
  if (!global && (componentData == null ? void 0 : componentData._id) !== ((_a = message.state.selectedComponentReference) == null ? void 0 : _a.parentId)) {
package/dist/index.mjs CHANGED
@@ -609,6 +609,11 @@ var UniformPlayground = ({
609
609
  };
610
610
 
611
611
  // src/components/UniformRichText/UniformRichText.tsx
612
+ import {
613
+ ATTRIBUTE_COMPONENT_ID,
614
+ ATTRIBUTE_PARAMETER_ID,
615
+ ATTRIBUTE_PARAMETER_TYPE
616
+ } from "@uniformdev/canvas";
612
617
  import {
613
618
  isRichTextValue,
614
619
  isRichTextValueConsideredEmpty
@@ -731,7 +736,19 @@ var UniformRichText = React17.forwardRef(function UniformRichText2({ parameterId
731
736
  const value = useMemo3(() => parameter == null ? void 0 : parameter.value, [parameter]);
732
737
  if (!value || !isRichTextValue(value) || isRichTextValueConsideredEmpty(value))
733
738
  return null;
734
- return Tag === null ? /* @__PURE__ */ React17.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React17.createElement(Tag, { ref, ...props }, /* @__PURE__ */ React17.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }));
739
+ return Tag === null ? /* @__PURE__ */ React17.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React17.createElement(
740
+ Tag,
741
+ {
742
+ ref,
743
+ ...props,
744
+ ...{
745
+ [ATTRIBUTE_COMPONENT_ID]: componentData == null ? void 0 : componentData._id,
746
+ [ATTRIBUTE_PARAMETER_ID]: parameterId,
747
+ [ATTRIBUTE_PARAMETER_TYPE]: "richText"
748
+ }
749
+ },
750
+ /* @__PURE__ */ React17.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
751
+ );
735
752
  });
736
753
 
737
754
  // src/components/UniformText.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-react",
3
- "version": "19.51.0",
3
+ "version": "19.51.1-alpha.1+e55ae6c1e",
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.51.0",
49
- "@uniformdev/context": "19.51.0",
50
- "@uniformdev/context-react": "19.51.0",
51
- "@uniformdev/richtext": "19.51.0"
48
+ "@uniformdev/canvas": "19.51.1-alpha.1+e55ae6c1e",
49
+ "@uniformdev/context": "19.51.1-alpha.1+e55ae6c1e",
50
+ "@uniformdev/context-react": "19.51.1-alpha.1+e55ae6c1e",
51
+ "@uniformdev/richtext": "19.51.1-alpha.1+e55ae6c1e"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": ">= 16 || 17 || 18",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "6169b3df00a64ebb66e4c4434cbf171e5cfbe6e4"
68
+ "gitHead": "e55ae6c1ea8df19f04a9dba22769d76e16d28d70"
69
69
  }