@uniformdev/canvas-vue 20.75.1-alpha.16 → 20.75.1-alpha.6

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