ant-design-x-vue
Version:
Craft AI-driven interfaces effortlessly
32 lines (31 loc) • 753 B
JavaScript
import { shallowRef as b, defineComponent as p, computed as n, provide as i, watch as l, unref as c, triggerRef as a, inject as d } from "vue";
import { objectType as m } from "../_util/type.mjs";
const u = Symbol("BubbleContext"), o = b(), f = (e) => {
i(u, e), l(
e,
() => {
o.value = c(e), a(o);
},
{ immediate: !0, deep: !0 }
);
}, B = () => d(
u,
n(() => o.value || {})
), v = p({
props: {
value: m()
},
setup(e, { slots: t }) {
return f(n(() => e.value)), () => {
var r;
return (r = t.default) == null ? void 0 : r.call(t);
};
}
});
export {
v as BubbleContextProvider,
v as default,
o as globalBubbleContextApi,
B as useBubbleContextInject,
f as useBubbleContextProvider
};