@uniformdev/canvas-vue 19.200.1-alpha.3 → 19.201.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 +44 -44
- package/dist/index.d.ts +44 -44
- package/dist/index.esm.js +26 -37
- package/dist/index.js +117 -121
- package/dist/index.mjs +26 -37
- package/package.json +16 -11
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { PropType,
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { PropType, Component, Ref, ComputedRef, VNode, Slot } from 'vue';
|
|
3
3
|
import { ComponentInstance, ComponentParameter, RootComponentInstance, UpdateCompositionMessage, SubscribeToCompositionOptions } from '@uniformdev/canvas';
|
|
4
4
|
export { GetParameterAttributesProps, createUniformApiEnhancer, getParameterAttributes } from '@uniformdev/canvas';
|
|
5
5
|
import { RichTextNode } from '@uniformdev/richtext';
|
|
@@ -7,19 +7,19 @@ import { RichTextNode } from '@uniformdev/richtext';
|
|
|
7
7
|
type DefaultNotImplementedComponentProps = {
|
|
8
8
|
component: ComponentInstance;
|
|
9
9
|
};
|
|
10
|
-
declare const DefaultNotImplementedComponent:
|
|
10
|
+
declare const DefaultNotImplementedComponent: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
11
11
|
component: {
|
|
12
12
|
type: PropType<DefaultNotImplementedComponentProps["component"]>;
|
|
13
13
|
required: true;
|
|
14
14
|
};
|
|
15
|
-
}
|
|
15
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
16
16
|
[key: string]: any;
|
|
17
|
-
}>,
|
|
17
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
18
18
|
component: {
|
|
19
19
|
type: PropType<DefaultNotImplementedComponentProps["component"]>;
|
|
20
20
|
required: true;
|
|
21
21
|
};
|
|
22
|
-
}
|
|
22
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
23
23
|
|
|
24
24
|
interface TestComponent {
|
|
25
25
|
slots?: {
|
|
@@ -46,7 +46,7 @@ interface PersonalizeComponent {
|
|
|
46
46
|
type ComponentProps<TProps = unknown> = TProps & {
|
|
47
47
|
component: ComponentInstance;
|
|
48
48
|
};
|
|
49
|
-
type ResolveRenderer = (componentInstance: ComponentInstance) =>
|
|
49
|
+
type ResolveRenderer = (componentInstance: ComponentInstance) => Component<any>;
|
|
50
50
|
|
|
51
51
|
type UniformTextProps = {
|
|
52
52
|
/**
|
|
@@ -73,7 +73,7 @@ type UniformTextProps = {
|
|
|
73
73
|
/**
|
|
74
74
|
* Renders text parameters. Offers inline editing capability out of the box.
|
|
75
75
|
*/
|
|
76
|
-
declare const UniformText:
|
|
76
|
+
declare const UniformText: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
77
77
|
as: {
|
|
78
78
|
type: PropType<UniformTextProps["as"]>;
|
|
79
79
|
default: string;
|
|
@@ -89,9 +89,9 @@ declare const UniformText: vue_demi.DefineComponent<{
|
|
|
89
89
|
placeholder: {
|
|
90
90
|
type: PropType<UniformTextProps["placeholder"]>;
|
|
91
91
|
};
|
|
92
|
-
}
|
|
92
|
+
}>, (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
93
93
|
[key: string]: any;
|
|
94
|
-
}>) | null,
|
|
94
|
+
}>) | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
95
95
|
as: {
|
|
96
96
|
type: PropType<UniformTextProps["as"]>;
|
|
97
97
|
default: string;
|
|
@@ -107,10 +107,10 @@ declare const UniformText: vue_demi.DefineComponent<{
|
|
|
107
107
|
placeholder: {
|
|
108
108
|
type: PropType<UniformTextProps["placeholder"]>;
|
|
109
109
|
};
|
|
110
|
-
}
|
|
110
|
+
}>> & Readonly<{}>, {
|
|
111
111
|
as: string | undefined;
|
|
112
112
|
isMultiline: boolean | undefined;
|
|
113
|
-
}, {}>;
|
|
113
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
114
114
|
|
|
115
115
|
type UniformComponentProps = {
|
|
116
116
|
/** A dynamic vue component that provides data to the Uniform Canvas SlotContent component via provide/inject */
|
|
@@ -148,7 +148,7 @@ declare const useUniformCurrentComponent: () => UniformCurrentComponent;
|
|
|
148
148
|
* Note that the actual rendering happens inside `<UniformSlot />`, this component only provides the services needed to achieve that.
|
|
149
149
|
* This component is used internally by `<UniformComposition />`, which you should use in most cases.
|
|
150
150
|
*/
|
|
151
|
-
declare const UniformComponent:
|
|
151
|
+
declare const UniformComponent: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
152
152
|
data: {
|
|
153
153
|
type: PropType<UniformComponentProps["data"]>;
|
|
154
154
|
};
|
|
@@ -159,11 +159,11 @@ declare const UniformComponent: vue_demi.DefineComponent<{
|
|
|
159
159
|
type: PropType<UniformComponentProps["behaviorTracking"]>;
|
|
160
160
|
default: string;
|
|
161
161
|
};
|
|
162
|
-
}
|
|
162
|
+
}>, (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
163
163
|
[key: string]: any;
|
|
164
|
-
}>) | (() =>
|
|
164
|
+
}>) | (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
165
165
|
[key: string]: any;
|
|
166
|
-
}>[] | undefined) | null,
|
|
166
|
+
}>[] | undefined) | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
167
167
|
data: {
|
|
168
168
|
type: PropType<UniformComponentProps["data"]>;
|
|
169
169
|
};
|
|
@@ -174,9 +174,9 @@ declare const UniformComponent: vue_demi.DefineComponent<{
|
|
|
174
174
|
type: PropType<UniformComponentProps["behaviorTracking"]>;
|
|
175
175
|
default: string;
|
|
176
176
|
};
|
|
177
|
-
}
|
|
177
|
+
}>> & Readonly<{}>, {
|
|
178
178
|
behaviorTracking: "onLoad" | "onView" | undefined;
|
|
179
|
-
}, {}>;
|
|
179
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
180
180
|
|
|
181
181
|
type UseUniformContextualEditingProps = {
|
|
182
182
|
initialCompositionValue?: Ref<RootComponentInstance | undefined>;
|
|
@@ -192,7 +192,7 @@ type UseUniformContextualEditingProps = {
|
|
|
192
192
|
* This hook is already integrated in `<UniformComposition />`, you won't need to use it directly, unless you have a custom setup.
|
|
193
193
|
*/
|
|
194
194
|
declare const useUniformContextualEditing: ({ initialCompositionValue, enhance, }: UseUniformContextualEditingProps) => {
|
|
195
|
-
composition:
|
|
195
|
+
composition: vue.ComputedRef<{
|
|
196
196
|
type: string;
|
|
197
197
|
parameters?: {
|
|
198
198
|
[key: string]: {
|
|
@@ -489,7 +489,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
489
489
|
};
|
|
490
490
|
_locales?: string[];
|
|
491
491
|
} | undefined>;
|
|
492
|
-
isContextualEditing:
|
|
492
|
+
isContextualEditing: vue.ComputedRef<boolean>;
|
|
493
493
|
};
|
|
494
494
|
|
|
495
495
|
type UniformCompositionProps = UniformComponentProps & {
|
|
@@ -512,7 +512,7 @@ declare const useUniformCurrentComposition: () => UniformCurrentComposition;
|
|
|
512
512
|
* It renders the full tree of components, and provides some services to the children, such as `useUniformCurrentComposition`.
|
|
513
513
|
* It also takes care of enabling [Contextual Editing](https://docs.uniform.app/capabilities/composition/contextual-editing).
|
|
514
514
|
*/
|
|
515
|
-
declare const UniformComposition:
|
|
515
|
+
declare const UniformComposition: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
516
516
|
data: {
|
|
517
517
|
type: PropType<UniformCompositionProps["data"]>;
|
|
518
518
|
};
|
|
@@ -526,9 +526,9 @@ declare const UniformComposition: vue_demi.DefineComponent<{
|
|
|
526
526
|
contextualEditingEnhancer: {
|
|
527
527
|
type: PropType<UniformCompositionProps["contextualEditingEnhancer"]>;
|
|
528
528
|
};
|
|
529
|
-
}
|
|
529
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
530
530
|
[key: string]: any;
|
|
531
|
-
}>,
|
|
531
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
532
532
|
data: {
|
|
533
533
|
type: PropType<UniformCompositionProps["data"]>;
|
|
534
534
|
};
|
|
@@ -542,35 +542,35 @@ declare const UniformComposition: vue_demi.DefineComponent<{
|
|
|
542
542
|
contextualEditingEnhancer: {
|
|
543
543
|
type: PropType<UniformCompositionProps["contextualEditingEnhancer"]>;
|
|
544
544
|
};
|
|
545
|
-
}
|
|
545
|
+
}>> & Readonly<{}>, {
|
|
546
546
|
behaviorTracking: "onLoad" | "onView" | undefined;
|
|
547
|
-
}, {}>;
|
|
547
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
548
548
|
|
|
549
549
|
type UniformPlaygroundProps = Pick<UniformCompositionProps, 'resolveRenderer'>;
|
|
550
550
|
/**
|
|
551
551
|
* Playground where you can freely live preview your components and patterns.
|
|
552
552
|
*/
|
|
553
|
-
declare const UniformPlayground:
|
|
553
|
+
declare const UniformPlayground: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
554
554
|
resolveRenderer: {
|
|
555
555
|
type: PropType<UniformPlaygroundProps["resolveRenderer"]>;
|
|
556
556
|
};
|
|
557
|
-
}
|
|
557
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
558
558
|
[key: string]: any;
|
|
559
|
-
}>,
|
|
559
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
560
560
|
resolveRenderer: {
|
|
561
561
|
type: PropType<UniformPlaygroundProps["resolveRenderer"]>;
|
|
562
562
|
};
|
|
563
|
-
}
|
|
563
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
564
564
|
|
|
565
565
|
type RichTextComponentProps<TNode extends RichTextNode = RichTextNode> = {
|
|
566
566
|
node: TNode;
|
|
567
567
|
};
|
|
568
|
-
type RichTextRendererComponent<TNode extends RichTextNode = RichTextNode> =
|
|
568
|
+
type RichTextRendererComponent<TNode extends RichTextNode = RichTextNode> = Component<RichTextComponentProps<TNode>>;
|
|
569
569
|
/**
|
|
570
570
|
* Function that maps a Rich Text node instance to its React component to render it.
|
|
571
571
|
* The resolver would commonly inspect the `type` of the component to decide.
|
|
572
572
|
*/
|
|
573
|
-
type RenderRichTextComponentResolver = (node: RichTextNode) =>
|
|
573
|
+
type RenderRichTextComponentResolver = (node: RichTextNode) => Component<RichTextComponentProps<RichTextNode>> | null | undefined;
|
|
574
574
|
|
|
575
575
|
declare const HeadingRichTextNode: RichTextRendererComponent;
|
|
576
576
|
|
|
@@ -610,7 +610,7 @@ type UniformRichTextProps = {
|
|
|
610
610
|
id: string;
|
|
611
611
|
}) => string | undefined);
|
|
612
612
|
};
|
|
613
|
-
declare const UniformRichText:
|
|
613
|
+
declare const UniformRichText: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
614
614
|
parameterId: {
|
|
615
615
|
type: StringConstructor;
|
|
616
616
|
required: true;
|
|
@@ -626,9 +626,9 @@ declare const UniformRichText: vue_demi.DefineComponent<{
|
|
|
626
626
|
placeholder: {
|
|
627
627
|
type: PropType<UniformRichTextProps["placeholder"]>;
|
|
628
628
|
};
|
|
629
|
-
}
|
|
629
|
+
}>, (() => null) | (() => VNode<vue.RendererNode, vue.RendererElement, {
|
|
630
630
|
[key: string]: any;
|
|
631
|
-
}>) | null,
|
|
631
|
+
}>) | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
632
632
|
parameterId: {
|
|
633
633
|
type: StringConstructor;
|
|
634
634
|
required: true;
|
|
@@ -644,13 +644,13 @@ declare const UniformRichText: vue_demi.DefineComponent<{
|
|
|
644
644
|
placeholder: {
|
|
645
645
|
type: PropType<UniformRichTextProps["placeholder"]>;
|
|
646
646
|
};
|
|
647
|
-
}
|
|
647
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
648
648
|
|
|
649
649
|
type UniformRichTextNodeProps = {
|
|
650
650
|
node: RichTextNode;
|
|
651
651
|
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
652
652
|
};
|
|
653
|
-
declare const UniformRichTextNode:
|
|
653
|
+
declare const UniformRichTextNode: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
654
654
|
node: {
|
|
655
655
|
type: PropType<UniformRichTextNodeProps["node"]>;
|
|
656
656
|
required: true;
|
|
@@ -659,9 +659,9 @@ declare const UniformRichTextNode: vue_demi.DefineComponent<{
|
|
|
659
659
|
type: PropType<UniformRichTextNodeProps["resolveRichTextRenderer"]>;
|
|
660
660
|
required: false;
|
|
661
661
|
};
|
|
662
|
-
}
|
|
662
|
+
}>, (() => null) | (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
663
663
|
[key: string]: any;
|
|
664
|
-
}>),
|
|
664
|
+
}>), {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
665
665
|
node: {
|
|
666
666
|
type: PropType<UniformRichTextNodeProps["node"]>;
|
|
667
667
|
required: true;
|
|
@@ -670,7 +670,7 @@ declare const UniformRichTextNode: vue_demi.DefineComponent<{
|
|
|
670
670
|
type: PropType<UniformRichTextNodeProps["resolveRichTextRenderer"]>;
|
|
671
671
|
required: false;
|
|
672
672
|
};
|
|
673
|
-
}
|
|
673
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
674
674
|
|
|
675
675
|
type UniformSlotProps = {
|
|
676
676
|
/** Name of the slot to render */
|
|
@@ -684,23 +684,23 @@ type UniformSlotProps = {
|
|
|
684
684
|
/**
|
|
685
685
|
* Renders the content of a Canvas composition's slot
|
|
686
686
|
*/
|
|
687
|
-
declare const UniformSlot:
|
|
687
|
+
declare const UniformSlot: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
688
688
|
name: {
|
|
689
689
|
type: PropType<UniformSlotProps["name"]>;
|
|
690
690
|
};
|
|
691
691
|
resolveRenderer: {
|
|
692
692
|
type: PropType<UniformSlotProps["resolveRenderer"]>;
|
|
693
693
|
};
|
|
694
|
-
}
|
|
694
|
+
}>, () => (vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
695
695
|
[key: string]: any;
|
|
696
|
-
}>[] |
|
|
696
|
+
}>[] | Component<any>)[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
697
697
|
name: {
|
|
698
698
|
type: PropType<UniformSlotProps["name"]>;
|
|
699
699
|
};
|
|
700
700
|
resolveRenderer: {
|
|
701
701
|
type: PropType<UniformSlotProps["resolveRenderer"]>;
|
|
702
702
|
};
|
|
703
|
-
}
|
|
703
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
704
704
|
declare function renderComponent({ component, resolveRenderer, indexInSlot, slotName, parentComponent, slotChildrenCount, emptyPlaceholder, }: {
|
|
705
705
|
component: ComponentInstance;
|
|
706
706
|
resolveRenderer?: ResolveRenderer;
|
|
@@ -709,7 +709,7 @@ declare function renderComponent({ component, resolveRenderer, indexInSlot, slot
|
|
|
709
709
|
parentComponent?: ComponentInstance;
|
|
710
710
|
slotChildrenCount?: number;
|
|
711
711
|
emptyPlaceholder?: Slot;
|
|
712
|
-
}):
|
|
712
|
+
}): Component<any>;
|
|
713
713
|
|
|
714
714
|
type UseCompositionEventEffectOptions = Omit<Partial<SubscribeToCompositionOptions>, 'callback' | 'compositionId'> & {
|
|
715
715
|
compositionIdRef: Ref<SubscribeToCompositionOptions['compositionId']>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { PropType,
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { PropType, Component, Ref, ComputedRef, VNode, Slot } from 'vue';
|
|
3
3
|
import { ComponentInstance, ComponentParameter, RootComponentInstance, UpdateCompositionMessage, SubscribeToCompositionOptions } from '@uniformdev/canvas';
|
|
4
4
|
export { GetParameterAttributesProps, createUniformApiEnhancer, getParameterAttributes } from '@uniformdev/canvas';
|
|
5
5
|
import { RichTextNode } from '@uniformdev/richtext';
|
|
@@ -7,19 +7,19 @@ import { RichTextNode } from '@uniformdev/richtext';
|
|
|
7
7
|
type DefaultNotImplementedComponentProps = {
|
|
8
8
|
component: ComponentInstance;
|
|
9
9
|
};
|
|
10
|
-
declare const DefaultNotImplementedComponent:
|
|
10
|
+
declare const DefaultNotImplementedComponent: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
11
11
|
component: {
|
|
12
12
|
type: PropType<DefaultNotImplementedComponentProps["component"]>;
|
|
13
13
|
required: true;
|
|
14
14
|
};
|
|
15
|
-
}
|
|
15
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
16
16
|
[key: string]: any;
|
|
17
|
-
}>,
|
|
17
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
18
18
|
component: {
|
|
19
19
|
type: PropType<DefaultNotImplementedComponentProps["component"]>;
|
|
20
20
|
required: true;
|
|
21
21
|
};
|
|
22
|
-
}
|
|
22
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
23
23
|
|
|
24
24
|
interface TestComponent {
|
|
25
25
|
slots?: {
|
|
@@ -46,7 +46,7 @@ interface PersonalizeComponent {
|
|
|
46
46
|
type ComponentProps<TProps = unknown> = TProps & {
|
|
47
47
|
component: ComponentInstance;
|
|
48
48
|
};
|
|
49
|
-
type ResolveRenderer = (componentInstance: ComponentInstance) =>
|
|
49
|
+
type ResolveRenderer = (componentInstance: ComponentInstance) => Component<any>;
|
|
50
50
|
|
|
51
51
|
type UniformTextProps = {
|
|
52
52
|
/**
|
|
@@ -73,7 +73,7 @@ type UniformTextProps = {
|
|
|
73
73
|
/**
|
|
74
74
|
* Renders text parameters. Offers inline editing capability out of the box.
|
|
75
75
|
*/
|
|
76
|
-
declare const UniformText:
|
|
76
|
+
declare const UniformText: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
77
77
|
as: {
|
|
78
78
|
type: PropType<UniformTextProps["as"]>;
|
|
79
79
|
default: string;
|
|
@@ -89,9 +89,9 @@ declare const UniformText: vue_demi.DefineComponent<{
|
|
|
89
89
|
placeholder: {
|
|
90
90
|
type: PropType<UniformTextProps["placeholder"]>;
|
|
91
91
|
};
|
|
92
|
-
}
|
|
92
|
+
}>, (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
93
93
|
[key: string]: any;
|
|
94
|
-
}>) | null,
|
|
94
|
+
}>) | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
95
95
|
as: {
|
|
96
96
|
type: PropType<UniformTextProps["as"]>;
|
|
97
97
|
default: string;
|
|
@@ -107,10 +107,10 @@ declare const UniformText: vue_demi.DefineComponent<{
|
|
|
107
107
|
placeholder: {
|
|
108
108
|
type: PropType<UniformTextProps["placeholder"]>;
|
|
109
109
|
};
|
|
110
|
-
}
|
|
110
|
+
}>> & Readonly<{}>, {
|
|
111
111
|
as: string | undefined;
|
|
112
112
|
isMultiline: boolean | undefined;
|
|
113
|
-
}, {}>;
|
|
113
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
114
114
|
|
|
115
115
|
type UniformComponentProps = {
|
|
116
116
|
/** A dynamic vue component that provides data to the Uniform Canvas SlotContent component via provide/inject */
|
|
@@ -148,7 +148,7 @@ declare const useUniformCurrentComponent: () => UniformCurrentComponent;
|
|
|
148
148
|
* Note that the actual rendering happens inside `<UniformSlot />`, this component only provides the services needed to achieve that.
|
|
149
149
|
* This component is used internally by `<UniformComposition />`, which you should use in most cases.
|
|
150
150
|
*/
|
|
151
|
-
declare const UniformComponent:
|
|
151
|
+
declare const UniformComponent: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
152
152
|
data: {
|
|
153
153
|
type: PropType<UniformComponentProps["data"]>;
|
|
154
154
|
};
|
|
@@ -159,11 +159,11 @@ declare const UniformComponent: vue_demi.DefineComponent<{
|
|
|
159
159
|
type: PropType<UniformComponentProps["behaviorTracking"]>;
|
|
160
160
|
default: string;
|
|
161
161
|
};
|
|
162
|
-
}
|
|
162
|
+
}>, (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
163
163
|
[key: string]: any;
|
|
164
|
-
}>) | (() =>
|
|
164
|
+
}>) | (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
165
165
|
[key: string]: any;
|
|
166
|
-
}>[] | undefined) | null,
|
|
166
|
+
}>[] | undefined) | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
167
167
|
data: {
|
|
168
168
|
type: PropType<UniformComponentProps["data"]>;
|
|
169
169
|
};
|
|
@@ -174,9 +174,9 @@ declare const UniformComponent: vue_demi.DefineComponent<{
|
|
|
174
174
|
type: PropType<UniformComponentProps["behaviorTracking"]>;
|
|
175
175
|
default: string;
|
|
176
176
|
};
|
|
177
|
-
}
|
|
177
|
+
}>> & Readonly<{}>, {
|
|
178
178
|
behaviorTracking: "onLoad" | "onView" | undefined;
|
|
179
|
-
}, {}>;
|
|
179
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
180
180
|
|
|
181
181
|
type UseUniformContextualEditingProps = {
|
|
182
182
|
initialCompositionValue?: Ref<RootComponentInstance | undefined>;
|
|
@@ -192,7 +192,7 @@ type UseUniformContextualEditingProps = {
|
|
|
192
192
|
* This hook is already integrated in `<UniformComposition />`, you won't need to use it directly, unless you have a custom setup.
|
|
193
193
|
*/
|
|
194
194
|
declare const useUniformContextualEditing: ({ initialCompositionValue, enhance, }: UseUniformContextualEditingProps) => {
|
|
195
|
-
composition:
|
|
195
|
+
composition: vue.ComputedRef<{
|
|
196
196
|
type: string;
|
|
197
197
|
parameters?: {
|
|
198
198
|
[key: string]: {
|
|
@@ -489,7 +489,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
489
489
|
};
|
|
490
490
|
_locales?: string[];
|
|
491
491
|
} | undefined>;
|
|
492
|
-
isContextualEditing:
|
|
492
|
+
isContextualEditing: vue.ComputedRef<boolean>;
|
|
493
493
|
};
|
|
494
494
|
|
|
495
495
|
type UniformCompositionProps = UniformComponentProps & {
|
|
@@ -512,7 +512,7 @@ declare const useUniformCurrentComposition: () => UniformCurrentComposition;
|
|
|
512
512
|
* It renders the full tree of components, and provides some services to the children, such as `useUniformCurrentComposition`.
|
|
513
513
|
* It also takes care of enabling [Contextual Editing](https://docs.uniform.app/capabilities/composition/contextual-editing).
|
|
514
514
|
*/
|
|
515
|
-
declare const UniformComposition:
|
|
515
|
+
declare const UniformComposition: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
516
516
|
data: {
|
|
517
517
|
type: PropType<UniformCompositionProps["data"]>;
|
|
518
518
|
};
|
|
@@ -526,9 +526,9 @@ declare const UniformComposition: vue_demi.DefineComponent<{
|
|
|
526
526
|
contextualEditingEnhancer: {
|
|
527
527
|
type: PropType<UniformCompositionProps["contextualEditingEnhancer"]>;
|
|
528
528
|
};
|
|
529
|
-
}
|
|
529
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
530
530
|
[key: string]: any;
|
|
531
|
-
}>,
|
|
531
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
532
532
|
data: {
|
|
533
533
|
type: PropType<UniformCompositionProps["data"]>;
|
|
534
534
|
};
|
|
@@ -542,35 +542,35 @@ declare const UniformComposition: vue_demi.DefineComponent<{
|
|
|
542
542
|
contextualEditingEnhancer: {
|
|
543
543
|
type: PropType<UniformCompositionProps["contextualEditingEnhancer"]>;
|
|
544
544
|
};
|
|
545
|
-
}
|
|
545
|
+
}>> & Readonly<{}>, {
|
|
546
546
|
behaviorTracking: "onLoad" | "onView" | undefined;
|
|
547
|
-
}, {}>;
|
|
547
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
548
548
|
|
|
549
549
|
type UniformPlaygroundProps = Pick<UniformCompositionProps, 'resolveRenderer'>;
|
|
550
550
|
/**
|
|
551
551
|
* Playground where you can freely live preview your components and patterns.
|
|
552
552
|
*/
|
|
553
|
-
declare const UniformPlayground:
|
|
553
|
+
declare const UniformPlayground: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
554
554
|
resolveRenderer: {
|
|
555
555
|
type: PropType<UniformPlaygroundProps["resolveRenderer"]>;
|
|
556
556
|
};
|
|
557
|
-
}
|
|
557
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
558
558
|
[key: string]: any;
|
|
559
|
-
}>,
|
|
559
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
560
560
|
resolveRenderer: {
|
|
561
561
|
type: PropType<UniformPlaygroundProps["resolveRenderer"]>;
|
|
562
562
|
};
|
|
563
|
-
}
|
|
563
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
564
564
|
|
|
565
565
|
type RichTextComponentProps<TNode extends RichTextNode = RichTextNode> = {
|
|
566
566
|
node: TNode;
|
|
567
567
|
};
|
|
568
|
-
type RichTextRendererComponent<TNode extends RichTextNode = RichTextNode> =
|
|
568
|
+
type RichTextRendererComponent<TNode extends RichTextNode = RichTextNode> = Component<RichTextComponentProps<TNode>>;
|
|
569
569
|
/**
|
|
570
570
|
* Function that maps a Rich Text node instance to its React component to render it.
|
|
571
571
|
* The resolver would commonly inspect the `type` of the component to decide.
|
|
572
572
|
*/
|
|
573
|
-
type RenderRichTextComponentResolver = (node: RichTextNode) =>
|
|
573
|
+
type RenderRichTextComponentResolver = (node: RichTextNode) => Component<RichTextComponentProps<RichTextNode>> | null | undefined;
|
|
574
574
|
|
|
575
575
|
declare const HeadingRichTextNode: RichTextRendererComponent;
|
|
576
576
|
|
|
@@ -610,7 +610,7 @@ type UniformRichTextProps = {
|
|
|
610
610
|
id: string;
|
|
611
611
|
}) => string | undefined);
|
|
612
612
|
};
|
|
613
|
-
declare const UniformRichText:
|
|
613
|
+
declare const UniformRichText: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
614
614
|
parameterId: {
|
|
615
615
|
type: StringConstructor;
|
|
616
616
|
required: true;
|
|
@@ -626,9 +626,9 @@ declare const UniformRichText: vue_demi.DefineComponent<{
|
|
|
626
626
|
placeholder: {
|
|
627
627
|
type: PropType<UniformRichTextProps["placeholder"]>;
|
|
628
628
|
};
|
|
629
|
-
}
|
|
629
|
+
}>, (() => null) | (() => VNode<vue.RendererNode, vue.RendererElement, {
|
|
630
630
|
[key: string]: any;
|
|
631
|
-
}>) | null,
|
|
631
|
+
}>) | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
632
632
|
parameterId: {
|
|
633
633
|
type: StringConstructor;
|
|
634
634
|
required: true;
|
|
@@ -644,13 +644,13 @@ declare const UniformRichText: vue_demi.DefineComponent<{
|
|
|
644
644
|
placeholder: {
|
|
645
645
|
type: PropType<UniformRichTextProps["placeholder"]>;
|
|
646
646
|
};
|
|
647
|
-
}
|
|
647
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
648
648
|
|
|
649
649
|
type UniformRichTextNodeProps = {
|
|
650
650
|
node: RichTextNode;
|
|
651
651
|
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
652
652
|
};
|
|
653
|
-
declare const UniformRichTextNode:
|
|
653
|
+
declare const UniformRichTextNode: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
654
654
|
node: {
|
|
655
655
|
type: PropType<UniformRichTextNodeProps["node"]>;
|
|
656
656
|
required: true;
|
|
@@ -659,9 +659,9 @@ declare const UniformRichTextNode: vue_demi.DefineComponent<{
|
|
|
659
659
|
type: PropType<UniformRichTextNodeProps["resolveRichTextRenderer"]>;
|
|
660
660
|
required: false;
|
|
661
661
|
};
|
|
662
|
-
}
|
|
662
|
+
}>, (() => null) | (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
663
663
|
[key: string]: any;
|
|
664
|
-
}>),
|
|
664
|
+
}>), {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
665
665
|
node: {
|
|
666
666
|
type: PropType<UniformRichTextNodeProps["node"]>;
|
|
667
667
|
required: true;
|
|
@@ -670,7 +670,7 @@ declare const UniformRichTextNode: vue_demi.DefineComponent<{
|
|
|
670
670
|
type: PropType<UniformRichTextNodeProps["resolveRichTextRenderer"]>;
|
|
671
671
|
required: false;
|
|
672
672
|
};
|
|
673
|
-
}
|
|
673
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
674
674
|
|
|
675
675
|
type UniformSlotProps = {
|
|
676
676
|
/** Name of the slot to render */
|
|
@@ -684,23 +684,23 @@ type UniformSlotProps = {
|
|
|
684
684
|
/**
|
|
685
685
|
* Renders the content of a Canvas composition's slot
|
|
686
686
|
*/
|
|
687
|
-
declare const UniformSlot:
|
|
687
|
+
declare const UniformSlot: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
688
688
|
name: {
|
|
689
689
|
type: PropType<UniformSlotProps["name"]>;
|
|
690
690
|
};
|
|
691
691
|
resolveRenderer: {
|
|
692
692
|
type: PropType<UniformSlotProps["resolveRenderer"]>;
|
|
693
693
|
};
|
|
694
|
-
}
|
|
694
|
+
}>, () => (vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
695
695
|
[key: string]: any;
|
|
696
|
-
}>[] |
|
|
696
|
+
}>[] | Component<any>)[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
697
697
|
name: {
|
|
698
698
|
type: PropType<UniformSlotProps["name"]>;
|
|
699
699
|
};
|
|
700
700
|
resolveRenderer: {
|
|
701
701
|
type: PropType<UniformSlotProps["resolveRenderer"]>;
|
|
702
702
|
};
|
|
703
|
-
}
|
|
703
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
704
704
|
declare function renderComponent({ component, resolveRenderer, indexInSlot, slotName, parentComponent, slotChildrenCount, emptyPlaceholder, }: {
|
|
705
705
|
component: ComponentInstance;
|
|
706
706
|
resolveRenderer?: ResolveRenderer;
|
|
@@ -709,7 +709,7 @@ declare function renderComponent({ component, resolveRenderer, indexInSlot, slot
|
|
|
709
709
|
parentComponent?: ComponentInstance;
|
|
710
710
|
slotChildrenCount?: number;
|
|
711
711
|
emptyPlaceholder?: Slot;
|
|
712
|
-
}):
|
|
712
|
+
}): Component<any>;
|
|
713
713
|
|
|
714
714
|
type UseCompositionEventEffectOptions = Omit<Partial<SubscribeToCompositionOptions>, 'callback' | 'compositionId'> & {
|
|
715
715
|
compositionIdRef: Ref<SubscribeToCompositionOptions['compositionId']>;
|