@mx-sose-front/mx-sose-graph 1.0.4 → 1.0.6
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/index.d.ts +9 -1
- package/dist/index.esm.js +9 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/index.ts +32 -8
- package/src/view/graph.vue +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ComponentProvideOptions } from 'vue';
|
|
|
3
3
|
import { ComputedRef } from 'vue';
|
|
4
4
|
import { DefineComponent } from 'vue';
|
|
5
5
|
import { ExtractPropTypes } from 'vue';
|
|
6
|
+
import { Pinia } from 'pinia';
|
|
6
7
|
import { Plugin as Plugin_2 } from 'vue';
|
|
7
8
|
import { PropType } from 'vue';
|
|
8
9
|
import { PublicProps } from 'vue';
|
|
@@ -160,7 +161,14 @@ y: number;
|
|
|
160
161
|
"onAction-button-add"?: ((shape: Shape) => any) | undefined;
|
|
161
162
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
162
163
|
|
|
163
|
-
|
|
164
|
+
/**
|
|
165
|
+
* 可选的安装参数:允许使用方主动把 pinia 传进来
|
|
166
|
+
*/
|
|
167
|
+
export declare interface MxSoseGraphOptions {
|
|
168
|
+
pinia?: Pinia;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare const MxSoseGraphPlugin: Plugin_2<[MxSoseGraphOptions?]>;
|
|
164
172
|
export { MxSoseGraphPlugin }
|
|
165
173
|
export default MxSoseGraphPlugin;
|
|
166
174
|
|
package/dist/index.esm.js
CHANGED
|
@@ -74057,9 +74057,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
74057
74057
|
},
|
|
74058
74058
|
emits: ["shapes-property", "shapes-edit-name", "connect-end", "action-button-click", "diagramDoubleClick", "model-type-property-id-button-click", "action-button-add", "scale-changed"],
|
|
74059
74059
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
74060
|
-
useCssVars((_ctx) => ({
|
|
74061
|
-
"d9dd4e94": currentScale.value
|
|
74062
|
-
}));
|
|
74063
74060
|
registerShapes({
|
|
74064
74061
|
StrategicTaxonomyDiagram,
|
|
74065
74062
|
ConceptualRole,
|
|
@@ -74353,10 +74350,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
74353
74350
|
};
|
|
74354
74351
|
}
|
|
74355
74352
|
});
|
|
74356
|
-
const
|
|
74357
|
-
const GraphView = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__scopeId", "data-v-
|
|
74353
|
+
const graph_vue_vue_type_style_index_0_scoped_38aa7b74_lang = "";
|
|
74354
|
+
const GraphView = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__scopeId", "data-v-38aa7b74"]]);
|
|
74358
74355
|
const MxSoseGraphPlugin = {
|
|
74359
|
-
install(app) {
|
|
74356
|
+
install(app, options) {
|
|
74357
|
+
const externalPinia = (options == null ? void 0 : options.pinia) || // 优先使用显式传入的
|
|
74358
|
+
app._context.provides.pinia || // Vue3 内部提供的
|
|
74359
|
+
app.config.globalProperties.$pinia;
|
|
74360
|
+
if (externalPinia) {
|
|
74361
|
+
setActivePinia(externalPinia);
|
|
74362
|
+
}
|
|
74360
74363
|
app.component("GraphView", GraphView);
|
|
74361
74364
|
app.use(installer);
|
|
74362
74365
|
}
|