texteditorrefactor 0.0.5 → 0.0.12

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 (102) hide show
  1. package/dist/components/Atoms/AssistantImageModal/ImageModal.js +2 -1
  2. package/dist/components/Atoms/AssistantImageModal/ImageModal.js.map +1 -1
  3. package/dist/components/Molecules/AccordianPay4/Accordian.d.ts +2 -13
  4. package/dist/components/Molecules/AccordianPay4/Accordian.js +13 -14
  5. package/dist/components/Molecules/AccordianPay4/Accordian.js.map +1 -1
  6. package/dist/components/Molecules/AccordianPay4/Accordian.stories.js.map +1 -1
  7. package/dist/components/Molecules/ActivityBanner/ActivityBanner.js +1 -1
  8. package/dist/components/Molecules/ActivityBanner/ActivityBanner.js.map +1 -1
  9. package/dist/components/Molecules/DescriptiveAnswer/DescriptiveAnswerV1.js +15 -4
  10. package/dist/components/Molecules/DescriptiveAnswer/DescriptiveAnswerV1.js.map +1 -1
  11. package/dist/components/Molecules/RecapNode/ContentView.d.ts +2 -0
  12. package/dist/components/Molecules/RecapNode/ContentView.js +43 -0
  13. package/dist/components/Molecules/RecapNode/ContentView.js.map +1 -0
  14. package/dist/components/Molecules/RecapNode/FlashcardNode.d.ts +0 -0
  15. package/dist/components/Molecules/RecapNode/FlashcardNode.js +2 -0
  16. package/dist/components/Molecules/RecapNode/FlashcardNode.js.map +1 -0
  17. package/dist/components/Molecules/RecapNode/Node.d.ts +3 -0
  18. package/dist/components/Molecules/RecapNode/Node.js +60 -0
  19. package/dist/components/Molecules/RecapNode/Node.js.map +1 -0
  20. package/dist/components/Molecules/RecapNode/Node.stories.d.ts +10 -0
  21. package/dist/components/Molecules/RecapNode/Node.stories.js +117 -0
  22. package/dist/components/Molecules/RecapNode/Node.stories.js.map +1 -0
  23. package/dist/components/Molecules/RecapNode/Node.styles.d.ts +11 -0
  24. package/dist/components/Molecules/RecapNode/Node.styles.js +53 -0
  25. package/dist/components/Molecules/RecapNode/Node.styles.js.map +1 -0
  26. package/dist/components/Molecules/RecapNode/SectionView.d.ts +6 -0
  27. package/dist/components/Molecules/RecapNode/SectionView.js +90 -0
  28. package/dist/components/Molecules/RecapNode/SectionView.js.map +1 -0
  29. package/dist/components/Molecules/RecapNode/VideoView.d.ts +5 -0
  30. package/dist/components/Molecules/RecapNode/VideoView.js +23 -0
  31. package/dist/components/Molecules/RecapNode/VideoView.js.map +1 -0
  32. package/dist/components/Molecules/SmartLearn/SmartLearn.js +7 -4
  33. package/dist/components/Molecules/SmartLearn/SmartLearn.js.map +1 -1
  34. package/dist/components/Molecules/SmartLearn/SmartLearn.stories.js +2 -0
  35. package/dist/components/Molecules/SmartLearn/SmartLearn.stories.js.map +1 -1
  36. package/dist/components/Molecules/SmartLearn/types.d.ts +16 -1
  37. package/dist/components/Molecules/VideoView/VideoModal.js +2 -2
  38. package/dist/components/Molecules/VideoView/VideoModal.js.map +1 -1
  39. package/dist/components/Molecules/comprehension/ComprehensionLayout.js +9 -5
  40. package/dist/components/Molecules/comprehension/ComprehensionLayout.js.map +1 -1
  41. package/dist/components/Organisms/D3Graphs/Reactflow.d.ts +1 -0
  42. package/dist/components/Organisms/D3Graphs/Reactflow.js +244 -0
  43. package/dist/components/Organisms/D3Graphs/Reactflow.js.map +1 -0
  44. package/dist/components/Organisms/FlashCardNode/AccordionChildItem.d.ts +1 -0
  45. package/dist/components/Organisms/FlashCardNode/AccordionChildItem.js +37 -0
  46. package/dist/components/Organisms/FlashCardNode/AccordionChildItem.js.map +1 -0
  47. package/dist/components/Organisms/FlashCardNode/FlashCardNode.d.ts +3 -0
  48. package/dist/components/Organisms/FlashCardNode/FlashCardNode.js +50 -0
  49. package/dist/components/Organisms/FlashCardNode/FlashCardNode.js.map +1 -0
  50. package/dist/components/Organisms/FlashCardNode/FlashcardContainer.d.ts +26 -0
  51. package/dist/components/Organisms/FlashCardNode/FlashcardContainer.js +54 -0
  52. package/dist/components/Organisms/FlashCardNode/FlashcardContainer.js.map +1 -0
  53. package/dist/components/Organisms/FlashCardNode/FlashcardNode.stories.d.ts +15 -0
  54. package/dist/components/Organisms/FlashCardNode/FlashcardNode.stories.js +301 -0
  55. package/dist/components/Organisms/FlashCardNode/FlashcardNode.stories.js.map +1 -0
  56. package/dist/components/Organisms/FlashCardNode/IconBar.d.ts +5 -0
  57. package/dist/components/Organisms/FlashCardNode/IconBar.js +22 -0
  58. package/dist/components/Organisms/FlashCardNode/IconBar.js.map +1 -0
  59. package/dist/components/Organisms/FlashCardNode/MobileAccordionView.d.ts +9 -0
  60. package/dist/components/Organisms/FlashCardNode/MobileAccordionView.js +127 -0
  61. package/dist/components/Organisms/FlashCardNode/MobileAccordionView.js.map +1 -0
  62. package/dist/components/Organisms/FlashCardNode/NodeHandles.d.ts +3 -0
  63. package/dist/components/Organisms/FlashCardNode/NodeHandles.js +22 -0
  64. package/dist/components/Organisms/FlashCardNode/NodeHandles.js.map +1 -0
  65. package/dist/components/Organisms/RecapGraph/Example.stories.d.ts +3 -0
  66. package/dist/components/Organisms/RecapGraph/Example.stories.js +36 -0
  67. package/dist/components/Organisms/RecapGraph/Example.stories.js.map +1 -0
  68. package/dist/components/Organisms/RecapGraph/FlashCardNode.d.ts +3 -0
  69. package/dist/components/Organisms/RecapGraph/FlashCardNode.js +48 -0
  70. package/dist/components/Organisms/RecapGraph/FlashCardNode.js.map +1 -0
  71. package/dist/components/Organisms/RecapGraph/IconBar.d.ts +5 -0
  72. package/dist/components/Organisms/RecapGraph/IconBar.js +19 -0
  73. package/dist/components/Organisms/RecapGraph/IconBar.js.map +1 -0
  74. package/dist/components/Organisms/RecapGraph/NodeHandles.d.ts +4 -0
  75. package/dist/components/Organisms/RecapGraph/NodeHandles.js +21 -0
  76. package/dist/components/Organisms/RecapGraph/NodeHandles.js.map +1 -0
  77. package/dist/components/Organisms/RecapGraph/Reactgraphflow.d.ts +10 -0
  78. package/dist/components/Organisms/RecapGraph/Reactgraphflow.js +261 -0
  79. package/dist/components/Organisms/RecapGraph/Reactgraphflow.js.map +1 -0
  80. package/dist/components/Organisms/ReviewComponent/ChatPresenter.js +2 -2
  81. package/dist/components/Organisms/ReviewComponent/ChatPresenter.js.map +1 -1
  82. package/dist/components/Organisms/ReviewComponent/Review.d.ts +2 -1
  83. package/dist/components/Organisms/ReviewComponent/Review.js +4 -4
  84. package/dist/components/Organisms/ReviewComponent/Review.js.map +1 -1
  85. package/dist/components/Organisms/ReviewComponent/ReviewPresenter.d.ts +3 -1
  86. package/dist/components/Organisms/ReviewComponent/ReviewPresenter.js +4 -3
  87. package/dist/components/Organisms/ReviewComponent/ReviewPresenter.js.map +1 -1
  88. package/dist/components/Organisms/StudentEditor/StudentEditor.stories.js +2 -2
  89. package/dist/components/Organisms/StudentEditor/StudentEditor.stories.js.map +1 -1
  90. package/dist/components/Organisms/StudentEditor/components/EditorComponent.js +4 -3
  91. package/dist/components/Organisms/StudentEditor/components/EditorComponent.js.map +1 -1
  92. package/dist/components/Organisms/StudentEditor/components/TextEditor.js +30 -9
  93. package/dist/components/Organisms/StudentEditor/components/TextEditor.js.map +1 -1
  94. package/dist/components/Organisms/TableComponent/TableComponent.js +1 -1
  95. package/dist/components/Organisms/TableComponent/TableComponent.js.map +1 -1
  96. package/dist/utils/RecapData.d.ts +213 -0
  97. package/dist/utils/RecapData.js +791 -0
  98. package/dist/utils/RecapData.js.map +1 -0
  99. package/dist/utils/contentUtils.d.ts +41 -0
  100. package/dist/utils/contentUtils.js +60 -0
  101. package/dist/utils/contentUtils.js.map +1 -0
  102. package/package.json +1 -1
@@ -0,0 +1,301 @@
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.EmptyContent = exports.MultipleChildrenNode = exports.LiteratureNode = exports.AllContentTypes = exports.Level2WithEquations = exports.Level2WithFormulas = exports.Level1WithDefinitions = exports.RootWithVideos = exports.BasicNode = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const reactflow_1 = require("reactflow");
9
+ const FlashCardNode_1 = __importDefault(require("./FlashCardNode"));
10
+ require("reactflow/dist/style.css");
11
+ // Mock icons for stories
12
+ const mockIcons = [
13
+ {
14
+ type: 'videos',
15
+ src: 'https://api.iconify.design/mdi/video.svg?color=%23666'
16
+ },
17
+ {
18
+ type: 'definitions',
19
+ src: 'https://api.iconify.design/mdi/book-open.svg?color=%23666'
20
+ },
21
+ {
22
+ type: 'formula',
23
+ src: 'https://api.iconify.design/mdi/math-compass.svg?color=%23666'
24
+ },
25
+ {
26
+ type: 'equations',
27
+ src: 'https://api.iconify.design/mdi/function-variant.svg?color=%23666'
28
+ }
29
+ ];
30
+ const meta = {
31
+ title: "Components/Molecules/FlashcardNode",
32
+ component: FlashCardNode_1.default,
33
+ decorators: [
34
+ (Story) => ((0, jsx_runtime_1.jsx)(reactflow_1.ReactFlowProvider, { children: (0, jsx_runtime_1.jsx)("div", { style: { padding: "40px", background: "#f5f5f5" }, children: (0, jsx_runtime_1.jsx)(Story, {}) }) })),
35
+ ],
36
+ };
37
+ exports.default = meta;
38
+ // Basic node without content
39
+ exports.BasicNode = {
40
+ args: {
41
+ data: {
42
+ label: 'Basic Topic',
43
+ color: '#E0F2FE',
44
+ level: 0,
45
+ hasContent: false,
46
+ hasMultipleChildren: false,
47
+ },
48
+ },
49
+ };
50
+ // Root node with video content
51
+ exports.RootWithVideos = {
52
+ args: {
53
+ data: {
54
+ label: 'Introduction to Physics',
55
+ color: '#DBEAFE',
56
+ level: 0,
57
+ hasContent: true,
58
+ hasMultipleChildren: false,
59
+ icons: mockIcons,
60
+ content: {
61
+ videos: [
62
+ 'Video 1: Newton\'s Laws',
63
+ 'Video 2: Motion and Forces',
64
+ 'Video 3: Energy Conservation'
65
+ ]
66
+ }
67
+ },
68
+ },
69
+ };
70
+ // Level 1 node with definitions
71
+ exports.Level1WithDefinitions = {
72
+ args: {
73
+ data: {
74
+ label: 'Chemical Bonding',
75
+ color: '#FEF3C7',
76
+ level: 1,
77
+ hasContent: true,
78
+ hasMultipleChildren: false,
79
+ icons: mockIcons,
80
+ content: {
81
+ sections: {
82
+ definitions: [
83
+ {
84
+ title: 'Ionic Bond',
85
+ description: 'A chemical bond formed through electrostatic attraction between oppositely charged ions.'
86
+ },
87
+ {
88
+ title: 'Covalent Bond',
89
+ description: 'A chemical bond formed by sharing electrons between atoms.'
90
+ },
91
+ {
92
+ title: 'Metallic Bond',
93
+ description: 'A bond formed by the attraction between metal atoms and delocalized electrons.'
94
+ }
95
+ ],
96
+ summary: [
97
+ {
98
+ description: 'Chemical bonding is the process where atoms combine to form compounds through various types of bonds.'
99
+ }
100
+ ]
101
+ }
102
+ }
103
+ },
104
+ },
105
+ };
106
+ // Level 2 node with formulas
107
+ exports.Level2WithFormulas = {
108
+ args: {
109
+ data: {
110
+ label: 'Quadratic Equations',
111
+ color: '#E9D5FF',
112
+ level: 2,
113
+ hasContent: true,
114
+ hasMultipleChildren: false,
115
+ icons: mockIcons,
116
+ content: {
117
+ sections: {
118
+ formulae: [
119
+ {
120
+ title: 'Quadratic Formula',
121
+ description: 'x = (-b ± √(b² - 4ac)) / 2a'
122
+ },
123
+ {
124
+ title: 'Discriminant',
125
+ description: 'Δ = b² - 4ac'
126
+ },
127
+ {
128
+ title: 'Sum of Roots',
129
+ description: 'α + β = -b/a'
130
+ },
131
+ {
132
+ title: 'Product of Roots',
133
+ description: 'αβ = c/a'
134
+ }
135
+ ]
136
+ }
137
+ }
138
+ },
139
+ },
140
+ };
141
+ // Level 2+ with equations
142
+ exports.Level2WithEquations = {
143
+ args: {
144
+ data: {
145
+ label: 'Chemical Reactions',
146
+ color: '#FECACA',
147
+ level: 2,
148
+ hasContent: true,
149
+ hasMultipleChildren: true,
150
+ icons: mockIcons,
151
+ content: {
152
+ sections: {
153
+ 'reactions/equations': [
154
+ {
155
+ title: 'Combustion of Methane',
156
+ description: 'CH₄ + 2O₂ → CO₂ + 2H₂O'
157
+ },
158
+ {
159
+ title: 'Photosynthesis',
160
+ description: '6CO₂ + 6H₂O → C₆H₁₂O₆ + 6O₂'
161
+ },
162
+ {
163
+ title: 'Neutralization',
164
+ description: 'HCl + NaOH → NaCl + H₂O'
165
+ }
166
+ ]
167
+ }
168
+ }
169
+ },
170
+ },
171
+ };
172
+ // Node with all content types
173
+ exports.AllContentTypes = {
174
+ args: {
175
+ data: {
176
+ label: 'Complete Topic',
177
+ color: '#D1FAE5',
178
+ level: 1,
179
+ hasContent: true,
180
+ hasMultipleChildren: false,
181
+ icons: mockIcons,
182
+ content: {
183
+ videos: [
184
+ 'Video 1: Overview',
185
+ 'Video 2: Deep Dive',
186
+ 'Video 3: Practice Problems'
187
+ ],
188
+ sections: {
189
+ summary: [
190
+ {
191
+ description: 'A comprehensive overview of the topic covering all essential aspects.'
192
+ }
193
+ ],
194
+ definitions: [
195
+ {
196
+ title: 'Key Term 1',
197
+ description: 'Definition of the first key term.'
198
+ },
199
+ {
200
+ title: 'Key Term 2',
201
+ description: 'Definition of the second key term.'
202
+ }
203
+ ],
204
+ formulae: [
205
+ {
206
+ title: 'Main Formula',
207
+ description: 'F = ma'
208
+ }
209
+ ],
210
+ 'reactions/equations': [
211
+ {
212
+ title: 'Key Equation',
213
+ description: 'E = mc²'
214
+ }
215
+ ]
216
+ }
217
+ }
218
+ },
219
+ },
220
+ };
221
+ // Literature node example
222
+ exports.LiteratureNode = {
223
+ args: {
224
+ data: {
225
+ label: 'The Road Not Taken',
226
+ color: '#FED7AA',
227
+ level: 1,
228
+ hasContent: true,
229
+ hasMultipleChildren: false,
230
+ icons: mockIcons,
231
+ content: {
232
+ sections: {
233
+ theme_and_central_idea: [
234
+ {
235
+ title: 'Main Theme',
236
+ description: 'The poem explores choices and their consequences in life.'
237
+ }
238
+ ],
239
+ poetic_devices: [
240
+ {
241
+ title: 'Metaphor',
242
+ description: 'The roads symbolize life choices and different paths one can take.'
243
+ },
244
+ {
245
+ title: 'Imagery',
246
+ description: 'Vivid description of the diverging roads in a yellow wood.'
247
+ }
248
+ ],
249
+ language_and_vocabulary: [
250
+ {
251
+ title: 'Diverged',
252
+ description: 'Separated and went in different directions.'
253
+ }
254
+ ]
255
+ }
256
+ }
257
+ },
258
+ },
259
+ };
260
+ // Node with multiple children (uses horizontal layout)
261
+ exports.MultipleChildrenNode = {
262
+ args: {
263
+ data: {
264
+ label: 'Parent Topic',
265
+ color: '#FDE68A',
266
+ level: 2,
267
+ hasContent: true,
268
+ hasMultipleChildren: true,
269
+ icons: mockIcons,
270
+ content: {
271
+ videos: [
272
+ 'Overview Video'
273
+ ],
274
+ sections: {
275
+ summary: [
276
+ {
277
+ description: 'This topic branches into multiple subtopics.'
278
+ }
279
+ ]
280
+ }
281
+ }
282
+ },
283
+ },
284
+ };
285
+ // Empty content node
286
+ exports.EmptyContent = {
287
+ args: {
288
+ data: {
289
+ label: 'Empty Topic Node',
290
+ color: '#E5E7EB',
291
+ level: 1,
292
+ hasContent: true,
293
+ hasMultipleChildren: false,
294
+ icons: mockIcons,
295
+ content: {
296
+ sections: {}
297
+ }
298
+ },
299
+ },
300
+ };
301
+ //# sourceMappingURL=FlashcardNode.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlashcardNode.stories.js","sourceRoot":"","sources":["../../../../src/components/Organisms/FlashCardNode/FlashcardNode.stories.tsx"],"names":[],"mappings":";;;;;;;AAEA,yCAA8C;AAC9C,oEAA4C;AAC5C,oCAAkC;AAElC,yBAAyB;AACzB,MAAM,SAAS,GAAG;IAChB;QACE,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,uDAAuD;KAC7D;IACD;QACE,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,2DAA2D;KACjE;IACD;QACE,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,8DAA8D;KACpE;IACD;QACE,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,kEAAkE;KACxE;CACF,CAAC;AAEF,MAAM,IAAI,GAA+B;IACvC,KA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BACjB,WAAW,EAAE,oEAAoE;yBAClF;wBACD;4BACE,KAAK,EAAE,SAAS;4BAChB,WAAW,EAAE,4DAA4D;yBAC1E;qBACF;oBACD,uBAAuB,EAAE;wBACvB;4BACE,KAAK,EAAE,UAAU;4BACjB,WAAW,EAAE,6CAA6C;yBAC3D;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,uDAAuD;AAC1C,QAAA,oBAAoB,GAAU;IACzC,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,KAAK,EAAE,cAAc;YACrB,KAAK,EAAE,SAAS;YAChB,KAAK,EAAE,CAAC;YACR,UAAU,EAAE,IAAI;YAChB,mBAAmB,EAAE,IAAI;YACzB,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,gBAAgB;iBACjB;gBACD,QAAQ,EAAE;oBACR,OAAO,EAAE;wBACP;4BACE,WAAW,EAAE,8CAA8C;yBAC5D;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,qBAAqB;AACR,QAAA,YAAY,GAAU;IACjC,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,KAAK,EAAE,kBAAkB;YACzB,KAAK,EAAE,SAAS;YAChB,KAAK,EAAE,CAAC;YACR,UAAU,EAAE,IAAI;YAChB,mBAAmB,EAAE,KAAK;YAC1B,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE;gBACP,QAAQ,EAAE,EAAE;aACb;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ export function IconBar({ icons, displayType, onIconClick }: {
2
+ icons: any;
3
+ displayType: any;
4
+ onIconClick: any;
5
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,22 @@
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.IconBar = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = __importDefault(require("react"));
9
+ const react_2 = require("@chakra-ui/react");
10
+ const IconBar = ({ icons, displayType, onIconClick }) => {
11
+ if (!icons || icons.length === 0)
12
+ return null;
13
+ const handleIconClick = (iconType) => {
14
+ onIconClick(iconType);
15
+ };
16
+ return ((0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", gap: "6px", flexShrink: 0, children: icons.map((iconObj, i) => ((0, jsx_runtime_1.jsx)(react_2.Flex, { w: "26px", h: "26px", borderRadius: "4px", align: "center", justify: "center", cursor: "pointer", onClick: (e) => {
17
+ e.stopPropagation();
18
+ handleIconClick(iconObj.type);
19
+ }, opacity: displayType === iconObj.type ? 1 : 0.4, transition: "opacity 0.2s", _hover: { transform: "scale(1.1)" }, children: (0, jsx_runtime_1.jsx)(react_2.Image, { src: iconObj.src, w: "20px", h: "20px", alt: iconObj.type }) }, i))) }));
20
+ };
21
+ exports.IconBar = IconBar;
22
+ //# sourceMappingURL=IconBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconBar.js","sourceRoot":"","sources":["../../../../src/components/Organisms/FlashCardNode/IconBar.jsx"],"names":[],"mappings":";;;;;;;AAAA,kDAA0B;AAC1B,4CAA+C;AAExC,MAAM,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE;IAC7D,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAE9C,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,EAAE;QACnC,WAAW,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,YAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAC,KAAK,EAAC,UAAU,EAAE,CAAC,YACzC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CACzB,uBAAC,YAAI,IAEH,CAAC,EAAC,MAAM,EACR,CAAC,EAAC,MAAM,EACR,YAAY,EAAC,KAAK,EAClB,KAAK,EAAC,QAAQ,EACd,OAAO,EAAC,QAAQ,EAChB,MAAM,EAAC,SAAS,EAChB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;gBACb,CAAC,CAAC,eAAe,EAAE,CAAC;gBACpB,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAChC,CAAC,EACD,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAC/C,UAAU,EAAC,cAAc,EACzB,MAAM,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,YAEnC,uBAAC,aAAK,IAAC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,MAAM,EAAC,GAAG,EAAE,OAAO,CAAC,IAAI,GAAI,IAf3D,CAAC,CAgBD,CACR,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AA/BW,QAAA,OAAO,WA+BlB"}
@@ -0,0 +1,9 @@
1
+ export function MobileAccordionView({ jsonData, contentMap, onContentUpdate, onIconDataUpdate, isAdmin, iconConfig, }: {
2
+ jsonData?: null | undefined;
3
+ contentMap?: {} | undefined;
4
+ onContentUpdate: any;
5
+ onIconDataUpdate: any;
6
+ isAdmin?: boolean | undefined;
7
+ iconConfig?: any[] | undefined;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export default MobileAccordionView;
@@ -0,0 +1,127 @@
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.MobileAccordionView = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("@chakra-ui/react");
9
+ const react_2 = require("react");
10
+ const FlashcardContainer_1 = __importDefault(require("./FlashcardContainer"));
11
+ const contentUtils_1 = require("../../../utils/contentUtils");
12
+ const MobileAccordionView = ({ jsonData = null, contentMap = {}, onContentUpdate, onIconDataUpdate, isAdmin = false, iconConfig = [], }) => {
13
+ const [expandedNodes, setExpandedNodes] = (0, react_2.useState)({});
14
+ const [contentExpanded, setContentExpanded] = (0, react_2.useState)({});
15
+ const [displayTypes, setDisplayTypes] = (0, react_2.useState)({});
16
+ const [videoIndices, setVideoIndices] = (0, react_2.useState)({});
17
+ // Build color map exactly like RecapGraph does - process all nodes once upfront
18
+ const colorMap = (0, react_2.useMemo)(() => {
19
+ const map = {};
20
+ const buildColorMap = (nodeData, level = 0, parentColorKey = null) => {
21
+ if (!nodeData) {
22
+ return null;
23
+ }
24
+ let colorKey;
25
+ if (level === 0) {
26
+ colorKey = "root";
27
+ }
28
+ else if (level === 1) {
29
+ // Count how many level 1 siblings we've already processed
30
+ let level1Index = 0;
31
+ const countLevel1Siblings = (node, targetId) => {
32
+ if (node._id === targetId)
33
+ return level1Index;
34
+ if (node.children) {
35
+ for (let child of node.children) {
36
+ if (child.children) {
37
+ const result = countLevel1Siblings(child, targetId);
38
+ if (result !== null)
39
+ return result;
40
+ }
41
+ level1Index++;
42
+ }
43
+ }
44
+ return null;
45
+ };
46
+ // Simpler: just count position among siblings at level 1
47
+ const parentChildren = jsonData.children || [];
48
+ const siblingIndex = parentChildren.findIndex((c) => c._id === nodeData._id);
49
+ colorKey = String(siblingIndex % 8);
50
+ }
51
+ else {
52
+ // Child levels inherit parent's color key
53
+ colorKey = parentColorKey;
54
+ }
55
+ map[nodeData._id] = {
56
+ colorKey,
57
+ level,
58
+ };
59
+ if (nodeData.children?.length) {
60
+ nodeData.children.forEach((child) => {
61
+ buildColorMap(child, level + 1, colorKey);
62
+ });
63
+ }
64
+ };
65
+ if (jsonData) {
66
+ buildColorMap(jsonData);
67
+ }
68
+ return map;
69
+ }, [jsonData]);
70
+ const getNodeColor = (nodeId, level, colorKey) => {
71
+ if (level === 0) {
72
+ return contentUtils_1.COLOR_MAP.root;
73
+ }
74
+ if (level === 1) {
75
+ return contentUtils_1.COLOR_MAP[colorKey];
76
+ }
77
+ // Level 2+ use light color
78
+ return contentUtils_1.LIGHT_COLOR_MAP[colorKey];
79
+ };
80
+ const renderNode = (nodeData, level = 0) => {
81
+ console.log("node data:", nodeData);
82
+ const nodeContent = contentMap[nodeData._id] || null;
83
+ const hasContent = nodeContent &&
84
+ (nodeContent.videos?.length > 0 ||
85
+ (nodeContent.recap && Object.keys(nodeContent.recap).length > 0));
86
+ const hasChildren = nodeData.children?.length > 0;
87
+ const availableContentTypes = hasContent
88
+ ? (0, contentUtils_1.getAvailableContentTypes)(nodeContent)
89
+ : [];
90
+ const availableIcons = iconConfig.filter((icon) => availableContentTypes.includes(icon.type));
91
+ const displayType = displayTypes[nodeData._id] || availableContentTypes[0] || null;
92
+ const isNodeExpanded = expandedNodes[nodeData._id] || false;
93
+ const isContentExpanded = contentExpanded[nodeData._id] || false;
94
+ const currentVideoIdx = videoIndices[nodeData._id] || 0;
95
+ // Get color from memoized map
96
+ const nodeColorInfo = colorMap[nodeData._id] || { colorKey: "0", level: 0 };
97
+ const bgColor = getNodeColor(nodeData._id, nodeColorInfo.level, nodeColorInfo.colorKey);
98
+ const handleChevronClick = () => {
99
+ setExpandedNodes((prev) => ({
100
+ ...prev,
101
+ [nodeData._id]: !prev[nodeData._id],
102
+ }));
103
+ };
104
+ const handleIconClick = (type) => {
105
+ const isSame = displayTypes[nodeData._id] === type;
106
+ setContentExpanded((prev) => ({
107
+ ...prev,
108
+ [nodeData._id]: isSame ? !prev[nodeData._id] : true,
109
+ }));
110
+ setDisplayTypes((prev) => ({
111
+ ...prev,
112
+ [nodeData._id]: type,
113
+ }));
114
+ };
115
+ const setCurrentVideoIdx = (idx) => {
116
+ setVideoIndices((prev) => ({
117
+ ...prev,
118
+ [nodeData._id]: idx,
119
+ }));
120
+ };
121
+ return ((0, jsx_runtime_1.jsxs)(react_1.Box, { mb: "8px", children: [(0, jsx_runtime_1.jsx)(FlashcardContainer_1.default, { label: nodeData.description || nodeData.name, color: bgColor, hasContent: hasContent, isNodeExpanded: isNodeExpanded, isContentExpanded: isContentExpanded, displayType: displayType, availableIcons: availableIcons, handleIconClick: handleIconClick, content: nodeContent, currentVideoIdx: currentVideoIdx, setCurrentVideoIdx: setCurrentVideoIdx, isAdmin: isAdmin, onContentUpdate: onContentUpdate, nodeId: nodeData._id, rootNodeId: nodeData._id, onIconDataUpdate: onIconDataUpdate, hasChildren: hasChildren, onChevronClick: handleChevronClick, isMobile: true }), isNodeExpanded && hasChildren && ((0, jsx_runtime_1.jsx)(react_1.Box, { ml: "6px", mr: "6px", mt: "8px", bg: "#F8F8F8", children: nodeData.children.map((child) => renderNode(child, level + 1)) }))] }, nodeData._id));
122
+ };
123
+ return ((0, jsx_runtime_1.jsx)(react_1.Box, { p: "16px", bg: "#f8fafc", children: (0, jsx_runtime_1.jsx)(react_1.VStack, { align: "stretch", spacing: "0", children: jsonData && renderNode(jsonData) }) }));
124
+ };
125
+ exports.MobileAccordionView = MobileAccordionView;
126
+ exports.default = exports.MobileAccordionView;
127
+ //# sourceMappingURL=MobileAccordionView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileAccordionView.js","sourceRoot":"","sources":["../../../../src/components/Organisms/FlashCardNode/MobileAccordionView.jsx"],"names":[],"mappings":";;;;;;;AAAA,4CAAqD;AACrD,iCAA0C;AAC1C,8EAAsD;AACtD,8DAIqC;AAE9B,MAAM,mBAAmB,GAAG,CAAC,EAClC,QAAQ,GAAG,IAAI,EACf,UAAU,GAAG,EAAE,EACf,eAAe,EACf,gBAAgB,EAChB,OAAO,GAAG,KAAK,EACf,UAAU,GAAG,EAAE,GAChB,EAAE,EAAE;IACH,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,eAAe,EAA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EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,WAAW,EACpB,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,QAAQ,CAAC,GAAG,EACpB,UAAU,EAAE,QAAQ,CAAC,GAAG,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,kBAAkB,EAClC,QAAQ,EAAE,IAAI,GACd,EAED,cAAc,IAAI,WAAW,IAAI,CAChC,uBAAC,WAAG,IAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,SAAS,YACzC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,GAC3D,CACP,KA3BO,QAAQ,CAAC,GAAG,CA4BhB,CACP,CAAC;IACJ,CAAC,CAAC;IACF,OAAO,CACL,uBAAC,WAAG,IAAC,CAAC,EAAC,MAAM,EAAC,EAAE,EAAC,SAAS,YACxB,uBAAC,cAAM,IAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAC,GAAG,YAChC,QAAQ,IAAI,UAAU,CAAC,QAAQ,CAAC,GAC1B,GACL,CACP,CAAC;AACJ,CAAC,CAAC;AA5LW,QAAA,mBAAmB,uBA4L9B;AAEF,kBAAe,2BAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export function NodeHandles({ level }: {
2
+ level: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
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.NodeHandles = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = __importDefault(require("react"));
9
+ const reactflow_1 = require("reactflow");
10
+ const NodeHandles = ({ level }) => {
11
+ const handleStyle = {
12
+ background: "transparent",
13
+ border: "none",
14
+ width: "8px",
15
+ height: "8px",
16
+ opacity: 0,
17
+ pointerEvents: "none",
18
+ };
19
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [level > 0 && ((0, jsx_runtime_1.jsx)(reactflow_1.Handle, { type: "target", position: reactflow_1.Position.Top, style: handleStyle, id: "top" })), level > 0 && ((0, jsx_runtime_1.jsx)(reactflow_1.Handle, { type: "target", position: reactflow_1.Position.Left, style: handleStyle, id: "left" })), (0, jsx_runtime_1.jsx)(reactflow_1.Handle, { type: "source", position: reactflow_1.Position.Bottom, style: handleStyle, id: "bottom" })] }));
20
+ };
21
+ exports.NodeHandles = NodeHandles;
22
+ //# sourceMappingURL=NodeHandles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeHandles.js","sourceRoot":"","sources":["../../../../src/components/Organisms/FlashCardNode/NodeHandles.jsx"],"names":[],"mappings":";;;;;;;AAAA,kDAA0B;AAC1B,yCAA6C;AAEtC,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACvC,MAAM,WAAW,GAAG;QAClB,UAAU,EAAE,aAAa;QACzB,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,CAAC;QACV,aAAa,EAAE,MAAM;KACtB,CAAC;IAEF,OAAO,CACL,6DAEG,KAAK,GAAG,CAAC,IAAI,CACZ,uBAAC,kBAAM,IACL,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,oBAAQ,CAAC,GAAG,EACtB,KAAK,EAAE,WAAW,EAClB,EAAE,EAAC,KAAK,GACR,CACH,EAGA,KAAK,GAAG,CAAC,IAAI,CACZ,uBAAC,kBAAM,IACL,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,oBAAQ,CAAC,IAAI,EACvB,KAAK,EAAE,WAAW,EAClB,EAAE,EAAC,MAAM,GACT,CACH,EAGD,uBAAC,kBAAM,IACL,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,oBAAQ,CAAC,MAAM,EACzB,KAAK,EAAE,WAAW,EAClB,EAAE,EAAC,QAAQ,GACX,IACD,CACJ,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,WAAW,eAyCtB"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
2
+ export default _default;
3
+ export declare const DefaultTimerClock: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, any>;
@@ -0,0 +1,36 @@
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.DefaultTimerClock = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const RecapData_1 = require("../../../utils/RecapData");
9
+ const Reactgraphflow_1 = __importDefault(require("./Reactgraphflow"));
10
+ const defination_svg_1 = __importDefault(require("../../../assests/revision/defination.svg"));
11
+ const formula_svg_1 = __importDefault(require("../../../assests/revision/formula.svg"));
12
+ const videoplay_svg_1 = __importDefault(require("../../../assests/revision/videoplay.svg"));
13
+ const equations_svg_1 = __importDefault(require("../../../assests/revision/equations.svg"));
14
+ exports.default = {
15
+ title: "Components/Organisms/Graph/ReactFlowELKView",
16
+ component: Reactgraphflow_1.default,
17
+ };
18
+ const Template = (args) => (0, jsx_runtime_1.jsx)(Reactgraphflow_1.default, { ...args });
19
+ const customIcons = [
20
+ { src: equations_svg_1.default, type: "equations" },
21
+ { src: videoplay_svg_1.default, type: "videos" },
22
+ { src: formula_svg_1.default, type: "formula" },
23
+ { src: defination_svg_1.default, type: "definitions" },
24
+ ];
25
+ console.log("content:", RecapData_1.contentMap);
26
+ exports.DefaultTimerClock = Template.bind({});
27
+ exports.DefaultTimerClock.args = {
28
+ jsonData: RecapData_1.jsonData,
29
+ contentMap: RecapData_1.contentMap,
30
+ iconConfig: customIcons,
31
+ onContentUpdate: () => { },
32
+ onIconDataUpdate: () => { },
33
+ // isAdmin: true,
34
+ // isMobile: true,
35
+ };
36
+ //# sourceMappingURL=Example.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Example.stories.js","sourceRoot":"","sources":["../../../../src/components/Organisms/RecapGraph/Example.stories.tsx"],"names":[],"mappings":";;;;;;;AAEA,wDAA+E;AAC/E,sEAA0C;AAC1C,8FAAsE;AACtE,wFAAgE;AAChE,4FAAoE;AACpE,4FAAmE;AAEnE,kBAAe;IACb,KAAK,EAAE,6CAA6C;IACpD,SAAS,EAAE,wBAAU;CACd,CAAC;AAEV,MAAM,QAAQ,GAAe,CAAC,IAAI,EAAE,EAAE,CAAC,uBAAC,wBAAU,OAAK,IAAI,GAAI,CAAC;AAEhE,MAAM,WAAW,GAAG;IAClB,EAAE,GAAG,EAAE,uBAAY,EAAE,IAAI,EAAE,WAAW,EAAE;IACxC,EAAE,GAAG,EAAE,uBAAa,EAAE,IAAI,EAAE,QAAQ,EAAE;IACtC,EAAE,GAAG,EAAE,qBAAW,EAAE,IAAI,EAAE,SAAS,EAAE;IACrC,EAAE,GAAG,EAAE,wBAAc,EAAE,IAAI,EAAE,aAAa,EAAE;CAC7C,CAAC;AACF,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,sBAAU,CAAC,CAAC;AAEvB,QAAA,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnD,yBAAiB,CAAC,IAAI,GAAG;IACvB,QAAQ,EAAE,oBAAQ;IAClB,UAAU,EAAE,sBAAU;IACtB,UAAU,EAAE,WAAW;IACvB,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;IACzB,gBAAgB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC1B,iBAAiB;IACjB,kBAAkB;CACnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export default FlashcardNode;
2
+ declare const FlashcardNode: React.NamedExoticComponent<object>;
3
+ import React from "react";
@@ -0,0 +1,48 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const jsx_runtime_1 = require("react/jsx-runtime");
27
+ const react_1 = __importStar(require("react"));
28
+ const react_2 = require("@chakra-ui/react");
29
+ const ContentView_1 = require("../../Molecules/RecapNode/ContentView");
30
+ const NodeHandles_1 = require("./NodeHandles");
31
+ const IconBar_1 = require("./IconBar");
32
+ const contentUtils_1 = require("../../../utils/contentUtils");
33
+ const FlashcardNode = (0, react_1.memo)(({ data }) => {
34
+ const [currentVideoIdx, setCurrentVideoIdx] = (0, react_1.useState)(0);
35
+ const [isExpanded, setIsExpanded] = (0, react_1.useState)(false);
36
+ const { hasContent, level, hasMultipleChildren, color, label, icons = [], content } = data;
37
+ const availableTypes = (0, contentUtils_1.getAvailableContentTypes)(content);
38
+ const [displayType, setDisplayType] = (0, react_1.useState)(availableTypes[0] || null);
39
+ const availableIcons = icons.filter(icon => availableTypes.includes(icon.type));
40
+ const handleIconClick = (iconType) => {
41
+ setIsExpanded(true);
42
+ setDisplayType(iconType);
43
+ };
44
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { minWidth: "280px", maxWidth: "350px", zIndex: "10" }, children: [(0, jsx_runtime_1.jsx)(NodeHandles_1.NodeHandles, { level: level, hasMultipleChildren: hasMultipleChildren }), (0, jsx_runtime_1.jsxs)(react_2.Box, { p: "4px", bg: "#FFE0DD", borderRadius: "4px", children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { bg: color, p: "8px 12px", align: "center", borderRadius: "4px", justify: "space-between", gap: "12px", children: [(0, jsx_runtime_1.jsx)(react_2.Box, { w: "100%", children: (0, jsx_runtime_1.jsx)(react_2.Text, { fontFamily: "Inter", fontWeight: "600", fontSize: "12px", children: label }) }), hasContent && ((0, jsx_runtime_1.jsx)(IconBar_1.IconBar, { icons: availableIcons, displayType: displayType, onIconClick: handleIconClick }))] }), hasContent && isExpanded && ((0, jsx_runtime_1.jsx)(react_2.Box, { p: "12px", fontSize: "13px", lineHeight: "1.6", borderRadius: "4px", bg: "#fff", mt: "8px", children: (0, jsx_runtime_1.jsx)(ContentView_1.ContentView, { displayType: displayType, content: content, currentVideoIdx: currentVideoIdx, setCurrentVideoIdx: setCurrentVideoIdx }) }))] })] }));
45
+ });
46
+ FlashcardNode.displayName = 'FlashcardNode';
47
+ exports.default = FlashcardNode;
48
+ //# sourceMappingURL=FlashCardNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlashCardNode.js","sourceRoot":"","sources":["../../../../src/components/Organisms/RecapGraph/FlashCardNode.jsx"],"names":[],"m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AC,YAAY,EAAC,KAAK,aAC1C,wBAAC,YAAI,IACH,EAAE,EAAE,KAAK,EACT,CAAC,EAAC,UAAU,EACZ,KAAK,EAAC,QAAQ,EACd,YAAY,EAAC,KAAK,EAClB,OAAO,EAAC,eAAe,EACvB,GAAG,EAAC,MAAM,aAEV,uBAAC,WAAG,IAAC,CAAC,EAAC,MAAM,YACX,uBAAC,YAAI,IAAC,UAAU,EAAC,OAAO,EAAC,UAAU,EAAC,KAAK,EAAC,QAAQ,EAAC,MAAM,YACtD,KAAK,GACD,GACH,EAEL,UAAU,IAAI,CACb,uBAAC,iBAAO,IACN,KAAK,EAAE,cAAc,EACrB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,eAAe,GAC5B,CACH,IACI,EAEN,UAAU,IAAI,UAAU,IAAI,CAC3B,uBAAC,WAAG,IACF,CAAC,EAAC,MAAM,EACR,QAAQ,EAAC,MAAM,EACf,UAAU,EAAC,KAAK,EAChB,YAAY,EAAC,KAAK,EAClB,EAAE,EAAC,MAAM,EACT,EAAE,EAAC,KAAK,YAER,uBAAC,yBAAW,IACV,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,kBAAkB,GACtC,GACE,CACP,IACG,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC;AAE5C,kBAAe,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ export function IconBar({ icons, displayType, onIconClick }: {
2
+ icons: any;
3
+ displayType: any;
4
+ onIconClick: any;
5
+ }): import("react/jsx-runtime").JSX.Element | null;