@fiction/sdk 1.0.31 → 1.0.32
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/SelfWidgetModal-CgZjd7eG.js +62 -0
- package/dist/SelfWidgetModal-CgZjd7eG.js.map +1 -0
- package/dist/widget/FictionWidget.d.ts +1 -0
- package/dist/{self → widget}/ui/SelfWidgetModal.vue.d.ts +1 -0
- package/dist/widget.js +5 -2
- package/dist/widget.js.map +1 -1
- package/package.json +2 -2
- package/dist/SelfWidgetModal-BelgsGqF.js +0 -54
- package/dist/SelfWidgetModal-BelgsGqF.js.map +0 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var x = Object.defineProperty;
|
|
2
|
+
var n = (s, a) => x(s, "name", { value: a, configurable: !0 });
|
|
3
|
+
import { defineComponent as h, ref as l, onMounted as p, nextTick as g, createBlock as C, openBlock as k, withCtx as M, createVNode as _ } from "vue";
|
|
4
|
+
import { _ as w } from "./FModal.vue_vue_type_script_setup_true_lang-DaI-YWPp.js";
|
|
5
|
+
import { _ as T } from "./SelfProvider.vue_vue_type_script_setup_true_lang-hdOg9n4q.js";
|
|
6
|
+
const S = /* @__PURE__ */ h({
|
|
7
|
+
__name: "SelfWidgetModal",
|
|
8
|
+
props: {
|
|
9
|
+
sdk: {},
|
|
10
|
+
handle: {},
|
|
11
|
+
self: {},
|
|
12
|
+
context: {},
|
|
13
|
+
firstMessage: {},
|
|
14
|
+
onClose: { type: Function }
|
|
15
|
+
},
|
|
16
|
+
setup(s, { expose: a }) {
|
|
17
|
+
const t = s, f = l(t.self), r = l(t.context), c = l(t.firstMessage), o = l(!1);
|
|
18
|
+
p(async () => {
|
|
19
|
+
await g(), setTimeout(() => {
|
|
20
|
+
o.value = !0;
|
|
21
|
+
}, 10);
|
|
22
|
+
});
|
|
23
|
+
function d(e) {
|
|
24
|
+
e.self !== void 0 && (f.value = e.self), e.context !== void 0 && (r.value = e.context), e.firstMessage !== void 0 && (c.value = e.firstMessage);
|
|
25
|
+
}
|
|
26
|
+
n(d, "update");
|
|
27
|
+
function i() {
|
|
28
|
+
o.value = !1, setTimeout(() => {
|
|
29
|
+
t.onClose && t.onClose();
|
|
30
|
+
}, 300);
|
|
31
|
+
}
|
|
32
|
+
n(i, "close");
|
|
33
|
+
function m() {
|
|
34
|
+
o.value = !0;
|
|
35
|
+
}
|
|
36
|
+
return n(m, "open"), a({ update: d, close: i, open: m }), (e, u) => (k(), C(w, {
|
|
37
|
+
vis: o.value,
|
|
38
|
+
"disable-teleport": !0,
|
|
39
|
+
"modal-class": "max-w-4xl h-[80vh] md:h-[600px]",
|
|
40
|
+
"has-close": !1,
|
|
41
|
+
"onUpdate:vis": u[0] || (u[0] = (v) => o.value = v),
|
|
42
|
+
onClose: i
|
|
43
|
+
}, {
|
|
44
|
+
default: M(() => [
|
|
45
|
+
_(T, {
|
|
46
|
+
sdk: s.sdk,
|
|
47
|
+
handle: s.handle,
|
|
48
|
+
self: f.value,
|
|
49
|
+
context: r.value,
|
|
50
|
+
"first-message": c.value,
|
|
51
|
+
"has-close": !0,
|
|
52
|
+
onClose: i
|
|
53
|
+
}, null, 8, ["sdk", "handle", "self", "context", "first-message"])
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, ["vis"]));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
S as default
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=SelfWidgetModal-CgZjd7eG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelfWidgetModal-CgZjd7eG.js","sources":["../widget/ui/SelfWidgetModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { FictionSDK } from '../../sdkClient'\nimport type { Self } from '@fiction/types'\nimport { nextTick, onMounted, ref } from 'vue'\nimport FModal from '@/ui/common/FModal.vue'\nimport SelfProvider from '../../self/ui/SelfProvider.vue'\n\nexport interface WidgetUpdate {\n self?: Self\n context?: string\n firstMessage?: string\n}\n\nconst props = defineProps<{\n sdk?: FictionSDK\n handle?: string\n self?: Self\n context?: string\n firstMessage?: string\n onClose?: () => void\n}>()\n\nconst currentSelf = ref<Self | undefined>(props.self)\nconst currentContext = ref<string | undefined>(props.context)\nconst currentFirstMessage = ref<string | undefined>(props.firstMessage)\nconst isVisible = ref(false)\n\n// Trigger transition after mount\nonMounted(async () => {\n await nextTick()\n // Small delay to ensure DOM is ready and transition fires\n setTimeout(() => {\n isVisible.value = true\n }, 10)\n})\n\nfunction update(updates: WidgetUpdate) {\n if (updates.self !== undefined)\n currentSelf.value = updates.self\n if (updates.context !== undefined)\n currentContext.value = updates.context\n if (updates.firstMessage !== undefined)\n currentFirstMessage.value = updates.firstMessage\n}\n\nfunction close() {\n isVisible.value = false\n // Wait for transition to complete before calling onClose\n setTimeout(() => {\n if (props.onClose) {\n props.onClose()\n }\n }, 300) // Match FModal transition duration\n}\n\nfunction open() {\n isVisible.value = true\n}\n\ndefineExpose({ update, close, open })\n</script>\n\n<template>\n <FModal\n :vis=\"isVisible\"\n :disable-teleport=\"true\"\n modal-class=\"max-w-4xl h-[80vh] md:h-[600px]\"\n :has-close=\"false\"\n @update:vis=\"isVisible = $event\"\n @close=\"close\"\n >\n <SelfProvider\n :sdk=\"sdk\"\n :handle=\"handle\"\n :self=\"currentSelf\"\n :context=\"currentContext\"\n :first-message=\"currentFirstMessage\"\n :has-close=\"true\"\n @close=\"close\"\n />\n </FModal>\n</template>\n"],"names":["props","__props","currentSelf","ref","currentContext","currentFirstMessage","isVisible","onMounted","nextTick","update","updates","__name","close","open","__expose","_createBlock","FModal","_cache","$event","_createVNode","SelfProvider"],"mappings":";;;;;;;;;;;;;;;;AAaA,UAAMA,IAAQC,GASRC,IAAcC,EAAsBH,EAAM,IAAI,GAC9CI,IAAiBD,EAAwBH,EAAM,OAAO,GACtDK,IAAsBF,EAAwBH,EAAM,YAAY,GAChEM,IAAYH,EAAI,EAAK;AAG3B,IAAAI,EAAU,YAAY;AACpB,YAAMC,EAAA,GAEN,WAAW,MAAM;AACf,QAAAF,EAAU,QAAQ;AAAA,MACpB,GAAG,EAAE;AAAA,IACP,CAAC;AAED,aAASG,EAAOC,GAAuB;AACrC,MAAIA,EAAQ,SAAS,WACnBR,EAAY,QAAQQ,EAAQ,OAC1BA,EAAQ,YAAY,WACtBN,EAAe,QAAQM,EAAQ,UAC7BA,EAAQ,iBAAiB,WAC3BL,EAAoB,QAAQK,EAAQ;AAAA,IACxC;AAPS,IAAAC,EAAAF,GAAA;AAST,aAASG,IAAQ;AACf,MAAAN,EAAU,QAAQ,IAElB,WAAW,MAAM;AACf,QAAIN,EAAM,WACRA,EAAM,QAAA;AAAA,MAEV,GAAG,GAAG;AAAA,IACR;AARS,IAAAW,EAAAC,GAAA;AAUT,aAASC,IAAO;AACd,MAAAP,EAAU,QAAQ;AAAA,IACpB;AAFS,WAAAK,EAAAE,GAAA,SAITC,EAAa,EAAE,QAAAL,GAAQ,OAAAG,GAAO,MAAAC,EAAA,CAAM,mBAIlCE,EAiBSC,GAAA;AAAA,MAhBN,KAAKV,EAAA;AAAA,MACL,oBAAkB;AAAA,MACnB,eAAY;AAAA,MACX,aAAW;AAAA,MACX,gBAAUW,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEZ,EAAA,QAAYY;AAAA,MACxB,SAAON;AAAA,IAAA;iBAER,MAQE;AAAA,QARFO,EAQEC,GAAA;AAAA,UAPC,KAAKnB,EAAA;AAAA,UACL,QAAQA,EAAA;AAAA,UACR,MAAMC,EAAA;AAAA,UACN,SAASE,EAAA;AAAA,UACT,iBAAeC,EAAA;AAAA,UACf,aAAW;AAAA,UACX,SAAOO;AAAA,QAAA;;;;;;"}
|
package/dist/widget.js
CHANGED
|
@@ -62,13 +62,16 @@ const v = `/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */@la
|
|
|
62
62
|
// Default position for popup
|
|
63
63
|
}), this.widgetInstance = this.app.mount(r);
|
|
64
64
|
} else if (e === "modal") {
|
|
65
|
-
const { default: o } = await import("./SelfWidgetModal-
|
|
65
|
+
const { default: o } = await import("./SelfWidgetModal-CgZjd7eG.js");
|
|
66
66
|
this.app = s(o, {
|
|
67
67
|
sdk: this.sdk,
|
|
68
68
|
handle: this.config.handle,
|
|
69
69
|
self: this.config.self,
|
|
70
70
|
context: this.config.context,
|
|
71
|
-
firstMessage: this.config.firstMessage
|
|
71
|
+
firstMessage: this.config.firstMessage,
|
|
72
|
+
onClose: /* @__PURE__ */ n(() => {
|
|
73
|
+
this.config.onClose && this.config.onClose(), this.destroy();
|
|
74
|
+
}, "onClose")
|
|
72
75
|
}), this.widgetInstance = this.app.mount(r);
|
|
73
76
|
} else
|
|
74
77
|
throw new Error(`FictionWidget: unsupported mode "${e}"`);
|
package/dist/widget.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget.js","sources":["../widget/FictionWidget.ts"],"sourcesContent":["import type { App, ComponentPublicInstance } from 'vue'\nimport type { Self } from '@fiction/types'\nimport { FictionSDK } from '../sdkClient'\nimport sdkCSS from '../self/ui/styles.css?inline'\nimport { createApp } from 'vue'\n\ntype WidgetMode = 'inline' | 'popup' | 'modal'\n\nexport interface WidgetConfig {\n el?: HTMLElement // Optional for modal mode (creates and appends to body)\n mode: WidgetMode\n handle?: string\n self?: Self\n context?: string\n firstMessage?: string\n apiBase?: string\n}\n\nexport interface WidgetUpdate {\n self?: Self\n context?: string\n firstMessage?: string\n}\n\ntype WidgetInstance = {\n toggle?: () => void\n open?: () => void\n close?: () => void\n update?: (config: WidgetUpdate) => void\n} & ComponentPublicInstance\n\nconst logger = {\n info: (message: string) => console.log(`[Fiction Widget] ${message}`),\n error: (message: string) => console.error(`[Fiction Widget] ${message}`),\n warn: (message: string) => console.warn(`[Fiction Widget] ${message}`),\n}\n\nexport class FictionWidget {\n private app: App | null = null\n private shadowRoot: ShadowRoot | null = null\n private widgetInstance: WidgetInstance | null = null\n private config: WidgetConfig\n private sdk: FictionSDK\n private container: HTMLElement | null = null\n private static modalInstances = new Map<string, FictionWidget>()\n\n constructor(config: WidgetConfig) {\n this.config = config\n\n // Validate required config\n if (!config.mode)\n throw new Error('FictionWidget: mode is required')\n if (!config.handle && !config.self)\n throw new Error('FictionWidget: either handle or self is required')\n\n // For non-modal modes, el is required\n if (config.mode !== 'modal' && !config.el)\n throw new Error(`FictionWidget: el (HTMLElement) is required for ${config.mode} mode`)\n\n // For modal mode, handle singleton pattern\n if (config.mode === 'modal') {\n const instanceKey = config.handle || config.self?.selfId || 'default'\n const existing = FictionWidget.modalInstances.get(instanceKey)\n if (existing) {\n logger.warn(`Destroying existing modal widget for: ${instanceKey}`)\n existing.destroy()\n }\n FictionWidget.modalInstances.set(instanceKey, this)\n }\n\n // Create SDK instance\n const isDev = typeof window !== 'undefined'\n ? window.location.hostname === 'localhost' || window.location.hostname.includes('127.0.0.1')\n : false\n\n this.sdk = new FictionSDK({\n isDev,\n apiBase: config.apiBase,\n })\n\n logger.info(`Initializing ${config.mode} mode for @${config.handle || config.self?.handle} (isDev: ${isDev})`)\n\n this.init()\n }\n\n private async init() {\n // For modal mode, create container and append to body\n if (this.config.mode === 'modal') {\n this.container = document.createElement('div')\n this.container.id = `fiction-modal-${this.config.handle || this.config.self?.selfId || 'widget'}`\n document.body.appendChild(this.container)\n\n // Create shadow root in modal container\n this.shadowRoot = this.container.attachShadow({ mode: 'open' })\n }\n else {\n // For other modes, use provided element\n this.shadowRoot = this.config.el!.attachShadow({ mode: 'open' })\n }\n\n // Inject SDK CSS into shadow DOM\n const styleElement = document.createElement('style')\n styleElement.textContent = sdkCSS\n this.shadowRoot.appendChild(styleElement)\n\n // Create mount point\n const mountPoint = document.createElement('div')\n mountPoint.id = 'fiction-widget-root'\n mountPoint.style.cssText = 'width: 100%; height: 100%;'\n this.shadowRoot.appendChild(mountPoint)\n\n // Import and mount mode-specific component\n await this.mountMode(mountPoint)\n }\n\n private async mountMode(mountPoint: HTMLElement) {\n const { mode } = this.config\n\n if (mode === 'inline') {\n const { default: SelfWidgetInline } = await import('./ui/SelfWidgetInline.vue')\n\n this.app = createApp(SelfWidgetInline, {\n sdk: this.sdk,\n handle: this.config.handle,\n self: this.config.self,\n context: this.config.context,\n firstMessage: this.config.firstMessage,\n })\n\n this.widgetInstance = this.app.mount(mountPoint) as WidgetInstance\n }\n else if (mode === 'popup') {\n const { default: SelfWidgetPopup } = await import('./ui/SelfWidgetPopup.vue')\n\n this.app = createApp(SelfWidgetPopup, {\n sdk: this.sdk,\n handle: this.config.handle,\n self: this.config.self,\n context: this.config.context,\n firstMessage: this.config.firstMessage,\n position: 'bottom-right', // Default position for popup\n })\n\n this.widgetInstance = this.app.mount(mountPoint) as WidgetInstance\n }\n else if (mode === 'modal') {\n const { default: SelfWidgetModal } = await import('../self/ui/SelfWidgetModal.vue')\n\n this.app = createApp(SelfWidgetModal, {\n sdk: this.sdk,\n handle: this.config.handle,\n self: this.config.self,\n context: this.config.context,\n firstMessage: this.config.firstMessage,\n })\n\n this.widgetInstance = this.app.mount(mountPoint) as WidgetInstance\n }\n else {\n throw new Error(`FictionWidget: unsupported mode \"${mode}\"`)\n }\n }\n\n /**\n * Update widget with new configuration without re-mounting\n */\n update(updates: WidgetUpdate) {\n if (this.widgetInstance?.update) {\n this.widgetInstance.update(updates)\n logger.info(`Widget updated: ${Object.keys(updates).join(', ')}`)\n }\n else {\n logger.warn('Widget instance does not support update()')\n }\n }\n\n /**\n * Toggle widget visibility (popup mode only)\n */\n toggle() {\n if (this.widgetInstance?.toggle) {\n this.widgetInstance.toggle()\n }\n else {\n logger.warn('Widget mode does not support toggle()')\n }\n }\n\n /**\n * Open widget (popup mode only)\n */\n open() {\n if (this.widgetInstance?.open) {\n this.widgetInstance.open()\n }\n else {\n logger.warn('Widget mode does not support open()')\n }\n }\n\n /**\n * Close widget (popup mode only)\n */\n close() {\n if (this.widgetInstance?.close) {\n this.widgetInstance.close()\n }\n else {\n logger.warn('Widget mode does not support close()')\n }\n }\n\n /**\n * Destroy widget and cleanup\n */\n destroy() {\n if (this.app) {\n this.app.unmount()\n this.app = null\n }\n\n if (this.shadowRoot) {\n this.shadowRoot.innerHTML = ''\n this.shadowRoot = null\n }\n\n // For modal mode, remove container from body and remove from singleton map\n if (this.config.mode === 'modal') {\n if (this.container) {\n this.container.remove()\n this.container = null\n }\n\n const instanceKey = this.config.handle || this.config.self?.selfId || 'default'\n FictionWidget.modalInstances.delete(instanceKey)\n }\n\n this.widgetInstance = null\n\n logger.info(`Widget destroyed for handle: ${this.config.handle || this.config.self?.handle}`)\n }\n}\n"],"names":["logger","__name","message","_FictionWidget","config","__publicField","instanceKey","existing","isDev","FictionSDK","styleElement","sdkCSS","mountPoint","mode","SelfWidgetInline","createApp","SelfWidgetPopup","SelfWidgetModal","updates","FictionWidget"],"mappings":";;;;;;+m0NA+BMA,IAAS;AAAA,EACb,MAAM,gBAAAC,EAAA,CAACC,MAAoB,QAAQ,IAAI,oBAAoBA,CAAO,EAAE,GAA9D;AAAA,EACN,OAAO,gBAAAD,EAAA,CAACC,MAAoB,QAAQ,MAAM,oBAAoBA,CAAO,EAAE,GAAhE;AAAA,EACP,MAAM,gBAAAD,EAAA,CAACC,MAAoB,QAAQ,KAAK,oBAAoBA,CAAO,EAAE,GAA/D;AACR,GAEaC,IAAN,MAAMA,EAAc;AAAA,EASzB,YAAYC,GAAsB;AAR1B,IAAAC,EAAA,aAAkB;AAClB,IAAAA,EAAA,oBAAgC;AAChC,IAAAA,EAAA,wBAAwC;AACxC,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA,mBAAgC;AAOtC,QAHA,KAAK,SAASD,GAGV,CAACA,EAAO;AACV,YAAM,IAAI,MAAM,iCAAiC;AACnD,QAAI,CAACA,EAAO,UAAU,CAACA,EAAO;AAC5B,YAAM,IAAI,MAAM,kDAAkD;AAGpE,QAAIA,EAAO,SAAS,WAAW,CAACA,EAAO;AACrC,YAAM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K,mBAAmB,OAAO,KAAKkB,CAAO,EAAE,KAAK,IAAI,CAAC,EAAE,KAGhElB,EAAO,KAAK,2CAA2C;AAAA,EAE3D;AAAA;AAAA;AAAA;AAAA,EAKA,SAAS;AACP,IAAI,KAAK,gBAAgB,SACvB,KAAK,eAAe,OAAA,IAGpBA,EAAO,KAAK,uCAAuC;AAAA,EAEvD;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO;AACL,IAAI,KAAK,gBAAgB,OACvB,KAAK,eAAe,KAAA,IAGpBA,EAAO,KAAK,qCAAqC;AAAA,EAErD;AAAA;AAAA;AAAA;AAAA,EAKA,QAAQ;AACN,IAAI,KAAK,gBAAgB,QACvB,KAAK,eAAe,MAAA,IAGpBA,EAAO,KAAK,sCAAsC;AAAA,EAEtD;AAAA;AAAA;AAAA;AAAA,EAKA,UAAU;AAYR,QAXI,KAAK,QACP,KAAK,IAAI,QAAA,GACT,KAAK,MAAM,OAGT,KAAK,eACP,KAAK,WAAW,YAAY,IAC5B,KAAK,aAAa,OAIhB,KAAK,OAAO,SAAS,SAAS;AAChC,MAAI,KAAK,cACP,KAAK,UAAU,OAAA,GACf,KAAK,YAAY;AAGnB,YAAMM,IAAc,KAAK,OAAO,UAAU,KAAK,OAAO,MAAM,UAAU;AACtE,MAAAH,EAAc,eAAe,OAAOG,CAAW;AAAA,IACjD;AAEA,SAAK,iBAAiB,MAEtBN,EAAO,KAAK,gCAAgC,KAAK,OAAO,UAAU,KAAK,OAAO,MAAM,MAAM,EAAE;AAAA,EAC9F;AACF;AA5M2BC,EAAAE,GAAA,kBAOzBE,EAPWF,GAOI,kBAAiB,oBAAI,IAAA;AAP/B,IAAMgB,IAANhB;"}
|
|
1
|
+
{"version":3,"file":"widget.js","sources":["../widget/FictionWidget.ts"],"sourcesContent":["import type { App, ComponentPublicInstance } from 'vue'\nimport type { Self } from '@fiction/types'\nimport { FictionSDK } from '../sdkClient'\nimport sdkCSS from '../self/ui/styles.css?inline'\nimport { createApp } from 'vue'\n\ntype WidgetMode = 'inline' | 'popup' | 'modal'\n\nexport interface WidgetConfig {\n el?: HTMLElement // Optional for modal mode (creates and appends to body)\n mode: WidgetMode\n handle?: string\n self?: Self\n context?: string\n firstMessage?: string\n apiBase?: string\n onClose?: () => void // Callback when widget is closed (modal/popup modes)\n}\n\nexport interface WidgetUpdate {\n self?: Self\n context?: string\n firstMessage?: string\n}\n\ntype WidgetInstance = {\n toggle?: () => void\n open?: () => void\n close?: () => void\n update?: (config: WidgetUpdate) => void\n} & ComponentPublicInstance\n\nconst logger = {\n info: (message: string) => console.log(`[Fiction Widget] ${message}`),\n error: (message: string) => console.error(`[Fiction Widget] ${message}`),\n warn: (message: string) => console.warn(`[Fiction Widget] ${message}`),\n}\n\nexport class FictionWidget {\n private app: App | null = null\n private shadowRoot: ShadowRoot | null = null\n private widgetInstance: WidgetInstance | null = null\n private config: WidgetConfig\n private sdk: FictionSDK\n private container: HTMLElement | null = null\n private static modalInstances = new Map<string, FictionWidget>()\n\n constructor(config: WidgetConfig) {\n this.config = config\n\n // Validate required config\n if (!config.mode)\n throw new Error('FictionWidget: mode is required')\n if (!config.handle && !config.self)\n throw new Error('FictionWidget: either handle or self is required')\n\n // For non-modal modes, el is required\n if (config.mode !== 'modal' && !config.el)\n throw new Error(`FictionWidget: el (HTMLElement) is required for ${config.mode} mode`)\n\n // For modal mode, handle singleton pattern\n if (config.mode === 'modal') {\n const instanceKey = config.handle || config.self?.selfId || 'default'\n const existing = FictionWidget.modalInstances.get(instanceKey)\n if (existing) {\n logger.warn(`Destroying existing modal widget for: ${instanceKey}`)\n existing.destroy()\n }\n FictionWidget.modalInstances.set(instanceKey, this)\n }\n\n // Create SDK instance\n const isDev = typeof window !== 'undefined'\n ? window.location.hostname === 'localhost' || window.location.hostname.includes('127.0.0.1')\n : false\n\n this.sdk = new FictionSDK({\n isDev,\n apiBase: config.apiBase,\n })\n\n logger.info(`Initializing ${config.mode} mode for @${config.handle || config.self?.handle} (isDev: ${isDev})`)\n\n this.init()\n }\n\n private async init() {\n // For modal mode, create container and append to body\n if (this.config.mode === 'modal') {\n this.container = document.createElement('div')\n this.container.id = `fiction-modal-${this.config.handle || this.config.self?.selfId || 'widget'}`\n document.body.appendChild(this.container)\n\n // Create shadow root in modal container\n this.shadowRoot = this.container.attachShadow({ mode: 'open' })\n }\n else {\n // For other modes, use provided element\n this.shadowRoot = this.config.el!.attachShadow({ mode: 'open' })\n }\n\n // Inject SDK CSS into shadow DOM\n const styleElement = document.createElement('style')\n styleElement.textContent = sdkCSS\n this.shadowRoot.appendChild(styleElement)\n\n // Create mount point\n const mountPoint = document.createElement('div')\n mountPoint.id = 'fiction-widget-root'\n mountPoint.style.cssText = 'width: 100%; height: 100%;'\n this.shadowRoot.appendChild(mountPoint)\n\n // Import and mount mode-specific component\n await this.mountMode(mountPoint)\n }\n\n private async mountMode(mountPoint: HTMLElement) {\n const { mode } = this.config\n\n if (mode === 'inline') {\n const { default: SelfWidgetInline } = await import('./ui/SelfWidgetInline.vue')\n\n this.app = createApp(SelfWidgetInline, {\n sdk: this.sdk,\n handle: this.config.handle,\n self: this.config.self,\n context: this.config.context,\n firstMessage: this.config.firstMessage,\n })\n\n this.widgetInstance = this.app.mount(mountPoint) as WidgetInstance\n }\n else if (mode === 'popup') {\n const { default: SelfWidgetPopup } = await import('./ui/SelfWidgetPopup.vue')\n\n this.app = createApp(SelfWidgetPopup, {\n sdk: this.sdk,\n handle: this.config.handle,\n self: this.config.self,\n context: this.config.context,\n firstMessage: this.config.firstMessage,\n position: 'bottom-right', // Default position for popup\n })\n\n this.widgetInstance = this.app.mount(mountPoint) as WidgetInstance\n }\n else if (mode === 'modal') {\n const { default: SelfWidgetModal } = await import('./ui/SelfWidgetModal.vue')\n\n this.app = createApp(SelfWidgetModal, {\n sdk: this.sdk,\n handle: this.config.handle,\n self: this.config.self,\n context: this.config.context,\n firstMessage: this.config.firstMessage,\n onClose: () => {\n // Call user's onClose callback if provided\n if (this.config.onClose) {\n this.config.onClose()\n }\n // Auto-destroy modal when closed\n this.destroy()\n },\n })\n\n this.widgetInstance = this.app.mount(mountPoint) as WidgetInstance\n }\n else {\n throw new Error(`FictionWidget: unsupported mode \"${mode}\"`)\n }\n }\n\n /**\n * Update widget with new configuration without re-mounting\n */\n update(updates: WidgetUpdate) {\n if (this.widgetInstance?.update) {\n this.widgetInstance.update(updates)\n logger.info(`Widget updated: ${Object.keys(updates).join(', ')}`)\n }\n else {\n logger.warn('Widget instance does not support update()')\n }\n }\n\n /**\n * Toggle widget visibility (popup mode only)\n */\n toggle() {\n if (this.widgetInstance?.toggle) {\n this.widgetInstance.toggle()\n }\n else {\n logger.warn('Widget mode does not support toggle()')\n }\n }\n\n /**\n * Open widget (popup mode only)\n */\n open() {\n if (this.widgetInstance?.open) {\n this.widgetInstance.open()\n }\n else {\n logger.warn('Widget mode does not support open()')\n }\n }\n\n /**\n * Close widget (popup mode only)\n */\n close() {\n if (this.widgetInstance?.close) {\n this.widgetInstance.close()\n }\n else {\n logger.warn('Widget mode does not support close()')\n }\n }\n\n /**\n * Destroy widget and cleanup\n */\n destroy() {\n if (this.app) {\n this.app.unmount()\n this.app = null\n }\n\n if (this.shadowRoot) {\n this.shadowRoot.innerHTML = ''\n this.shadowRoot = null\n }\n\n // For modal mode, remove container from body and remove from singleton map\n if (this.config.mode === 'modal') {\n if (this.container) {\n this.container.remove()\n this.container = null\n }\n\n const instanceKey = this.config.handle || this.config.self?.selfId || 'default'\n FictionWidget.modalInstances.delete(instanceKey)\n }\n\n this.widgetInstance = null\n\n logger.info(`Widget destroyed for handle: ${this.config.handle || this.config.self?.handle}`)\n }\n}\n"],"names":["logger","__name","message","_FictionWidget","config","__publicField","instanceKey","existing","isDev","FictionSDK","styleElement","sdkCSS","mountPoint","mode","SelfWidgetInline","createApp","SelfWidgetPopup","SelfWidgetModal","updates","FictionWidget"],"mappings":";;;;;;+m0NAgCMA,IAAS;AAAA,EACb,MAAM,gBAAAC,EAAA,CAACC,MAAoB,QAAQ,I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AAAA;AAAA;AAAA,EAKA,UAAU;AAYR,QAXI,KAAK,QACP,KAAK,IAAI,QAAA,GACT,KAAK,MAAM,OAGT,KAAK,eACP,KAAK,WAAW,YAAY,IAC5B,KAAK,aAAa,OAIhB,KAAK,OAAO,SAAS,SAAS;AAChC,MAAI,KAAK,cACP,KAAK,UAAU,OAAA,GACf,KAAK,YAAY;AAGnB,YAAMM,IAAc,KAAK,OAAO,UAAU,KAAK,OAAO,MAAM,UAAU;AACtE,MAAAH,EAAc,eAAe,OAAOG,CAAW;AAAA,IACjD;AAEA,SAAK,iBAAiB,MAEtBN,EAAO,KAAK,gCAAgC,KAAK,OAAO,UAAU,KAAK,OAAO,MAAM,MAAM,EAAE;AAAA,EAC9F;AACF;AApN2BC,EAAAE,GAAA,kBAOzBE,EAPWF,GAOI,kBAAiB,oBAAI,IAAA;AAP/B,IAAMgB,IAANhB;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiction/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "SDK for Fiction app authentication and user management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/sdk.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"nanoid": "^5.1.6",
|
|
60
60
|
"nanostores": "^1.0.1",
|
|
61
61
|
"zod": "^4.1.12",
|
|
62
|
-
"@fiction/types": "1.0.
|
|
62
|
+
"@fiction/types": "1.0.13"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@antfu/eslint-config": "^5.4.1",
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
var x = Object.defineProperty;
|
|
2
|
-
var o = (s, n) => x(s, "name", { value: n, configurable: !0 });
|
|
3
|
-
import { defineComponent as h, ref as l, createBlock as g, openBlock as p, withCtx as _, createVNode as k } from "vue";
|
|
4
|
-
import { _ as M } from "./FModal.vue_vue_type_script_setup_true_lang-DaI-YWPp.js";
|
|
5
|
-
import { _ as C } from "./SelfProvider.vue_vue_type_script_setup_true_lang-hdOg9n4q.js";
|
|
6
|
-
const V = /* @__PURE__ */ h({
|
|
7
|
-
__name: "SelfWidgetModal",
|
|
8
|
-
props: {
|
|
9
|
-
sdk: {},
|
|
10
|
-
handle: {},
|
|
11
|
-
self: {},
|
|
12
|
-
context: {},
|
|
13
|
-
firstMessage: {}
|
|
14
|
-
},
|
|
15
|
-
setup(s, { expose: n }) {
|
|
16
|
-
const a = s, i = l(a.self), r = l(a.context), c = l(a.firstMessage), t = l(!0);
|
|
17
|
-
function d(e) {
|
|
18
|
-
e.self !== void 0 && (i.value = e.self), e.context !== void 0 && (r.value = e.context), e.firstMessage !== void 0 && (c.value = e.firstMessage);
|
|
19
|
-
}
|
|
20
|
-
o(d, "update");
|
|
21
|
-
function f() {
|
|
22
|
-
t.value = !1;
|
|
23
|
-
}
|
|
24
|
-
o(f, "close");
|
|
25
|
-
function v() {
|
|
26
|
-
t.value = !0;
|
|
27
|
-
}
|
|
28
|
-
return o(v, "open"), n({ update: d, close: f, open: v }), (e, u) => (p(), g(M, {
|
|
29
|
-
vis: t.value,
|
|
30
|
-
"disable-teleport": !0,
|
|
31
|
-
"modal-class": "max-w-4xl h-[80vh] md:h-[600px]",
|
|
32
|
-
"has-close": !1,
|
|
33
|
-
"onUpdate:vis": u[0] || (u[0] = (m) => t.value = m),
|
|
34
|
-
onClose: f
|
|
35
|
-
}, {
|
|
36
|
-
default: _(() => [
|
|
37
|
-
k(C, {
|
|
38
|
-
sdk: s.sdk,
|
|
39
|
-
handle: s.handle,
|
|
40
|
-
self: i.value,
|
|
41
|
-
context: r.value,
|
|
42
|
-
"first-message": c.value,
|
|
43
|
-
"has-close": !0,
|
|
44
|
-
onClose: f
|
|
45
|
-
}, null, 8, ["sdk", "handle", "self", "context", "first-message"])
|
|
46
|
-
]),
|
|
47
|
-
_: 1
|
|
48
|
-
}, 8, ["vis"]));
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
export {
|
|
52
|
-
V as default
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=SelfWidgetModal-BelgsGqF.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelfWidgetModal-BelgsGqF.js","sources":["../self/ui/SelfWidgetModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { FictionSDK } from '../../sdkClient'\nimport type { Self } from '@fiction/types'\nimport { ref } from 'vue'\nimport FModal from '@/ui/common/FModal.vue'\nimport SelfProvider from './SelfProvider.vue'\n\nexport interface WidgetUpdate {\n self?: Self\n context?: string\n firstMessage?: string\n}\n\nconst props = defineProps<{\n sdk?: FictionSDK\n handle?: string\n self?: Self\n context?: string\n firstMessage?: string\n}>()\n\nconst currentSelf = ref<Self | undefined>(props.self)\nconst currentContext = ref<string | undefined>(props.context)\nconst currentFirstMessage = ref<string | undefined>(props.firstMessage)\nconst isVisible = ref(true)\n\nfunction update(updates: WidgetUpdate) {\n if (updates.self !== undefined)\n currentSelf.value = updates.self\n if (updates.context !== undefined)\n currentContext.value = updates.context\n if (updates.firstMessage !== undefined)\n currentFirstMessage.value = updates.firstMessage\n}\n\nfunction close() {\n isVisible.value = false\n}\n\nfunction open() {\n isVisible.value = true\n}\n\ndefineExpose({ update, close, open })\n</script>\n\n<template>\n <FModal\n :vis=\"isVisible\"\n :disable-teleport=\"true\"\n modal-class=\"max-w-4xl h-[80vh] md:h-[600px]\"\n :has-close=\"false\"\n @update:vis=\"isVisible = $event\"\n @close=\"close\"\n >\n <SelfProvider\n :sdk=\"sdk\"\n :handle=\"handle\"\n :self=\"currentSelf\"\n :context=\"currentContext\"\n :first-message=\"currentFirstMessage\"\n :has-close=\"true\"\n @close=\"close\"\n />\n </FModal>\n</template>\n"],"names":["props","__props","currentSelf","ref","currentContext","currentFirstMessage","isVisible","update","updates","__name","close","open","__expose","_createBlock","FModal","_cache","$event","_createVNode","SelfProvider"],"mappings":";;;;;;;;;;;;;;;AAaA,UAAMA,IAAQC,GAQRC,IAAcC,EAAsBH,EAAM,IAAI,GAC9CI,IAAiBD,EAAwBH,EAAM,OAAO,GACtDK,IAAsBF,EAAwBH,EAAM,YAAY,GAChEM,IAAYH,EAAI,EAAI;AAE1B,aAASI,EAAOC,GAAuB;AACrC,MAAIA,EAAQ,SAAS,WACnBN,EAAY,QAAQM,EAAQ,OAC1BA,EAAQ,YAAY,WACtBJ,EAAe,QAAQI,EAAQ,UAC7BA,EAAQ,iBAAiB,WAC3BH,EAAoB,QAAQG,EAAQ;AAAA,IACxC;AAPS,IAAAC,EAAAF,GAAA;AAST,aAASG,IAAQ;AACf,MAAAJ,EAAU,QAAQ;AAAA,IACpB;AAFS,IAAAG,EAAAC,GAAA;AAIT,aAASC,IAAO;AACd,MAAAL,EAAU,QAAQ;AAAA,IACpB;AAFS,WAAAG,EAAAE,GAAA,SAITC,EAAa,EAAE,QAAAL,GAAQ,OAAAG,GAAO,MAAAC,EAAA,CAAM,mBAIlCE,EAiBSC,GAAA;AAAA,MAhBN,KAAKR,EAAA;AAAA,MACL,oBAAkB;AAAA,MACnB,eAAY;AAAA,MACX,aAAW;AAAA,MACX,gBAAUS,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEV,EAAA,QAAYU;AAAA,MACxB,SAAON;AAAA,IAAA;iBAER,MAQE;AAAA,QARFO,EAQEC,GAAA;AAAA,UAPC,KAAKjB,EAAA;AAAA,UACL,QAAQA,EAAA;AAAA,UACR,MAAMC,EAAA;AAAA,UACN,SAASE,EAAA;AAAA,UACT,iBAAeC,EAAA;AAAA,UACf,aAAW;AAAA,UACX,SAAOK;AAAA,QAAA;;;;;;"}
|