@uniformdev/canvas-vue 19.177.2-alpha.10 → 19.178.0

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
@@ -2783,12 +2783,6 @@ declare const QuoteRichTextNode: RichTextRendererComponent;
2783
2783
 
2784
2784
  declare const RootRichTextNode: RichTextRendererComponent;
2785
2785
 
2786
- declare const TableCellRichTextNode: RichTextRendererComponent;
2787
-
2788
- declare const TableRichTextNode: RichTextRendererComponent;
2789
-
2790
- declare const TableRowRichTextNode: RichTextRendererComponent;
2791
-
2792
2786
  declare const TextRichTextNode: RichTextRendererComponent;
2793
2787
 
2794
2788
  type UniformRichTextProps = {
@@ -2891,4 +2885,4 @@ declare const globalCompositionEnhancerInjectionKey = "uniformGlobalCompositionE
2891
2885
  */
2892
2886
  declare function convertComponentToProps<T = unknown>(component: ComponentInstance): ComponentProps<T>;
2893
2887
 
2894
- export { type ComponentProps, DefaultNotImplementedComponent, type DefaultNotImplementedComponentProps, HeadingRichTextNode, LinkRichTextNode, ListItemRichTextNode, ListRichTextNode, ParagraphRichTextNode, type PersonalizeComponent, QuoteRichTextNode, type RenderRichTextComponentResolver, type ResolveRenderer, type RichTextComponentProps, type RichTextRendererComponent, RootRichTextNode, TableCellRichTextNode, TableRichTextNode, TableRowRichTextNode, type TestComponent, TextRichTextNode, UniformComponent, type UniformComponentProps, UniformComposition, type UniformCompositionProps, UniformPlayground, type UniformPlaygroundProps, UniformRichText, UniformRichTextNode, type UniformRichTextNodeProps, type UniformRichTextProps, UniformSlot, type UniformSlotProps, UniformText, type UniformTextProps, type UseCompositionEventEffectOptions, type UseUniformContextualEditingProps, convertComponentToProps, globalCompositionEnhancerInjectionKey, useCompositionEventEffect, useUniformContextualEditing, useUniformCurrentComponent, useUniformCurrentComposition };
2888
+ export { type ComponentProps, DefaultNotImplementedComponent, type DefaultNotImplementedComponentProps, HeadingRichTextNode, LinkRichTextNode, ListItemRichTextNode, ListRichTextNode, ParagraphRichTextNode, type PersonalizeComponent, QuoteRichTextNode, type RenderRichTextComponentResolver, type ResolveRenderer, type RichTextComponentProps, type RichTextRendererComponent, RootRichTextNode, type TestComponent, TextRichTextNode, UniformComponent, type UniformComponentProps, UniformComposition, type UniformCompositionProps, UniformPlayground, type UniformPlaygroundProps, UniformRichText, UniformRichTextNode, type UniformRichTextNodeProps, type UniformRichTextProps, UniformSlot, type UniformSlotProps, UniformText, type UniformTextProps, type UseCompositionEventEffectOptions, type UseUniformContextualEditingProps, convertComponentToProps, globalCompositionEnhancerInjectionKey, useCompositionEventEffect, useUniformContextualEditing, useUniformCurrentComponent, useUniformCurrentComposition };
package/dist/index.d.ts CHANGED
@@ -2783,12 +2783,6 @@ declare const QuoteRichTextNode: RichTextRendererComponent;
2783
2783
 
2784
2784
  declare const RootRichTextNode: RichTextRendererComponent;
2785
2785
 
2786
- declare const TableCellRichTextNode: RichTextRendererComponent;
2787
-
2788
- declare const TableRichTextNode: RichTextRendererComponent;
2789
-
2790
- declare const TableRowRichTextNode: RichTextRendererComponent;
2791
-
2792
2786
  declare const TextRichTextNode: RichTextRendererComponent;
2793
2787
 
2794
2788
  type UniformRichTextProps = {
@@ -2891,4 +2885,4 @@ declare const globalCompositionEnhancerInjectionKey = "uniformGlobalCompositionE
2891
2885
  */
2892
2886
  declare function convertComponentToProps<T = unknown>(component: ComponentInstance): ComponentProps<T>;
2893
2887
 
2894
- export { type ComponentProps, DefaultNotImplementedComponent, type DefaultNotImplementedComponentProps, HeadingRichTextNode, LinkRichTextNode, ListItemRichTextNode, ListRichTextNode, ParagraphRichTextNode, type PersonalizeComponent, QuoteRichTextNode, type RenderRichTextComponentResolver, type ResolveRenderer, type RichTextComponentProps, type RichTextRendererComponent, RootRichTextNode, TableCellRichTextNode, TableRichTextNode, TableRowRichTextNode, type TestComponent, TextRichTextNode, UniformComponent, type UniformComponentProps, UniformComposition, type UniformCompositionProps, UniformPlayground, type UniformPlaygroundProps, UniformRichText, UniformRichTextNode, type UniformRichTextNodeProps, type UniformRichTextProps, UniformSlot, type UniformSlotProps, UniformText, type UniformTextProps, type UseCompositionEventEffectOptions, type UseUniformContextualEditingProps, convertComponentToProps, globalCompositionEnhancerInjectionKey, useCompositionEventEffect, useUniformContextualEditing, useUniformCurrentComponent, useUniformCurrentComposition };
2888
+ export { type ComponentProps, DefaultNotImplementedComponent, type DefaultNotImplementedComponentProps, HeadingRichTextNode, LinkRichTextNode, ListItemRichTextNode, ListRichTextNode, ParagraphRichTextNode, type PersonalizeComponent, QuoteRichTextNode, type RenderRichTextComponentResolver, type ResolveRenderer, type RichTextComponentProps, type RichTextRendererComponent, RootRichTextNode, type TestComponent, TextRichTextNode, UniformComponent, type UniformComponentProps, UniformComposition, type UniformCompositionProps, UniformPlayground, type UniformPlaygroundProps, UniformRichText, UniformRichTextNode, type UniformRichTextNodeProps, type UniformRichTextProps, UniformSlot, type UniformSlotProps, UniformText, type UniformTextProps, type UseCompositionEventEffectOptions, type UseUniformContextualEditingProps, convertComponentToProps, globalCompositionEnhancerInjectionKey, useCompositionEventEffect, useUniformContextualEditing, useUniformCurrentComponent, useUniformCurrentComposition };
package/dist/index.esm.js CHANGED
@@ -472,67 +472,46 @@ var RootRichTextNode = (props, c) => {
472
472
  return h12(() => c.slots.default ? c.slots.default() : null);
473
473
  };
474
474
 
475
- // src/components/UniformRichText/nodes/TableCellRichTextNode.ts
476
- import { getRichTextTagFromTableCellHeaderState } from "@uniformdev/richtext";
477
- import { h as h13 } from "vue-demi";
478
- var TableCellRichTextNode = (props, context) => {
479
- const { headerState } = props.node;
480
- const tag = getRichTextTagFromTableCellHeaderState(headerState);
481
- return h13(tag, {}, context.slots);
482
- };
483
-
484
- // src/components/UniformRichText/nodes/TableRichTextNode.ts
485
- import { h as h14 } from "vue-demi";
486
- var TableRichTextNode = (_, context) => {
487
- return h14("table", {}, h14("tbody", {}, context.slots));
488
- };
489
-
490
- // src/components/UniformRichText/nodes/TableRowRichTextNode.ts
491
- import { h as h15 } from "vue-demi";
492
- var TableRowRichTextNode = (_, context) => {
493
- return h15("tr", {}, context.slots);
494
- };
495
-
496
475
  // src/components/UniformRichText/nodes/TextRichTextNode.ts
497
476
  import { getRichTextTagsFromTextFormat } from "@uniformdev/richtext";
498
- import { h as h16 } from "vue-demi";
477
+ import { h as h13 } from "vue-demi";
499
478
  var TextRichTextNode = (props) => {
500
479
  const { format, text } = props.node;
501
480
  const tags = getRichTextTagsFromTextFormat(format);
502
481
  return tags.length > 0 ? tags.reduceRight(
503
482
  (children, tag) => {
504
- return h16(tag, null, children);
483
+ return h13(tag, null, children);
505
484
  },
506
485
  {
507
486
  default: () => text
508
487
  }
509
- ) : h16(() => text);
488
+ ) : h13(() => text);
510
489
  };
511
490
 
512
491
  // src/components/UniformRichText/UniformRichText.ts
513
492
  import { isRichTextNode as isRichTextNode2 } from "@uniformdev/richtext";
514
- import { computed as computed4, defineComponent as defineComponent7, h as h21 } from "vue-demi";
493
+ import { computed as computed4, defineComponent as defineComponent7, h as h18 } from "vue-demi";
515
494
 
516
495
  // src/components/UniformRichText/UniformRichTextNode.ts
517
496
  import { isRichTextNode } from "@uniformdev/richtext";
518
- import { defineComponent as defineComponent6, h as h20 } from "vue-demi";
497
+ import { defineComponent as defineComponent6, h as h17 } from "vue-demi";
519
498
 
520
499
  // src/components/UniformRichText/nodes/CodeRichTextNode.ts
521
- import { h as h17 } from "vue-demi";
500
+ import { h as h14 } from "vue-demi";
522
501
  var CodeRichTextNode = (_, context) => {
523
- return h17("pre", {}, h17("code", {}, context.slots));
502
+ return h14("pre", {}, h14("code", {}, context.slots));
524
503
  };
525
504
 
526
505
  // src/components/UniformRichText/nodes/LinebreakRichTextNode.ts
527
- import { h as h18 } from "vue-demi";
506
+ import { h as h15 } from "vue-demi";
528
507
  var LinebreakRichTextNode = () => {
529
- return h18("br", {});
508
+ return h15("br", {});
530
509
  };
531
510
 
532
511
  // src/components/UniformRichText/nodes/TabRichTextNode.ts
533
- import { h as h19 } from "vue-demi";
512
+ import { h as h16 } from "vue-demi";
534
513
  var TabRichTextNode = () => {
535
- return h19("", {}, " ");
514
+ return h16("", {}, " ");
536
515
  };
537
516
 
538
517
  // src/components/UniformRichText/UniformRichTextNode.ts
@@ -560,13 +539,13 @@ var UniformRichTextNode = defineComponent6({
560
539
  return () => null;
561
540
  }
562
541
  const children = node.children ? node.children.map(
563
- (childNode) => h20(
542
+ (childNode) => h17(
564
543
  UniformRichTextNode,
565
544
  { node: childNode, resolveRichTextRenderer: props.resolveRichTextRenderer },
566
545
  context.slots
567
546
  )
568
547
  ) : [];
569
- return () => h20(NodeRenderer, { node, children: h20(() => children) }, () => children);
548
+ return () => h17(NodeRenderer, { node, children: h17(() => children) }, () => children);
570
549
  }
571
550
  });
572
551
  var rendererMap = /* @__PURE__ */ new Map([
@@ -580,10 +559,7 @@ var rendererMap = /* @__PURE__ */ new Map([
580
559
  ["code", CodeRichTextNode],
581
560
  ["root", RootRichTextNode],
582
561
  ["text", TextRichTextNode],
583
- ["tab", TabRichTextNode],
584
- ["table", TableRichTextNode],
585
- ["tablerow", TableRowRichTextNode],
586
- ["tablecell", TableCellRichTextNode]
562
+ ["tab", TabRichTextNode]
587
563
  ]);
588
564
  var resolveRichTextDefaultRenderer = (node) => {
589
565
  return rendererMap.get(node.type);
@@ -612,7 +588,7 @@ var UniformRichText = defineComponent7({
612
588
  });
613
589
  const root = (_a = value.value) == null ? void 0 : _a.root;
614
590
  if (isRichTextNode2(root)) {
615
- return () => h21(
591
+ return () => h18(
616
592
  UniformRichTextNode,
617
593
  {
618
594
  node: root,
@@ -636,7 +612,7 @@ import {
636
612
  mapSlotToTestVariations
637
613
  } from "@uniformdev/canvas";
638
614
  import { Personalize, Test } from "@uniformdev/context-vue";
639
- import { computed as computed5, defineComponent as defineComponent8, h as h22 } from "vue-demi";
615
+ import { computed as computed5, defineComponent as defineComponent8, h as h19 } from "vue-demi";
640
616
 
641
617
  // src/helpers/convertComponentToProps.ts
642
618
  function convertComponentToProps(component) {
@@ -707,7 +683,7 @@ function renderPersonalizeComponent(component, resolveRenderer) {
707
683
  const parameters = component == null ? void 0 : component.parameters;
708
684
  const processedVariants = mapSlotToPersonalizedVariations((_a = component.slots) == null ? void 0 : _a.pz);
709
685
  const name = (_d = (_c = (_b = component.parameters) == null ? void 0 : _b.trackingEventName) == null ? void 0 : _c.value) != null ? _d : "Untitled Personalization";
710
- return h22(Personalize, {
686
+ return h19(Personalize, {
711
687
  name,
712
688
  // TODO: Fix the `as unknown`
713
689
  component: (variant) => resolveRenderer(variant),
@@ -720,7 +696,7 @@ function renderTestComponent(component, resolveRenderer) {
720
696
  const variants = (_b = (_a = component == null ? void 0 : component.slots) == null ? void 0 : _a.test) != null ? _b : [];
721
697
  const testName = (_e = (_d = (_c = component == null ? void 0 : component.parameters) == null ? void 0 : _c.test) == null ? void 0 : _d.value) != null ? _e : "Untitled Test";
722
698
  const finalVariants = mapSlotToTestVariations(variants);
723
- return h22(Test, {
699
+ return h19(Test, {
724
700
  variations: finalVariants,
725
701
  name: testName,
726
702
  component: (variant) => resolveRenderer(variant)
@@ -774,13 +750,13 @@ function renderComponent({
774
750
  const resolvedComponent = resolveRenderer == null ? void 0 : resolveRenderer(component);
775
751
  if (resolvedComponent) {
776
752
  const props = convertComponentToProps(component);
777
- return h22(
753
+ return h19(
778
754
  UniformComponent,
779
755
  { data: component, resolveRenderer },
780
- () => h22(
756
+ () => h19(
781
757
  ContextualEditingComponentWrapper,
782
758
  { component, parentComponent, slotName, indexInSlot, slotChildrenCount },
783
- { default: () => h22(resolvedComponent, props), emptyPlaceholder }
759
+ { default: () => h19(resolvedComponent, props), emptyPlaceholder }
784
760
  )
785
761
  );
786
762
  }
@@ -788,7 +764,7 @@ function renderComponent({
788
764
  `[canvas] found component of type '${component.type}' which the 'resolveRenderer' prop returned no component for. Nothing will be rendered. The resolveRenderer function may need to be extended to handle the new type.`,
789
765
  component
790
766
  );
791
- return h22("");
767
+ return h19("");
792
768
  }
793
769
 
794
770
  // src/components/UniformText.ts
@@ -797,7 +773,7 @@ import {
797
773
  ATTRIBUTE_PARAMETER_VALUE,
798
774
  ATTRIBUTE_PLACEHOLDER
799
775
  } from "@uniformdev/canvas";
800
- import { computed as computed6, defineComponent as defineComponent9, h as h23, ref as ref2 } from "vue-demi";
776
+ import { computed as computed6, defineComponent as defineComponent9, h as h20, ref as ref2 } from "vue-demi";
801
777
  var DEFAULT_ELEMENT_TYPE = "span";
802
778
  var UniformText = defineComponent9({
803
779
  name: "UniformText",
@@ -851,7 +827,7 @@ var UniformText = defineComponent9({
851
827
  if (!isContextualEditing) {
852
828
  return () => {
853
829
  var _a2, _b, _c, _d;
854
- return h23(
830
+ return h20(
855
831
  (_a2 = props.as) != null ? _a2 : DEFAULT_ELEMENT_TYPE,
856
832
  { style: props.isMultiline ? { whiteSpace: "pre-wrap" } : {} },
857
833
  (_d = (_c = (_b = context.slots).default) == null ? void 0 : _c.call(_b, value.value)) != null ? _d : value.value
@@ -862,7 +838,7 @@ var UniformText = defineComponent9({
862
838
  const computedPlaceholder = typeof placeholderProp === "function" ? placeholderProp({ id: props.parameterId }) : placeholderProp;
863
839
  return () => {
864
840
  var _a2, _b, _c, _d, _e;
865
- return h23(
841
+ return h20(
866
842
  (_a2 = props.as) != null ? _a2 : DEFAULT_ELEMENT_TYPE,
867
843
  {
868
844
  ...getParameterAttributes({
@@ -931,9 +907,6 @@ export {
931
907
  ParagraphRichTextNode,
932
908
  QuoteRichTextNode,
933
909
  RootRichTextNode,
934
- TableCellRichTextNode,
935
- TableRichTextNode,
936
- TableRowRichTextNode,
937
910
  TextRichTextNode,
938
911
  UniformComponent,
939
912
  UniformComposition,
package/dist/index.js CHANGED
@@ -28,9 +28,6 @@ __export(src_exports, {
28
28
  ParagraphRichTextNode: () => ParagraphRichTextNode,
29
29
  QuoteRichTextNode: () => QuoteRichTextNode,
30
30
  RootRichTextNode: () => RootRichTextNode,
31
- TableCellRichTextNode: () => TableCellRichTextNode,
32
- TableRichTextNode: () => TableRichTextNode,
33
- TableRowRichTextNode: () => TableRowRichTextNode,
34
31
  TextRichTextNode: () => TextRichTextNode,
35
32
  UniformComponent: () => UniformComponent,
36
33
  UniformComposition: () => UniformComposition,
@@ -495,71 +492,50 @@ var RootRichTextNode = (props, c) => {
495
492
  return (0, import_vue_demi13.h)(() => c.slots.default ? c.slots.default() : null);
496
493
  };
497
494
 
498
- // src/components/UniformRichText/nodes/TableCellRichTextNode.ts
495
+ // src/components/UniformRichText/nodes/TextRichTextNode.ts
499
496
  var import_richtext3 = require("@uniformdev/richtext");
500
497
  var import_vue_demi14 = require("vue-demi");
501
- var TableCellRichTextNode = (props, context) => {
502
- const { headerState } = props.node;
503
- const tag = (0, import_richtext3.getRichTextTagFromTableCellHeaderState)(headerState);
504
- return (0, import_vue_demi14.h)(tag, {}, context.slots);
505
- };
506
-
507
- // src/components/UniformRichText/nodes/TableRichTextNode.ts
508
- var import_vue_demi15 = require("vue-demi");
509
- var TableRichTextNode = (_, context) => {
510
- return (0, import_vue_demi15.h)("table", {}, (0, import_vue_demi15.h)("tbody", {}, context.slots));
511
- };
512
-
513
- // src/components/UniformRichText/nodes/TableRowRichTextNode.ts
514
- var import_vue_demi16 = require("vue-demi");
515
- var TableRowRichTextNode = (_, context) => {
516
- return (0, import_vue_demi16.h)("tr", {}, context.slots);
517
- };
518
-
519
- // src/components/UniformRichText/nodes/TextRichTextNode.ts
520
- var import_richtext4 = require("@uniformdev/richtext");
521
- var import_vue_demi17 = require("vue-demi");
522
498
  var TextRichTextNode = (props) => {
523
499
  const { format, text } = props.node;
524
- const tags = (0, import_richtext4.getRichTextTagsFromTextFormat)(format);
500
+ const tags = (0, import_richtext3.getRichTextTagsFromTextFormat)(format);
525
501
  return tags.length > 0 ? tags.reduceRight(
526
502
  (children, tag) => {
527
- return (0, import_vue_demi17.h)(tag, null, children);
503
+ return (0, import_vue_demi14.h)(tag, null, children);
528
504
  },
529
505
  {
530
506
  default: () => text
531
507
  }
532
- ) : (0, import_vue_demi17.h)(() => text);
508
+ ) : (0, import_vue_demi14.h)(() => text);
533
509
  };
534
510
 
535
511
  // src/components/UniformRichText/UniformRichText.ts
536
- var import_richtext6 = require("@uniformdev/richtext");
537
- var import_vue_demi22 = require("vue-demi");
512
+ var import_richtext5 = require("@uniformdev/richtext");
513
+ var import_vue_demi19 = require("vue-demi");
538
514
 
539
515
  // src/components/UniformRichText/UniformRichTextNode.ts
540
- var import_richtext5 = require("@uniformdev/richtext");
541
- var import_vue_demi21 = require("vue-demi");
516
+ var import_richtext4 = require("@uniformdev/richtext");
517
+ var import_vue_demi18 = require("vue-demi");
542
518
 
543
519
  // src/components/UniformRichText/nodes/CodeRichTextNode.ts
544
- var import_vue_demi18 = require("vue-demi");
520
+ var import_vue_demi15 = require("vue-demi");
545
521
  var CodeRichTextNode = (_, context) => {
546
- return (0, import_vue_demi18.h)("pre", {}, (0, import_vue_demi18.h)("code", {}, context.slots));
522
+ return (0, import_vue_demi15.h)("pre", {}, (0, import_vue_demi15.h)("code", {}, context.slots));
547
523
  };
548
524
 
549
525
  // src/components/UniformRichText/nodes/LinebreakRichTextNode.ts
550
- var import_vue_demi19 = require("vue-demi");
526
+ var import_vue_demi16 = require("vue-demi");
551
527
  var LinebreakRichTextNode = () => {
552
- return (0, import_vue_demi19.h)("br", {});
528
+ return (0, import_vue_demi16.h)("br", {});
553
529
  };
554
530
 
555
531
  // src/components/UniformRichText/nodes/TabRichTextNode.ts
556
- var import_vue_demi20 = require("vue-demi");
532
+ var import_vue_demi17 = require("vue-demi");
557
533
  var TabRichTextNode = () => {
558
- return (0, import_vue_demi20.h)("", {}, " ");
534
+ return (0, import_vue_demi17.h)("", {}, " ");
559
535
  };
560
536
 
561
537
  // src/components/UniformRichText/UniformRichTextNode.ts
562
- var UniformRichTextNode = (0, import_vue_demi21.defineComponent)({
538
+ var UniformRichTextNode = (0, import_vue_demi18.defineComponent)({
563
539
  name: "UniformRichTextNode",
564
540
  props: {
565
541
  node: {
@@ -574,7 +550,7 @@ var UniformRichTextNode = (0, import_vue_demi21.defineComponent)({
574
550
  setup(props, context) {
575
551
  var _a;
576
552
  const node = props.node;
577
- if (!(0, import_richtext5.isRichTextNode)(node)) return () => null;
553
+ if (!(0, import_richtext4.isRichTextNode)(node)) return () => null;
578
554
  let NodeRenderer = node.type in context.slots ? context.slots[node.type] : (_a = props.resolveRichTextRenderer) == null ? void 0 : _a.call(props, node);
579
555
  if (typeof NodeRenderer === "undefined") {
580
556
  NodeRenderer = resolveRichTextDefaultRenderer(node);
@@ -583,13 +559,13 @@ var UniformRichTextNode = (0, import_vue_demi21.defineComponent)({
583
559
  return () => null;
584
560
  }
585
561
  const children = node.children ? node.children.map(
586
- (childNode) => (0, import_vue_demi21.h)(
562
+ (childNode) => (0, import_vue_demi18.h)(
587
563
  UniformRichTextNode,
588
564
  { node: childNode, resolveRichTextRenderer: props.resolveRichTextRenderer },
589
565
  context.slots
590
566
  )
591
567
  ) : [];
592
- return () => (0, import_vue_demi21.h)(NodeRenderer, { node, children: (0, import_vue_demi21.h)(() => children) }, () => children);
568
+ return () => (0, import_vue_demi18.h)(NodeRenderer, { node, children: (0, import_vue_demi18.h)(() => children) }, () => children);
593
569
  }
594
570
  });
595
571
  var rendererMap = /* @__PURE__ */ new Map([
@@ -603,17 +579,14 @@ var rendererMap = /* @__PURE__ */ new Map([
603
579
  ["code", CodeRichTextNode],
604
580
  ["root", RootRichTextNode],
605
581
  ["text", TextRichTextNode],
606
- ["tab", TabRichTextNode],
607
- ["table", TableRichTextNode],
608
- ["tablerow", TableRowRichTextNode],
609
- ["tablecell", TableCellRichTextNode]
582
+ ["tab", TabRichTextNode]
610
583
  ]);
611
584
  var resolveRichTextDefaultRenderer = (node) => {
612
585
  return rendererMap.get(node.type);
613
586
  };
614
587
 
615
588
  // src/components/UniformRichText/UniformRichText.ts
616
- var UniformRichText = (0, import_vue_demi22.defineComponent)({
589
+ var UniformRichText = (0, import_vue_demi19.defineComponent)({
617
590
  name: "UniformRichText",
618
591
  props: {
619
592
  parameterId: {
@@ -628,14 +601,14 @@ var UniformRichText = (0, import_vue_demi22.defineComponent)({
628
601
  setup(props, context) {
629
602
  var _a;
630
603
  const { data: componentData } = useUniformCurrentComponent();
631
- const value = (0, import_vue_demi22.computed)(() => {
604
+ const value = (0, import_vue_demi19.computed)(() => {
632
605
  var _a2;
633
606
  const parameter = (_a2 = componentData == null ? void 0 : componentData.parameters) == null ? void 0 : _a2[props.parameterId];
634
607
  return parameter == null ? void 0 : parameter.value;
635
608
  });
636
609
  const root = (_a = value.value) == null ? void 0 : _a.root;
637
- if ((0, import_richtext6.isRichTextNode)(root)) {
638
- return () => (0, import_vue_demi22.h)(
610
+ if ((0, import_richtext5.isRichTextNode)(root)) {
611
+ return () => (0, import_vue_demi19.h)(
639
612
  UniformRichTextNode,
640
613
  {
641
614
  node: root,
@@ -652,7 +625,7 @@ var UniformRichText = (0, import_vue_demi22.defineComponent)({
652
625
  // src/components/UniformSlot.ts
653
626
  var import_canvas6 = require("@uniformdev/canvas");
654
627
  var import_context_vue2 = require("@uniformdev/context-vue");
655
- var import_vue_demi23 = require("vue-demi");
628
+ var import_vue_demi20 = require("vue-demi");
656
629
 
657
630
  // src/helpers/convertComponentToProps.ts
658
631
  function convertComponentToProps(component) {
@@ -677,7 +650,7 @@ function normalizePropName(name) {
677
650
  }
678
651
 
679
652
  // src/components/UniformSlot.ts
680
- var UniformSlot = (0, import_vue_demi23.defineComponent)({
653
+ var UniformSlot = (0, import_vue_demi20.defineComponent)({
681
654
  name: "UniformSlot",
682
655
  inheritAttrs: false,
683
656
  props: {
@@ -696,7 +669,7 @@ var UniformSlot = (0, import_vue_demi23.defineComponent)({
696
669
  if (!parentData || !resolveRenderer) {
697
670
  throw new Error("<UniformSlot /> can only be used inside a <UniformComposition />");
698
671
  }
699
- const slotItems = (0, import_vue_demi23.computed)(() => {
672
+ const slotItems = (0, import_vue_demi20.computed)(() => {
700
673
  var _a2, _b, _c;
701
674
  if (props.name) {
702
675
  return (_b = (_a2 = parentData.slots) == null ? void 0 : _a2[props.name]) != null ? _b : [];
@@ -723,7 +696,7 @@ function renderPersonalizeComponent(component, resolveRenderer) {
723
696
  const parameters = component == null ? void 0 : component.parameters;
724
697
  const processedVariants = (0, import_canvas6.mapSlotToPersonalizedVariations)((_a = component.slots) == null ? void 0 : _a.pz);
725
698
  const name = (_d = (_c = (_b = component.parameters) == null ? void 0 : _b.trackingEventName) == null ? void 0 : _c.value) != null ? _d : "Untitled Personalization";
726
- return (0, import_vue_demi23.h)(import_context_vue2.Personalize, {
699
+ return (0, import_vue_demi20.h)(import_context_vue2.Personalize, {
727
700
  name,
728
701
  // TODO: Fix the `as unknown`
729
702
  component: (variant) => resolveRenderer(variant),
@@ -736,7 +709,7 @@ function renderTestComponent(component, resolveRenderer) {
736
709
  const variants = (_b = (_a = component == null ? void 0 : component.slots) == null ? void 0 : _a.test) != null ? _b : [];
737
710
  const testName = (_e = (_d = (_c = component == null ? void 0 : component.parameters) == null ? void 0 : _c.test) == null ? void 0 : _d.value) != null ? _e : "Untitled Test";
738
711
  const finalVariants = (0, import_canvas6.mapSlotToTestVariations)(variants);
739
- return (0, import_vue_demi23.h)(import_context_vue2.Test, {
712
+ return (0, import_vue_demi20.h)(import_context_vue2.Test, {
740
713
  variations: finalVariants,
741
714
  name: testName,
742
715
  component: (variant) => resolveRenderer(variant)
@@ -790,13 +763,13 @@ function renderComponent({
790
763
  const resolvedComponent = resolveRenderer == null ? void 0 : resolveRenderer(component);
791
764
  if (resolvedComponent) {
792
765
  const props = convertComponentToProps(component);
793
- return (0, import_vue_demi23.h)(
766
+ return (0, import_vue_demi20.h)(
794
767
  UniformComponent,
795
768
  { data: component, resolveRenderer },
796
- () => (0, import_vue_demi23.h)(
769
+ () => (0, import_vue_demi20.h)(
797
770
  ContextualEditingComponentWrapper,
798
771
  { component, parentComponent, slotName, indexInSlot, slotChildrenCount },
799
- { default: () => (0, import_vue_demi23.h)(resolvedComponent, props), emptyPlaceholder }
772
+ { default: () => (0, import_vue_demi20.h)(resolvedComponent, props), emptyPlaceholder }
800
773
  )
801
774
  );
802
775
  }
@@ -804,14 +777,14 @@ function renderComponent({
804
777
  `[canvas] found component of type '${component.type}' which the 'resolveRenderer' prop returned no component for. Nothing will be rendered. The resolveRenderer function may need to be extended to handle the new type.`,
805
778
  component
806
779
  );
807
- return (0, import_vue_demi23.h)("");
780
+ return (0, import_vue_demi20.h)("");
808
781
  }
809
782
 
810
783
  // src/components/UniformText.ts
811
784
  var import_canvas7 = require("@uniformdev/canvas");
812
- var import_vue_demi24 = require("vue-demi");
785
+ var import_vue_demi21 = require("vue-demi");
813
786
  var DEFAULT_ELEMENT_TYPE = "span";
814
- var UniformText = (0, import_vue_demi24.defineComponent)({
787
+ var UniformText = (0, import_vue_demi21.defineComponent)({
815
788
  name: "UniformText",
816
789
  inheritAttrs: true,
817
790
  props: {
@@ -835,22 +808,22 @@ var UniformText = (0, import_vue_demi24.defineComponent)({
835
808
  var _a;
836
809
  const { data: componentData, contextualEditingDefaultPlaceholder } = useUniformCurrentComponent();
837
810
  const { isContextualEditing } = useUniformCurrentComposition();
838
- const isFocused = (0, import_vue_demi24.ref)(false);
839
- const parameter = (0, import_vue_demi24.computed)(
811
+ const isFocused = (0, import_vue_demi21.ref)(false);
812
+ const parameter = (0, import_vue_demi21.computed)(
840
813
  () => {
841
814
  var _a2;
842
815
  return (_a2 = componentData == null ? void 0 : componentData.parameters) == null ? void 0 : _a2[props.parameterId];
843
816
  }
844
817
  );
845
- const value = (0, import_vue_demi24.computed)(() => {
818
+ const value = (0, import_vue_demi21.computed)(() => {
846
819
  var _a2;
847
820
  return (_a2 = parameter.value) == null ? void 0 : _a2.value;
848
821
  });
849
- const isEditable = (0, import_vue_demi24.computed)(() => {
822
+ const isEditable = (0, import_vue_demi21.computed)(() => {
850
823
  var _a2, _b, _c;
851
824
  return (_c = (_b = (_a2 = parameter.value) == null ? void 0 : _a2._contextualEditing) == null ? void 0 : _b.isEditable) != null ? _c : false;
852
825
  });
853
- const shouldSkipCustomRendering = (0, import_vue_demi24.computed)(() => isFocused.value && isEditable.value);
826
+ const shouldSkipCustomRendering = (0, import_vue_demi21.computed)(() => isFocused.value && isEditable.value);
854
827
  const handleOnFocus = () => {
855
828
  isFocused.value = true;
856
829
  };
@@ -863,7 +836,7 @@ var UniformText = (0, import_vue_demi24.defineComponent)({
863
836
  if (!isContextualEditing) {
864
837
  return () => {
865
838
  var _a2, _b, _c, _d;
866
- return (0, import_vue_demi24.h)(
839
+ return (0, import_vue_demi21.h)(
867
840
  (_a2 = props.as) != null ? _a2 : DEFAULT_ELEMENT_TYPE,
868
841
  { style: props.isMultiline ? { whiteSpace: "pre-wrap" } : {} },
869
842
  (_d = (_c = (_b = context.slots).default) == null ? void 0 : _c.call(_b, value.value)) != null ? _d : value.value
@@ -874,7 +847,7 @@ var UniformText = (0, import_vue_demi24.defineComponent)({
874
847
  const computedPlaceholder = typeof placeholderProp === "function" ? placeholderProp({ id: props.parameterId }) : placeholderProp;
875
848
  return () => {
876
849
  var _a2, _b, _c, _d, _e;
877
- return (0, import_vue_demi24.h)(
850
+ return (0, import_vue_demi21.h)(
878
851
  (_a2 = props.as) != null ? _a2 : DEFAULT_ELEMENT_TYPE,
879
852
  {
880
853
  ...(0, import_canvas9.getParameterAttributes)({
@@ -897,7 +870,7 @@ var UniformText = (0, import_vue_demi24.defineComponent)({
897
870
 
898
871
  // src/composables/useCompositionEventEffect.ts
899
872
  var import_canvas8 = require("@uniformdev/canvas");
900
- var import_vue_demi25 = require("vue-demi");
873
+ var import_vue_demi22 = require("vue-demi");
901
874
  async function useCompositionEventEffect({
902
875
  enabled,
903
876
  projectId,
@@ -905,7 +878,7 @@ async function useCompositionEventEffect({
905
878
  effect
906
879
  }) {
907
880
  let unsubscribe;
908
- (0, import_vue_demi25.watch)(
881
+ (0, import_vue_demi22.watch)(
909
882
  [() => enabled, () => compositionIdRef.value, () => projectId],
910
883
  async () => {
911
884
  unsubscribe == null ? void 0 : unsubscribe();
@@ -940,9 +913,6 @@ var import_canvas9 = require("@uniformdev/canvas");
940
913
  ParagraphRichTextNode,
941
914
  QuoteRichTextNode,
942
915
  RootRichTextNode,
943
- TableCellRichTextNode,
944
- TableRichTextNode,
945
- TableRowRichTextNode,
946
916
  TextRichTextNode,
947
917
  UniformComponent,
948
918
  UniformComposition,
package/dist/index.mjs CHANGED
@@ -472,67 +472,46 @@ var RootRichTextNode = (props, c) => {
472
472
  return h12(() => c.slots.default ? c.slots.default() : null);
473
473
  };
474
474
 
475
- // src/components/UniformRichText/nodes/TableCellRichTextNode.ts
476
- import { getRichTextTagFromTableCellHeaderState } from "@uniformdev/richtext";
477
- import { h as h13 } from "vue-demi";
478
- var TableCellRichTextNode = (props, context) => {
479
- const { headerState } = props.node;
480
- const tag = getRichTextTagFromTableCellHeaderState(headerState);
481
- return h13(tag, {}, context.slots);
482
- };
483
-
484
- // src/components/UniformRichText/nodes/TableRichTextNode.ts
485
- import { h as h14 } from "vue-demi";
486
- var TableRichTextNode = (_, context) => {
487
- return h14("table", {}, h14("tbody", {}, context.slots));
488
- };
489
-
490
- // src/components/UniformRichText/nodes/TableRowRichTextNode.ts
491
- import { h as h15 } from "vue-demi";
492
- var TableRowRichTextNode = (_, context) => {
493
- return h15("tr", {}, context.slots);
494
- };
495
-
496
475
  // src/components/UniformRichText/nodes/TextRichTextNode.ts
497
476
  import { getRichTextTagsFromTextFormat } from "@uniformdev/richtext";
498
- import { h as h16 } from "vue-demi";
477
+ import { h as h13 } from "vue-demi";
499
478
  var TextRichTextNode = (props) => {
500
479
  const { format, text } = props.node;
501
480
  const tags = getRichTextTagsFromTextFormat(format);
502
481
  return tags.length > 0 ? tags.reduceRight(
503
482
  (children, tag) => {
504
- return h16(tag, null, children);
483
+ return h13(tag, null, children);
505
484
  },
506
485
  {
507
486
  default: () => text
508
487
  }
509
- ) : h16(() => text);
488
+ ) : h13(() => text);
510
489
  };
511
490
 
512
491
  // src/components/UniformRichText/UniformRichText.ts
513
492
  import { isRichTextNode as isRichTextNode2 } from "@uniformdev/richtext";
514
- import { computed as computed4, defineComponent as defineComponent7, h as h21 } from "vue-demi";
493
+ import { computed as computed4, defineComponent as defineComponent7, h as h18 } from "vue-demi";
515
494
 
516
495
  // src/components/UniformRichText/UniformRichTextNode.ts
517
496
  import { isRichTextNode } from "@uniformdev/richtext";
518
- import { defineComponent as defineComponent6, h as h20 } from "vue-demi";
497
+ import { defineComponent as defineComponent6, h as h17 } from "vue-demi";
519
498
 
520
499
  // src/components/UniformRichText/nodes/CodeRichTextNode.ts
521
- import { h as h17 } from "vue-demi";
500
+ import { h as h14 } from "vue-demi";
522
501
  var CodeRichTextNode = (_, context) => {
523
- return h17("pre", {}, h17("code", {}, context.slots));
502
+ return h14("pre", {}, h14("code", {}, context.slots));
524
503
  };
525
504
 
526
505
  // src/components/UniformRichText/nodes/LinebreakRichTextNode.ts
527
- import { h as h18 } from "vue-demi";
506
+ import { h as h15 } from "vue-demi";
528
507
  var LinebreakRichTextNode = () => {
529
- return h18("br", {});
508
+ return h15("br", {});
530
509
  };
531
510
 
532
511
  // src/components/UniformRichText/nodes/TabRichTextNode.ts
533
- import { h as h19 } from "vue-demi";
512
+ import { h as h16 } from "vue-demi";
534
513
  var TabRichTextNode = () => {
535
- return h19("", {}, " ");
514
+ return h16("", {}, " ");
536
515
  };
537
516
 
538
517
  // src/components/UniformRichText/UniformRichTextNode.ts
@@ -560,13 +539,13 @@ var UniformRichTextNode = defineComponent6({
560
539
  return () => null;
561
540
  }
562
541
  const children = node.children ? node.children.map(
563
- (childNode) => h20(
542
+ (childNode) => h17(
564
543
  UniformRichTextNode,
565
544
  { node: childNode, resolveRichTextRenderer: props.resolveRichTextRenderer },
566
545
  context.slots
567
546
  )
568
547
  ) : [];
569
- return () => h20(NodeRenderer, { node, children: h20(() => children) }, () => children);
548
+ return () => h17(NodeRenderer, { node, children: h17(() => children) }, () => children);
570
549
  }
571
550
  });
572
551
  var rendererMap = /* @__PURE__ */ new Map([
@@ -580,10 +559,7 @@ var rendererMap = /* @__PURE__ */ new Map([
580
559
  ["code", CodeRichTextNode],
581
560
  ["root", RootRichTextNode],
582
561
  ["text", TextRichTextNode],
583
- ["tab", TabRichTextNode],
584
- ["table", TableRichTextNode],
585
- ["tablerow", TableRowRichTextNode],
586
- ["tablecell", TableCellRichTextNode]
562
+ ["tab", TabRichTextNode]
587
563
  ]);
588
564
  var resolveRichTextDefaultRenderer = (node) => {
589
565
  return rendererMap.get(node.type);
@@ -612,7 +588,7 @@ var UniformRichText = defineComponent7({
612
588
  });
613
589
  const root = (_a = value.value) == null ? void 0 : _a.root;
614
590
  if (isRichTextNode2(root)) {
615
- return () => h21(
591
+ return () => h18(
616
592
  UniformRichTextNode,
617
593
  {
618
594
  node: root,
@@ -636,7 +612,7 @@ import {
636
612
  mapSlotToTestVariations
637
613
  } from "@uniformdev/canvas";
638
614
  import { Personalize, Test } from "@uniformdev/context-vue";
639
- import { computed as computed5, defineComponent as defineComponent8, h as h22 } from "vue-demi";
615
+ import { computed as computed5, defineComponent as defineComponent8, h as h19 } from "vue-demi";
640
616
 
641
617
  // src/helpers/convertComponentToProps.ts
642
618
  function convertComponentToProps(component) {
@@ -707,7 +683,7 @@ function renderPersonalizeComponent(component, resolveRenderer) {
707
683
  const parameters = component == null ? void 0 : component.parameters;
708
684
  const processedVariants = mapSlotToPersonalizedVariations((_a = component.slots) == null ? void 0 : _a.pz);
709
685
  const name = (_d = (_c = (_b = component.parameters) == null ? void 0 : _b.trackingEventName) == null ? void 0 : _c.value) != null ? _d : "Untitled Personalization";
710
- return h22(Personalize, {
686
+ return h19(Personalize, {
711
687
  name,
712
688
  // TODO: Fix the `as unknown`
713
689
  component: (variant) => resolveRenderer(variant),
@@ -720,7 +696,7 @@ function renderTestComponent(component, resolveRenderer) {
720
696
  const variants = (_b = (_a = component == null ? void 0 : component.slots) == null ? void 0 : _a.test) != null ? _b : [];
721
697
  const testName = (_e = (_d = (_c = component == null ? void 0 : component.parameters) == null ? void 0 : _c.test) == null ? void 0 : _d.value) != null ? _e : "Untitled Test";
722
698
  const finalVariants = mapSlotToTestVariations(variants);
723
- return h22(Test, {
699
+ return h19(Test, {
724
700
  variations: finalVariants,
725
701
  name: testName,
726
702
  component: (variant) => resolveRenderer(variant)
@@ -774,13 +750,13 @@ function renderComponent({
774
750
  const resolvedComponent = resolveRenderer == null ? void 0 : resolveRenderer(component);
775
751
  if (resolvedComponent) {
776
752
  const props = convertComponentToProps(component);
777
- return h22(
753
+ return h19(
778
754
  UniformComponent,
779
755
  { data: component, resolveRenderer },
780
- () => h22(
756
+ () => h19(
781
757
  ContextualEditingComponentWrapper,
782
758
  { component, parentComponent, slotName, indexInSlot, slotChildrenCount },
783
- { default: () => h22(resolvedComponent, props), emptyPlaceholder }
759
+ { default: () => h19(resolvedComponent, props), emptyPlaceholder }
784
760
  )
785
761
  );
786
762
  }
@@ -788,7 +764,7 @@ function renderComponent({
788
764
  `[canvas] found component of type '${component.type}' which the 'resolveRenderer' prop returned no component for. Nothing will be rendered. The resolveRenderer function may need to be extended to handle the new type.`,
789
765
  component
790
766
  );
791
- return h22("");
767
+ return h19("");
792
768
  }
793
769
 
794
770
  // src/components/UniformText.ts
@@ -797,7 +773,7 @@ import {
797
773
  ATTRIBUTE_PARAMETER_VALUE,
798
774
  ATTRIBUTE_PLACEHOLDER
799
775
  } from "@uniformdev/canvas";
800
- import { computed as computed6, defineComponent as defineComponent9, h as h23, ref as ref2 } from "vue-demi";
776
+ import { computed as computed6, defineComponent as defineComponent9, h as h20, ref as ref2 } from "vue-demi";
801
777
  var DEFAULT_ELEMENT_TYPE = "span";
802
778
  var UniformText = defineComponent9({
803
779
  name: "UniformText",
@@ -851,7 +827,7 @@ var UniformText = defineComponent9({
851
827
  if (!isContextualEditing) {
852
828
  return () => {
853
829
  var _a2, _b, _c, _d;
854
- return h23(
830
+ return h20(
855
831
  (_a2 = props.as) != null ? _a2 : DEFAULT_ELEMENT_TYPE,
856
832
  { style: props.isMultiline ? { whiteSpace: "pre-wrap" } : {} },
857
833
  (_d = (_c = (_b = context.slots).default) == null ? void 0 : _c.call(_b, value.value)) != null ? _d : value.value
@@ -862,7 +838,7 @@ var UniformText = defineComponent9({
862
838
  const computedPlaceholder = typeof placeholderProp === "function" ? placeholderProp({ id: props.parameterId }) : placeholderProp;
863
839
  return () => {
864
840
  var _a2, _b, _c, _d, _e;
865
- return h23(
841
+ return h20(
866
842
  (_a2 = props.as) != null ? _a2 : DEFAULT_ELEMENT_TYPE,
867
843
  {
868
844
  ...getParameterAttributes({
@@ -931,9 +907,6 @@ export {
931
907
  ParagraphRichTextNode,
932
908
  QuoteRichTextNode,
933
909
  RootRichTextNode,
934
- TableCellRichTextNode,
935
- TableRichTextNode,
936
- TableRowRichTextNode,
937
910
  TextRichTextNode,
938
911
  UniformComponent,
939
912
  UniformComposition,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-vue",
3
- "version": "19.177.2-alpha.10+c9cb5f414c",
3
+ "version": "19.178.0",
4
4
  "description": "Vue SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -23,9 +23,9 @@
23
23
  "document": "api-extractor run --local"
24
24
  },
25
25
  "dependencies": {
26
- "@uniformdev/canvas": "19.177.2-alpha.10+c9cb5f414c",
27
- "@uniformdev/context-vue": "19.177.2-alpha.10+c9cb5f414c",
28
- "@uniformdev/richtext": "19.177.2-alpha.10+c9cb5f414c",
26
+ "@uniformdev/canvas": "19.178.0",
27
+ "@uniformdev/context-vue": "19.178.0",
28
+ "@uniformdev/richtext": "19.178.0",
29
29
  "vue-demi": "^0.14.0"
30
30
  },
31
31
  "peerDependencies": {
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "c9cb5f414c41dc1d2c37dff02a5b87484901657e"
62
+ "gitHead": "66721c01d9bf53917e5c4d83e2e578248e72560d"
63
63
  }