@lincle/react-web-interactive 0.4.0-next.1

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 (37) hide show
  1. package/COPYING.LESSER.md +157 -0
  2. package/COPYING.md +675 -0
  3. package/README.md +297 -0
  4. package/dist/base.d.ts +1 -0
  5. package/dist/base.js +12 -0
  6. package/dist/components/Edge/index.d.ts +1 -0
  7. package/dist/components/Edge/index.js +5 -0
  8. package/dist/components/Edges/index.d.ts +1 -0
  9. package/dist/components/Edges/index.js +5 -0
  10. package/dist/components/Graph/index.d.ts +4 -0
  11. package/dist/components/Graph/index.js +18 -0
  12. package/dist/components/GraphContexts/index.d.ts +4 -0
  13. package/dist/components/GraphContexts/index.js +167 -0
  14. package/dist/components/Grid/index.d.ts +4 -0
  15. package/dist/components/Grid/index.js +13 -0
  16. package/dist/components/Interaction/index.d.ts +4 -0
  17. package/dist/components/Interaction/index.js +202 -0
  18. package/dist/components/Node/MoveNode/index.d.ts +4 -0
  19. package/dist/components/Node/MoveNode/index.js +164 -0
  20. package/dist/components/Node/PullNode/index.d.ts +4 -0
  21. package/dist/components/Node/PullNode/index.js +90 -0
  22. package/dist/components/Node/index.d.ts +4 -0
  23. package/dist/components/Node/index.js +127 -0
  24. package/dist/components/Nodes/index.d.ts +1 -0
  25. package/dist/components/Nodes/index.js +5 -0
  26. package/dist/components/Path/index.d.ts +1 -0
  27. package/dist/components/Path/index.js +5 -0
  28. package/dist/components/Pull/index.d.ts +4 -0
  29. package/dist/components/Pull/index.js +153 -0
  30. package/dist/components/index.d.ts +9 -0
  31. package/dist/components/index.js +24 -0
  32. package/dist/index.d.ts +2 -0
  33. package/dist/index.js +18 -0
  34. package/dist/shared.d.ts +48 -0
  35. package/dist/shared.js +18 -0
  36. package/dist/styles.g.css +162 -0
  37. package/package.json +102 -0
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ const jsx_runtime_1 = require("react/jsx-runtime");
15
+ const base_1 = require("../../base");
16
+ const shared_1 = require("../../shared");
17
+ const react_1 = require("react");
18
+ const emptyTranslation = [
19
+ undefined,
20
+ undefined
21
+ ];
22
+ const Pull = (_a, ref) => {
23
+ var _b, _c, _d, _e, _f, _g;
24
+ var { className = '', diagramId, height = 0, line: givenLine, markerEnd, markerStart, onDrag, path, shape: givenShape, sourceId, style, width = 0, x: givenX, y: givenY } = _a, additionalProps = __rest(_a, ["className", "diagramId", "height", "line", "markerEnd", "markerStart", "onDrag", "path", "shape", "sourceId", "style", "width", "x", "y"]);
25
+ const defaultLine = (_c = (_b = (0, react_1.useContext)(shared_1.GraphContext)) === null || _b === void 0 ? void 0 : _b.defaultSettings) === null || _c === void 0 ? void 0 : _c.line;
26
+ const defaultShape = (_e = (_d = (0, react_1.useContext)(shared_1.GraphContext)) === null || _d === void 0 ? void 0 : _d.defaultSettings) === null || _e === void 0 ? void 0 : _e.shape;
27
+ const line = (_f = givenLine !== null && givenLine !== void 0 ? givenLine : defaultLine) !== null && _f !== void 0 ? _f : shared_1.defaultSettings.line;
28
+ const shape = (_g = givenShape !== null && givenShape !== void 0 ? givenShape : defaultShape) !== null && _g !== void 0 ? _g : shared_1.defaultSettings.shape;
29
+ const { x, y } = (0, react_1.useMemo)(() => {
30
+ var _a, _b, _c, _d;
31
+ if (!(givenX || givenY)) {
32
+ const getNumber = /(-?\d+(\.\d+)?)/ug;
33
+ const [translateX, translateY] = ((_a = style === null || style === void 0 ? void 0 : style.pull) === null || _a === void 0 ? void 0 : _a.transform) ?
34
+ (_b = style.pull.transform.match(getNumber)) !== null && _b !== void 0 ? _b : emptyTranslation :
35
+ emptyTranslation;
36
+ const left = ((_c = style === null || style === void 0 ? void 0 : style.pull) === null || _c === void 0 ? void 0 : _c.left) ?
37
+ style.pull.left :
38
+ undefined;
39
+ const top = ((_d = style === null || style === void 0 ? void 0 : style.pull) === null || _d === void 0 ? void 0 : _d.top) ?
40
+ style.pull.top :
41
+ undefined;
42
+ return {
43
+ x: Number(translateX) || Number(left) || 0,
44
+ y: Number(translateY) || Number(top) || 0
45
+ };
46
+ }
47
+ return {
48
+ x: givenX !== null && givenX !== void 0 ? givenX : 0,
49
+ y: givenY !== null && givenY !== void 0 ? givenY : 0
50
+ };
51
+ }, [
52
+ givenX,
53
+ givenY,
54
+ style
55
+ ]);
56
+ const start = (0, react_1.useRef)({
57
+ x,
58
+ y
59
+ });
60
+ const position = (0, react_1.useRef)({
61
+ moved: false,
62
+ x,
63
+ y
64
+ });
65
+ position.current = {
66
+ moved: x !== start.current.x ||
67
+ y !== start.current.y,
68
+ x,
69
+ y
70
+ };
71
+ const adjustedStyle = (0, react_1.useMemo)(() => {
72
+ var _a;
73
+ const transform = ((_a = style === null || style === void 0 ? void 0 : style.pull) === null || _a === void 0 ? void 0 : _a.transform) ?
74
+ style.pull.transform :
75
+ `translate(${x}px, ${y}px)`;
76
+ return Object.assign(Object.assign(Object.assign({}, style), position.current.moved ?
77
+ undefined :
78
+ {
79
+ height,
80
+ width
81
+ }), { transform });
82
+ }, [
83
+ height,
84
+ style,
85
+ width,
86
+ x,
87
+ y
88
+ ]);
89
+ const source = (0, react_1.useMemo)(() => {
90
+ return {
91
+ height,
92
+ id: sourceId,
93
+ shape,
94
+ width,
95
+ x: start.current.x,
96
+ y: start.current.y
97
+ };
98
+ }, [
99
+ height,
100
+ shape,
101
+ sourceId,
102
+ width
103
+ ]);
104
+ const target = (0, react_1.useMemo)(() => {
105
+ return {
106
+ height: 0,
107
+ id: '',
108
+ shape: 'rectangle',
109
+ width: 0,
110
+ x,
111
+ y
112
+ };
113
+ }, [
114
+ x,
115
+ y
116
+ ]);
117
+ const markerId = (0, react_1.useMemo)(() => {
118
+ return diagramId ?
119
+ `${diagramId}-` :
120
+ '';
121
+ }, [
122
+ diagramId
123
+ ]);
124
+ const svg = (0, react_1.useMemo)(() => {
125
+ if (position.current.moved) {
126
+ if (path) {
127
+ return path('potential', source, target);
128
+ }
129
+ return ((0, jsx_runtime_1.jsx)(base_1.Path, { id: 'potential', line: line, markerEnd: markerEnd || diagramId ?
130
+ `url(#diagram-${markerId}marker-arrow)` :
131
+ undefined, markerStart: markerStart || diagramId ?
132
+ `url(#diagram-${markerId}marker-circle)` :
133
+ undefined, source: source, target: target }));
134
+ }
135
+ return null;
136
+ }, [
137
+ diagramId,
138
+ line,
139
+ markerEnd,
140
+ markerId,
141
+ markerStart,
142
+ path,
143
+ source,
144
+ target
145
+ ]);
146
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: `${className} ${position.current.moved ?
147
+ 'lincle-interactive-moved' :
148
+ 'lincle-interactive-hidden'} lincle-interactive-drag`, onDrag: onDrag, ref: ref, style: adjustedStyle }, additionalProps)), (0, jsx_runtime_1.jsx)("svg", { className: position.current.moved ?
149
+ '' :
150
+ 'lincle-interactive-hidden', children: svg })] }));
151
+ };
152
+ Pull.displayName = 'LincleInteractivePull';
153
+ exports.default = (0, react_1.forwardRef)(Pull);
@@ -0,0 +1,9 @@
1
+ export { default as Edge } from './Edge';
2
+ export { default as Edges } from './Edges';
3
+ export { default as Graph } from './Graph';
4
+ export { default as GraphContexts } from './GraphContexts';
5
+ export { default as Grid } from './Grid';
6
+ export { default as Node } from './Node';
7
+ export { default as Nodes } from './Nodes';
8
+ export { default as Path } from './Path';
9
+ export { default as Pull } from './Pull';
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Pull = exports.Path = exports.Nodes = exports.Node = exports.Grid = exports.GraphContexts = exports.Graph = exports.Edges = exports.Edge = void 0;
7
+ var Edge_1 = require("./Edge");
8
+ Object.defineProperty(exports, "Edge", { enumerable: true, get: function () { return __importDefault(Edge_1).default; } });
9
+ var Edges_1 = require("./Edges");
10
+ Object.defineProperty(exports, "Edges", { enumerable: true, get: function () { return __importDefault(Edges_1).default; } });
11
+ var Graph_1 = require("./Graph");
12
+ Object.defineProperty(exports, "Graph", { enumerable: true, get: function () { return __importDefault(Graph_1).default; } });
13
+ var GraphContexts_1 = require("./GraphContexts");
14
+ Object.defineProperty(exports, "GraphContexts", { enumerable: true, get: function () { return __importDefault(GraphContexts_1).default; } });
15
+ var Grid_1 = require("./Grid");
16
+ Object.defineProperty(exports, "Grid", { enumerable: true, get: function () { return __importDefault(Grid_1).default; } });
17
+ var Node_1 = require("./Node");
18
+ Object.defineProperty(exports, "Node", { enumerable: true, get: function () { return __importDefault(Node_1).default; } });
19
+ var Nodes_1 = require("./Nodes");
20
+ Object.defineProperty(exports, "Nodes", { enumerable: true, get: function () { return __importDefault(Nodes_1).default; } });
21
+ var Path_1 = require("./Path");
22
+ Object.defineProperty(exports, "Path", { enumerable: true, get: function () { return __importDefault(Path_1).default; } });
23
+ var Pull_1 = require("./Pull");
24
+ Object.defineProperty(exports, "Pull", { enumerable: true, get: function () { return __importDefault(Pull_1).default; } });
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export * from './shared';
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./components"), exports);
18
+ __exportStar(require("./shared"), exports);
@@ -0,0 +1,48 @@
1
+ import { type DraggableData, type EdgeControlProps, type EdgeProps, type EdgesProps, type Mode, type MoveNodeProps as SharedMoveNodeProps, type NodeProps as SharedNodeProps, type NodesProps, type Position, type PullNodeProps as SharedPullNodeProps, type PullProps as SharedPullProps, type ScaleProps, type SnapProps, type TransformProps, type TranslateProps } from '@lincle/react-interactive-shared';
2
+ import { type GraphContextsProps as BaseGraphContextsProps, type GraphProps as BaseGraphProps, type NodeProps as BaseNodeProps } from '@lincle/react-web-base';
3
+ import { type CSSProperties, type MouseEvent, type ReactElement, type ReactNode, type TouchEvent } from 'react';
4
+ export { defaultScale, defaultSettings, disableMove, disablePull, type DraggableData, type EdgeNodeProps, GraphContext, GridContext, type GridProps, ModeContext, type ModeType, NodeContext, type Position, ScaleContext, SnapContext, TransformContext, transformDefaults, TranslateContext, translateDefaults } from '@lincle/react-interactive-shared';
5
+ export type DraggableEvent = MouseEvent | MouseEvent<HTMLElement | SVGElement> | TouchEvent | TouchEvent<HTMLElement | SVGElement>;
6
+ export type NodeControlProps = {
7
+ onDrag?: (event: DraggableEvent, data: DraggableData) => void;
8
+ onEdgeDrop?: (sourceId: number | string, targetId?: number | string) => void;
9
+ onSelect?: () => void;
10
+ onStart?: (event: DraggableEvent) => void;
11
+ onStop?: (event: DraggableEvent, data: DraggableData) => void;
12
+ };
13
+ export type GraphNodeControlProps = {
14
+ onNodeDrag?: (event: DraggableEvent, nodeId: number | string, data: DraggableData) => void;
15
+ onNodeSelect?: (nodeId: number | string) => void;
16
+ onNodeStart?: (event: DraggableEvent, nodeId: number | string) => void;
17
+ onNodeStop?: (event: DraggableEvent, nodeId: number | string, data: DraggableData) => void;
18
+ };
19
+ export type PullProps = Omit<EdgeProps, 'children' | 'id' | 'path' | 'targetId'> & Omit<NodeProps, 'children' | 'id'> & SharedPullProps & {
20
+ className?: string;
21
+ style?: {
22
+ pull?: CSSProperties;
23
+ };
24
+ };
25
+ export type PullNodeProps = Omit<NodeProps, 'id'> & SharedPullNodeProps & {
26
+ className?: string;
27
+ style?: {
28
+ node?: CSSProperties;
29
+ pull?: CSSProperties;
30
+ };
31
+ };
32
+ export type NodeProps = SharedNodeProps & BaseNodeProps & NodeControlProps;
33
+ export type NodeContextProps = EdgeControlProps & GraphNodeControlProps;
34
+ export type GraphContextsProps = BaseGraphContextsProps & EdgeControlProps & GraphNodeControlProps & Partial<Mode> & ScaleProps & SnapProps & TransformProps & TranslateProps;
35
+ export type InteractionControlProps = {
36
+ onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
37
+ onMouseUp?: (event: MouseEvent<HTMLDivElement>) => void;
38
+ onTouchEnd?: (event: TouchEvent<HTMLDivElement>) => void;
39
+ onTouchStart?: (event: TouchEvent<HTMLDivElement>) => void;
40
+ };
41
+ export type InteractionProps = InteractionControlProps & Pick<GraphProps, 'children'>;
42
+ export type GraphProps = EdgeControlProps & GraphNodeControlProps & InteractionControlProps & Omit<BaseGraphProps, 'children' | 'id'> & Partial<Mode> & ScaleProps & SnapProps & TransformProps & TranslateProps & {
43
+ children?: Array<ReactElement<EdgesProps | NodesProps>> | ReactNode | ReactNode[];
44
+ id?: number | string;
45
+ };
46
+ export type MoveNodeProps = Omit<NodeProps, 'onDrag' | 'onSelect'> & SharedMoveNodeProps & BaseNodeProps & {
47
+ readonly onDrag?: (event: DraggableEvent, data: DraggableData, position: Position) => void;
48
+ };
package/dist/shared.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.translateDefaults = exports.TranslateContext = exports.transformDefaults = exports.TransformContext = exports.SnapContext = exports.ScaleContext = exports.NodeContext = exports.ModeContext = exports.GridContext = exports.GraphContext = exports.disablePull = exports.disableMove = exports.defaultSettings = exports.defaultScale = void 0;
4
+ var react_interactive_shared_1 = require("@lincle/react-interactive-shared");
5
+ Object.defineProperty(exports, "defaultScale", { enumerable: true, get: function () { return react_interactive_shared_1.defaultScale; } });
6
+ Object.defineProperty(exports, "defaultSettings", { enumerable: true, get: function () { return react_interactive_shared_1.defaultSettings; } });
7
+ Object.defineProperty(exports, "disableMove", { enumerable: true, get: function () { return react_interactive_shared_1.disableMove; } });
8
+ Object.defineProperty(exports, "disablePull", { enumerable: true, get: function () { return react_interactive_shared_1.disablePull; } });
9
+ Object.defineProperty(exports, "GraphContext", { enumerable: true, get: function () { return react_interactive_shared_1.GraphContext; } });
10
+ Object.defineProperty(exports, "GridContext", { enumerable: true, get: function () { return react_interactive_shared_1.GridContext; } });
11
+ Object.defineProperty(exports, "ModeContext", { enumerable: true, get: function () { return react_interactive_shared_1.ModeContext; } });
12
+ Object.defineProperty(exports, "NodeContext", { enumerable: true, get: function () { return react_interactive_shared_1.NodeContext; } });
13
+ Object.defineProperty(exports, "ScaleContext", { enumerable: true, get: function () { return react_interactive_shared_1.ScaleContext; } });
14
+ Object.defineProperty(exports, "SnapContext", { enumerable: true, get: function () { return react_interactive_shared_1.SnapContext; } });
15
+ Object.defineProperty(exports, "TransformContext", { enumerable: true, get: function () { return react_interactive_shared_1.TransformContext; } });
16
+ Object.defineProperty(exports, "transformDefaults", { enumerable: true, get: function () { return react_interactive_shared_1.transformDefaults; } });
17
+ Object.defineProperty(exports, "TranslateContext", { enumerable: true, get: function () { return react_interactive_shared_1.TranslateContext; } });
18
+ Object.defineProperty(exports, "translateDefaults", { enumerable: true, get: function () { return react_interactive_shared_1.translateDefaults; } });
@@ -0,0 +1,162 @@
1
+ /* edge */
2
+
3
+ .lincle-base-edges {
4
+ position: absolute;
5
+ z-index: -1;
6
+ overflow: visible;
7
+
8
+ /* width: 1px; */
9
+
10
+ /* height: 1px; */
11
+ filter: drop-shadow(0 3px 6px rgba(0 0 0 / 16%)) drop-shadow(0 3px 6px rgba(0 0 0 23%));
12
+ backface-visibility: hidden;
13
+ }
14
+
15
+ .lincle-base-edges > :not(path) {
16
+ cursor: unset;
17
+ }
18
+
19
+ .lincle-base-edge-marker-arrow {
20
+ fill: black;
21
+ }
22
+
23
+ .lincle-base-edge-marker-circle {
24
+ fill: black;
25
+ }
26
+
27
+ /* grid */
28
+
29
+ .lincle-base-grid {
30
+ position: absolute;
31
+ width: 100%;
32
+ height: 100%;
33
+ }
34
+
35
+ /* node */
36
+
37
+ .lincle-base-node {
38
+ position: absolute;
39
+ transform-origin: 0 0;
40
+ }
41
+
42
+ /* path */
43
+
44
+ .lincle-base-edge-path {
45
+ stroke: black;
46
+ }
47
+
48
+ .lincle-base-edge-path:hover {
49
+ animation: lincle-base-edgedash 1.5s linear reverse infinite;
50
+ stroke-dasharray: 5 5;
51
+ }
52
+
53
+ .lincle-base-edge-dash-all .lincle-base-edge-path {
54
+ animation: lincle-base-edgedash 1.5s linear reverse infinite;
55
+ stroke-dasharray: 5 5;
56
+ }
57
+
58
+ .lincle-base-edge-dash-none .lincle-base-edge-path {
59
+ animation: none;
60
+ stroke-dasharray: none;
61
+ }
62
+
63
+ .lincle-base-edge-dash-on {
64
+ animation: lincle-base-edgedash 1.5s linear reverse infinite;
65
+ stroke-dasharray: 5 5;
66
+ }
67
+
68
+ .lincle-base-edge-dash-off.lincle-base-edge-path:hover {
69
+ animation: none;
70
+ stroke-dasharray: none;
71
+ }
72
+
73
+ .lincle-base-edge-path-border {
74
+ stroke-width: 30px;
75
+ stroke: black;
76
+ opacity: 0;
77
+ pointer-events: all;
78
+ }
79
+
80
+ .lincle-base-edge-path-border:hover + .lincle-base-edge-path {
81
+ animation: lincle-base-edgedash 1.5s linear reverse infinite;
82
+ stroke-dasharray: 5 5;
83
+ }
84
+
85
+ .lincle-base-edge-path-border:hover + .lincle-base-edge-dash-off.lincle-base-edge-path {
86
+ animation: none;
87
+ stroke-dasharray: none;
88
+ }
89
+
90
+ .lincle-base-edge-dash-none .lincle-base-edge-path-border:hover + .lincle-base-edge-path {
91
+ animation: none;
92
+ stroke-dasharray: none;
93
+ }
94
+
95
+ @keyframes lincle-base-edgedash {
96
+ to {
97
+ stroke-dashoffset: 30;
98
+ }
99
+ }
100
+
101
+ /* Interaction */
102
+
103
+ .lincle-interactive-graph {
104
+ position: relative;
105
+ width: 100%;
106
+ height: 100%;
107
+ overflow: hidden;
108
+ cursor: cell;
109
+ touch-action: none;
110
+ user-select: none;
111
+ }
112
+
113
+ .lincle-interactive-graph:active {
114
+ cursor: all-scroll;
115
+ }
116
+
117
+ .lincle-interactive-transform {
118
+ transform-origin: 0 0;
119
+ will-change: transform;
120
+ backface-visibility: hidden;
121
+ }
122
+
123
+ /* Pull */
124
+
125
+ .lincle-interactive-drag {
126
+ position: absolute;
127
+ z-index: 1;
128
+ transform-origin: 0 0;
129
+ cursor: grab;
130
+ will-change: transform;
131
+ }
132
+
133
+ .lincle-interactive-moved {
134
+ width: 200px;
135
+ height: 200px;
136
+ margin: -100px 0 0 -100px;
137
+ }
138
+
139
+ .lincle-interactive-drag:active {
140
+ cursor: grabbing;
141
+ }
142
+
143
+ .lincle-interactive-drag + svg {
144
+ position: absolute;
145
+ overflow: visible;
146
+ pointer-events: none;
147
+ }
148
+
149
+ .lincle-interactive-drag + svg > path {
150
+ animation: lincle-interactive-dash 20s linear reverse infinite;
151
+ stroke-dasharray: 5 5;
152
+ }
153
+
154
+ .lincle-interactive-hidden {
155
+ opacity: 0;
156
+ }
157
+
158
+ @keyframes lincle-interactive-dash {
159
+ to {
160
+ stroke-dashoffset: 1000;
161
+ }
162
+ }
package/package.json ADDED
@@ -0,0 +1,102 @@
1
+ {
2
+ "name": "@lincle/react-web-interactive",
3
+ "title": "lincle react web interactive",
4
+ "license": "LGPL-3.0-or-later",
5
+ "version": "0.4.0-next.1",
6
+ "private": false,
7
+ "description": "A 'reactive' React node and edge generator",
8
+ "author": "wallzero @wallzeroblog (http://wallzero.com)",
9
+ "contributors": [
10
+ {
11
+ "name": "Connor Schlesiger",
12
+ "email": "connor@schlesiger.ca",
13
+ "position": "Initial and Lead Developer"
14
+ }
15
+ ],
16
+ "main": "dist/index.js",
17
+ "types": "dist/index.d.ts",
18
+ "files": [
19
+ "dist/",
20
+ "COPYING.md",
21
+ "COPYING.LESSER.md"
22
+ ],
23
+ "homepage": "https://gitlab.com//tree/master/packages/react-web-interactive/",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://gitlab.com/.git"
27
+ },
28
+ "bugs": {
29
+ "url": "https://gitlab.com//issues"
30
+ },
31
+ "scripts": {
32
+ "build": "run-s clean:dist build:prod build:styles",
33
+ "build:prod": "tsc -p ./tsconfig.json",
34
+ "build:watch": "run-s clean:dist build:prod build:styles build:watch:tsc",
35
+ "build:watch:tsc": "tsc -p ./tsconfig.json --watch --pretty --preserveWatchOutput",
36
+ "build:styles": "ncp src/styles.g.css dist/styles.g.css",
37
+ "----------------------------------------------------------------": "",
38
+ "build:prod:config": "",
39
+ "---------------------------------------------------------------": "",
40
+ "lint": "run-p lint:es",
41
+ "lint:es": "eslint --resolve-plugins-relative-to . 'src/**/*.[jt]s?(x)' --ignore-pattern 'src/**/*.(d.ts|json)'",
42
+ "clean": "run-s clean:dist clean:node_modules",
43
+ "clean:node_modules": "rimraf node_modules yarn.lock package-lock.json",
44
+ "clean:dist": "rimraf dist"
45
+ },
46
+ "devDependencies": {
47
+ "@digest/eslint-config-jest": "^4.3.0",
48
+ "@digest/eslint-config-react": "^4.3.0",
49
+ "@digest/eslint-config-typescript": "^4.3.0",
50
+ "@digest/jest-junit": "^4.3.0",
51
+ "@digest/jest-react": "^4.3.0",
52
+ "@digest/jest-typescript": "^4.3.0",
53
+ "@digest/typescript": "^4.3.0",
54
+ "@types/bezier-js": "^4.1.3",
55
+ "@types/jest": "^29.5.12",
56
+ "@types/lodash.throttle": "^4.1.9",
57
+ "@types/lodash.debounce": "^4.0.9",
58
+ "@types/node": "^20.12.4",
59
+ "@types/react": "^18.2.74",
60
+ "@types/react-dom": "^18.2.24",
61
+ "@types/react-test-renderer": "^18.0.7",
62
+ "cross-env": "^7.0.3",
63
+ "jest-environment-jsdom": "^29.7.0",
64
+ "jest-environment-jsdom-global": "^4.0.0",
65
+ "ncp": "^2.0.0",
66
+ "npm-run-all": "^4.1.5",
67
+ "react": "^18.2.0",
68
+ "react-dom": "^18.2.0",
69
+ "react-test-renderer": "^18.2.0",
70
+ "rimraf": "^5.0.5"
71
+ },
72
+ "dependencies": {
73
+ "@lincle/react-interactive-shared": "^0.0.1",
74
+ "@lincle/react-shared": "^0.0.1",
75
+ "@lincle/react-web-base": "^0.0.1",
76
+ "react-draggable": "^4.4.6",
77
+ "react-map-interaction": "^2.1.0"
78
+ },
79
+ "peerDependencies": {
80
+ "react": "^16.0.0 || ^17.0.0 || ^18.0.0",
81
+ "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0"
82
+ },
83
+ "keywords": [
84
+ "library",
85
+ "lincle",
86
+ "typescript",
87
+ "react",
88
+ "reactjs",
89
+ "react-dom",
90
+ "react-web",
91
+ "reactive",
92
+ "react-draggable",
93
+ "interactive",
94
+ "graph",
95
+ "diagram",
96
+ "dag",
97
+ "acyclical graph",
98
+ "cyclical graph",
99
+ "dragndrop",
100
+ "drag"
101
+ ]
102
+ }