@graffiti-garden/wrapper-vue 0.2.0 → 0.3.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/README.md +2 -2
- package/dist/Discover.vue.d.ts +12 -8
- package/dist/Discover.vue.d.ts.map +1 -1
- package/dist/Get.vue.d.ts +12 -22
- package/dist/Get.vue.d.ts.map +1 -1
- package/dist/RecoverOrphans.vue.d.ts +12 -8
- package/dist/RecoverOrphans.vue.d.ts.map +1 -1
- package/dist/composables.d.ts +11 -72
- package/dist/composables.d.ts.map +1 -1
- package/dist/plugin.d.ts +64 -68
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +12 -12
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs +3247 -3202
- package/dist/plugin.mjs.map +1 -1
- package/dist/pollers.d.ts +4 -4
- package/dist/pollers.d.ts.map +1 -1
- package/dist/reducers.d.ts +9 -26
- package/dist/reducers.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/Discover.vue +14 -2
- package/src/Get.vue +11 -2
- package/src/RecoverOrphans.vue +14 -2
- package/src/composables.ts +32 -24
- package/src/plugin.ts +1 -1
- package/src/pollers.ts +23 -18
- package/src/reducers.ts +19 -11
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ which make it possible to create a whole Graffiti app in an HTML template,
|
|
|
10
10
|
and [composables](https://vuejs.org/guide/reusability/composables.html),
|
|
11
11
|
which can be used in the programmatic [composition API](https://vuejs.org/guide/extras/composition-api-faq.html).
|
|
12
12
|
|
|
13
|
-
[**Read the API documentation**](https://vue.graffiti.garden/variables/
|
|
13
|
+
[**Read the API documentation**](https://vue.graffiti.garden/variables/GraffitiPlugin.html).
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
@@ -57,4 +57,4 @@ createApp({})
|
|
|
57
57
|
.mount("#app");
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
[See live examples of both methods](/examples)
|
|
60
|
+
[See live examples of both methods](https://vue.graffiti.garden/examples/)
|
package/dist/Discover.vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GraffitiSession,
|
|
2
|
-
declare const _default: <Schema extends
|
|
1
|
+
import { GraffitiSession, JSONSchema, GraffitiObject } from '@graffiti-garden/api';
|
|
2
|
+
declare const _default: <Schema extends JSONSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & {
|
|
4
4
|
channels: string[];
|
|
5
5
|
schema: Schema;
|
|
@@ -7,12 +7,16 @@ declare const _default: <Schema extends JSONSchema4>(__VLS_props: NonNullable<Aw
|
|
|
7
7
|
} & Partial<{}>> & import('vue').PublicProps;
|
|
8
8
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
9
9
|
attrs: any;
|
|
10
|
-
slots: {
|
|
11
|
-
default?(
|
|
12
|
-
results:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
slots: Readonly<{
|
|
11
|
+
default?(props: {
|
|
12
|
+
results: GraffitiObject<Schema>[];
|
|
13
|
+
poll: () => void;
|
|
14
|
+
isPolling: boolean;
|
|
15
|
+
}): any;
|
|
16
|
+
}> & {
|
|
17
|
+
default?(props: {
|
|
18
|
+
results: GraffitiObject<Schema>[];
|
|
19
|
+
poll: () => void;
|
|
16
20
|
isPolling: boolean;
|
|
17
21
|
}): any;
|
|
18
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Discover.vue.d.ts","sourceRoot":"","sources":["../src/Discover.vue"],"names":[],"m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ED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GraffitiLocation, GraffitiSession,
|
|
2
|
-
declare const _default: <Schema extends
|
|
1
|
+
import { GraffitiLocation, GraffitiObject, GraffitiSession, JSONSchema } from '@graffiti-garden/api';
|
|
2
|
+
declare const _default: <Schema extends JSONSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & {
|
|
4
4
|
locationOrUri: string | GraffitiLocation;
|
|
5
5
|
schema: Schema;
|
|
@@ -7,26 +7,16 @@ declare const _default: <Schema extends JSONSchema4>(__VLS_props: NonNullable<Aw
|
|
|
7
7
|
} & Partial<{}>> & import('vue').PublicProps;
|
|
8
8
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
9
9
|
attrs: any;
|
|
10
|
-
slots: {
|
|
11
|
-
default?(
|
|
12
|
-
result:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}>, import('vue').Ref<any, any> & import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
21
|
-
tombstone: false;
|
|
22
|
-
}> : import('vue').Ref<import('vue').UnwrapRef<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
23
|
-
tombstone: false;
|
|
24
|
-
}> | null | undefined, (import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
25
|
-
tombstone: false;
|
|
26
|
-
}) | import('vue').UnwrapRef<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
27
|
-
tombstone: false;
|
|
28
|
-
}> | null | undefined>>;
|
|
29
|
-
poll: () => Promise<void>;
|
|
10
|
+
slots: Readonly<{
|
|
11
|
+
default?(props: {
|
|
12
|
+
result: GraffitiObject<Schema> | undefined | null;
|
|
13
|
+
poll: () => void;
|
|
14
|
+
isPolling: boolean;
|
|
15
|
+
}): any;
|
|
16
|
+
}> & {
|
|
17
|
+
default?(props: {
|
|
18
|
+
result: GraffitiObject<Schema> | undefined | null;
|
|
19
|
+
poll: () => void;
|
|
30
20
|
isPolling: boolean;
|
|
31
21
|
}): any;
|
|
32
22
|
};
|
package/dist/Get.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Get.vue.d.ts","sourceRoot":"","sources":["../src/Get.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Get.vue.d.ts","sourceRoot":"","sources":["../src/Get.vue"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EACR,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,UAAU,EACb,MAAM,sBAAsB,CAAC;yBAGb,MAAM,SAAS,UAAU,eAC5B,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAmE1D,mBAAmB,CAAC;uBAhET,MAAM,GAAG,gBAAgB;gBAChC,MAAM;kBACJ,eAAe,GAAG,IAAI;mBA8D0D,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;wBA3DS;YACZ,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;YAClD,IAAI,EAAE,MAAM,IAAI,CAAC;YACjB,SAAS,EAAE,OAAO,CAAC;SACtB,GAAG,GAAG;;wBAJS;YACZ,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;YAClD,IAAI,EAAE,MAAM,IAAI,CAAC;YACjB,SAAS,EAAE,OAAO,CAAC;SACtB,GAAG,GAAG;;UAyDJ,EAAE;OAGG,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA7EzE,wBA6E4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { GraffitiSession,
|
|
2
|
-
declare const _default: <Schema extends
|
|
1
|
+
import { GraffitiSession, JSONSchema, GraffitiObject } from '@graffiti-garden/api';
|
|
2
|
+
declare const _default: <Schema extends JSONSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & {
|
|
4
4
|
schema: Schema;
|
|
5
5
|
session: GraffitiSession;
|
|
6
6
|
} & Partial<{}>> & import('vue').PublicProps;
|
|
7
7
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
8
8
|
attrs: any;
|
|
9
|
-
slots: {
|
|
10
|
-
default?(
|
|
11
|
-
results:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
slots: Readonly<{
|
|
10
|
+
default?(props: {
|
|
11
|
+
results: GraffitiObject<Schema>[];
|
|
12
|
+
poll: () => void;
|
|
13
|
+
isPolling: boolean;
|
|
14
|
+
}): any;
|
|
15
|
+
}> & {
|
|
16
|
+
default?(props: {
|
|
17
|
+
results: GraffitiObject<Schema>[];
|
|
18
|
+
poll: () => void;
|
|
15
19
|
isPolling: boolean;
|
|
16
20
|
}): any;
|
|
17
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecoverOrphans.vue.d.ts","sourceRoot":"","sources":["../src/RecoverOrphans.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RecoverOrphans.vue.d.ts","sourceRoot":"","sources":["../src/RecoverOrphans.vue"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EACR,eAAe,EACf,UAAU,EACV,cAAc,EACjB,MAAM,sBAAsB,CAAC;yBAGb,MAAM,SAAS,UAAU,eAC5B,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAiE1D,mBAAmB,CAAC;gBA9DhB,MAAM;iBACL,eAAe;mBA6DkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;wBA1DS;YACZ,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YAClC,IAAI,EAAE,MAAM,IAAI,CAAC;YACjB,SAAS,EAAE,OAAO,CAAC;SACtB,GAAG,GAAG;;wBAJS;YACZ,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YAClC,IAAI,EAAE,MAAM,IAAI,CAAC;YACjB,SAAS,EAAE,OAAO,CAAC;SACtB,GAAG,GAAG;;UAwDJ,EAAE;OAGG,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA3EzE,wBA2E4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/dist/composables.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
-
import { GraffitiLocation, GraffitiSession,
|
|
1
|
+
import { Ref, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { GraffitiLocation, GraffitiObject, GraffitiSession, JSONSchema } from '@graffiti-garden/api';
|
|
3
3
|
/**
|
|
4
4
|
* The [Graffiti.discover](https://api.graffiti.garden/classes/Graffiti.html#discover)
|
|
5
5
|
* method as a reactive [composable](https://vuejs.org/guide/reusability/composables.html)
|
|
@@ -15,34 +15,18 @@ import { GraffitiLocation, GraffitiSession, JSONSchema4 } from '@graffiti-garden
|
|
|
15
15
|
* not when the elements or properties change.
|
|
16
16
|
* If you need deep reactivity, wrap your argument in a getter.
|
|
17
17
|
*/
|
|
18
|
-
export declare function useGraffitiDiscover<Schema extends
|
|
18
|
+
export declare function useGraffitiDiscover<Schema extends JSONSchema>(channels: MaybeRefOrGetter<string[]>, schema: MaybeRefOrGetter<Schema>,
|
|
19
19
|
/**
|
|
20
20
|
* If the session is `undefined`, the global session,
|
|
21
21
|
* {@link ComponentCustomProperties.$graffitiSession | $graffitiSession},
|
|
22
22
|
* will be used. Otherwise, the provided value will be used.
|
|
23
23
|
*/
|
|
24
24
|
session?: MaybeRefOrGetter<GraffitiSession | undefined | null>): {
|
|
25
|
-
|
|
26
|
-
* A [Ref](https://vuejs.org/api/reactivity-core.html#ref) that contains
|
|
27
|
-
* an array of Graffiti objects. All tombstoned objects have been filtered out.
|
|
28
|
-
*/
|
|
29
|
-
results: import('vue').Ref<import('@vue/reactivity').UnwrapRefSimple<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
30
|
-
tombstone: false;
|
|
31
|
-
}>[], import('@vue/reactivity').UnwrapRefSimple<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
32
|
-
tombstone: false;
|
|
33
|
-
}>[] | (import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
25
|
+
results: Ref<(GraffitiObject<Schema> & {
|
|
34
26
|
tombstone: false;
|
|
35
27
|
})[]>;
|
|
36
|
-
/**
|
|
37
|
-
* A method to poll for new results.
|
|
38
|
-
*/
|
|
39
28
|
poll: () => Promise<void>;
|
|
40
|
-
|
|
41
|
-
* A boolean [Ref](https://vuejs.org/api/reactivity-core.html#ref)
|
|
42
|
-
* that indicates if the poll is currently running.
|
|
43
|
-
* Useful to show a loading spinner or disable a button.
|
|
44
|
-
*/
|
|
45
|
-
isPolling: import('vue').Ref<boolean, boolean>;
|
|
29
|
+
isPolling: Ref<boolean>;
|
|
46
30
|
};
|
|
47
31
|
/**
|
|
48
32
|
* The [Graffiti.get](https://api.graffiti.garden/classes/Graffiti.html#get)
|
|
@@ -59,45 +43,16 @@ session?: MaybeRefOrGetter<GraffitiSession | undefined | null>): {
|
|
|
59
43
|
* not when the elements or properties change.
|
|
60
44
|
* If you need deep reactivity, wrap your argument in a getter.
|
|
61
45
|
*/
|
|
62
|
-
export declare function useGraffitiGet<Schema extends
|
|
46
|
+
export declare function useGraffitiGet<Schema extends JSONSchema>(locationOrUri: MaybeRefOrGetter<GraffitiLocation | string>, schema: MaybeRefOrGetter<Schema>,
|
|
63
47
|
/**
|
|
64
48
|
* If the session is `undefined`, the global session,
|
|
65
49
|
* {@link ComponentCustomProperties.$graffitiSession | $graffitiSession},
|
|
66
50
|
* will be used. Otherwise, the provided value will be used.
|
|
67
51
|
*/
|
|
68
52
|
session?: MaybeRefOrGetter<GraffitiSession | undefined | null>): {
|
|
69
|
-
|
|
70
|
-
* A [Ref](https://vuejs.org/api/reactivity-core.html#ref) that contains
|
|
71
|
-
* the retrieved Graffiti object, if it exists. If the object has been deleted,
|
|
72
|
-
* the result is `null`. If the object is still being fetched, the result is `undefined`.
|
|
73
|
-
*/
|
|
74
|
-
result: [(import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
75
|
-
tombstone: false;
|
|
76
|
-
}) | null | undefined] extends [import('vue').Ref<any, any>] ? import('@vue/shared').IfAny<import('vue').Ref<any, any> & import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
77
|
-
tombstone: false;
|
|
78
|
-
}, import('vue').Ref<import('vue').Ref<any, any> & import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
79
|
-
tombstone: false;
|
|
80
|
-
}, import('vue').Ref<any, any> & import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
81
|
-
tombstone: false;
|
|
82
|
-
}>, import('vue').Ref<any, any> & import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
83
|
-
tombstone: false;
|
|
84
|
-
}> : import('vue').Ref<import('vue').UnwrapRef<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
85
|
-
tombstone: false;
|
|
86
|
-
}> | null | undefined, (import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
87
|
-
tombstone: false;
|
|
88
|
-
}) | import('vue').UnwrapRef<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
89
|
-
tombstone: false;
|
|
90
|
-
}> | null | undefined>;
|
|
91
|
-
/**
|
|
92
|
-
* A method to poll for new results.
|
|
93
|
-
*/
|
|
53
|
+
result: Ref<GraffitiObject<Schema> | null | undefined>;
|
|
94
54
|
poll: () => Promise<void>;
|
|
95
|
-
|
|
96
|
-
* A boolean [Ref](https://vuejs.org/api/reactivity-core.html#ref)
|
|
97
|
-
* that indicates if the poll is currently running.
|
|
98
|
-
* Useful to show a loading spinner or disable a button.
|
|
99
|
-
*/
|
|
100
|
-
isPolling: import('vue').Ref<boolean, boolean>;
|
|
55
|
+
isPolling: Ref<boolean>;
|
|
101
56
|
};
|
|
102
57
|
/**
|
|
103
58
|
* The [Graffiti.recoverOrphans](https://api.graffiti.garden/classes/Graffiti.html#recoverorphans)
|
|
@@ -114,27 +69,11 @@ session?: MaybeRefOrGetter<GraffitiSession | undefined | null>): {
|
|
|
114
69
|
* not when the elements or properties change.
|
|
115
70
|
* If you need deep reactivity, wrap your argument in a getter.
|
|
116
71
|
*/
|
|
117
|
-
export declare function useGraffitiRecoverOrphans<Schema extends
|
|
118
|
-
|
|
119
|
-
* A [Ref](https://vuejs.org/api/reactivity-core.html#ref) that contains
|
|
120
|
-
* an array of Graffiti objects. All tombstoned objects have been filtered out.
|
|
121
|
-
*/
|
|
122
|
-
results: import('vue').Ref<import('@vue/reactivity').UnwrapRefSimple<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
123
|
-
tombstone: false;
|
|
124
|
-
}>[], import('@vue/reactivity').UnwrapRefSimple<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
125
|
-
tombstone: false;
|
|
126
|
-
}>[] | (import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
72
|
+
export declare function useGraffitiRecoverOrphans<Schema extends JSONSchema>(schema: MaybeRefOrGetter<Schema>, session: MaybeRefOrGetter<GraffitiSession>): {
|
|
73
|
+
results: Ref<(GraffitiObject<Schema> & {
|
|
127
74
|
tombstone: false;
|
|
128
75
|
})[]>;
|
|
129
|
-
/**
|
|
130
|
-
* A method to poll for new results.
|
|
131
|
-
*/
|
|
132
76
|
poll: () => Promise<void>;
|
|
133
|
-
|
|
134
|
-
* A boolean [Ref](https://vuejs.org/api/reactivity-core.html#ref)
|
|
135
|
-
* that indicates if the poll is currently running.
|
|
136
|
-
* Useful to show a loading spinner or disable a button.
|
|
137
|
-
*/
|
|
138
|
-
isPolling: import('vue').Ref<boolean, boolean>;
|
|
77
|
+
isPolling: Ref<boolean>;
|
|
139
78
|
};
|
|
140
79
|
//# sourceMappingURL=composables.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composables.d.ts","sourceRoot":"","sources":["../src/composables.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"composables.d.ts","sourceRoot":"","sources":["../src/composables.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AACjD,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,UAAU,EAEX,MAAM,sBAAsB,CAAC;AA+E9B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,SAAS,UAAU,EAC3D,QAAQ,EAAE,gBAAgB,CAAC,MAAM,EAAE,CAAC,EACpC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;AAChC;;;;GAIG;AACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC,GAC7D;IACD,OAAO,EAAE,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG;QAAE,SAAS,EAAE,KAAK,CAAA;KAAE,CAAC,EAAE,CAAC,CAAC;IAChE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CACzB,CAwCA;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,MAAM,SAAS,UAAU,EACtD,aAAa,EAAE,gBAAgB,CAAC,gBAAgB,GAAG,MAAM,CAAC,EAC1D,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;AAChC;;;;GAIG;AACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC,GAC7D;IACD,MAAM,EAAE,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACvD,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CACzB,CA6CA;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,SAAS,UAAU,EACjE,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAChC,OAAO,EAAE,gBAAgB,CAAC,eAAe,CAAC,GACzC;IACD,OAAO,EAAE,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG;QAAE,SAAS,EAAE,KAAK,CAAA;KAAE,CAAC,EAAE,CAAC,CAAC;IAChE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CACzB,CAuCA"}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ export interface GraffitiPluginOptions {
|
|
|
91
91
|
*
|
|
92
92
|
* [See the README for installation instructions](/).
|
|
93
93
|
*
|
|
94
|
-
* You can
|
|
94
|
+
* You can [try out live examples](/examples/), but basic usage looks like this:
|
|
95
95
|
*
|
|
96
96
|
* ```ts
|
|
97
97
|
* import { createApp } from "vue";
|
|
@@ -158,14 +158,18 @@ export { useGraffiti, useGraffitiSynchronize, useGraffitiSession, } from './glob
|
|
|
158
158
|
* Its props and slots are identical to the arguments and return values of
|
|
159
159
|
* the composable {@link useGraffitiDiscover}.
|
|
160
160
|
*/
|
|
161
|
-
export declare const GraffitiDiscover: <Schema extends import('json-schema').
|
|
161
|
+
export declare const GraffitiDiscover: <Schema extends import('json-schema-to-ts').JSONSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
162
162
|
attrs: any;
|
|
163
|
-
slots: {
|
|
164
|
-
default?(
|
|
165
|
-
results: import('@
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
163
|
+
slots: Readonly<{
|
|
164
|
+
default?(props: {
|
|
165
|
+
results: import('@graffiti-garden/api').GraffitiObject<Schema>[];
|
|
166
|
+
poll: () => void;
|
|
167
|
+
isPolling: boolean;
|
|
168
|
+
}): any;
|
|
169
|
+
}> & {
|
|
170
|
+
default?(props: {
|
|
171
|
+
results: import('@graffiti-garden/api').GraffitiObject<Schema>[];
|
|
172
|
+
poll: () => void;
|
|
169
173
|
isPolling: boolean;
|
|
170
174
|
}): any;
|
|
171
175
|
};
|
|
@@ -178,12 +182,16 @@ export declare const GraffitiDiscover: <Schema extends import('json-schema').JSO
|
|
|
178
182
|
} & import('vue').PublicProps;
|
|
179
183
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
180
184
|
attrs: any;
|
|
181
|
-
slots: {
|
|
182
|
-
default?(
|
|
183
|
-
results: import('@
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
slots: Readonly<{
|
|
186
|
+
default?(props: {
|
|
187
|
+
results: import('@graffiti-garden/api').GraffitiObject<Schema>[];
|
|
188
|
+
poll: () => void;
|
|
189
|
+
isPolling: boolean;
|
|
190
|
+
}): any;
|
|
191
|
+
}> & {
|
|
192
|
+
default?(props: {
|
|
193
|
+
results: import('@graffiti-garden/api').GraffitiObject<Schema>[];
|
|
194
|
+
poll: () => void;
|
|
187
195
|
isPolling: boolean;
|
|
188
196
|
}): any;
|
|
189
197
|
};
|
|
@@ -199,28 +207,18 @@ export declare const GraffitiDiscover: <Schema extends import('json-schema').JSO
|
|
|
199
207
|
* Its props and slots are identical to the arguments and return values of
|
|
200
208
|
* the composable {@link useGraffitiGet}.
|
|
201
209
|
*/
|
|
202
|
-
export declare const GraffitiGet: <Schema extends import('json-schema').
|
|
210
|
+
export declare const GraffitiGet: <Schema extends import('json-schema-to-ts').JSONSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
203
211
|
attrs: any;
|
|
204
|
-
slots: {
|
|
205
|
-
default?(
|
|
206
|
-
result: import('@
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}>, Ref<any, any> & import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
215
|
-
tombstone: false;
|
|
216
|
-
}> : Ref<import('vue').UnwrapRef<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
217
|
-
tombstone: false;
|
|
218
|
-
}> | null | undefined, (import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
219
|
-
tombstone: false;
|
|
220
|
-
}) | import('vue').UnwrapRef<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
221
|
-
tombstone: false;
|
|
222
|
-
}> | null | undefined>>;
|
|
223
|
-
poll: () => Promise<void>;
|
|
212
|
+
slots: Readonly<{
|
|
213
|
+
default?(props: {
|
|
214
|
+
result: import('@graffiti-garden/api').GraffitiObject<Schema> | undefined | null;
|
|
215
|
+
poll: () => void;
|
|
216
|
+
isPolling: boolean;
|
|
217
|
+
}): any;
|
|
218
|
+
}> & {
|
|
219
|
+
default?(props: {
|
|
220
|
+
result: import('@graffiti-garden/api').GraffitiObject<Schema> | undefined | null;
|
|
221
|
+
poll: () => void;
|
|
224
222
|
isPolling: boolean;
|
|
225
223
|
}): any;
|
|
226
224
|
};
|
|
@@ -233,26 +231,16 @@ export declare const GraffitiGet: <Schema extends import('json-schema').JSONSche
|
|
|
233
231
|
} & import('vue').PublicProps;
|
|
234
232
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
235
233
|
attrs: any;
|
|
236
|
-
slots: {
|
|
237
|
-
default?(
|
|
238
|
-
result: import('@
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}>, Ref<any, any> & import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
247
|
-
tombstone: false;
|
|
248
|
-
}> : Ref<import('vue').UnwrapRef<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
249
|
-
tombstone: false;
|
|
250
|
-
}> | null | undefined, (import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
251
|
-
tombstone: false;
|
|
252
|
-
}) | import('vue').UnwrapRef<import('@graffiti-garden/api').GraffitiObjectBase & import('ajv/dist/core').JTDDataType<Schema> & {
|
|
253
|
-
tombstone: false;
|
|
254
|
-
}> | null | undefined>>;
|
|
255
|
-
poll: () => Promise<void>;
|
|
234
|
+
slots: Readonly<{
|
|
235
|
+
default?(props: {
|
|
236
|
+
result: import('@graffiti-garden/api').GraffitiObject<Schema> | undefined | null;
|
|
237
|
+
poll: () => void;
|
|
238
|
+
isPolling: boolean;
|
|
239
|
+
}): any;
|
|
240
|
+
}> & {
|
|
241
|
+
default?(props: {
|
|
242
|
+
result: import('@graffiti-garden/api').GraffitiObject<Schema> | undefined | null;
|
|
243
|
+
poll: () => void;
|
|
256
244
|
isPolling: boolean;
|
|
257
245
|
}): any;
|
|
258
246
|
};
|
|
@@ -268,14 +256,18 @@ export declare const GraffitiGet: <Schema extends import('json-schema').JSONSche
|
|
|
268
256
|
* Its props and slots are identical to the arguments and return values of
|
|
269
257
|
* the composable {@link useGraffitiRecoverOrphans}.
|
|
270
258
|
*/
|
|
271
|
-
export declare const GraffitiRecoverOrphans: <Schema extends import('json-schema').
|
|
259
|
+
export declare const GraffitiRecoverOrphans: <Schema extends import('json-schema-to-ts').JSONSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
272
260
|
attrs: any;
|
|
273
|
-
slots: {
|
|
274
|
-
default?(
|
|
275
|
-
results: import('@
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
261
|
+
slots: Readonly<{
|
|
262
|
+
default?(props: {
|
|
263
|
+
results: import('@graffiti-garden/api').GraffitiObject<Schema>[];
|
|
264
|
+
poll: () => void;
|
|
265
|
+
isPolling: boolean;
|
|
266
|
+
}): any;
|
|
267
|
+
}> & {
|
|
268
|
+
default?(props: {
|
|
269
|
+
results: import('@graffiti-garden/api').GraffitiObject<Schema>[];
|
|
270
|
+
poll: () => void;
|
|
279
271
|
isPolling: boolean;
|
|
280
272
|
}): any;
|
|
281
273
|
};
|
|
@@ -287,12 +279,16 @@ export declare const GraffitiRecoverOrphans: <Schema extends import('json-schema
|
|
|
287
279
|
} & import('vue').PublicProps;
|
|
288
280
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
289
281
|
attrs: any;
|
|
290
|
-
slots: {
|
|
291
|
-
default?(
|
|
292
|
-
results: import('@
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
282
|
+
slots: Readonly<{
|
|
283
|
+
default?(props: {
|
|
284
|
+
results: import('@graffiti-garden/api').GraffitiObject<Schema>[];
|
|
285
|
+
poll: () => void;
|
|
286
|
+
isPolling: boolean;
|
|
287
|
+
}): any;
|
|
288
|
+
}> & {
|
|
289
|
+
default?(props: {
|
|
290
|
+
results: import('@graffiti-garden/api').GraffitiObject<Schema>[];
|
|
291
|
+
poll: () => void;
|
|
296
292
|
isPolling: boolean;
|
|
297
293
|
}): any;
|
|
298
294
|
};
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,GAAG,MAAM,WAAW,CAAC;AAC5B,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EAIhB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,QAAQ,KAAK,CAAC;IACnB,UAAiB,yBAAyB;QACxC;;;;;;;;;;WAUG;QACH,SAAS,EAAE,QAAQ,CAAC;QACpB;;;;;;;;;;;;;;WAcG;QACH,gBAAgB,EAAE,GAAG,CAAC,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC;KAC3D;IAED,UAAiB,gBAAgB;QAC/B,gBAAgB,EAAE,OAAO,QAAQ,CAAC;QAClC,WAAW,EAAE,OAAO,GAAG,CAAC;QACxB,sBAAsB,EAAE,OAAO,cAAc,CAAC;KAC/C;CACF;AACD,YAAY,EAAE,yBAAyB,EAAE,MAAM,KAAK,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;;;OAYG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsFG;AACH,eAAO,M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