@uniformdev/canvas-vue 20.75.1-alpha.0 → 20.76.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.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
@@ -613,13 +613,15 @@ var LinkRichTextNode = (props, context) => {
613
613
  };
614
614
 
615
615
  // src/components/UniformRichText/nodes/ListItemRichTextNode.ts
616
+ import { getRichTextListItemValue } from "@uniformdev/richtext";
616
617
  import { h as h9 } from "vue";
617
618
  var ListItemRichTextNode = (props, context) => {
618
619
  const { value } = props.node;
620
+ const normalizedValue = getRichTextListItemValue(value);
619
621
  return h9(
620
622
  "li",
621
623
  {
622
- value: Number.isFinite(value) && value > 0 ? value : void 0
624
+ value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
623
625
  },
624
626
  context.slots
625
627
  );
package/dist/index.js CHANGED
@@ -633,13 +633,15 @@ var LinkRichTextNode = (props, context) => {
633
633
  };
634
634
 
635
635
  // src/components/UniformRichText/nodes/ListItemRichTextNode.ts
636
+ var import_richtext2 = require("@uniformdev/richtext");
636
637
  var import_vue10 = require("vue");
637
638
  var ListItemRichTextNode = (props, context) => {
638
639
  const { value } = props.node;
640
+ const normalizedValue = (0, import_richtext2.getRichTextListItemValue)(value);
639
641
  return (0, import_vue10.h)(
640
642
  "li",
641
643
  {
642
- value: Number.isFinite(value) && value > 0 ? value : void 0
644
+ value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
643
645
  },
644
646
  context.slots
645
647
  );
@@ -653,15 +655,15 @@ var ListRichTextNode = (props, context) => {
653
655
  };
654
656
 
655
657
  // src/components/UniformRichText/nodes/ParagraphRichTextNode.ts
656
- var import_richtext2 = require("@uniformdev/richtext");
658
+ var import_richtext3 = require("@uniformdev/richtext");
657
659
  var import_vue12 = require("vue");
658
660
  var ParagraphRichTextNode = (props, context) => {
659
661
  const { format, direction } = props.node;
660
662
  return (0, import_vue12.h)(
661
663
  "p",
662
664
  {
663
- dir: (0, import_richtext2.isPureDirection)(direction) ? direction : void 0,
664
- style: (0, import_richtext2.isPureTextAlign)(format) ? { textAlign: format } : void 0
665
+ dir: (0, import_richtext3.isPureDirection)(direction) ? direction : void 0,
666
+ style: (0, import_richtext3.isPureTextAlign)(format) ? { textAlign: format } : void 0
665
667
  },
666
668
  context.slots
667
669
  );
@@ -680,11 +682,11 @@ var RootRichTextNode = (props, c) => {
680
682
  };
681
683
 
682
684
  // src/components/UniformRichText/nodes/TableCellRichTextNode.ts
683
- var import_richtext3 = require("@uniformdev/richtext");
685
+ var import_richtext4 = require("@uniformdev/richtext");
684
686
  var import_vue15 = require("vue");
685
687
  var TableCellRichTextNode = (props, context) => {
686
688
  const { headerState } = props.node;
687
- const tag = (0, import_richtext3.getRichTextTagFromTableCellHeaderState)(headerState);
689
+ const tag = (0, import_richtext4.getRichTextTagFromTableCellHeaderState)(headerState);
688
690
  return (0, import_vue15.h)(tag, {}, context.slots);
689
691
  };
690
692
 
@@ -701,11 +703,11 @@ var TableRowRichTextNode = (_, context) => {
701
703
  };
702
704
 
703
705
  // src/components/UniformRichText/nodes/TextRichTextNode.ts
704
- var import_richtext4 = require("@uniformdev/richtext");
706
+ var import_richtext5 = require("@uniformdev/richtext");
705
707
  var import_vue18 = require("vue");
706
708
  var TextRichTextNode = (props) => {
707
709
  const { format, text } = props.node;
708
- const tags = (0, import_richtext4.getRichTextTagsFromTextFormat)(format);
710
+ const tags = (0, import_richtext5.getRichTextTagsFromTextFormat)(format);
709
711
  return tags.length > 0 ? tags.reduceRight(
710
712
  (children, tag) => {
711
713
  return (0, import_vue18.h)(tag, null, children);
@@ -718,11 +720,11 @@ var TextRichTextNode = (props) => {
718
720
 
719
721
  // src/components/UniformRichText/UniformRichText.ts
720
722
  var import_canvas7 = require("@uniformdev/canvas");
721
- var import_richtext6 = require("@uniformdev/richtext");
723
+ var import_richtext7 = require("@uniformdev/richtext");
722
724
  var import_vue23 = require("vue");
723
725
 
724
726
  // src/components/UniformRichText/UniformRichTextNode.ts
725
- var import_richtext5 = require("@uniformdev/richtext");
727
+ var import_richtext6 = require("@uniformdev/richtext");
726
728
  var import_vue22 = require("vue");
727
729
 
728
730
  // src/components/UniformRichText/nodes/CodeRichTextNode.ts
@@ -759,7 +761,7 @@ var UniformRichTextNode = (0, import_vue22.defineComponent)({
759
761
  setup(props, context) {
760
762
  var _a;
761
763
  const node = props.node;
762
- if (!(0, import_richtext5.isRichTextNode)(node)) return () => null;
764
+ if (!(0, import_richtext6.isRichTextNode)(node)) return () => null;
763
765
  let NodeRenderer = node.type in context.slots ? context.slots[node.type] : (_a = props.resolveRichTextRenderer) == null ? void 0 : _a.call(props, node);
764
766
  if (typeof NodeRenderer === "undefined") {
765
767
  NodeRenderer = resolveRichTextDefaultRenderer(node);
@@ -838,10 +840,10 @@ var UniformRichText = (0, import_vue23.defineComponent)({
838
840
  }
839
841
  const placeholderProp = (_b = props.placeholder) != null ? _b : contextualEditingDefaultPlaceholder;
840
842
  const computedPlaceholder = typeof placeholderProp === "function" ? placeholderProp({ id: props.parameterId }) : placeholderProp;
841
- if (!(0, import_richtext6.isRichTextNode)(root)) {
843
+ if (!(0, import_richtext7.isRichTextNode)(root)) {
842
844
  return () => null;
843
845
  }
844
- if ((isContextualEditing == null ? void 0 : isContextualEditing.value) && (0, import_richtext6.isRichTextValueConsideredEmpty)(value.value)) {
846
+ if ((isContextualEditing == null ? void 0 : isContextualEditing.value) && (0, import_richtext7.isRichTextValueConsideredEmpty)(value.value)) {
845
847
  return () => maybeWrapInTag(
846
848
  tag,
847
849
  { isContextualEditing, componentId: componentData == null ? void 0 : componentData._id, parameterId: props.parameterId },
package/dist/index.mjs CHANGED
@@ -613,13 +613,15 @@ var LinkRichTextNode = (props, context) => {
613
613
  };
614
614
 
615
615
  // src/components/UniformRichText/nodes/ListItemRichTextNode.ts
616
+ import { getRichTextListItemValue } from "@uniformdev/richtext";
616
617
  import { h as h9 } from "vue";
617
618
  var ListItemRichTextNode = (props, context) => {
618
619
  const { value } = props.node;
620
+ const normalizedValue = getRichTextListItemValue(value);
619
621
  return h9(
620
622
  "li",
621
623
  {
622
- value: Number.isFinite(value) && value > 0 ? value : void 0
624
+ value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
623
625
  },
624
626
  context.slots
625
627
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-vue",
3
- "version": "20.75.1-alpha.0+effbce0886",
3
+ "version": "20.76.1-alpha.3+61820b0b3e",
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.75.1-alpha.0+effbce0886",
33
- "@uniformdev/context-vue": "20.75.1-alpha.0+effbce0886",
34
- "@uniformdev/richtext": "20.75.1-alpha.0+effbce0886"
32
+ "@uniformdev/canvas": "20.76.1-alpha.3+61820b0b3e",
33
+ "@uniformdev/context-vue": "20.76.1-alpha.3+61820b0b3e",
34
+ "@uniformdev/richtext": "20.76.1-alpha.3+61820b0b3e"
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": "effbce0886d68a0e9a4f9b492b5f263eafa73813"
61
+ "gitHead": "61820b0b3e1be2512bcfad6bd0a30092ffa7f9a3"
62
62
  }