@uniformdev/canvas-vue 19.213.1-alpha.14 → 19.214.1-alpha.10
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 +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.esm.js +0 -38
- package/dist/index.js +3 -38
- package/dist/index.mjs +0 -38
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { PropType, Component, Ref, ComputedRef, VNode, Slot } from 'vue';
|
|
3
|
-
import { ComponentInstance, ComponentParameter, RootComponentInstance, UpdateCompositionMessage
|
|
3
|
+
import { ComponentInstance, ComponentParameter, RootComponentInstance, UpdateCompositionMessage } from '@uniformdev/canvas';
|
|
4
4
|
export { GetParameterAttributesProps, createUniformApiEnhancer, getParameterAttributes } from '@uniformdev/canvas';
|
|
5
5
|
import { RichTextNode } from '@uniformdev/richtext';
|
|
6
6
|
|
|
@@ -733,14 +733,6 @@ declare function renderComponent({ component, resolveRenderer, indexInSlot, slot
|
|
|
733
733
|
emptyPlaceholder?: Slot;
|
|
734
734
|
}): Component<any>;
|
|
735
735
|
|
|
736
|
-
type UseCompositionEventEffectOptions = Omit<Partial<SubscribeToCompositionOptions>, 'callback' | 'compositionId'> & {
|
|
737
|
-
compositionIdRef: Ref<SubscribeToCompositionOptions['compositionId']>;
|
|
738
|
-
enabled: boolean;
|
|
739
|
-
effect: () => void;
|
|
740
|
-
};
|
|
741
|
-
/** A composable to manage a subscription to a realtime event on a composition */
|
|
742
|
-
declare function useCompositionEventEffect({ enabled, projectId, compositionIdRef, effect, }: UseCompositionEventEffectOptions): Promise<void>;
|
|
743
|
-
|
|
744
736
|
declare const globalCompositionEnhancerInjectionKey = "uniformGlobalCompositionEnhancer";
|
|
745
737
|
|
|
746
738
|
/**
|
|
@@ -751,4 +743,4 @@ declare const globalCompositionEnhancerInjectionKey = "uniformGlobalCompositionE
|
|
|
751
743
|
*/
|
|
752
744
|
declare function convertComponentToProps<T = unknown>(component: ComponentInstance): ComponentProps<T>;
|
|
753
745
|
|
|
754
|
-
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
|
|
746
|
+
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 UseUniformContextualEditingProps, convertComponentToProps, globalCompositionEnhancerInjectionKey, renderComponent, useUniformContextualEditing, useUniformCurrentComponent, useUniformCurrentComposition };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { PropType, Component, Ref, ComputedRef, VNode, Slot } from 'vue';
|
|
3
|
-
import { ComponentInstance, ComponentParameter, RootComponentInstance, UpdateCompositionMessage
|
|
3
|
+
import { ComponentInstance, ComponentParameter, RootComponentInstance, UpdateCompositionMessage } from '@uniformdev/canvas';
|
|
4
4
|
export { GetParameterAttributesProps, createUniformApiEnhancer, getParameterAttributes } from '@uniformdev/canvas';
|
|
5
5
|
import { RichTextNode } from '@uniformdev/richtext';
|
|
6
6
|
|
|
@@ -733,14 +733,6 @@ declare function renderComponent({ component, resolveRenderer, indexInSlot, slot
|
|
|
733
733
|
emptyPlaceholder?: Slot;
|
|
734
734
|
}): Component<any>;
|
|
735
735
|
|
|
736
|
-
type UseCompositionEventEffectOptions = Omit<Partial<SubscribeToCompositionOptions>, 'callback' | 'compositionId'> & {
|
|
737
|
-
compositionIdRef: Ref<SubscribeToCompositionOptions['compositionId']>;
|
|
738
|
-
enabled: boolean;
|
|
739
|
-
effect: () => void;
|
|
740
|
-
};
|
|
741
|
-
/** A composable to manage a subscription to a realtime event on a composition */
|
|
742
|
-
declare function useCompositionEventEffect({ enabled, projectId, compositionIdRef, effect, }: UseCompositionEventEffectOptions): Promise<void>;
|
|
743
|
-
|
|
744
736
|
declare const globalCompositionEnhancerInjectionKey = "uniformGlobalCompositionEnhancer";
|
|
745
737
|
|
|
746
738
|
/**
|
|
@@ -751,4 +743,4 @@ declare const globalCompositionEnhancerInjectionKey = "uniformGlobalCompositionE
|
|
|
751
743
|
*/
|
|
752
744
|
declare function convertComponentToProps<T = unknown>(component: ComponentInstance): ComponentProps<T>;
|
|
753
745
|
|
|
754
|
-
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
|
|
746
|
+
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 UseUniformContextualEditingProps, convertComponentToProps, globalCompositionEnhancerInjectionKey, renderComponent, useUniformContextualEditing, useUniformCurrentComponent, useUniformCurrentComposition };
|
package/dist/index.esm.js
CHANGED
|
@@ -969,43 +969,6 @@ var UniformText = defineComponent9({
|
|
|
969
969
|
}
|
|
970
970
|
});
|
|
971
971
|
|
|
972
|
-
// src/composables/useCompositionEventEffect.ts
|
|
973
|
-
import {
|
|
974
|
-
CANVAS_DRAFT_STATE,
|
|
975
|
-
createEventBus,
|
|
976
|
-
subscribeToComposition
|
|
977
|
-
} from "@uniformdev/canvas";
|
|
978
|
-
import { watch as watch2 } from "vue";
|
|
979
|
-
async function useCompositionEventEffect({
|
|
980
|
-
enabled,
|
|
981
|
-
projectId,
|
|
982
|
-
compositionIdRef,
|
|
983
|
-
effect
|
|
984
|
-
}) {
|
|
985
|
-
let unsubscribe;
|
|
986
|
-
watch2(
|
|
987
|
-
[() => enabled, () => compositionIdRef.value, () => projectId],
|
|
988
|
-
async () => {
|
|
989
|
-
unsubscribe == null ? void 0 : unsubscribe();
|
|
990
|
-
if (!enabled || !compositionIdRef.value || !projectId) {
|
|
991
|
-
return;
|
|
992
|
-
}
|
|
993
|
-
const eventBus = await createEventBus();
|
|
994
|
-
if (eventBus) {
|
|
995
|
-
unsubscribe = subscribeToComposition({
|
|
996
|
-
eventBus,
|
|
997
|
-
compositionId: compositionIdRef.value,
|
|
998
|
-
compositionState: CANVAS_DRAFT_STATE,
|
|
999
|
-
projectId,
|
|
1000
|
-
callback: effect,
|
|
1001
|
-
event: "updated"
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
|
-
},
|
|
1005
|
-
{ immediate: true }
|
|
1006
|
-
);
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
972
|
// src/helpers/getParameterAttributes.ts
|
|
1010
973
|
import { getParameterAttributes } from "@uniformdev/canvas";
|
|
1011
974
|
export {
|
|
@@ -1033,7 +996,6 @@ export {
|
|
|
1033
996
|
getParameterAttributes,
|
|
1034
997
|
globalCompositionEnhancerInjectionKey,
|
|
1035
998
|
renderComponent,
|
|
1036
|
-
useCompositionEventEffect,
|
|
1037
999
|
useUniformContextualEditing,
|
|
1038
1000
|
useUniformCurrentComponent,
|
|
1039
1001
|
useUniformCurrentComposition
|
package/dist/index.js
CHANGED
|
@@ -41,10 +41,9 @@ __export(src_exports, {
|
|
|
41
41
|
UniformText: () => UniformText,
|
|
42
42
|
convertComponentToProps: () => convertComponentToProps,
|
|
43
43
|
createUniformApiEnhancer: () => import_canvas3.createUniformApiEnhancer,
|
|
44
|
-
getParameterAttributes: () =>
|
|
44
|
+
getParameterAttributes: () => import_canvas9.getParameterAttributes,
|
|
45
45
|
globalCompositionEnhancerInjectionKey: () => globalCompositionEnhancerInjectionKey,
|
|
46
46
|
renderComponent: () => renderComponent,
|
|
47
|
-
useCompositionEventEffect: () => useCompositionEventEffect,
|
|
48
47
|
useUniformContextualEditing: () => useUniformContextualEditing,
|
|
49
48
|
useUniformCurrentComponent: () => useUniformCurrentComponent,
|
|
50
49
|
useUniformCurrentComposition: () => useUniformCurrentComposition
|
|
@@ -967,7 +966,7 @@ var UniformText = (0, import_vue24.defineComponent)({
|
|
|
967
966
|
return (0, import_vue24.h)(
|
|
968
967
|
(_a2 = props.as) != null ? _a2 : DEFAULT_ELEMENT_TYPE,
|
|
969
968
|
{
|
|
970
|
-
...(0,
|
|
969
|
+
...(0, import_canvas9.getParameterAttributes)({
|
|
971
970
|
component: componentData,
|
|
972
971
|
id: props.parameterId,
|
|
973
972
|
isMultiline: props.isMultiline
|
|
@@ -985,41 +984,8 @@ var UniformText = (0, import_vue24.defineComponent)({
|
|
|
985
984
|
}
|
|
986
985
|
});
|
|
987
986
|
|
|
988
|
-
// src/composables/useCompositionEventEffect.ts
|
|
989
|
-
var import_canvas9 = require("@uniformdev/canvas");
|
|
990
|
-
var import_vue25 = require("vue");
|
|
991
|
-
async function useCompositionEventEffect({
|
|
992
|
-
enabled,
|
|
993
|
-
projectId,
|
|
994
|
-
compositionIdRef,
|
|
995
|
-
effect
|
|
996
|
-
}) {
|
|
997
|
-
let unsubscribe;
|
|
998
|
-
(0, import_vue25.watch)(
|
|
999
|
-
[() => enabled, () => compositionIdRef.value, () => projectId],
|
|
1000
|
-
async () => {
|
|
1001
|
-
unsubscribe == null ? void 0 : unsubscribe();
|
|
1002
|
-
if (!enabled || !compositionIdRef.value || !projectId) {
|
|
1003
|
-
return;
|
|
1004
|
-
}
|
|
1005
|
-
const eventBus = await (0, import_canvas9.createEventBus)();
|
|
1006
|
-
if (eventBus) {
|
|
1007
|
-
unsubscribe = (0, import_canvas9.subscribeToComposition)({
|
|
1008
|
-
eventBus,
|
|
1009
|
-
compositionId: compositionIdRef.value,
|
|
1010
|
-
compositionState: import_canvas9.CANVAS_DRAFT_STATE,
|
|
1011
|
-
projectId,
|
|
1012
|
-
callback: effect,
|
|
1013
|
-
event: "updated"
|
|
1014
|
-
});
|
|
1015
|
-
}
|
|
1016
|
-
},
|
|
1017
|
-
{ immediate: true }
|
|
1018
|
-
);
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
987
|
// src/helpers/getParameterAttributes.ts
|
|
1022
|
-
var
|
|
988
|
+
var import_canvas9 = require("@uniformdev/canvas");
|
|
1023
989
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1024
990
|
0 && (module.exports = {
|
|
1025
991
|
DefaultNotImplementedComponent,
|
|
@@ -1046,7 +1012,6 @@ var import_canvas10 = require("@uniformdev/canvas");
|
|
|
1046
1012
|
getParameterAttributes,
|
|
1047
1013
|
globalCompositionEnhancerInjectionKey,
|
|
1048
1014
|
renderComponent,
|
|
1049
|
-
useCompositionEventEffect,
|
|
1050
1015
|
useUniformContextualEditing,
|
|
1051
1016
|
useUniformCurrentComponent,
|
|
1052
1017
|
useUniformCurrentComposition
|
package/dist/index.mjs
CHANGED
|
@@ -969,43 +969,6 @@ var UniformText = defineComponent9({
|
|
|
969
969
|
}
|
|
970
970
|
});
|
|
971
971
|
|
|
972
|
-
// src/composables/useCompositionEventEffect.ts
|
|
973
|
-
import {
|
|
974
|
-
CANVAS_DRAFT_STATE,
|
|
975
|
-
createEventBus,
|
|
976
|
-
subscribeToComposition
|
|
977
|
-
} from "@uniformdev/canvas";
|
|
978
|
-
import { watch as watch2 } from "vue";
|
|
979
|
-
async function useCompositionEventEffect({
|
|
980
|
-
enabled,
|
|
981
|
-
projectId,
|
|
982
|
-
compositionIdRef,
|
|
983
|
-
effect
|
|
984
|
-
}) {
|
|
985
|
-
let unsubscribe;
|
|
986
|
-
watch2(
|
|
987
|
-
[() => enabled, () => compositionIdRef.value, () => projectId],
|
|
988
|
-
async () => {
|
|
989
|
-
unsubscribe == null ? void 0 : unsubscribe();
|
|
990
|
-
if (!enabled || !compositionIdRef.value || !projectId) {
|
|
991
|
-
return;
|
|
992
|
-
}
|
|
993
|
-
const eventBus = await createEventBus();
|
|
994
|
-
if (eventBus) {
|
|
995
|
-
unsubscribe = subscribeToComposition({
|
|
996
|
-
eventBus,
|
|
997
|
-
compositionId: compositionIdRef.value,
|
|
998
|
-
compositionState: CANVAS_DRAFT_STATE,
|
|
999
|
-
projectId,
|
|
1000
|
-
callback: effect,
|
|
1001
|
-
event: "updated"
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
|
-
},
|
|
1005
|
-
{ immediate: true }
|
|
1006
|
-
);
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
972
|
// src/helpers/getParameterAttributes.ts
|
|
1010
973
|
import { getParameterAttributes } from "@uniformdev/canvas";
|
|
1011
974
|
export {
|
|
@@ -1033,7 +996,6 @@ export {
|
|
|
1033
996
|
getParameterAttributes,
|
|
1034
997
|
globalCompositionEnhancerInjectionKey,
|
|
1035
998
|
renderComponent,
|
|
1036
|
-
useCompositionEventEffect,
|
|
1037
999
|
useUniformContextualEditing,
|
|
1038
1000
|
useUniformCurrentComponent,
|
|
1039
1001
|
useUniformCurrentComposition
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-vue",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.214.1-alpha.10+98dac3377a",
|
|
4
4
|
"description": "Vue SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"document": "api-extractor run --local"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@uniformdev/canvas": "19.
|
|
34
|
-
"@uniformdev/context-vue": "19.
|
|
35
|
-
"@uniformdev/richtext": "19.
|
|
33
|
+
"@uniformdev/canvas": "19.214.1-alpha.10+98dac3377a",
|
|
34
|
+
"@uniformdev/context-vue": "19.214.1-alpha.10+98dac3377a",
|
|
35
|
+
"@uniformdev/richtext": "19.214.1-alpha.10+98dac3377a"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"vue": ">=3.0.0"
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "98dac3377a8313b1d70d0b02632a6a7192f2409c"
|
|
68
68
|
}
|