@react-x11/components 0.10.0 → 0.11.0

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 (90) hide show
  1. package/dist/code/index.d.ts.map +1 -1
  2. package/dist/code/index.js +25 -24
  3. package/dist/code/index.js.map +1 -1
  4. package/dist/code-language/index.d.ts +1 -1
  5. package/dist/code-language/index.d.ts.map +1 -1
  6. package/dist/code-language/index.js +1 -1
  7. package/dist/code-language/index.js.map +1 -1
  8. package/dist/code-language/runs.d.ts +31 -0
  9. package/dist/code-language/runs.d.ts.map +1 -1
  10. package/dist/code-language/runs.js +105 -0
  11. package/dist/code-language/runs.js.map +1 -1
  12. package/dist/codeblock/index.d.ts +13 -0
  13. package/dist/codeblock/index.d.ts.map +1 -1
  14. package/dist/codeblock/index.js +37 -1
  15. package/dist/codeblock/index.js.map +1 -1
  16. package/dist/html/css/cascade.d.ts +32 -10
  17. package/dist/html/css/cascade.d.ts.map +1 -1
  18. package/dist/html/css/cascade.js +72 -27
  19. package/dist/html/css/cascade.js.map +1 -1
  20. package/dist/html/css/style.d.ts +7 -4
  21. package/dist/html/css/style.d.ts.map +1 -1
  22. package/dist/html/css/style.js +37 -6
  23. package/dist/html/css/style.js.map +1 -1
  24. package/dist/html/css/ua.js +8 -5
  25. package/dist/html/css/ua.js.map +1 -1
  26. package/dist/html/layout/block.d.ts.map +1 -1
  27. package/dist/html/layout/block.js +127 -9
  28. package/dist/html/layout/block.js.map +1 -1
  29. package/dist/html/layout/boxes.d.ts +27 -0
  30. package/dist/html/layout/boxes.d.ts.map +1 -1
  31. package/dist/html/layout/boxes.js +30 -2
  32. package/dist/html/layout/boxes.js.map +1 -1
  33. package/dist/html/layout/inline.d.ts +3 -0
  34. package/dist/html/layout/inline.d.ts.map +1 -1
  35. package/dist/html/layout/inline.js +236 -14
  36. package/dist/html/layout/inline.js.map +1 -1
  37. package/dist/html/node.d.ts.map +1 -1
  38. package/dist/html/node.js +118 -57
  39. package/dist/html/node.js.map +1 -1
  40. package/dist/html/paint.d.ts.map +1 -1
  41. package/dist/html/paint.js +203 -37
  42. package/dist/html/paint.js.map +1 -1
  43. package/dist/html/svg.d.ts.map +1 -1
  44. package/dist/html/svg.js +27 -20
  45. package/dist/html/svg.js.map +1 -1
  46. package/dist/internal/codelines.d.ts +42 -0
  47. package/dist/internal/codelines.d.ts.map +1 -0
  48. package/dist/internal/codelines.js +170 -0
  49. package/dist/internal/codelines.js.map +1 -0
  50. package/dist/markdown/index.d.ts.map +1 -1
  51. package/dist/markdown/index.js +98 -26
  52. package/dist/markdown/index.js.map +1 -1
  53. package/dist/rich-text-editor/index.d.ts.map +1 -1
  54. package/dist/rich-text-editor/index.js +3 -8
  55. package/dist/rich-text-editor/index.js.map +1 -1
  56. package/dist/rich-text-editor/markdown.d.ts.map +1 -1
  57. package/dist/rich-text-editor/markdown.js +30 -1
  58. package/dist/rich-text-editor/markdown.js.map +1 -1
  59. package/dist/rich-text-editor/replace.d.ts +13 -0
  60. package/dist/rich-text-editor/replace.d.ts.map +1 -0
  61. package/dist/rich-text-editor/replace.js +64 -0
  62. package/dist/rich-text-editor/replace.js.map +1 -0
  63. package/dist/terminal-output/index.d.ts.map +1 -1
  64. package/dist/terminal-output/index.js +100 -25
  65. package/dist/terminal-output/index.js.map +1 -1
  66. package/dist/terminal-output/runs.d.ts +4 -1
  67. package/dist/terminal-output/runs.d.ts.map +1 -1
  68. package/dist/terminal-output/runs.js +5 -1
  69. package/dist/terminal-output/runs.js.map +1 -1
  70. package/package.json +1 -1
  71. package/src/code/index.ts +34 -32
  72. package/src/code-language/index.ts +1 -1
  73. package/src/code-language/runs.ts +111 -1
  74. package/src/codeblock/index.ts +48 -1
  75. package/src/html/css/cascade.ts +117 -39
  76. package/src/html/css/style.ts +43 -15
  77. package/src/html/css/ua.ts +8 -5
  78. package/src/html/layout/block.ts +134 -8
  79. package/src/html/layout/boxes.ts +43 -2
  80. package/src/html/layout/inline.ts +257 -13
  81. package/src/html/node.ts +145 -79
  82. package/src/html/paint.ts +236 -45
  83. package/src/html/svg.ts +30 -19
  84. package/src/internal/codelines.ts +200 -0
  85. package/src/markdown/index.ts +145 -26
  86. package/src/rich-text-editor/index.ts +3 -11
  87. package/src/rich-text-editor/markdown.ts +36 -1
  88. package/src/rich-text-editor/replace.ts +85 -0
  89. package/src/terminal-output/index.ts +127 -34
  90. package/src/terminal-output/runs.ts +16 -2
@@ -1253,15 +1253,29 @@ export function applyDeclaration(style, parent, prop, rawValue, ctx) {
1253
1253
  }
1254
1254
  case 'background-clip':
1255
1255
  case '-webkit-background-clip': {
1256
- // `text` the first layer's alone, which paints through the text
1256
+ // `text` the first layer's alone, which paints through the text —
1257
+ // and with `border-area` through its border as well, in either order
1258
+ // (CSS Backgrounds 4, 2.1)
1257
1259
  const clips = layerValues(value, (part) => {
1258
1260
  const v = part.toLowerCase();
1259
- return v === 'text' || isVisualBox(v) ? v : null;
1261
+ if (v === 'text' || isBackgroundClip(v))
1262
+ return v;
1263
+ const [a, b, more] = splitValue(v);
1264
+ return !more &&
1265
+ ((a === 'border-area' && b === 'text') ||
1266
+ (a === 'text' && b === 'border-area'))
1267
+ ? 'border-area text'
1268
+ : null;
1260
1269
  });
1261
1270
  if (!clips)
1262
1271
  return;
1263
- style.backgroundClipText = clips[0] === 'text';
1264
- const boxes = clips.map((c) => (c === 'text' ? 'border-box' : c));
1272
+ style.backgroundClipText =
1273
+ clips[0] === 'text' || clips[0] === 'border-area text';
1274
+ const boxes = clips.map((c) => c === 'text'
1275
+ ? 'border-box'
1276
+ : c === 'border-area text'
1277
+ ? 'border-area'
1278
+ : c);
1265
1279
  style.backgroundClip = boxes[0];
1266
1280
  style.backgroundClips = boxes.length > 1 ? boxes : null;
1267
1281
  return;
@@ -2401,6 +2415,15 @@ export function settleOverflow(style) {
2401
2415
  function isVisualBox(v) {
2402
2416
  return v === 'border-box' || v === 'padding-box' || v === 'content-box';
2403
2417
  }
2418
+ function isBackgroundClip(v) {
2419
+ return v === 'border-area' || isVisualBox(v);
2420
+ }
2421
+ /**
2422
+ * Whether a box is a scroll container: its `overflow` is neither `visible`
2423
+ * nor `clip`. `clip` cuts what overflows as `hidden` does, but makes no
2424
+ * formatting context and keeps a flex or grid item's automatic minimum
2425
+ * (CSS Overflow 3, 3.1) — so only this asks it apart from `hidden`.
2426
+ */
2404
2427
  export function scrolls(style) {
2405
2428
  const x = style.overflowX;
2406
2429
  const y = style.overflowY;
@@ -2998,11 +3021,19 @@ function readBackgroundLayer(text, ctx, last) {
2998
3021
  i += 1;
2999
3022
  }
3000
3023
  else if (isVisualBox(v)) {
3001
- // one box is both the origin and the clip, and a second the clip
3002
- if ((boxes += 1) > 2)
3024
+ // one box is both the origin and the clip, and a second the clip —
3025
+ // which `border-area` is instead of, and the one box the origin
3026
+ if ((boxes += 1) > (seen & 32 ? 1 : 2))
3003
3027
  return null;
3004
3028
  if (boxes === 1)
3005
3029
  layer.origin = v;
3030
+ if (!(seen & 32))
3031
+ layer.clip = v;
3032
+ i += 1;
3033
+ }
3034
+ else if (v === 'border-area') {
3035
+ if (boxes > 1 || !once(32))
3036
+ return null;
3006
3037
  layer.clip = v;
3007
3038
  i += 1;
3008
3039
  }