@podlite/to-jsx 0.0.41 → 0.0.43
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.
- package/CHANGELOG.podlite +14 -0
- package/README.md +61 -4
- package/esm/index.d.ts +5 -0
- package/esm/index.js +225 -55
- package/esm/index.js.map +1 -1
- package/esm/podlite.css +105 -1
- package/lib/index.d.ts +5 -0
- package/lib/index.js +225 -55
- package/lib/index.js.map +1 -1
- package/lib/podlite.css +105 -1
- package/package.json +4 -4
package/lib/podlite.css
CHANGED
|
@@ -222,6 +222,103 @@ details.folded > .folded-content {
|
|
|
222
222
|
padding: 1em;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
/* Folded heading sections — =for head L :folded wraps the whole section */
|
|
226
|
+
details.folded-section {
|
|
227
|
+
margin: 1em 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
details.folded-section > summary.folded-section-summary {
|
|
231
|
+
cursor: pointer;
|
|
232
|
+
list-style: none;
|
|
233
|
+
display: flex;
|
|
234
|
+
align-items: center;
|
|
235
|
+
gap: 0.25em;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
details.folded-section > summary.folded-section-summary::-webkit-details-marker {
|
|
239
|
+
display: none;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
details.folded-section > summary.folded-section-summary::before {
|
|
243
|
+
content: '▶';
|
|
244
|
+
flex-shrink: 0;
|
|
245
|
+
transition: transform 0.2s ease;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
details.folded-section[open] > summary.folded-section-summary::before {
|
|
249
|
+
transform: rotate(90deg);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Render the heading inline with the disclosure marker so the summary stays
|
|
253
|
+
on one line. Preserves <h1>..<h6> semantics (heading level announced to
|
|
254
|
+
assistive tech) while fixing the visual break caused by block-level h*.
|
|
255
|
+
The `.line-src` selector handles the case where the editor wraps each
|
|
256
|
+
node for live preview line-sync. */
|
|
257
|
+
details.folded-section > summary.folded-section-summary h1,
|
|
258
|
+
details.folded-section > summary.folded-section-summary h2,
|
|
259
|
+
details.folded-section > summary.folded-section-summary h3,
|
|
260
|
+
details.folded-section > summary.folded-section-summary h4,
|
|
261
|
+
details.folded-section > summary.folded-section-summary h5,
|
|
262
|
+
details.folded-section > summary.folded-section-summary h6,
|
|
263
|
+
details.folded-section > summary.folded-section-summary > .line-src {
|
|
264
|
+
display: inline;
|
|
265
|
+
margin: 0;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
details.folded-section > .folded-section-content {
|
|
269
|
+
padding: 0.5em 0 0 1em;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* TOC per-item fold — single-line disclosure + link for toc items that have
|
|
273
|
+
nested children (leaf items render as plain li without a marker).
|
|
274
|
+
A left gutter (padding-left) on every toc item reserves space for the
|
|
275
|
+
disclosure marker so that text at the same level starts on the same
|
|
276
|
+
x-position regardless of whether an item is foldable. The marker sits
|
|
277
|
+
in that gutter via absolute positioning. */
|
|
278
|
+
li.toc-item,
|
|
279
|
+
li.toc-item-foldable {
|
|
280
|
+
position: relative;
|
|
281
|
+
padding-left: 1.2em;
|
|
282
|
+
list-style: none;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/* Normalise nested toc-list indentation — browser default padding-left (40px)
|
|
286
|
+
stacks with the per-item gutter, producing exaggerated indent for deeper
|
|
287
|
+
levels. Use a predictable 1.5em step per level. */
|
|
288
|
+
ul.toc-list {
|
|
289
|
+
padding-left: 1.5em;
|
|
290
|
+
list-style: none;
|
|
291
|
+
}
|
|
292
|
+
.toc > ul.toc-list {
|
|
293
|
+
padding-left: 0;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
li.toc-item-foldable > details.toc-fold > summary.toc-list-summary {
|
|
297
|
+
cursor: pointer;
|
|
298
|
+
list-style: none;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
li.toc-item-foldable > details.toc-fold > summary.toc-list-summary::-webkit-details-marker {
|
|
302
|
+
display: none;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
li.toc-item-foldable > details.toc-fold > summary.toc-list-summary::before {
|
|
306
|
+
content: '▶';
|
|
307
|
+
position: absolute;
|
|
308
|
+
left: 0;
|
|
309
|
+
display: inline-block;
|
|
310
|
+
transition: transform 0.2s ease;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
li.toc-item-foldable > details.toc-fold[open] > summary.toc-list-summary::before {
|
|
314
|
+
transform: rotate(90deg);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* Keep summary content inline when editor preview wraps nodes in .line-src */
|
|
318
|
+
li.toc-item-foldable > details.toc-fold > summary.toc-list-summary > .line-src {
|
|
319
|
+
display: inline;
|
|
320
|
+
}
|
|
321
|
+
|
|
225
322
|
/* Folded notification blocks */
|
|
226
323
|
details.notify.folded {
|
|
227
324
|
border-left-width: 4px;
|
|
@@ -294,10 +391,17 @@ li.task-list-item {
|
|
|
294
391
|
margin-left: -1em;
|
|
295
392
|
padding-left: 0;
|
|
296
393
|
display: flex;
|
|
297
|
-
align-items:
|
|
394
|
+
align-items: flex-start;
|
|
298
395
|
gap: 0.35em;
|
|
299
396
|
}
|
|
300
397
|
|
|
398
|
+
li.task-list-item > input[type='checkbox'] {
|
|
399
|
+
/* nudge the checkbox down so its centre aligns roughly with the cap-height
|
|
400
|
+
of the first line of text rather than sitting at its top edge */
|
|
401
|
+
margin-top: 0.25em;
|
|
402
|
+
flex-shrink: 0;
|
|
403
|
+
}
|
|
404
|
+
|
|
301
405
|
li.task-list-item p {
|
|
302
406
|
margin: 0;
|
|
303
407
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podlite/to-jsx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"description": "Render Podlite markup as React JSX components",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"homepage": "https://podlite.org",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"test": "yarn g:jest --passWithNoTests"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@podlite/diagram": "^0.0.
|
|
26
|
-
"@podlite/schema": "0.0.
|
|
25
|
+
"@podlite/diagram": "^0.0.43",
|
|
26
|
+
"@podlite/schema": "0.0.39",
|
|
27
27
|
"entities": "^4.5.0",
|
|
28
|
-
"podlite": "0.0.
|
|
28
|
+
"podlite": "0.0.52",
|
|
29
29
|
"react-is": "^18.0.0"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|