@linloir/limr 0.1.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.en.md +151 -0
  2. package/README.md +80 -127
  3. package/benchmarks/results/layout.json +2593 -0
  4. package/benchmarks/results/markstream-code.json +1823 -0
  5. package/benchmarks/results/markstream-reading-repeat.json +1152 -0
  6. package/benchmarks/results/markstream.json +12486 -0
  7. package/benchmarks/results/streaming-browser.json +77 -0
  8. package/benchmarks/results/streaming.json +357 -0
  9. package/dist/base.css +93 -10
  10. package/dist/{chunk-7JF5HHVF.js → chunk-BG5QUQFR.js} +340 -72
  11. package/dist/chunk-BG5QUQFR.js.map +1 -0
  12. package/dist/chunk-BVHHOVMT.js +179 -0
  13. package/dist/chunk-BVHHOVMT.js.map +1 -0
  14. package/dist/chunk-FJZCQY2S.js +155 -0
  15. package/dist/chunk-FJZCQY2S.js.map +1 -0
  16. package/dist/chunk-FSI5OTBW.js +1 -0
  17. package/dist/{chunk-ETHLPBKQ.js → chunk-GU2RPESF.js} +238 -131
  18. package/dist/chunk-GU2RPESF.js.map +1 -0
  19. package/dist/{chunk-65V5OZ4G.js → chunk-SUAAUGAX.js} +1350 -511
  20. package/dist/chunk-SUAAUGAX.js.map +1 -0
  21. package/dist/core/index.d.ts +6 -3
  22. package/dist/core/index.js +15 -5
  23. package/dist/extensions/index.d.ts +30 -5
  24. package/dist/extensions/index.js +15 -3
  25. package/dist/index.d.ts +4 -4
  26. package/dist/index.js +31 -8
  27. package/dist/{engine-43u8B4yt.d.ts → knuth-plass-C8mgFm7W.d.ts} +67 -1
  28. package/dist/knuth-plass-layout-CHQCWKB5.js +449 -0
  29. package/dist/knuth-plass-layout-CHQCWKB5.js.map +1 -0
  30. package/dist/react/index.d.ts +7 -5
  31. package/dist/react/index.js +7 -3
  32. package/dist/styles.css +93 -10
  33. package/dist/{translations-BliabrPd.d.ts → translations-BXzSwLBJ.d.ts} +49 -4
  34. package/docs/README.md +13 -0
  35. package/docs/api.md +5 -158
  36. package/docs/assets/rendered.svg +9 -0
  37. package/docs/assets/source.svg +9 -0
  38. package/docs/en/README.md +28 -0
  39. package/docs/en/ai-skills.md +57 -0
  40. package/docs/en/annotations.md +86 -0
  41. package/docs/en/api.md +115 -0
  42. package/docs/en/architecture.md +41 -0
  43. package/docs/en/extensions.md +208 -0
  44. package/docs/en/getting-started.md +69 -0
  45. package/docs/en/integration.md +154 -0
  46. package/docs/en/modules.md +84 -0
  47. package/docs/en/performance.md +93 -0
  48. package/docs/en/plugin-packages.md +68 -0
  49. package/docs/en/styles.md +99 -0
  50. package/docs/en/syntax.md +455 -0
  51. package/docs/extensions.md +5 -306
  52. package/docs/implementation.md +5 -76
  53. package/docs/performance.md +5 -81
  54. package/docs/screenshots/blocks.png +0 -0
  55. package/docs/screenshots/dark.png +0 -0
  56. package/docs/screenshots/desktop.png +0 -0
  57. package/docs/screenshots/plugin-mobile.png +0 -0
  58. package/docs/styles.md +5 -100
  59. package/docs/visual-upgrade.md +5 -145
  60. package/docs/zh-CN/README.md +28 -0
  61. package/docs/zh-CN/ai-skills.md +57 -0
  62. package/docs/zh-CN/annotations.md +86 -0
  63. package/docs/zh-CN/api.md +115 -0
  64. package/docs/zh-CN/architecture.md +41 -0
  65. package/docs/zh-CN/extensions.md +210 -0
  66. package/docs/zh-CN/getting-started.md +69 -0
  67. package/docs/zh-CN/integration.md +154 -0
  68. package/docs/zh-CN/modules.md +84 -0
  69. package/docs/zh-CN/performance.md +93 -0
  70. package/docs/zh-CN/plugin-packages.md +68 -0
  71. package/docs/zh-CN/styles.md +99 -0
  72. package/docs/zh-CN/syntax.md +457 -0
  73. package/examples/notes.tsx +18 -11
  74. package/examples/packages/paper-theme/index.css +25 -0
  75. package/examples/packages/paper-theme/package.json +7 -0
  76. package/examples/packages/reading-tools/index.d.ts +2 -0
  77. package/examples/packages/reading-tools/index.js +25 -0
  78. package/examples/packages/reading-tools/package.json +16 -0
  79. package/package.json +17 -5
  80. package/skills/limr-plugin-development/SKILL.md +22 -0
  81. package/skills/limr-plugin-development/agents/openai.yaml +4 -0
  82. package/skills/limr-plugin-development/assets/plugin-template/README.md +30 -0
  83. package/skills/limr-plugin-development/assets/plugin-template/package.json +36 -0
  84. package/skills/limr-plugin-development/assets/plugin-template/src/index.tsx +50 -0
  85. package/skills/limr-plugin-development/assets/plugin-template/src/styles.css +9 -0
  86. package/skills/limr-plugin-development/assets/plugin-template/tsconfig.json +20 -0
  87. package/skills/limr-plugin-development/assets/plugin-template/tsup.config.ts +8 -0
  88. package/skills/limr-plugin-development/references/contract.md +51 -0
  89. package/skills/limr-use/SKILL.md +23 -0
  90. package/skills/limr-use/agents/openai.yaml +4 -0
  91. package/skills/limr-use/references/integration.md +49 -0
  92. package/skills/limr-use/references/syntax.md +20 -0
  93. package/dist/chunk-65V5OZ4G.js.map +0 -1
  94. package/dist/chunk-7JF5HHVF.js.map +0 -1
  95. package/dist/chunk-ETHLPBKQ.js.map +0 -1
  96. package/dist/chunk-V2OG4Y3F.js +0 -1
  97. /package/dist/{chunk-V2OG4Y3F.js.map → chunk-FSI5OTBW.js.map} +0 -0
@@ -0,0 +1,77 @@
1
+ {
2
+ "date": "2026-10-13T14:19:53.397Z",
3
+ "browser": "156.0.8078.4",
4
+ "measurement": "Production Vite/React, default modules, typography and increment animations; Reader without TOC/sidebar. Three isolated warmed pages per scenario. React synchronous commit plus forced layout; idle rAF time, network and async highlighting excluded. Current implementation only.",
5
+ "results": [
6
+ {
7
+ "scenario": "standard",
8
+ "characters": 34860,
9
+ "chunkSize": 256,
10
+ "median": {
11
+ "updates": 137,
12
+ "totalMs": 334.69999980926514,
13
+ "p95Ms": 3.900000035762787,
14
+ "maxMs": 7.300000011920929,
15
+ "elements": 2979
16
+ },
17
+ "samples": [
18
+ {
19
+ "updates": 137,
20
+ "totalMs": 331.3000004887581,
21
+ "p95Ms": 3.5,
22
+ "maxMs": 8.400000035762787,
23
+ "elements": 2979
24
+ },
25
+ {
26
+ "updates": 137,
27
+ "totalMs": 343.80000019073486,
28
+ "p95Ms": 3.800000011920929,
29
+ "maxMs": 8.099999964237213,
30
+ "elements": 2979
31
+ },
32
+ {
33
+ "updates": 137,
34
+ "totalMs": 334.69999980926514,
35
+ "p95Ms": 3.900000035762787,
36
+ "maxMs": 7.300000011920929,
37
+ "elements": 2979
38
+ }
39
+ ]
40
+ },
41
+ {
42
+ "scenario": "growing-code",
43
+ "characters": 43211,
44
+ "chunkSize": 256,
45
+ "median": {
46
+ "updates": 169,
47
+ "totalMs": 294.200000166893,
48
+ "p95Ms": 2.599999964237213,
49
+ "maxMs": 12.400000035762787,
50
+ "elements": 33
51
+ },
52
+ "samples": [
53
+ {
54
+ "updates": 169,
55
+ "totalMs": 294.200000166893,
56
+ "p95Ms": 2.599999964237213,
57
+ "maxMs": 12.400000035762787,
58
+ "elements": 33
59
+ },
60
+ {
61
+ "updates": 169,
62
+ "totalMs": 281.5000005364418,
63
+ "p95Ms": 2.300000011920929,
64
+ "maxMs": 10.699999988079071,
65
+ "elements": 34
66
+ },
67
+ {
68
+ "updates": 169,
69
+ "totalMs": 304,
70
+ "p95Ms": 3,
71
+ "maxMs": 13.300000011920929,
72
+ "elements": 35
73
+ }
74
+ ]
75
+ }
76
+ ]
77
+ }
@@ -0,0 +1,357 @@
1
+ {
2
+ "date": "2026-10-13T14:19:35.764Z",
3
+ "node": "v20.19.5",
4
+ "cpu": "13th Gen Intel(R) Core(TM) i7-13700",
5
+ "baseline": "ebab99154ada9a61bf0e3a0bfbc8c7e943feee7c",
6
+ "measurement": "Core append plus finalization. Five alternating warmed trials; median by total time. Same dependencies, UTF-16 input and chunk boundaries. Rendering, layout, syntax highlighting and network are excluded.",
7
+ "results": [
8
+ {
9
+ "scenario": "gfm",
10
+ "characters": 34860,
11
+ "chunkSize": 256,
12
+ "measurements": {
13
+ "current": {
14
+ "median": {
15
+ "totalMs": 89.06527600000004,
16
+ "p95Ms": 1.171282999999903,
17
+ "maxMs": 1.9022370000000137,
18
+ "finishMs": 0.34038600000008046
19
+ },
20
+ "samples": [
21
+ {
22
+ "totalMs": 91.39315399999998,
23
+ "p95Ms": 1.185141999999928,
24
+ "maxMs": 3.050705999999991,
25
+ "finishMs": 0.3589269999999942
26
+ },
27
+ {
28
+ "totalMs": 87.85499000000004,
29
+ "p95Ms": 1.3831660000000738,
30
+ "maxMs": 3.741890000000012,
31
+ "finishMs": 0.2768620000001647
32
+ },
33
+ {
34
+ "totalMs": 89.06527600000004,
35
+ "p95Ms": 1.171282999999903,
36
+ "maxMs": 1.9022370000000137,
37
+ "finishMs": 0.34038600000008046
38
+ },
39
+ {
40
+ "totalMs": 92.94587500000011,
41
+ "p95Ms": 1.342890000000125,
42
+ "maxMs": 2.8518779999999424,
43
+ "finishMs": 0.34800099999984013
44
+ },
45
+ {
46
+ "totalMs": 88.03629999999998,
47
+ "p95Ms": 1.062398999999914,
48
+ "maxMs": 3.07391500000017,
49
+ "finishMs": 0.2814010000001872
50
+ }
51
+ ]
52
+ },
53
+ "baseline": {
54
+ "median": {
55
+ "totalMs": 139.221266,
56
+ "p95Ms": 1.43726300000003,
57
+ "maxMs": 3.0861139999999523,
58
+ "finishMs": 36.00974499999995
59
+ },
60
+ "samples": [
61
+ {
62
+ "totalMs": 139.221266,
63
+ "p95Ms": 1.43726300000003,
64
+ "maxMs": 3.0861139999999523,
65
+ "finishMs": 36.00974499999995
66
+ },
67
+ {
68
+ "totalMs": 139.91041299999995,
69
+ "p95Ms": 1.5241469999999708,
70
+ "maxMs": 2.2273830000000316,
71
+ "finishMs": 36.47520199999997
72
+ },
73
+ {
74
+ "totalMs": 128.7012440000001,
75
+ "p95Ms": 1.498747000000094,
76
+ "maxMs": 2.0280199999999695,
77
+ "finishMs": 32.749250000000075
78
+ },
79
+ {
80
+ "totalMs": 135.77528900000016,
81
+ "p95Ms": 1.6348089999999047,
82
+ "maxMs": 2.581604999999854,
83
+ "finishMs": 37.24695500000007
84
+ },
85
+ {
86
+ "totalMs": 148.9168790000001,
87
+ "p95Ms": 1.577359000000115,
88
+ "maxMs": 1.8855259999997998,
89
+ "finishMs": 46.68065299999989
90
+ }
91
+ ]
92
+ }
93
+ }
94
+ },
95
+ {
96
+ "scenario": "standard",
97
+ "characters": 34860,
98
+ "chunkSize": 256,
99
+ "measurements": {
100
+ "current": {
101
+ "median": {
102
+ "totalMs": 94.62975000000006,
103
+ "p95Ms": 1.226701999999932,
104
+ "maxMs": 1.8527490000001308,
105
+ "finishMs": 0.3568080000000009
106
+ },
107
+ "samples": [
108
+ {
109
+ "totalMs": 99.32511599999998,
110
+ "p95Ms": 1.166323000000375,
111
+ "maxMs": 2.4412569999999505,
112
+ "finishMs": 0.3740309999998317
113
+ },
114
+ {
115
+ "totalMs": 103.67979299999979,
116
+ "p95Ms": 1.364842999999837,
117
+ "maxMs": 2.0434229999996205,
118
+ "finishMs": 0.36833300000034797
119
+ },
120
+ {
121
+ "totalMs": 94.62975000000006,
122
+ "p95Ms": 1.226701999999932,
123
+ "maxMs": 1.8527490000001308,
124
+ "finishMs": 0.3568080000000009
125
+ },
126
+ {
127
+ "totalMs": 89.93437799999992,
128
+ "p95Ms": 1.4441069999998035,
129
+ "maxMs": 2.6483499999999367,
130
+ "finishMs": 0.34338500000012573
131
+ },
132
+ {
133
+ "totalMs": 89.22391799999968,
134
+ "p95Ms": 1.486648999999943,
135
+ "maxMs": 1.8704970000003414,
136
+ "finishMs": 0.28617099999974016
137
+ }
138
+ ]
139
+ },
140
+ "baseline": {
141
+ "median": {
142
+ "totalMs": 141.40319799999997,
143
+ "p95Ms": 1.4039769999999407,
144
+ "maxMs": 2.470600999999988,
145
+ "finishMs": 34.666573999999855
146
+ },
147
+ "samples": [
148
+ {
149
+ "totalMs": 160.21205999999984,
150
+ "p95Ms": 1.7312900000001719,
151
+ "maxMs": 2.604899999999816,
152
+ "finishMs": 42.263388999999734
153
+ },
154
+ {
155
+ "totalMs": 157.7413550000001,
156
+ "p95Ms": 1.7623570000000655,
157
+ "maxMs": 3.413104999999632,
158
+ "finishMs": 39.673129000000245
159
+ },
160
+ {
161
+ "totalMs": 140.3145129999998,
162
+ "p95Ms": 1.2951160000002346,
163
+ "maxMs": 1.6633320000000822,
164
+ "finishMs": 36.181274999999914
165
+ },
166
+ {
167
+ "totalMs": 139.2373090000001,
168
+ "p95Ms": 1.2822190000001683,
169
+ "maxMs": 1.8564060000003337,
170
+ "finishMs": 37.97901400000001
171
+ },
172
+ {
173
+ "totalMs": 141.40319799999997,
174
+ "p95Ms": 1.4039769999999407,
175
+ "maxMs": 2.470600999999988,
176
+ "finishMs": 34.666573999999855
177
+ }
178
+ ]
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "scenario": "growing-code",
184
+ "characters": 43209,
185
+ "chunkSize": 128,
186
+ "measurements": {
187
+ "current": {
188
+ "median": {
189
+ "totalMs": 29.05458499999986,
190
+ "p95Ms": 0.07175000000097498,
191
+ "maxMs": 7.814548000000286,
192
+ "finishMs": 6.639192000000548
193
+ },
194
+ "samples": [
195
+ {
196
+ "totalMs": 31.501055999999153,
197
+ "p95Ms": 0.07259000000067317,
198
+ "maxMs": 7.657408999999461,
199
+ "finishMs": 8.405789999999797
200
+ },
201
+ {
202
+ "totalMs": 29.043093999999655,
203
+ "p95Ms": 0.06668300000001182,
204
+ "maxMs": 7.89716800000042,
205
+ "finishMs": 7.1266969999996945
206
+ },
207
+ {
208
+ "totalMs": 34.70156400000087,
209
+ "p95Ms": 0.06666699999914272,
210
+ "maxMs": 8.81749200000013,
211
+ "finishMs": 11.916243000000577
212
+ },
213
+ {
214
+ "totalMs": 27.024387999999817,
215
+ "p95Ms": 0.06571500000063679,
216
+ "maxMs": 7.245672999999442,
217
+ "finishMs": 6.643808999999237
218
+ },
219
+ {
220
+ "totalMs": 29.05458499999986,
221
+ "p95Ms": 0.07175000000097498,
222
+ "maxMs": 7.814548000000286,
223
+ "finishMs": 6.639192000000548
224
+ }
225
+ ]
226
+ },
227
+ "baseline": {
228
+ "median": {
229
+ "totalMs": 1335.872523,
230
+ "p95Ms": 7.245639000000665,
231
+ "maxMs": 10.973995000000286,
232
+ "finishMs": 7.3576929999999265
233
+ },
234
+ "samples": [
235
+ {
236
+ "totalMs": 1335.872523,
237
+ "p95Ms": 7.245639000000665,
238
+ "maxMs": 10.973995000000286,
239
+ "finishMs": 7.3576929999999265
240
+ },
241
+ {
242
+ "totalMs": 1326.274002,
243
+ "p95Ms": 7.014228000000003,
244
+ "maxMs": 12.445556000000579,
245
+ "finishMs": 7.228640000000269
246
+ },
247
+ {
248
+ "totalMs": 1418.6740360000003,
249
+ "p95Ms": 8.239763999999923,
250
+ "maxMs": 14.58256099999926,
251
+ "finishMs": 6.973140000000058
252
+ },
253
+ {
254
+ "totalMs": 1253.9393839999993,
255
+ "p95Ms": 6.971345999998448,
256
+ "maxMs": 9.23040199999923,
257
+ "finishMs": 6.990519999999378
258
+ },
259
+ {
260
+ "totalMs": 1460.0512850000014,
261
+ "p95Ms": 8.281401999998707,
262
+ "maxMs": 11.391765000000305,
263
+ "finishMs": 7.17864599999848
264
+ }
265
+ ]
266
+ }
267
+ }
268
+ },
269
+ {
270
+ "scenario": "long-paragraph",
271
+ "characters": 7840,
272
+ "chunkSize": 128,
273
+ "measurements": {
274
+ "current": {
275
+ "median": {
276
+ "totalMs": 74.3154510000004,
277
+ "p95Ms": 2.3149130000001605,
278
+ "maxMs": 2.428404000000228,
279
+ "finishMs": 2.6850159999994503
280
+ },
281
+ "samples": [
282
+ {
283
+ "totalMs": 74.3154510000004,
284
+ "p95Ms": 2.3149130000001605,
285
+ "maxMs": 2.428404000000228,
286
+ "finishMs": 2.6850159999994503
287
+ },
288
+ {
289
+ "totalMs": 74.49110699999983,
290
+ "p95Ms": 2.0422170000001643,
291
+ "maxMs": 2.207414999998946,
292
+ "finishMs": 2.4779399999988527
293
+ },
294
+ {
295
+ "totalMs": 71.64176199999929,
296
+ "p95Ms": 2.2076100000012957,
297
+ "maxMs": 2.4227049999990413,
298
+ "finishMs": 1.9338840000000346
299
+ },
300
+ {
301
+ "totalMs": 71.10443200000009,
302
+ "p95Ms": 2.0364410000001953,
303
+ "maxMs": 2.633443000000625,
304
+ "finishMs": 2.517675999999483
305
+ },
306
+ {
307
+ "totalMs": 75.18800999999985,
308
+ "p95Ms": 2.2747699999999895,
309
+ "maxMs": 2.808483000000706,
310
+ "finishMs": 2.1569129999988945
311
+ }
312
+ ]
313
+ },
314
+ "baseline": {
315
+ "median": {
316
+ "totalMs": 72.4345570000005,
317
+ "p95Ms": 2.2167799999988347,
318
+ "maxMs": 2.6973809999999503,
319
+ "finishMs": 2.005934000000707
320
+ },
321
+ "samples": [
322
+ {
323
+ "totalMs": 71.58244899999954,
324
+ "p95Ms": 2.1129600000003848,
325
+ "maxMs": 2.415530000000217,
326
+ "finishMs": 1.925279999999475
327
+ },
328
+ {
329
+ "totalMs": 72.4345570000005,
330
+ "p95Ms": 2.2167799999988347,
331
+ "maxMs": 2.6973809999999503,
332
+ "finishMs": 2.005934000000707
333
+ },
334
+ {
335
+ "totalMs": 73.05818700000054,
336
+ "p95Ms": 2.3213269999996555,
337
+ "maxMs": 2.667983000001186,
338
+ "finishMs": 1.9141130000007252
339
+ },
340
+ {
341
+ "totalMs": 70.90283699999964,
342
+ "p95Ms": 2.136710000000676,
343
+ "maxMs": 2.787261999999828,
344
+ "finishMs": 1.9099530000003142
345
+ },
346
+ {
347
+ "totalMs": 78.5518319999992,
348
+ "p95Ms": 2.3536110000004555,
349
+ "maxMs": 3.2725900000004913,
350
+ "finishMs": 2.1518209999994724
351
+ }
352
+ ]
353
+ }
354
+ }
355
+ }
356
+ ]
357
+ }
package/dist/base.css CHANGED
@@ -1,5 +1,10 @@
1
1
  /* LiMR classic skin. Local assets only; unlayered application CSS wins. */
2
2
 
3
+ /* Viewport coordinates change on every scroll. They belong to the mask host,
4
+ never its text descendants; inheriting them invalidates the entire article. */
5
+ @property --limr-fade-start { syntax: '<length>'; inherits: false; initial-value: 0px; }
6
+ @property --limr-fade-end { syntax: '<length>'; inherits: false; initial-value: 0px; }
7
+
3
8
  @layer limr {
4
9
  :where([data-limr-appearance]) {
5
10
  --limr-ease: cubic-bezier(.16, 1, .3, 1);
@@ -62,8 +67,21 @@
62
67
  --limr-link: #8bb8e3; --limr-selection: #6e88c955; --limr-shadow: #0006;
63
68
  }
64
69
  }
65
- .limr-prose { width: 100%; min-width: 0; font-size: var(--limr-font-size, 1rem); line-height: var(--limr-line-height, 1.8); font-feature-settings: var(--limr-font-features, 'palt' 1); overflow-wrap: break-word; --limr-paragraph-align: start; }
70
+ .limr-prose { width: 100%; min-width: 0; font-size: var(--limr-font-size, 1rem); line-height: var(--limr-line-height, 1.8); font-feature-settings: var(--limr-font-features, normal); text-spacing-trim: var(--limr-punctuation-spacing, space-all); overflow-wrap: break-word; --limr-paragraph-align: start; }
66
71
  .limr-prose[data-limr-justify='true'] { --limr-paragraph-align: justify; }
72
+ .limr-prose[data-limr-typography='pretty'] :where(p,.limr-paragraph,li,figcaption) { text-wrap: pretty; }
73
+ .limr-prose[data-limr-typography='pretty'] :where(h1,h2,h3,h4,h5,h6) { text-wrap: balance; }
74
+ /* Stable native wrapping prevents earlier lines moving for every token. */
75
+ .limr-prose[data-limr-typography='pretty'] :where([data-pending], [data-pending] p, [data-pending] li, [data-pending] .limr-paragraph) { text-wrap: wrap; text-wrap: stable; }
76
+ .limr-block-loading { display: flex; align-items: center; min-height: 3rem; padding-block: .5rem; }
77
+ .limr-loading { display: inline-flex; flex: none; width: 22px; height: 22px; line-height: 0; color: var(--limr-secondary, #7b7975); }
78
+ .limr-loading svg { display: block; width: 100%; height: 100%; overflow: visible; }
79
+ .limr-loading circle { fill: none; stroke-width: 4; }
80
+ .limr-loading-track { stroke: currentColor; opacity: .17; }
81
+ .limr-loading-orbit { transform-box: view-box; transform-origin: 16px 16px; animation: limr-loading-orbit 1.55s cubic-bezier(.65,0,.35,1) infinite; }
82
+ .limr-loading-arc { stroke: currentColor; stroke-linecap: round; stroke-dasharray: 3 97; transform: rotate(-90deg); transform-box: view-box; transform-origin: 16px 16px; animation: limr-loading-arc 1.55s cubic-bezier(.65,0,.35,1) infinite; }
83
+ @keyframes limr-loading-orbit { 0% { transform: rotate(0deg); } 50% { transform: rotate(300deg); } 100% { transform: rotate(720deg); } }
84
+ @keyframes limr-loading-arc { 0% { stroke-dasharray: 3 97; stroke-dashoffset: 0; } 46%,57% { stroke-dasharray: 92 8; stroke-dashoffset: -4; } 100% { stroke-dasharray: 3 97; stroke-dashoffset: -100; } }
67
85
  .limr-prose :where(p,.limr-paragraph,li) { text-align: var(--limr-paragraph-align); text-align-last: start; text-justify: auto; }
68
86
  .limr-prose ::selection { background: var(--limr-selection, #667eea4d); }
69
87
  .limr-prose { position: relative; isolation: isolate; transition: translate var(--limr-motion) var(--limr-ease); }
@@ -82,6 +100,7 @@
82
100
  .limr-highlight[data-hidden] { background: transparent; text-decoration: none; }
83
101
  .limr-paint-background { background: color-mix(in srgb, var(--limr-highlight) 30%, transparent); }
84
102
  .limr-paint-background:is([data-hovered],[data-active]) { background: color-mix(in srgb, var(--limr-highlight) 48%, transparent); }
103
+ .limr-paint-background[data-reference] { background: color-mix(in srgb, var(--limr-highlight) 18%, transparent); }
85
104
  .limr-highlight-layer .limr-paint-rect:is([data-hovered],[data-active]):not(.limr-paint-background) { background-color: color-mix(in srgb, var(--limr-highlight) 14%, transparent); }
86
105
  .limr-highlight { cursor: pointer; }
87
106
  .limr-paint-selection { background: var(--limr-selection, #667eea4d); z-index: 1; }
@@ -318,9 +337,9 @@
318
337
  .limr-sidebar-card { color: var(--limr-annotation-text, var(--limr-text, #1a1a1a)); min-width: 0; transition: top var(--limr-motion-slow) var(--limr-ease), border-color var(--limr-motion) var(--limr-ease), background-color var(--limr-motion) var(--limr-ease); }
319
338
  .limr-sidebar-card:not([data-default-card]),.limr-sidebar-card-body { border-inline-start: 2px solid var(--limr-annotation-border, var(--limr-annotation-color, var(--limr-border-strong, #d5d0c8))); background: var(--limr-background, #fffefa); padding: var(--limr-sidebar-padding-block, .65rem) var(--limr-sidebar-padding-inline, 10px) calc(var(--limr-sidebar-padding-block, .65rem) + 2px); }
320
339
  .limr-sidebar-card[data-locked] { z-index: 1; transition-property: border-color, background-color; }
321
- .limr-sidebar[data-resizing] > .limr-sidebar-card { transition-property: border-color, background-color; }
340
+ .limr-sidebar:is([data-resizing],[data-releasing]) > .limr-sidebar-card { transition-property: border-color, background-color; }
322
341
  .limr-sidebar-card[data-default-card] { display: flex; flex-direction: column; }
323
- .limr-sidebar-card[data-default-card][data-expanded] { max-height: var(--limr-sidebar-card-height, none); }
342
+ .limr-sidebar-card[data-default-card] { max-height: var(--limr-sidebar-card-height, none); }
324
343
  .limr-sidebar-card-body { display: flex; flex-direction: column; min-height: 0; transition: border-color var(--limr-motion) var(--limr-ease), background-color var(--limr-motion) var(--limr-ease); }
325
344
  .limr-sidebar-card-body > .limr-collapse { min-height: 0; }
326
345
  /* Preview and details trade height; fading both can leave a blank card when
@@ -398,8 +417,9 @@
398
417
  .limr-toolbar-item { display: flex; align-items: center; border-radius: 3px; transition: color 240ms var(--limr-ease); }
399
418
  [data-ready] .limr-toolbar-item { animation: limr-tool-float 330ms cubic-bezier(.16,1,.3,1) calc(30ms + var(--limr-tool-index) * 22ms) both, limr-tool-fade 210ms cubic-bezier(.22,.7,.3,1) calc(65ms + var(--limr-tool-index) * 22ms) both; }
400
419
  .limr-toolbar-action { display: inline-grid; place-items: center; flex: none; min-height: 34px; padding: 5px 7px; border: 0; border-radius: 3px; background: transparent; white-space: nowrap; line-height: 1.5; }
401
- .limr-tool-face { display: flex; align-items: center; justify-self: start; grid-area: 1 / 1; gap: 5px; width: 0; min-width: 0; line-height: 1.5; opacity: 0; pointer-events: none; transition: opacity 240ms var(--limr-ease); }
402
- .limr-tool-face[data-visible] { width: auto; opacity: 1; }
420
+ .limr-tool-faces { display: inline-grid; min-width: 0; transition: width 320ms var(--limr-ease); }
421
+ .limr-tool-face { display: flex; align-items: center; justify-self: start; grid-area: 1 / 1; gap: 5px; width: max-content; min-width: 0; line-height: 1.5; opacity: 0; transform: translateY(2px) scale(.94); transform-origin: left center; pointer-events: none; transition: opacity 220ms var(--limr-ease), transform 320ms var(--limr-ease); }
422
+ .limr-tool-face[data-visible] { opacity: 1; transform: none; }
403
423
  .limr-tool-label { display: block; flex: none; padding-block-end: 1px; }
404
424
  .limr-tool-face > .limr-tool-icon { animation: limr-tool-fade 240ms var(--limr-ease) both; }
405
425
  .limr-toolbar-item[data-status='success'] { color: var(--limr-success, #52885e); }
@@ -408,11 +428,12 @@
408
428
  .limr-tool-icon :where(*) { max-inline-size: 100% !important; max-block-size: 100% !important; min-inline-size: 0 !important; min-block-size: 0 !important; }
409
429
  .limr-tool-icon :where(svg,img) { display: block; width: 100% !important; height: 100% !important; object-fit: contain; flex: none; }
410
430
  .limr-tool-icon :where(div,span,i,b,strong,em) { display: inline-flex; align-items: center; justify-content: center; font-size: inherit !important; line-height: 1 !important; }
411
- .limr-toolbar-panel { display: flex; width: 100%; min-width: 0; min-height: 0; align-self: stretch; max-height: var(--limr-toolbar-panel-height, 260px); overflow: hidden; text-align: start; margin-top: 4px; border-top: 1px solid var(--limr-toolbar-border, var(--limr-border, #e5e2dc)); animation: limr-tool-float 300ms cubic-bezier(.16,1,.3,1) both, limr-tool-fade 220ms ease 35ms both; }
431
+ /* Only the actions determine toolbar width. Panel contents cannot enlarge it. */
432
+ .limr-toolbar-panel { display: flex; contain: inline-size; min-width: 0; min-height: 0; align-self: stretch; max-height: var(--limr-toolbar-panel-height, 260px); overflow: hidden; text-align: start; margin-top: 4px; border-top: 1px solid var(--limr-toolbar-border, var(--limr-border, #e5e2dc)); animation: limr-tool-float 300ms cubic-bezier(.16,1,.3,1) both, limr-tool-fade 220ms ease 35ms both; }
412
433
  .limr-toolbar-panel .limr-overlay-content { padding: 10px 9px 4px; scroll-padding-block: 8px; }
413
- .limr-toolbar-panel .limr-overlay-scroll-inner { width: var(--limr-toolbar-panel-width, 246px); max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
434
+ .limr-toolbar-panel .limr-overlay-scroll { width: 100%; min-width: 0; }
435
+ .limr-toolbar-panel .limr-overlay-scroll-inner { width: 100%; min-width: 0; overflow-wrap: anywhere; }
414
436
  .limr-toolbar-panel :where(input,textarea,select,img) { max-width: 100%; }
415
- .limr-selection-toolbar[data-expanded] .limr-toolbar-surface { min-width: min(calc(var(--limr-toolbar-panel-width, 246px) + 30px), calc(100vw - 20px)); }
416
437
  [data-placement^='top'] .limr-toolbar-panel { order: -1; border-top: 0; border-bottom: 1px solid var(--limr-toolbar-border, var(--limr-border, #e5e2dc)); margin-top: 0; margin-bottom: 4px; }
417
438
  .limr-toolbar-swatch { position: relative; width: 24px; height: 24px; margin: 3px 12px 3px 5px; padding: 0; border: 1px solid color-mix(in srgb, var(--swatch) 60%, transparent); border-radius: var(--limr-toolbar-swatch-radius, 4px); background: color-mix(in srgb, var(--swatch) 30%, transparent); transition: scale 240ms var(--limr-ease); --limr-highlight: var(--swatch); }
418
439
  .limr-toolbar-swatch:hover { scale: 1.07; }
@@ -421,6 +442,8 @@
421
442
  .limr-toolbar-delete-warning[aria-hidden='true'] { visibility: hidden; }
422
443
  [data-placement^='top'] .limr-toolbar-delete-warning { order: -1; }
423
444
  .limr-toolbar-delete-hint { margin: 4px 8px 5px; font-size: 11px; color: var(--limr-error, #b45858); }
445
+ .limr-selection-toolbar[data-readonly] { width: max-content; }
446
+ .limr-toolbar-readonly-hint { margin: 4px 8px 5px; font-size: 11px; line-height: 1.6; color: var(--limr-secondary, #7b756e); white-space: nowrap; text-align: start; }
424
447
  .limr-highlight-settings fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
425
448
  .limr-highlight-settings legend { margin-bottom: 7px; padding: 0; color: var(--limr-secondary, #7b756e); font-size: 11px; }
426
449
  .limr-highlight-colors { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 9px; }
@@ -429,8 +452,9 @@
429
452
  .limr-color-swatch[aria-pressed='true'] { outline-color: var(--swatch); }
430
453
  .limr-color-swatch svg { width: 15px; height: 15px; color: var(--limr-text, #3d3a36); opacity: 0; }
431
454
  .limr-color-swatch[aria-pressed='true'] svg { opacity: 1; }
432
- .limr-highlight-styles { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; }
433
- .limr-highlight-styles button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: 11px; }
455
+ .limr-highlight-styles { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: flex-start; gap: 5px; }
456
+ .limr-highlight-styles button { display: flex; flex: 0 0 auto; min-width: 48px; flex-direction: column; align-items: center; gap: 4px; padding: 6px 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: 11px; white-space: nowrap; }
457
+ .limr-highlight-style-label { text-align: center; }
434
458
  .limr-highlight-styles button svg { width: 21px; height: 21px; }
435
459
  .limr-highlight-styles [aria-pressed='true'] { color: var(--limr-toolbar-accent, var(--limr-accent, #8a7865)); border-color: currentColor; }
436
460
  .limr-action-error { display: block; max-width: 300px; padding: .5rem; color: #b45858; }
@@ -449,3 +473,62 @@
449
473
  .limr-prose pre { white-space: pre-wrap; }
450
474
  }
451
475
  }
476
+
477
+ @layer limr { .limr-stream-block { display: contents; } }
478
+
479
+ @layer limr {
480
+ .limr-mermaid-display { padding: 0; overflow: hidden; }
481
+ .limr-mermaid-loading { display: grid; place-items: center; min-height: 80px; }
482
+ .limr-mermaid-viewport { overflow: auto; max-width: 100%; max-height: var(--limr-mermaid-max-height, min(70vh, 36rem)); padding: .75rem 1rem; box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--limr-mermaid-scrollbar, #87837866) transparent; cursor: grab; user-select: none; -webkit-user-select: none; }
483
+ .limr-mermaid-viewport * { user-select: none; -webkit-user-select: none; }
484
+ .limr-mermaid-viewport[data-dragging] { cursor: grabbing; }
485
+ .limr-mermaid-viewport:focus-visible { outline-offset: -2px; }
486
+ .limr-mermaid-viewport::-webkit-scrollbar { width: 5px; height: 5px; }
487
+ .limr-mermaid-viewport::-webkit-scrollbar-track,.limr-mermaid-viewport::-webkit-scrollbar-corner { background: transparent; }
488
+ .limr-mermaid-viewport::-webkit-scrollbar-thumb { background: var(--limr-mermaid-scrollbar, #87837866); border-radius: 8px; }
489
+ .limr-mermaid-viewport::-webkit-scrollbar-button { display: none; }
490
+ .limr-mermaid-viewport[hidden],.limr-prose .limr-mermaid-source[hidden] { display: none; }
491
+ .limr-mermaid-canvas { margin-inline: auto; min-width: 0; transition: width var(--limr-motion) var(--limr-ease); }
492
+ .limr-mermaid-canvas > svg { display: block; width: 100%; height: auto; max-width: none !important; }
493
+ .limr-prose .limr-mermaid-source { background: transparent; padding: .75rem 1rem; }
494
+ .limr-mermaid-error { color: var(--limr-secondary); font-size: .8em; margin-bottom: .5rem; }
495
+ .limr-mermaid-error button { border: 0; background: transparent; text-decoration: underline; }
496
+ .limr-block-tools { position: absolute; inset-block-start: .45rem; inset-inline-end: .5rem; display: flex; align-items: center; padding: 2px; gap: 1px; border-radius: 9px; background: #ffffff99; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 5px #29231d0a, inset 0 0 0 1px #ffffff80; color: #6b6760; z-index: 1; opacity: 0; transition: opacity var(--limr-motion-fast) var(--limr-ease); }
497
+ .limr-mermaid-block:hover .limr-block-tools,.limr-mermaid-block:focus-within .limr-block-tools { opacity: 1; }
498
+ @media (hover: none) { .limr-block-tools { opacity: 1; } }
499
+ .limr-block-tools > button { display: inline-grid; place-items: center; position: relative; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: inherit; transition: color var(--limr-motion-fast) var(--limr-ease), background-color var(--limr-motion-fast) var(--limr-ease), opacity var(--limr-motion-fast) var(--limr-ease); }
500
+ .limr-block-tools > button > svg { width: 19px; height: 19px; }
501
+ .limr-block-tools > button:enabled:hover { background: #87837822; color: #2c2925; }
502
+ .limr-block-tools > button:enabled:active { background: #87837838; }
503
+ .limr-block-tools > button[aria-pressed='true'] { color: var(--limr-heading); }
504
+ [data-limr-theme='dark'] .limr-block-tools { background: #37332dcc; box-shadow: 0 1px 5px #0002, inset 0 0 0 1px #ffffff10; color: #c7c0b6; }
505
+ [data-limr-theme='dark'] .limr-block-tools > button:enabled:hover { color: #f0ebe4; }
506
+ @media (prefers-color-scheme: dark) {
507
+ [data-limr-theme='auto'] .limr-block-tools { background: #37332dcc; box-shadow: 0 1px 5px #0002, inset 0 0 0 1px #ffffff10; color: #c7c0b6; }
508
+ [data-limr-theme='auto'] .limr-block-tools > button:enabled:hover { color: #f0ebe4; }
509
+ }
510
+ .limr-callout { border-color: var(--limr-callout-color); background: color-mix(in srgb, var(--limr-callout-color) 8%, transparent); }
511
+ .limr-callout-title { display: flex; align-items: center; gap: .5em; color: var(--limr-callout-color); text-transform: none; letter-spacing: .02em; font-size: .9em; }
512
+ .limr-callout-title > svg { width: 18px; height: 18px; flex: none; }
513
+ .limr-callout-title > span { flex: 1; }
514
+ .limr-callout-toggle { border: 0; border-radius: 5px; background: transparent; padding: 2px; display: inline-flex; }
515
+ .limr-callout-toggle:hover { background: color-mix(in srgb, var(--limr-callout-color) 12%, transparent); }
516
+ .limr-callout-toggle > svg { width: 18px; height: 18px; transition: transform var(--limr-motion) var(--limr-ease); }
517
+ .limr-callout-toggle[aria-expanded='false'] > svg { transform: rotate(-90deg); }
518
+ .limr-callout > .limr-collapse > .limr-collapse-inner > .limr-block-content { min-height: 0; }
519
+ @media (prefers-reduced-motion: reduce) { .limr-mermaid-canvas,.limr-block-tools,.limr-block-tools > button,.limr-callout-toggle > svg { transition: none; } }
520
+ @media print {
521
+ .limr-mermaid-viewport { max-height: none; overflow: visible; }
522
+ .limr-mermaid-canvas { width: 100% !important; }
523
+ .limr-block-tools { display: none; }
524
+ }
525
+ }
526
+
527
+ @layer limr {
528
+ [data-limr-kp] { white-space: nowrap; text-align: start; text-wrap: nowrap !important; }
529
+ [data-limr-kp][data-limr-kp-stale='clip'] { overflow-x: clip; }
530
+ [data-limr-kp][data-limr-kp-stale='wrap'] { white-space: normal; text-wrap: wrap !important; }
531
+ @media print { [data-limr-kp][data-limr-kp-stale] { overflow: visible; white-space: normal; text-wrap: wrap !important; } }
532
+ .limr-kp-glue { display: inline-block; font-size: 0; line-height: 0; white-space: pre; }
533
+ .limr-kp-hyphen::before { content: '-'; }
534
+ }