@pie-lib/graphing-solution-set 2.34.3-next.0 → 2.34.3-next.155

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 (142) hide show
  1. package/CHANGELOG.md +7 -78
  2. package/esm/package.json +3 -0
  3. package/lib/axis/arrow.js +19 -55
  4. package/lib/axis/arrow.js.map +1 -1
  5. package/lib/axis/axes.js +103 -193
  6. package/lib/axis/axes.js.map +1 -1
  7. package/lib/axis/index.js +1 -6
  8. package/lib/axis/index.js.map +1 -1
  9. package/lib/bg.js +21 -49
  10. package/lib/bg.js.map +1 -1
  11. package/lib/container/actions.js +2 -8
  12. package/lib/container/actions.js.map +1 -1
  13. package/lib/container/index.js +14 -60
  14. package/lib/container/index.js.map +1 -1
  15. package/lib/container/marks.js +1 -6
  16. package/lib/container/marks.js.map +1 -1
  17. package/lib/container/middleware.js +2 -8
  18. package/lib/container/middleware.js.map +1 -1
  19. package/lib/container/reducer.js +1 -8
  20. package/lib/container/reducer.js.map +1 -1
  21. package/lib/coordinates-label.js +23 -55
  22. package/lib/coordinates-label.js.map +1 -1
  23. package/lib/graph-with-controls.js +129 -203
  24. package/lib/graph-with-controls.js.map +1 -1
  25. package/lib/graph.js +61 -126
  26. package/lib/graph.js.map +1 -1
  27. package/lib/grid-setup.js +168 -224
  28. package/lib/grid-setup.js.map +1 -1
  29. package/lib/grid.js +29 -74
  30. package/lib/grid.js.map +1 -1
  31. package/lib/index.js +1 -12
  32. package/lib/index.js.map +1 -1
  33. package/lib/labels.js +84 -184
  34. package/lib/labels.js.map +1 -1
  35. package/lib/mark-label.js +39 -88
  36. package/lib/mark-label.js.map +1 -1
  37. package/lib/toggle-bar.js +155 -243
  38. package/lib/toggle-bar.js.map +1 -1
  39. package/lib/tool-menu.js +93 -200
  40. package/lib/tool-menu.js.map +1 -1
  41. package/lib/tools/index.js +2 -7
  42. package/lib/tools/index.js.map +1 -1
  43. package/lib/tools/line/component.js +48 -62
  44. package/lib/tools/line/component.js.map +1 -1
  45. package/lib/tools/line/index.js +1 -6
  46. package/lib/tools/line/index.js.map +1 -1
  47. package/lib/tools/polygon/component.js +76 -173
  48. package/lib/tools/polygon/component.js.map +1 -1
  49. package/lib/tools/polygon/index.js +6 -23
  50. package/lib/tools/polygon/index.js.map +1 -1
  51. package/lib/tools/polygon/line.js +48 -85
  52. package/lib/tools/polygon/line.js.map +1 -1
  53. package/lib/tools/polygon/polygon.js +62 -102
  54. package/lib/tools/polygon/polygon.js.map +1 -1
  55. package/lib/tools/shared/arrow-head.js +7 -20
  56. package/lib/tools/shared/arrow-head.js.map +1 -1
  57. package/lib/tools/shared/line/index.js +89 -185
  58. package/lib/tools/shared/line/index.js.map +1 -1
  59. package/lib/tools/shared/line/line-path.js +71 -95
  60. package/lib/tools/shared/line/line-path.js.map +1 -1
  61. package/lib/tools/shared/line/with-root-edge.js +22 -56
  62. package/lib/tools/shared/line/with-root-edge.js.map +1 -1
  63. package/lib/tools/shared/point/arrow-point.js +18 -45
  64. package/lib/tools/shared/point/arrow-point.js.map +1 -1
  65. package/lib/tools/shared/point/arrow.js +16 -42
  66. package/lib/tools/shared/point/arrow.js.map +1 -1
  67. package/lib/tools/shared/point/base-point.js +44 -58
  68. package/lib/tools/shared/point/base-point.js.map +1 -1
  69. package/lib/tools/shared/point/index.js +38 -52
  70. package/lib/tools/shared/point/index.js.map +1 -1
  71. package/lib/tools/shared/styles.js +8 -31
  72. package/lib/tools/shared/styles.js.map +1 -1
  73. package/lib/tools/shared/types.js +1 -5
  74. package/lib/tools/shared/types.js.map +1 -1
  75. package/lib/undo-redo.js +27 -67
  76. package/lib/undo-redo.js.map +1 -1
  77. package/lib/use-debounce.js +4 -11
  78. package/lib/use-debounce.js.map +1 -1
  79. package/lib/utils.js +56 -131
  80. package/lib/utils.js.map +1 -1
  81. package/package.json +34 -23
  82. package/src/__tests__/graph-with-controls.test.jsx +23 -10
  83. package/src/__tests__/graph.test.jsx +36 -171
  84. package/src/__tests__/grid.test.jsx +9 -6
  85. package/src/__tests__/labels.test.jsx +11 -8
  86. package/src/__tests__/mark-label.test.jsx +15 -17
  87. package/src/__tests__/toggle-bar.test.jsx +46 -17
  88. package/src/__tests__/tool-menu.test.jsx +12 -8
  89. package/src/__tests__/undo-redo.test.jsx +9 -8
  90. package/src/__tests__/utils.js +3 -0
  91. package/src/axis/__tests__/arrow.test.jsx +21 -17
  92. package/src/axis/__tests__/axes.test.jsx +117 -155
  93. package/src/axis/arrow.jsx +7 -12
  94. package/src/axis/axes.jsx +41 -51
  95. package/src/coordinates-label.jsx +13 -18
  96. package/src/graph-with-controls.jsx +90 -93
  97. package/src/grid-setup.jsx +210 -206
  98. package/src/grid.jsx +2 -4
  99. package/src/labels.jsx +83 -124
  100. package/src/mark-label.jsx +14 -25
  101. package/src/toggle-bar.jsx +135 -163
  102. package/src/tool-menu.jsx +136 -195
  103. package/src/tools/line/__tests__/component.test.jsx +7 -7
  104. package/src/tools/line/component.jsx +29 -29
  105. package/src/tools/polygon/__tests__/component.test.jsx +13 -152
  106. package/src/tools/polygon/__tests__/line.test.jsx +7 -9
  107. package/src/tools/polygon/__tests__/polygon.test.jsx +8 -8
  108. package/src/tools/polygon/component.jsx +2 -4
  109. package/src/tools/polygon/line.jsx +26 -24
  110. package/src/tools/polygon/polygon.jsx +35 -40
  111. package/src/tools/shared/__tests__/arrow-head.test.jsx +16 -17
  112. package/src/tools/shared/line/__tests__/index.test.jsx +26 -163
  113. package/src/tools/shared/line/__tests__/line-path.test.jsx +9 -9
  114. package/src/tools/shared/line/__tests__/with-root-edge.test.jsx +14 -24
  115. package/src/tools/shared/line/index.jsx +3 -3
  116. package/src/tools/shared/line/line-path.jsx +51 -48
  117. package/src/tools/shared/line/with-root-edge.jsx +1 -1
  118. package/src/tools/shared/point/__tests__/arrow-point.test.jsx +15 -11
  119. package/src/tools/shared/point/__tests__/base-point.test.jsx +14 -11
  120. package/src/tools/shared/point/base-point.jsx +33 -6
  121. package/src/tools/shared/point/index.jsx +30 -32
  122. package/src/undo-redo.jsx +16 -24
  123. package/src/__tests__/__snapshots__/graph-with-controls.test.jsx.snap +0 -114
  124. package/src/__tests__/__snapshots__/graph.test.jsx.snap +0 -213
  125. package/src/__tests__/__snapshots__/grid.test.jsx.snap +0 -54
  126. package/src/__tests__/__snapshots__/labels.test.jsx.snap +0 -30
  127. package/src/__tests__/__snapshots__/mark-label.test.jsx.snap +0 -37
  128. package/src/__tests__/__snapshots__/toggle-bar.test.jsx.snap +0 -7
  129. package/src/__tests__/__snapshots__/tool-menu.test.jsx.snap +0 -35
  130. package/src/__tests__/__snapshots__/undo-redo.test.jsx.snap +0 -15
  131. package/src/axis/__tests__/__snapshots__/arrow.test.jsx.snap +0 -33
  132. package/src/axis/__tests__/__snapshots__/axes.test.jsx.snap +0 -122
  133. package/src/tools/line/__tests__/__snapshots__/component.test.jsx.snap +0 -20
  134. package/src/tools/polygon/__tests__/__snapshots__/component.test.jsx.snap +0 -94
  135. package/src/tools/polygon/__tests__/__snapshots__/line.test.jsx.snap +0 -44
  136. package/src/tools/polygon/__tests__/__snapshots__/polygon.test.jsx.snap +0 -53
  137. package/src/tools/shared/__tests__/__snapshots__/arrow-head.test.jsx.snap +0 -32
  138. package/src/tools/shared/line/__tests__/__snapshots__/index.test.jsx.snap +0 -360
  139. package/src/tools/shared/line/__tests__/__snapshots__/line-path.test.jsx.snap +0 -57
  140. package/src/tools/shared/line/__tests__/__snapshots__/with-root-edge.test.jsx.snap +0 -63
  141. package/src/tools/shared/point/__tests__/__snapshots__/arrow-point.test.jsx.snap +0 -55
  142. package/src/tools/shared/point/__tests__/__snapshots__/base-point.test.jsx.snap +0 -43
@@ -1,35 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ToolMenu snapshot renders 1`] = `
4
- <ToolMenu
5
- className="className"
6
- classes={
7
- Object {
8
- "lineNameFont": "ToolMenu-lineNameFont-7",
9
- "lineTypeButtonLeftSelected": "ToolMenu-lineTypeButtonLeftSelected-8",
10
- "lineTypeButtonLeftSelectedDisabled": "ToolMenu-lineTypeButtonLeftSelectedDisabled-13",
11
- "lineTypeButtonLeftUnSelected": "ToolMenu-lineTypeButtonLeftUnSelected-9",
12
- "lineTypeButtonLeftUnSelectedDisabled": "ToolMenu-lineTypeButtonLeftUnSelectedDisabled-14",
13
- "lineTypeButtonRightSelected": "ToolMenu-lineTypeButtonRightSelected-10",
14
- "lineTypeButtonRightSelectedDisabled": "ToolMenu-lineTypeButtonRightSelectedDisabled-15",
15
- "lineTypeButtonRightUnSelected": "ToolMenu-lineTypeButtonRightUnSelected-11",
16
- "lineTypeButtonRightUnSelectedDisabled": "ToolMenu-lineTypeButtonRightUnSelectedDisabled-16",
17
- "lineTypeRadio": "ToolMenu-lineTypeRadio-12",
18
- "lineTypeText": "ToolMenu-lineTypeText-6",
19
- "radioButtonClass": "ToolMenu-radioButtonClass-1",
20
- "radioFieldButtons": "ToolMenu-radioFieldButtons-5",
21
- "radioFieldInner": "ToolMenu-radioFieldInner-3",
22
- "radioFieldOuter": "ToolMenu-radioFieldOuter-4",
23
- "selectLineRadioGroup": "ToolMenu-selectLineRadioGroup-2",
24
- }
25
- }
26
- currentTool="one"
27
- onChange={[MockFunction]}
28
- tools={
29
- Array [
30
- "one",
31
- "two",
32
- ]
33
- }
34
- />
35
- `;
@@ -1,15 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`UndoRedo snapshot renders 1`] = `
4
- <UndoRedo
5
- classes={
6
- Object {
7
- "button": "UndoRedo-button-1",
8
- "undoRedoDiv": "UndoRedo-undoRedoDiv-2",
9
- }
10
- }
11
- onRedo={[MockFunction]}
12
- onReset={[MockFunction]}
13
- onUndo={[MockFunction]}
14
- />
15
- `;
@@ -1,33 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Arrow snapshot down 1`] = `
4
- <path
5
- className="className"
6
- d="m 0,0 8,-5 0,10 -8,-5"
7
- transform="translate(0, 15) rotate(270)"
8
- />
9
- `;
10
-
11
- exports[`Arrow snapshot left 1`] = `
12
- <path
13
- className="className"
14
- d="m 0,0 8,-5 0,10 -8,-5"
15
- transform="translate(-15, 0) rotate(0)"
16
- />
17
- `;
18
-
19
- exports[`Arrow snapshot right 1`] = `
20
- <path
21
- className="className"
22
- d="m 0,0 8,-5 0,10 -8,-5"
23
- transform="translate(15, 0) rotate(180)"
24
- />
25
- `;
26
-
27
- exports[`Arrow snapshot up 1`] = `
28
- <path
29
- className="className"
30
- d="m 0,0 8,-5 0,10 -8,-5"
31
- transform="translate(0, -15) rotate(90)"
32
- />
33
- `;
@@ -1,122 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`RawXAxis snapshot renders 1`] = `
4
- <Fragment>
5
- <F
6
- left={0}
7
- scale={[MockFunction]}
8
- tickFormat={[Function]}
9
- tickLabelProps={[Function]}
10
- top={0}
11
- />
12
- <WithStyles(Arrow)
13
- direction="left"
14
- scale={
15
- Object {
16
- "x": [MockFunction],
17
- "y": [MockFunction] {
18
- "calls": Array [
19
- Array [
20
- 0,
21
- ],
22
- ],
23
- "results": Array [
24
- Object {
25
- "type": "return",
26
- "value": 0,
27
- },
28
- ],
29
- },
30
- }
31
- }
32
- x={0}
33
- y={0}
34
- />
35
- <WithStyles(Arrow)
36
- direction="right"
37
- scale={
38
- Object {
39
- "x": [MockFunction],
40
- "y": [MockFunction] {
41
- "calls": Array [
42
- Array [
43
- 0,
44
- ],
45
- ],
46
- "results": Array [
47
- Object {
48
- "type": "return",
49
- "value": 0,
50
- },
51
- ],
52
- },
53
- }
54
- }
55
- x={1}
56
- y={0}
57
- />
58
- </Fragment>
59
- `;
60
-
61
- exports[`RawYAxis snapshot renders 1`] = `
62
- <Fragment>
63
- <F
64
- height={400}
65
- hideZero={true}
66
- left={0}
67
- orientation="left"
68
- scale={[MockFunction]}
69
- tickFormat={[Function]}
70
- tickLabelProps={[Function]}
71
- tickLength={10}
72
- tickTextAnchor="bottom"
73
- top={0}
74
- />
75
- <WithStyles(Arrow)
76
- direction="down"
77
- scale={
78
- Object {
79
- "x": [MockFunction] {
80
- "calls": Array [
81
- Array [
82
- 0,
83
- ],
84
- ],
85
- "results": Array [
86
- Object {
87
- "type": "return",
88
- "value": 0,
89
- },
90
- ],
91
- },
92
- "y": [MockFunction],
93
- }
94
- }
95
- x={0}
96
- y={0}
97
- />
98
- <WithStyles(Arrow)
99
- direction="up"
100
- scale={
101
- Object {
102
- "x": [MockFunction] {
103
- "calls": Array [
104
- Array [
105
- 0,
106
- ],
107
- ],
108
- "results": Array [
109
- Object {
110
- "type": "return",
111
- "value": 0,
112
- },
113
- ],
114
- },
115
- "y": [MockFunction],
116
- }
117
- }
118
- x={0}
119
- y={1}
120
- />
121
- </Fragment>
122
- `;
@@ -1,20 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ArrowedLine snapshot renders 1`] = `
4
- <g>
5
- <defs>
6
- <ArrowMarker
7
- className=""
8
- id="1-enabled"
9
- size={5}
10
- />
11
- </defs>
12
- <line
13
- className="className"
14
- markerEnd="url(#1-enabled)"
15
- markerId="1"
16
- markerStart="url(#1-enabled)"
17
- onChange={[MockFunction]}
18
- />
19
- </g>
20
- `;
@@ -1,94 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`RawBaseComponent snapshot renders 1`] = `
4
- <g>
5
- <GridDraggable
6
- graphProps={
7
- Object {
8
- "domain": Object {
9
- "max": 1,
10
- "min": 0,
11
- "step": 1,
12
- },
13
- "range": Object {
14
- "max": 1,
15
- "min": 0,
16
- "step": 1,
17
- },
18
- "scale": Object {
19
- "x": [MockFunction],
20
- "y": [MockFunction],
21
- },
22
- "size": Object {
23
- "height": 400,
24
- "width": 400,
25
- },
26
- "snap": Object {
27
- "x": [MockFunction],
28
- "y": [MockFunction],
29
- },
30
- }
31
- }
32
- isSolution={false}
33
- onClick={[Function]}
34
- points={Array []}
35
- />
36
- </g>
37
- `;
38
-
39
- exports[`RawBaseComponent snapshot renders with labels 1`] = `
40
- <g>
41
- <GridDraggable
42
- graphProps={
43
- Object {
44
- "domain": Object {
45
- "max": 1,
46
- "min": 0,
47
- "step": 1,
48
- },
49
- "range": Object {
50
- "max": 1,
51
- "min": 0,
52
- "step": 1,
53
- },
54
- "scale": Object {
55
- "x": [MockFunction],
56
- "y": [MockFunction],
57
- },
58
- "size": Object {
59
- "height": 400,
60
- "width": 400,
61
- },
62
- "snap": Object {
63
- "x": [MockFunction],
64
- "y": [MockFunction],
65
- },
66
- }
67
- }
68
- isSolution={false}
69
- onClick={[Function]}
70
- points={
71
- Array [
72
- Object {
73
- "index": 0,
74
- "label": "A",
75
- "x": 0,
76
- "y": 0,
77
- },
78
- Object {
79
- "index": 1,
80
- "label": "B",
81
- "x": 2,
82
- "y": 2,
83
- },
84
- Object {
85
- "index": 2,
86
- "label": "C",
87
- "x": 0,
88
- "y": 2,
89
- },
90
- ]
91
- }
92
- />
93
- </g>
94
- `;
@@ -1,44 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Line snapshot renders 1`] = `
4
- <RawLine
5
- className="className"
6
- classes={
7
- Object {
8
- "correct": "RawLine-correct-3",
9
- "disabled": "RawLine-disabled-2",
10
- "incorrect": "RawLine-incorrect-4",
11
- "line": "RawLine-line-1",
12
- "missing": "RawLine-missing-5",
13
- }
14
- }
15
- from={Object {}}
16
- graphProps={
17
- Object {
18
- "domain": Object {
19
- "max": 1,
20
- "min": 0,
21
- "step": 1,
22
- },
23
- "range": Object {
24
- "max": 1,
25
- "min": 0,
26
- "step": 1,
27
- },
28
- "scale": Object {
29
- "x": [MockFunction],
30
- "y": [MockFunction],
31
- },
32
- "size": Object {
33
- "height": 400,
34
- "width": 400,
35
- },
36
- "snap": Object {
37
- "x": [MockFunction],
38
- "y": [MockFunction],
39
- },
40
- }
41
- }
42
- to={Object {}}
43
- />
44
- `;
@@ -1,53 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Polygon snapshot renders 1`] = `
4
- <RawPolygon
5
- className="className"
6
- classes={
7
- Object {
8
- "closed": "RawPolygon-closed-1",
9
- "correct": "RawPolygon-correct-6",
10
- "disabled": "RawPolygon-disabled-5",
11
- "gssClosed": "RawPolygon-gssClosed-3",
12
- "gssSolution": "RawPolygon-gssSolution-4",
13
- "incorrect": "RawPolygon-incorrect-7",
14
- "open": "RawPolygon-open-2",
15
- }
16
- }
17
- closed={false}
18
- graphProps={
19
- Object {
20
- "domain": Object {
21
- "max": 1,
22
- "min": 0,
23
- "step": 1,
24
- },
25
- "range": Object {
26
- "max": 1,
27
- "min": 0,
28
- "step": 1,
29
- },
30
- "scale": Object {
31
- "x": [MockFunction],
32
- "y": [MockFunction],
33
- },
34
- "size": Object {
35
- "height": 400,
36
- "width": 400,
37
- },
38
- "snap": Object {
39
- "x": [MockFunction],
40
- "y": [MockFunction],
41
- },
42
- }
43
- }
44
- points={
45
- Array [
46
- Object {
47
- "x": 1,
48
- "y": 1,
49
- },
50
- ]
51
- }
52
- />
53
- `;
@@ -1,32 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ArrowHead snapshot renders 1`] = `
4
- <polygon
5
- points="0,0 10,5 0,10"
6
- transform=""
7
- />
8
- `;
9
-
10
- exports[`ArrowMarker snapshot renders 1`] = `
11
- <marker
12
- className="className"
13
- id="id"
14
- markerHeight={10}
15
- markerWidth={10}
16
- orient="auto-start-reverse"
17
- refX={5}
18
- refY={5}
19
- style={
20
- Object {
21
- "fill": "#000000",
22
- }
23
- }
24
- viewBox="0 0 10 10"
25
- >
26
- <ArrowHead
27
- points=""
28
- size={10}
29
- transform=""
30
- />
31
- </marker>
32
- `;