Skip to content

feat: add whiteboard library template hooks#17

Open
hweihwang wants to merge 1 commit intomasterfrom
whiteboard-library-template-support
Open

feat: add whiteboard library template hooks#17
hweihwang wants to merge 1 commit intomasterfrom
whiteboard-library-template-support

Conversation

@hweihwang
Copy link
Copy Markdown

@hweihwang hweihwang commented May 4, 2026

Adds the Whiteboard hook for saving library items as templates.

  • exposes onLibrarySaveAsTemplate
  • adds library menu action
  • fixes missing searchMatches.matches crash
  • updates size-limit paths for current build output

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

size-limit report 📦

Path Size
0 B (+100% 🔺)
dist/excalidraw-assets/locales 0 B (+100% 🔺)
dist/excalidraw-assets/vendor*.js 0 B (+100% 🔺)
dist/prod/index.js 224.81 KB (+100% 🔺)
dist/prod/locales 514.14 KB (+100% 🔺)
dist/prod chunks 796.15 KB (+100% 🔺)

@hweihwang hweihwang changed the title Add whiteboard library template hooks feat: add whiteboard library template hooks May 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 66.41% (🎯 60%) 83988 / 126450
🔵 Statements 66.41% (🎯 60%) 83988 / 126450
🔵 Functions 64.38% (🎯 63%) 2245 / 3487
🔵 Branches 80.58% (🎯 70%) 10522 / 13057
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/common/src/utils.ts 84.82% 88.12% 80% 84.82% 88-91, 106-107, 148-150, 275-276, 310, 338-351, 354-361, 364-368, 401, 410, 413, 461, 485-490, 498-499, 562-578, 581-585, 589-602, 616-618, 620-621, 624-625, 628-636, 639-642, 746, 795-796, 823, 867-873, 878-895, 907-913, 942-955, 959-960, 1006-1016, 1027-1028, 1095-1096, 1107-1108, 1221-1226, 1255, 1299-1301, 1309-1324
packages/excalidraw/index.tsx 84.84% 89.47% 66.66% 84.84% 155-159, 226-278, 420-426
packages/excalidraw/types.ts 0% 0% 0% 0% 1-1060
packages/excalidraw/components/App.tsx 72.68% 77.2% 73% 72.68% 548-549, 764-765, 864-924, 927-1011, 1014-1028, 1034-1238, 1299-1304, 1312-1313, 1373-1378, 1388, 1390-1391, 1409-1410, 1417-1466, 1485-1504, 1532-1533, 1586-1587, 1592-1725, 1732, 1735, 1748, 1756, 1788, 1793-1795, 1805, 1811, 1890-1894, 1898-1902, 1934-1935, 1952-2000, 2027, 2040, 2047-2050, 2059-2063, 2092-2098, 2116, 2197-2207, 2212-2227, 2231-2278, 2376-2381, 2391, 2416-2417, 2424-2429, 2432-2462, 2470-2499, 2512-2603, 2606-2614, 2617-2676, 2679-2720, 2723-2733, 2764-2765, 2788-2789, 2821-2824, 2828-2829, 2849-2857, 2862-2875, 2881-2882, 2886, 2897, 2901-2909, 2941, 2978-2979, 3005, 3029-3035, 3040-3045, 3051-3053, 3104-3107, 3117-3122, 3127-3128, 3163-3166, 3204-3209, 3214-3223, 3267-3269, 3385, 3388-3389, 3397-3400, 3409-3422, 3428-3431, 3434, 3436-3437, 3445-3446, 3452-3453, 3456-3457, 3468, 3470-3474, 3477-3478, 3481-3482, 3493-3501, 3506-3507, 3527-3528, 3542-3548, 3554-3562, 3566-3574, 3578-3580, 3583-3641, 3644-3656, 3674-3676, 3680-3686, 3693-3701, 3710-3713, 3720-3721, 3729-3731, 3787, 3801, 3834-3835, 3846-3847, 3859-3866, 3898, 3904, 3931-3933, 3968-3971, 3991-3993, 4022-4026, 4032-4080, 4134, 4138, 4173-4174, 4233, 4243-4261, 4264-4270, 4273-4274, 4280-4296, 4336-4361, 4444-4445, 4462-4476, 4484-4490, 4504-4505, 4511-4524, 4577-4578, 4583-4601, 4604-4612, 4682-4692, 4728, 4762-4765, 4767-4789, 4911-4912, 4914-4921, 4955-4959, 4961-4962, 4964-4967, 4988-4989, 4993-4998, 5012-5014, 5028-5029, 5038, 5044-5052, 5055-5057, 5066-5069, 5078-5079, 5104-5114, 5124-5126, 5128, 5202-5205, 5217-5218, 5220-5240, 5247-5270, 5288-5291, 5307-5314, 5333-5357, 5382-5414, 5497-5501, 5505, 5513-5514, 5542, 5570-5571, 5574-5575, 5587-5591, 5596-5597, 5603-5613, 5618-5645, 5650-5661, 5770-5771, 5818-5819, 5897-5898, 5917-5926, 5976, 6004, 6030-6032, 6109-6110, 6124-6125, 6328-6329, 6333-6344, 6369-6370, 6373-6374, 6390-6391, 6439, 6464-6465, 6507-6511, 6554-6566, 6617-6618, 6659-6666, 6720, 6779, 6803, 6810-6811, 6824-6827, 6837, 6849-6857, 6889-6892, 6916-6944, 6978-6981, 6990-7017, 7034-7035, 7102-7104, 7181-7182, 7232-7234, 7236, 7245, 7247-7248, 7270, 7290-7306, 7308, 7310-7313, 7317-7328, 7332-7333, 7348-7349, 7385, 7389, 7396-7408, 7452-7459, 7463-7464, 7466-7467, 7501-7514, 7517-7518, 7546, 7548-7578, 7585-7586, 7610-7611, 7630, 7632-7675, 7680-7681, 7683-7684, 7705-7706, 7709-7710, 7715-7716, 7720-7724, 7727-7728, 7731-7842, 7861-7862, 7866-7869, 7894-7898, 7929-7930, 7942-7943, 8003-8006, 8062, 8079-8080, 8082-8105, 8123-8124, 8240-8268, 8329-8330, 8365-8369, 8388-8389, 8410-8419, 8476-8477, 8496-8497, 8546-8559, 8618, 8624-8625, 8648-8667, 8676-8685, 8699, 8856-8894, 8910, 8917-8918, 8921-8925, 8963, 8972, 9021-9036, 9059, 9061, 9166, 9274-9275, 9289-9293, 9331-9334, 9356-9386, 9399, 9401-9409, 9423, 9425-9433, 9451-9456, 9465-9466, 9470-9473, 9489-9506, 9550-9551, 9554-9556, 9572-9573, 9585-9606, 9624-9625, 9657-9658, 9668-9669, 9674-9676, 9678-9679, 9683-9684, 9731-9732, 9745-9746, 9770-9775, 9777-9778, 9784-9786, 9788-9789, 9813-9826, 9830-9923, 9984-9985, 10037-10039, 10116-10129, 10132-10145, 10166, 10186-10218, 10233-10239, 10272, 10314-10317, 10323, 10338-10348, 10351-10361, 10455-10456, 10475, 10491, 10493, 10528-10538, 10616-10618, 10621, 10660-10677, 10723-10726, 10776-10790, 10820-10844, 10878-10885, 10905-10906, 10941-10948, 11005-11010, 11019-11043, 11045-11046, 11126-11130, 11137, 11139-11175, 11204-11207, 11243-11244, 11273-11274, 11299, 11340-11341, 11361-11363, 11366-11447, 11456-11457, 11463-11472, 11477, 11481-11485, 11494-11498, 11501-11506, 11538-11539, 11564-11566, 11611-11627, 11671-11685, 11702-11718, 11801-11805, 11874-11878, 11928-11929, 11949, 11980-11999, 12001-12002, 12034-12035, 12039-12040, 12050, 12052-12055, 12057-12058, 12098-12101, 12158, 12201, 12221-12229, 12240-12245, 12255-12256, 12258-12321, 12344-12345, 12377-12380, 12467-12474, 12502-12503, 12514, 12560-12632, 12680-12681, 12690-12693, 12698-12699, 12720-12722, 12724-12728, 12768
packages/excalidraw/components/HintViewer.tsx 93.79% 93% 100% 93.79% 61-64, 103-104, 113-116, 173-176, 230-232
packages/excalidraw/components/LibraryMenuHeaderContent.tsx 56.47% 47.05% 27.27% 56.47% 40-42, 71-95, 101-103, 106, 116-148, 152-164, 181-186, 190-198, 201-215, 249-257, 260-266, 285, 289-306, 331-341, 344-346, 356
packages/excalidraw/renderer/interactiveScene.ts 74.73% 85.08% 92% 74.73% 145-146, 148-149, 153-154, 184-194, 219, 235, 237-256, 261-292, 309, 328-367, 448-463, 536, 545, 559-888, 900-901, 904-913, 922, 1087-1088, 1128-1131, 1133-1134, 1239, 1309, 1311-1312, 1572-1573, 1628-1629, 1808, 1821-1830, 2005-2008, 2045-2068
scripts/buildBase.js 0% 0% 0% 0% 1-55
scripts/buildPackage.js 0% 0% 0% 0% 1-130
Generated in workflow #5 for commit 19a47f9 by the Vitest Coverage Report Action

Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
@hweihwang hweihwang force-pushed the whiteboard-library-template-support branch from 571e8d3 to 19a47f9 Compare May 4, 2026 18:00
@hweihwang hweihwang marked this pull request as ready for review May 5, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant