@principal-ai/logo-component 0.1.3 → 0.1.5

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.
@@ -0,0 +1,376 @@
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 () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.MazeDemoNew = void 0;
37
+ const react_1 = __importStar(require("react"));
38
+ const mazeGenerator_1 = require("./utils/mazeGenerator");
39
+ const MazeDemoNew = ({ width = 450, height = 620, mazeColor = "#6366f1", errorColor = "#ef4444", searchColor = "#f59e0b", solutionColor = "#10b981", mazeSeed = 42, }) => {
40
+ // Maze configuration
41
+ const gridSize = 10;
42
+ const cellSize = 30;
43
+ const padding = 50;
44
+ const mazeWidth = gridSize * cellSize;
45
+ const mazeHeight = gridSize * cellSize;
46
+ const mazeX = (width - mazeWidth) / 2;
47
+ // Key positions
48
+ const startCol = 0;
49
+ const startRow = 0;
50
+ const destCol = 9;
51
+ const destRow = 9;
52
+ // State
53
+ const [revealedCells, setRevealedCells] = (0, react_1.useState)([]);
54
+ const [directionHint, setDirectionHint] = (0, react_1.useState)("");
55
+ const [timeCost, setTimeCost] = (0, react_1.useState)(0);
56
+ const [clickCost, setClickCost] = (0, react_1.useState)(0);
57
+ const [blockageFound, setBlockageFound] = (0, react_1.useState)(false);
58
+ const [startTime, setStartTime] = (0, react_1.useState)(null);
59
+ const [started, setStarted] = (0, react_1.useState)(false);
60
+ const [currentSeed, setCurrentSeed] = (0, react_1.useState)(() => Math.floor(Math.random() * 10000));
61
+ const [blockageInjected, setBlockageInjected] = (0, react_1.useState)(false);
62
+ const [deployed, setDeployed] = (0, react_1.useState)(false);
63
+ const [mode, setMode] = (0, react_1.useState)('initial');
64
+ // Total incident cost
65
+ const incidentCost = timeCost + clickCost;
66
+ // Update currentSeed when mazeSeed prop changes
67
+ (0, react_1.useEffect)(() => {
68
+ setCurrentSeed(mazeSeed);
69
+ }, [mazeSeed]);
70
+ // Increment time cost
71
+ (0, react_1.useEffect)(() => {
72
+ if (blockageFound || !startTime || !started)
73
+ return;
74
+ const interval = setInterval(() => {
75
+ setTimeCost(prev => prev + 1);
76
+ }, 10);
77
+ return () => clearInterval(interval);
78
+ }, [blockageFound, startTime, started]);
79
+ // Generate maze
80
+ const { horizontalWalls, verticalWalls, blockageWall, actualBlockageCol, actualBlockageRow } = (0, react_1.useMemo)(() => {
81
+ let seed = currentSeed;
82
+ const seededRandom = () => {
83
+ seed = (seed * 9301 + 49297) % 233280;
84
+ return seed / 233280;
85
+ };
86
+ const originalRandom = Math.random;
87
+ Math.random = seededRandom;
88
+ const generator = new mazeGenerator_1.MazeGenerator(gridSize, gridSize);
89
+ generator.generate(startRow, startCol);
90
+ let blockCell = { row: 5, col: 5 };
91
+ let direction = 'east';
92
+ let blockageWall = null;
93
+ if (blockageInjected) {
94
+ const path = generator.findPath(startRow, startCol, destRow, destCol);
95
+ if (path.length > 2) {
96
+ const middleStart = Math.floor(path.length * 0.3);
97
+ const middleEnd = Math.floor(path.length * 0.7);
98
+ const blockIndex = Math.floor(seededRandom() * (middleEnd - middleStart)) + middleStart;
99
+ blockCell = path[blockIndex];
100
+ if (blockIndex < path.length - 1) {
101
+ const nextCell = path[blockIndex + 1];
102
+ const rowDiff = nextCell.row - blockCell.row;
103
+ const colDiff = nextCell.col - blockCell.col;
104
+ if (rowDiff === 1)
105
+ direction = 'south';
106
+ else if (rowDiff === -1)
107
+ direction = 'north';
108
+ else if (colDiff === 1)
109
+ direction = 'east';
110
+ else if (colDiff === -1)
111
+ direction = 'west';
112
+ }
113
+ }
114
+ generator.addBlockage(blockCell.row, blockCell.col, direction);
115
+ }
116
+ const walls = generator.getWalls();
117
+ if (blockageInjected) {
118
+ if (direction === 'east' || direction === 'west') {
119
+ const targetCol = direction === 'east' ? blockCell.col + 1 : blockCell.col;
120
+ const targetRow = blockCell.row;
121
+ const wallSegment = walls.vertical.find(wall => {
122
+ const [col, row1, , row2] = wall;
123
+ return col === targetCol && row1 <= targetRow && row2 > targetRow;
124
+ });
125
+ if (wallSegment) {
126
+ const [col, row1, , row2] = wallSegment;
127
+ blockageWall = { type: 'vertical', col, row1, row2 };
128
+ }
129
+ }
130
+ else {
131
+ const targetRow = direction === 'south' ? blockCell.row + 1 : blockCell.row;
132
+ const targetCol = blockCell.col;
133
+ const wallSegment = walls.horizontal.find(wall => {
134
+ const [col1, row, col2] = wall;
135
+ return row === targetRow && col1 <= targetCol && col2 > targetCol;
136
+ });
137
+ if (wallSegment) {
138
+ const [col1, row, col2] = wallSegment;
139
+ blockageWall = { type: 'horizontal', row, col1, col2 };
140
+ }
141
+ }
142
+ }
143
+ Math.random = originalRandom;
144
+ return {
145
+ horizontalWalls: walls.horizontal,
146
+ verticalWalls: walls.vertical,
147
+ blockageWall,
148
+ actualBlockageCol: blockCell.col,
149
+ actualBlockageRow: blockCell.row,
150
+ };
151
+ }, [currentSeed, blockageInjected]);
152
+ // Handlers
153
+ const handleModeSelect = (selectedMode) => {
154
+ setMode(selectedMode);
155
+ };
156
+ const handleDeploy = () => {
157
+ setDeployed(true);
158
+ setTimeout(() => {
159
+ setBlockageInjected(true);
160
+ setStarted(true);
161
+ setStartTime(Date.now());
162
+ }, 3000);
163
+ };
164
+ const handleTryPrincipal = () => {
165
+ setMode('principal');
166
+ setRevealedCells([]);
167
+ setDirectionHint("");
168
+ setBlockageFound(false);
169
+ setTimeCost(0);
170
+ setClickCost(0);
171
+ setStartTime(null);
172
+ setStarted(false);
173
+ setDeployed(false);
174
+ setBlockageInjected(false); // Principal mode still needs to deploy first
175
+ };
176
+ const handleTryAgain = () => {
177
+ setRevealedCells([]);
178
+ setDirectionHint("");
179
+ setBlockageFound(false);
180
+ setTimeCost(0);
181
+ setClickCost(0);
182
+ setStartTime(null);
183
+ setStarted(false);
184
+ setBlockageInjected(false);
185
+ setDeployed(false);
186
+ setMode('initial');
187
+ setCurrentSeed(Math.floor(Math.random() * 10000));
188
+ };
189
+ const handleCellClick = (col, row) => {
190
+ if (blockageFound || !started)
191
+ return;
192
+ // In principal mode, only allow clicking the blockage cell
193
+ if (mode === 'principal') {
194
+ const isBlockageCell = col === actualBlockageCol && row === actualBlockageRow;
195
+ if (isBlockageCell) {
196
+ setDirectionHint("🎯 Blockage Found!");
197
+ setBlockageFound(true);
198
+ }
199
+ return;
200
+ }
201
+ const alreadyRevealed = revealedCells.some(cell => cell.col === col && cell.row === row);
202
+ if (alreadyRevealed)
203
+ return;
204
+ setClickCost(prev => prev + 500);
205
+ setRevealedCells([...revealedCells, { col, row }]);
206
+ const isBlockageCell = col === actualBlockageCol && row === actualBlockageRow;
207
+ if (isBlockageCell) {
208
+ setDirectionHint("🎯 Blockage Found!");
209
+ setBlockageFound(true);
210
+ const cellsToReveal = [...revealedCells];
211
+ for (let r = 0; r < gridSize; r++) {
212
+ for (let c = 0; c < gridSize; c++) {
213
+ const distance = Math.abs(actualBlockageCol - c) + Math.abs(actualBlockageRow - r);
214
+ if (distance <= 3) {
215
+ const alreadyInList = cellsToReveal.some(cell => cell.col === c && cell.row === r);
216
+ if (!alreadyInList) {
217
+ cellsToReveal.push({ col: c, row: r });
218
+ }
219
+ }
220
+ }
221
+ }
222
+ setRevealedCells(cellsToReveal);
223
+ }
224
+ else {
225
+ const colDiff = actualBlockageCol - col;
226
+ const rowDiff = actualBlockageRow - row;
227
+ let direction = "";
228
+ if (Math.abs(rowDiff) > 1) {
229
+ direction += rowDiff > 0 ? "↓ " : "↑ ";
230
+ }
231
+ if (Math.abs(colDiff) > 1) {
232
+ direction += colDiff > 0 ? "→" : "←";
233
+ }
234
+ const distance = Math.abs(colDiff) + Math.abs(rowDiff);
235
+ let proximity = "";
236
+ if (distance <= 2)
237
+ proximity = "Very close!";
238
+ else if (distance <= 4)
239
+ proximity = "Getting warmer...";
240
+ else if (distance <= 6)
241
+ proximity = "Still far...";
242
+ else
243
+ proximity = "Cold...";
244
+ setDirectionHint(`${direction} ${proximity}`);
245
+ }
246
+ };
247
+ // Render maze
248
+ const renderMaze = (showBlockage, opacity = 1) => {
249
+ const elements = [];
250
+ elements.push(react_1.default.createElement("rect", { key: "background", x: mazeX, y: padding, width: mazeWidth, height: mazeHeight, fill: "none", stroke: mazeColor, strokeWidth: "3", opacity: 0.3 * opacity }));
251
+ const isBlockageWall = (type, wall) => {
252
+ if (!showBlockage || !blockageWall)
253
+ return false;
254
+ if (type === 'vertical') {
255
+ const [x, y1, , y2] = wall;
256
+ return (blockageWall.type === 'vertical' &&
257
+ x === blockageWall.col &&
258
+ y1 === blockageWall.row1 &&
259
+ y2 === blockageWall.row2);
260
+ }
261
+ else if (type === 'horizontal') {
262
+ const [x1, y, x2] = wall;
263
+ return (blockageWall.type === 'horizontal' &&
264
+ y === blockageWall.row &&
265
+ x1 === blockageWall.col1 &&
266
+ x2 === blockageWall.col2);
267
+ }
268
+ return false;
269
+ };
270
+ horizontalWalls.forEach((wall, idx) => {
271
+ const [x1, y, x2] = wall;
272
+ const isBlockage = isBlockageWall('horizontal', wall);
273
+ elements.push(react_1.default.createElement("line", { key: `h-wall-${idx}`, x1: mazeX + x1 * cellSize, y1: padding + y * cellSize, x2: mazeX + x2 * cellSize, y2: padding + y * cellSize, stroke: isBlockage ? errorColor : mazeColor, strokeWidth: isBlockage ? 4 : 2.5, strokeLinecap: "round", opacity: opacity }, isBlockage && showBlockage && (react_1.default.createElement("animate", { attributeName: "stroke-width", values: "4;6;4", dur: "1.5s", repeatCount: "indefinite" }))));
274
+ });
275
+ verticalWalls.forEach((wall, idx) => {
276
+ const [x, y1, , y2] = wall;
277
+ const isBlockage = isBlockageWall('vertical', wall);
278
+ elements.push(react_1.default.createElement("line", { key: `v-wall-${idx}`, x1: mazeX + x * cellSize, y1: padding + y1 * cellSize, x2: mazeX + x * cellSize, y2: padding + y2 * cellSize, stroke: isBlockage ? errorColor : mazeColor, strokeWidth: isBlockage ? 4 : 2.5, strokeLinecap: "round", opacity: opacity }, isBlockage && showBlockage && (react_1.default.createElement("animate", { attributeName: "stroke-width", values: "4;6;4", dur: "1.5s", repeatCount: "indefinite" }))));
279
+ });
280
+ for (let row = 0; row <= gridSize; row++) {
281
+ elements.push(react_1.default.createElement("line", { key: `grid-h-${row}`, x1: mazeX, y1: padding + row * cellSize, x2: mazeX + mazeWidth, y2: padding + row * cellSize, stroke: mazeColor, strokeWidth: "0.5", opacity: 0.15 * opacity }));
282
+ }
283
+ for (let col = 0; col <= gridSize; col++) {
284
+ elements.push(react_1.default.createElement("line", { key: `grid-v-${col}`, x1: mazeX + col * cellSize, y1: padding, x2: mazeX + col * cellSize, y2: padding + mazeHeight, stroke: mazeColor, strokeWidth: "0.5", opacity: 0.15 * opacity }));
285
+ }
286
+ return elements;
287
+ };
288
+ const getTitle = () => {
289
+ if (mode === 'principal')
290
+ return "With Principal";
291
+ if (mode === 'agentic')
292
+ return "With Agentic Coding";
293
+ if (mode === 'no-agentic')
294
+ return "Without Agentic Coding";
295
+ return "Choose Your Approach";
296
+ };
297
+ const getSubtitle = () => {
298
+ if (mode === 'principal')
299
+ return "Full visibility - See everything";
300
+ if (started)
301
+ return "Find the blockage";
302
+ if (deployed)
303
+ return "Running smoothly...";
304
+ return "How will you handle production?";
305
+ };
306
+ const showCover = mode === 'agentic' || (deployed && mode === 'no-agentic');
307
+ const coverOpacity = 1; // Always full opacity for the cover
308
+ const mazeOpacity = 1; // Maze always at full opacity, cover handles visibility
309
+ return (react_1.default.createElement("svg", { width: width, height: height, xmlns: "http://www.w3.org/2000/svg" },
310
+ react_1.default.createElement("text", { x: width / 2, y: 25, textAnchor: "middle", fill: mazeColor, fontSize: "16", fontWeight: "bold" }, getTitle()),
311
+ react_1.default.createElement("text", { x: width / 2, y: 40, textAnchor: "middle", fill: mazeColor, fontSize: "11", opacity: "0.6" }, getSubtitle()),
312
+ mode !== 'initial' && (react_1.default.createElement(react_1.default.Fragment, null,
313
+ react_1.default.createElement("g", null, renderMaze(mode === 'principal' || blockageFound, mazeOpacity)),
314
+ react_1.default.createElement("circle", { cx: mazeX + (startCol + 0.5) * cellSize, cy: padding + (startRow + 0.5) * cellSize, r: "5", fill: searchColor }),
315
+ react_1.default.createElement("text", { x: mazeX - 5, y: padding - 5, textAnchor: "end", fontSize: "10", fill: searchColor, fontWeight: "bold" }, "START"),
316
+ react_1.default.createElement("g", null,
317
+ react_1.default.createElement("circle", { cx: mazeX + (destCol + 0.5) * cellSize, cy: padding + (destRow + 0.5) * cellSize, r: "8", fill: "none", stroke: mazeColor, strokeWidth: "1.5", opacity: "0.5" }),
318
+ react_1.default.createElement("circle", { cx: mazeX + (destCol + 0.5) * cellSize, cy: padding + (destRow + 0.5) * cellSize, r: "5", fill: "none", stroke: mazeColor, strokeWidth: "1.5", opacity: "0.6" }),
319
+ react_1.default.createElement("circle", { cx: mazeX + (destCol + 0.5) * cellSize, cy: padding + (destRow + 0.5) * cellSize, r: "2", fill: mazeColor, opacity: "0.7" })),
320
+ react_1.default.createElement("text", { x: mazeX + mazeWidth + 5, y: padding + mazeHeight + 15, textAnchor: "start", fontSize: "9", fill: mazeColor, fontWeight: "bold" }, "DEST"))),
321
+ showCover && (react_1.default.createElement(react_1.default.Fragment, null,
322
+ react_1.default.createElement("defs", null,
323
+ react_1.default.createElement("mask", { id: "mazeCoverMask" },
324
+ react_1.default.createElement("rect", { x: mazeX, y: padding, width: mazeWidth, height: mazeHeight, fill: "white" }),
325
+ revealedCells.map((cell, idx) => (react_1.default.createElement("rect", { key: idx, x: mazeX + cell.col * cellSize, y: padding + cell.row * cellSize, width: cellSize, height: cellSize, fill: "black" }))))),
326
+ react_1.default.createElement("g", null,
327
+ react_1.default.createElement("rect", { x: mazeX, y: padding, width: mazeWidth, height: mazeHeight, fill: "#2a2a2a", opacity: coverOpacity, mask: "url(#mazeCoverMask)" }),
328
+ react_1.default.createElement("rect", { x: mazeX, y: padding, width: mazeWidth, height: mazeHeight, fill: "none", stroke: mazeColor, strokeWidth: "3", opacity: "0.4" }),
329
+ started && revealedCells.length === 0 && (react_1.default.createElement("g", null,
330
+ react_1.default.createElement("rect", { x: mazeX + mazeWidth / 2 - 130, y: padding + mazeHeight / 2 - 40, width: 260, height: 80, fill: "#000000", opacity: "0.7", rx: "8", pointerEvents: "none" }),
331
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2, y: padding + mazeHeight / 2 - 15, textAnchor: "middle", fontSize: "18", fill: errorColor, fontWeight: "bold", pointerEvents: "none" }, "\uD83D\uDEA8 INCIDENT ALERT"),
332
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2, y: padding + mazeHeight / 2 + 10, textAnchor: "middle", fontSize: "13", fill: "#ffffff", fontWeight: "normal", pointerEvents: "none" }, "It's 3:00 AM - Find the blockage!"))),
333
+ started && revealedCells.length > 0 && directionHint && (react_1.default.createElement("g", null,
334
+ react_1.default.createElement("rect", { x: mazeX + mazeWidth / 2 - 100, y: padding + mazeHeight / 2 - 25, width: 200, height: 40, fill: "#000000", opacity: "0.7", rx: "6", pointerEvents: "none" }),
335
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2, y: padding + mazeHeight / 2, textAnchor: "middle", fontSize: "16", fill: "#ffffff", fontWeight: "bold", pointerEvents: "none" }, directionHint)))))),
336
+ started && (react_1.default.createElement("g", null, Array.from({ length: gridSize }).map((_, row) => Array.from({ length: gridSize }).map((_, col) => (react_1.default.createElement("rect", { key: `cell-${row}-${col}`, x: mazeX + col * cellSize, y: padding + row * cellSize, width: cellSize, height: cellSize, fill: "transparent", stroke: "none", style: { cursor: 'pointer' }, onClick: () => handleCellClick(col, row), onMouseEnter: (e) => {
337
+ e.currentTarget.setAttribute('fill', searchColor);
338
+ e.currentTarget.setAttribute('opacity', '0.1');
339
+ }, onMouseLeave: (e) => {
340
+ e.currentTarget.setAttribute('fill', 'transparent');
341
+ e.currentTarget.setAttribute('opacity', '1');
342
+ } })))))),
343
+ mode === 'initial' && (react_1.default.createElement("g", null,
344
+ react_1.default.createElement("g", { style: { cursor: 'pointer' }, onClick: () => handleModeSelect('no-agentic') },
345
+ react_1.default.createElement("rect", { x: mazeX + mazeWidth / 2 - 130, y: padding + mazeHeight + 25, width: 120, height: 40, fill: searchColor, rx: "6" }),
346
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2 - 70, y: padding + mazeHeight + 52, textAnchor: "middle", fontSize: "12", fill: "#ffffff", fontWeight: "bold", pointerEvents: "none" }, "No Agentic")),
347
+ react_1.default.createElement("g", { style: { cursor: 'pointer' }, onClick: () => handleModeSelect('agentic') },
348
+ react_1.default.createElement("rect", { x: mazeX + mazeWidth / 2 + 10, y: padding + mazeHeight + 25, width: 120, height: 40, fill: mazeColor, rx: "6" }),
349
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2 + 70, y: padding + mazeHeight + 52, textAnchor: "middle", fontSize: "12", fill: "#ffffff", fontWeight: "bold", pointerEvents: "none" }, "Agentic Coding")))),
350
+ (mode === 'no-agentic' || mode === 'agentic' || mode === 'principal') && !deployed && (react_1.default.createElement("g", null,
351
+ react_1.default.createElement("g", { style: { cursor: 'pointer' }, onClick: handleDeploy },
352
+ react_1.default.createElement("rect", { x: mazeX + mazeWidth / 2 - 60, y: padding + mazeHeight + 25, width: 120, height: 40, fill: searchColor, rx: "6" }),
353
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2, y: padding + mazeHeight + 52, textAnchor: "middle", fontSize: "16", fill: "#ffffff", fontWeight: "bold", pointerEvents: "none" }, "DEPLOY")))),
354
+ deployed && !started && (react_1.default.createElement("g", null,
355
+ react_1.default.createElement("rect", { x: mazeX, y: padding + mazeHeight + 20, width: mazeWidth, height: 35, fill: solutionColor, opacity: "0.9", rx: "4" }),
356
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2, y: padding + mazeHeight + 35, textAnchor: "middle", fontSize: "11", fill: "#ffffff", fontWeight: "normal" }, "\u2713 Deployment Successful"),
357
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2, y: padding + mazeHeight + 50, textAnchor: "middle", fontSize: "14", fill: "#ffffff", fontWeight: "bold" }, "All systems operational"))),
358
+ started && (react_1.default.createElement("g", null,
359
+ react_1.default.createElement("rect", { x: mazeX, y: padding + mazeHeight + 20, width: mazeWidth, height: 35, fill: blockageFound ? solutionColor : errorColor, opacity: "0.9", rx: "4" }),
360
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2, y: padding + mazeHeight + 35, textAnchor: "middle", fontSize: "11", fill: "#ffffff", fontWeight: "normal" }, blockageFound ? "Incident Resolved!" : "Incident Cost"),
361
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2, y: padding + mazeHeight + 50, textAnchor: "middle", fontSize: "18", fill: "#ffffff", fontWeight: "bold" },
362
+ "$",
363
+ incidentCost.toLocaleString()))),
364
+ started && blockageFound && mode !== 'principal' && (react_1.default.createElement("g", null,
365
+ react_1.default.createElement("g", { style: { cursor: 'pointer' }, onClick: handleTryAgain },
366
+ react_1.default.createElement("rect", { x: mazeX + mazeWidth / 2 - 130, y: padding + mazeHeight + 65, width: 120, height: 25, fill: mazeColor, opacity: "0.2", rx: "4" }),
367
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2 - 70, y: padding + mazeHeight + 82, textAnchor: "middle", fontSize: "10", fill: mazeColor, fontWeight: "bold", pointerEvents: "none" }, "Try Again")),
368
+ react_1.default.createElement("g", { style: { cursor: 'pointer' }, onClick: handleTryPrincipal },
369
+ react_1.default.createElement("rect", { x: mazeX + mazeWidth / 2 + 10, y: padding + mazeHeight + 65, width: 120, height: 25, fill: solutionColor, opacity: "0.8", rx: "4" }),
370
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2 + 70, y: padding + mazeHeight + 82, textAnchor: "middle", fontSize: "10", fill: "#ffffff", fontWeight: "bold", pointerEvents: "none" }, "Try with Principal")))),
371
+ mode === 'principal' && blockageFound && (react_1.default.createElement("g", null,
372
+ react_1.default.createElement("g", { style: { cursor: 'pointer' }, onClick: handleTryAgain },
373
+ react_1.default.createElement("rect", { x: mazeX + mazeWidth / 2 - 60, y: padding + mazeHeight + 65, width: 120, height: 25, fill: mazeColor, opacity: "0.3", rx: "4" }),
374
+ react_1.default.createElement("text", { x: mazeX + mazeWidth / 2, y: padding + mazeHeight + 82, textAnchor: "middle", fontSize: "10", fill: mazeColor, fontWeight: "bold", pointerEvents: "none" }, "Try Again"))))));
375
+ };
376
+ exports.MazeDemoNew = MazeDemoNew;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface SquareLogoProps {
3
+ width?: number;
4
+ height?: number;
5
+ colors?: string[];
6
+ opacity?: number;
7
+ }
8
+ export declare const SquareLogo: React.FC<SquareLogoProps>;
9
+ export {};
@@ -0,0 +1,57 @@
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.SquareLogo = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const SquareLogo = ({ width = 150, height = 150, colors = ['#FF6B6B', '#4ECDC4', '#45B7D1', '#FFA07A', '#96CEB4', '#FFEAA7', '#DDA15E', '#BC6C25', '#E76F51'], opacity = 0.9, }) => {
9
+ const rectangleStyle = {
10
+ transition: 'all 0.3s ease',
11
+ };
12
+ return (react_1.default.createElement("svg", { width: width, height: height, viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", style: { opacity } },
13
+ react_1.default.createElement("defs", null,
14
+ react_1.default.createElement("filter", { id: "glow" },
15
+ react_1.default.createElement("feGaussianBlur", { stdDeviation: "1.5", result: "coloredBlur" }),
16
+ react_1.default.createElement("feMerge", null,
17
+ react_1.default.createElement("feMergeNode", { in: "coloredBlur" }),
18
+ react_1.default.createElement("feMergeNode", { in: "SourceGraphic" })))),
19
+ react_1.default.createElement("rect", { x: "10", y: "10", width: "10", height: "15", fill: colors[1], style: rectangleStyle, filter: "url(#glow)" },
20
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "0.8;1;0.8", dur: "3s", repeatCount: "indefinite" })),
21
+ react_1.default.createElement("rect", { x: "20", y: "10", width: "15", height: "80", fill: colors[0], style: rectangleStyle, filter: "url(#glow)" },
22
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "1;0.8;1", dur: "3s", repeatCount: "indefinite", begin: "0.3s" })),
23
+ react_1.default.createElement("rect", { x: "35", y: "10", width: "30", height: "12", fill: colors[0], style: rectangleStyle, filter: "url(#glow)" },
24
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "0.8;1;0.8", dur: "3s", repeatCount: "indefinite", begin: "0.6s" })),
25
+ react_1.default.createElement("rect", { x: "65", y: "10", width: "25", height: "12", fill: colors[0], style: rectangleStyle, filter: "url(#glow)" },
26
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "1;0.8;1", dur: "3s", repeatCount: "indefinite", begin: "0.9s" })),
27
+ react_1.default.createElement("rect", { x: "35", y: "22", width: "15", height: "18", fill: colors[3], style: rectangleStyle, filter: "url(#glow)" },
28
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "0.8;1;0.8", dur: "3s", repeatCount: "indefinite", begin: "1.2s" })),
29
+ react_1.default.createElement("rect", { x: "50", y: "22", width: "15", height: "18", fill: colors[4], style: rectangleStyle, filter: "url(#glow)" },
30
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "1;0.8;1", dur: "3s", repeatCount: "indefinite", begin: "1.5s" })),
31
+ react_1.default.createElement("rect", { x: "65", y: "22", width: "12", height: "18", fill: colors[0], style: rectangleStyle, filter: "url(#glow)" },
32
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "0.8;1;0.8", dur: "3s", repeatCount: "indefinite", begin: "1.8s" })),
33
+ react_1.default.createElement("rect", { x: "77", y: "22", width: "13", height: "28", fill: colors[0], style: rectangleStyle, filter: "url(#glow)" },
34
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "1;0.8;1", dur: "3s", repeatCount: "indefinite", begin: "2.1s" })),
35
+ react_1.default.createElement("rect", { x: "77", y: "50", width: "13", height: "40", fill: colors[5], style: rectangleStyle, filter: "url(#glow)" },
36
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "0.8;1;0.8", dur: "3s", repeatCount: "indefinite", begin: "2.1s" })),
37
+ react_1.default.createElement("rect", { x: "35", y: "40", width: "55", height: "10", fill: colors[0], style: rectangleStyle, filter: "url(#glow)" },
38
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "0.8;1;0.8", dur: "3s", repeatCount: "indefinite", begin: "2.4s" })),
39
+ react_1.default.createElement("rect", { x: "10", y: "25", width: "10", height: "35", fill: colors[6], style: rectangleStyle, filter: "url(#glow)" },
40
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "1;0.8;1", dur: "3s", repeatCount: "indefinite", begin: "2.7s" })),
41
+ react_1.default.createElement("rect", { x: "35", y: "50", width: "20", height: "20", fill: colors[7], style: rectangleStyle, filter: "url(#glow)" },
42
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "0.8;1;0.8", dur: "3s", repeatCount: "indefinite", begin: "0.3s" })),
43
+ react_1.default.createElement("rect", { x: "55", y: "50", width: "22", height: "20", fill: colors[8], style: rectangleStyle, filter: "url(#glow)" },
44
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "1;0.8;1", dur: "3s", repeatCount: "indefinite", begin: "0.6s" })),
45
+ react_1.default.createElement("rect", { x: "10", y: "60", width: "10", height: "30", fill: colors[1], style: rectangleStyle, filter: "url(#glow)" },
46
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "0.8;1;0.8", dur: "3s", repeatCount: "indefinite", begin: "0.9s" })),
47
+ react_1.default.createElement("rect", { x: "35", y: "70", width: "25", height: "20", fill: colors[2], style: rectangleStyle, filter: "url(#glow)" },
48
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "1;0.8;1", dur: "3s", repeatCount: "indefinite", begin: "1.2s" })),
49
+ react_1.default.createElement("rect", { x: "60", y: "70", width: "17", height: "20", fill: colors[3], style: rectangleStyle, filter: "url(#glow)" },
50
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "0.8;1;0.8", dur: "3s", repeatCount: "indefinite", begin: "1.5s" })),
51
+ react_1.default.createElement("line", { x1: "20", y1: "10", x2: "20", y2: "90", stroke: "rgba(255, 255, 255, 0.15)", strokeWidth: "0.5" }),
52
+ react_1.default.createElement("line", { x1: "35", y1: "10", x2: "35", y2: "90", stroke: "rgba(255, 255, 255, 0.15)", strokeWidth: "0.5" }),
53
+ react_1.default.createElement("line", { x1: "10", y1: "22", x2: "90", y2: "22", stroke: "rgba(255, 255, 255, 0.15)", strokeWidth: "0.5" }),
54
+ react_1.default.createElement("line", { x1: "10", y1: "40", x2: "90", y2: "40", stroke: "rgba(255, 255, 255, 0.15)", strokeWidth: "0.5" }),
55
+ react_1.default.createElement("line", { x1: "10", y1: "50", x2: "90", y2: "50", stroke: "rgba(255, 255, 255, 0.15)", strokeWidth: "0.5" })));
56
+ };
57
+ exports.SquareLogo = SquareLogo;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface WreathLogoProps {
3
+ width?: number;
4
+ height?: number;
5
+ pColor?: string;
6
+ wreathColor?: string;
7
+ leafAccentColor?: string;
8
+ opacity?: number;
9
+ animationSpeed?: number;
10
+ }
11
+ export declare const WreathLogo: React.FC<WreathLogoProps>;
12
+ export {};
@@ -0,0 +1,92 @@
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.WreathLogo = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const WreathLogo = ({ width = 150, height = 150, pColor = '#2C3E50', wreathColor = '#27AE60', leafAccentColor = '#52BE80', opacity = 0.9, animationSpeed = 3, }) => {
9
+ const wreathRadius = 58;
10
+ return (react_1.default.createElement("svg", { width: width, height: height, viewBox: "0 0 200 200", xmlns: "http://www.w3.org/2000/svg", style: { opacity } },
11
+ react_1.default.createElement("defs", null,
12
+ react_1.default.createElement("radialGradient", { id: "wreathGlow", cx: "50%", cy: "50%", r: "50%" },
13
+ react_1.default.createElement("stop", { offset: "0%", style: { stopColor: wreathColor, stopOpacity: 0.3 } }),
14
+ react_1.default.createElement("stop", { offset: "100%", style: { stopColor: wreathColor, stopOpacity: 0 } })),
15
+ react_1.default.createElement("filter", { id: "softGlow" },
16
+ react_1.default.createElement("feGaussianBlur", { stdDeviation: "2", result: "coloredBlur" }),
17
+ react_1.default.createElement("feMerge", null,
18
+ react_1.default.createElement("feMergeNode", { in: "coloredBlur" }),
19
+ react_1.default.createElement("feMergeNode", { in: "SourceGraphic" })))),
20
+ react_1.default.createElement("circle", { cx: "100", cy: "100", r: "70", fill: "url(#wreathGlow)", opacity: "0.3" }),
21
+ react_1.default.createElement("path", { d: (() => {
22
+ const numPoints = 24;
23
+ const waveAmplitude = 2;
24
+ let pathD = '';
25
+ const points = [];
26
+ // Generate all points first
27
+ for (let i = 0; i <= numPoints; i++) {
28
+ const angle = (360 / numPoints) * i;
29
+ const radians = (angle * Math.PI) / 180;
30
+ // Use sine wave for smooth variation
31
+ const radiusVariation = Math.sin((angle * Math.PI) / 180 * 6) * waveAmplitude;
32
+ const currentRadius = wreathRadius + radiusVariation;
33
+ const x = 100 + currentRadius * Math.cos(radians);
34
+ const y = 100 + currentRadius * Math.sin(radians);
35
+ points.push({ x, y, angle, radians });
36
+ }
37
+ // Create smooth cubic bezier path with better control points
38
+ pathD = `M ${points[0].x},${points[0].y}`;
39
+ for (let i = 0; i < points.length - 1; i++) {
40
+ const current = points[i];
41
+ const next = points[i + 1];
42
+ // Calculate tangent for smooth curves
43
+ const tangentLength = 0.4;
44
+ const cp1x = current.x - Math.sin(current.radians) * tangentLength * 15;
45
+ const cp1y = current.y + Math.cos(current.radians) * tangentLength * 15;
46
+ const cp2x = next.x + Math.sin(next.radians) * tangentLength * 15;
47
+ const cp2y = next.y - Math.cos(next.radians) * tangentLength * 15;
48
+ pathD += ` C ${cp1x},${cp1y} ${cp2x},${cp2y} ${next.x},${next.y}`;
49
+ }
50
+ return pathD + ' Z';
51
+ })(), fill: "none", stroke: wreathColor, strokeWidth: "7", strokeLinecap: "round", strokeLinejoin: "round", opacity: "0.75", filter: "url(#softGlow)" },
52
+ react_1.default.createElement("animate", { attributeName: "stroke-opacity", values: "0.65;0.85;0.65", dur: `${animationSpeed}s`, repeatCount: "indefinite" })),
53
+ react_1.default.createElement("path", { d: (() => {
54
+ const numPoints = 24;
55
+ const waveAmplitude = 1.5;
56
+ const innerRadius = wreathRadius - 9;
57
+ let pathD = '';
58
+ const points = [];
59
+ for (let i = 0; i <= numPoints; i++) {
60
+ const angle = (360 / numPoints) * i + 15; // Offset from main wreath
61
+ const radians = (angle * Math.PI) / 180;
62
+ // Use sine wave offset for smooth variation
63
+ const radiusVariation = Math.sin(((angle + 30) * Math.PI) / 180 * 6) * waveAmplitude;
64
+ const currentRadius = innerRadius + radiusVariation;
65
+ const x = 100 + currentRadius * Math.cos(radians);
66
+ const y = 100 + currentRadius * Math.sin(radians);
67
+ points.push({ x, y, radians });
68
+ }
69
+ pathD = `M ${points[0].x},${points[0].y}`;
70
+ for (let i = 0; i < points.length - 1; i++) {
71
+ const current = points[i];
72
+ const next = points[i + 1];
73
+ const tangentLength = 0.4;
74
+ const cp1x = current.x - Math.sin(current.radians) * tangentLength * 15;
75
+ const cp1y = current.y + Math.cos(current.radians) * tangentLength * 15;
76
+ const cp2x = next.x + Math.sin(next.radians) * tangentLength * 15;
77
+ const cp2y = next.y - Math.cos(next.radians) * tangentLength * 15;
78
+ pathD += ` C ${cp1x},${cp1y} ${cp2x},${cp2y} ${next.x},${next.y}`;
79
+ }
80
+ return pathD + ' Z';
81
+ })(), fill: "none", stroke: leafAccentColor, strokeWidth: "5", strokeLinecap: "round", strokeLinejoin: "round", opacity: "0.6", filter: "url(#softGlow)" },
82
+ react_1.default.createElement("animate", { attributeName: "stroke-opacity", values: "0.5;0.7;0.5", dur: `${animationSpeed}s`, repeatCount: "indefinite", begin: "0.5s" })),
83
+ react_1.default.createElement("g", { filter: "url(#softGlow)" },
84
+ react_1.default.createElement("defs", null,
85
+ react_1.default.createElement("linearGradient", { id: "pGradient", x1: "0%", y1: "0%", x2: "0%", y2: "100%" },
86
+ react_1.default.createElement("stop", { offset: "0%", style: { stopColor: pColor, stopOpacity: 1 } }),
87
+ react_1.default.createElement("stop", { offset: "100%", style: { stopColor: pColor, stopOpacity: 0.85 } }))),
88
+ react_1.default.createElement("path", { d: "M 82,70\n L 82,130\n L 90,130\n L 90,102\n L 104,102\n C 114,102 122,94 122,84\n C 122,74 114,70 104,70\n Z\n M 90,78\n L 104,78\n C 109,78 114,80 114,84\n C 114,88 109,94 104,94\n L 90,94\n Z", fill: "url(#pGradient)" },
89
+ react_1.default.createElement("animate", { attributeName: "opacity", values: "0.95;1;0.95", dur: `${animationSpeed}s`, repeatCount: "indefinite" })),
90
+ react_1.default.createElement("path", { d: "M 83,72 L 83,128 L 84,128 L 84,72 Z", fill: "white", opacity: "0.15" }))));
91
+ };
92
+ exports.WreathLogo = WreathLogo;