nuxt-ui-elements 0.1.40 → 0.2.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.
Files changed (30) hide show
  1. package/README.md +6 -191
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +233 -3
  4. package/dist/runtime/components/DialogAlert.vue +1 -1
  5. package/dist/runtime/components/DialogConfirm.vue +1 -1
  6. package/dist/runtime/components/Flow.d.vue.ts +77 -0
  7. package/dist/runtime/components/Flow.vue +99 -0
  8. package/dist/runtime/components/Flow.vue.d.ts +77 -0
  9. package/dist/runtime/components/FlowHandle.d.vue.ts +22 -0
  10. package/dist/runtime/components/FlowHandle.vue +33 -0
  11. package/dist/runtime/components/FlowHandle.vue.d.ts +22 -0
  12. package/dist/runtime/components/FlowNode.d.vue.ts +26 -0
  13. package/dist/runtime/components/FlowNode.vue +39 -0
  14. package/dist/runtime/components/FlowNode.vue.d.ts +26 -0
  15. package/dist/runtime/components/ToggleGroup.vue +1 -1
  16. package/dist/runtime/components/flow/FlowBackground.d.vue.ts +21 -0
  17. package/dist/runtime/components/flow/FlowBackground.vue +39 -0
  18. package/dist/runtime/components/flow/FlowBackground.vue.d.ts +21 -0
  19. package/dist/runtime/components/flow/FlowControls.d.vue.ts +29 -0
  20. package/dist/runtime/components/flow/FlowControls.vue +37 -0
  21. package/dist/runtime/components/flow/FlowControls.vue.d.ts +29 -0
  22. package/dist/runtime/components/flow/FlowMiniMap.d.vue.ts +37 -0
  23. package/dist/runtime/components/flow/FlowMiniMap.vue +51 -0
  24. package/dist/runtime/components/flow/FlowMiniMap.vue.d.ts +37 -0
  25. package/dist/runtime/index.css +1 -1
  26. package/dist/runtime/types/index.d.ts +6 -0
  27. package/dist/runtime/types/index.js +6 -0
  28. package/dist/runtime/utils/std.d.ts +1 -0
  29. package/dist/runtime/utils/std.js +1 -0
  30. package/package.json +26 -8
@@ -0,0 +1,77 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import theme from "#build/ui-elements/flow";
3
+ import type { ComponentConfig } from "../types/index.js";
4
+ import type { Node, Edge, ConnectionMode } from "@vue-flow/core";
5
+ import type { FlowBackgroundProps } from "./flow/FlowBackground.vue.js";
6
+ import type { FlowControlsProps } from "./flow/FlowControls.vue.js";
7
+ import type { FlowMiniMapProps } from "./flow/FlowMiniMap.vue.js";
8
+ type Flow = ComponentConfig<typeof theme, AppConfig, "flow">;
9
+ export interface FlowProps {
10
+ /** Array of node objects */
11
+ nodes?: Node[];
12
+ /** Array of edge objects */
13
+ edges?: Edge[];
14
+ /** Map of custom node type components */
15
+ nodeTypes?: Record<string, any>;
16
+ /** Map of custom edge type components */
17
+ edgeTypes?: Record<string, any>;
18
+ /** Fit view on initialization */
19
+ fitViewOnInit?: boolean;
20
+ /** Minimum zoom level */
21
+ minZoom?: number;
22
+ /** Maximum zoom level */
23
+ maxZoom?: number;
24
+ /** Whether nodes are draggable */
25
+ nodesDraggable?: boolean;
26
+ /** Whether nodes are connectable */
27
+ nodesConnectable?: boolean;
28
+ /** Whether elements are selectable */
29
+ elementsSelectable?: boolean;
30
+ /** Connection mode */
31
+ connectionMode?: ConnectionMode;
32
+ /** Default edge options */
33
+ defaultEdgeOptions?: Record<string, any>;
34
+ /** Show background (true for defaults, or pass config object) */
35
+ background?: boolean | Omit<FlowBackgroundProps, "ui">;
36
+ /** Show controls (true for defaults, or pass config object) */
37
+ controls?: boolean | Omit<FlowControlsProps, "ui">;
38
+ /** Show minimap (true for defaults, or pass config object) */
39
+ minimap?: boolean | Omit<FlowMiniMapProps, "ui">;
40
+ /** Theme slot overrides */
41
+ ui?: Flow["slots"];
42
+ }
43
+ export interface FlowEmits {
44
+ "update:nodes": [nodes: Node[]];
45
+ "update:edges": [edges: Edge[]];
46
+ nodeClick: [event: any];
47
+ edgeClick: [event: any];
48
+ paneClick: [event: any];
49
+ connect: [params: any];
50
+ }
51
+ export type { FlowBackgroundProps, FlowControlsProps, FlowMiniMapProps };
52
+ export type { FlowNodeProps } from "./FlowNode.vue.js";
53
+ export type { FlowHandleProps } from "./FlowHandle.vue.js";
54
+ declare const _default: typeof __VLS_export;
55
+ export default _default;
56
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FlowProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
57
+ "update:nodes": (nodes: Node<any, any, string>[]) => any;
58
+ "update:edges": (edges: Edge[]) => any;
59
+ nodeClick: (event: any) => any;
60
+ edgeClick: (event: any) => any;
61
+ paneClick: (event: any) => any;
62
+ connect: (params: any) => any;
63
+ }, string, import("vue").PublicProps, Readonly<FlowProps> & Readonly<{
64
+ "onUpdate:nodes"?: ((nodes: Node<any, any, string>[]) => any) | undefined;
65
+ "onUpdate:edges"?: ((edges: Edge[]) => any) | undefined;
66
+ onNodeClick?: ((event: any) => any) | undefined;
67
+ onEdgeClick?: ((event: any) => any) | undefined;
68
+ onPaneClick?: ((event: any) => any) | undefined;
69
+ onConnect?: ((params: any) => any) | undefined;
70
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
71
+ [x: string]: ((props: any) => any) | undefined;
72
+ }>;
73
+ type __VLS_WithSlots<T, S> = T & {
74
+ new (): {
75
+ $slots: S;
76
+ };
77
+ };
@@ -0,0 +1,22 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import theme from "#build/ui-elements/flow-handle";
3
+ import type { ComponentConfig } from "../types/index.js";
4
+ import type { Position } from "@vue-flow/core";
5
+ type FlowHandle = ComponentConfig<typeof theme, AppConfig, "flowHandle">;
6
+ export interface FlowHandleProps {
7
+ /** Handle type: source or target */
8
+ type: "source" | "target";
9
+ /** Handle position */
10
+ position?: Position | "top" | "bottom" | "left" | "right";
11
+ /** Handle ID (for multiple handles per node) */
12
+ id?: string;
13
+ /** Theme color */
14
+ color?: FlowHandle["variants"]["color"];
15
+ /** Whether a connection is active on this handle */
16
+ connected?: boolean;
17
+ /** Theme slot overrides */
18
+ ui?: FlowHandle["slots"];
19
+ }
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ declare const __VLS_export: import("vue").DefineComponent<FlowHandleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FlowHandleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,33 @@
1
+ <script>
2
+ import theme from "#build/ui-elements/flow-handle";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { Handle, Position as VFPosition } from "@vue-flow/core";
8
+ import { tv } from "../utils/tv";
9
+ const {
10
+ type,
11
+ position = VFPosition.Bottom,
12
+ color = "primary",
13
+ connected = false,
14
+ ui: uiProps = {}
15
+ } = defineProps({
16
+ type: { type: String, required: true },
17
+ position: { type: String, required: false },
18
+ id: { type: String, required: false },
19
+ color: { type: null, required: false },
20
+ connected: { type: Boolean, required: false },
21
+ ui: { type: null, required: false }
22
+ });
23
+ const ui = computed(
24
+ () => tv({ extend: tv(theme) })({
25
+ color,
26
+ connected
27
+ })
28
+ );
29
+ </script>
30
+
31
+ <template>
32
+ <Handle :id="id" :type="type" :position="position" :class="ui.root({ class: uiProps?.root })" />
33
+ </template>
@@ -0,0 +1,22 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import theme from "#build/ui-elements/flow-handle";
3
+ import type { ComponentConfig } from "../types/index.js";
4
+ import type { Position } from "@vue-flow/core";
5
+ type FlowHandle = ComponentConfig<typeof theme, AppConfig, "flowHandle">;
6
+ export interface FlowHandleProps {
7
+ /** Handle type: source or target */
8
+ type: "source" | "target";
9
+ /** Handle position */
10
+ position?: Position | "top" | "bottom" | "left" | "right";
11
+ /** Handle ID (for multiple handles per node) */
12
+ id?: string;
13
+ /** Theme color */
14
+ color?: FlowHandle["variants"]["color"];
15
+ /** Whether a connection is active on this handle */
16
+ connected?: boolean;
17
+ /** Theme slot overrides */
18
+ ui?: FlowHandle["slots"];
19
+ }
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ declare const __VLS_export: import("vue").DefineComponent<FlowHandleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FlowHandleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,26 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import theme from "#build/ui-elements/flow-node";
3
+ import type { ComponentConfig } from "../types/index.js";
4
+ type FlowNode = ComponentConfig<typeof theme, AppConfig, "flowNode">;
5
+ export interface FlowNodeProps {
6
+ /** Label text */
7
+ label?: string;
8
+ /** Theme color */
9
+ color?: FlowNode["variants"]["color"];
10
+ /** Visual variant */
11
+ variant?: FlowNode["variants"]["variant"];
12
+ /** Whether the node is currently selected */
13
+ selected?: boolean;
14
+ /** Theme slot overrides */
15
+ ui?: FlowNode["slots"];
16
+ }
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FlowNodeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FlowNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
20
+ default?: (props: {}) => any;
21
+ }>;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,39 @@
1
+ <script>
2
+ import theme from "#build/ui-elements/flow-node";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { tv } from "../utils/tv";
8
+ const {
9
+ label,
10
+ color = "primary",
11
+ variant = "outline",
12
+ selected = false,
13
+ ui: uiProps = {}
14
+ } = defineProps({
15
+ label: { type: String, required: false },
16
+ color: { type: null, required: false },
17
+ variant: { type: null, required: false },
18
+ selected: { type: Boolean, required: false },
19
+ ui: { type: null, required: false }
20
+ });
21
+ const ui = computed(
22
+ () => tv({ extend: tv(theme) })({
23
+ color,
24
+ variant,
25
+ selected
26
+ })
27
+ );
28
+ </script>
29
+
30
+ <template>
31
+ <div :class="ui.root({ class: uiProps?.root })">
32
+ <div v-if="label" :class="ui.label({ class: uiProps?.label })">
33
+ {{ label }}
34
+ </div>
35
+ <div v-if="$slots.default" :class="ui.content({ class: uiProps?.content })">
36
+ <slot />
37
+ </div>
38
+ </div>
39
+ </template>
@@ -0,0 +1,26 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import theme from "#build/ui-elements/flow-node";
3
+ import type { ComponentConfig } from "../types/index.js";
4
+ type FlowNode = ComponentConfig<typeof theme, AppConfig, "flowNode">;
5
+ export interface FlowNodeProps {
6
+ /** Label text */
7
+ label?: string;
8
+ /** Theme color */
9
+ color?: FlowNode["variants"]["color"];
10
+ /** Visual variant */
11
+ variant?: FlowNode["variants"]["variant"];
12
+ /** Whether the node is currently selected */
13
+ selected?: boolean;
14
+ /** Theme slot overrides */
15
+ ui?: FlowNode["slots"];
16
+ }
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FlowNodeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FlowNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
20
+ default?: (props: {}) => any;
21
+ }>;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -23,7 +23,7 @@ const {
23
23
  defaultValue: { type: null, required: false },
24
24
  multiple: { type: null, required: false },
25
25
  orientation: { type: String, required: false },
26
- ui: { type: Object, required: false },
26
+ ui: { type: null, required: false },
27
27
  loop: { type: Boolean, required: false },
28
28
  disabled: { type: Boolean, required: false },
29
29
  name: { type: String, required: false },
@@ -0,0 +1,21 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import theme from "#build/ui-elements/flow-background";
3
+ import type { ComponentConfig } from "../../types/index.js";
4
+ type FlowBackground = ComponentConfig<typeof theme, AppConfig, "flowBackground">;
5
+ export interface FlowBackgroundProps {
6
+ /** Background pattern variant */
7
+ pattern?: "dots" | "lines";
8
+ /** Background pattern gap */
9
+ gap?: number | number[];
10
+ /** Background pattern size */
11
+ size?: number;
12
+ /** Background pattern color */
13
+ color?: string;
14
+ /** Background line width (for lines pattern) */
15
+ lineWidth?: number;
16
+ /** Theme slot overrides */
17
+ ui?: FlowBackground["slots"];
18
+ }
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ declare const __VLS_export: import("vue").DefineComponent<FlowBackgroundProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FlowBackgroundProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,39 @@
1
+ <script>
2
+ import theme from "#build/ui-elements/flow-background";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { Background } from "@vue-flow/background";
8
+ import { tv } from "../../utils/tv";
9
+ const {
10
+ pattern = "dots",
11
+ gap = 20,
12
+ size = 1,
13
+ color,
14
+ lineWidth,
15
+ ui: uiProps = {}
16
+ } = defineProps({
17
+ pattern: { type: String, required: false },
18
+ gap: { type: [Number, Array], required: false },
19
+ size: { type: Number, required: false },
20
+ color: { type: String, required: false },
21
+ lineWidth: { type: Number, required: false },
22
+ ui: { type: null, required: false }
23
+ });
24
+ const ui = computed(
25
+ () => tv({ extend: tv(theme) })({
26
+ pattern
27
+ })
28
+ );
29
+ </script>
30
+
31
+ <template>
32
+ <Background
33
+ :variant="pattern"
34
+ :gap="gap"
35
+ :size="size"
36
+ :color="color"
37
+ :line-width="lineWidth"
38
+ :class="ui.root({ class: uiProps?.root })" />
39
+ </template>
@@ -0,0 +1,21 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import theme from "#build/ui-elements/flow-background";
3
+ import type { ComponentConfig } from "../../types/index.js";
4
+ type FlowBackground = ComponentConfig<typeof theme, AppConfig, "flowBackground">;
5
+ export interface FlowBackgroundProps {
6
+ /** Background pattern variant */
7
+ pattern?: "dots" | "lines";
8
+ /** Background pattern gap */
9
+ gap?: number | number[];
10
+ /** Background pattern size */
11
+ size?: number;
12
+ /** Background pattern color */
13
+ color?: string;
14
+ /** Background line width (for lines pattern) */
15
+ lineWidth?: number;
16
+ /** Theme slot overrides */
17
+ ui?: FlowBackground["slots"];
18
+ }
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ declare const __VLS_export: import("vue").DefineComponent<FlowBackgroundProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FlowBackgroundProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,29 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import theme from "#build/ui-elements/flow-controls";
3
+ import type { ComponentConfig } from "../../types/index.js";
4
+ import type { PanelPositionType, FitViewParams } from "@vue-flow/core";
5
+ type FlowControls = ComponentConfig<typeof theme, AppConfig, "flowControls">;
6
+ export interface FlowControlsProps {
7
+ /** Show zoom controls */
8
+ showZoom?: boolean;
9
+ /** Show fit-view button */
10
+ showFitView?: boolean;
11
+ /** Show interactive toggle */
12
+ showInteractive?: boolean;
13
+ /** Fit view params */
14
+ fitViewParams?: FitViewParams;
15
+ /** Panel position */
16
+ position?: PanelPositionType;
17
+ /** Theme slot overrides */
18
+ ui?: FlowControls["slots"];
19
+ }
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FlowControlsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FlowControlsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
23
+ default?: (props: {}) => any;
24
+ }>;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,37 @@
1
+ <script>
2
+ import theme from "#build/ui-elements/flow-controls";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { Controls } from "@vue-flow/controls";
8
+ import { tv } from "../../utils/tv";
9
+ const {
10
+ showZoom = true,
11
+ showFitView = true,
12
+ showInteractive = true,
13
+ fitViewParams,
14
+ position = "bottom-left",
15
+ ui: uiProps = {}
16
+ } = defineProps({
17
+ showZoom: { type: Boolean, required: false },
18
+ showFitView: { type: Boolean, required: false },
19
+ showInteractive: { type: Boolean, required: false },
20
+ fitViewParams: { type: Object, required: false },
21
+ position: { type: String, required: false },
22
+ ui: { type: null, required: false }
23
+ });
24
+ const ui = computed(() => tv({ extend: tv(theme) })({}));
25
+ </script>
26
+
27
+ <template>
28
+ <Controls
29
+ :show-zoom="showZoom"
30
+ :show-fit-view="showFitView"
31
+ :show-interactive="showInteractive"
32
+ :fit-view-params="fitViewParams"
33
+ :position="position"
34
+ :class="ui.root({ class: uiProps?.root })">
35
+ <slot />
36
+ </Controls>
37
+ </template>
@@ -0,0 +1,29 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import theme from "#build/ui-elements/flow-controls";
3
+ import type { ComponentConfig } from "../../types/index.js";
4
+ import type { PanelPositionType, FitViewParams } from "@vue-flow/core";
5
+ type FlowControls = ComponentConfig<typeof theme, AppConfig, "flowControls">;
6
+ export interface FlowControlsProps {
7
+ /** Show zoom controls */
8
+ showZoom?: boolean;
9
+ /** Show fit-view button */
10
+ showFitView?: boolean;
11
+ /** Show interactive toggle */
12
+ showInteractive?: boolean;
13
+ /** Fit view params */
14
+ fitViewParams?: FitViewParams;
15
+ /** Panel position */
16
+ position?: PanelPositionType;
17
+ /** Theme slot overrides */
18
+ ui?: FlowControls["slots"];
19
+ }
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FlowControlsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FlowControlsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
23
+ default?: (props: {}) => any;
24
+ }>;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,37 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import theme from "#build/ui-elements/flow-mini-map";
3
+ import type { ComponentConfig } from "../../types/index.js";
4
+ import type { PanelPositionType } from "@vue-flow/core";
5
+ type FlowMiniMap = ComponentConfig<typeof theme, AppConfig, "flowMiniMap">;
6
+ export interface FlowMiniMapProps {
7
+ /** Enable drag to pan viewport */
8
+ pannable?: boolean;
9
+ /** Enable zoom to zoom viewport */
10
+ zoomable?: boolean;
11
+ /** Panel position */
12
+ position?: PanelPositionType;
13
+ /** Node color */
14
+ nodeColor?: string;
15
+ /** Node stroke color */
16
+ nodeStrokeColor?: string;
17
+ /** Node border radius */
18
+ nodeBorderRadius?: number;
19
+ /** Mask color */
20
+ maskColor?: string;
21
+ /** Width */
22
+ width?: number;
23
+ /** Height */
24
+ height?: number;
25
+ /** Theme slot overrides */
26
+ ui?: FlowMiniMap["slots"];
27
+ }
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FlowMiniMapProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FlowMiniMapProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
31
+ [x: string]: ((props: any) => any) | undefined;
32
+ }>;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,51 @@
1
+ <script>
2
+ import theme from "#build/ui-elements/flow-mini-map";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { MiniMap } from "@vue-flow/minimap";
8
+ import { tv } from "../../utils/tv";
9
+ const {
10
+ pannable = true,
11
+ zoomable = true,
12
+ position = "bottom-right",
13
+ nodeColor,
14
+ nodeStrokeColor,
15
+ nodeBorderRadius = 4,
16
+ maskColor,
17
+ width,
18
+ height,
19
+ ui: uiProps = {}
20
+ } = defineProps({
21
+ pannable: { type: Boolean, required: false },
22
+ zoomable: { type: Boolean, required: false },
23
+ position: { type: String, required: false },
24
+ nodeColor: { type: String, required: false },
25
+ nodeStrokeColor: { type: String, required: false },
26
+ nodeBorderRadius: { type: Number, required: false },
27
+ maskColor: { type: String, required: false },
28
+ width: { type: Number, required: false },
29
+ height: { type: Number, required: false },
30
+ ui: { type: null, required: false }
31
+ });
32
+ const ui = computed(() => tv({ extend: tv(theme) })({}));
33
+ </script>
34
+
35
+ <template>
36
+ <MiniMap
37
+ :pannable="pannable"
38
+ :zoomable="zoomable"
39
+ :position="position"
40
+ :node-color="nodeColor"
41
+ :node-stroke-color="nodeStrokeColor"
42
+ :node-border-radius="nodeBorderRadius"
43
+ :mask-color="maskColor"
44
+ :width="width"
45
+ :height="height"
46
+ :class="ui.root({ class: uiProps?.root })">
47
+ <template v-for="(_, name) in $slots" #[name]="slotData">
48
+ <slot :name="name" v-bind="slotData ?? {}" />
49
+ </template>
50
+ </MiniMap>
51
+ </template>
@@ -0,0 +1,37 @@
1
+ import type { AppConfig } from "@nuxt/schema";
2
+ import theme from "#build/ui-elements/flow-mini-map";
3
+ import type { ComponentConfig } from "../../types/index.js";
4
+ import type { PanelPositionType } from "@vue-flow/core";
5
+ type FlowMiniMap = ComponentConfig<typeof theme, AppConfig, "flowMiniMap">;
6
+ export interface FlowMiniMapProps {
7
+ /** Enable drag to pan viewport */
8
+ pannable?: boolean;
9
+ /** Enable zoom to zoom viewport */
10
+ zoomable?: boolean;
11
+ /** Panel position */
12
+ position?: PanelPositionType;
13
+ /** Node color */
14
+ nodeColor?: string;
15
+ /** Node stroke color */
16
+ nodeStrokeColor?: string;
17
+ /** Node border radius */
18
+ nodeBorderRadius?: number;
19
+ /** Mask color */
20
+ maskColor?: string;
21
+ /** Width */
22
+ width?: number;
23
+ /** Height */
24
+ height?: number;
25
+ /** Theme slot overrides */
26
+ ui?: FlowMiniMap["slots"];
27
+ }
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FlowMiniMapProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FlowMiniMapProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
31
+ [x: string]: ((props: any) => any) | undefined;
32
+ }>;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -1 +1 @@
1
- @import "#build/ui-elements.css";@source "./components";
1
+ @import "#build/ui-elements.css";@source "./components";.vue-flow__controls{border:1px solid var(--ui-border);border-radius:var(--ui-radius);box-shadow:0 0 2px 1px rgba(0,0,0,.08);overflow:hidden}.vue-flow__controls-button{align-items:center;background:var(--ui-bg);border:none;border-bottom:1px solid var(--ui-border);cursor:pointer;display:flex;height:16px;justify-content:center;padding:6px;width:16px}.vue-flow__controls-button:last-child{border-bottom:none}.vue-flow__controls-button:hover{background:var(--ui-bg-elevated)}.vue-flow__controls-button svg{fill:var(--ui-text);max-height:12px;max-width:12px;width:100%}.vue-flow__minimap{border:1px solid var(--ui-border);border-radius:var(--ui-radius);overflow:hidden}
@@ -1,5 +1,11 @@
1
1
  export * from "../components/DialogConfirm.vue.js";
2
2
  export * from "../components/DialogAlert.vue.js";
3
3
  export * from "../components/ToggleGroup.vue.js";
4
+ export * from "../components/Flow.vue.js";
5
+ export * from "../components/FlowNode.vue.js";
6
+ export * from "../components/FlowHandle.vue.js";
7
+ export * from "../components/FlowBackground.vue.js";
8
+ export * from "../components/FlowControls.vue.js";
9
+ export * from "../components/FlowMiniMap.vue.js";
4
10
  export * from "./tv.js";
5
11
  export * from "./utils.js";
@@ -1,5 +1,11 @@
1
1
  export * from "../components/DialogConfirm.vue";
2
2
  export * from "../components/DialogAlert.vue";
3
3
  export * from "../components/ToggleGroup.vue";
4
+ export * from "../components/Flow.vue";
5
+ export * from "../components/FlowNode.vue";
6
+ export * from "../components/FlowHandle.vue";
7
+ export * from "../components/FlowBackground.vue";
8
+ export * from "../components/FlowControls.vue";
9
+ export * from "../components/FlowMiniMap.vue";
4
10
  export * from "./tv.js";
5
11
  export * from "./utils.js";
@@ -11,6 +11,7 @@
11
11
  import plur from "plur";
12
12
  import slugify from "@sindresorhus/slugify";
13
13
  import * as date from "./std/date.js";
14
+ export { plur, slugify, date };
14
15
  declare const _default: {
15
16
  readonly plur: typeof plur;
16
17
  readonly slugify: typeof slugify;
@@ -1,6 +1,7 @@
1
1
  import plur from "plur";
2
2
  import slugify from "@sindresorhus/slugify";
3
3
  import * as date from "./std/date.js";
4
+ export { plur, slugify, date };
4
5
  export default {
5
6
  plur,
6
7
  slugify,