@fiction/sdk 1.0.59 → 1.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FModal.vue_vue_type_script_setup_true_lang-C4CbSGGe.js → FModal.vue_vue_type_script_setup_true_lang-Ce7y9PSl.js} +2 -2
- package/dist/{FModal.vue_vue_type_script_setup_true_lang-C4CbSGGe.js.map → FModal.vue_vue_type_script_setup_true_lang-Ce7y9PSl.js.map} +1 -1
- package/dist/{SelfProvider.vue_vue_type_script_setup_true_lang-DFXdpHBQ.js → SelfProvider.vue_vue_type_script_setup_true_lang-26F7cqUz.js} +2 -2
- package/dist/{SelfProvider.vue_vue_type_script_setup_true_lang-DFXdpHBQ.js.map → SelfProvider.vue_vue_type_script_setup_true_lang-26F7cqUz.js.map} +1 -1
- package/dist/{SelfWidgetInline-RP4Bgvb2.js → SelfWidgetInline-DM14q3uW.js} +2 -2
- package/dist/{SelfWidgetInline-RP4Bgvb2.js.map → SelfWidgetInline-DM14q3uW.js.map} +1 -1
- package/dist/{SelfWidgetModal-BfSYtDi_.js → SelfWidgetModal-BpkLEYY0.js} +3 -3
- package/dist/{SelfWidgetModal-BfSYtDi_.js.map → SelfWidgetModal-BpkLEYY0.js.map} +1 -1
- package/dist/{SelfWidgetPopup-DZkw2epa.js → SelfWidgetPopup-DjwPpHLy.js} +2 -2
- package/dist/{SelfWidgetPopup-DZkw2epa.js.map → SelfWidgetPopup-DjwPpHLy.js.map} +1 -1
- package/dist/SelfWrap.vue_vue_type_script_setup_true_lang-DLAFn8rY.js +7826 -0
- package/dist/SelfWrap.vue_vue_type_script_setup_true_lang-DLAFn8rY.js.map +1 -0
- package/dist/demo/index.d.ts +8 -8
- package/dist/sdk.css +1 -1
- package/dist/sdkClient.d.ts +12 -12
- package/dist/self/accounts.d.ts +104 -0
- package/dist/self/index.d.ts +2 -0
- package/dist/self/schema.d.ts +1 -1
- package/dist/self/ui/SelfWrap.vue.d.ts +4 -4
- package/dist/self.js +43 -40
- package/dist/widget.js +87 -87
- package/dist/widget.js.map +1 -1
- package/package.json +6 -7
- package/dist/SelfWrap.vue_vue_type_script_setup_true_lang-rvOPLj1D.js +0 -5600
- package/dist/SelfWrap.vue_vue_type_script_setup_true_lang-rvOPLj1D.js.map +0 -1
package/dist/sdkClient.d.ts
CHANGED
|
@@ -214,10 +214,10 @@ export declare class FictionSDK extends SettingsObject<FictionSDKSettings> {
|
|
|
214
214
|
}[] | undefined;
|
|
215
215
|
email?: string | null | undefined;
|
|
216
216
|
website?: string | null | undefined;
|
|
217
|
-
accounts?:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
217
|
+
accounts?: {
|
|
218
|
+
platform: "email" | "website" | "linkedin" | "x" | "facebook" | "tiktok" | "youtube" | "github" | "instagram" | "threads" | "phone";
|
|
219
|
+
handle: string;
|
|
220
|
+
}[] | null | undefined;
|
|
221
221
|
basePrompt?: string | null | undefined;
|
|
222
222
|
firstMessage?: string | null | undefined;
|
|
223
223
|
personalityPrompt?: string | null | undefined;
|
|
@@ -452,10 +452,10 @@ export declare class FictionSDK extends SettingsObject<FictionSDKSettings> {
|
|
|
452
452
|
}[] | undefined;
|
|
453
453
|
email?: string | null | undefined;
|
|
454
454
|
website?: string | null | undefined;
|
|
455
|
-
accounts?:
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}
|
|
455
|
+
accounts?: {
|
|
456
|
+
platform: "email" | "website" | "linkedin" | "x" | "facebook" | "tiktok" | "youtube" | "github" | "instagram" | "threads" | "phone";
|
|
457
|
+
handle: string;
|
|
458
|
+
}[] | null | undefined;
|
|
459
459
|
basePrompt?: string | null | undefined;
|
|
460
460
|
firstMessage?: string | null | undefined;
|
|
461
461
|
personalityPrompt?: string | null | undefined;
|
|
@@ -577,10 +577,10 @@ export declare class FictionSDK extends SettingsObject<FictionSDKSettings> {
|
|
|
577
577
|
}[] | undefined;
|
|
578
578
|
email?: string | null | undefined;
|
|
579
579
|
website?: string | null | undefined;
|
|
580
|
-
accounts?:
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
}
|
|
580
|
+
accounts?: {
|
|
581
|
+
platform: "email" | "website" | "linkedin" | "x" | "facebook" | "tiktok" | "youtube" | "github" | "instagram" | "threads" | "phone";
|
|
582
|
+
handle: string;
|
|
583
|
+
}[] | null | undefined;
|
|
584
584
|
basePrompt?: string | null | undefined;
|
|
585
585
|
firstMessage?: string | null | undefined;
|
|
586
586
|
personalityPrompt?: string | null | undefined;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SocialAccountSchema: z.ZodObject<{
|
|
3
|
+
platform: z.ZodEnum<{
|
|
4
|
+
email: "email";
|
|
5
|
+
website: "website";
|
|
6
|
+
linkedin: "linkedin";
|
|
7
|
+
x: "x";
|
|
8
|
+
facebook: "facebook";
|
|
9
|
+
tiktok: "tiktok";
|
|
10
|
+
youtube: "youtube";
|
|
11
|
+
github: "github";
|
|
12
|
+
instagram: "instagram";
|
|
13
|
+
threads: "threads";
|
|
14
|
+
phone: "phone";
|
|
15
|
+
}>;
|
|
16
|
+
handle: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const SocialAccountsSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
19
|
+
platform: z.ZodEnum<{
|
|
20
|
+
email: "email";
|
|
21
|
+
website: "website";
|
|
22
|
+
linkedin: "linkedin";
|
|
23
|
+
x: "x";
|
|
24
|
+
facebook: "facebook";
|
|
25
|
+
tiktok: "tiktok";
|
|
26
|
+
youtube: "youtube";
|
|
27
|
+
github: "github";
|
|
28
|
+
instagram: "instagram";
|
|
29
|
+
threads: "threads";
|
|
30
|
+
phone: "phone";
|
|
31
|
+
}>;
|
|
32
|
+
handle: z.ZodString;
|
|
33
|
+
}, z.core.$strip>>>;
|
|
34
|
+
export type SocialAccount = z.infer<typeof SocialAccountSchema>;
|
|
35
|
+
export type SocialAccounts = z.infer<typeof SocialAccountsSchema>;
|
|
36
|
+
export declare const SOCIAL_PLATFORMS: {
|
|
37
|
+
readonly linkedin: {
|
|
38
|
+
readonly label: "LinkedIn";
|
|
39
|
+
readonly icon: "i-simple-icons-linkedin";
|
|
40
|
+
readonly placeholder: "john-smith";
|
|
41
|
+
readonly getUrl: (handle: string) => string;
|
|
42
|
+
};
|
|
43
|
+
readonly x: {
|
|
44
|
+
readonly label: "X";
|
|
45
|
+
readonly icon: "i-simple-icons-x";
|
|
46
|
+
readonly placeholder: "johnsmith";
|
|
47
|
+
readonly getUrl: (handle: string) => string;
|
|
48
|
+
};
|
|
49
|
+
readonly facebook: {
|
|
50
|
+
readonly label: "Facebook";
|
|
51
|
+
readonly icon: "i-simple-icons-facebook";
|
|
52
|
+
readonly placeholder: "johnsmith";
|
|
53
|
+
readonly getUrl: (handle: string) => string;
|
|
54
|
+
};
|
|
55
|
+
readonly tiktok: {
|
|
56
|
+
readonly label: "TikTok";
|
|
57
|
+
readonly icon: "i-simple-icons-tiktok";
|
|
58
|
+
readonly placeholder: "johnsmith";
|
|
59
|
+
readonly getUrl: (handle: string) => string;
|
|
60
|
+
};
|
|
61
|
+
readonly youtube: {
|
|
62
|
+
readonly label: "YouTube";
|
|
63
|
+
readonly icon: "i-tabler-brand-youtube";
|
|
64
|
+
readonly placeholder: "johnsmith";
|
|
65
|
+
readonly getUrl: (handle: string) => string;
|
|
66
|
+
};
|
|
67
|
+
readonly github: {
|
|
68
|
+
readonly label: "GitHub";
|
|
69
|
+
readonly icon: "i-tabler-brand-github";
|
|
70
|
+
readonly placeholder: "johnsmith";
|
|
71
|
+
readonly getUrl: (handle: string) => string;
|
|
72
|
+
};
|
|
73
|
+
readonly instagram: {
|
|
74
|
+
readonly label: "Instagram";
|
|
75
|
+
readonly icon: "i-simple-icons-instagram";
|
|
76
|
+
readonly placeholder: "johnsmith";
|
|
77
|
+
readonly getUrl: (handle: string) => string;
|
|
78
|
+
};
|
|
79
|
+
readonly threads: {
|
|
80
|
+
readonly label: "Threads";
|
|
81
|
+
readonly icon: "i-simple-icons-threads";
|
|
82
|
+
readonly placeholder: "johnsmith";
|
|
83
|
+
readonly getUrl: (handle: string) => string;
|
|
84
|
+
};
|
|
85
|
+
readonly email: {
|
|
86
|
+
readonly label: "Email";
|
|
87
|
+
readonly icon: "i-tabler-mail";
|
|
88
|
+
readonly placeholder: "hello@example.com";
|
|
89
|
+
readonly getUrl: (handle: string) => string;
|
|
90
|
+
};
|
|
91
|
+
readonly phone: {
|
|
92
|
+
readonly label: "Phone";
|
|
93
|
+
readonly icon: "i-tabler-phone";
|
|
94
|
+
readonly placeholder: "+1-555-123-4567";
|
|
95
|
+
readonly getUrl: (handle: string) => string;
|
|
96
|
+
};
|
|
97
|
+
readonly website: {
|
|
98
|
+
readonly label: "Website";
|
|
99
|
+
readonly icon: "i-tabler-world";
|
|
100
|
+
readonly placeholder: "https://example.com";
|
|
101
|
+
readonly getUrl: (handle: string) => string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
export type SocialPlatform = keyof typeof SOCIAL_PLATFORMS;
|
package/dist/self/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { default as SelfWidget } from './ui/SelfWidget.vue';
|
|
|
5
5
|
import { default as SelfWrap } from './ui/SelfWrap.vue';
|
|
6
6
|
export { ClientAudio } from './ClientAudio';
|
|
7
7
|
export * from './constants';
|
|
8
|
+
export { SocialAccountSchema, SocialAccountsSchema, SOCIAL_PLATFORMS } from './accounts';
|
|
9
|
+
export type { SocialAccount, SocialAccounts, SocialPlatform } from './accounts';
|
|
8
10
|
export * from './schema';
|
|
9
11
|
export { SelfAgent, SelfModal, SelfProvider, SelfWidget, SelfWrap };
|
|
10
12
|
export * from './utils';
|
package/dist/self/schema.d.ts
CHANGED
|
@@ -27,10 +27,10 @@ declare function __VLS_template(): {
|
|
|
27
27
|
coverId?: string | null | undefined;
|
|
28
28
|
email?: string | null | undefined;
|
|
29
29
|
website?: string | null | undefined;
|
|
30
|
-
accounts?:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
30
|
+
accounts?: {
|
|
31
|
+
platform: "email" | "website" | "linkedin" | "x" | "facebook" | "tiktok" | "youtube" | "github" | "instagram" | "threads" | "phone";
|
|
32
|
+
handle: string;
|
|
33
|
+
}[] | null | undefined;
|
|
34
34
|
basePrompt?: string | null | undefined;
|
|
35
35
|
firstMessage?: string | null | undefined;
|
|
36
36
|
personalityPrompt?: string | null | undefined;
|
package/dist/self.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import { defineComponent as b, createBlock as u, openBlock as
|
|
6
|
-
import { _ as $ } from "./FModal.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as N } from "./SelfProvider.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
const
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var c = (e, l) => y(e, "name", { value: l, configurable: !0 });
|
|
3
|
+
import { a as E, g as C, c as I, b as M } from "./SelfWrap.vue_vue_type_script_setup_true_lang-DLAFn8rY.js";
|
|
4
|
+
import { j as q, A as J, h as K, f as X, C as Y, e as ee, S as te, d as se, V as ae, i as oe, m as ie, k as le, l as ne, p as re } from "./SelfWrap.vue_vue_type_script_setup_true_lang-DLAFn8rY.js";
|
|
5
|
+
import { defineComponent as b, createBlock as u, openBlock as d, withCtx as k, createElementVNode as o, createVNode as O, ref as v, watch as _, nextTick as U, createElementBlock as h, createCommentVNode as f, normalizeClass as p, normalizeStyle as V, unref as x } from "vue";
|
|
6
|
+
import { _ as $ } from "./FModal.vue_vue_type_script_setup_true_lang-Ce7y9PSl.js";
|
|
7
|
+
import { _ as N } from "./SelfProvider.vue_vue_type_script_setup_true_lang-26F7cqUz.js";
|
|
8
|
+
const T = { class: "relative w-full h-[80vh] md:h-[600px]" }, W = /* @__PURE__ */ b({
|
|
9
9
|
name: "SelfModal",
|
|
10
10
|
__name: "SelfModal",
|
|
11
11
|
props: {
|
|
@@ -19,7 +19,7 @@ const z = { class: "relative w-full h-[80vh] md:h-[600px]" }, P = /* @__PURE__ *
|
|
|
19
19
|
emits: ["update:vis"],
|
|
20
20
|
setup(e, { emit: l }) {
|
|
21
21
|
const s = l;
|
|
22
|
-
return (t, a) => (
|
|
22
|
+
return (t, a) => (d(), u($, {
|
|
23
23
|
vis: e.vis,
|
|
24
24
|
"modal-class": "max-w-4xl p-0",
|
|
25
25
|
"style-class": "bg-transparent shadow-2xl rounded-2xl",
|
|
@@ -27,7 +27,7 @@ const z = { class: "relative w-full h-[80vh] md:h-[600px]" }, P = /* @__PURE__ *
|
|
|
27
27
|
"onUpdate:vis": a[1] || (a[1] = (n) => s("update:vis", n))
|
|
28
28
|
}, {
|
|
29
29
|
default: k(() => [
|
|
30
|
-
o("div",
|
|
30
|
+
o("div", T, [
|
|
31
31
|
O(N, {
|
|
32
32
|
sdk: e.sdk,
|
|
33
33
|
self: e.self,
|
|
@@ -42,10 +42,10 @@ const z = { class: "relative w-full h-[80vh] md:h-[600px]" }, P = /* @__PURE__ *
|
|
|
42
42
|
_: 1
|
|
43
43
|
}, 8, ["vis"]));
|
|
44
44
|
}
|
|
45
|
-
}),
|
|
45
|
+
}), z = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "relative h-full w-full"
|
|
48
|
-
},
|
|
48
|
+
}, F = { class: "group relative h-full w-full rounded-3xl overflow-hidden shadow-lg transition-all duration-300 ease-[cubic-bezier(0.25,1,0.33,1)] hover:shadow-2xl hover:translate-y-[-1px] hover:brightness-110 active:scale-[1.06] active:-translate-y-0.5 active:duration-100" }, D = ["src", "alt"], Z = /* @__PURE__ */ b({
|
|
49
49
|
__name: "SelfWidget",
|
|
50
50
|
props: {
|
|
51
51
|
sdk: {},
|
|
@@ -59,34 +59,34 @@ const z = { class: "relative w-full h-[80vh] md:h-[600px]" }, P = /* @__PURE__ *
|
|
|
59
59
|
function n() {
|
|
60
60
|
t.value = !t.value;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
c(n, "toggle"), _(t, async (g) => {
|
|
63
|
+
g ? (await U(), setTimeout(() => {
|
|
64
64
|
a.value = !0;
|
|
65
65
|
}, 400)) : a.value = !1;
|
|
66
66
|
});
|
|
67
67
|
function w() {
|
|
68
68
|
t.value = !0;
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
function
|
|
70
|
+
c(w, "open");
|
|
71
|
+
function m() {
|
|
72
72
|
t.value = !1;
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
function
|
|
76
|
-
|
|
74
|
+
c(m, "close");
|
|
75
|
+
function S() {
|
|
76
|
+
m();
|
|
77
77
|
}
|
|
78
|
-
return
|
|
78
|
+
return c(S, "handleClose"), l({
|
|
79
79
|
toggle: n,
|
|
80
80
|
open: w,
|
|
81
|
-
close:
|
|
82
|
-
}), (
|
|
81
|
+
close: m
|
|
82
|
+
}), (g, i) => (d(), u(E, {
|
|
83
83
|
sdk: e.sdk,
|
|
84
84
|
handle: e.handle,
|
|
85
85
|
context: e.context,
|
|
86
86
|
"first-message": e.firstMessage
|
|
87
87
|
}, {
|
|
88
|
-
default: k(({ self: r, sdk:
|
|
89
|
-
r ? (
|
|
88
|
+
default: k(({ self: r, sdk: A }) => [
|
|
89
|
+
r ? (d(), h("div", {
|
|
90
90
|
key: 0,
|
|
91
91
|
class: p(["fixed z-[999999] pointer-events-auto", [
|
|
92
92
|
s.position === "bottom-left" ? "bottom-6 left-6" : s.position === "top-right" ? "top-6 right-6" : s.position === "top-left" ? "top-6 left-6" : "bottom-6 right-6"
|
|
@@ -96,20 +96,20 @@ const z = { class: "relative w-full h-[80vh] md:h-[600px]" }, P = /* @__PURE__ *
|
|
|
96
96
|
class: p(["transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] transform-gpu", [
|
|
97
97
|
t.value ? "widget-expanded w-96 h-[600px] max-w-[calc(100vw-48px)] max-h-[calc(100vh-48px)] rounded-3xl opacity-100 scale-100" : "widget-button w-[80px] h-[80px] opacity-100 scale-100 flex items-center justify-center cursor-pointer"
|
|
98
98
|
]]),
|
|
99
|
-
style:
|
|
99
|
+
style: V({
|
|
100
100
|
"transform-origin": s.position === "bottom-left" ? "bottom left" : s.position === "top-right" ? "top right" : s.position === "top-left" ? "top left" : "bottom right"
|
|
101
101
|
}),
|
|
102
|
-
onClick: i[0] || (i[0] = (
|
|
102
|
+
onClick: i[0] || (i[0] = (L) => t.value ? void 0 : n())
|
|
103
103
|
}, [
|
|
104
|
-
t.value ? f("", !0) : (
|
|
105
|
-
o("div",
|
|
104
|
+
t.value ? f("", !0) : (d(), h("div", z, [
|
|
105
|
+
o("div", F, [
|
|
106
106
|
o("img", {
|
|
107
107
|
src: x(C)(r) || x(I)(),
|
|
108
108
|
alt: `${r.name} digital self`,
|
|
109
109
|
class: "h-full w-full object-cover pointer-events-none",
|
|
110
110
|
width: "80",
|
|
111
111
|
height: "80"
|
|
112
|
-
}, null, 8,
|
|
112
|
+
}, null, 8, D),
|
|
113
113
|
i[1] || (i[1] = o("div", { class: "absolute inset-0 pointer-events-none bg-gradient-to-br from-transparent via-black/10 to-black/40 opacity-60 transition-opacity duration-300 group-hover:opacity-40" }, null, -1))
|
|
114
114
|
]),
|
|
115
115
|
i[2] || (i[2] = o("div", { class: "absolute top-0.5 right-0.5" }, [
|
|
@@ -120,16 +120,16 @@ const z = { class: "relative w-full h-[80vh] md:h-[600px]" }, P = /* @__PURE__ *
|
|
|
120
120
|
o("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" })
|
|
121
121
|
], -1))
|
|
122
122
|
])),
|
|
123
|
-
t.value && r ? (
|
|
123
|
+
t.value && r ? (d(), u(M, {
|
|
124
124
|
key: 1,
|
|
125
125
|
class: "rounded-3xl shadow-2xl border border-white/10",
|
|
126
|
-
sdk:
|
|
126
|
+
sdk: A,
|
|
127
127
|
self: r,
|
|
128
128
|
context: e.context,
|
|
129
129
|
"first-message": e.firstMessage,
|
|
130
130
|
"has-close": !0,
|
|
131
131
|
"is-active": a.value,
|
|
132
|
-
onClose:
|
|
132
|
+
onClose: S
|
|
133
133
|
}, null, 8, ["sdk", "self", "context", "first-message", "is-active"])) : f("", !0)
|
|
134
134
|
], 6)
|
|
135
135
|
], 2)) : f("", !0)
|
|
@@ -144,18 +144,21 @@ export {
|
|
|
144
144
|
K as AUDIO_LEVEL_UPDATE_INTERVAL,
|
|
145
145
|
X as AUDIO_SMOOTHING,
|
|
146
146
|
Y as ClientAudio,
|
|
147
|
+
ee as SOCIAL_PLATFORMS,
|
|
147
148
|
M as SelfAgent,
|
|
148
|
-
|
|
149
|
+
W as SelfModal,
|
|
149
150
|
N as SelfProvider,
|
|
150
151
|
Z as SelfWidget,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
E as SelfWrap,
|
|
153
|
+
te as SocialAccountSchema,
|
|
154
|
+
se as SocialAccountsSchema,
|
|
155
|
+
ae as VISUALIZER_CONFIG,
|
|
156
|
+
oe as VOICE_FREQUENCIES,
|
|
157
|
+
ie as generateFirstMessage,
|
|
155
158
|
I as getFallbackAvatarDataUrl,
|
|
156
|
-
|
|
159
|
+
le as getImageSrc,
|
|
157
160
|
C as getSelfAvatarUrl,
|
|
158
|
-
|
|
159
|
-
|
|
161
|
+
ne as handleImageError,
|
|
162
|
+
re as parseVoiceMessage
|
|
160
163
|
};
|
|
161
164
|
//# sourceMappingURL=self.js.map
|