AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
feat(poster): add bookish paper list template
tianma-ifc519df788f30
diff --git a/apps/web/src/assets/poster-template-previews/manifest.json b/apps/web/src/assets/poster-template-previews/manifest.jsonindex f6e7c113..beb7b92e 100644--- a/apps/web/src/assets/poster-template-previews/manifest.json+++ b/apps/web/src/assets/poster-template-previews/manifest.json@@ -1,22 +1,36 @@{"version": 2,- "sourceHash": "2f924f4f22fbfe7d16e8986cfaf92703a4c89d1efaba00d38b092a75352040fa",- "painterHash": "fe3d31c70c073ff6e75670c2cdf748a3cc69cde2a8d9f9e2eb06ecf3ad2f2921",+ "sourceHash": "b459f156faf53f4c06691a105a020263ab6e4ae765294d56c6ca607d374f012a",+ "painterHash": "776e6d0d9b7d65e9f14b930d672baef4fec0bc9eb8c8df7e3284412604dabfff","width": 480,"height": 640,"templates": [+ {+ "id": "paper-list",+ "recommended": true,+ "zh": {+ "file": "paper-list.zh.webp",+ "sha256": "15fe20c64a0f4bee40fed31939565058321349e480212130ac7d70d2a79d19de",+ "renderHash": "6025e1614e3b8e02b65bb00b03dac8bcfa402e5e25017887adcc48ae8b211a47"+ },+ "en": {+ "file": "paper-list.en.webp",+ "sha256": "53d2d2e225d744ed2677b9408a5055370fe933c68c791701c3d7f73dddcd9a58",+ "renderHash": "11bc357c37681d4a7b680776a73a6fcbec77d67df32b59e0cd08aa4b3bb73673"+ }+ },{"id": "folio","recommended": true,"zh": {"file": "folio.zh.webp","sha256": "32b38ef41e79e08768a287dd8669124a0a8c7716eefca8ce8b00d625f1522b2a",- "renderHash": "5d948770b5582ed2dd15a84b3fdacc4bce4449825b117386a2c81038be6f13ad"+ "renderHash": "8887932ff6438c9284d3e5cca249ac705fd3bba4b9d59e6bf79d8cf25360efeb"},"en": {"file": "folio.en.webp","sha256": "b37a410d6e1ca601d308574e7c174a79ad05e28db190fc009e796e3890d11b5b",- "renderHash": "6a8d7ae8eed28e6f54eda09a563c3812a0f8076086873cab1de7e7705b54958a"+ "renderHash": "30442219bd116ad2c444021a1778c3f56e659c3c24045d061d8b6c94bda55f36"}},{@@ -25,12 +39,12 @@"zh": {"file": "brush.zh.webp","sha256": "43b5358725d5ce23ba0cc53e59ac890d795adbba9f1368aba4889dbd8aa35deb",- "renderHash": "c4487abc5e04dcad47e072b06cd62f825e484203ce0c654a745d75692d6e9656"+ "renderHash": "b7cead7b7b4cb1a6b4b106de04b88dc3bc2759d425f318ffa2489ee97e5dc341"},"en": {"file": "brush.en.webp","sha256": "d28770577aecdeb894881c77c401c7969342257bc154935a668bb9ae9b105002",- "renderHash": "f945ef1605e0410fc7b80b2c7ec5003f7c5428f1f3495e8bd2f07dec1101dbaa"+ "renderHash": "ebb7ae49e836b6a9dcb02eda3790ca483b14266373faf9bf4a764d6df63acc56"}},{@@ -39,12 +53,12 @@"zh": {"file": "keyword.zh.webp","sha256": "8f19a768a34b19fc61165760c80e796a4921cbc1e92f6c07f21235cc52a8dcb1",- "renderHash": "6995c30c81a1ce2febc9adbc7f5b9e1cbbaab11a95cfc9db0a1d46a5e8403ea9"+ "renderHash": "b2a7d063b2b6cc5987f6b8b42dad852d1ee52ec3b518d2aeb8171924fb7e1a55"},"en": {"file": "keyword.en.webp","sha256": "d87c4a20b6616d18983ffa01d13b25a304f6e703d3f5eaac91bf407430abdfb0",- "renderHash": "43612c160c3f7c59296bdbb863ffd2ce490e2ce64ec78c60f696bb831cdedb10"+ "renderHash": "5079aee0f51238afbb62e805869765b43bcfd9b779bf3ab32a31a6d2daabe835"}},{@@ -53,12 +67,12 @@"zh": {"file": "regeng.zh.webp","sha256": "daaee9fc1c7d2ed41219df130024a0d3080b52c09165178834e15eb4a1c568cb",- "renderHash": "2f2f8d1fdff2adf68cd4d6270b6fd70dd2a6773a2d8a39de6928cd645d693d93"+ "renderHash": "fd2a8c8ebc028d8cf8c00a8a1c32b19d9462f12e19470b40bea02a5abb7e012f"},"en": {"file": "regeng.en.webp","sha256": "ae977f20e487e29e1e9d144497493ac8e2e10918b4a64bc8cf73310bb8c49b96",- "renderHash": "80f3dcdb41c026ae46a09fc37c1d3d7b6524d4a820fc76cbf8570a109167e9db"+ "renderHash": "b6a1b60e5f6d707b7616f4920468b09abfaa72879693fb33323797011bcc8771"}},{@@ -67,12 +81,12 @@"zh": {"file": "highlight.zh.webp","sha256": "cb2dbbf33dce22e37d15351d54d58367e8862ded39c3d01371390abf0a3a23b9",- "renderHash": "34b788bf8a1489c9c8a81bfbd16486b16c4a02c11aa629a54e9e68dc633f6787"+ "renderHash": "dc5c678b3d3d56270e89cd86ceb1dc503e949d016ec3d8dc2a3a8d0fb501c0e6"},"en": {"file": "highlight.en.webp","sha256": "5445184ce5e6103731ee64e9de5e901122ad4849f1fa59ccd0f13818035da2c6",- "renderHash": "54484515c9e82fb5bbf4f84f8bff3f64598f0dc5daec2496a90ac522e4b71711"+ "renderHash": "a72e029e997a6cd34ce0fddb68e5aa164a00528865f3ebf236d55c313df704bd"}},{@@ -81,12 +95,12 @@"zh": {"file": "frame.zh.webp","sha256": "96881d595e8505a0a5ed2744a950184e89af448746bbb13c1141323ec60526ef",- "renderHash": "15eb74440e7b1707216674e138db03303ec9391e205ad00468336a6e7dbcd008"+ "renderHash": "ab0f5a6612dd2d5e2accf665764398551fe9f15ff6350fcf1770f041bd0f42b2"},"en": {"file": "frame.en.webp","sha256": "b8036e11930c45696bd8f78fba6771c3704a99e7135645680085010e17ca2271",- "renderHash": "d1f578e5252956587c3e630747d3c8578bad7d5b054a80ba699ad00d41135586"+ "renderHash": "9c5d8b5316ee56e5ef232b02f469c7092accd2905273ceb1b42b0c19194cd10f"}},{@@ -95,12 +109,12 @@"zh": {"file": "sage.zh.webp","sha256": "ccf35a6062ac4dacd593d35c0d2ea65f5c53898f010b1735d5189e67be4e96f0",- "renderHash": "0171a348ff96972be4d9c0680093a8679f3193a2221d9d0073097ed61a3b223f"+ "renderHash": "8ed50b35731c62252e09d92e518c90f9904eb06cd7b132685a2a62c1ad680041"},"en": {"file": "sage.en.webp","sha256": "8b79de2ce1ca418e08e53aca5e1e8df749ea788bd17d4f8b4755c174f5af9711",- "renderHash": "e7424c7f4da4b0f4ec5bfdd1e5af510ad2336bcaffa0801e5756da316d6c538e"+ "renderHash": "d8afc2ce7f14f24e5120d2127a5cea0fabf077c2a0f9e8ce8017374ad9e09388"}},{@@ -109,12 +123,12 @@"zh": {"file": "notes.zh.webp","sha256": "87716a4e8107b11e1fdaf03d9acd2fc0a0e899f81a59e0d97e48ded131d22451",- "renderHash": "d66292c919e99bd4df80b0f39b1b9cb99e2412b09afcc525bd29c990eb32ad83"+ "renderHash": "617057d631c0f91ad073e4ac97fd908e203f5140a2edddf873517b5a5686d6df"},"en": {"file": "notes.en.webp","sha256": "84152613d837c426473c14afe90b1419c74855070a9760115062ae1da4a9a75d",- "renderHash": "e694ca635b9b2f4481abdc0cbfa1d0d5d936ca44735fe330c2808639b062d19c"+ "renderHash": "0b89ce62c248af3b1e2841c737e27ae233c199ee39b1ad3725ff69c69d8b1a18"}},{@@ -123,12 +137,12 @@"zh": {"file": "interview.zh.webp","sha256": "d732120902782f62ea0b72f8c806ff18b41f94234323b300d2e1f54fd3140b11",- "renderHash": "4d9d35f551e3f354a5246d50ee2e405471649ce1caef20c9cc97a6818246d1ec"+ "renderHash": "a66855505cf6c4359149381752ff14d8f7600c2475504d61645a0744bcb7067e"},"en": {"file": "interview.en.webp","sha256": "f0ac0a8c21abc35de5882f0fbc67169650f50335ad66afd99eb0350eb7014adb",- "renderHash": "a5d48040e2c922885ba5fcd50e23764fa553574b35c03c935a25dd132e771b66"+ "renderHash": "ee666fc43df43860325203f789a5f845f6cf8f9c2b109949391260e776ae27c4"}},{@@ -137,12 +151,12 @@"zh": {"file": "riso.zh.webp","sha256": "f02df81ab9ea91af89fea1111a74c40287cddfc6e727b093924cdf3699ae0db7",- "renderHash": "4bafc8d522f9b772935ccbd7514ffa86a33fdf22bd13c694e7982b7e20810917"+ "renderHash": "bbfa35bc85241171e51c8827f05797d3ce919f38683c7e6414933639d58324af"},"en": {"file": "riso.en.webp","sha256": "4c30c9548cfb48583fcc26ef3c9e96457527fdb769ed736143e0d16b0e9b03b7",- "renderHash": "d142606bfbb5c3b502ab89fd086bb3fa8a4169c455553d6d99a7f40d17fae9cf"+ "renderHash": "f71c95260d4eb94726842472ddd391f93758ece82af8a676a9ffea1a42894d26"}},{@@ -151,12 +165,12 @@"zh": {"file": "kicker.zh.webp","sha256": "4a3f513e703d2f88dcc09ea43de9ceac4c07e9df353804581a361d8d26136961",- "renderHash": "efb3ea0bfadbb5c88e232b9ddb5af9cbdbc2f0e717959bf1bf1c7c241f1ebad2"+ "renderHash": "e754e78d86f7c14e13d95bc4d5d785a20ac31ce5ce0422f3382b9b23bbdaaf35"},"en": {"file": "kicker.en.webp","sha256": "884bdd17db2fce142f021664fb763c7d10bcbdc534b1e336e30dc21fe0443c97",- "renderHash": "9546e84b8a1e7fb81237399cb2e69c86439c4d936cd0f8762cd405153276bdf1"+ "renderHash": "76140fb322046bd5607c39eb7eb8b30ae7df8a743910dd4ab6dfbbe4a1e4b621"}},{@@ -165,12 +179,12 @@"zh": {"file": "numeral.zh.webp","sha256": "51746285ea9946f2dc97448678c27d2410bc913c0a003d65fc74b74f73cc65e3",- "renderHash": "2f837c7d9920a2ca1146f271a2634c43f84331e2d4c1aed5d203d21ea4e41187"+ "renderHash": "04306c6c4d75dec5362f4e9387468f69825958595157aecb7150d25eed687f73"},"en": {"file": "numeral.en.webp","sha256": "9847d7ab120588f53b75030de967d868c4f9458755248a7a546b8f018a98fe9a",- "renderHash": "edac7fed8d5d2799b10213825411b47773828a1d883c0884c66064268be2c455"+ "renderHash": "086b157bb067e3a53980e05005dd9fff88a7532eff5c3d9fa8ee7d8c66a85b7e"}},{@@ -179,12 +193,12 @@"zh": {"file": "calendar.zh.webp","sha256": "ee28322ed9ac8cd150561515fc8991bac38b90798c9804b8cde13b1c4449aff1",- "renderHash": "dd3d46e12a26511131e9ed68de202dc5a91c069feab722af469839561e6526cf"+ "renderHash": "6f9de6d9e69e8a46aa746056d1db889714742a27972d2323c6adec73749df3e6"},"en": {"file": "calendar.en.webp","sha256": "4ae26864c6f18c4831c2a969e8834838c7c2a3da9c154e76a8573bfce753b65a",- "renderHash": "95db0ed3e30827049eefbd95312f84c5d548bf559bdda27a23a90ba4c238df95"+ "renderHash": "fc7c8fda4f5fd921e2e06bc235621a8d4567b2ec803605aef73a112e878aa547"}},{@@ -193,12 +207,12 @@"zh": {"file": "ticket.zh.webp","sha256": "db0be6d02049ee12424a697b22c35cb9b02fa171abfa9f670d5170ea098c5567",- "renderHash": "aa3efd1865a072245f18adef274c79bc682f1f07cdb5b2d17583279177ba7186"+ "renderHash": "4361f6aaba1a7d430d42e5f88ed16c738d0246b951935d4e047fe31d25fa548a"},"en": {"file": "ticket.en.webp","sha256": "38807f3f68d2ec215826b133c8890698f02575aa2a0d665b1084c4f60e4a832e",- "renderHash": "00dd703bc9493183591eefef8b3e67ea6ce8fd158f55889772da22514034ef94"+ "renderHash": "631dcae24f9a3af6f2ea04c05ca0f4ff011699638706ff6805e3b7891c73652d"}},{@@ -207,12 +221,12 @@"zh": {"file": "corner.zh.webp","sha256": "a669b91e27294814496b2f56f9657b7026efbe5f5a05c0b9dd98f7f0273b30e9",- "renderHash": "e28869b8e946c3b3de4f0a19e9f96be3c1ac98f7c4ab036c9c4cc2791b01b083"+ "renderHash": "fbe4732b0c94bd72b430a32dd32b9229f1e80d4a60728c9c566d7015f3a4dbc5"},"en": {"file": "corner.en.webp","sha256": "32a1effc38ae32290b81614d9557addb82db9acc58d0d7e48cd4a975cea8665a",- "renderHash": "6bd76efa7919e168fe9f556fac3f0295da4d4b6b384ee1c7ac07f398798acad8"+ "renderHash": "177fea332ea7f14cc39585155700eef0c695b98eeddbd75d74296bac7e06d11e"}},{@@ -221,12 +235,12 @@"zh": {"file": "polaroid.zh.webp","sha256": "58286dec0d3e8f4b12e6948fd20766eceabb64cf5f67d8b3cedb082dcd2a6460",- "renderHash": "e2e13211573156529a32aaa38c5ed126035853cfd261f2fdda0023cd61253aa1"+ "renderHash": "7df128900f09d4824ae51d507fbc72bd45c0721890f36953eb1b796485dc8bbb"},"en": {"file": "polaroid.en.webp","sha256": "a23c4892ece241e283856cd0d6ba805866bdf087b26b0bcc81a4ef4d14094548",- "renderHash": "54b5ca3e7d7131412bacbfce599752a20e8af6d84244d5c837fa684c220626ad"+ "renderHash": "83e120e8c2f47463f1559f9c702d109d75a5473dc0fc06779ec63519456f2fcb"}},{@@ -235,12 +249,12 @@"zh": {"file": "serial.zh.webp","sha256": "aeb766583c4fb435fb02cbd1c2b93979252732a2ffd26b67cd327d59e11e30c5",- "renderHash": "f84199aaad0d52720d776c54ac30584fcd0908992c5090f56a57289888815f46"+ "renderHash": "44f3d571c5ebc75a37bf06cae2a80c110d5d5236e39a0dd77f63fcaf8ffbf9f2"},"en": {"file": "serial.en.webp","sha256": "83c7418bff171df1b67a3969f1b0f6853e6d1e0979cee6bae0bfcc3aa233be06",- "renderHash": "62b31d9d65c803b497afae6c51716df62b632400c71a41e88a384d2798eb380e"+ "renderHash": "4925808c922ac8d026131f6bdbe8447ed46734aede02ec69fd48d8b6520274e0"}},{@@ -249,12 +263,12 @@"zh": {"file": "chat.zh.webp","sha256": "107d0c5bacc6802120ea5fe7555f97de4f7f081bb0b300851c0f2bf92929e4e1",- "renderHash": "ee373b305e336ae34ad46c7905cbb920198f6cef20a4a41204d4442b9f5f0bd1"+ "renderHash": "ea20dcec67e5d2debd2d465953769869b8c7ea13cb1a2778918c49de1c266590"},"en": {"file": "chat.en.webp","sha256": "4ce88c95fcb6bec83c4bcf546fc826364bee4774bfeec45ffa0c16a8e21cb3f0",- "renderHash": "89f286d86602453b1bc7d8537de5c2075992c06abdf7f1ba24c563f8585b56ad"+ "renderHash": "46fe2d6a840bc7fd01d843bd5ac9c59d003db9fa76e09d54aa666cde545599e6"}},{@@ -263,12 +277,12 @@"zh": {"file": "window.zh.webp","sha256": "2141cac66c25c6a23d5ffc17e4bcb3a32d080f418328b6a9c12b59ed829b3ded",- "renderHash": "9d583056717187957ed9f8d4e20d9cb1c021841f69141745dad09c43ca00b08a"+ "renderHash": "ad0de64f2231d5e1994827a4fa694c34f90cc8d94942edafe95a6aaf45cb66bf"},"en": {"file": "window.en.webp","sha256": "36c3ceb0696cdaf9e06fda1dfcb4ef18d77082697dea50ff5d1f7ed373b4e997",- "renderHash": "b51e76b1dbc78f5adc1246d302fccf030b6d8e7bf02c210f7fdc1f526b4099e1"+ "renderHash": "b5c5ec6395323b58583e2f34babac88a21073d9261a8b5f1deff2d0ed1b7a0c7"}},{@@ -277,12 +291,12 @@"zh": {"file": "newspaper.zh.webp","sha256": "9063ac7fd5e9a80fc01caeae88687e1914a31e3b8b6f44f98e9dbe8def30df8c",- "renderHash": "3142893d231023de48f8c0fb5b580d8ab3cbb2ccd29753a7e3474a62a0f1de76"+ "renderHash": "acd3d70fb06d3daa45b36480a5ca6c6ca51e014e71e2f219fc62ff90b9c0b159"},"en": {"file": "newspaper.en.webp","sha256": "d26179d919b64d89c61b7563aef11373b9d36a76cc67caf1a065331cf5c25e89",- "renderHash": "3b9d15234276c00fe88e9bde85d5cf9ca3a63663003761643ae5902f725c4c12"+ "renderHash": "dbf8b6b9948b1271fe1a08bc4c4898265c387404e333672ab7f7c1677841be2d"}},{@@ -291,12 +305,12 @@"zh": {"file": "stack.zh.webp","sha256": "ebd06cb881a03d3725c5ba5c665b09e336480a7ad87ab0f6137759b8be91c807",- "renderHash": "833435ce4ef72f80437dbe1d794fa32b5f391bb99da61929dfc7141147aa1dc1"+ "renderHash": "80c155b7d4bdf34d267316816587a0a7791ae102e564d46261ad129f3a92351b"},"en": {"file": "stack.en.webp","sha256": "429d2f40aa4cdb1fb3f33825f98f89cfc64184b117cdc6424931f838b14642c2",- "renderHash": "ee2a73f640f7111b93e83e3dd0b297237f547ee85651d18264082453d68abbac"+ "renderHash": "ba493810be417dc0ccb4deb9932080c9d208e572c0d4b465381dbbbce020d72c"}},{@@ -305,12 +319,12 @@"zh": {"file": "bili.zh.webp","sha256": "8908433e6443f0ac8ecc582e10f47f52b36f22612fbabc37e1c83965cd388527",- "renderHash": "f6c7a46dcca7e3899e5f402a70f8049a097334996d3df3443167342a6f6e75d9"+ "renderHash": "f1d25c66a2296a00769762441f41a0957b39018b4591b4c7c1dec526bb036876"},"en": {"file": "bili.en.webp","sha256": "ea4dd7a056f92d1883fcecc0eba4e28bf6a94252bd5ca9be955e4760abe44d44",- "renderHash": "303862eae4bda27aa6d7f1f955cc103640d87cbe1bd1ad8e50e2750046215f16"+ "renderHash": "7599f5bacfbfd9d42d6df5d5d6440c7d8f28211bd2c339ec08978329ffa5ea13"}},{@@ -319,12 +333,12 @@"zh": {"file": "pop.zh.webp","sha256": "463b6b02c6d891d01df1ab36bc8aaae04c381a642dbfef286be2a80c99e0c93d",- "renderHash": "d7b664b83236b96d523341e44cdd9cd8ddca527c78f3fadc1d642e7c6f93a285"+ "renderHash": "ad48bb2666307ddaa685fb7b6f701dd1a72d3fef4ea2a646669f7dc4f972fd63"},"en": {"file": "pop.en.webp","sha256": "9511381af1fae4351c83f925673be87cb32f5282a37739dabc96550f5801e1c0",- "renderHash": "acd3c66d263f87b82f607ebda0672d5623dbe2c8762a4ec8a4c5a621eccbd617"+ "renderHash": "0e1cb87f8a35ca7757131910c03d5f6b230fa3a3bcaf67d4ee724f6499455665"}},{@@ -333,12 +347,12 @@"zh": {"file": "swiss.zh.webp","sha256": "cdb608fbc018e4e9f7902003eaecff3ce2722e06ca20a22981922710a1085596",- "renderHash": "25415075f5adcb466b275fba3f2a24d021e488ee862c0c5ae79ccaad96b4d06d"+ "renderHash": "a8b61b013e6ff4ea537cc293dc84b659606a84dedf9960ccb55c2455e0100b36"},"en": {"file": "swiss.en.webp","sha256": "6aad979d9fa1a55ca55e095a0de3c3142690440401dd534ba6d16c7bcef1a7a8",- "renderHash": "8fda3e991b2c9c6869c2eb5c387a2a6dd899f474e76697fc1b0595718f02d6a0"+ "renderHash": "ee4767ee152b8647acdedeb22d8740521f8b3025c1662be28b55196e2f0a9a09"}},{@@ -347,12 +361,12 @@"zh": {"file": "collage.zh.webp","sha256": "65d01a66322186759e679d8e5051a37b5bbcdbd124c3b7b980ba80027d3576b8",- "renderHash": "c8c562c99219f71d706e6056123160bd4a19650c8b61fde4aa20a174b952be76"+ "renderHash": "4434b94840eea9f0b69ec07986dee2aac81a5c8c397d215caa4fb6e312b4612e"},"en": {"file": "collage.en.webp","sha256": "9374552931a4202cb94cb9ae69576e469ece63394617c8c97adf349b30d88b20",- "renderHash": "accbf991d08b57e0ba1156db55ba4e1dc7860e4fa6813d2072fbbdd615ce6b1e"+ "renderHash": "d471f4a2f6ba4b346096511e7e21c9e0f4248b455de84775f95edea6875663d6"}},{@@ -361,12 +375,12 @@"zh": {"file": "mega.zh.webp","sha256": "4cfee18e1fa4bbacfd78e8e939a9cd625bc707a5def23e0353b389efc073cf76",- "renderHash": "b183f1be6a801f039d21603f07bbf60d6d6d47103fe308dd15d365ad42031e9d"+ "renderHash": "c23c74f598055dff45c3080413cab81d3fee84a3338d08f202b84d64993265a8"},"en": {"file": "mega.en.webp","sha256": "390c11daf3d2b3afefd8cc83d99f99c3d1cbdd2e0c30714e115700c4c5054938",- "renderHash": "17c6fca81a80bf0e15c3bc88e0a78c4ca2e9fc544f0b47ca728d0d7cb2365c5b"+ "renderHash": "8b92ee2d2d92ce3963ee6c8125539963ff982252674f2abeaef56d5cd0cafa9a"}},{@@ -375,12 +389,12 @@"zh": {"file": "ticker.zh.webp","sha256": "f2924666a8539fde3a925e9a7c2e3eb4b43dbd973200edb624cbb48aafcc5f7c",- "renderHash": "a9a8d28a022aecc6f2b9eb526f2d7eb0e75c28960fcd7924fee4a89b9df03040"+ "renderHash": "21945a20c59fecd5fba8f67253bf2ec1efd6379efcae2d7b143f1df7b68bed3f"},"en": {"file": "ticker.en.webp","sha256": "e23d9f0d050349c8982e542f9c4c75adca0c32cdc745f0b59ca9a171113e8aee",- "renderHash": "38d667faef1d7f5c49c88f03e1cce572c3cb0fa9f764b22399b447de3260c5b4"+ "renderHash": "0f2ac23d704aa354341a599fce356ddbc7988e6ec428e167e8b835c7782e6853"}},{@@ -389,12 +403,12 @@"zh": {"file": "memo.zh.webp","sha256": "a3726568766d29270a4bfb240e1a7939910e9cbbbb30006e51dc052b8a535fd7",- "renderHash": "40b5798e94538c9221548f3ebd4bd0a4279676ac1257672bdae6bde3b210fe3a"+ "renderHash": "3809d40fed86c42f9df48d0c95e46cf1512f6e2e3bd276a292e2e179b5798824"},"en": {"file": "memo.en.webp","sha256": "c6f3b8febda7ad09dbea16bb9bfe422802a805228c630ef8209157d342a0a88b",- "renderHash": "3aa33af0f1a84ba7ca93ec985ace7c5c4f1254996c6e37d6a7d59b007f6c70a7"+ "renderHash": "c7bb4b2b29583a20baa2998853f822a53e1f73e57a64941ca5c710ae5372eae7"}},{@@ -403,12 +417,12 @@"zh": {"file": "mag.zh.webp","sha256": "0c4148d9ec399b8a5c397948d5ce13cc20ec3e0803971398ebf3b5437cb07709",- "renderHash": "c1e11daf77c245fa9af91b49287f46bb1637fa448dfb74a73b126c5c66c2e453"+ "renderHash": "4dc6f83c59fd7d6e9ec5c60c1154ea288b8d5137bb66bc6948b386fcfcc8abb8"},"en": {"file": "mag.en.webp","sha256": "39a4f459a14aef9c31fb99a00405b16258306d83c9d699b80b42784af5138138",- "renderHash": "f031b067ef08a1d998bc39e1f9a861c6a6d325188a5f81fb8701ce29dfe17faf"+ "renderHash": "3c2d13daf5e21002ec9fe2234a7970b9600cb91a8c8c4996c630373d30aac774"}},{@@ -417,12 +431,12 @@"zh": {"file": "print.zh.webp","sha256": "2674d517bb291f9ff3f8bde7a3843b3a7eeb567f10aecb830257a04f4e9cb5a4",- "renderHash": "2674bbd5fe72df2ef38d24db86107872f0e0a53cf8eb7cb075da8a3522514844"+ "renderHash": "fd6f159fdb6f8dd1e6788eb0f71f3ea14332452a0bfbdd9e2a10598d211d5d54"},"en": {"file": "print.en.webp","sha256": "703d5d57cdbe4cffe376c5e05f49c84e0029398ccd281415c143175d05a39678",- "renderHash": "8b123be993296299c473889c6811b6f401b5aec1753093f9601ca4cd2a0d295d"+ "renderHash": "0cfed78acb3361276ca2ff4e5c45f54e382e83f7868b689fe8114d42782732ae"}},{@@ -431,12 +445,12 @@"zh": {"file": "bento.zh.webp","sha256": "8aa0ef1cbc77766e25e18c070afa720d55848765a2830b6f450bf584fd646a86",- "renderHash": "c81ce877e3b10911cb976765566f994e93844b211c2c33e6205516c6531de299"+ "renderHash": "168ba1745038942c90f13f97df9c2c431486ea8aa2f94c8f00a3881ac16fd724"},"en": {"file": "bento.en.webp","sha256": "70fbe39e71fe44f9577165412d2f5b55bfefa2ad8ef3d2a04783e5763f3a45c8",- "renderHash": "a5589d370da34a006c0dafc50ceb471c3989d2c193b04fa783c7baa79be43486"+ "renderHash": "e645cf87b1bc70c6dcc861875b40cec466ec437fae9b4ce7ca25d64b8f9c8e6f"}},{@@ -445,12 +459,12 @@"zh": {"file": "calm.zh.webp","sha256": "879085cec407691ca92bc51b98499453ba710aa2d504059ffd33eea473d6eb8a",- "renderHash": "a51dcc10342489e08c182a14282efbd3cb02fb8f0ca6e7336056c7372a857344"+ "renderHash": "ddd2bc75f8d14c8af93c9166b3e3ccbba5664b411b3b81fec61a084886b21d87"},"en": {"file": "calm.en.webp","sha256": "33964170a0f01bc654ab972484b426e16dbd77a68715119e464b227e45652581",- "renderHash": "e102d4bf7edab2f3a0cbe02418d1459668addf00925a2055c2782ae432224121"+ "renderHash": "637f17e576780ed645023cd640d1a38b49fd1e8dd2c55ced5eb6bbb2ed7c720e"}},{@@ -459,12 +473,12 @@"zh": {"file": "seal.zh.webp","sha256": "c11e302e9de4e448ff4f55d0e0e5b4a8e4b87d2eb2fda64caa9c5db8ac2666fd",- "renderHash": "86df063acc8b94a5bbf07725e85c549273ec730005a34ccd177350da2c4a73c5"+ "renderHash": "9e002d5bea1e2116604e59ed02db828a0425a7a7b88346f3984926c6c4c2bb70"},"en": {"file": "seal.en.webp","sha256": "ff605edb68522a9fff9dd2ad2f9f51f8af28ff0e17cc8599955b10a5bcf3f2ff",- "renderHash": "19556a17e1ce716205cddc5bc91b75db5f79fd4e57c0a687f3eea3e68be14970"+ "renderHash": "a0c8a8f83b46782c1b181aca658277d5dc82b4a2cf4320a77df2a7ea685d9fb6"}},{@@ -473,12 +487,12 @@"zh": {"file": "compare.zh.webp","sha256": "630e5c80f96fcefeba4876b063a1c47db8f9091a38ee2adba4013eec7d00af44",- "renderHash": "3366b1af1b78e822fe632eb9f123e13ee6c0e6db0e771e9694ffd64460c14c71"+ "renderHash": "5fa7d4d4ef3ea29e7b56c978da2ef2df467e6e15fada33b734ee6bdfc9c04d97"},"en": {"file": "compare.en.webp","sha256": "66f12396df6e55d0ea8e9789203516c9d7caab6d93d2cbf6f80841baa0d02647",- "renderHash": "3248c1d6c1329e4e2e4479fd05500fe49a4294edc4020ed999d5eddba1adc94a"+ "renderHash": "e6cfd9768d43b4503a2f1190594c9b5c01a0f4f536c9faa058ea44d633bb2fad"}},{@@ -487,12 +501,12 @@"zh": {"file": "split.zh.webp","sha256": "ff2ce3496cceb84788bc07c48a3c8cc98e11ba407a5aca661a01b092eb3dc2e9",- "renderHash": "e686f31ab5cf2ba7422312a556e59fc62d28598251e3107250c1f0566daac183"+ "renderHash": "48eb6e0b6e958f7044a98e3823fa008902f147c236e70bc19133aec2a94e9f91"},"en": {"file": "split.en.webp","sha256": "57c690da365592096184b0d504ab7f553f1e427e61f8bd058a027826aba48cf3",- "renderHash": "7f07f3a7a3121e5d14e63279cd78b0cbdc6c816024c6b43b0f7ae1a7bc2baa28"+ "renderHash": "54b24f94d9854c3c3911e28bf509e33662ceeffc2b3d1afa240f183549ed3193"}},{@@ -501,12 +515,12 @@"zh": {"file": "impact.zh.webp","sha256": "69e10213d8398ca7e36ca5db5f02e5b9ab3d3d0a519c8b5d598cf62c213ef65c",- "renderHash": "4381175525e6f1712486b433e29a21939e3c5d04c392d24a3200e1fe5037f2e8"+ "renderHash": "5611fcf2570152de06d317f9e4abcf28b7b4f9f0a581bea7be3206842249106e"},"en": {"file": "impact.en.webp","sha256": "c624c21845b4345ede894c4abba0c7e2898719bfa3a27698e719119bb941b884",- "renderHash": "3cf4873d72b153f0ed2c87cdb2e6ccf799713fb3e71ef79e814f961cdde0de98"+ "renderHash": "6790e570f926aec016210d57f6b55b8455a1091688fd5c94d07ea588c689f31d"}},{@@ -515,12 +529,12 @@"zh": {"file": "neon.zh.webp","sha256": "3bde7cb3a3f47621431e2bc8840324bc5f79fbe4e9d6c6a59d97a9d9fff46a9b",- "renderHash": "00deea339f60c6752d17b07751c34c876e8af9ce3770e903903ddbe64bf5c5a8"+ "renderHash": "a0778ed7cc1fd8c01a95769bea9cbf10de1ce4c6b5a034a177afc2cbd75983b8"},"en": {"file": "neon.en.webp","sha256": "4cadca26bf18c5d6bb77baac5362df382be7beaadc8c944b585356038ebdd329",- "renderHash": "f1cf0df908359056a3e4faeab550d7413bf6cf7706578253056f3a792bf74ee3"+ "renderHash": "b6ee162645d2afe20ee7f126e138ad0619c459cfd94ad378972762dd764e2bc4"}},{@@ -529,12 +543,12 @@"zh": {"file": "quote.zh.webp","sha256": "a430e4f382a46d2769ca10aef3461f533a32a3d33824cfa71c62b6f1d30e4536",- "renderHash": "81fc883a568da5222539f92a7a18194cfd7e301115236c2e4f8e7c46b88c6899"+ "renderHash": "067eff03c9f3b5439a3212cdc10470e39e631af9a98f71f370ed90930b0f6b01"},"en": {"file": "quote.en.webp","sha256": "94a1197ceab40636add5e358bb64eeb3b384f42d54f555ff10103540f3578d6c",- "renderHash": "ea7369f132ded8fabf98778f11e87e3e37283fd72ab33739e8a08c1bade61ece"+ "renderHash": "37822875b2fea0dd55395f137c9089f47b20f938ef49e04156b75f8da20746cf"}},{@@ -543,12 +557,12 @@"zh": {"file": "cinema.zh.webp","sha256": "5bc3588b3bd5795d440dcfd9ca4b7a4f766084379990ef8e218f3f12e7dd22d6",- "renderHash": "29d8af27fc293bc9b9efc71eb12767700d996e62e2563c57b90d3d5394029f23"+ "renderHash": "3b6dc75127a95d6c7f6344372d2f1cb1de40552f39b21813b3029ebe978be4fe"},"en": {"file": "cinema.en.webp","sha256": "213483077ff505a89d333b197d9b595e88ca44dc9ebd380c04c9101a1bd607f3",- "renderHash": "19c7ee43079926fb1421ad121bed174680ff427da27c3e5aafd43f8794063a40"+ "renderHash": "c76ffeaf81c1a5708a3bba7b64dfc9c4e0ff4e753fe2722ef7bd40581812b6a6"}},{@@ -557,12 +571,12 @@"zh": {"file": "minimal.zh.webp","sha256": "433a43877deec1b8b85fa4e09d5dce1e80087afecaed5e4c48ddd4992e04e1d1",- "renderHash": "0924b9198934dcae49e0a598ce2e72eeef068c080aa5fdc2db0289762e36f845"+ "renderHash": "9b134b763901725e77cbca3a83b5d84f378ef3a5fcf778cf6953c4378d692e5d"},"en": {"file": "minimal.en.webp","sha256": "c1146a1d5a6c04f67a98e457b2ea03859af4d0d4b162b40d074354336cf09796",- "renderHash": "07195a4b8bf0898d5c693fc7bc75d260a440914b5b8bc19780df7fcb55291607"+ "renderHash": "83eb76940aaa4037919f2798fcec8ca31be6237f66a3ec99e9a9b4594a9f124c"}},{@@ -571,12 +585,12 @@"zh": {"file": "bold.zh.webp","sha256": "f419f907b1aca1c85755435df009aac866cdcc8ceb67415897c153e07b75896f",- "renderHash": "f6cbe4fc710d19f798839c35e7c05c03998dfc9318d6a0df92adc9533428f206"+ "renderHash": "26433c521f8f5bcdb113ac2f7a4a57a64c0355c97645e58c77a80790ec1e1dd0"},"en": {"file": "bold.en.webp","sha256": "9ba9cffdf756c4d6e94c8644f477357e3ec8e20ce255a2a4759a81922a14d44f",- "renderHash": "02305b9145a0ee0453a23b130ec48e64a53c56c062a566112e1dba83f7706201"+ "renderHash": "736d190403206d759af3abdc60404cd4ff7e760b7750afbd97ac326bf8b705cd"}},{@@ -585,12 +599,12 @@"zh": {"file": "poster.zh.webp","sha256": "6582770fbc1b566e3a2a095560c8093da8e95b0fafbaced8ac557a0db8fa9f02",- "renderHash": "e863715d610169e926bb53f2f7ae048ce2b7d06e0279c14a1441f9ac03c31fcf"+ "renderHash": "5daa78b385117b23745403f2499d3a751920dd16fea1c078c7c5ea45ff3e1c57"},"en": {"file": "poster.en.webp","sha256": "e94fc2fc048726f76980b295f7389d41bee0f0184d6dff859068bef5821f1eb2",- "renderHash": "30b6c66207e7bdcacde2a857ddbcd88c890fff556d9fa64f4ea779f8b9ad9ad9"+ "renderHash": "457e20154af08000a0f4a235635144a0db9af7268bd5ffbf85f84d0cf306e3d5"}},{@@ -599,12 +613,12 @@"zh": {"file": "number.zh.webp","sha256": "ae2f508e780334ec10e4afdb75a87940f8614225546cf9de4df52a60dc1f62ee",- "renderHash": "fcaf0b424a603764ae2d214d41786bd6a66ac0a62698a70bb418129878e41fd3"+ "renderHash": "ebfe4d92bdb0c701ef53176e908ea492bdb0dde50914209e32d2c4de15001f67"},"en": {"file": "number.en.webp","sha256": "8985392e12b99082c7679e65527ef76f2400f1d2ec359839d7245d8a0c7e5e33",- "renderHash": "b3c3d6ef66380414dce0705a89f8dfe610d7575f44fd48ea7ca304ddd9897e10"+ "renderHash": "7fb77c2c70aac7f86bb762e629278c8d3f908665d5f883c38cb7388bd0fa0fa5"}},{@@ -613,12 +627,12 @@"zh": {"file": "neo.zh.webp","sha256": "5c8f4902c7ee615aeefee91041dca3df66926c7245753ce8d61f183590dd8df1",- "renderHash": "f8ee2b02bb26b9e4ba131bd15c7cbbb440364dbddc6d40f05e54e4a828511f6d"+ "renderHash": "b892d4001f2e5d3108166d404e698227e9ed68a4c859c35d6678988cd1fb91fd"},"en": {"file": "neo.en.webp","sha256": "3d84c9fb1fbebc44d72b15b1251b9361c254027722e430bc0e4c2bd935698d39",- "renderHash": "264780fe4316c51b232513356e4119ddbeb9ceca62580c7fa6d1aa8bcc905d25"+ "renderHash": "33c83dd30b387bf2cb5c83045fb0bc7fb803b8d6e65f0333a9b850f91e3f0c4e"}},{@@ -627,12 +641,12 @@"zh": {"file": "acid.zh.webp","sha256": "2293f87d3c7408120446ee5558a56a0c5f6a679d68fc5c8b26620fcba05b304f",- "renderHash": "cc0bbd7376a18a08db0719aacd5a28e180d23061e16cf648f104257c1d005d68"+ "renderHash": "bb316cf78811b056989d15f38ff88ad09a3c85242821b27a2a5cbf41a28bd29e"},"en": {"file": "acid.en.webp","sha256": "5ff599752562296bd1d2ba85c1feb0795fefb7d9a69d7e6d93ebcf10b3e664bf",- "renderHash": "31be66710209486dd6bd21b62ab99c04f0fdd32566912ecdce6e4598bc732e96"+ "renderHash": "ba3649e5886fb43989836494d1c568d7625a27df07ea417372cf117bd900c41d"}},{@@ -641,12 +655,12 @@"zh": {"file": "glass.zh.webp","sha256": "015b0e194824edd73f7ba21adecb5ca9cfbcbeb0dd5fc1cde0c91e78113a5870",- "renderHash": "87be1405a041e293c4b1c955464bb7e9fd3d9c94d9844cb7d48add097f79e84b"+ "renderHash": "2a5be867c746d519dd52a0352701bbcfa26f6f099055f3dff4d525f573d40313"},"en": {"file": "glass.en.webp","sha256": "47214b2ef818530d75bf6a44b9732773edb9e3cee9db9a30068da105489c0eb3",- "renderHash": "f04aa0e7ff13cf07074b9231b3778f1ad89ff39891eaaa30058748007c197e1f"+ "renderHash": "337790e3fce15c69d6f2e8f3b3d69fdb68bcf14ac9ddbc30700b07cfd9c3fb04"}}]diff --git a/apps/web/src/assets/poster-template-previews/paper-list.en.webp b/apps/web/src/assets/poster-template-previews/paper-list.en.webpnew file mode 100644index 00000000..213ca94eBinary files /dev/null and b/apps/web/src/assets/poster-template-previews/paper-list.en.webp differdiff --git a/apps/web/src/assets/poster-template-previews/paper-list.zh.webp b/apps/web/src/assets/poster-template-previews/paper-list.zh.webpnew file mode 100644index 00000000..652efbbfBinary files /dev/null and b/apps/web/src/assets/poster-template-previews/paper-list.zh.webp differdiff --git a/apps/web/src/components/PosterEditorPane.tsx b/apps/web/src/components/PosterEditorPane.tsxindex e54d14df..738fcdaf 100644--- a/apps/web/src/components/PosterEditorPane.tsx+++ b/apps/web/src/components/PosterEditorPane.tsx@@ -1218,7 +1218,7 @@ export default function PosterEditorPane({const value = current.current.document;setTemplateFontsLoading(true);try {- const built = await applyPosterDesign(value, id, zh, width, height);+ const built = await applyPosterDesign(value, id, zh, width, height, { title: t("poster.defaultHeading"), subtitle: t("poster.defaultSubtitle") });return { ...built, platformId };} finally { setTemplateFontsLoading(false); }};diff --git a/apps/web/src/lib/poster-canvas.ts b/apps/web/src/lib/poster-canvas.tsindex 17680584..9404550d 100644--- a/apps/web/src/lib/poster-canvas.ts+++ b/apps/web/src/lib/poster-canvas.ts@@ -20,6 +20,8 @@ import {} from "@edgeever/shared";import { BadgeBox } from "./poster-design/vendor/qiaomu/badge";import { loadPosterFont } from "./poster-design/fonts";+import { grain } from "./poster-design/vendor/qiaomu/kit";+import { paperListParagraphStyles } from "./poster-design/paper-list-content";export function makePosterGradient(value: PosterPaintGradient,@@ -136,6 +138,7 @@ export const posterObject = async (textAlign: element.textAlign,fill,splitByGrapheme: true,+ styles: paperListParagraphStyles(element),};if (element.badge) {const badge = new BadgeBox(element.text, {@@ -150,7 +153,10 @@ export const posterObject = async (}return new Textbox(element.text, textOptions);}- if (element.type === "rect")+ if (element.type === "rect") {+ // Reuse the existing deterministic grain tile. The saved layer remains a+ // normal rect so older readers can still open the document.+ const paperGrain = element.name === "paper-list:paper:grain" ? grain(element.width, element.height)?.fill : undefined;return new Rect({...options,width: element.width,@@ -158,7 +164,9 @@ export const posterObject = async (fill,rx: element.radius ?? 0,ry: element.radius ?? 0,+ ...(paperGrain ? { fill: paperGrain, globalCompositeOperation: "multiply" as const } : {}),});+ }if (element.type === "ellipse")return new Ellipse({...options,diff --git a/apps/web/src/lib/poster-design/paper-list-artwork.test.mjs b/apps/web/src/lib/poster-design/paper-list-artwork.test.mjsnew file mode 100644index 00000000..5dcf74f4--- /dev/null+++ b/apps/web/src/lib/poster-design/paper-list-artwork.test.mjs@@ -0,0 +1,48 @@+import { expect, test } from 'bun:test';+import { PosterElementSchema } from '@edgeever/shared';+import { paperListPaper } from './paper-list-artwork';+import { posterPrimitiveFromObject } from './templates';++const primitives = (width, height) => paperListPaper(width, height, '#171714').map(posterPrimitiveFromObject);++test('paper texture stays deterministic and serializable at the largest supported size', () => {+ const first = primitives(4096, 4096);+ expect(first).toEqual(primitives(4096, 4096));+ expect(first).toHaveLength(6);+ for (const element of first) {+ expect(PosterElementSchema.parse(JSON.parse(JSON.stringify(element)))).toEqual(element);+ expect(element.x).toBe(0);+ expect(element.y).toBe(0);+ expect(element.width).toBe(4096);+ expect(element.height).toBe(4096);+ }+ const fibres = first.filter(element => element.name.endsWith('-fibres'));+ expect(fibres).toHaveLength(2);+ for (const element of fibres) {+ expect(element.type).toBe('path');+ expect(element.path.length).toBeLessThan(100_000);+ expect(element.opacity).toBeLessThan(0.2);+ }+});++test('soft paper lighting retains transparency through conversion', () => {+ const light = primitives(1080, 1440)[0];+ expect(light.gradient.kind).toBe('radial');+ expect(light.gradient.stops.at(-1).color).toBe('rgba(255,255,255,0)');+});+++test('a soft crease and radial wear avoid repeated decorative fold bands', () => {+ const creases = primitives(1080, 1440).filter(element => element.name === 'paper-list:paper:crease');+ expect(creases).toHaveLength(2);+ expect(creases.map(element => element.gradient.kind)).toEqual(["linear", "radial"]);+ for (const crease of creases) {+ expect(crease.type).toBe('rect');+ expect(['linear', 'radial']).toContain(crease.gradient.kind);+ expect(crease.gradient.stops.at(-1).color).toMatch(/,0\)$/);+ if (crease.gradient.kind === "linear") {+ expect(crease.gradient.stops[0].color).toMatch(/,0\)$/);+ expect(crease.gradient.stops.length).toBeGreaterThan(4);+ }+ }+});diff --git a/apps/web/src/lib/poster-design/paper-list-artwork.ts b/apps/web/src/lib/poster-design/paper-list-artwork.tsnew file mode 100644index 00000000..f02ec2c1--- /dev/null+++ b/apps/web/src/lib/poster-design/paper-list-artwork.ts@@ -0,0 +1,62 @@+import { Color, Gradient, Path, Rect, type FabricObject } from "fabric";++// Vector fibres survive the existing poster JSON and PNG/JPEG renderers. Keep+// them in a few compound paths rather than thousands of selectable layers.+export function paperListPaper(width: number, height: number, ink: string): FabricObject[] {+ let seed = 731;+ const random = () => {+ seed = (Math.imul(seed, 1664525) + 1013904223) >>> 0;+ return seed / 0x100000000;+ };+ const unit = Math.min(width, height) / 1080;+ const anchor = `M 0 0 L ${width} 0 M ${width} ${height} L 0 ${height}`;+ const layers: FabricObject[] = [];+ for (const light of [false, true]) {+ let path = anchor;+ for (let index = 0; index < 1000; index++) {+ const x = (random() * (width - 4 * unit)).toFixed(2);+ const y = (random() * (height - 2 * unit)).toFixed(2);+ const length = ((0.7 + random() * 2.5) * unit).toFixed(2);+ const thickness = ((0.4 + random() * 0.8) * unit).toFixed(2);+ path += ` M ${x} ${y} h ${length} v ${thickness} h -${length} Z`;+ }+ const fibres = new Path(path, { left: 0, top: 0, originX: 'left', originY: 'top', fill: light ? '#ffffff' : ink, opacity: light ? 0.18 : 0.065, strokeWidth: 0 });+ Object.assign(fibres, { qcName: `paper-list:paper:${light ? 'light' : 'dark'}-fibres` });+ layers.push(fibres);+ }+ const light = new Rect({ left: 0, top: 0, originX: 'left', originY: 'top', width, height, strokeWidth: 0, fill: new Gradient({+ type: 'radial', coords: { x1: width * 0.3, y1: height * 0.2, r1: 0, x2: width * 0.3, y2: height * 0.2, r2: Math.max(width, height) * 0.8 },+ colorStops: [{ offset: 0, color: 'rgba(255,255,255,0.27)' }, { offset: 1, color: 'rgba(255,255,255,0)' }],+ }) });+ Object.assign(light, { qcName: 'paper-list:paper:soft-light' });+ layers.unshift(light);+ // One faint diagonal crease and uneven page wear avoid the hard edges+ // and repeated cross patterns of decorative fold bands.+ const [red, green, blue] = new Color(ink).getSource();+ const shade = (alpha: number) => `rgba(${red},${green},${blue},${alpha})`;+ for (const [x1, y1, x2, y2, peak] of [[0.18, 0.72, 0.5, 0.08, 0.022], [0.72, 0.88, 0.18, 0.32, 0.014]]) {+ const crease = new Rect({+ left: 0, top: 0, width, height, originX: 'left', originY: 'top', strokeWidth: 0,+ fill: new Gradient({ type: 'linear', coords: { x1: width * x1, y1: height * y1, x2: width * x2, y2: height * y2 }, colorStops: [+ { offset: 0, color: shade(0) },+ { offset: 0.33, color: shade(0) },+ { offset: 0.46, color: shade(peak) },+ { offset: 0.5, color: shade(peak * 0.6) },+ { offset: 0.53, color: 'rgba(255,255,255,0.09)' },+ { offset: 0.61, color: 'rgba(255,255,255,0.02)' },+ { offset: 0.78, color: shade(0) },+ { offset: 1, color: shade(0) },+ ] }),+ });+ if (x1 > 0.5) crease.set({ fill: new Gradient({+ type: 'radial', coords: { x1: width * 0.04, y1: height * 0.84, r1: 0, x2: width * 0.04, y2: height * 0.84, r2: Math.max(width, height) * 0.7 },+ colorStops: [{ offset: 0, color: shade(0.032) }, { offset: 0.5, color: shade(0.014) }, { offset: 1, color: shade(0) }],+ }) });+ Object.assign(crease, { qcName: 'paper-list:paper:crease' });+ layers.push(crease);+ }+ const grain = new Rect({ left: 0, top: 0, width, height, originX: 'left', originY: 'top', fill: '#ffffff', opacity: 0.045, strokeWidth: 0 });+ Object.assign(grain, { qcName: 'paper-list:paper:grain' });+ layers.push(grain);+ return layers;+}diff --git a/apps/web/src/lib/poster-design/paper-list-content.test.mjs b/apps/web/src/lib/poster-design/paper-list-content.test.mjsnew file mode 100644index 00000000..a2b51606--- /dev/null+++ b/apps/web/src/lib/poster-design/paper-list-content.test.mjs@@ -0,0 +1,90 @@+import { expect, test } from 'bun:test';+import { createPosterDocument } from '@edgeever/shared';+import { paperListCurrentCopy, paperListSampleCopy, paperListSelectionCopy, parsePaperListRow } from './paper-list-content';++const starter = { title: '写下你的标题', subtitle: '把想法变成值得分享的作品', badge: '' };+const source = () => ({ ...createPosterDocument(starter.title, starter.subtitle), copy: starter });++test('selecting the list template on a fresh poster seeds two complete entries', () => {+ const copy = paperListSelectionCopy(source(), starter, true, starter);+ expect(copy).toEqual(paperListSampleCopy(true));+ expect(copy.subtitle.split('\n\n')).toHaveLength(2);+ expect(copy.subtitle.split('\n\n').every(entry => entry.split('\n').length === 4)).toBe(true);+});++test('custom text and imported notes never receive sample content', () => {+ for (const copy of [{ ...starter, title: '我的标题' }, { ...starter, subtitle: '我的正文' }, { ...starter, badge: '我的标签' }]) {+ expect(paperListSelectionCopy(source(), copy, true, starter)).toEqual(copy);+ }+ expect(paperListSelectionCopy({ ...source(), sourceMemoId: 'memo' }, starter, true, starter)).toEqual(starter);+ expect(paperListSelectionCopy(source(), starter, true)).toEqual(starter);+});++test('template reapplication reads edited row text instead of stale copy', () => {+ const document = source();+ document.templateId = 'paper-list';+ const text = document.elements.find(element => element.type === 'text');+ document.elements = [+ { ...text, id: 'design_2', name: 'paper-list:row:0:heading', text: '我的小标题', sourceText: '我的小标题' },+ { ...text, id: 'design_3', name: 'paper-list:row:0:body', text: '编辑后的正文', sourceText: '编辑后的正文' },+ { ...text, id: 'design_4', name: 'paper-list:row:1:heading', text: '第二项', sourceText: undefined },+ ];+ expect(paperListCurrentCopy(document, starter).subtitle).toBe('我的小标题\n编辑后的正文\n\n第二项');+ expect(paperListCurrentCopy({ ...document, templateId: 'folio' }, starter)).toEqual(starter);+});+++test('row subtitles are explicit and ordinary body lines keep their meaning', () => {+ expect(parsePaperListRow('《书名》\n副标题:22 条序列与扮演法\n核心设定:正文')).toEqual({ heading: '《书名》', subtitle: '22 条序列与扮演法', body: '核心设定:正文' });+ expect(parsePaperListRow('Book\nSubtitle: A second level\nBody')).toEqual({ heading: 'Book', subtitle: 'A second level', body: 'Body' });+ expect(parsePaperListRow('Old heading\nFirst paragraph\nSecond paragraph')).toEqual({ heading: 'Old heading', subtitle: undefined, body: 'First paragraph\nSecond paragraph' });+});++test('edited row subtitles survive save and reapply alongside the body', () => {+ const document = source();+ document.templateId = 'paper-list';+ const text = document.elements.find(element => element.type === 'text');+ document.elements = [+ { ...text, id: 'design_1', name: 'paper-list:row:0:heading', text: '《书名》', sourceText: undefined },+ { ...text, id: 'design_2', name: 'paper-list:row:0:subtitle', text: '修改后的副标题', sourceText: '修改后的副标题' },+ { ...text, id: 'design_3', name: 'paper-list:row:0:body', text: '正文', sourceText: undefined },+ ];+ const copy = paperListCurrentCopy(document, paperListSampleCopy(true));+ expect(parsePaperListRow(copy.subtitle)).toEqual({ heading: '《书名》', subtitle: '修改后的副标题', body: '正文' });+});+++test('the previous unedited example gains subtitles without upgrading custom paragraphs', () => {+ const sample = paperListSampleCopy(true);+ const previous = { ...sample, subtitle: sample.subtitle.replace(/\n副标题:[^\n]*\n/g, '\n') };+ const document = { ...source(), templateId: 'paper-list' };+ expect(paperListSelectionCopy(document, previous, true)).toEqual(sample);+ const edited = { ...previous, subtitle: previous.subtitle + '我的补充' };+ expect(paperListSelectionCopy(document, edited, true)).toEqual(edited);+});+++test('independent paragraphs reconstruct in order and retain edits across template changes', () => {+ const document = { ...source(), templateId: 'paper-list' };+ const text = document.elements.find(element => element.type === 'text');+ document.elements = [+ { ...text, id: 'p2', name: 'paper-list:row:0:paragraph:2', text: '第三段', sourceText: undefined },+ { ...text, id: 'head', name: 'paper-list:row:0:heading', text: '《书名》', sourceText: undefined },+ { ...text, id: 'p1', name: 'paper-list:row:0:paragraph:1', text: '修改后的第二段', sourceText: '修改后的第二段' },+ { ...text, id: 'body', name: 'paper-list:row:0:body', text: '第一段', sourceText: undefined },+ ];+ expect(paperListCurrentCopy(document, starter).subtitle).toBe('《书名》\n第一段\n修改后的第二段\n第三段');+ document.elements = document.elements.filter(element => element.id !== 'body');+ expect(paperListCurrentCopy(document, starter).subtitle).toBe('《书名》\n修改后的第二段\n第三段');+});++test('paragraph lead-ins follow current wording and leave other templates alone', async () => {+ const { paperListParagraphStyles } = await import('./paper-list-content');+ const paragraph = { type: 'text', name: 'paper-list:row:0:body', text: '核心设定:正文' };+ const styles = paperListParagraphStyles(paragraph);+ expect(Object.keys(styles[0])).toHaveLength(5);+ expect(styles[0][4].fontWeight).toBe('bold');+ expect(paperListParagraphStyles({ ...paragraph, text: '新的正文,没有段首标签' })).toBeUndefined();+ expect(paperListParagraphStyles({ ...paragraph, name: 'ordinary-body' })).toBeUndefined();+ expect(paperListParagraphStyles({ ...paragraph, name: 'paper-list:row:0:paragraph:1', text: '颠覆点:新内容' })[0][3].fontWeight).toBe('bold');+});diff --git a/apps/web/src/lib/poster-design/paper-list-content.ts b/apps/web/src/lib/poster-design/paper-list-content.tsnew file mode 100644index 00000000..dc11b6f3--- /dev/null+++ b/apps/web/src/lib/poster-design/paper-list-content.ts@@ -0,0 +1,60 @@+import type { PosterDocument } from "@edgeever/shared";++// Shared by the actual template selection and gallery thumbnails.+export const paperListSampleCopy = (zh: boolean) => ({+ title: zh ? "值得反复读的好书" : "BOOKS TO COME BACK TO",+ subtitle: zh+ ? "《看见日常》\n副标题:观察与记录\n核心观点:把目光放回生活,在细微之处发现值得记录的瞬间。慢下来观察,平凡的一天也能成为灵感的起点。一束光、一段对话、一个新的念头,都值得被认真看见。\n阅读收获:好的记录从观察开始。试着为每天留下一小段文字,写下当时的感受,而不只是发生了什么。重新读起时,那些细节会带你回到生活本来的温度。\n\n《思考的力量》\n副标题:提问与理解\n核心观点:从一个好问题开始,建立自己的理解与判断。把复杂的事情拆开,找到真正值得追问的部分。遇到不同意见时,先理解对方的理由,再回头检查自己的假设。\n阅读收获:答案之外,更重要的是思考的过程。保留疑问,比较不同观点,在反复阅读中形成自己的认识。把读到的想法与生活里的具体问题联系起来,让理解慢慢变得清晰。"+ : "The everyday\nSubtitle: Observe and remember\nThe idea: Notice the small moments. Slow down and look closely; an ordinary day can become the beginning of something meaningful. A conversation, a patch of light, or a new thought is worth keeping.\nTakeaway: A good record begins with attention. Write a little each day about how a moment felt, as well as what happened. When you return to those pages, the details bring everyday life into focus.\n\nThe art of thinking\nSubtitle: Question and understand\nThe idea: Start with a better question. Break a complex subject into smaller parts and find what is worth exploring. Before judging a different view, understand its reasons and examine your own assumptions.\nTakeaway: Look beyond the answer. Compare perspectives, keep your questions, and build a view of your own. Connect what you read with a concrete problem in your life and let understanding grow over time.",+ badge: "",+});++export function parsePaperListRow(row: string) {+ const [heading = "", ...lines] = row.split("\n");+ const match = /^(?:副标题[::]|Subtitle:)\s*(.*)$/i.exec(lines[0] ?? "");+ return { heading, subtitle: match?.[1], body: (match ? lines.slice(1) : lines).join("\n") };+}++type Copy = { title: string; subtitle: string; badge: string };++export function paperListSelectionCopy(document: PosterDocument, copy: Copy, zh: boolean, starterCopy?: Pick<Copy, "title" | "subtitle">): Copy {+ const sample = paperListSampleCopy(zh);+ const previousSample = sample.subtitle.replace(/\n(?:副标题[::]|Subtitle:)\s*[^\n]*\n/g, "\n");+ // Upgrade the previous bundled example only when every word is untouched.+ if (!document.sourceMemoId && document.templateId === "paper-list" && copy.title === sample.title && copy.subtitle === previousSample && !copy.badge) return sample;+ // Only replace the editor's exact starter text. Imported notes and user copy+ // must never acquire sample paragraphs when changing styles.+ if (starterCopy && !document.sourceMemoId && !document.elements.some(element => /^(?:section|card)-\d+-/.test(element.id)) &&+ copy.title === starterCopy.title && copy.subtitle === starterCopy.subtitle && !copy.badge) return paperListSampleCopy(zh);+ return copy;+}++// Row text is independently editable. Reconstruct from the current layers so+// resizing or reapplying cannot restore an older copy over the user's edits.+export function paperListCurrentCopy(document: PosterDocument, copy: Copy): Copy {+ if (document.templateId !== "paper-list") return copy;+ const rows = new Map<number, { heading?: string; subtitle?: string; body?: string; paragraphs?: Map<number, string> }>();+ for (const element of document.elements) {+ if (element.type !== "text") continue;+ const match = /^paper-list:row:(\d+):(heading|subtitle|body|paragraph:(\d+))$/.exec(element.name ?? "");+ if (!match) continue;+ const row = rows.get(Number(match[1])) ?? {};+ if (match[3]) {+ row.paragraphs ??= new Map();+ row.paragraphs.set(Number(match[3]), element.sourceText ?? element.text);+ } else row[match[2] as "heading" | "subtitle" | "body"] = element.sourceText ?? element.text;+ rows.set(Number(match[1]), row);+ }+ if (!rows.size) return copy;+ return { ...copy, subtitle: [...rows].sort(([a], [b]) => a - b).map(([, row]) => [row.heading, row.subtitle === undefined ? undefined : `${/副标题[::]/.test(copy.subtitle) ? "副标题:" : "Subtitle: "}${row.subtitle}`, row.body, ...[...(row.paragraphs ?? [])].sort(([a], [b]) => a - b).map(([, text]) => text)].filter(value => value !== undefined).join("\n")).join("\n\n") };+}+++// Derive the paragraph lead-in from its current text rather than storing a+// duplicate label or adding rich-text data to saved poster documents.+export function paperListParagraphStyles(element: { type: string; name?: string; text?: string }) {+ if (element.type !== "text" || !/^paper-list:row:\d+:(?:body|paragraph:\d+)$/.test(element.name ?? "")) return undefined;+ const prefix = /^[^\n::]{1,16}[::]/u.exec(element.text ?? "")?.[0];+ if (!prefix) return undefined;+ return { 0: Object.fromEntries(Array.from(prefix).map((_, index) => [index, { fontWeight: "bold" as const }])) };+}diff --git a/apps/web/src/lib/poster-design/templates.ts b/apps/web/src/lib/poster-design/templates.tsindex 38e0755b..4a470855 100644--- a/apps/web/src/lib/poster-design/templates.ts+++ b/apps/web/src/lib/poster-design/templates.ts@@ -25,6 +25,7 @@ import { resolvePair, usePairing } from "./vendor/qiaomu/typeset";import { POSTER_FONTS, loadDesignFonts } from "./fonts";import { matchesImageSlot, type ImageSlot } from "../poster-image-replacement";import { composePosterTemplate, posterTemplateHeaderHeight } from "../poster-template-content";+import { paperListCurrentCopy, paperListSelectionCopy } from "./paper-list-content";export { PLATFORMS, platformFor } from "./vendor/qiaomu/platforms";export const DESIGN_TEMPLATES = TEMPLATES;export { templatesFor };@@ -86,7 +87,7 @@ export function posterPrimitiveFromObject(const pos = object.getPointByOrigin("left", "top");const options = {id: `design_${index}`,- name: role,+ name: (object as FabricObject & { qcName?: string }).qcName ?? role,role,x: pos.x,y: pos.y,@@ -175,7 +176,7 @@ export function posterPrimitiveFromObject(return { ...options, type: "path", path, fill: paint(object) };}export function posterCopy(document: PosterDocument) {- if (document.copy) return document.copy;+ if (document.copy) return paperListCurrentCopy(document, document.copy);const text = document.elements.filter((element) => element.type === "text");const title =text.find(@@ -211,7 +212,7 @@ export async function buildPosterDesign(input: {): {title:- template.id === "newspaper" || template.id === "folio"+ template.id === "newspaper" || template.id === "folio" || template.id === "paper-list"? "DM Serif Display": "Inter",body: "Inter",@@ -279,11 +280,12 @@ export async function buildPosterDesign(input: {}}-export async function applyPosterDesign(document: PosterDocument, templateId: string, zh: boolean, width = document.width, height = document.height) {+export async function applyPosterDesign(document: PosterDocument, templateId: string, zh: boolean, width = document.width, height = document.height, starterCopy?: { title: string; subtitle: string }) {if (!TEMPLATES.some(template => template.id === templateId)) throw new Error("Unknown poster template");if (document.elements.some(element => element.locked)) throw new Error("Locked poster elements");const headerHeight = posterTemplateHeaderHeight(document, height);- const cover = await buildPosterDesign({ id: templateId, ...posterCopy(document), width, height: Math.max(320, headerHeight), zh });+ const copy = templateId === "paper-list" ? paperListSelectionCopy(document, posterCopy(document), zh, starterCopy) : posterCopy(document);+ const cover = await buildPosterDesign({ id: templateId, ...copy, width, height: Math.max(320, headerHeight), zh });return composePosterTemplate(document, cover, width, height, headerHeight);}diff --git a/apps/web/src/lib/poster-design/vendor/qiaomu/templates.ts b/apps/web/src/lib/poster-design/vendor/qiaomu/templates.tsindex 254d8e1e..21f9e5bf 100644--- a/apps/web/src/lib/poster-design/vendor/qiaomu/templates.ts+++ b/apps/web/src/lib/poster-design/vendor/qiaomu/templates.ts@@ -6,6 +6,8 @@ import { Circle, FabricObject, getEnv, Gradient, Line, Polygon, Rect, Shadow, Teimport { Background } from './model';import { GAODING } from './gaoding';import { toContrast } from './quality';+import { paperListPaper } from '../../paper-list-artwork';+import { parsePaperListRow } from '../../paper-list-content';/** Colours a template reads. An assistant (or the user) can override any of them without touching layout. */export interface Palette { bg: string; bg2: string; ink: string; sub: string; accent: string; accentInk: string }@@ -175,6 +177,105 @@ const shadowSoft = (u: number): Shadow => new Shadow({ color: 'rgba(0,0,0,0.25)'const shadowHard = (u: number, c = '#000000', d = 8): Shadow => new Shadow({ color: c, blur: 0, offsetX: d * u, offsetY: d * u });export const TEMPLATES: Template[] = [+ {+ ...posterDesignTemplate("paper-list"),+ build(i) {+ const p = palette(i, { bg: '#f4f3ee', bg2: '#f4f3ee', ink: '#080907', sub: '#272923', accent: '#080907', accentInk: '#f4f3ee' });+ const { u, w, h } = metrics(i);+ const bookText = (...args: Parameters<typeof textbox>) => {+ const box = textbox(...args);+ if (!hasCjk(box.text)) {+ const lines = wrapLines(args[0], box.width * 0.98, box.fontSize, String(box.fontWeight), box.charSpacing, box.fontFamily);+ if (lines.length > 1 && /^\S{1,3}$/.test(lines.at(-1)!)) {+ const previous = lines.at(-2)!.split(' ');+ const last = `${previous.at(-1)} ${lines.at(-1)}`;+ if (previous.length > 1 && measure(last, box.fontSize, String(box.fontWeight), box.fontFamily) < box.width * 0.98) {+ previous.pop();+ lines[lines.length - 2] = previous.join(' ');+ lines[lines.length - 1] = last;+ }+ }+ Object.assign(box, { qcWrapped: true, qcSource: args[0] });+ box.set({ text: lines.join('\n') });+ box.initDimensions();+ }+ return box;+ };+ const margin = Math.min(w, h) * 0.065;+ const inner = w * 0.855;+ const headingFace = typeFor('title', SERIF, 'bold');+ const rows = (i.points?.length ? i.points : i.subtitle.split(/\n\s*\n/)).map(value => value.trim()).filter(Boolean);+ const label = i.badge?.trim() ? bookText(i.badge, margin, margin * 0.6, inner, { qcRole: 'badge', fontSize: 17 * u, fill: p.sub }) : undefined;+ const titleTop = label ? label.top + label.height + 16 * u : margin * 0.92;+ const titleWeight = headingFace.fontWeight ?? 'bold';+ const oneLineSize = inner * 0.99 / Math.max(1, measure(i.title, 1, titleWeight));+ const titleSize = !i.title.includes('\n') && oneLineSize >= 64 * u+ ? Math.min(116 * u, oneLineSize)+ : Math.min(116 * u, fitTitle(i.title, inner, h * 0.23, 116 * u, 22 * u, 1.06));+ const title = bookText(i.title, w * 0.057, titleTop, inner, { qcRole: 'title', fontSize: titleSize, fill: p.ink, fontFamily: SERIF, fontWeight: 'bold', lineHeight: 1.06 });+ const start = title.top + title.height + 14 * u;+ const objects: FabricObject[] = [title, rule(w * 0.078, start, w * 0.824, p.ink, Math.max(1, 2.7 * u))];+ if (label) objects.push(label);+ // Actual Fabric heights keep headings and paragraphs together at every aspect ratio.+ // All supplied entries survive; fit the entire list instead of truncating it.+ const numberWidth = Math.min(w * 0.15, 156 * u);+ const headingX = w * 0.195;+ const subheadingX = w * 0.225;+ const columnX = w * 0.185;+ const columnWidth = w * 0.71;+ const ruleX = w * 0.202;+ const renderRows = (scale: number) => {+ const result: FabricObject[] = [];+ let y = start + 22 * u;+ rows.forEach((row, index) => {+ const { heading, subtitle, body: bodyText } = parsePaperListRow(row);+ const head = bookText(heading!, headingX, y + 39 * u * scale, w * 0.66, { fontSize: 66 * u * scale, fill: p.ink, fontFamily: SERIF, fontWeight: 'bold', lineHeight: 1.12, ...headingFace });+ Object.assign(head, { qcName: `paper-list:row:${index}:heading` });+ const numberText = `${index + 1}.`;+ const numeralSize = 167 * u * scale;+ const number = bookText(numberText, margin, y + 5 * u * scale, numberWidth, { fontSize: numeralSize * Math.min(1, numberWidth * 0.98 / measure(numberText, numeralSize, 'normal', '思源宋体')), fill: p.ink, fontFamily: '思源宋体', lineHeight: 1 });+ const plusSize = 36 * u * scale;+ const plusX = w * 0.865 - plusSize / 2;+ result.push(number, head,+ rule(plusX, y + 110 * u * scale, plusSize, p.ink, Math.max(1, 1.5 * u)),+ rule(plusX + plusSize / 2, y + 110 * u * scale - plusSize / 2, plusSize, p.ink, Math.max(1, 1.5 * u), true));+ let bottom = Math.max(head.top + head.height, number.top + number.height);+ if (subtitle) {+ const subhead = bookText(subtitle, subheadingX, head.top + head.height + 7 * u * scale, w * 0.63, { fontSize: 45 * u * scale, fill: p.ink, fontFamily: SERIF, fontWeight: 'bold', lineHeight: 1.1, ...headingFace });+ Object.assign(subhead, { qcName: `paper-list:row:${index}:subtitle` });+ result.push(subhead);+ bottom = Math.max(bottom, subhead.top + subhead.height);+ }+ const ruleY = bottom + 10 * u * scale;+ result.push(rule(ruleX, ruleY, w * 0.7, p.ink, Math.max(1, 2.4 * u)));+ if (bodyText) {+ let paragraphY = ruleY + (index === 0 ? 56 : 32) * u * scale;+ bodyText.split('\n').forEach((paragraph, paragraphIndex) => {+ const body = bookText(paragraph, columnX, paragraphY, columnWidth, { fontSize: 31 * u * scale, fill: p.sub, lineHeight: 1.45, fontFamily: i.zh ? '思源黑体' : 'Inter' });+ Object.assign(body, { qcName: paragraphIndex === 0 ? `paper-list:row:${index}:body` : `paper-list:row:${index}:paragraph:${paragraphIndex}` });+ result.push(body);+ bottom = body.top + body.height;+ paragraphY = bottom + 26 * u * scale;+ });+ } else bottom = ruleY;+ y = bottom + 14 * u * scale;+ });+ return { objects: result, bottom: y - 14 * u * scale };+ };+ let scale = 1;+ let list = renderRows(scale);+ for (let pass = 0; list.bottom > h - Math.min(margin, h * 0.01) && pass < 80; pass++) {+ scale *= 0.96;+ list = renderRows(scale);+ }+ const watermarks = [+ bookText('… a few notes from the reading room', -w * 0.23, h * 0.54, w * 1.45, { fontSize: 68 * u, fill: p.ink, fontFamily: '思源宋体', fontStyle: 'italic', angle: 19, opacity: 0.055 }),+ bookText('of the pages we keep returning to …', -w * 0.09, h * 0.89, w * 1.42, { fontSize: 59 * u, fill: p.ink, fontFamily: '思源宋体', fontStyle: 'italic', angle: -15, opacity: 0.045 }),+ ];+ watermarks.forEach(mark => Object.assign(mark, { qcName: 'paper-list:watermark' }));+ return { background: solid(p.bg), objects: [...paperListPaper(w, h, p.ink), ...watermarks, ...objects, ...list.objects] };+ },+ },{...posterDesignTemplate("minimal"),build(i) {@@ -1177,7 +1278,7 @@ for (let k = TEMPLATES.length - 1; k >= 0; k--) if (RETIRED.has(TEMPLATES[k]!.idconst MOODY = new Set(['neon', 'cinema', 'quote']); // dark by nature: still available, but never the first thing a new user seesTEMPLATES.unshift(...GAODING, ...STUDIO.filter(t => !MOODY.has(t.id)), ...PREMIUM.filter(t => !MOODY.has(t.id)), ...PREMIUM.filter(t => MOODY.has(t.id)), ...STUDIO.filter(t => MOODY.has(t.id)));// The first screen of the gallery alternates quiet and loud, paper and colour, so the range is visible without scrolling.-const LEAD = ['folio', 'brush', 'keyword', 'regeng', 'highlight', 'frame', 'sage', 'notes', 'interview', 'riso', 'kicker', 'numeral', 'calendar', 'ticket', 'corner', 'polaroid', 'serial', 'chat', 'window', 'newspaper', 'stack', 'bili', 'pop'];+const LEAD = ['paper-list', 'folio', 'brush', 'keyword', 'regeng', 'highlight', 'frame', 'sage', 'notes', 'interview', 'riso', 'kicker', 'numeral', 'calendar', 'ticket', 'corner', 'polaroid', 'serial', 'chat', 'window', 'newspaper', 'stack', 'bili', 'pop'];// Looks built on mesh gradients and soft glows read as generic in a feed, so they are offered last.const GRADIENT_LED = new Set(['acid', 'glass']); TEMPLATES.sort((x, y) => (LEAD.indexOf(x.id) + 1 || (GRADIENT_LED.has(x.id) ? 199 : 99)) - (LEAD.indexOf(y.id) + 1 || (GRADIENT_LED.has(y.id) ? 199 : 99)));diff --git a/apps/web/src/lib/poster-design/vendor/qiaomu/typeset.ts b/apps/web/src/lib/poster-design/vendor/qiaomu/typeset.tsindex d96e659f..18295461 100644--- a/apps/web/src/lib/poster-design/vendor/qiaomu/typeset.ts+++ b/apps/web/src/lib/poster-design/vendor/qiaomu/typeset.ts@@ -38,6 +38,7 @@ const TEMPLATE_FACES: Record<string, string[]> = {keyword: ['得意黑', '优设标题黑'],riso: ['站酷快乐体', '站酷庆科黄油体'],newspaper: ['思源宋体 Heavy'],+ 'paper-list': ['思源宋体 Heavy'],mag: ['思源宋体 Heavy', '朱雀仿宋'],notes: ['霞鹜文楷'],numeral: ['未来荧黑', '阿里妈妈数黑体'],@@ -48,7 +49,7 @@ const TEMPLATE_FACES: Record<string, string[]> = {};const MOOD_OF: Record<string, Mood> = {- minimal: 'heavy', editorial: 'serif', bold: 'punch', dark: 'tech', poster: 'heavy', split: 'heavy', sticker: 'warm', gradient: 'trend', center: 'punch',+ 'paper-list': 'serif', minimal: 'heavy', editorial: 'serif', bold: 'punch', dark: 'tech', poster: 'heavy', split: 'heavy', sticker: 'warm', gradient: 'trend', center: 'punch',checklist: 'warm', number: 'tech', impact: 'punch', photo: 'heavy', bili: 'punch', compare: 'punch', neo: 'punch', soft: 'serif', swiss: 'heavy',acid: 'trend', collage: 'warm', mega: 'heavy', ticker: 'tech', memo: 'warm', pop: 'trend', mag: 'serif', print: 'heavy', glass: 'heavy', bento: 'heavy',neon: 'tech', calm: 'serif', seal: 'brush', quote: 'serif', cinema: 'serif',diff --git a/packages/shared/src/poster-design-catalog.ts b/packages/shared/src/poster-design-catalog.tsindex 904dd57c..1bb86af0 100644--- a/packages/shared/src/poster-design-catalog.ts+++ b/packages/shared/src/poster-design-catalog.ts@@ -1,6 +1,15 @@// Metadata shared by the browser editor and AI discovery. Layout builds remain// in the existing Qiaomu Design implementation (MIT).export const POSTER_DESIGN_TEMPLATES = [+ {+ "id": "paper-list",+ "zh": "书页清单",+ "en": "Bookish list",+ "fit": ["xhs", "portrait", "vertical", "xhs-square", "square"],+ "zhUse": "纸张纹理、淡背景文字、宋体大标题、编号与细横线;适合读书笔记、知识盘点。按空行分条,首行作书名,第二行可用“副标题:”添加副题,其余作正文",+ "enUse": "Textured ivory paper, faint background lettering, serif headlines, large numbers and fine rules; reading notes and knowledge lists. Separate entries with blank lines: book title first, optional second line starting with “Subtitle:”, then body text",+ "available": true+ },{"id": "minimal","zh": "简约白",diff --git a/tests/browser/paper-list-reference.ts b/tests/browser/paper-list-reference.tsnew file mode 100644index 00000000..a2ddca8f--- /dev/null+++ b/tests/browser/paper-list-reference.ts@@ -0,0 +1,7 @@+// Transcribed from the supplied visual reference so layout is compared with+// the same copy, not inferred from an unrelated sample with different lengths.+export const paperListReferenceCopy = {+ title: '网文十八大封神设定',+ subtitle: '《诡秘之主》\n副标题:22条序列+扮演法\n核心设定:二十二非凡途径构成完整晋升体系,想要提升位阶,必须主动贴近对应身份完成“扮演”;非凡力量总量相对稳定,强者的成长往往伴随着他人的失去。\n颠覆点:它把西幻升级写成了一场人格与命运的双重实验。力量不是简单堆叠数值,而是不断迫人进入某种角色、理解某种规则。\n\n《龙族》\n副标题:言灵\n核心设定:血统决定混血种的起点与上限,S到F级天然划分等级;言灵并非普通异能,而是由龙族血脉赋予的规则级权柄。\n颠覆点:打破了“努力终能逆天改命”的青春幻想。这个世界从出生开始就完成了筛选,有人天生站在顶端,有人拼尽全力也难以越过阶层边界。',+ badge: '',+};diff --git a/tests/browser/paper-list.html b/tests/browser/paper-list.htmlnew file mode 100644index 00000000..a5f245e8--- /dev/null+++ b/tests/browser/paper-list.html@@ -0,0 +1,3 @@+<!doctype html>+<html lang="zh-CN"><head><meta charset="UTF-8"><title>书页清单模板验证</title></head>+<body style="margin:24px;background:#e7e7e5;font:16px sans-serif"><h1>书页清单 · 预览与导出验证</h1><p id="status">正在验证…</p><main style="display:flex;gap:24px;align-items:flex-start"></main><script type="module" src="./paper-list.ts"></script></body></html>diff --git a/tests/browser/paper-list.ts b/tests/browser/paper-list.tsnew file mode 100644index 00000000..2420880d--- /dev/null+++ b/tests/browser/paper-list.ts@@ -0,0 +1,121 @@+import { PosterDocumentSchema, parsePosterDocument, serializePosterDocument } from "@edgeever/shared";+import { buildPosterDesign, applyPosterDesign, templatesFor } from "../../apps/web/src/lib/poster-design/templates";+import { paperListSampleCopy } from "../../apps/web/src/lib/poster-design/paper-list-content";+import { renderPosterBlob } from "../../apps/web/src/lib/poster-canvas";++import { paperListReferenceCopy } from "./paper-list-reference";++const status = document.querySelector('#status')!;+const assert = (condition: unknown, message: string) => { if (!condition) throw new Error(message); };+try {+ assert(templatesFor('xhs').some(template => template.id === 'paper-list'), 'Template must be discoverable');+ for (const zh of [true, false]) {+ const { title, subtitle } = paperListSampleCopy(zh);+ // Reproduce the real editor path: fresh Folio -> select Bookish list.+ const starter = zh ? { title: '写下你的标题', subtitle: '把想法变成值得分享的作品' } : { title: 'Write your title', subtitle: 'Turn ideas into something worth sharing' };+ const initial = await buildPosterDesign({ id: 'folio', ...starter, width: 1080, height: 1440, zh });+ const selected = await applyPosterDesign(initial, 'paper-list', zh, 1080, 1440, starter);+ assert(selected.copy?.title === title && selected.copy?.subtitle === subtitle, 'Actual selection must seed sample copy');+ assert(selected.elements.some(element => element.type === 'text' && element.text === '2.'), 'Actual selection must show two entries');+ for (const [width, height] of [[1080, 1440], [1080, 1080], [1920, 1080], [600, 320]]) {+ const design = height === 1440 ? selected : await buildPosterDesign({ id: 'paper-list', title, subtitle, width, height, zh });+ const roundtrip = parsePosterDocument(serializePosterDocument(design));+ assert(roundtrip.templateId === 'paper-list', 'Template must survive saving');+ assert(roundtrip.copy?.subtitle === subtitle, 'Original text must survive saving');+ const texture = roundtrip.elements.filter(element => element.name.startsWith('paper-list:paper:'));+ assert(texture.length === 6 && texture.some(element => element.type === 'path'), 'Paper fibres and creases must survive saving');+ assert(roundtrip.elements.filter(element => element.name === 'paper-list:watermark').length === 2, 'Faint background lettering must survive saving');+ for (const index of [0, 1]) {+ const heading = roundtrip.elements.find(element => element.name === `paper-list:row:${index}:heading`);+ const subhead = roundtrip.elements.find(element => element.name === `paper-list:row:${index}:subtitle`);+ const body = roundtrip.elements.find(element => element.name === `paper-list:row:${index}:body`);+ assert(heading?.type === 'text' && subhead?.type === 'text' && body?.type === 'text', 'Three text levels must exist');+ if (heading?.type === 'text' && subhead?.type === 'text' && body?.type === 'text') {+ assert(heading.fontSize > subhead.fontSize && subhead.fontSize > body.fontSize, 'Book title, subtitle and body need distinct sizes');+ assert(subhead.y >= heading.y + heading.height && body.y >= subhead.y + subhead.height, 'The three levels must not overlap');+ }+ }+ const paragraph = roundtrip.elements.find(element => element.name === 'paper-list:row:0:paragraph:1');+ const firstParagraph = roundtrip.elements.find(element => element.name === 'paper-list:row:0:body');+ assert(paragraph?.type === 'text' && firstParagraph?.type === 'text', 'Body paragraphs must be independently editable');+ if (paragraph?.type === 'text' && firstParagraph?.type === 'text') {+ assert(paragraph.y - firstParagraph.y - firstParagraph.height >= firstParagraph.fontSize * 0.4, 'Paragraphs need visible breathing room');+ }+ assert(roundtrip.elements.some(element => element.type === 'text' && element.text === '1.' && element.fontFamily === '思源宋体' && element.fontWeight === 'normal'), 'Numerals must use the regular book serif');+ const text = design.elements.filter(element => element.type === 'text');+ assert(text.some(element => element.text === '2.'), 'Both entries must survive');+ for (const element of design.elements) {+ // Background lettering intentionally bleeds past the page, like text+ // showing through a cropped scan. Foreground content must remain inside.+ if (element.name === 'paper-list:watermark') {+ assert(element.opacity < 0.06 && element.x < 0, 'Background lettering must stay faint and cropped');+ continue;+ }+ assert(element.x >= 0 && element.y >= 0 && element.x + element.width <= width + 2 && element.y + element.height <= height + 2,+ `Element ${element.id} outside ${width}×${height} (${zh ? 'zh' : 'en'})`);+ }+ if (height === 1440) {+ const blob = await renderPosterBlob(design, async () => { throw new Error('No resources expected'); }, 'png', false);+ const img = document.createElement('img');+ img.src = URL.createObjectURL(blob);+ img.alt = zh ? '书页清单中文 PNG 导出' : 'Bookish list English PNG export';+ img.style.width = '400px';+ document.querySelector('main')!.append(img);+ await img.decode();+ assert(img.naturalWidth === width && img.naturalHeight === height, 'Export dimensions must match');+ const reapplied = await applyPosterDesign(design, 'paper-list', zh);+ assert(reapplied.elements.length === design.elements.length, 'Reapplying must not duplicate content');+ PosterDocumentSchema.parse(reapplied);+ const subhead = design.elements.find(element => element.name === 'paper-list:row:0:subtitle');+ if (subhead?.type === 'text') {+ subhead.text = subhead.sourceText = zh ? '编辑后的副标题' : 'My edited subtitle';+ const editedSubhead = await applyPosterDesign(design, 'paper-list', zh);+ assert(editedSubhead.elements.some(element => element.name === subhead.name && element.type === 'text' && element.sourceText === subhead.sourceText), 'Edited subtitle must survive reapplication');+ }+ const secondParagraph = design.elements.find(element => element.name === 'paper-list:row:0:paragraph:1');+ if (secondParagraph?.type === 'text') {+ secondParagraph.text = secondParagraph.sourceText = zh ? '我修改后的第二段。' : 'My edited second paragraph.';+ const editedParagraph = await applyPosterDesign(design, 'paper-list', zh);+ assert(editedParagraph.elements.some(element => element.name === secondParagraph.name && element.type === 'text' && element.sourceText === secondParagraph.sourceText), 'Second paragraph edits must survive resizing and reapplication');+ }+ const body = design.elements.find(element => element.name === 'paper-list:row:0:body');+ assert(body?.type === 'text', 'Entry body must be separately editable');+ if (body?.type === 'text') {+ body.text = body.sourceText = zh ? '我编辑后的正文,重新应用必须保留。' : 'My edited paragraph must survive.';+ const edited = await applyPosterDesign(design, 'paper-list', zh, 1080, 1440, starter);+ assert(edited.elements.some(element => element.type === 'text' && element.sourceText === body.sourceText), 'Reapplying must preserve edited paragraph');+ }+ }+ }+ const points = await buildPosterDesign({ id: 'paper-list', title, subtitle: '', points: ['First\nA complete paragraph.', 'Second\nAnother paragraph.', 'Third\nLast paragraph.'], width: 1080, height: 1440, zh });+ assert(points.elements.some(element => element.type === 'text' && element.text === '3.'), 'Points must create numbered entries');+ }+ const reference = await buildPosterDesign({ id: 'paper-list', ...paperListReferenceCopy, width: 1080, height: 1440, zh: true });+ const referenceBlob = await renderPosterBlob(reference, async () => { throw new Error('No resources expected'); }, 'png', false);+ const referenceImage = document.createElement('img');+ referenceImage.src = URL.createObjectURL(referenceBlob);+ referenceImage.alt = '原图同文案排版对照';+ referenceImage.style.width = '400px';+ document.querySelector('main')!.append(referenceImage);+ await referenceImage.decode();+ const metrics = document.createElement('pre');+ metrics.id = 'reference-metrics';+ metrics.textContent = JSON.stringify(reference.elements.filter(element => element.type === 'text' && element.name.startsWith('paper-list:row:')).map(element => ({ name: element.name, x: element.x, y: element.y, height: element.height, fontSize: element.type === 'text' ? element.fontSize : 0, text: element.type === 'text' ? element.text : '' })), null, 2);+ const measurements = document.createElement('details');+ const measurementsLabel = document.createElement('summary');+ measurementsLabel.textContent = '同文案版心测量(px)';+ measurements.append(measurementsLabel, metrics);+ document.body.append(measurements);+ const title = reference.elements.find(element => element.role === 'title');+ const firstHeading = reference.elements.find(element => element.name === 'paper-list:row:0:heading');+ const firstSubheading = reference.elements.find(element => element.name === 'paper-list:row:0:subtitle');+ const firstBody = reference.elements.find(element => element.name === 'paper-list:row:0:body');+ assert(title && title.y < 1440 * 0.05, 'Reference title must sit close to the page top');+ assert(firstHeading && firstSubheading && firstBody && firstBody.x < firstHeading.x && firstHeading.x < firstSubheading.x, 'Reference book, subtitle and body have distinct left edges');+ assert(firstBody?.type === 'text' && firstBody.text.split('\n').length === 4, 'Reference opening paragraph must occupy four lines');+ assert(firstBody && Math.abs(firstBody.y / 1440 - 0.33) < 0.035, 'Reference body must begin near one third of the page');+ status.textContent = 'PASS:同文案版心对照、粗体段首、真实模板选择、中英文 × 4 种尺寸、宋体数字、段间留白、裁切水印、编辑保留与 PNG 导出均通过。';+} catch (error) {+ status.textContent = `FAIL: ${String(error)}`;+ console.error(error);+}diff --git a/tests/browser/poster-thumbnail-generator.ts b/tests/browser/poster-thumbnail-generator.tsindex 9ca1a3d9..2091700f 100644--- a/tests/browser/poster-thumbnail-generator.ts+++ b/tests/browser/poster-thumbnail-generator.ts@@ -4,6 +4,7 @@ import { renderPosterBlob } from "../../apps/web/src/lib/poster-canvas";import { loadPosterFont } from "../../apps/web/src/lib/poster-design/fonts";import { installEditorBodyFontFaces } from "../../apps/web/src/lib/editor-body-font-faces";installEditorBodyFontFaces();+import { paperListSampleCopy } from "../../apps/web/src/lib/poster-design/paper-list-content";const prepared = new Map<string, Awaited<ReturnType<typeof buildPosterDesign>>>();const recommended = new Set(templatesFor(undefined).map(template => template.id));Object.assign(window, {@@ -16,6 +17,7 @@ Object.assign(window, {subtitle: zh ? "一个好想法,值得被看见。" : "Ideas deserve to be seen.",badge: zh ? "创作笔记" : "CREATIVE NOTES",};+ if (id === "paper-list") Object.assign(input, paperListSampleCopy(zh));const draft = await buildPosterDesign(input);const texts = draft.elements.filter(element => element.type === "text");// Generation must wait for the actual typefaces; never freeze a temporary