@graffiti-garden/wrapper-vue 0.7.1 → 1.0.3
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 -3
- package/dist/browser/ajv-D_HICdxS.mjs +4447 -0
- package/dist/browser/ajv-D_HICdxS.mjs.map +1 -0
- package/dist/browser/plugin.mjs +999 -941
- package/dist/browser/plugin.mjs.map +1 -1
- package/dist/node/components/ActorToHandle.vue.d.ts +23 -0
- package/dist/node/components/ActorToHandle.vue.d.ts.map +1 -0
- package/dist/node/{Discover.vue.d.ts → components/Discover.vue.d.ts} +4 -4
- package/dist/node/components/Discover.vue.d.ts.map +1 -0
- package/dist/node/{Get.vue.d.ts → components/Get.vue.d.ts} +2 -5
- package/dist/node/components/Get.vue.d.ts.map +1 -0
- package/dist/node/components/GetMedia.vue.d.ts +36 -0
- package/dist/node/components/GetMedia.vue.d.ts.map +1 -0
- package/dist/node/components/HandleToActor.vue.d.ts +23 -0
- package/dist/node/components/HandleToActor.vue.d.ts.map +1 -0
- package/dist/node/components/ObjectInfo.vue.d.ts +7 -0
- package/dist/node/components/ObjectInfo.vue.d.ts.map +1 -0
- package/dist/node/composables/actor-to-handle.d.ts +25 -0
- package/dist/node/composables/actor-to-handle.d.ts.map +1 -0
- package/dist/node/composables/discover.d.ts +38 -0
- package/dist/node/composables/discover.d.ts.map +1 -0
- package/dist/node/composables/get-media.d.ts +31 -0
- package/dist/node/composables/get-media.d.ts.map +1 -0
- package/dist/node/composables/get.d.ts +28 -0
- package/dist/node/composables/get.d.ts.map +1 -0
- package/dist/node/composables/handle-to-actor.d.ts +25 -0
- package/dist/node/composables/handle-to-actor.d.ts.map +1 -0
- package/dist/node/composables/resolve-string.d.ts +6 -0
- package/dist/node/composables/resolve-string.d.ts.map +1 -0
- package/dist/node/globals.d.ts +3 -5
- package/dist/node/globals.d.ts.map +1 -1
- package/dist/node/plugin.d.ts +174 -75
- package/dist/node/plugin.d.ts.map +1 -1
- package/dist/node/plugin.js +1 -1
- package/dist/node/plugin.js.map +1 -1
- package/dist/node/plugin.mjs +468 -331
- package/dist/node/plugin.mjs.map +1 -1
- package/package.json +15 -14
- package/src/components/ActorToHandle.vue +16 -0
- package/src/{Discover.vue → components/Discover.vue} +15 -9
- package/src/{Get.vue → components/Get.vue} +7 -11
- package/src/components/GetMedia.vue +75 -0
- package/src/components/HandleToActor.vue +16 -0
- package/src/components/ObjectInfo.vue +127 -0
- package/src/composables/actor-to-handle.ts +32 -0
- package/src/composables/discover.ts +202 -0
- package/src/composables/get-media.ts +116 -0
- package/src/composables/get.ts +109 -0
- package/src/composables/handle-to-actor.ts +32 -0
- package/src/composables/resolve-string.ts +46 -0
- package/src/globals.ts +24 -2
- package/src/plugin.ts +84 -29
- package/dist/browser/ajv-C30pimY5.mjs +0 -4400
- package/dist/browser/ajv-C30pimY5.mjs.map +0 -1
- package/dist/browser/index-CWfNKdDL.mjs +0 -424
- package/dist/browser/index-CWfNKdDL.mjs.map +0 -1
- package/dist/node/Discover.vue.d.ts.map +0 -1
- package/dist/node/Get.vue.d.ts.map +0 -1
- package/dist/node/RecoverOrphans.vue.d.ts +0 -31
- package/dist/node/RecoverOrphans.vue.d.ts.map +0 -1
- package/dist/node/composables.d.ts +0 -75
- package/dist/node/composables.d.ts.map +0 -1
- package/dist/node/pollers.d.ts +0 -28
- package/dist/node/pollers.d.ts.map +0 -1
- package/dist/node/reducers.d.ts +0 -37
- package/dist/node/reducers.d.ts.map +0 -1
- package/src/RecoverOrphans.vue +0 -37
- package/src/composables.ts +0 -343
- package/src/pollers.ts +0 -119
- package/src/reducers.ts +0 -124
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
actor: string;
|
|
3
|
+
};
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: {
|
|
7
|
+
default?(_: {
|
|
8
|
+
handle: string | null | undefined;
|
|
9
|
+
}): 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
|
+
};
|
|
23
|
+
//# sourceMappingURL=ActorToHandle.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActorToHandle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ActorToHandle.vue"],"names":[],"mappings":"AAsBA,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAQrC,iBAAS,cAAc;WAwBT,OAAO,IAA6B;;;;YAVrB,GAAG;;;;EAe/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -11,14 +11,14 @@ declare const _default: <Schema extends JSONSchema>(__VLS_props: NonNullable<Awa
|
|
|
11
11
|
slots: Readonly<{
|
|
12
12
|
default?(props: {
|
|
13
13
|
objects: GraffitiObject<Schema>[];
|
|
14
|
-
poll: () => void
|
|
15
|
-
|
|
14
|
+
poll: () => Promise<void>;
|
|
15
|
+
isFirstPoll: boolean;
|
|
16
16
|
}): any;
|
|
17
17
|
}> & {
|
|
18
18
|
default?(props: {
|
|
19
19
|
objects: GraffitiObject<Schema>[];
|
|
20
|
-
poll: () => void
|
|
21
|
-
|
|
20
|
+
poll: () => Promise<void>;
|
|
21
|
+
isFirstPoll: boolean;
|
|
22
22
|
}): any;
|
|
23
23
|
};
|
|
24
24
|
emit: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Discover.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Discover.vue"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EACR,eAAe,EACf,UAAU,EACV,cAAc,EACjB,MAAM,sBAAsB,CAAC;yBAIb,MAAM,SAAS,UAAU,EACzC,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA6FO,mBAAmB,CAAC;kBA3Fd,MAAM,EAAE;gBACV,MAAM;kBACJ,eAAe,GAAG,IAAI;mBACrB,OAAO;mBAwFwE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;wBArFS;YACZ,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YAClC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1B,WAAW,EAAE,OAAO,CAAC;SACxB,GAAG,GAAG;;wBAJS;YACZ,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YAClC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1B,WAAW,EAAE,OAAO,CAAC;SACxB,GAAG,GAAG;;UAmFJ,EAAE;EAEL,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAxGzE,wBAwG4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -4,21 +4,18 @@ declare const _default: <Schema extends JSONSchema>(__VLS_props: NonNullable<Awa
|
|
|
4
4
|
url: string | GraffitiObjectUrl;
|
|
5
5
|
schema: Schema;
|
|
6
6
|
session?: GraffitiSession | null;
|
|
7
|
-
autopoll?: boolean;
|
|
8
7
|
} & Partial<{}>> & import('vue').PublicProps;
|
|
9
8
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
10
9
|
attrs: any;
|
|
11
10
|
slots: Readonly<{
|
|
12
11
|
default?(props: {
|
|
13
12
|
object: GraffitiObject<Schema> | undefined | null;
|
|
14
|
-
poll: () => void
|
|
15
|
-
isInitialPolling: boolean;
|
|
13
|
+
poll: () => Promise<void>;
|
|
16
14
|
}): any;
|
|
17
15
|
}> & {
|
|
18
16
|
default?(props: {
|
|
19
17
|
object: GraffitiObject<Schema> | undefined | null;
|
|
20
|
-
poll: () => void
|
|
21
|
-
isInitialPolling: boolean;
|
|
18
|
+
poll: () => Promise<void>;
|
|
22
19
|
}): any;
|
|
23
20
|
};
|
|
24
21
|
emit: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Get.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Get.vue"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EACR,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,UAAU,EACb,MAAM,sBAAsB,CAAC;yBAIb,MAAM,SAAS,UAAU,EACzC,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAyEO,mBAAmB,CAAC;aAvEnB,MAAM,GAAG,iBAAiB;gBACvB,MAAM;kBACJ,eAAe,GAAG,IAAI;mBAqE0D,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;wBAlES;YACZ,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;YAClD,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;SAC7B,GAAG,GAAG;;wBAHS;YACZ,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;YAClD,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;SAC7B,GAAG,GAAG;;UAiEJ,EAAE;EAEL,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AApFzE,wBAoF4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { GraffitiSession, GraffitiMediaRequirements, GraffitiMedia } from '@graffiti-garden/api';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
url: string;
|
|
4
|
+
requirements: GraffitiMediaRequirements;
|
|
5
|
+
session?: GraffitiSession | null;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: Readonly<{
|
|
10
|
+
default?(props: {
|
|
11
|
+
media: (GraffitiMedia & {
|
|
12
|
+
dataUrl: string;
|
|
13
|
+
}) | null | undefined;
|
|
14
|
+
poll: () => Promise<void>;
|
|
15
|
+
}): any;
|
|
16
|
+
}> & {
|
|
17
|
+
default?(props: {
|
|
18
|
+
media: (GraffitiMedia & {
|
|
19
|
+
dataUrl: string;
|
|
20
|
+
}) | null | undefined;
|
|
21
|
+
poll: () => Promise<void>;
|
|
22
|
+
}): any;
|
|
23
|
+
};
|
|
24
|
+
refs: {};
|
|
25
|
+
rootEl: any;
|
|
26
|
+
};
|
|
27
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
28
|
+
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>;
|
|
29
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=GetMedia.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetMedia.vue.d.ts","sourceRoot":"","sources":["../../../src/components/GetMedia.vue"],"names":[],"mappings":"AA8EA,OAAO,KAAK,EACR,eAAe,EACf,yBAAyB,EACzB,aAAa,EAChB,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,yBAAyB,CAAC;IACxC,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CACpC,CAAC;AAwBF,iBAAS,cAAc;WAsET,OAAO,IAA6B;;wBA1F9B;YACZ,KAAK,EAAE,CAAC,aAAa,GAAG;gBAAE,OAAO,EAAE,MAAM,CAAA;aAAE,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;YAChE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;SAC7B,GAAG,GAAG;;wBAHS;YACZ,KAAK,EAAE,CAAC,aAAa,GAAG;gBAAE,OAAO,EAAE,MAAM,CAAA;aAAE,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;YAChE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;SAC7B,GAAG,GAAG;;;;EA4FV;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
handle: string;
|
|
3
|
+
};
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: {
|
|
7
|
+
default?(_: {
|
|
8
|
+
actor: string | null | undefined;
|
|
9
|
+
}): 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
|
+
};
|
|
23
|
+
//# sourceMappingURL=HandleToActor.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandleToActor.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HandleToActor.vue"],"names":[],"mappings":"AAsBA,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAQtC,iBAAS,cAAc;WAwBT,OAAO,IAA6B;;;;YAVrB,GAAG;;;;EAe/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GraffitiObjectBase } from '@graffiti-garden/api';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
object: GraffitiObjectBase | null | undefined;
|
|
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;
|
|
7
|
+
//# sourceMappingURL=ObjectInfo.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectInfo.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectInfo.vue"],"names":[],"mappings":"AAiIA,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,sBAAsB,CAAC;AAKhF,KAAK,WAAW,GAAG;IACf,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,CAAC;CACjD,CAAC;;AAsNF,wBAMG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* The [Graffiti.actorToHandle](https://api.graffiti.garden/classes/Graffiti.html#actortohandle)
|
|
4
|
+
* method as a reactive [composable](https://vuejs.org/guide/reusability/composables.html)
|
|
5
|
+
* for use in the Vue [composition API](https://vuejs.org/guide/introduction.html#composition-api).
|
|
6
|
+
*
|
|
7
|
+
* Its corresponding renderless component is {@link GraffitiActorToHandle}.
|
|
8
|
+
*
|
|
9
|
+
* The arguments of this composable are the same as Graffiti.actorToHandle,
|
|
10
|
+
* only they can also be [Refs](https://vuejs.org/api/reactivity-core.html#ref)
|
|
11
|
+
* or [getters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get#description).
|
|
12
|
+
* As they change the output will automatically update.
|
|
13
|
+
* Reactivity only triggers when the root array or object changes,
|
|
14
|
+
* not when the elements or properties change.
|
|
15
|
+
* If you need deep reactivity, wrap your argument in a getter.
|
|
16
|
+
*
|
|
17
|
+
* @returns
|
|
18
|
+
* - `handle`: A [ref](https://vuejs.org/api/reactivity-core.html#ref) that contains
|
|
19
|
+
* the retrieved handle, if it exists. If the handle cannot be found, the result
|
|
20
|
+
* is `null`. If the handle is still being fetched, the result is `undefined`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useGraffitiActorToHandle(actor: MaybeRefOrGetter<string>): {
|
|
23
|
+
handle: import('vue').Ref<string | null | undefined, string | null | undefined>;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=actor-to-handle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actor-to-handle.d.ts","sourceRoot":"","sources":["../../../src/composables/actor-to-handle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,gBAAgB,CAAC,MAAM,CAAC;;EAOvE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { GraffitiObject, GraffitiSession, JSONSchema } from '@graffiti-garden/api';
|
|
2
|
+
import { MaybeRefOrGetter, Ref } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* The [Graffiti.discover](https://api.graffiti.garden/classes/Graffiti.html#discover)
|
|
5
|
+
* method as a reactive [composable](https://vuejs.org/guide/reusability/composables.html)
|
|
6
|
+
* for use in the Vue [composition API](https://vuejs.org/guide/introduction.html#composition-api).
|
|
7
|
+
*
|
|
8
|
+
* Its corresponding renderless component is {@link GraffitiDiscover}.
|
|
9
|
+
*
|
|
10
|
+
* The arguments of this composable are largely the same as Graffiti.discover,
|
|
11
|
+
* only they can also be [Refs](https://vuejs.org/api/reactivity-core.html#ref)
|
|
12
|
+
* or [getters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get#description).
|
|
13
|
+
* There is one additional optional argument `autopoll`, which when `true`,
|
|
14
|
+
* will automatically poll for new objects.
|
|
15
|
+
* As they change the arguments change, the output will automatically update.
|
|
16
|
+
* Reactivity only triggers when the root array or object changes,
|
|
17
|
+
* not when the elements or properties change.
|
|
18
|
+
* If you need deep reactivity, wrap your argument in a getter.
|
|
19
|
+
*
|
|
20
|
+
* @returns
|
|
21
|
+
* - `objects`: A [ref](https://vuejs.org/api/reactivity-core.html#ref) that contains
|
|
22
|
+
* an array of Graffiti objects.
|
|
23
|
+
* - `poll`: A function that can be called to manually check for objects.
|
|
24
|
+
* - `isFirstPoll`: A boolean [ref](https://vuejs.org/api/reactivity-core.html#ref)
|
|
25
|
+
* that indicates if the *first* poll after a change of arguments is currently running.
|
|
26
|
+
* It may be used to show a loading spinner or disable a button, or it can be watched
|
|
27
|
+
* to know when the `objects` array is ready to use.
|
|
28
|
+
*/
|
|
29
|
+
export declare function useGraffitiDiscover<Schema extends JSONSchema>(channels: MaybeRefOrGetter<string[]>, schema: MaybeRefOrGetter<Schema>, session?: MaybeRefOrGetter<GraffitiSession | undefined | null>,
|
|
30
|
+
/**
|
|
31
|
+
* Whether to automatically poll for new objects.
|
|
32
|
+
*/
|
|
33
|
+
autopoll?: MaybeRefOrGetter<boolean>): {
|
|
34
|
+
objects: Ref<GraffitiObject<Schema>[], GraffitiObject<Schema>[]>;
|
|
35
|
+
poll: () => Promise<void>;
|
|
36
|
+
isFirstPoll: Ref<boolean, boolean>;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=discover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../../src/composables/discover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAKd,eAAe,EACf,UAAU,EACX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAIjD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,SAAS,UAAU,EAC3D,QAAQ,EAAE,gBAAgB,CAAC,MAAM,EAAE,CAAC,EACpC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAChC,OAAO,CAAC,EAAE,gBAAgB,CAAC,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC;AAC9D;;GAEG;AACH,QAAQ,GAAE,gBAAgB,CAAC,OAAO,CAAS;;;;EA0J5C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GraffitiMedia, GraffitiMediaRequirements, GraffitiSession } from '@graffiti-garden/api';
|
|
2
|
+
import { MaybeRefOrGetter, Ref } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* The [Graffiti.getMedia](https://api.graffiti.garden/classes/Graffiti.html#getMedia)
|
|
5
|
+
* method as a reactive [composable](https://vuejs.org/guide/reusability/composables.html)
|
|
6
|
+
* for use in the Vue [composition API](https://vuejs.org/guide/introduction.html#composition-api).
|
|
7
|
+
*
|
|
8
|
+
* Its corresponding renderless component is {@link GraffitiGetMedia}.
|
|
9
|
+
*
|
|
10
|
+
* The arguments of this composable are the same as Graffiti.getMedia,
|
|
11
|
+
* only they can also be [Refs](https://vuejs.org/api/reactivity-core.html#ref)
|
|
12
|
+
* or [getters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get#description).
|
|
13
|
+
* As they change the output will automatically update.
|
|
14
|
+
* Reactivity only triggers when the root array or object changes,
|
|
15
|
+
* not when the elements or properties change.
|
|
16
|
+
* If you need deep reactivity, wrap your argument in a getter.
|
|
17
|
+
*
|
|
18
|
+
* @returns
|
|
19
|
+
* - `media`: A [ref](https://vuejs.org/api/reactivity-core.html#ref) that contains
|
|
20
|
+
* the retrieved Graffiti media, if it exists. The media will include a `dataUrl` property
|
|
21
|
+
* that can be used to directly display the media in a template. If the media has been deleted,
|
|
22
|
+
* the result is `null`. If the media is still being fetched, the result is `undefined`.
|
|
23
|
+
* - `poll`: A function that can be called to manually check if the media has changed.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useGraffitiGetMedia(url: MaybeRefOrGetter<string>, requirements: MaybeRefOrGetter<GraffitiMediaRequirements>, session?: MaybeRefOrGetter<GraffitiSession | undefined | null>): {
|
|
26
|
+
media: Ref<(GraffitiMedia & {
|
|
27
|
+
dataUrl: string;
|
|
28
|
+
}) | null | undefined>;
|
|
29
|
+
poll: () => Promise<void>;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=get-media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-media.d.ts","sourceRoot":"","sources":["../../../src/composables/get-media.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,yBAAyB,EACzB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAIjD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAC7B,YAAY,EAAE,gBAAgB,CAAC,yBAAyB,CAAC,EACzD,OAAO,CAAC,EAAE,gBAAgB,CAAC,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC,GAC7D;IACD,KAAK,EAAE,GAAG,CAAC,CAAC,aAAa,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACrE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B,CA4EA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GraffitiObject, GraffitiObjectUrl, GraffitiSession, JSONSchema } from '@graffiti-garden/api';
|
|
2
|
+
import { MaybeRefOrGetter, Ref } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* The [Graffiti.get](https://api.graffiti.garden/classes/Graffiti.html#get)
|
|
5
|
+
* method as a reactive [composable](https://vuejs.org/guide/reusability/composables.html)
|
|
6
|
+
* for use in the Vue [composition API](https://vuejs.org/guide/introduction.html#composition-api).
|
|
7
|
+
*
|
|
8
|
+
* Its corresponding renderless component is {@link GraffitiGet}.
|
|
9
|
+
*
|
|
10
|
+
* The arguments of this composable are the same as Graffiti.get,
|
|
11
|
+
* only they can also be [Refs](https://vuejs.org/api/reactivity-core.html#ref)
|
|
12
|
+
* or [getters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get#description).
|
|
13
|
+
* As they change the output will automatically update.
|
|
14
|
+
* Reactivity only triggers when the root array or object changes,
|
|
15
|
+
* not when the elements or properties change.
|
|
16
|
+
* If you need deep reactivity, wrap your argument in a getter.
|
|
17
|
+
*
|
|
18
|
+
* @returns
|
|
19
|
+
* - `object`: A [ref](https://vuejs.org/api/reactivity-core.html#ref) that contains
|
|
20
|
+
* the retrieved Graffiti object, if it exists. If the object cannot be found,
|
|
21
|
+
* the result is `null`. If the object is still being fetched, the result is `undefined`.
|
|
22
|
+
* - `poll`: A function that can be called to manually check if the object has changed.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useGraffitiGet<Schema extends JSONSchema>(url: MaybeRefOrGetter<GraffitiObjectUrl | string>, schema: MaybeRefOrGetter<Schema>, session?: MaybeRefOrGetter<GraffitiSession | undefined | null>): {
|
|
25
|
+
object: Ref<GraffitiObject<Schema> | null | undefined>;
|
|
26
|
+
poll: () => Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/composables/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAEjB,eAAe,EACf,UAAU,EACX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAIjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,MAAM,SAAS,UAAU,EACtD,GAAG,EAAE,gBAAgB,CAAC,iBAAiB,GAAG,MAAM,CAAC,EACjD,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAChC,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;CAC3B,CAoEA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* The [Graffiti.handleToActor](https://api.graffiti.garden/classes/Graffiti.html#handletoactor)
|
|
4
|
+
* method as a reactive [composable](https://vuejs.org/guide/reusability/composables.html)
|
|
5
|
+
* for use in the Vue [composition API](https://vuejs.org/guide/introduction.html#composition-api).
|
|
6
|
+
*
|
|
7
|
+
* Its corresponding renderless component is {@link GraffitiHandleToActor}.
|
|
8
|
+
*
|
|
9
|
+
* The arguments of this composable are the same as Graffiti.handleToActor,
|
|
10
|
+
* only they can also be [Refs](https://vuejs.org/api/reactivity-core.html#ref)
|
|
11
|
+
* or [getters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get#description).
|
|
12
|
+
* As they change the output will automatically update.
|
|
13
|
+
* Reactivity only triggers when the root array or object changes,
|
|
14
|
+
* not when the elements or properties change.
|
|
15
|
+
* If you need deep reactivity, wrap your argument in a getter.
|
|
16
|
+
*
|
|
17
|
+
* @returns
|
|
18
|
+
* - `actor`: A [ref](https://vuejs.org/api/reactivity-core.html#ref) that contains
|
|
19
|
+
* the retrieved actor, if it exists. If the actor cannot be found, the result
|
|
20
|
+
* is `null`. If the actor is still being fetched, the result is `undefined`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useGraffitiHandleToActor(handle: MaybeRefOrGetter<string>): {
|
|
23
|
+
actor: import('vue').Ref<string | null | undefined, string | null | undefined>;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=handle-to-actor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handle-to-actor.d.ts","sourceRoot":"","sources":["../../../src/composables/handle-to-actor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;;EAOxE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
export declare function useResolveString(input: MaybeRefOrGetter<string>, resolve: (input: string) => Promise<string>): {
|
|
3
|
+
output: import('vue').Ref<string | null | undefined, string | null | undefined>;
|
|
4
|
+
};
|
|
5
|
+
export declare function displayOutput(output: string | null | undefined): string;
|
|
6
|
+
//# sourceMappingURL=resolve-string.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-string.d.ts","sourceRoot":"","sources":["../../../src/composables/resolve-string.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAG5C,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAC/B,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC;;EAiC5C;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,UAI9D"}
|
package/dist/node/globals.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { Graffiti, GraffitiSession } from '@graffiti-garden/api';
|
|
3
3
|
import { GraffitiSynchronize } from '@graffiti-garden/wrapper-synchronize';
|
|
4
|
-
export declare
|
|
5
|
-
|
|
6
|
-
graffitiSession?: Ref<GraffitiSession | undefined | null>;
|
|
7
|
-
};
|
|
4
|
+
export declare function setGraffitiSession(session: Ref<GraffitiSession | undefined | null>): void;
|
|
5
|
+
export declare function setGraffitiSynchronize(synchronize: GraffitiSynchronize): void;
|
|
8
6
|
/**
|
|
9
7
|
* Returns the global [Graffiti](https://api.graffiti.garden/classes/Graffiti.html) instance
|
|
10
8
|
* that has been wrapped by the {@link GraffitiPlugin} with the [GraffitiSynchronize](https://sync.graffiti.garden/classes/GraffitiSynchronize.html).
|
|
@@ -15,7 +13,7 @@ export declare function useGraffitiSynchronize(): GraffitiSynchronize;
|
|
|
15
13
|
* Returns the global [Graffiti](https://api.graffiti.garden/classes/Graffiti.html) instance.
|
|
16
14
|
*
|
|
17
15
|
* In Vue templates and the [options API](https://vuejs.org/guide/introduction.html#options-api)
|
|
18
|
-
* use the global variable {@link ComponentCustomProperties.$graffiti | $graffiti} instead.
|
|
16
|
+
* use may use the global variable {@link ComponentCustomProperties.$graffiti | $graffiti} instead.
|
|
19
17
|
*
|
|
20
18
|
* This is the same Graffiti registered with the {@link GraffitiPlugin}
|
|
21
19
|
* via {@link GraffitiPluginOptions.graffiti}, only it has been wrapped
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../src/globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../src/globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAOhF,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,GAAG,CAAC,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC,QASjD;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,mBAAmB,QAQtE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,wBAQrC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,IAAI,QAAQ,CAEtC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,gFAQjC"}
|