@uniformdev/canvas-vue 16.0.1-alpha.143 → 16.0.1-nuxt.156

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/README.md CHANGED
@@ -1,3 +1,3 @@
1
- Vue SDK for Uniform Canvas
1
+ # Vue SDK for Uniform Canvas
2
2
 
3
3
  part of the [Uniform Platform](https://uniform.app). See our [documentation](https://docs.uniform.app) for more details.
package/dist/index.d.ts CHANGED
@@ -1,28 +1,6 @@
1
- import { resolveComponent, Component, Ref } from 'vue-demi';
1
+ import { ConcreteComponent, Component, Ref, InjectionKey } from 'vue-demi';
2
2
  import { ComponentInstance, ComponentParameter, SubscribeToCompositionOptions } from '@uniformdev/canvas';
3
3
 
4
- declare type CompositionProps = {
5
- /** A dynamic vue component that provides data to the Uniform Canvas SlotContent component via provide/inject */
6
- composition: ComponentInstance;
7
- resolveRenderer?: typeof resolveComponent;
8
- behaviorTracking?: 'onLoad' | 'onView';
9
- };
10
- declare const Composition: Component;
11
-
12
- declare type SlotComponentProps = {
13
- slotName?: string;
14
- };
15
- /**
16
- * Generates a SlotContent Vue Component
17
- * @vue-prop {String} slotName - name of the Uniform Canvas slot you wish to scope to
18
- */
19
- declare const SlotContent: Component;
20
-
21
- declare type DefaultNotImplementedComponentProps = {
22
- component: ComponentInstance;
23
- };
24
- declare const DefaultNotImplementedComponent: Component;
25
-
26
4
  declare type MapComponentNameProps = {
27
5
  name: string;
28
6
  components: Array<ComponentInstance>;
@@ -54,6 +32,46 @@ interface PersonalizeComponent {
54
32
  declare type ComponentProps<TProps = unknown> = TProps & {
55
33
  component: ComponentInstance;
56
34
  };
35
+ declare type ResolveRenderer = (componentInstance: ComponentInstance) => ConcreteComponent | undefined;
36
+
37
+ declare type CompositionProps = {
38
+ /** A dynamic vue component that provides data to the Uniform Canvas SlotContent component via provide/inject */
39
+ data: ComponentInstance;
40
+ /** Resolves a Vue component to render a Canvas component, generally by inspecting type/variant */
41
+ resolveRenderer?: ResolveRenderer;
42
+ /**
43
+ * When to track behavior from enrichment tags on this composition
44
+ * onView: adds enrichment score when the visitor views the tagged component in the browser viewport.
45
+ * onLoad: adds enrichment score as soon as the composition mounts, regardless of viewport.
46
+ *
47
+ * NOTE: onView renders a <div> tag around components that have enrichment tags, to support IntersectionObserver.
48
+ * onLoad does not need to do this, and renders no wrapping tag.
49
+ *
50
+ * Default: onView
51
+ */
52
+ behaviorTracking?: 'onLoad' | 'onView';
53
+ };
54
+ declare const Composition: Component;
55
+
56
+ declare type SlotComponentProps = {
57
+ /** Name of the slot to render */
58
+ name?: string;
59
+ /**
60
+ * Function to resolve the Vue component to render for a given Canvas component type.
61
+ * If not specified, the resolveRenderer function on the nearest <Composition /> will be used, if any.
62
+ */
63
+ resolveRenderer?: ResolveRenderer;
64
+ };
65
+ /**
66
+ * Renders the content of a Canvas composition's slot
67
+ * @vue-prop {String} name - name of the Uniform Canvas slot you wish to scope to
68
+ */
69
+ declare const SlotContent: Component;
70
+
71
+ declare type DefaultNotImplementedComponentProps = {
72
+ component: ComponentInstance;
73
+ };
74
+ declare const DefaultNotImplementedComponent: Component;
57
75
 
58
76
  /**
59
77
  * Finds the data for the provide slot name
@@ -106,5 +124,7 @@ declare function useCompositionEventEffect({ enabled, projectId, compositionIdRe
106
124
  declare const CANVAS_COMPOSITION_TYPE = "Composition";
107
125
  /** Public ID of Canvas slot component component type */
108
126
  declare const CANVAS_SLOT_CONTENT_TYPE = "SlotContent";
127
+ declare const compositionInjectionKey: InjectionKey<Ref<ComponentInstance>>;
128
+ declare const resolveRendererInjectionKey: InjectionKey<ResolveRenderer>;
109
129
 
110
- export { CANVAS_COMPOSITION_TYPE, CANVAS_SLOT_CONTENT_TYPE, ComponentProps, Composition, CompositionProps, DefaultNotImplementedComponent, DefaultNotImplementedComponentProps, MapComponentNameProps, MapSlotDataResolve, PersonalizeComponent, SlotComponentProps, SlotContent, SlotDataProps, TestComponent, UseCompositionEventEffectOptions, convertComponentToProps, getDataForSlot, mapPzSlotToVariants, mapSlotsData, mapTestSlotToVariants, useCompositionEventEffect };
130
+ export { CANVAS_COMPOSITION_TYPE, CANVAS_SLOT_CONTENT_TYPE, ComponentProps, Composition, CompositionProps, DefaultNotImplementedComponent, DefaultNotImplementedComponentProps, MapComponentNameProps, MapSlotDataResolve, PersonalizeComponent, ResolveRenderer, SlotComponentProps, SlotContent, SlotDataProps, TestComponent, UseCompositionEventEffectOptions, compositionInjectionKey, convertComponentToProps, getDataForSlot, mapPzSlotToVariants, mapSlotsData, mapTestSlotToVariants, resolveRendererInjectionKey, useCompositionEventEffect };
package/dist/index.esm.js CHANGED
@@ -1 +1 @@
1
- "use strict";import{defineComponent as h,computed as P,h as k,provide as g,resolveComponent as V}from"vue-demi";var N="Composition",_="SlotContent";import{CANVAS_ENRICHMENT_TAG_PARAM as $}from"@uniformdev/canvas";import{Track as M,TrackSlot as z,useUniformContext as U}from"@uniformdev/context-vue";var y=h({name:N,inheritAttrs:!1,props:{composition:{type:Object,required:!0},resolveRenderer:{type:Function,default:V},behaviorTracking:{type:String,default:"onView"}},setup(e,t){var m,u;let o=P(()=>e.composition);g("$__uniformData__",o),g("$__uniformResolveRenderer__",e.resolveRenderer);let n=P(()=>{var p,i;return(i=(p=o.value)==null?void 0:p.slots)!=null?i:{}}),c=P(()=>{var p,i;return(i=(p=o.value)==null?void 0:p.parameters)!=null?i:{}}),r=P(()=>{var p,i,v,S;return JSON.stringify((S=(v=(i=(p=o.value.slots)==null?void 0:p.content)==null?void 0:i[0].parameters)==null?void 0:v.title)==null?void 0:S.value)}),s=U()!==void 0,a=(u=(m=o.value.parameters)==null?void 0:m[$])==null?void 0:u.value,C=e.behaviorTracking==="onLoad"?z:M,l=()=>{var p,i;return(i=(p=t.slots).default)==null?void 0:i.call(p,{slots:n.value,parameters:c.value})};return s?()=>k(C,{behavior:a,key:r.value},l):l}});import{defineComponent as L,computed as Y,h as f,inject as A}from"vue-demi";import{CANVAS_PERSONALIZE_TYPE as E,CANVAS_TEST_TYPE as I,mapSlotToPersonalizedVariations as j}from"@uniformdev/canvas";import{Personalize as F,Test as q}from"@uniformdev/context-vue";import{pascalCase as b}from"pascal-case";var R=(e,t)=>e.find(o=>o.name===t),x=e=>{let t=[];for(let o in e)t.push({name:o,components:e[o]});return t},se=e=>{let t=o=>(delete o.parameters.intentTag,o);return e.components.map(o=>{var n;return{component:b(o.type),intentTag:((n=o.parameters.intentTag)==null?void 0:n.value)||{intents:{}},...t(o)}})},ae=e=>{let t=o=>o;return e.components.map(o=>({component:b(o.type),...t(o)}))};function T(e){var c;let t=(c=e.parameters)!=null?c:{};return{...Object.entries(t).reduce((r,[s,{value:a}])=>({...r,[w(s)]:a}),{}),...e.data,component:e}}function w(e){return e.replace("$","")}function B(e){if(typeof(e==null?void 0:e.value)=="string")return e.value}function D(e,t,o){var r,s,a;let n=e==null?void 0:e.parameters,c=j((r=e.slots)==null?void 0:r.pz);return f(F,{name:o,component:C=>{let l=T(C),m=()=>f(t(C.type),l);return f(y,{composition:l.component},m)},variations:c,count:Number((a=(s=n==null?void 0:n.count)==null?void 0:s.value)!=null?a:1),key:o})}function O(e,t,o){var s,a,C,l;let n=(a=(s=e==null?void 0:e.slots)==null?void 0:s.test)!=null?a:[],c=((l=(C=e==null?void 0:e.parameters)==null?void 0:C.test)==null?void 0:l.value)||"Untitled Test",r=n.map((m,u)=>{var p,i;return{...m,id:(i=B((p=m.parameters)==null?void 0:p.testId))!=null?i:`variation-${u+1}-${m.type}`}});return f(q,{variations:r,name:c,key:o,component:m=>{let u=T(m),p=()=>f(t(m.type),u);return f(y,{composition:u.component},p)}})}var Pe=L({name:_,inheritAttrs:!1,props:{slotName:{type:String,required:!0}},setup(e,t){let o=A("$__uniformData__"),n=A("$__uniformResolveRenderer__"),c=Y(()=>{var r;return x((r=o.value.slots)!=null?r:{})});if(e.slotName){let r=R(c.value,e.slotName);return()=>{var s;return(s=r==null?void 0:r.components.map((a,C)=>{let l=T(a),m=a.type,u=`${m}-${C}`,p=n(m),i=()=>f(p,{...l,...t.attrs,key:u});return a.type===I&&(i=()=>O(a,n,u)),a.type===E&&(i=()=>D(a,n,u)),f(y,{composition:l.component},i)}))!=null?s:[]}}return()=>c.value.map(r=>r==null?void 0:r.components.map((s,a)=>{let C=T(s),l=s.type,m=`${l}-${a}`,u=n(l),p=()=>f(u,{...C,...t.attrs,key:m});return s.type===I&&(p=()=>O(s,n,m)),s.type===E&&(p=()=>D(s,n,m)),f(y,{composition:C.component},p)}))}});import{defineComponent as J,h as d}from"vue-demi";var G={borderLeft:"10px solid #e42535",background:"rgba(122, 215, 218, 0.3)",color:"#1d3557",padding:"1rem",textAlign:"left",margin:"1rem 5vw"},H={margin:"0 0 1rem"},_e=J({name:"DefaultNotImplementedComponent",props:{component:{type:Object,required:!0}},setup(e,{attrs:t}){var n;let o=(n=e.component)==null?void 0:n.type;return()=>d("div",{key:"content",style:{...G}},[d("h2",{style:{...H}},`Component: ${o}`),d("p",[d("strong",`${o} has no Vue implementation. It may need to be added to your `),d("code",{},"resolveRenderer()"),d("strong",{}," function.")]),d("details",{},[d("summary",{},"props/attributes"),d("pre",{style:{overflowX:"auto"}},`${JSON.stringify(t)}`)])])}});import{CANVAS_DRAFT_STATE as X,createEventBus as Z,subscribeToComposition as K}from"@uniformdev/canvas";import{watch as Q}from"vue-demi";async function xe({enabled:e,projectId:t,compositionIdRef:o,effect:n}){let c;Q([()=>e,()=>o.value,()=>t],async()=>{if(c==null||c(),!e||!o.value||!t)return;let r=await Z();r&&(c=K({eventBus:r,compositionId:o.value,compositionState:X,projectId:t,callback:n,event:"updated"}))},{immediate:!0})}export{N as CANVAS_COMPOSITION_TYPE,_ as CANVAS_SLOT_CONTENT_TYPE,y as Composition,_e as DefaultNotImplementedComponent,Pe as SlotContent,T as convertComponentToProps,R as getDataForSlot,se as mapPzSlotToVariants,x as mapSlotsData,ae as mapTestSlotToVariants,xe as useCompositionEventEffect};
1
+ "use strict";import{defineComponent as A,computed as y,h as O,provide as I,inject as N,resolveComponent as _}from"vue-demi";var R="Composition",b="SlotContent",d=Symbol("uniformComposition"),C=Symbol("uniformResolveRenderer");import{CANVAS_ENRICHMENT_TAG_PARAM as V}from"@uniformdev/canvas";import{Track as k,TrackSlot as D,isUsingUniformContext as j}from"@uniformdev/context-vue";var g=A({name:R,inheritAttrs:!1,props:{data:{type:Object,required:!0},resolveRenderer:{type:Function,default:()=>({type:e})=>_(e)},behaviorTracking:{type:String,default:"onView"}},setup(e,t){var f,v,S;let o=y(()=>{var l,c;return(c=e.data)!=null?c:(l=N(d))==null?void 0:l.value}),n=(f=e.resolveRenderer)!=null?f:N(C);I(d,o),I(C,n);let s=y(()=>{var l,c;return(c=(l=o.value)==null?void 0:l.slots)!=null?c:{}}),p=y(()=>{var l,c;return(c=(l=o.value)==null?void 0:l.parameters)!=null?c:{}}),m=y(()=>JSON.stringify(o.value)),r=(S=(v=o.value.parameters)==null?void 0:v[V])==null?void 0:S.value,a=e.behaviorTracking==="onLoad"?D:k,i=()=>{var l,c;return(c=(l=t.slots).default)==null?void 0:c.call(l,{slots:s.value,parameters:p.value})};return j()?()=>O(a,{behavior:r,key:m.value},i):i}});import{defineComponent as z,computed as K,h as T,inject as h}from"vue-demi";import{CANVAS_PERSONALIZE_TYPE as M,CANVAS_TEST_TYPE as U,mapSlotToPersonalizedVariations as L,mapSlotToTestVariations as Y}from"@uniformdev/canvas";import{Personalize as $,Test as F}from"@uniformdev/context-vue";function x(e){var s;let t=(s=e.parameters)!=null?s:{};return{...Object.entries(t).reduce((p,[m,{value:r}])=>({...p,[w(m)]:r}),{}),...e.data,component:e}}function w(e){return e.replace("$","")}function q(e,t){var p,m,r,a,i,f;let o=e==null?void 0:e.parameters,n=L((p=e.slots)==null?void 0:p.pz),s=(a=(r=(m=e.parameters)==null?void 0:m.trackingEventName)==null?void 0:r.value)!=null?a:"Untitled Personalization";return T($,{name:s,component:v=>t(v),variations:n,count:Number((f=(i=o==null?void 0:o.count)==null?void 0:i.value)!=null?f:1)})}function B(e,t){var p,m,r,a,i;let o=(m=(p=e==null?void 0:e.slots)==null?void 0:p.test)!=null?m:[],n=(i=(a=(r=e==null?void 0:e.parameters)==null?void 0:r.test)==null?void 0:a.value)!=null?i:"Untitled Test",s=Y(o);return T(F,{variations:s,name:n,component:f=>t(f)})}function P({component:e,resolveRenderer:t}){let o=t==null?void 0:t(e);if(e.type===U)return B(e,n=>P({component:n,resolveRenderer:t}));if(e.type===M)return q(e,n=>P({component:n,resolveRenderer:t}));if(o){let n=x(e);return T(g,{data:e,resolveRenderer:t},()=>T(o,n))}console.warn(`[canvas] found component of type '${e.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.`,e)}var ye=z({name:b,inheritAttrs:!1,props:{name:{type:String,required:!0},resolveRenderer:{type:Function}},setup(e,t){var m;let o=h(d),n=(m=e.resolveRenderer)!=null?m:h(C);if(!o||!n)throw new Error("<SlotContent /> can only be used inside a <Composition />");let p=K(()=>{var r,a,i;return e.name?(a=(r=o==null?void 0:o.value.slots)==null?void 0:r[e.name])!=null?a:[]:Object.values((i=o==null?void 0:o.value.slots)!=null?i:{}).flat()}).value.map(r=>{let a=P({component:r,resolveRenderer:n});return t.slots.default?t.slots.default({child:a,component:r}):a});return()=>p}});import{defineComponent as J,h as u}from"vue-demi";var G={borderLeft:"10px solid #e42535",background:"rgba(122, 215, 218, 0.3)",color:"#1d3557",padding:"1rem",textAlign:"left",margin:"1rem 5vw"},H={margin:"0 0 1rem"},Re=J({name:"DefaultNotImplementedComponent",props:{component:{type:Object,required:!0}},setup(e,{attrs:t}){var n;let o=(n=e.component)==null?void 0:n.type;return()=>u("div",{key:"content",style:{...G}},[u("h2",{style:{...H}},`Component: ${o}`),u("p",[u("strong",`${o} has no Vue implementation. It may need to be added to your `),u("code",{},"resolveRenderer()"),u("strong",{}," function.")]),u("details",{},[u("summary",{},"props/attributes"),u("pre",{style:{overflowX:"auto"}},`${JSON.stringify(t)}`)])])}});import{pascalCase as E}from"pascal-case";var Ne=(e,t)=>e.find(o=>o.name===t),ge=e=>{let t=[];for(let o in e)t.push({name:o,components:e[o]});return t},xe=e=>{let t=o=>(delete o.parameters.intentTag,o);return e.components.map(o=>{var n;return{component:E(o.type),intentTag:((n=o.parameters.intentTag)==null?void 0:n.value)||{intents:{}},...t(o)}})},he=e=>{let t=o=>o;return e.components.map(o=>({component:E(o.type),...t(o)}))};import{CANVAS_DRAFT_STATE as X,createEventBus as Z,subscribeToComposition as Q}from"@uniformdev/canvas";import{watch as W}from"vue-demi";async function ee({enabled:e,projectId:t,compositionIdRef:o,effect:n}){let s;W([()=>e,()=>o.value,()=>t],async()=>{if(s==null||s(),!e||!o.value||!t)return;let p=await Z();p&&(s=Q({eventBus:p,compositionId:o.value,compositionState:X,projectId:t,callback:n,event:"updated"}))},{immediate:!0})}export{R as CANVAS_COMPOSITION_TYPE,b as CANVAS_SLOT_CONTENT_TYPE,g as Composition,Re as DefaultNotImplementedComponent,ye as SlotContent,d as compositionInjectionKey,x as convertComponentToProps,Ne as getDataForSlot,xe as mapPzSlotToVariants,ge as mapSlotsData,he as mapTestSlotToVariants,C as resolveRendererInjectionKey,ee as useCompositionEventEffect};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var g=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var z=Object.prototype.hasOwnProperty;var U=(e,t)=>{for(var o in t)g(e,o,{get:t[o],enumerable:!0})},w=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of M(t))!z.call(e,r)&&r!==o&&g(e,r,{get:()=>t[r],enumerable:!(n=$(t,r))||n.enumerable});return e};var L=e=>w(g({},"__esModule",{value:!0}),e);var Z={};U(Z,{CANVAS_COMPOSITION_TYPE:()=>b,CANVAS_SLOT_CONTENT_TYPE:()=>R,Composition:()=>v,DefaultNotImplementedComponent:()=>H,SlotContent:()=>B,convertComponentToProps:()=>S,getDataForSlot:()=>A,mapPzSlotToVariants:()=>Y,mapSlotsData:()=>E,mapTestSlotToVariants:()=>j,useCompositionEventEffect:()=>X});module.exports=L(Z);var C=require("vue-demi");var b="Composition",R="SlotContent";var O=require("@uniformdev/canvas"),P=require("@uniformdev/context-vue"),v=(0,C.defineComponent)({name:b,inheritAttrs:!1,props:{composition:{type:Object,required:!0},resolveRenderer:{type:Function,default:C.resolveComponent},behaviorTracking:{type:String,default:"onView"}},setup(e,t){var i,f;let o=(0,C.computed)(()=>e.composition);(0,C.provide)("$__uniformData__",o),(0,C.provide)("$__uniformResolveRenderer__",e.resolveRenderer);let n=(0,C.computed)(()=>{var s,c;return(c=(s=o.value)==null?void 0:s.slots)!=null?c:{}}),r=(0,C.computed)(()=>{var s,c;return(c=(s=o.value)==null?void 0:s.parameters)!=null?c:{}}),p=(0,C.computed)(()=>{var s,c,I,D;return JSON.stringify((D=(I=(c=(s=o.value.slots)==null?void 0:s.content)==null?void 0:c[0].parameters)==null?void 0:I.title)==null?void 0:D.value)}),a=(0,P.useUniformContext)()!==void 0,m=(f=(i=o.value.parameters)==null?void 0:i[O.CANVAS_ENRICHMENT_TAG_PARAM])==null?void 0:f.value,d=e.behaviorTracking==="onLoad"?P.TrackSlot:P.Track,u=()=>{var s,c;return(c=(s=t.slots).default)==null?void 0:c.call(s,{slots:n.value,parameters:r.value})};return a?()=>(0,C.h)(d,{behavior:m,key:p.value},u):u}});var l=require("vue-demi"),T=require("@uniformdev/canvas"),_=require("@uniformdev/context-vue");var x=require("pascal-case"),A=(e,t)=>e.find(o=>o.name===t),E=e=>{let t=[];for(let o in e)t.push({name:o,components:e[o]});return t},Y=e=>{let t=o=>(delete o.parameters.intentTag,o);return e.components.map(o=>{var n;return{component:(0,x.pascalCase)(o.type),intentTag:((n=o.parameters.intentTag)==null?void 0:n.value)||{intents:{}},...t(o)}})},j=e=>{let t=o=>o;return e.components.map(o=>({component:(0,x.pascalCase)(o.type),...t(o)}))};function S(e){var r;let t=(r=e.parameters)!=null?r:{};return{...Object.entries(t).reduce((p,[a,{value:m}])=>({...p,[F(a)]:m}),{}),...e.data,component:e}}function F(e){return e.replace("$","")}function q(e){if(typeof(e==null?void 0:e.value)=="string")return e.value}function h(e,t,o){var p,a,m;let n=e==null?void 0:e.parameters,r=(0,T.mapSlotToPersonalizedVariations)((p=e.slots)==null?void 0:p.pz);return(0,l.h)(_.Personalize,{name:o,component:d=>{let u=S(d),i=()=>(0,l.h)(t(d.type),u);return(0,l.h)(v,{composition:u.component},i)},variations:r,count:Number((m=(a=n==null?void 0:n.count)==null?void 0:a.value)!=null?m:1),key:o})}function k(e,t,o){var a,m,d,u;let n=(m=(a=e==null?void 0:e.slots)==null?void 0:a.test)!=null?m:[],r=((u=(d=e==null?void 0:e.parameters)==null?void 0:d.test)==null?void 0:u.value)||"Untitled Test",p=n.map((i,f)=>{var s,c;return{...i,id:(c=q((s=i.parameters)==null?void 0:s.testId))!=null?c:`variation-${f+1}-${i.type}`}});return(0,l.h)(_.Test,{variations:p,name:r,key:o,component:i=>{let f=S(i),s=()=>(0,l.h)(t(i.type),f);return(0,l.h)(v,{composition:f.component},s)}})}var B=(0,l.defineComponent)({name:R,inheritAttrs:!1,props:{slotName:{type:String,required:!0}},setup(e,t){let o=(0,l.inject)("$__uniformData__"),n=(0,l.inject)("$__uniformResolveRenderer__"),r=(0,l.computed)(()=>{var p;return E((p=o.value.slots)!=null?p:{})});if(e.slotName){let p=A(r.value,e.slotName);return()=>{var a;return(a=p==null?void 0:p.components.map((m,d)=>{let u=S(m),i=m.type,f=`${i}-${d}`,s=n(i),c=()=>(0,l.h)(s,{...u,...t.attrs,key:f});return m.type===T.CANVAS_TEST_TYPE&&(c=()=>k(m,n,f)),m.type===T.CANVAS_PERSONALIZE_TYPE&&(c=()=>h(m,n,f)),(0,l.h)(v,{composition:u.component},c)}))!=null?a:[]}}return()=>r.value.map(p=>p==null?void 0:p.components.map((a,m)=>{let d=S(a),u=a.type,i=`${u}-${m}`,f=n(u),s=()=>(0,l.h)(f,{...d,...t.attrs,key:i});return a.type===T.CANVAS_TEST_TYPE&&(s=()=>k(a,n,i)),a.type===T.CANVAS_PERSONALIZE_TYPE&&(s=()=>h(a,n,i)),(0,l.h)(v,{composition:d.component},s)}))}});var y=require("vue-demi"),J={borderLeft:"10px solid #e42535",background:"rgba(122, 215, 218, 0.3)",color:"#1d3557",padding:"1rem",textAlign:"left",margin:"1rem 5vw"},G={margin:"0 0 1rem"},H=(0,y.defineComponent)({name:"DefaultNotImplementedComponent",props:{component:{type:Object,required:!0}},setup(e,{attrs:t}){var n;let o=(n=e.component)==null?void 0:n.type;return()=>(0,y.h)("div",{key:"content",style:{...J}},[(0,y.h)("h2",{style:{...G}},`Component: ${o}`),(0,y.h)("p",[(0,y.h)("strong",`${o} has no Vue implementation. It may need to be added to your `),(0,y.h)("code",{},"resolveRenderer()"),(0,y.h)("strong",{}," function.")]),(0,y.h)("details",{},[(0,y.h)("summary",{},"props/attributes"),(0,y.h)("pre",{style:{overflowX:"auto"}},`${JSON.stringify(t)}`)])])}});var N=require("@uniformdev/canvas"),V=require("vue-demi");async function X({enabled:e,projectId:t,compositionIdRef:o,effect:n}){let r;(0,V.watch)([()=>e,()=>o.value,()=>t],async()=>{if(r==null||r(),!e||!o.value||!t)return;let p=await(0,N.createEventBus)();p&&(r=(0,N.subscribeToComposition)({eventBus:p,compositionId:o.value,compositionState:N.CANVAS_DRAFT_STATE,projectId:t,callback:n,event:"updated"}))},{immediate:!0})}0&&(module.exports={CANVAS_COMPOSITION_TYPE,CANVAS_SLOT_CONTENT_TYPE,Composition,DefaultNotImplementedComponent,SlotContent,convertComponentToProps,getDataForSlot,mapPzSlotToVariants,mapSlotsData,mapTestSlotToVariants,useCompositionEventEffect});
1
+ "use strict";var I=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var z=(e,t)=>{for(var o in t)I(e,o,{get:t[o],enumerable:!0})},K=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of j(t))!w.call(e,r)&&r!==o&&I(e,r,{get:()=>t[r],enumerable:!(n=D(t,r))||n.enumerable});return e};var M=e=>K(I({},"__esModule",{value:!0}),e);var Z={};z(Z,{CANVAS_COMPOSITION_TYPE:()=>N,CANVAS_SLOT_CONTENT_TYPE:()=>g,Composition:()=>x,DefaultNotImplementedComponent:()=>B,SlotContent:()=>$,compositionInjectionKey:()=>y,convertComponentToProps:()=>h,getDataForSlot:()=>J,mapPzSlotToVariants:()=>H,mapSlotsData:()=>G,mapTestSlotToVariants:()=>X,resolveRendererInjectionKey:()=>T,useCompositionEventEffect:()=>k});module.exports=M(Z);var s=require("vue-demi");var N="Composition",g="SlotContent",y=Symbol("uniformComposition"),T=Symbol("uniformResolveRenderer");var _=require("@uniformdev/canvas"),P=require("@uniformdev/context-vue");var x=(0,s.defineComponent)({name:N,inheritAttrs:!1,props:{data:{type:Object,required:!0},resolveRenderer:{type:Function,default:()=>({type:e})=>(0,s.resolveComponent)(e)},behaviorTracking:{type:String,default:"onView"}},setup(e,t){var v,R,O;let o=(0,s.computed)(()=>{var f,d;return(d=e.data)!=null?d:(f=(0,s.inject)(y))==null?void 0:f.value}),n=(v=e.resolveRenderer)!=null?v:(0,s.inject)(T);(0,s.provide)(y,o),(0,s.provide)(T,n);let r=(0,s.computed)(()=>{var f,d;return(d=(f=o.value)==null?void 0:f.slots)!=null?d:{}}),a=(0,s.computed)(()=>{var f,d;return(d=(f=o.value)==null?void 0:f.parameters)!=null?d:{}}),i=(0,s.computed)(()=>JSON.stringify(o.value)),p=(O=(R=o.value.parameters)==null?void 0:R[_.CANVAS_ENRICHMENT_TAG_PARAM])==null?void 0:O.value,m=e.behaviorTracking==="onLoad"?P.TrackSlot:P.Track,u=()=>{var f,d;return(d=(f=t.slots).default)==null?void 0:d.call(f,{slots:r.value,parameters:a.value})};return(0,P.isUsingUniformContext)()?()=>(0,s.h)(m,{behavior:p,key:i.value},u):u}});var l=require("vue-demi"),C=require("@uniformdev/canvas"),b=require("@uniformdev/context-vue");function h(e){var r;let t=(r=e.parameters)!=null?r:{};return{...Object.entries(t).reduce((a,[i,{value:p}])=>({...a,[U(i)]:p}),{}),...e.data,component:e}}function U(e){return e.replace("$","")}function L(e,t){var a,i,p,m,u,v;let o=e==null?void 0:e.parameters,n=(0,C.mapSlotToPersonalizedVariations)((a=e.slots)==null?void 0:a.pz),r=(m=(p=(i=e.parameters)==null?void 0:i.trackingEventName)==null?void 0:p.value)!=null?m:"Untitled Personalization";return(0,l.h)(b.Personalize,{name:r,component:R=>t(R),variations:n,count:Number((v=(u=o==null?void 0:o.count)==null?void 0:u.value)!=null?v:1)})}function Y(e,t){var a,i,p,m,u;let o=(i=(a=e==null?void 0:e.slots)==null?void 0:a.test)!=null?i:[],n=(u=(m=(p=e==null?void 0:e.parameters)==null?void 0:p.test)==null?void 0:m.value)!=null?u:"Untitled Test",r=(0,C.mapSlotToTestVariations)(o);return(0,l.h)(b.Test,{variations:r,name:n,component:v=>t(v)})}function E({component:e,resolveRenderer:t}){let o=t==null?void 0:t(e);if(e.type===C.CANVAS_TEST_TYPE)return Y(e,n=>E({component:n,resolveRenderer:t}));if(e.type===C.CANVAS_PERSONALIZE_TYPE)return L(e,n=>E({component:n,resolveRenderer:t}));if(o){let n=h(e);return(0,l.h)(x,{data:e,resolveRenderer:t},()=>(0,l.h)(o,n))}console.warn(`[canvas] found component of type '${e.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.`,e)}var $=(0,l.defineComponent)({name:g,inheritAttrs:!1,props:{name:{type:String,required:!0},resolveRenderer:{type:Function}},setup(e,t){var i;let o=(0,l.inject)(y),n=(i=e.resolveRenderer)!=null?i:(0,l.inject)(T);if(!o||!n)throw new Error("<SlotContent /> can only be used inside a <Composition />");let a=(0,l.computed)(()=>{var p,m,u;return e.name?(m=(p=o==null?void 0:o.value.slots)==null?void 0:p[e.name])!=null?m:[]:Object.values((u=o==null?void 0:o.value.slots)!=null?u:{}).flat()}).value.map(p=>{let m=E({component:p,resolveRenderer:n});return t.slots.default?t.slots.default({child:m,component:p}):m});return()=>a}});var c=require("vue-demi"),F={borderLeft:"10px solid #e42535",background:"rgba(122, 215, 218, 0.3)",color:"#1d3557",padding:"1rem",textAlign:"left",margin:"1rem 5vw"},q={margin:"0 0 1rem"},B=(0,c.defineComponent)({name:"DefaultNotImplementedComponent",props:{component:{type:Object,required:!0}},setup(e,{attrs:t}){var n;let o=(n=e.component)==null?void 0:n.type;return()=>(0,c.h)("div",{key:"content",style:{...F}},[(0,c.h)("h2",{style:{...q}},`Component: ${o}`),(0,c.h)("p",[(0,c.h)("strong",`${o} has no Vue implementation. It may need to be added to your `),(0,c.h)("code",{},"resolveRenderer()"),(0,c.h)("strong",{}," function.")]),(0,c.h)("details",{},[(0,c.h)("summary",{},"props/attributes"),(0,c.h)("pre",{style:{overflowX:"auto"}},`${JSON.stringify(t)}`)])])}});var A=require("pascal-case"),J=(e,t)=>e.find(o=>o.name===t),G=e=>{let t=[];for(let o in e)t.push({name:o,components:e[o]});return t},H=e=>{let t=o=>(delete o.parameters.intentTag,o);return e.components.map(o=>{var n;return{component:(0,A.pascalCase)(o.type),intentTag:((n=o.parameters.intentTag)==null?void 0:n.value)||{intents:{}},...t(o)}})},X=e=>{let t=o=>o;return e.components.map(o=>({component:(0,A.pascalCase)(o.type),...t(o)}))};var S=require("@uniformdev/canvas"),V=require("vue-demi");async function k({enabled:e,projectId:t,compositionIdRef:o,effect:n}){let r;(0,V.watch)([()=>e,()=>o.value,()=>t],async()=>{if(r==null||r(),!e||!o.value||!t)return;let a=await(0,S.createEventBus)();a&&(r=(0,S.subscribeToComposition)({eventBus:a,compositionId:o.value,compositionState:S.CANVAS_DRAFT_STATE,projectId:t,callback:n,event:"updated"}))},{immediate:!0})}0&&(module.exports={CANVAS_COMPOSITION_TYPE,CANVAS_SLOT_CONTENT_TYPE,Composition,DefaultNotImplementedComponent,SlotContent,compositionInjectionKey,convertComponentToProps,getDataForSlot,mapPzSlotToVariants,mapSlotsData,mapTestSlotToVariants,resolveRendererInjectionKey,useCompositionEventEffect});
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- "use strict";import{defineComponent as h,computed as P,h as k,provide as g,resolveComponent as V}from"vue-demi";var N="Composition",_="SlotContent";import{CANVAS_ENRICHMENT_TAG_PARAM as $}from"@uniformdev/canvas";import{Track as M,TrackSlot as z,useUniformContext as U}from"@uniformdev/context-vue";var y=h({name:N,inheritAttrs:!1,props:{composition:{type:Object,required:!0},resolveRenderer:{type:Function,default:V},behaviorTracking:{type:String,default:"onView"}},setup(e,t){var m,u;let o=P(()=>e.composition);g("$__uniformData__",o),g("$__uniformResolveRenderer__",e.resolveRenderer);let n=P(()=>{var p,i;return(i=(p=o.value)==null?void 0:p.slots)!=null?i:{}}),c=P(()=>{var p,i;return(i=(p=o.value)==null?void 0:p.parameters)!=null?i:{}}),r=P(()=>{var p,i,v,S;return JSON.stringify((S=(v=(i=(p=o.value.slots)==null?void 0:p.content)==null?void 0:i[0].parameters)==null?void 0:v.title)==null?void 0:S.value)}),s=U()!==void 0,a=(u=(m=o.value.parameters)==null?void 0:m[$])==null?void 0:u.value,C=e.behaviorTracking==="onLoad"?z:M,l=()=>{var p,i;return(i=(p=t.slots).default)==null?void 0:i.call(p,{slots:n.value,parameters:c.value})};return s?()=>k(C,{behavior:a,key:r.value},l):l}});import{defineComponent as L,computed as Y,h as f,inject as A}from"vue-demi";import{CANVAS_PERSONALIZE_TYPE as E,CANVAS_TEST_TYPE as I,mapSlotToPersonalizedVariations as j}from"@uniformdev/canvas";import{Personalize as F,Test as q}from"@uniformdev/context-vue";import{pascalCase as b}from"pascal-case";var R=(e,t)=>e.find(o=>o.name===t),x=e=>{let t=[];for(let o in e)t.push({name:o,components:e[o]});return t},se=e=>{let t=o=>(delete o.parameters.intentTag,o);return e.components.map(o=>{var n;return{component:b(o.type),intentTag:((n=o.parameters.intentTag)==null?void 0:n.value)||{intents:{}},...t(o)}})},ae=e=>{let t=o=>o;return e.components.map(o=>({component:b(o.type),...t(o)}))};function T(e){var c;let t=(c=e.parameters)!=null?c:{};return{...Object.entries(t).reduce((r,[s,{value:a}])=>({...r,[w(s)]:a}),{}),...e.data,component:e}}function w(e){return e.replace("$","")}function B(e){if(typeof(e==null?void 0:e.value)=="string")return e.value}function D(e,t,o){var r,s,a;let n=e==null?void 0:e.parameters,c=j((r=e.slots)==null?void 0:r.pz);return f(F,{name:o,component:C=>{let l=T(C),m=()=>f(t(C.type),l);return f(y,{composition:l.component},m)},variations:c,count:Number((a=(s=n==null?void 0:n.count)==null?void 0:s.value)!=null?a:1),key:o})}function O(e,t,o){var s,a,C,l;let n=(a=(s=e==null?void 0:e.slots)==null?void 0:s.test)!=null?a:[],c=((l=(C=e==null?void 0:e.parameters)==null?void 0:C.test)==null?void 0:l.value)||"Untitled Test",r=n.map((m,u)=>{var p,i;return{...m,id:(i=B((p=m.parameters)==null?void 0:p.testId))!=null?i:`variation-${u+1}-${m.type}`}});return f(q,{variations:r,name:c,key:o,component:m=>{let u=T(m),p=()=>f(t(m.type),u);return f(y,{composition:u.component},p)}})}var Pe=L({name:_,inheritAttrs:!1,props:{slotName:{type:String,required:!0}},setup(e,t){let o=A("$__uniformData__"),n=A("$__uniformResolveRenderer__"),c=Y(()=>{var r;return x((r=o.value.slots)!=null?r:{})});if(e.slotName){let r=R(c.value,e.slotName);return()=>{var s;return(s=r==null?void 0:r.components.map((a,C)=>{let l=T(a),m=a.type,u=`${m}-${C}`,p=n(m),i=()=>f(p,{...l,...t.attrs,key:u});return a.type===I&&(i=()=>O(a,n,u)),a.type===E&&(i=()=>D(a,n,u)),f(y,{composition:l.component},i)}))!=null?s:[]}}return()=>c.value.map(r=>r==null?void 0:r.components.map((s,a)=>{let C=T(s),l=s.type,m=`${l}-${a}`,u=n(l),p=()=>f(u,{...C,...t.attrs,key:m});return s.type===I&&(p=()=>O(s,n,m)),s.type===E&&(p=()=>D(s,n,m)),f(y,{composition:C.component},p)}))}});import{defineComponent as J,h as d}from"vue-demi";var G={borderLeft:"10px solid #e42535",background:"rgba(122, 215, 218, 0.3)",color:"#1d3557",padding:"1rem",textAlign:"left",margin:"1rem 5vw"},H={margin:"0 0 1rem"},_e=J({name:"DefaultNotImplementedComponent",props:{component:{type:Object,required:!0}},setup(e,{attrs:t}){var n;let o=(n=e.component)==null?void 0:n.type;return()=>d("div",{key:"content",style:{...G}},[d("h2",{style:{...H}},`Component: ${o}`),d("p",[d("strong",`${o} has no Vue implementation. It may need to be added to your `),d("code",{},"resolveRenderer()"),d("strong",{}," function.")]),d("details",{},[d("summary",{},"props/attributes"),d("pre",{style:{overflowX:"auto"}},`${JSON.stringify(t)}`)])])}});import{CANVAS_DRAFT_STATE as X,createEventBus as Z,subscribeToComposition as K}from"@uniformdev/canvas";import{watch as Q}from"vue-demi";async function xe({enabled:e,projectId:t,compositionIdRef:o,effect:n}){let c;Q([()=>e,()=>o.value,()=>t],async()=>{if(c==null||c(),!e||!o.value||!t)return;let r=await Z();r&&(c=K({eventBus:r,compositionId:o.value,compositionState:X,projectId:t,callback:n,event:"updated"}))},{immediate:!0})}export{N as CANVAS_COMPOSITION_TYPE,_ as CANVAS_SLOT_CONTENT_TYPE,y as Composition,_e as DefaultNotImplementedComponent,Pe as SlotContent,T as convertComponentToProps,R as getDataForSlot,se as mapPzSlotToVariants,x as mapSlotsData,ae as mapTestSlotToVariants,xe as useCompositionEventEffect};
1
+ "use strict";import{defineComponent as A,computed as y,h as O,provide as I,inject as N,resolveComponent as _}from"vue-demi";var R="Composition",b="SlotContent",d=Symbol("uniformComposition"),C=Symbol("uniformResolveRenderer");import{CANVAS_ENRICHMENT_TAG_PARAM as V}from"@uniformdev/canvas";import{Track as k,TrackSlot as D,isUsingUniformContext as j}from"@uniformdev/context-vue";var g=A({name:R,inheritAttrs:!1,props:{data:{type:Object,required:!0},resolveRenderer:{type:Function,default:()=>({type:e})=>_(e)},behaviorTracking:{type:String,default:"onView"}},setup(e,t){var f,v,S;let o=y(()=>{var l,c;return(c=e.data)!=null?c:(l=N(d))==null?void 0:l.value}),n=(f=e.resolveRenderer)!=null?f:N(C);I(d,o),I(C,n);let s=y(()=>{var l,c;return(c=(l=o.value)==null?void 0:l.slots)!=null?c:{}}),p=y(()=>{var l,c;return(c=(l=o.value)==null?void 0:l.parameters)!=null?c:{}}),m=y(()=>JSON.stringify(o.value)),r=(S=(v=o.value.parameters)==null?void 0:v[V])==null?void 0:S.value,a=e.behaviorTracking==="onLoad"?D:k,i=()=>{var l,c;return(c=(l=t.slots).default)==null?void 0:c.call(l,{slots:s.value,parameters:p.value})};return j()?()=>O(a,{behavior:r,key:m.value},i):i}});import{defineComponent as z,computed as K,h as T,inject as h}from"vue-demi";import{CANVAS_PERSONALIZE_TYPE as M,CANVAS_TEST_TYPE as U,mapSlotToPersonalizedVariations as L,mapSlotToTestVariations as Y}from"@uniformdev/canvas";import{Personalize as $,Test as F}from"@uniformdev/context-vue";function x(e){var s;let t=(s=e.parameters)!=null?s:{};return{...Object.entries(t).reduce((p,[m,{value:r}])=>({...p,[w(m)]:r}),{}),...e.data,component:e}}function w(e){return e.replace("$","")}function q(e,t){var p,m,r,a,i,f;let o=e==null?void 0:e.parameters,n=L((p=e.slots)==null?void 0:p.pz),s=(a=(r=(m=e.parameters)==null?void 0:m.trackingEventName)==null?void 0:r.value)!=null?a:"Untitled Personalization";return T($,{name:s,component:v=>t(v),variations:n,count:Number((f=(i=o==null?void 0:o.count)==null?void 0:i.value)!=null?f:1)})}function B(e,t){var p,m,r,a,i;let o=(m=(p=e==null?void 0:e.slots)==null?void 0:p.test)!=null?m:[],n=(i=(a=(r=e==null?void 0:e.parameters)==null?void 0:r.test)==null?void 0:a.value)!=null?i:"Untitled Test",s=Y(o);return T(F,{variations:s,name:n,component:f=>t(f)})}function P({component:e,resolveRenderer:t}){let o=t==null?void 0:t(e);if(e.type===U)return B(e,n=>P({component:n,resolveRenderer:t}));if(e.type===M)return q(e,n=>P({component:n,resolveRenderer:t}));if(o){let n=x(e);return T(g,{data:e,resolveRenderer:t},()=>T(o,n))}console.warn(`[canvas] found component of type '${e.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.`,e)}var ye=z({name:b,inheritAttrs:!1,props:{name:{type:String,required:!0},resolveRenderer:{type:Function}},setup(e,t){var m;let o=h(d),n=(m=e.resolveRenderer)!=null?m:h(C);if(!o||!n)throw new Error("<SlotContent /> can only be used inside a <Composition />");let p=K(()=>{var r,a,i;return e.name?(a=(r=o==null?void 0:o.value.slots)==null?void 0:r[e.name])!=null?a:[]:Object.values((i=o==null?void 0:o.value.slots)!=null?i:{}).flat()}).value.map(r=>{let a=P({component:r,resolveRenderer:n});return t.slots.default?t.slots.default({child:a,component:r}):a});return()=>p}});import{defineComponent as J,h as u}from"vue-demi";var G={borderLeft:"10px solid #e42535",background:"rgba(122, 215, 218, 0.3)",color:"#1d3557",padding:"1rem",textAlign:"left",margin:"1rem 5vw"},H={margin:"0 0 1rem"},Re=J({name:"DefaultNotImplementedComponent",props:{component:{type:Object,required:!0}},setup(e,{attrs:t}){var n;let o=(n=e.component)==null?void 0:n.type;return()=>u("div",{key:"content",style:{...G}},[u("h2",{style:{...H}},`Component: ${o}`),u("p",[u("strong",`${o} has no Vue implementation. It may need to be added to your `),u("code",{},"resolveRenderer()"),u("strong",{}," function.")]),u("details",{},[u("summary",{},"props/attributes"),u("pre",{style:{overflowX:"auto"}},`${JSON.stringify(t)}`)])])}});import{pascalCase as E}from"pascal-case";var Ne=(e,t)=>e.find(o=>o.name===t),ge=e=>{let t=[];for(let o in e)t.push({name:o,components:e[o]});return t},xe=e=>{let t=o=>(delete o.parameters.intentTag,o);return e.components.map(o=>{var n;return{component:E(o.type),intentTag:((n=o.parameters.intentTag)==null?void 0:n.value)||{intents:{}},...t(o)}})},he=e=>{let t=o=>o;return e.components.map(o=>({component:E(o.type),...t(o)}))};import{CANVAS_DRAFT_STATE as X,createEventBus as Z,subscribeToComposition as Q}from"@uniformdev/canvas";import{watch as W}from"vue-demi";async function ee({enabled:e,projectId:t,compositionIdRef:o,effect:n}){let s;W([()=>e,()=>o.value,()=>t],async()=>{if(s==null||s(),!e||!o.value||!t)return;let p=await Z();p&&(s=Q({eventBus:p,compositionId:o.value,compositionState:X,projectId:t,callback:n,event:"updated"}))},{immediate:!0})}export{R as CANVAS_COMPOSITION_TYPE,b as CANVAS_SLOT_CONTENT_TYPE,g as Composition,Re as DefaultNotImplementedComponent,ye as SlotContent,d as compositionInjectionKey,x as convertComponentToProps,Ne as getDataForSlot,xe as mapPzSlotToVariants,ge as mapSlotsData,he as mapTestSlotToVariants,C as resolveRendererInjectionKey,ee as useCompositionEventEffect};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-vue",
3
- "version": "16.0.1-alpha.143+8bf270fcc",
3
+ "version": "16.0.1-nuxt.156+99cb5fbfb",
4
4
  "description": "Vue SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -23,8 +23,8 @@
23
23
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\""
24
24
  },
25
25
  "dependencies": {
26
- "@uniformdev/canvas": "^16.0.1-alpha.143+8bf270fcc",
27
- "@uniformdev/context-vue": "^16.0.1-alpha.143+8bf270fcc",
26
+ "@uniformdev/canvas": "^16.0.1-nuxt.156+99cb5fbfb",
27
+ "@uniformdev/context-vue": "^16.0.1-nuxt.156+99cb5fbfb",
28
28
  "@vue/test-utils": "1.3.0",
29
29
  "pascal-case": "3.1.2",
30
30
  "uuid": "8.3.2",
@@ -40,7 +40,7 @@
40
40
  }
41
41
  },
42
42
  "devDependencies": {
43
- "@testing-library/vue": "6.5.1",
43
+ "@testing-library/vue": "6.6.0",
44
44
  "@types/uuid": "8.3.4",
45
45
  "@vue/server-test-utils": "1.3.0",
46
46
  "vue": "3.2.25",
@@ -64,5 +64,5 @@
64
64
  "last 2 versions",
65
65
  "not dead"
66
66
  ],
67
- "gitHead": "8bf270fcc0cc82383d1f30311fe11dafd5fe3782"
67
+ "gitHead": "99cb5fbfbf949ccfa2fa8403a9f62427c6f87de8"
68
68
  }
@@ -1,26 +0,0 @@
1
- {
2
- "composition/composition": {
3
- "type": "object",
4
- "description": "The Uniform canvas data to be used from a prop or via provide/inject using $__uniformData__"
5
- },
6
- "composition/page-meta": {
7
- "type": "object",
8
- "description": "Object includes id: string, name: string and slug: string, that is converted to page meta data"
9
- },
10
- "composition/wrapper": {
11
- "type": "string | Component",
12
- "description": "HTML tag name or a component. Defaults to `\"div\""
13
- },
14
- "slot-content/uniform-data": {
15
- "type": "object",
16
- "description": "Data that can be used as a named prop or provided by inject/provide from the Composition component"
17
- },
18
- "slot-content/slot-name": {
19
- "type": "string",
20
- "description": "The Uniform canvas slot name to render"
21
- },
22
- "slot-content/wrapper": {
23
- "type": "string | Component",
24
- "description": "HTML tag name or a component. Defaults to `\"div\""
25
- }
26
- }
package/vetur/tags.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "composition": {
3
- "attributes": ["composition", "page-meta", "wrapper"],
4
- "description": "Component that wraps around and provides uniformData to the SlotContent component"
5
- },
6
- "slot-content": {
7
- "attributes": ["uniform-data", "slot-name", "wrapper"],
8
- "description": "Component to render Uniform Canvas components"
9
- }
10
- }