@macrulez/visual-linker-nuxt 0.2.0 → 0.3.0
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/README.md +13 -8
- package/dist/module.d.ts +18 -1
- package/dist/module.js +7 -1
- package/dist/module.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -88,14 +88,19 @@ to core's default is never silently shadowed by this module.
|
|
|
88
88
|
|
|
89
89
|
#### Module options
|
|
90
90
|
|
|
91
|
-
| Option | Mirrors
|
|
92
|
-
| ------------------------------------------------------------------------------------------- |
|
|
93
|
-
| `defaultCurve` | `VisualLinkerOptions.defaultCurve`
|
|
94
|
-
| `showPorts` | `VisualLinkerOptions.showPorts`
|
|
95
|
-
| `curvature` / `curveMinReach` / `curveMaxReach` / `curveAngleBlend` / `curveAngleMaxOffset` | matching `defaultCurveXxx` fields
|
|
96
|
-
| `dragGridSize` | `VisualLinkerOptions.dragGridSize`
|
|
97
|
-
| `portRadius` / `portColor` / `portStrokeColor` / `portStrokeWidth` | matching `defaultPortXxx` fields
|
|
98
|
-
| `circleMarkerSize` / `squareMarkerSize` / `diamondMarkerSize` / `arrowMarkerSize` | matching `defaultXxxMarkerSize` fields
|
|
91
|
+
| Option | Mirrors | |
|
|
92
|
+
| ------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------ |
|
|
93
|
+
| `defaultCurve` | `VisualLinkerOptions.defaultCurve` | `'bezier' \| 'straight' \| 'smoothstep'` |
|
|
94
|
+
| `showPorts` | `VisualLinkerOptions.showPorts` | |
|
|
95
|
+
| `curvature` / `curveMinReach` / `curveMaxReach` / `curveAngleBlend` / `curveAngleMaxOffset` | matching `defaultCurveXxx` fields | bezier geometry |
|
|
96
|
+
| `dragGridSize` | `VisualLinkerOptions.dragGridSize` | |
|
|
97
|
+
| `portRadius` / `portColor` / `portStrokeColor` / `portStrokeWidth` | matching `defaultPortXxx` fields | built-in port dot look |
|
|
98
|
+
| `circleMarkerSize` / `squareMarkerSize` / `diamondMarkerSize` / `arrowMarkerSize` | matching `defaultXxxMarkerSize` fields | |
|
|
99
|
+
| `portSpread` | `VisualLinkerOptions.defaultPortSpread` | `true` or `{ gap, padding }` |
|
|
100
|
+
| `jumps` | `VisualLinkerOptions.jumps` | `true` or `{ radius }` — hop over crossing lines |
|
|
101
|
+
| `avoidObstacles` / `obstaclePadding` | `VisualLinkerOptions.avoidObstacles` / `obstaclePadding` | route `smoothstep` around other blocks |
|
|
102
|
+
| `animated` | `VisualLinkerOptions.defaultAnimated` | `true` or a `ConnectionFlow` object |
|
|
103
|
+
| `clipToScrollParents` | `VisualLinkerOptions.clipToScrollParents` | `true` / `'pin'` / `'hide'` / `false` |
|
|
99
104
|
|
|
100
105
|
**Not covered by module options** (set these directly on
|
|
101
106
|
`<VisualLinker :options="...">`/`useVisualLinker()` instead):
|
package/dist/module.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NuxtModule } from '@nuxt/schema';
|
|
2
|
-
import { ConnectionCurve } from '@macrulez/visual-linker-vue';
|
|
2
|
+
import { ConnectionCurve, ConnectionFlow } from '@macrulez/visual-linker-vue';
|
|
3
3
|
|
|
4
4
|
interface ModuleOptions {
|
|
5
5
|
/** Falls through to @macrulez/visual-linker-core's own default (VLConnectionCurveEnum.BEZIER) when unset. */
|
|
@@ -23,6 +23,23 @@ interface ModuleOptions {
|
|
|
23
23
|
squareMarkerSize?: number;
|
|
24
24
|
diamondMarkerSize?: number;
|
|
25
25
|
arrowMarkerSize?: number;
|
|
26
|
+
/** Spreads connections sharing a port side into separate virtual ports — `true`, `{ gap, padding }`, or unset (off). */
|
|
27
|
+
portSpread?: boolean | {
|
|
28
|
+
gap?: number;
|
|
29
|
+
padding?: number;
|
|
30
|
+
};
|
|
31
|
+
/** What to do with a connection end scrolled out of a clipping ancestor: `'pin'` (`true`, default) to the visible edge, `'hide'` the connection, `false` ignore. */
|
|
32
|
+
clipToScrollParents?: boolean | 'pin' | 'hide';
|
|
33
|
+
/** Animated flow along every connection by default — `true` or a `ConnectionFlow` object; a connection can opt out with `animated: false`. */
|
|
34
|
+
animated?: boolean | ConnectionFlow;
|
|
35
|
+
/** Route `smoothstep` connections around the other blocks instead of through them. */
|
|
36
|
+
avoidObstacles?: boolean;
|
|
37
|
+
/** Clearance kept between a routed line and every other block, px. */
|
|
38
|
+
obstaclePadding?: number;
|
|
39
|
+
/** Hop over crossing lines (`smoothstep`): `true` or `{ radius }`. */
|
|
40
|
+
jumps?: boolean | {
|
|
41
|
+
radius?: number;
|
|
42
|
+
};
|
|
26
43
|
}
|
|
27
44
|
declare const visualLinkerModule: NuxtModule<ModuleOptions>;
|
|
28
45
|
|
package/dist/module.js
CHANGED
|
@@ -30,7 +30,13 @@ var visualLinkerModule = defineNuxtModule({
|
|
|
30
30
|
defaultCircleMarkerSize: options.circleMarkerSize,
|
|
31
31
|
defaultSquareMarkerSize: options.squareMarkerSize,
|
|
32
32
|
defaultDiamondMarkerSize: options.diamondMarkerSize,
|
|
33
|
-
defaultArrowMarkerSize: options.arrowMarkerSize
|
|
33
|
+
defaultArrowMarkerSize: options.arrowMarkerSize,
|
|
34
|
+
defaultPortSpread: options.portSpread,
|
|
35
|
+
clipToScrollParents: options.clipToScrollParents,
|
|
36
|
+
defaultAnimated: options.animated,
|
|
37
|
+
avoidObstacles: options.avoidObstacles,
|
|
38
|
+
obstaclePadding: options.obstaclePadding,
|
|
39
|
+
jumps: options.jumps
|
|
34
40
|
};
|
|
35
41
|
addPlugin(resolver.resolve("./runtime/plugin"));
|
|
36
42
|
addPlugin(resolver.resolve("./runtime/plugin.client"));
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/module.ts"],"sourcesContent":["import { addComponent, addImports, addPlugin, createResolver, defineNuxtModule } from '@nuxt/kit'\nimport type { NuxtModule } from '@nuxt/schema'\nimport type { ConnectionCurve } from '@macrulez/visual-linker-vue'\n\nexport interface ModuleOptions {\n /** Falls through to @macrulez/visual-linker-core's own default (VLConnectionCurveEnum.BEZIER) when unset. */\n defaultCurve?: ConnectionCurve\n /** Falls through to @macrulez/visual-linker-core's own default (true) when unset. */\n showPorts?: boolean\n curvature?: number\n curveMinReach?: number\n curveMaxReach?: number\n curveAngleBlend?: number\n curveAngleMaxOffset?: number\n /** Snaps every draggable block to this px grid while dragging. Falls through to no snapping when unset. */\n dragGridSize?: number\n /** Instance-wide look for the built-in port dot — falls through to @macrulez/visual-linker-core's own defaults (params.ts) when unset. */\n portRadius?: number\n portColor?: string\n portStrokeColor?: string\n portStrokeWidth?: number\n /** Instance-wide default marker size per built-in shape — falls through to @macrulez/visual-linker-core's own defaults (params.ts) when unset. */\n circleMarkerSize?: number\n squareMarkerSize?: number\n diamondMarkerSize?: number\n arrowMarkerSize?: number\n}\n\nconst visualLinkerModule: NuxtModule<ModuleOptions> = defineNuxtModule<ModuleOptions>({\n meta: {\n name: '@macrulez/visual-linker-nuxt',\n configKey: 'visualLinker',\n },\n // No `defaults` here on purpose: an option the user didn't set in\n // nuxt.config.ts must stay `undefined` all the way through to\n // @macrulez/visual-linker-core's own defaults (params.ts) — hardcoding one\n // here would silently shadow it, making a change to core's default look\n // like it does nothing for a Nuxt consumer.\n setup(options, nuxt) {\n const resolver = createResolver(import.meta.url)\n\n addComponent({ name: 'VisualLinker', export: 'VisualLinker', filePath: '@macrulez/visual-linker-vue' })\n addImports({ name: 'useVisualLinker', from: '@macrulez/visual-linker-vue' })\n\n nuxt.options.runtimeConfig.public.visualLinker = {\n defaultCurve: options.defaultCurve,\n showPorts: options.showPorts,\n defaultCurvature: options.curvature,\n defaultCurveMinReach: options.curveMinReach,\n defaultCurveMaxReach: options.curveMaxReach,\n defaultCurveAngleBlend: options.curveAngleBlend,\n defaultCurveAngleMaxOffset: options.curveAngleMaxOffset,\n dragGridSize: options.dragGridSize,\n defaultPortRadius: options.portRadius,\n defaultPortColor: options.portColor,\n defaultPortStrokeColor: options.portStrokeColor,\n defaultPortStrokeWidth: options.portStrokeWidth,\n defaultCircleMarkerSize: options.circleMarkerSize,\n defaultSquareMarkerSize: options.squareMarkerSize,\n defaultDiamondMarkerSize: options.diamondMarkerSize,\n defaultArrowMarkerSize: options.arrowMarkerSize,\n }\n\n // Registers v-vl-block / v-vl-port on both server and client.\n addPlugin(resolver.resolve('./runtime/plugin'))\n // Applies module options on the client only — <VisualLinker>/useVisualLinker\n // are already SSR-safe no-ops, this just seeds their shared client-side defaults.\n addPlugin(resolver.resolve('./runtime/plugin.client'))\n },\n})\n\nexport default visualLinkerModule\n"],"mappings":";AAAA,SAAS,cAAc,YAAY,WAAW,gBAAgB,wBAAwB;
|
|
1
|
+
{"version":3,"sources":["../src/module.ts"],"sourcesContent":["import { addComponent, addImports, addPlugin, createResolver, defineNuxtModule } from '@nuxt/kit'\nimport type { NuxtModule } from '@nuxt/schema'\nimport type { ConnectionCurve, ConnectionFlow } from '@macrulez/visual-linker-vue'\n\nexport interface ModuleOptions {\n /** Falls through to @macrulez/visual-linker-core's own default (VLConnectionCurveEnum.BEZIER) when unset. */\n defaultCurve?: ConnectionCurve\n /** Falls through to @macrulez/visual-linker-core's own default (true) when unset. */\n showPorts?: boolean\n curvature?: number\n curveMinReach?: number\n curveMaxReach?: number\n curveAngleBlend?: number\n curveAngleMaxOffset?: number\n /** Snaps every draggable block to this px grid while dragging. Falls through to no snapping when unset. */\n dragGridSize?: number\n /** Instance-wide look for the built-in port dot — falls through to @macrulez/visual-linker-core's own defaults (params.ts) when unset. */\n portRadius?: number\n portColor?: string\n portStrokeColor?: string\n portStrokeWidth?: number\n /** Instance-wide default marker size per built-in shape — falls through to @macrulez/visual-linker-core's own defaults (params.ts) when unset. */\n circleMarkerSize?: number\n squareMarkerSize?: number\n diamondMarkerSize?: number\n arrowMarkerSize?: number\n /** Spreads connections sharing a port side into separate virtual ports — `true`, `{ gap, padding }`, or unset (off). */\n portSpread?: boolean | { gap?: number; padding?: number }\n /** What to do with a connection end scrolled out of a clipping ancestor: `'pin'` (`true`, default) to the visible edge, `'hide'` the connection, `false` ignore. */\n clipToScrollParents?: boolean | 'pin' | 'hide'\n /** Animated flow along every connection by default — `true` or a `ConnectionFlow` object; a connection can opt out with `animated: false`. */\n animated?: boolean | ConnectionFlow\n /** Route `smoothstep` connections around the other blocks instead of through them. */\n avoidObstacles?: boolean\n /** Clearance kept between a routed line and every other block, px. */\n obstaclePadding?: number\n /** Hop over crossing lines (`smoothstep`): `true` or `{ radius }`. */\n jumps?: boolean | { radius?: number }\n}\n\nconst visualLinkerModule: NuxtModule<ModuleOptions> = defineNuxtModule<ModuleOptions>({\n meta: {\n name: '@macrulez/visual-linker-nuxt',\n configKey: 'visualLinker',\n },\n // No `defaults` here on purpose: an option the user didn't set in\n // nuxt.config.ts must stay `undefined` all the way through to\n // @macrulez/visual-linker-core's own defaults (params.ts) — hardcoding one\n // here would silently shadow it, making a change to core's default look\n // like it does nothing for a Nuxt consumer.\n setup(options, nuxt) {\n const resolver = createResolver(import.meta.url)\n\n addComponent({ name: 'VisualLinker', export: 'VisualLinker', filePath: '@macrulez/visual-linker-vue' })\n addImports({ name: 'useVisualLinker', from: '@macrulez/visual-linker-vue' })\n\n nuxt.options.runtimeConfig.public.visualLinker = {\n defaultCurve: options.defaultCurve,\n showPorts: options.showPorts,\n defaultCurvature: options.curvature,\n defaultCurveMinReach: options.curveMinReach,\n defaultCurveMaxReach: options.curveMaxReach,\n defaultCurveAngleBlend: options.curveAngleBlend,\n defaultCurveAngleMaxOffset: options.curveAngleMaxOffset,\n dragGridSize: options.dragGridSize,\n defaultPortRadius: options.portRadius,\n defaultPortColor: options.portColor,\n defaultPortStrokeColor: options.portStrokeColor,\n defaultPortStrokeWidth: options.portStrokeWidth,\n defaultCircleMarkerSize: options.circleMarkerSize,\n defaultSquareMarkerSize: options.squareMarkerSize,\n defaultDiamondMarkerSize: options.diamondMarkerSize,\n defaultArrowMarkerSize: options.arrowMarkerSize,\n defaultPortSpread: options.portSpread,\n clipToScrollParents: options.clipToScrollParents,\n defaultAnimated: options.animated,\n avoidObstacles: options.avoidObstacles,\n obstaclePadding: options.obstaclePadding,\n jumps: options.jumps,\n }\n\n // Registers v-vl-block / v-vl-port on both server and client.\n addPlugin(resolver.resolve('./runtime/plugin'))\n // Applies module options on the client only — <VisualLinker>/useVisualLinker\n // are already SSR-safe no-ops, this just seeds their shared client-side defaults.\n addPlugin(resolver.resolve('./runtime/plugin.client'))\n },\n})\n\nexport default visualLinkerModule\n"],"mappings":";AAAA,SAAS,cAAc,YAAY,WAAW,gBAAgB,wBAAwB;AAwCtF,IAAM,qBAAgD,iBAAgC;AAAA,EACpF,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,WAAW;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,SAAS,MAAM;AACnB,UAAM,WAAW,eAAe,YAAY,GAAG;AAE/C,iBAAa,EAAE,MAAM,gBAAgB,QAAQ,gBAAgB,UAAU,8BAA8B,CAAC;AACtG,eAAW,EAAE,MAAM,mBAAmB,MAAM,8BAA8B,CAAC;AAE3E,SAAK,QAAQ,cAAc,OAAO,eAAe;AAAA,MAC/C,cAAc,QAAQ;AAAA,MACtB,WAAW,QAAQ;AAAA,MACnB,kBAAkB,QAAQ;AAAA,MAC1B,sBAAsB,QAAQ;AAAA,MAC9B,sBAAsB,QAAQ;AAAA,MAC9B,wBAAwB,QAAQ;AAAA,MAChC,4BAA4B,QAAQ;AAAA,MACpC,cAAc,QAAQ;AAAA,MACtB,mBAAmB,QAAQ;AAAA,MAC3B,kBAAkB,QAAQ;AAAA,MAC1B,wBAAwB,QAAQ;AAAA,MAChC,wBAAwB,QAAQ;AAAA,MAChC,yBAAyB,QAAQ;AAAA,MACjC,yBAAyB,QAAQ;AAAA,MACjC,0BAA0B,QAAQ;AAAA,MAClC,wBAAwB,QAAQ;AAAA,MAChC,mBAAmB,QAAQ;AAAA,MAC3B,qBAAqB,QAAQ;AAAA,MAC7B,iBAAiB,QAAQ;AAAA,MACzB,gBAAgB,QAAQ;AAAA,MACxB,iBAAiB,QAAQ;AAAA,MACzB,OAAO,QAAQ;AAAA,IACjB;AAGA,cAAU,SAAS,QAAQ,kBAAkB,CAAC;AAG9C,cAAU,SAAS,QAAQ,yBAAyB,CAAC;AAAA,EACvD;AACF,CAAC;AAED,IAAO,iBAAQ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@macrulez/visual-linker-nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Nuxt module wrapping @macrulez/visual-linker-vue: auto-imported <VisualLinker> and useVisualLinker, module options for default curve/port rendering",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@nuxt/kit": "^4.5.2",
|
|
28
|
-
"@macrulez/visual-linker-vue": "0.
|
|
28
|
+
"@macrulez/visual-linker-vue": "0.3.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@nuxt/schema": "^4.5.2",
|