@uniformdev/canvas-vue 20.74.7-alpha.12 → 20.74.7-alpha.15.sha-2e86ba8d87

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
@@ -52,20 +52,20 @@ type ResolveRenderer = (componentInstance: ComponentInstance) => Component<any>;
52
52
  type UniformTextProps = {
53
53
  /**
54
54
  * The name of the HTML tag to render.
55
- * @default "span"
55
+ * @defaultValue "span"
56
56
  */
57
57
  as?: string;
58
58
  /** The ID of the parameter. */
59
59
  parameterId: string;
60
60
  /**
61
61
  * When set to true, it adds `whiteSpace: 'pre-wrap'` to the styles of the root element to allow the rendering of line breaks.
62
- * @default false
62
+ * @defaultValue false
63
63
  */
64
64
  isMultiline?: boolean;
65
65
  /**
66
66
  * Sets the value to show in Canvas editor when the parameter value is empty.
67
67
  * Can be a static string, or a function to generate the placeholder out of parameter info.
68
- * @default undefined
68
+ * @defaultValue undefined
69
69
  */
70
70
  placeholder?: string | ((parameter: {
71
71
  id: string;
@@ -938,7 +938,7 @@ type UniformRichTextProps = {
938
938
  /**
939
939
  * Sets the value to show in Canvas editor when the parameter value is empty.
940
940
  * Can be a static string, or a function to generate the placeholder out of parameter info.
941
- * @default undefined
941
+ * @defaultValue undefined
942
942
  */
943
943
  placeholder?: string | ((parameter: {
944
944
  id: string;
@@ -1049,7 +1049,7 @@ type UseUniformContextualEditingStateProps = {
1049
1049
  /**
1050
1050
  * When set to true, the hook will return the global contextual state no matter where its used.
1051
1051
  * When set to false, it will return only the state relevant to the current component (determined using `useUniformCurrentComponent`).
1052
- * @default false
1052
+ * @defaultValue false
1053
1053
  **/
1054
1054
  global?: boolean;
1055
1055
  };
package/dist/index.d.ts CHANGED
@@ -52,20 +52,20 @@ type ResolveRenderer = (componentInstance: ComponentInstance) => Component<any>;
52
52
  type UniformTextProps = {
53
53
  /**
54
54
  * The name of the HTML tag to render.
55
- * @default "span"
55
+ * @defaultValue "span"
56
56
  */
57
57
  as?: string;
58
58
  /** The ID of the parameter. */
59
59
  parameterId: string;
60
60
  /**
61
61
  * When set to true, it adds `whiteSpace: 'pre-wrap'` to the styles of the root element to allow the rendering of line breaks.
62
- * @default false
62
+ * @defaultValue false
63
63
  */
64
64
  isMultiline?: boolean;
65
65
  /**
66
66
  * Sets the value to show in Canvas editor when the parameter value is empty.
67
67
  * Can be a static string, or a function to generate the placeholder out of parameter info.
68
- * @default undefined
68
+ * @defaultValue undefined
69
69
  */
70
70
  placeholder?: string | ((parameter: {
71
71
  id: string;
@@ -938,7 +938,7 @@ type UniformRichTextProps = {
938
938
  /**
939
939
  * Sets the value to show in Canvas editor when the parameter value is empty.
940
940
  * Can be a static string, or a function to generate the placeholder out of parameter info.
941
- * @default undefined
941
+ * @defaultValue undefined
942
942
  */
943
943
  placeholder?: string | ((parameter: {
944
944
  id: string;
@@ -1049,7 +1049,7 @@ type UseUniformContextualEditingStateProps = {
1049
1049
  /**
1050
1050
  * When set to true, the hook will return the global contextual state no matter where its used.
1051
1051
  * When set to false, it will return only the state relevant to the current component (determined using `useUniformCurrentComponent`).
1052
- * @default false
1052
+ * @defaultValue false
1053
1053
  **/
1054
1054
  global?: boolean;
1055
1055
  };
package/dist/index.esm.js CHANGED
@@ -612,13 +612,15 @@ var LinkRichTextNode = (props, context) => {
612
612
  };
613
613
 
614
614
  // src/components/UniformRichText/nodes/ListItemRichTextNode.ts
615
+ import { getRichTextListItemValue } from "@uniformdev/richtext";
615
616
  import { h as h9 } from "vue";
616
617
  var ListItemRichTextNode = (props, context) => {
617
618
  const { value } = props.node;
619
+ const normalizedValue = getRichTextListItemValue(value);
618
620
  return h9(
619
621
  "li",
620
622
  {
621
- value: Number.isFinite(value) && value > 0 ? value : void 0
623
+ value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
622
624
  },
623
625
  context.slots
624
626
  );
package/dist/index.js CHANGED
@@ -632,13 +632,15 @@ var LinkRichTextNode = (props, context) => {
632
632
  };
633
633
 
634
634
  // src/components/UniformRichText/nodes/ListItemRichTextNode.ts
635
+ var import_richtext2 = require("@uniformdev/richtext");
635
636
  var import_vue10 = require("vue");
636
637
  var ListItemRichTextNode = (props, context) => {
637
638
  const { value } = props.node;
639
+ const normalizedValue = (0, import_richtext2.getRichTextListItemValue)(value);
638
640
  return (0, import_vue10.h)(
639
641
  "li",
640
642
  {
641
- value: Number.isFinite(value) && value > 0 ? value : void 0
643
+ value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
642
644
  },
643
645
  context.slots
644
646
  );
@@ -652,15 +654,15 @@ var ListRichTextNode = (props, context) => {
652
654
  };
653
655
 
654
656
  // src/components/UniformRichText/nodes/ParagraphRichTextNode.ts
655
- var import_richtext2 = require("@uniformdev/richtext");
657
+ var import_richtext3 = require("@uniformdev/richtext");
656
658
  var import_vue12 = require("vue");
657
659
  var ParagraphRichTextNode = (props, context) => {
658
660
  const { format, direction } = props.node;
659
661
  return (0, import_vue12.h)(
660
662
  "p",
661
663
  {
662
- dir: (0, import_richtext2.isPureDirection)(direction) ? direction : void 0,
663
- style: (0, import_richtext2.isPureTextAlign)(format) ? { textAlign: format } : void 0
664
+ dir: (0, import_richtext3.isPureDirection)(direction) ? direction : void 0,
665
+ style: (0, import_richtext3.isPureTextAlign)(format) ? { textAlign: format } : void 0
664
666
  },
665
667
  context.slots
666
668
  );
@@ -679,11 +681,11 @@ var RootRichTextNode = (props, c) => {
679
681
  };
680
682
 
681
683
  // src/components/UniformRichText/nodes/TableCellRichTextNode.ts
682
- var import_richtext3 = require("@uniformdev/richtext");
684
+ var import_richtext4 = require("@uniformdev/richtext");
683
685
  var import_vue15 = require("vue");
684
686
  var TableCellRichTextNode = (props, context) => {
685
687
  const { headerState } = props.node;
686
- const tag = (0, import_richtext3.getRichTextTagFromTableCellHeaderState)(headerState);
688
+ const tag = (0, import_richtext4.getRichTextTagFromTableCellHeaderState)(headerState);
687
689
  return (0, import_vue15.h)(tag, {}, context.slots);
688
690
  };
689
691
 
@@ -700,11 +702,11 @@ var TableRowRichTextNode = (_, context) => {
700
702
  };
701
703
 
702
704
  // src/components/UniformRichText/nodes/TextRichTextNode.ts
703
- var import_richtext4 = require("@uniformdev/richtext");
705
+ var import_richtext5 = require("@uniformdev/richtext");
704
706
  var import_vue18 = require("vue");
705
707
  var TextRichTextNode = (props) => {
706
708
  const { format, text } = props.node;
707
- const tags = (0, import_richtext4.getRichTextTagsFromTextFormat)(format);
709
+ const tags = (0, import_richtext5.getRichTextTagsFromTextFormat)(format);
708
710
  return tags.length > 0 ? tags.reduceRight(
709
711
  (children, tag) => {
710
712
  return (0, import_vue18.h)(tag, null, children);
@@ -717,11 +719,11 @@ var TextRichTextNode = (props) => {
717
719
 
718
720
  // src/components/UniformRichText/UniformRichText.ts
719
721
  var import_canvas7 = require("@uniformdev/canvas");
720
- var import_richtext6 = require("@uniformdev/richtext");
722
+ var import_richtext7 = require("@uniformdev/richtext");
721
723
  var import_vue23 = require("vue");
722
724
 
723
725
  // src/components/UniformRichText/UniformRichTextNode.ts
724
- var import_richtext5 = require("@uniformdev/richtext");
726
+ var import_richtext6 = require("@uniformdev/richtext");
725
727
  var import_vue22 = require("vue");
726
728
 
727
729
  // src/components/UniformRichText/nodes/CodeRichTextNode.ts
@@ -758,7 +760,7 @@ var UniformRichTextNode = (0, import_vue22.defineComponent)({
758
760
  setup(props, context) {
759
761
  var _a;
760
762
  const node = props.node;
761
- if (!(0, import_richtext5.isRichTextNode)(node)) return () => null;
763
+ if (!(0, import_richtext6.isRichTextNode)(node)) return () => null;
762
764
  let NodeRenderer = node.type in context.slots ? context.slots[node.type] : (_a = props.resolveRichTextRenderer) == null ? void 0 : _a.call(props, node);
763
765
  if (typeof NodeRenderer === "undefined") {
764
766
  NodeRenderer = resolveRichTextDefaultRenderer(node);
@@ -837,10 +839,10 @@ var UniformRichText = (0, import_vue23.defineComponent)({
837
839
  }
838
840
  const placeholderProp = (_b = props.placeholder) != null ? _b : contextualEditingDefaultPlaceholder;
839
841
  const computedPlaceholder = typeof placeholderProp === "function" ? placeholderProp({ id: props.parameterId }) : placeholderProp;
840
- if (!(0, import_richtext6.isRichTextNode)(root)) {
842
+ if (!(0, import_richtext7.isRichTextNode)(root)) {
841
843
  return () => null;
842
844
  }
843
- if ((isContextualEditing == null ? void 0 : isContextualEditing.value) && (0, import_richtext6.isRichTextValueConsideredEmpty)(value.value)) {
845
+ if ((isContextualEditing == null ? void 0 : isContextualEditing.value) && (0, import_richtext7.isRichTextValueConsideredEmpty)(value.value)) {
844
846
  return () => maybeWrapInTag(
845
847
  tag,
846
848
  { isContextualEditing, componentId: componentData == null ? void 0 : componentData._id, parameterId: props.parameterId },
package/dist/index.mjs CHANGED
@@ -612,13 +612,15 @@ var LinkRichTextNode = (props, context) => {
612
612
  };
613
613
 
614
614
  // src/components/UniformRichText/nodes/ListItemRichTextNode.ts
615
+ import { getRichTextListItemValue } from "@uniformdev/richtext";
615
616
  import { h as h9 } from "vue";
616
617
  var ListItemRichTextNode = (props, context) => {
617
618
  const { value } = props.node;
619
+ const normalizedValue = getRichTextListItemValue(value);
618
620
  return h9(
619
621
  "li",
620
622
  {
621
- value: Number.isFinite(value) && value > 0 ? value : void 0
623
+ value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
622
624
  },
623
625
  context.slots
624
626
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-vue",
3
- "version": "20.74.7-alpha.12+f93a44837e",
3
+ "version": "20.74.7-alpha.15.sha-2e86ba8d87",
4
4
  "description": "Vue SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -29,9 +29,9 @@
29
29
  "apidocs-extract": "api-extractor run --local"
30
30
  },
31
31
  "dependencies": {
32
- "@uniformdev/canvas": "20.74.7-alpha.12+f93a44837e",
33
- "@uniformdev/context-vue": "20.74.7-alpha.12+f93a44837e",
34
- "@uniformdev/richtext": "20.74.7-alpha.12+f93a44837e"
32
+ "@uniformdev/canvas": "20.74.7-alpha.15.sha-2e86ba8d87",
33
+ "@uniformdev/context-vue": "20.74.7-alpha.15.sha-2e86ba8d87",
34
+ "@uniformdev/richtext": "20.74.7-alpha.15.sha-2e86ba8d87"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "vue": ">=3.0.0"
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "f93a44837e168f8ece4f56657a29a6f72467c1cb"
61
+ "gitHead": "2e86ba8d87b7176b519d928189d131385ae6cab5"
62
62
  }