ant-design-x-vue
Version:
Craft AI-driven interfaces effortlessly
32 lines (31 loc) • 803 B
JavaScript
import { shallowRef as u, defineComponent as i, computed as r, provide as a, watch as d, unref as C, triggerRef as p, inject as c } from "vue";
import { objectType as g } from "../_util/type.mjs";
const h = Symbol("ThoughtChainNodeContext"), o = u(), m = (e) => {
a(h, e), d(
e,
() => {
o.value = C(e), p(o);
},
{ immediate: !0, deep: !0 }
);
}, T = () => c(
h,
r(() => o.value || {})
), N = i({
props: {
value: g()
},
setup(e, { slots: t }) {
return m(r(() => e.value)), () => {
var n;
return (n = t.default) == null ? void 0 : n.call(t);
};
}
});
export {
N as ThoughtChainNodeContextProvider,
N as default,
o as globalThoughtChainNodeContextApi,
T as useThoughtChainNodeContextInject,
m as useThoughtChainNodeContextProvider
};