@platecms/delta-vue 0.1.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.
@@ -0,0 +1,4 @@
1
+ import { ExperienceEditorView as i } from "./index.js";
2
+ export {
3
+ i as default
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs");exports.default=e.ExperienceEditorView;
@@ -0,0 +1,4 @@
1
+ import { ExperiencePreviewView as i } from "./index.js";
2
+ export {
3
+ i as default
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs");exports.default=e.ExperiencePreviewView;
@@ -0,0 +1,4 @@
1
+ import { ExperienceView as a } from "./index.js";
2
+ export {
3
+ a as default
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs");exports.default=e.ExperienceView;
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # delta-vue
2
+
3
+ This library is part of the [Delta Client]() utility packages.
4
+ It provides a plugin to connect to the Plate Delta CMS in a Vue application.
5
+
6
+ ## Usage
7
+
8
+ ```ts
9
+ import { createApp } from 'vue'
10
+ import router from "./router";
11
+ import { delta } from '@platecms/delta-vue'
12
+
13
+ const app = createApp(App);
14
+
15
+ app.use(delta, {
16
+ router,
17
+ library: {
18
+ // slug and component mapping
19
+ },
20
+ blacklist: ["root"],
21
+ mode: "dev",
22
+ });
23
+ app.use(router);
24
+
25
+ app.mount("#root");
26
+ ```
@@ -0,0 +1,22 @@
1
+ import { ExperienceComponent } from '../../__generated__/graphql';
2
+ type __VLS_Props = {
3
+ experienceComponent: ExperienceComponent;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ 'render-component'?(_: {}): any;
9
+ 'grid-placements'?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: any;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,6 @@
1
+ import { GridPlacement } from '../../__generated__/graphql';
2
+ type __VLS_Props = {
3
+ gridPlacement: GridPlacement;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,26 @@
1
+ import { BuildingBlock, BuildingBlockFieldFulfillment } from '../../__generated__/graphql';
2
+ type __VLS_Props = {
3
+ buildingBlock?: BuildingBlock;
4
+ buildingBlockFieldFulfillments?: BuildingBlockFieldFulfillment[];
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ 'missing-component'?(_: {
10
+ data: BuildingBlock;
11
+ }): any;
12
+ };
13
+ refs: {};
14
+ rootEl: any;
15
+ };
16
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
+ buildingBlockFieldFulfillments: BuildingBlockFieldFulfillment[];
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,21 @@
1
+ import { ExperienceComponent } from '../../__generated__/graphql';
2
+ type __VLS_Props = {
3
+ rootExperienceComponent: ExperienceComponent;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: any;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
+ export default _default;
17
+ type __VLS_WithTemplateSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,9 @@
1
+ import { Draft } from '../../../../delta-client/src/utils';
2
+ import { ExperienceComponent, GridPlacement } from '../../../__generated__/graphql';
3
+ type __VLS_Props = {
4
+ rows?: number;
5
+ experienceComponent: Draft<ExperienceComponent>;
6
+ gridPlacement?: Draft<GridPlacement>;
7
+ };
8
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { Draft } from '../../../../delta-client/src/utils';
2
+ import { GridPlacement } from '../../../__generated__/graphql';
3
+ type __VLS_Props = {
4
+ rows?: number;
5
+ gridPlacement: Draft<GridPlacement>;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
8
+ target: HTMLDivElement;
9
+ }, HTMLDivElement>;
10
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { ExperienceComponent } from '../../../__generated__/graphql';
2
+ import { Draft } from '../../../../delta-client/src/utils';
3
+ type __VLS_Props = {
4
+ rootExperienceComponent: Draft<ExperienceComponent>;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import { Draft } from '../../../../../delta-client/src/utils';
2
+ import { ExperienceComponent } from '../../../../__generated__/graphql';
3
+ type __VLS_Props = {
4
+ rows?: number;
5
+ row?: number;
6
+ experienceComponent: Draft<ExperienceComponent>;
7
+ };
8
+ declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
10
+ slots: {
11
+ default?(_: {}): any;
12
+ };
13
+ refs: {};
14
+ rootEl: HTMLDivElement;
15
+ };
16
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
18
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
+ export default _default;
20
+ type __VLS_WithTemplateSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,9 @@
1
+ import { BuildingBlock } from '../../../__generated__/graphql';
2
+ type __VLS_Props = {
3
+ type?: 'content-experience' | 'blueprint';
4
+ buildingBlockToCreate?: BuildingBlock;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
+ type: "content-experience" | "blueprint";
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
9
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { BuildingBlock } from '../../../__generated__/graphql';
2
+ type __VLS_Props = {
3
+ buildingBlock: BuildingBlock;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { Delta } from './index';
2
+ export declare function createDelta(): Delta;
@@ -0,0 +1,10 @@
1
+ import { Component } from 'vue';
2
+ import { Delta } from './index';
3
+ import { ComponentProps } from 'vue-component-type-helpers';
4
+ import { BuildingBlock, BuildingBlockFieldFulfillment } from '../__generated__/graphql';
5
+ export interface DeltaComponent<C extends Component> {
6
+ component: C;
7
+ transformer: (block: BuildingBlock, values?: BuildingBlockFieldFulfillment[]) => ComponentProps<C>;
8
+ }
9
+ export type DeltaComponentSetup<C extends Component> = Omit<DeltaComponent<C>, "component">;
10
+ export declare function defineComponent<C extends Component>(id: string, component: C, setup: () => DeltaComponentSetup<C>): (delta?: Delta | null) => DeltaComponent<C>;