@thxgg/steward 0.1.13 → 0.1.15

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.
Files changed (88) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/-k8zG74W.js +61 -0
  3. package/.output/public/_nuxt/B-5VWizU.js +1 -0
  4. package/.output/public/_nuxt/{Bq6edYSd.js → BDqHART1.js} +1 -1
  5. package/.output/public/_nuxt/BMAq0QVD.js +42 -0
  6. package/.output/public/_nuxt/BPeTf9dd.js +1 -0
  7. package/.output/public/_nuxt/{dOaEkD-3.js → BubpH_wW.js} +1 -1
  8. package/.output/public/_nuxt/C2HGkiSP.js +1 -0
  9. package/.output/public/_nuxt/CMu9GKTH.js +4 -0
  10. package/.output/public/_nuxt/{BZ1iIOYp.js → CVvrkZkq.js} +1 -1
  11. package/.output/public/_nuxt/C_NevjZD.js +3 -0
  12. package/.output/public/_nuxt/Detail.CzXXlavD.css +1 -0
  13. package/.output/public/_nuxt/_prd_.KTotLoF_.css +1 -0
  14. package/.output/public/_nuxt/builds/latest.json +1 -1
  15. package/.output/public/_nuxt/builds/meta/c1a7997d-8d53-4718-ad03-a977e05e2523.json +1 -0
  16. package/.output/public/_nuxt/entry.LcDOtJnR.css +1 -0
  17. package/.output/public/_nuxt/{BFv4l3hn.js → nYTZJhvT.js} +1 -1
  18. package/.output/public/_nuxt/{kTT8NKtq.js → qKRNa41x.js} +1 -1
  19. package/.output/public/_nuxt/qt5OEWHC.js +1 -0
  20. package/.output/public/_nuxt/{C897Egk9.js → uTyw4SRK.js} +1 -1
  21. package/.output/public/_nuxt/{DoNqd8jQ.js → wbj-mIhK.js} +1 -1
  22. package/.output/server/chunks/_/task-graph.mjs +196 -0
  23. package/.output/server/chunks/_/task-graph.mjs.map +1 -0
  24. package/.output/server/chunks/build/{_prd_-CkKfJB6U.mjs → Detail-DC-KJQ1f.mjs} +911 -1688
  25. package/.output/server/chunks/build/Detail-DC-KJQ1f.mjs.map +1 -0
  26. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-D0sb4vsK.mjs +4 -0
  27. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-D0sb4vsK.mjs.map +1 -0
  28. package/.output/server/chunks/build/DiffViewer-styles.CkSjCQ0r.mjs +10 -0
  29. package/.output/server/chunks/build/DiffViewer-styles.CkSjCQ0r.mjs.map +1 -0
  30. package/.output/server/chunks/build/DiffViewer-styles.FJJuYjYB.mjs +8 -0
  31. package/.output/server/chunks/build/DiffViewer-styles.FJJuYjYB.mjs.map +1 -0
  32. package/.output/server/chunks/build/_prd_-C1C4GAhW.mjs +1596 -0
  33. package/.output/server/chunks/build/_prd_-C1C4GAhW.mjs.map +1 -0
  34. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  35. package/.output/server/chunks/build/{default-B5nw9_Xg.mjs → default-DWCOHHTE.mjs} +32 -20
  36. package/.output/server/chunks/build/default-DWCOHHTE.mjs.map +1 -0
  37. package/.output/server/chunks/build/{index-CTpuP9Mj.mjs → index-CckL_NBD.mjs} +2 -2
  38. package/.output/server/chunks/build/index-CckL_NBD.mjs.map +1 -0
  39. package/.output/server/chunks/build/{index-D21S97KB.mjs → index-QVeSHT3L.mjs} +3 -3
  40. package/.output/server/chunks/build/index-QVeSHT3L.mjs.map +1 -0
  41. package/.output/server/chunks/build/repo-graph-CTEkxiYd.mjs +205 -0
  42. package/.output/server/chunks/build/repo-graph-CTEkxiYd.mjs.map +1 -0
  43. package/.output/server/chunks/build/server.mjs +12 -3
  44. package/.output/server/chunks/build/styles.mjs +2 -2
  45. package/.output/server/chunks/build/{usePrd-YhvN6Ary.mjs → usePrd-SqcxGyFU.mjs} +20 -2
  46. package/.output/server/chunks/build/usePrd-SqcxGyFU.mjs.map +1 -0
  47. package/.output/server/chunks/nitro/nitro.mjs +620 -588
  48. package/.output/server/chunks/routes/api/repos/_repoId/graph.get.mjs +41 -0
  49. package/.output/server/chunks/routes/api/repos/_repoId/graph.get.mjs.map +1 -0
  50. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/graph.get.mjs +42 -0
  51. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/graph.get.mjs.map +1 -0
  52. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/progress.get.mjs +1 -1
  53. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/tasks/_taskId/commits.get.mjs +1 -1
  54. package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/tasks.get.mjs +1 -1
  55. package/.output/server/chunks/routes/api/repos/_repoId/prds.get.mjs +1 -1
  56. package/.output/server/node_modules/@vue-flow/background/dist/vue-flow-background.mjs +126 -0
  57. package/.output/server/node_modules/@vue-flow/background/package.json +73 -0
  58. package/.output/server/node_modules/@vue-flow/controls/dist/vue-flow-controls.mjs +207 -0
  59. package/.output/server/node_modules/@vue-flow/controls/package.json +77 -0
  60. package/.output/server/node_modules/@vue-flow/core/dist/vue-flow-core.mjs +10186 -0
  61. package/.output/server/node_modules/@vue-flow/core/package.json +95 -0
  62. package/.output/server/package.json +4 -1
  63. package/README.md +10 -1
  64. package/dist/app/types/graph.js +1 -0
  65. package/dist/host/src/mcp.js +2 -0
  66. package/dist/host/src/prompts.js +127 -0
  67. package/dist/server/utils/task-graph.js +190 -0
  68. package/docs/MCP.md +13 -1
  69. package/package.json +5 -1
  70. package/.output/public/_nuxt/BuQdImno.js +0 -1
  71. package/.output/public/_nuxt/CMUOpExW.js +0 -3
  72. package/.output/public/_nuxt/DE885CbX.js +0 -1
  73. package/.output/public/_nuxt/DomrzX-T.js +0 -76
  74. package/.output/public/_nuxt/R2cvz8mH.js +0 -4
  75. package/.output/public/_nuxt/_prd_.DYvuV73Q.css +0 -1
  76. package/.output/public/_nuxt/builds/meta/2ad99048-24f9-4cf6-8622-6c088fe0a244.json +0 -1
  77. package/.output/public/_nuxt/entry.Dk19PK4d.css +0 -1
  78. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-ZdBUa15f.mjs +0 -4
  79. package/.output/server/chunks/build/DiffViewer-styles-1.mjs-ZdBUa15f.mjs.map +0 -1
  80. package/.output/server/chunks/build/DiffViewer-styles.CoMVrk_N.mjs +0 -8
  81. package/.output/server/chunks/build/DiffViewer-styles.CoMVrk_N.mjs.map +0 -1
  82. package/.output/server/chunks/build/DiffViewer-styles.cLfMOdMh.mjs +0 -10
  83. package/.output/server/chunks/build/DiffViewer-styles.cLfMOdMh.mjs.map +0 -1
  84. package/.output/server/chunks/build/_prd_-CkKfJB6U.mjs.map +0 -1
  85. package/.output/server/chunks/build/default-B5nw9_Xg.mjs.map +0 -1
  86. package/.output/server/chunks/build/index-CTpuP9Mj.mjs.map +0 -1
  87. package/.output/server/chunks/build/index-D21S97KB.mjs.map +0 -1
  88. package/.output/server/chunks/build/usePrd-YhvN6Ary.mjs.map +0 -1
@@ -0,0 +1,41 @@
1
+ import { d as defineEventHandler, a as getRouterParam, c as createError, b as getRepos } from '../../../../nitro/nitro.mjs';
2
+ import { b as buildRepoGraph } from '../../../../_/task-graph.mjs';
3
+ import 'node:http';
4
+ import 'node:https';
5
+ import 'node:events';
6
+ import 'node:buffer';
7
+ import 'node:fs';
8
+ import 'node:path';
9
+ import 'node:crypto';
10
+ import 'node:os';
11
+ import 'node:url';
12
+
13
+ const graph_get = defineEventHandler(async (event) => {
14
+ const repoId = getRouterParam(event, "repoId");
15
+ if (!repoId) {
16
+ throw createError({
17
+ statusCode: 400,
18
+ statusMessage: "Repository ID is required"
19
+ });
20
+ }
21
+ const repos = await getRepos();
22
+ const repo = repos.find((entry) => entry.id === repoId);
23
+ if (!repo) {
24
+ throw createError({
25
+ statusCode: 404,
26
+ statusMessage: "Repository not found"
27
+ });
28
+ }
29
+ try {
30
+ return await buildRepoGraph(repo);
31
+ } catch (error) {
32
+ throw createError({
33
+ statusCode: 500,
34
+ statusMessage: "Failed to build repository graph",
35
+ message: error.message.replace(/\s+/g, " ").trim()
36
+ });
37
+ }
38
+ });
39
+
40
+ export { graph_get as default };
41
+ //# sourceMappingURL=graph.get.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.get.mjs","sources":["../../../../../../../server/api/repos/[repoId]/graph.get.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,kBAAA,kBAAA,CAAA,OAAA,KAAA,KAAA;AACA,EAAA,MAAA,MAAA,GAAA,cAAA,CAAA,KAAA,EAAA,QAAA,CAAA;AAEA,EAAA,IAAA,CAAA,MAAA,EAAA;AACA,IAAA,MAAA,WAAA,CAAA;AAAA,MACA,UAAA,EAAA,GAAA;AAAA,MACA,aAAA,EAAA;AAAA,KACA,CAAA;AAAA,EACA;AAEA,EAAA,MAAA,KAAA,GAAA,MAAA,QAAA,EAAA;AACA,EAAA,MAAA,OAAA,KAAA,CAAA,IAAA,CAAA,CAAA,KAAA,KAAA,KAAA,CAAA,OAAA,MAAA,CAAA;AAEA,EAAA,IAAA,CAAA,IAAA,EAAA;AACA,IAAA,MAAA,WAAA,CAAA;AAAA,MACA,UAAA,EAAA,GAAA;AAAA,MACA,aAAA,EAAA;AAAA,KACA,CAAA;AAAA,EACA;AAEA,EAAA,IAAA;AACA,IAAA,OAAA,MAAA,eAAA,IAAA,CAAA;AAAA,EACA,SAAA,KAAA,EAAA;AACA,IAAA,MAAA,WAAA,CAAA;AAAA,MACA,UAAA,EAAA,GAAA;AAAA,MACA,aAAA,EAAA,kCAAA;AAAA,MACA,SAAA,KAAA,CAAA,OAAA,CAAA,QAAA,MAAA,EAAA,GAAA,EAAA,IAAA;AAAA,KACA,CAAA;AAAA,EACA;AACA,CAAA,CAAA;;;;"}
@@ -0,0 +1,42 @@
1
+ import { d as defineEventHandler, a as getRouterParam, c as createError, b as getRepos } from '../../../../../../nitro/nitro.mjs';
2
+ import { a as buildPrdGraph } from '../../../../../../_/task-graph.mjs';
3
+ import 'node:http';
4
+ import 'node:https';
5
+ import 'node:events';
6
+ import 'node:buffer';
7
+ import 'node:fs';
8
+ import 'node:path';
9
+ import 'node:crypto';
10
+ import 'node:os';
11
+ import 'node:url';
12
+
13
+ const graph_get = defineEventHandler(async (event) => {
14
+ const repoId = getRouterParam(event, "repoId");
15
+ const prdSlug = getRouterParam(event, "prdSlug");
16
+ if (!repoId || !prdSlug) {
17
+ throw createError({
18
+ statusCode: 400,
19
+ statusMessage: "Repository ID and PRD slug are required"
20
+ });
21
+ }
22
+ const repos = await getRepos();
23
+ const repo = repos.find((entry) => entry.id === repoId);
24
+ if (!repo) {
25
+ throw createError({
26
+ statusCode: 404,
27
+ statusMessage: "Repository not found"
28
+ });
29
+ }
30
+ try {
31
+ return await buildPrdGraph(repo, prdSlug);
32
+ } catch (error) {
33
+ throw createError({
34
+ statusCode: 500,
35
+ statusMessage: "Failed to build PRD graph",
36
+ message: error.message.replace(/\s+/g, " ").trim()
37
+ });
38
+ }
39
+ });
40
+
41
+ export { graph_get as default };
42
+ //# sourceMappingURL=graph.get.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.get.mjs","sources":["../../../../../../../../../server/api/repos/[repoId]/prd/[prdSlug]/graph.get.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,kBAAA,kBAAA,CAAA,OAAA,KAAA,KAAA;AACA,EAAA,MAAA,MAAA,GAAA,cAAA,CAAA,KAAA,EAAA,QAAA,CAAA;AACA,EAAA,MAAA,OAAA,GAAA,cAAA,CAAA,KAAA,EAAA,SAAA,CAAA;AAEA,EAAA,IAAA,CAAA,MAAA,IAAA,CAAA,OAAA,EAAA;AACA,IAAA,MAAA,WAAA,CAAA;AAAA,MACA,UAAA,EAAA,GAAA;AAAA,MACA,aAAA,EAAA;AAAA,KACA,CAAA;AAAA,EACA;AAEA,EAAA,MAAA,KAAA,GAAA,MAAA,QAAA,EAAA;AACA,EAAA,MAAA,OAAA,KAAA,CAAA,IAAA,CAAA,CAAA,KAAA,KAAA,KAAA,CAAA,OAAA,MAAA,CAAA;AAEA,EAAA,IAAA,CAAA,IAAA,EAAA;AACA,IAAA,MAAA,WAAA,CAAA;AAAA,MACA,UAAA,EAAA,GAAA;AAAA,MACA,aAAA,EAAA;AAAA,KACA,CAAA;AAAA,EACA;AAEA,EAAA,IAAA;AACA,IAAA,OAAA,MAAA,aAAA,CAAA,IAAA,EAAA,OAAA,CAAA;AAAA,EACA,SAAA,KAAA,EAAA;AACA,IAAA,MAAA,WAAA,CAAA;AAAA,MACA,UAAA,EAAA,GAAA;AAAA,MACA,aAAA,EAAA,2BAAA;AAAA,MACA,SAAA,KAAA,CAAA,OAAA,CAAA,QAAA,MAAA,EAAA,GAAA,EAAA,IAAA;AAAA,KACA,CAAA;AAAA,EACA;AACA,CAAA,CAAA;;;;"}
@@ -1,4 +1,4 @@
1
- import { d as defineEventHandler, a as getRouterParam, c as createError, b as getRepos, m as migrateLegacyStateForRepo, f as getPrdState } from '../../../../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, a as getRouterParam, c as createError, b as getRepos, m as migrateLegacyStateForRepo, h as getPrdState } from '../../../../../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:events';
@@ -1,4 +1,4 @@
1
- import { d as defineEventHandler, a as getRouterParam, c as createError, b as getRepos, m as migrateLegacyStateForRepo, f as getPrdState, e as discoverGitRepos, s as saveRepos } from '../../../../../../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, a as getRouterParam, c as createError, b as getRepos, m as migrateLegacyStateForRepo, h as getPrdState, e as discoverGitRepos, s as saveRepos } from '../../../../../../../../nitro/nitro.mjs';
2
2
  import { r as resolveCommitRepo } from '../../../../../../../../_/git.mjs';
3
3
  import 'node:http';
4
4
  import 'node:https';
@@ -1,4 +1,4 @@
1
- import { d as defineEventHandler, a as getRouterParam, c as createError, b as getRepos, m as migrateLegacyStateForRepo, f as getPrdState } from '../../../../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, a as getRouterParam, c as createError, b as getRepos, m as migrateLegacyStateForRepo, h as getPrdState } from '../../../../../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:events';
@@ -1,4 +1,4 @@
1
- import { d as defineEventHandler, a as getRouterParam, c as createError, b as getRepos, m as migrateLegacyStateForRepo, h as getPrdStateSummaries } from '../../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, a as getRouterParam, c as createError, b as getRepos, m as migrateLegacyStateForRepo, f as getPrdStateSummaries } from '../../../../nitro/nitro.mjs';
2
2
  import { promises } from 'node:fs';
3
3
  import { join, basename } from 'node:path';
4
4
  import 'node:http';
@@ -0,0 +1,126 @@
1
+ import { h, defineComponent, computed, toRef, openBlock, createElementBlock, normalizeStyle, renderSlot, createElementVNode, unref, createBlock, createCommentVNode } from "vue";
2
+ import { useVueFlow } from "@vue-flow/core";
3
+ var BackgroundVariant = /* @__PURE__ */ ((BackgroundVariant2) => {
4
+ BackgroundVariant2["Lines"] = "lines";
5
+ BackgroundVariant2["Dots"] = "dots";
6
+ return BackgroundVariant2;
7
+ })(BackgroundVariant || {});
8
+ const LinePattern = function({ dimensions, size, color }) {
9
+ return h("path", {
10
+ "stroke": color,
11
+ "stroke-width": size,
12
+ "d": `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}`
13
+ });
14
+ };
15
+ const DotPattern = function({ radius, color }) {
16
+ return h("circle", { cx: radius, cy: radius, r: radius, fill: color });
17
+ };
18
+ ({
19
+ [BackgroundVariant.Lines]: LinePattern,
20
+ [BackgroundVariant.Dots]: DotPattern
21
+ });
22
+ const DefaultBgColors = {
23
+ [BackgroundVariant.Dots]: "#81818a",
24
+ [BackgroundVariant.Lines]: "#eee"
25
+ };
26
+ const _hoisted_1 = ["id", "x", "y", "width", "height", "patternTransform"];
27
+ const _hoisted_2 = {
28
+ key: 2,
29
+ height: "100",
30
+ width: "100"
31
+ };
32
+ const _hoisted_3 = ["fill"];
33
+ const _hoisted_4 = ["x", "y", "fill"];
34
+ const __default__ = {
35
+ name: "Background",
36
+ compatConfig: { MODE: 3 }
37
+ };
38
+ const _sfc_main = /* @__PURE__ */ defineComponent({
39
+ ...__default__,
40
+ props: {
41
+ id: {},
42
+ variant: { default: () => BackgroundVariant.Dots },
43
+ gap: { default: 20 },
44
+ size: { default: 1 },
45
+ lineWidth: { default: 1 },
46
+ patternColor: {},
47
+ color: {},
48
+ bgColor: {},
49
+ height: { default: 100 },
50
+ width: { default: 100 },
51
+ x: { default: 0 },
52
+ y: { default: 0 },
53
+ offset: { default: 0 }
54
+ },
55
+ setup(__props) {
56
+ const { id: vueFlowId, viewport } = useVueFlow();
57
+ const background = computed(() => {
58
+ const zoom = viewport.value.zoom;
59
+ const [gapX, gapY] = Array.isArray(__props.gap) ? __props.gap : [__props.gap, __props.gap];
60
+ const scaledGap = [gapX * zoom || 1, gapY * zoom || 1];
61
+ const scaledSize = __props.size * zoom;
62
+ const [offsetX, offsetY] = Array.isArray(__props.offset) ? __props.offset : [__props.offset, __props.offset];
63
+ const scaledOffset = [offsetX * zoom || 1 + scaledGap[0] / 2, offsetY * zoom || 1 + scaledGap[1] / 2];
64
+ return {
65
+ scaledGap,
66
+ offset: scaledOffset,
67
+ size: scaledSize
68
+ };
69
+ });
70
+ const patternId = toRef(() => `pattern-${vueFlowId}${__props.id ? `-${__props.id}` : ""}`);
71
+ const patternColor = toRef(() => __props.color || __props.patternColor || DefaultBgColors[__props.variant || BackgroundVariant.Dots]);
72
+ return (_ctx, _cache) => {
73
+ return openBlock(), createElementBlock("svg", {
74
+ class: "vue-flow__background vue-flow__container",
75
+ style: normalizeStyle({
76
+ height: `${_ctx.height > 100 ? 100 : _ctx.height}%`,
77
+ width: `${_ctx.width > 100 ? 100 : _ctx.width}%`
78
+ })
79
+ }, [
80
+ renderSlot(_ctx.$slots, "pattern-container", { id: patternId.value }, () => [
81
+ createElementVNode("pattern", {
82
+ id: patternId.value,
83
+ x: unref(viewport).x % background.value.scaledGap[0],
84
+ y: unref(viewport).y % background.value.scaledGap[1],
85
+ width: background.value.scaledGap[0],
86
+ height: background.value.scaledGap[1],
87
+ patternTransform: `translate(-${background.value.offset[0]},-${background.value.offset[1]})`,
88
+ patternUnits: "userSpaceOnUse"
89
+ }, [
90
+ renderSlot(_ctx.$slots, "pattern", {}, () => [
91
+ _ctx.variant === unref(BackgroundVariant).Lines ? (openBlock(), createBlock(unref(LinePattern), {
92
+ key: 0,
93
+ size: _ctx.lineWidth,
94
+ color: patternColor.value,
95
+ dimensions: background.value.scaledGap
96
+ }, null, 8, ["size", "color", "dimensions"])) : _ctx.variant === unref(BackgroundVariant).Dots ? (openBlock(), createBlock(unref(DotPattern), {
97
+ key: 1,
98
+ color: patternColor.value,
99
+ radius: background.value.size / 2
100
+ }, null, 8, ["color", "radius"])) : createCommentVNode("", true),
101
+ _ctx.bgColor ? (openBlock(), createElementBlock("svg", _hoisted_2, [
102
+ createElementVNode("rect", {
103
+ width: "100%",
104
+ height: "100%",
105
+ fill: _ctx.bgColor
106
+ }, null, 8, _hoisted_3)
107
+ ])) : createCommentVNode("", true)
108
+ ])
109
+ ], 8, _hoisted_1)
110
+ ]),
111
+ createElementVNode("rect", {
112
+ x: _ctx.x,
113
+ y: _ctx.y,
114
+ width: "100%",
115
+ height: "100%",
116
+ fill: `url(#${patternId.value})`
117
+ }, null, 8, _hoisted_4),
118
+ renderSlot(_ctx.$slots, "default", { id: patternId.value })
119
+ ], 4);
120
+ };
121
+ }
122
+ });
123
+ export {
124
+ _sfc_main as Background,
125
+ BackgroundVariant
126
+ };
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@vue-flow/background",
3
+ "version": "1.3.2",
4
+ "private": false,
5
+ "license": "MIT",
6
+ "author": "Burak Cakmakoglu<78412429+bcakmakoglu@users.noreply.github.com>",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/bcakmakoglu/vue-flow/packages/plugins/background"
10
+ },
11
+ "homepage": "https://github.com/bcakmakoglu/vue-flow#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/bcakmakoglu/vue-flow/issues"
14
+ },
15
+ "keywords": [
16
+ "vue",
17
+ "flow",
18
+ "diagram",
19
+ "editor",
20
+ "graph",
21
+ "node",
22
+ "link",
23
+ "port",
24
+ "slot",
25
+ "vue3",
26
+ "composition-api",
27
+ "vue-flow",
28
+ "vueflow",
29
+ "typescript"
30
+ ],
31
+ "main": "./dist/vue-flow-background.js",
32
+ "module": "./dist/vue-flow-background.mjs",
33
+ "types": "./dist/index.d.ts",
34
+ "unpkg": "./dist/vue-flow-background.iife.js",
35
+ "jsdelivr": "./dist/vue-flow-background.iife.js",
36
+ "exports": {
37
+ ".": {
38
+ "types": "./dist/index.d.ts",
39
+ "import": "./dist/vue-flow-background.mjs",
40
+ "require": "./dist/vue-flow-background.js"
41
+ }
42
+ },
43
+ "files": [
44
+ "dist",
45
+ "*.d.ts"
46
+ ],
47
+ "sideEffects": false,
48
+ "peerDependencies": {
49
+ "@vue-flow/core": "^1.23.0",
50
+ "vue": "^3.3.0"
51
+ },
52
+ "devDependencies": {
53
+ "vue-tsc": "^1.8.16",
54
+ "@tooling/eslint-config": "0.0.0",
55
+ "@tooling/tsconfig": "0.0.0",
56
+ "@tooling/vite-config": "0.0.0",
57
+ "@vue-flow/core": "1.41.5"
58
+ },
59
+ "publishConfig": {
60
+ "access": "public",
61
+ "registry": "https://registry.npmjs.org/"
62
+ },
63
+ "scripts": {
64
+ "dev": "pnpm types:watch & pnpm build:watch",
65
+ "build": "vite build",
66
+ "build:watch": "vite build --watch",
67
+ "types": "vue-tsc --declaration --emitDeclarationOnly && pnpm lint:dist",
68
+ "types:watch": "vue-tsc --declaration --emitDeclarationOnly --watch",
69
+ "lint": "eslint --ext .js,.ts,.vue ./",
70
+ "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist",
71
+ "test": "exit 0"
72
+ }
73
+ }
@@ -0,0 +1,207 @@
1
+ import { openBlock, createElementBlock, renderSlot, createElementVNode, defineComponent, toRef, createBlock, unref, withCtx, Fragment, createVNode, resolveDynamicComponent, createCommentVNode } from "vue";
2
+ import { PanelPosition, useVueFlow, Panel } from "@vue-flow/core";
3
+ const _sfc_main$1 = {
4
+ name: "ControlButton",
5
+ compatConfig: { MODE: 3 }
6
+ };
7
+ const _export_sfc = (sfc, props) => {
8
+ const target = sfc.__vccOpts || sfc;
9
+ for (const [key, val] of props) {
10
+ target[key] = val;
11
+ }
12
+ return target;
13
+ };
14
+ const _hoisted_1$5 = {
15
+ type: "button",
16
+ class: "vue-flow__controls-button"
17
+ };
18
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
19
+ return openBlock(), createElementBlock("button", _hoisted_1$5, [
20
+ renderSlot(_ctx.$slots, "default")
21
+ ]);
22
+ }
23
+ const ControlButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
24
+ const _hoisted_1$4 = {
25
+ xmlns: "http://www.w3.org/2000/svg",
26
+ viewBox: "0 0 32 32"
27
+ };
28
+ const _hoisted_2$4 = /* @__PURE__ */ createElementVNode("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z" }, null, -1);
29
+ const _hoisted_3$4 = [
30
+ _hoisted_2$4
31
+ ];
32
+ function render$4(_ctx, _cache) {
33
+ return openBlock(), createElementBlock("svg", _hoisted_1$4, _hoisted_3$4);
34
+ }
35
+ const PlusIcon = { render: render$4 };
36
+ const _hoisted_1$3 = {
37
+ xmlns: "http://www.w3.org/2000/svg",
38
+ viewBox: "0 0 32 5"
39
+ };
40
+ const _hoisted_2$3 = /* @__PURE__ */ createElementVNode("path", { d: "M0 0h32v4.2H0z" }, null, -1);
41
+ const _hoisted_3$3 = [
42
+ _hoisted_2$3
43
+ ];
44
+ function render$3(_ctx, _cache) {
45
+ return openBlock(), createElementBlock("svg", _hoisted_1$3, _hoisted_3$3);
46
+ }
47
+ const MinusIcon = { render: render$3 };
48
+ const _hoisted_1$2 = {
49
+ xmlns: "http://www.w3.org/2000/svg",
50
+ viewBox: "0 0 32 30"
51
+ };
52
+ const _hoisted_2$2 = /* @__PURE__ */ createElementVNode("path", { d: "M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z" }, null, -1);
53
+ const _hoisted_3$2 = [
54
+ _hoisted_2$2
55
+ ];
56
+ function render$2(_ctx, _cache) {
57
+ return openBlock(), createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
58
+ }
59
+ const FitView = { render: render$2 };
60
+ const _hoisted_1$1 = {
61
+ xmlns: "http://www.w3.org/2000/svg",
62
+ viewBox: "0 0 25 32"
63
+ };
64
+ const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z" }, null, -1);
65
+ const _hoisted_3$1 = [
66
+ _hoisted_2$1
67
+ ];
68
+ function render$1(_ctx, _cache) {
69
+ return openBlock(), createElementBlock("svg", _hoisted_1$1, _hoisted_3$1);
70
+ }
71
+ const Lock = { render: render$1 };
72
+ const _hoisted_1 = {
73
+ xmlns: "http://www.w3.org/2000/svg",
74
+ viewBox: "0 0 25 32"
75
+ };
76
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z" }, null, -1);
77
+ const _hoisted_3 = [
78
+ _hoisted_2
79
+ ];
80
+ function render(_ctx, _cache) {
81
+ return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3);
82
+ }
83
+ const Unlock = { render };
84
+ const __default__ = {
85
+ name: "Controls",
86
+ compatConfig: { MODE: 3 }
87
+ };
88
+ const _sfc_main = /* @__PURE__ */ defineComponent({
89
+ ...__default__,
90
+ props: {
91
+ showZoom: { type: Boolean, default: true },
92
+ showFitView: { type: Boolean, default: true },
93
+ showInteractive: { type: Boolean, default: true },
94
+ fitViewParams: {},
95
+ position: { default: () => PanelPosition.BottomLeft }
96
+ },
97
+ emits: ["zoomIn", "zoomOut", "fitView", "interactionChange"],
98
+ setup(__props, { emit }) {
99
+ const {
100
+ nodesDraggable,
101
+ nodesConnectable,
102
+ elementsSelectable,
103
+ setInteractive,
104
+ zoomIn,
105
+ zoomOut,
106
+ fitView,
107
+ viewport,
108
+ minZoom,
109
+ maxZoom
110
+ } = useVueFlow();
111
+ const isInteractive = toRef(() => nodesDraggable.value || nodesConnectable.value || elementsSelectable.value);
112
+ const minZoomReached = toRef(() => viewport.value.zoom <= minZoom.value);
113
+ const maxZoomReached = toRef(() => viewport.value.zoom >= maxZoom.value);
114
+ function onZoomInHandler() {
115
+ zoomIn();
116
+ emit("zoomIn");
117
+ }
118
+ function onZoomOutHandler() {
119
+ zoomOut();
120
+ emit("zoomOut");
121
+ }
122
+ function onFitViewHandler() {
123
+ fitView(__props.fitViewParams);
124
+ emit("fitView");
125
+ }
126
+ function onInteractiveChangeHandler() {
127
+ setInteractive(!isInteractive.value);
128
+ emit("interactionChange", !isInteractive.value);
129
+ }
130
+ return (_ctx, _cache) => {
131
+ return openBlock(), createBlock(unref(Panel), {
132
+ class: "vue-flow__controls",
133
+ position: _ctx.position
134
+ }, {
135
+ default: withCtx(() => [
136
+ renderSlot(_ctx.$slots, "top"),
137
+ _ctx.showZoom ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
138
+ renderSlot(_ctx.$slots, "control-zoom-in", {}, () => [
139
+ createVNode(ControlButton, {
140
+ class: "vue-flow__controls-zoomin",
141
+ disabled: maxZoomReached.value,
142
+ onClick: onZoomInHandler
143
+ }, {
144
+ default: withCtx(() => [
145
+ renderSlot(_ctx.$slots, "icon-zoom-in", {}, () => [
146
+ (openBlock(), createBlock(resolveDynamicComponent(unref(PlusIcon))))
147
+ ])
148
+ ]),
149
+ _: 3
150
+ }, 8, ["disabled"])
151
+ ]),
152
+ renderSlot(_ctx.$slots, "control-zoom-out", {}, () => [
153
+ createVNode(ControlButton, {
154
+ class: "vue-flow__controls-zoomout",
155
+ disabled: minZoomReached.value,
156
+ onClick: onZoomOutHandler
157
+ }, {
158
+ default: withCtx(() => [
159
+ renderSlot(_ctx.$slots, "icon-zoom-out", {}, () => [
160
+ (openBlock(), createBlock(resolveDynamicComponent(unref(MinusIcon))))
161
+ ])
162
+ ]),
163
+ _: 3
164
+ }, 8, ["disabled"])
165
+ ])
166
+ ], 64)) : createCommentVNode("", true),
167
+ _ctx.showFitView ? renderSlot(_ctx.$slots, "control-fit-view", { key: 1 }, () => [
168
+ createVNode(ControlButton, {
169
+ class: "vue-flow__controls-fitview",
170
+ onClick: onFitViewHandler
171
+ }, {
172
+ default: withCtx(() => [
173
+ renderSlot(_ctx.$slots, "icon-fit-view", {}, () => [
174
+ (openBlock(), createBlock(resolveDynamicComponent(unref(FitView))))
175
+ ])
176
+ ]),
177
+ _: 3
178
+ })
179
+ ]) : createCommentVNode("", true),
180
+ _ctx.showInteractive ? renderSlot(_ctx.$slots, "control-interactive", { key: 2 }, () => [
181
+ _ctx.showInteractive ? (openBlock(), createBlock(ControlButton, {
182
+ key: 0,
183
+ class: "vue-flow__controls-interactive",
184
+ onClick: onInteractiveChangeHandler
185
+ }, {
186
+ default: withCtx(() => [
187
+ isInteractive.value ? renderSlot(_ctx.$slots, "icon-unlock", { key: 0 }, () => [
188
+ (openBlock(), createBlock(resolveDynamicComponent(unref(Unlock))))
189
+ ]) : createCommentVNode("", true),
190
+ !isInteractive.value ? renderSlot(_ctx.$slots, "icon-lock", { key: 1 }, () => [
191
+ (openBlock(), createBlock(resolveDynamicComponent(unref(Lock))))
192
+ ]) : createCommentVNode("", true)
193
+ ]),
194
+ _: 3
195
+ })) : createCommentVNode("", true)
196
+ ]) : createCommentVNode("", true),
197
+ renderSlot(_ctx.$slots, "default")
198
+ ]),
199
+ _: 3
200
+ }, 8, ["position"]);
201
+ };
202
+ }
203
+ });
204
+ export {
205
+ ControlButton,
206
+ _sfc_main as Controls
207
+ };
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@vue-flow/controls",
3
+ "version": "1.1.3",
4
+ "private": false,
5
+ "license": "MIT",
6
+ "author": "Burak Cakmakoglu<78412429+bcakmakoglu@users.noreply.github.com>",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/bcakmakoglu/vue-flow/packages/plugins/controls"
10
+ },
11
+ "homepage": "https://github.com/bcakmakoglu/vue-flow#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/bcakmakoglu/vue-flow/issues"
14
+ },
15
+ "keywords": [
16
+ "vue",
17
+ "flow",
18
+ "diagram",
19
+ "editor",
20
+ "graph",
21
+ "node",
22
+ "link",
23
+ "port",
24
+ "slot",
25
+ "vue3",
26
+ "composition-api",
27
+ "vue-flow",
28
+ "vueflow",
29
+ "typescript"
30
+ ],
31
+ "main": "./dist/vue-flow-controls.js",
32
+ "module": "./dist/vue-flow-controls.mjs",
33
+ "types": "./dist/index.d.ts",
34
+ "unpkg": "./dist/vue-flow-controls.iife.js",
35
+ "jsdelivr": "./dist/vue-flow-controls.iife.js",
36
+ "exports": {
37
+ ".": {
38
+ "types": "./dist/index.d.ts",
39
+ "import": "./dist/vue-flow-controls.mjs",
40
+ "require": "./dist/vue-flow-controls.js"
41
+ },
42
+ "./dist/style.css": "./dist/style.css"
43
+ },
44
+ "files": [
45
+ "dist",
46
+ "*.d.ts"
47
+ ],
48
+ "sideEffects": [
49
+ "*.css"
50
+ ],
51
+ "peerDependencies": {
52
+ "@vue-flow/core": "^1.23.0",
53
+ "vue": "^3.3.0"
54
+ },
55
+ "devDependencies": {
56
+ "vite-svg-loader": "^4.0.0",
57
+ "vue-tsc": "^1.8.16",
58
+ "@tooling/eslint-config": "0.0.0",
59
+ "@tooling/tsconfig": "0.0.0",
60
+ "@tooling/vite-config": "0.0.0",
61
+ "@vue-flow/core": "1.45.1"
62
+ },
63
+ "publishConfig": {
64
+ "access": "public",
65
+ "registry": "https://registry.npmjs.org/"
66
+ },
67
+ "scripts": {
68
+ "dev": "pnpm types:watch & pnpm build:watch",
69
+ "build": "vite build",
70
+ "build:watch": "vite build --watch",
71
+ "types": "vue-tsc --declaration --emitDeclarationOnly && pnpm lint:dist",
72
+ "types:watch": "vue-tsc --declaration --emitDeclarationOnly --watch",
73
+ "lint": "eslint --ext .js,.ts,.vue ./",
74
+ "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist",
75
+ "test": "exit 0"
76
+ }
77
+ }